@atlaskit/mention 21.0.9 → 21.0.10
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 +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +3 -11
- package/report.api.md +10 -6
- package/dist/types-ts4.0/_constants.d.ts +0 -1
- package/dist/types-ts4.0/api/ContextMentionResource.d.ts +0 -23
- package/dist/types-ts4.0/api/MentionNameClient.d.ts +0 -11
- package/dist/types-ts4.0/api/MentionNameResolver.d.ts +0 -23
- package/dist/types-ts4.0/api/MentionResource.d.ts +0 -99
- package/dist/types-ts4.0/api/PresenceResource.d.ts +0 -119
- package/dist/types-ts4.0/api/TeamMentionResource.d.ts +0 -35
- package/dist/types-ts4.0/api/analytics.d.ts +0 -17
- package/dist/types-ts4.0/components/LockCircleIcon/index.d.ts +0 -3
- package/dist/types-ts4.0/components/Mention/PrimitiveMention.d.ts +0 -7
- package/dist/types-ts4.0/components/Mention/ResourcedMention.d.ts +0 -27
- package/dist/types-ts4.0/components/Mention/index.d.ts +0 -31
- package/dist/types-ts4.0/components/Mention/ufoExperiences.d.ts +0 -9
- package/dist/types-ts4.0/components/MentionDescriptionByline/TeamMentionDescriptionByline.d.ts +0 -7
- package/dist/types-ts4.0/components/MentionDescriptionByline/UserMentionDescriptionByline.d.ts +0 -5
- package/dist/types-ts4.0/components/MentionDescriptionByline/index.d.ts +0 -5
- package/dist/types-ts4.0/components/MentionDescriptionByline/styles.d.ts +0 -5
- package/dist/types-ts4.0/components/MentionDescriptionByline/types.d.ts +0 -4
- package/dist/types-ts4.0/components/MentionItem/MentionHighlightHelpers.d.ts +0 -3
- package/dist/types-ts4.0/components/MentionItem/index.d.ts +0 -16
- package/dist/types-ts4.0/components/MentionItem/styles.d.ts +0 -46
- package/dist/types-ts4.0/components/MentionList/index.d.ts +0 -41
- package/dist/types-ts4.0/components/MentionList/styles.d.ts +0 -8
- package/dist/types-ts4.0/components/MentionListError/GenericErrorIllustration.d.ts +0 -7
- package/dist/types-ts4.0/components/MentionListError/index.d.ts +0 -13
- package/dist/types-ts4.0/components/MentionListError/styles.d.ts +0 -17
- package/dist/types-ts4.0/components/MentionPicker/index.d.ts +0 -79
- package/dist/types-ts4.0/components/MentionPicker/styles.d.ts +0 -12
- package/dist/types-ts4.0/components/MessagesIntlProvider/index.d.ts +0 -3
- package/dist/types-ts4.0/components/NoAccessTooltip/index.d.ts +0 -6
- package/dist/types-ts4.0/components/NoAccessTooltip/main.d.ts +0 -7
- package/dist/types-ts4.0/components/Popup/index.d.ts +0 -26
- package/dist/types-ts4.0/components/ResourcedMentionList/index.d.ts +0 -50
- package/dist/types-ts4.0/components/Scrollable/index.d.ts +0 -11
- package/dist/types-ts4.0/components/Scrollable/styles.d.ts +0 -5
- package/dist/types-ts4.0/components/TeamMentionHighlight/TeamMentionHighlightController.d.ts +0 -17
- package/dist/types-ts4.0/components/TeamMentionHighlight/index.d.ts +0 -35
- package/dist/types-ts4.0/components/TeamMentionHighlight/lazy.d.ts +0 -4
- package/dist/types-ts4.0/components/TeamMentionHighlight/styles.d.ts +0 -33
- package/dist/types-ts4.0/components/i18n.d.ts +0 -77
- package/dist/types-ts4.0/config/index.d.ts +0 -5
- package/dist/types-ts4.0/element.d.ts +0 -3
- package/dist/types-ts4.0/i18n/cs.d.ts +0 -24
- package/dist/types-ts4.0/i18n/da.d.ts +0 -24
- package/dist/types-ts4.0/i18n/de.d.ts +0 -24
- package/dist/types-ts4.0/i18n/en.d.ts +0 -24
- package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -24
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -24
- package/dist/types-ts4.0/i18n/es.d.ts +0 -24
- package/dist/types-ts4.0/i18n/et.d.ts +0 -20
- package/dist/types-ts4.0/i18n/fi.d.ts +0 -24
- package/dist/types-ts4.0/i18n/fr.d.ts +0 -24
- package/dist/types-ts4.0/i18n/hu.d.ts +0 -24
- package/dist/types-ts4.0/i18n/index.d.ts +0 -35
- package/dist/types-ts4.0/i18n/is.d.ts +0 -24
- package/dist/types-ts4.0/i18n/it.d.ts +0 -24
- package/dist/types-ts4.0/i18n/ja.d.ts +0 -24
- package/dist/types-ts4.0/i18n/ko.d.ts +0 -24
- package/dist/types-ts4.0/i18n/languages.d.ts +0 -33
- package/dist/types-ts4.0/i18n/nb.d.ts +0 -24
- package/dist/types-ts4.0/i18n/nl.d.ts +0 -24
- package/dist/types-ts4.0/i18n/pl.d.ts +0 -24
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -24
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -20
- package/dist/types-ts4.0/i18n/ro.d.ts +0 -24
- package/dist/types-ts4.0/i18n/ru.d.ts +0 -24
- package/dist/types-ts4.0/i18n/sk.d.ts +0 -20
- package/dist/types-ts4.0/i18n/sv.d.ts +0 -24
- package/dist/types-ts4.0/i18n/th.d.ts +0 -24
- package/dist/types-ts4.0/i18n/tr.d.ts +0 -24
- package/dist/types-ts4.0/i18n/uk.d.ts +0 -24
- package/dist/types-ts4.0/i18n/vi.d.ts +0 -24
- package/dist/types-ts4.0/i18n/zh.d.ts +0 -24
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -24
- package/dist/types-ts4.0/i18n.d.ts +0 -1
- package/dist/types-ts4.0/index.d.ts +0 -19
- package/dist/types-ts4.0/item.d.ts +0 -2
- package/dist/types-ts4.0/resource.d.ts +0 -10
- package/dist/types-ts4.0/shared-styles.d.ts +0 -5
- package/dist/types-ts4.0/spotlight.d.ts +0 -3
- package/dist/types-ts4.0/team-resource.d.ts +0 -8
- package/dist/types-ts4.0/typeahead.d.ts +0 -3
- package/dist/types-ts4.0/types.d.ts +0 -168
- package/dist/types-ts4.0/util/analytics.d.ts +0 -32
- package/dist/types-ts4.0/util/i18n.d.ts +0 -33
- package/dist/types-ts4.0/util/id.d.ts +0 -2
- package/dist/types-ts4.0/util/index.d.ts +0 -1
- package/dist/types-ts4.0/util/logger.d.ts +0 -4
- package/dist/types-ts4.0/util/mouse.d.ts +0 -8
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mention",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.10",
|
|
4
4
|
"description": "A React component used to display user profiles in a list for 'Mention' functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.ts",
|
|
25
17
|
"atlassian": {
|
|
@@ -38,11 +30,11 @@
|
|
|
38
30
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
39
31
|
"@atlaskit/avatar": "^21.1.0",
|
|
40
32
|
"@atlaskit/button": "^16.4.0",
|
|
41
|
-
"@atlaskit/focus-ring": "^1.
|
|
33
|
+
"@atlaskit/focus-ring": "^1.2.0",
|
|
42
34
|
"@atlaskit/icon": "^21.11.0",
|
|
43
35
|
"@atlaskit/lozenge": "^11.3.0",
|
|
44
36
|
"@atlaskit/theme": "^12.2.0",
|
|
45
|
-
"@atlaskit/tokens": "^0.
|
|
37
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
46
38
|
"@atlaskit/tooltip": "^17.6.0",
|
|
47
39
|
"@atlaskit/ufo": "^0.1.0",
|
|
48
40
|
"@atlaskit/util-service-support": "^6.1.0",
|
package/report.api.md
CHANGED
|
@@ -21,7 +21,8 @@ import { WithIntlProps } from 'react-intl-next';
|
|
|
21
21
|
// @public (undocumented)
|
|
22
22
|
export class AbstractMentionResource
|
|
23
23
|
extends AbstractResource<MentionDescription[]>
|
|
24
|
-
implements MentionProvider
|
|
24
|
+
implements MentionProvider
|
|
25
|
+
{
|
|
25
26
|
// (undocumented)
|
|
26
27
|
filter(query?: string): void;
|
|
27
28
|
// (undocumented)
|
|
@@ -55,7 +56,8 @@ export class AbstractMentionResource
|
|
|
55
56
|
// @public (undocumented)
|
|
56
57
|
export class AbstractPresenceResource
|
|
57
58
|
extends AbstractResource<PresenceMap>
|
|
58
|
-
implements PresenceProvider
|
|
59
|
+
implements PresenceProvider
|
|
60
|
+
{
|
|
59
61
|
// (undocumented)
|
|
60
62
|
protected notifyListeners(presences: PresenceMap): void;
|
|
61
63
|
// (undocumented)
|
|
@@ -115,7 +117,7 @@ export class ContextMentionResource implements MentionProvider {
|
|
|
115
117
|
| 'shouldHighlightMention'
|
|
116
118
|
| 'isFiltering'
|
|
117
119
|
| 'subscribe'
|
|
118
|
-
| 'unsubscribe'
|
|
120
|
+
| 'unsubscribe',
|
|
119
121
|
>(
|
|
120
122
|
f: K,
|
|
121
123
|
) => MentionProvider[K];
|
|
@@ -127,7 +129,7 @@ export class ContextMentionResource implements MentionProvider {
|
|
|
127
129
|
| 'shouldHighlightMention'
|
|
128
130
|
| 'isFiltering'
|
|
129
131
|
| 'subscribe'
|
|
130
|
-
| 'unsubscribe'
|
|
132
|
+
| 'unsubscribe',
|
|
131
133
|
>(
|
|
132
134
|
f: K,
|
|
133
135
|
declaredArgs: number,
|
|
@@ -491,7 +493,8 @@ export interface MentionProvider
|
|
|
491
493
|
// @public
|
|
492
494
|
export class MentionResource
|
|
493
495
|
extends AbstractMentionResource
|
|
494
|
-
implements ResolvingMentionProvider
|
|
496
|
+
implements ResolvingMentionProvider
|
|
497
|
+
{
|
|
495
498
|
constructor(config: MentionResourceConfig);
|
|
496
499
|
// (undocumented)
|
|
497
500
|
cacheMentionName(id: string, mentionName: string): void;
|
|
@@ -1022,7 +1025,8 @@ interface TeamMentionProvider extends MentionProvider {
|
|
|
1022
1025
|
// @public
|
|
1023
1026
|
export class TeamMentionResource
|
|
1024
1027
|
extends MentionResource
|
|
1025
|
-
implements TeamMentionProvider
|
|
1028
|
+
implements TeamMentionProvider
|
|
1029
|
+
{
|
|
1026
1030
|
constructor(
|
|
1027
1031
|
userMentionConfig: MentionResourceConfig,
|
|
1028
1032
|
teamMentionConfig: TeamMentionResourceConfig,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ELEMENTS_CHANNEL = "fabric-elements";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { MentionProvider, MentionContextIdentifier, ErrorCallback, InfoCallback, ResultCallback } from './MentionResource';
|
|
2
|
-
import { MentionDescription, InviteFromMentionProvider } from '../types';
|
|
3
|
-
export type { MentionDescription };
|
|
4
|
-
export declare type MentionProviderFunctions = Omit<{
|
|
5
|
-
[Key in keyof MentionProvider]: MentionProvider[Key] extends Function ? MentionProvider[Key] : never;
|
|
6
|
-
}, keyof InviteFromMentionProvider>;
|
|
7
|
-
/**
|
|
8
|
-
* This component is stateful and should be instantianted per contextIdentifiers.
|
|
9
|
-
*/
|
|
10
|
-
export default class ContextMentionResource implements MentionProvider {
|
|
11
|
-
private mentionProvider;
|
|
12
|
-
private contextIdentifier;
|
|
13
|
-
constructor(mentionProvider: MentionProvider, contextIdentifier: MentionContextIdentifier);
|
|
14
|
-
getContextIdentifier(): MentionContextIdentifier | undefined;
|
|
15
|
-
callWithContextIds: <K extends "subscribe" | "unsubscribe" | "filter" | "recordMentionSelection" | "shouldHighlightMention" | "isFiltering">(f: K, declaredArgs: number) => MentionProvider[K];
|
|
16
|
-
callDefault: <K extends "subscribe" | "unsubscribe" | "filter" | "recordMentionSelection" | "shouldHighlightMention" | "isFiltering">(f: K) => MentionProvider[K];
|
|
17
|
-
subscribe: (key: string, callback?: ResultCallback<MentionDescription[]> | undefined, errCallback?: ErrorCallback | undefined, infoCallback?: InfoCallback | undefined, allResultsCallback?: ResultCallback<MentionDescription[]> | undefined, analyticsCallback?: import("../types").AnalyticsCallback | undefined) => void;
|
|
18
|
-
unsubscribe: (key: string) => void;
|
|
19
|
-
filter: (query?: string | undefined, contextIdentifier?: MentionContextIdentifier | undefined) => void;
|
|
20
|
-
recordMentionSelection: (mention: MentionDescription, contextIdentifier?: MentionContextIdentifier | undefined) => void;
|
|
21
|
-
shouldHighlightMention: (mention: MentionDescription) => boolean;
|
|
22
|
-
isFiltering: (query: string) => boolean;
|
|
23
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MentionNameDetails } from '../types';
|
|
2
|
-
export interface MentionNameClient {
|
|
3
|
-
getLookupLimit(): number;
|
|
4
|
-
lookupMentionNames(ids: string[]): Promise<MentionNameDetails[]>;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Supports the Atlassian Profile retrieval service.
|
|
8
|
-
*
|
|
9
|
-
* Uses:
|
|
10
|
-
* https://statlas.prod.atl-paas.net/swagger-ui-2.2.6/index.html?url=https://profile-retrieval-service.prod.atl-paas.net:443/api/swagger.yaml#!/default/getUsersByIds
|
|
11
|
-
*/
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
|
-
import { MentionNameDetails, MentionNameResolver } from '../types';
|
|
3
|
-
import { MentionNameClient } from './MentionNameClient';
|
|
4
|
-
export type { MentionNameResolver } from '../types';
|
|
5
|
-
export declare class DefaultMentionNameResolver implements MentionNameResolver {
|
|
6
|
-
static waitForBatch: number;
|
|
7
|
-
private client;
|
|
8
|
-
private nameCache;
|
|
9
|
-
private nameQueue;
|
|
10
|
-
private nameStartTime;
|
|
11
|
-
private processingQueue;
|
|
12
|
-
private debounce;
|
|
13
|
-
private fireHydrationEvent;
|
|
14
|
-
constructor(client: MentionNameClient, analyticsProps?: WithAnalyticsEventsProps);
|
|
15
|
-
lookupName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
|
|
16
|
-
cacheName(id: string, name: string): void;
|
|
17
|
-
private scheduleProcessQueue;
|
|
18
|
-
private isQueueAtLimit;
|
|
19
|
-
private splitQueueAtLimit;
|
|
20
|
-
private resolveQueueItem;
|
|
21
|
-
private processQueue;
|
|
22
|
-
private fireAnalytics;
|
|
23
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { AnalyticsCallback, ErrorCallback, InfoCallback, InviteExperimentCohort, InviteFlow, MentionContextIdentifier, MentionDescription, MentionNameDetails, MentionProvider, MentionResourceConfig, MentionsResult, MentionStats, ResourceProvider, ResultCallback, UserRole } from '../types';
|
|
2
|
-
export type { MentionStats, ResultCallback, ErrorCallback, InfoCallback, MentionResourceConfig, ResourceProvider, MentionContextIdentifier, MentionProvider, } from '../types';
|
|
3
|
-
export interface TeamMentionResourceConfig extends MentionResourceConfig {
|
|
4
|
-
teamLinkResolver?: (teamId: string) => string;
|
|
5
|
-
teamHighlightEnabled?: boolean;
|
|
6
|
-
createTeamPath?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface TeamMentionProvider extends MentionProvider {
|
|
9
|
-
mentionTypeaheadHighlightEnabled: () => boolean;
|
|
10
|
-
mentionTypeaheadCreateTeamPath: () => string | undefined;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Support
|
|
14
|
-
*/
|
|
15
|
-
export interface ResolvingMentionProvider extends MentionProvider {
|
|
16
|
-
resolveMentionName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
|
|
17
|
-
cacheMentionName(id: string, mentionName: string): void;
|
|
18
|
-
supportsMentionNameResolving(): boolean;
|
|
19
|
-
}
|
|
20
|
-
declare class AbstractResource<Result> implements ResourceProvider<Result> {
|
|
21
|
-
protected changeListeners: Map<string, ResultCallback<Result>>;
|
|
22
|
-
protected errListeners: Map<string, ErrorCallback>;
|
|
23
|
-
protected infoListeners: Map<string, InfoCallback>;
|
|
24
|
-
protected allResultsListeners: Map<string, ResultCallback<Result>>;
|
|
25
|
-
protected analyticsListeners: Map<string, AnalyticsCallback>;
|
|
26
|
-
constructor();
|
|
27
|
-
subscribe(key: string, callback?: ResultCallback<Result>, errCallback?: ErrorCallback, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback<Result>, analyticsListeners?: AnalyticsCallback): void;
|
|
28
|
-
unsubscribe(key: string): void;
|
|
29
|
-
}
|
|
30
|
-
declare class AbstractMentionResource extends AbstractResource<MentionDescription[]> implements MentionProvider {
|
|
31
|
-
shouldHighlightMention(_mention: MentionDescription): boolean;
|
|
32
|
-
filter(query?: string): void;
|
|
33
|
-
recordMentionSelection(_mention: MentionDescription): void;
|
|
34
|
-
isFiltering(_query: string): boolean;
|
|
35
|
-
protected _notifyListeners(mentionsResult: MentionsResult, stats?: MentionStats): void;
|
|
36
|
-
protected _notifyAllResultsListeners(mentionsResult: MentionsResult): void;
|
|
37
|
-
protected _notifyErrorListeners(error: Error, query?: string): void;
|
|
38
|
-
protected _notifyInfoListeners(info: string): void;
|
|
39
|
-
protected _notifyAnalyticsListeners(event: string, actionSubject: string, action: string, attributes?: {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
}): void;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Provides a Javascript API
|
|
45
|
-
*/
|
|
46
|
-
export declare class MentionResource extends AbstractMentionResource implements ResolvingMentionProvider {
|
|
47
|
-
private config;
|
|
48
|
-
private lastReturnedSearch;
|
|
49
|
-
private activeSearches;
|
|
50
|
-
productName?: string;
|
|
51
|
-
shouldEnableInvite: boolean;
|
|
52
|
-
inviteExperimentCohort?: InviteExperimentCohort;
|
|
53
|
-
userRole: UserRole;
|
|
54
|
-
onInviteItemClick?: (flow: InviteFlow) => void;
|
|
55
|
-
constructor(config: MentionResourceConfig);
|
|
56
|
-
shouldHighlightMention(mention: MentionDescription): boolean;
|
|
57
|
-
notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
|
|
58
|
-
notifyError(error: Error, query?: string): void;
|
|
59
|
-
filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
60
|
-
recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
61
|
-
isFiltering(query: string): boolean;
|
|
62
|
-
resolveMentionName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
|
|
63
|
-
cacheMentionName(id: string, mentionName: string): void;
|
|
64
|
-
supportsMentionNameResolving(): boolean;
|
|
65
|
-
protected updateActiveSearches(query: string): void;
|
|
66
|
-
protected verifyMentionConfig(config: MentionResourceConfig): void;
|
|
67
|
-
private initialState;
|
|
68
|
-
/**
|
|
69
|
-
* Clear a context object to generate query params by removing empty
|
|
70
|
-
* strings, `undefined` and empty values.
|
|
71
|
-
*
|
|
72
|
-
* @param contextIdentifier the current context identifier
|
|
73
|
-
* @returns a safe context for query encoding
|
|
74
|
-
*/
|
|
75
|
-
private clearContext;
|
|
76
|
-
private getQueryParams;
|
|
77
|
-
/**
|
|
78
|
-
* Returns the initial mention display list before a search is performed for the specified
|
|
79
|
-
* container.
|
|
80
|
-
*
|
|
81
|
-
* @param contextIdentifier
|
|
82
|
-
* @returns Promise
|
|
83
|
-
*/
|
|
84
|
-
protected remoteInitialState(contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
|
|
85
|
-
private search;
|
|
86
|
-
protected remoteSearch(query: string, contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
|
|
87
|
-
private transformServiceResponse;
|
|
88
|
-
recordSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
89
|
-
}
|
|
90
|
-
export declare class HttpError implements Error {
|
|
91
|
-
name: string;
|
|
92
|
-
message: string;
|
|
93
|
-
statusCode: number;
|
|
94
|
-
stack?: string;
|
|
95
|
-
constructor(statusCode: number, statusMessage: string);
|
|
96
|
-
}
|
|
97
|
-
export declare const isResolvingMentionProvider: (p: any) => p is ResolvingMentionProvider;
|
|
98
|
-
export { AbstractResource, AbstractMentionResource };
|
|
99
|
-
export default MentionResource;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { Presence } from '../types';
|
|
2
|
-
import { AbstractResource, ResourceProvider } from './MentionResource';
|
|
3
|
-
export interface PresenceMap {
|
|
4
|
-
[userId: string]: Presence;
|
|
5
|
-
}
|
|
6
|
-
export interface PresenceResourceConfig {
|
|
7
|
-
url: string;
|
|
8
|
-
cloudId: string;
|
|
9
|
-
productId?: string;
|
|
10
|
-
cache?: PresenceCache;
|
|
11
|
-
cacheExpiry?: number;
|
|
12
|
-
parser?: PresenceParser;
|
|
13
|
-
}
|
|
14
|
-
export interface PresenceCache {
|
|
15
|
-
contains(userId: string): boolean;
|
|
16
|
-
get(userId: string): Presence;
|
|
17
|
-
getBulk(userIds: string[]): PresenceMap;
|
|
18
|
-
getMissingUserIds(userIds: string[]): string[];
|
|
19
|
-
update(presUpdate: PresenceMap): void;
|
|
20
|
-
}
|
|
21
|
-
export interface PresenceResponse {
|
|
22
|
-
data: Data;
|
|
23
|
-
}
|
|
24
|
-
export interface Data {
|
|
25
|
-
PresenceBulk: PresenceBulk[];
|
|
26
|
-
}
|
|
27
|
-
export interface PresenceBulk {
|
|
28
|
-
userId: string;
|
|
29
|
-
state: null | string;
|
|
30
|
-
type: null | string;
|
|
31
|
-
date: null | string;
|
|
32
|
-
message: null | string;
|
|
33
|
-
stateMetadata?: string;
|
|
34
|
-
}
|
|
35
|
-
export interface PresenceParser {
|
|
36
|
-
mapState(state: string): string;
|
|
37
|
-
parse(response: PresenceResponse): PresenceMap;
|
|
38
|
-
}
|
|
39
|
-
export interface PresenceProvider extends ResourceProvider<PresenceMap> {
|
|
40
|
-
refreshPresence(userIds: string[]): void;
|
|
41
|
-
}
|
|
42
|
-
declare class AbstractPresenceResource extends AbstractResource<PresenceMap> implements PresenceProvider {
|
|
43
|
-
refreshPresence(userIds: string[]): void;
|
|
44
|
-
protected notifyListeners(presences: PresenceMap): void;
|
|
45
|
-
}
|
|
46
|
-
declare class PresenceResource extends AbstractPresenceResource {
|
|
47
|
-
private config;
|
|
48
|
-
private presenceCache;
|
|
49
|
-
private presenceParser;
|
|
50
|
-
constructor(config: PresenceResourceConfig);
|
|
51
|
-
refreshPresence(userIds: string[]): void;
|
|
52
|
-
private retrievePresence;
|
|
53
|
-
private queryDirectoryForPresences;
|
|
54
|
-
private static cleanUrl;
|
|
55
|
-
}
|
|
56
|
-
export declare class DefaultPresenceCache implements PresenceCache {
|
|
57
|
-
private static readonly defaultTimeout;
|
|
58
|
-
private static readonly defaultFlushTrigger;
|
|
59
|
-
private cache;
|
|
60
|
-
private size;
|
|
61
|
-
private expiryInMillis;
|
|
62
|
-
private flushTrigger;
|
|
63
|
-
constructor(cacheTimeout?: number, cacheTrigger?: number);
|
|
64
|
-
/**
|
|
65
|
-
* Precondition: _delete is only called internally if userId exists in cache
|
|
66
|
-
* Removes cache entry
|
|
67
|
-
* @param userId
|
|
68
|
-
*/
|
|
69
|
-
private _delete;
|
|
70
|
-
/**
|
|
71
|
-
* Checks a cache entry and calls delete if the info has expired
|
|
72
|
-
* @param userId
|
|
73
|
-
*/
|
|
74
|
-
private _deleteIfExpired;
|
|
75
|
-
/**
|
|
76
|
-
* Cleans expired entries from cache
|
|
77
|
-
*/
|
|
78
|
-
private _removeExpired;
|
|
79
|
-
/**
|
|
80
|
-
* Checks if a user exists in the cache
|
|
81
|
-
* @param userId
|
|
82
|
-
*/
|
|
83
|
-
contains(userId: string): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Retrieves a presence from the cache after checking for expired entries
|
|
86
|
-
* @param userId - to index the cache
|
|
87
|
-
* @returns Presence - the presence that matches the userId
|
|
88
|
-
*/
|
|
89
|
-
get(userId: string): Presence;
|
|
90
|
-
/**
|
|
91
|
-
* Retrieve multiple presences at once from the cache
|
|
92
|
-
* @param userIds - to index the cache
|
|
93
|
-
* @returns PresenceMap - A map of userIds to cached Presences
|
|
94
|
-
*/
|
|
95
|
-
getBulk(userIds: string[]): PresenceMap;
|
|
96
|
-
/**
|
|
97
|
-
* For a given list of ids, returns a subset
|
|
98
|
-
* of all the ids with missing cache entries.
|
|
99
|
-
* @param userIds - to index the cache
|
|
100
|
-
* @returns string[] - ids missing from the cache
|
|
101
|
-
*/
|
|
102
|
-
getMissingUserIds(userIds: string[]): string[];
|
|
103
|
-
/**
|
|
104
|
-
* Precondition: presMap only contains ids of users not in cache
|
|
105
|
-
* expired users must first be removed then reinserted with updated presence
|
|
106
|
-
* Updates the cache by adding the new Presence entries and setting the expiry time
|
|
107
|
-
* @param presMap
|
|
108
|
-
*/
|
|
109
|
-
update(presMap: PresenceMap): void;
|
|
110
|
-
}
|
|
111
|
-
export declare class DefaultPresenceParser implements PresenceParser {
|
|
112
|
-
static FOCUS_STATE: string;
|
|
113
|
-
mapState(state: string): string;
|
|
114
|
-
parse(response: PresenceResponse): PresenceMap;
|
|
115
|
-
private static extractState;
|
|
116
|
-
private static isFocusState;
|
|
117
|
-
}
|
|
118
|
-
export { AbstractPresenceResource };
|
|
119
|
-
export default PresenceResource;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { MentionsResult } from '../types';
|
|
2
|
-
import MentionResource, { MentionContextIdentifier, MentionResourceConfig, TeamMentionResourceConfig, TeamMentionProvider } from './MentionResource';
|
|
3
|
-
/**
|
|
4
|
-
* Provides a Javascript API to fetch users and teams
|
|
5
|
-
* In future we will have a new endpoint to return both users and teams, we can
|
|
6
|
-
* remove this class at this point
|
|
7
|
-
*/
|
|
8
|
-
export default class TeamMentionResource extends MentionResource implements TeamMentionProvider {
|
|
9
|
-
private readonly teamMentionConfig;
|
|
10
|
-
private lastSearchQuery?;
|
|
11
|
-
private lastReturnedSearchTeam;
|
|
12
|
-
constructor(userMentionConfig: MentionResourceConfig, teamMentionConfig: TeamMentionResourceConfig);
|
|
13
|
-
filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
14
|
-
mentionTypeaheadHighlightEnabled: () => boolean;
|
|
15
|
-
mentionTypeaheadCreateTeamPath: () => string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Returns the initial mention display list before a search is performed for the specified
|
|
18
|
-
* container.
|
|
19
|
-
*/
|
|
20
|
-
private remoteInitialStateTeamAndUsers;
|
|
21
|
-
/**
|
|
22
|
-
* Both user and team requests are not blocked together
|
|
23
|
-
* If users request arrives first, show users. Show teams when team request arrives.
|
|
24
|
-
* If team request arrives first, block waiting for user request, then show both
|
|
25
|
-
* If one errors, show the non-erroring one
|
|
26
|
-
* If both error, show error
|
|
27
|
-
*/
|
|
28
|
-
private handleBothRequests;
|
|
29
|
-
notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
|
|
30
|
-
private getQueryParamsOfTeamMentionConfig;
|
|
31
|
-
private remoteUserSearch;
|
|
32
|
-
private remoteTeamSearch;
|
|
33
|
-
private convertTeamResultToMentionResult;
|
|
34
|
-
private trimTeamARI;
|
|
35
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MentionContextIdentifier } from '../types';
|
|
2
|
-
export declare const SMART_EVENT_TYPE = "smart";
|
|
3
|
-
export declare enum Actions {
|
|
4
|
-
REQUESTED = "requested",
|
|
5
|
-
SUCCESSFUL = "successful",
|
|
6
|
-
SEARCHED = "searched",
|
|
7
|
-
FAILED = "failed",
|
|
8
|
-
SELECTED = "selected"
|
|
9
|
-
}
|
|
10
|
-
export declare type DefaultAttributes = {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
context: string;
|
|
13
|
-
sessionId: string;
|
|
14
|
-
pickerType: 'mentions';
|
|
15
|
-
source: 'smarts';
|
|
16
|
-
};
|
|
17
|
-
export declare const defaultAttributes: (context?: MentionContextIdentifier | undefined) => DefaultAttributes;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MentionType } from '../../types';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
export interface PrimitiveMentionProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
-
mentionType: MentionType;
|
|
5
|
-
}
|
|
6
|
-
declare const PrimitiveMention: import("react").ForwardRefExoticComponent<PrimitiveMentionProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
-
export default PrimitiveMention;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MentionProvider } from '../../api/MentionResource';
|
|
3
|
-
import { MentionEventHandler } from '../../types';
|
|
4
|
-
export interface Props {
|
|
5
|
-
id: string;
|
|
6
|
-
text: string;
|
|
7
|
-
accessLevel?: string;
|
|
8
|
-
mentionProvider?: Promise<MentionProvider>;
|
|
9
|
-
onClick?: MentionEventHandler;
|
|
10
|
-
onMouseEnter?: MentionEventHandler;
|
|
11
|
-
onMouseLeave?: MentionEventHandler;
|
|
12
|
-
}
|
|
13
|
-
export interface State {
|
|
14
|
-
isHighlighted: boolean;
|
|
15
|
-
resolvedMentionName?: string;
|
|
16
|
-
}
|
|
17
|
-
export default class ResourcedMention extends React.PureComponent<Props, State> {
|
|
18
|
-
_isMounted: boolean;
|
|
19
|
-
constructor(props: Props);
|
|
20
|
-
componentDidMount(): void;
|
|
21
|
-
componentWillUnmount(): void;
|
|
22
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
23
|
-
private setStateSafely;
|
|
24
|
-
private processName;
|
|
25
|
-
private handleMentionProvider;
|
|
26
|
-
render(): JSX.Element;
|
|
27
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MentionEventHandler } from '../../types';
|
|
3
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
|
-
export declare const ANALYTICS_HOVER_DELAY = 1000;
|
|
5
|
-
export declare const UNKNOWN_USER_ID = "_|unknown|_";
|
|
6
|
-
export declare type OwnProps = {
|
|
7
|
-
id: string;
|
|
8
|
-
text: string;
|
|
9
|
-
isHighlighted?: boolean;
|
|
10
|
-
accessLevel?: string;
|
|
11
|
-
onClick?: MentionEventHandler;
|
|
12
|
-
onMouseEnter?: MentionEventHandler;
|
|
13
|
-
onMouseLeave?: MentionEventHandler;
|
|
14
|
-
onHover?: () => void;
|
|
15
|
-
};
|
|
16
|
-
export declare type Props = OwnProps & WithAnalyticsEventsProps;
|
|
17
|
-
export declare class MentionInternal extends React.PureComponent<Props, {}> {
|
|
18
|
-
private hoverTimeout?;
|
|
19
|
-
constructor(props: Props);
|
|
20
|
-
componentDidMount(): void;
|
|
21
|
-
private handleOnClick;
|
|
22
|
-
private handleOnMouseEnter;
|
|
23
|
-
private handleOnMouseLeave;
|
|
24
|
-
private getMentionType;
|
|
25
|
-
componentWillUnmount(): void;
|
|
26
|
-
renderUnknownUserError(id: string): JSX.Element;
|
|
27
|
-
render(): JSX.Element;
|
|
28
|
-
}
|
|
29
|
-
declare const Mention: React.ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
30
|
-
declare type Mention = MentionInternal;
|
|
31
|
-
export default Mention;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ConcurrentExperience } from '@atlaskit/ufo';
|
|
3
|
-
export declare const mentionRenderedUfoExperience: ConcurrentExperience;
|
|
4
|
-
export declare class UfoErrorBoundary extends React.Component<{
|
|
5
|
-
id: string;
|
|
6
|
-
}> {
|
|
7
|
-
componentDidCatch(): void;
|
|
8
|
-
render(): React.ReactNode;
|
|
9
|
-
}
|
package/dist/types-ts4.0/components/MentionDescriptionByline/TeamMentionDescriptionByline.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DescriptionBylineProps } from './types';
|
|
3
|
-
export default class TeamMentionDescriptionByline extends React.PureComponent<DescriptionBylineProps> {
|
|
4
|
-
private renderByline;
|
|
5
|
-
private getBylineComponent;
|
|
6
|
-
render(): JSX.Element | null;
|
|
7
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const DescriptionBylineStyle: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MentionDescription, OnMentionEvent } from '../../types';
|
|
3
|
-
export { MENTION_ITEM_HEIGHT } from './styles';
|
|
4
|
-
export interface Props {
|
|
5
|
-
mention: MentionDescription;
|
|
6
|
-
selected?: boolean;
|
|
7
|
-
onMouseMove?: OnMentionEvent;
|
|
8
|
-
onMouseEnter?: OnMentionEvent;
|
|
9
|
-
onSelection?: OnMentionEvent;
|
|
10
|
-
}
|
|
11
|
-
export default class MentionItem extends React.PureComponent<Props, {}> {
|
|
12
|
-
private onMentionSelected;
|
|
13
|
-
private onMentionMenuItemMouseMove;
|
|
14
|
-
private onMentionMenuItemMouseEnter;
|
|
15
|
-
render(): JSX.Element;
|
|
16
|
-
}
|