@atlaskit/mention 26.1.0 → 26.3.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.
- package/CHANGELOG.md +78 -0
- package/analytics/package.json +1 -8
- package/constants/package.json +1 -8
- package/context-mention-resource/package.json +1 -8
- package/dist/cjs/api/ContextMentionResource.js +14 -0
- package/dist/cjs/api/MentionResource.js +6 -0
- package/dist/cjs/components/DisabledMentionTooltip/index.js +20 -0
- package/dist/cjs/components/DisabledMentionTooltip/main.js +24 -0
- package/dist/cjs/components/Mention/PrimitiveMention.js +8 -1
- package/dist/cjs/components/Mention/index.js +51 -12
- package/dist/cjs/components/MentionAvatar/index.js +6 -1
- package/dist/cjs/types.js +10 -0
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/api/ContextMentionResource.js +12 -0
- package/dist/es2019/api/MentionResource.js +4 -0
- package/dist/es2019/components/DisabledMentionTooltip/index.js +7 -0
- package/dist/es2019/components/DisabledMentionTooltip/main.js +14 -0
- package/dist/es2019/components/Mention/PrimitiveMention.js +8 -0
- package/dist/es2019/components/Mention/index.js +50 -12
- package/dist/es2019/components/MentionAvatar/index.js +7 -2
- package/dist/es2019/types.js +12 -0
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/api/ContextMentionResource.js +14 -0
- package/dist/esm/api/MentionResource.js +6 -0
- package/dist/esm/components/DisabledMentionTooltip/index.js +9 -0
- package/dist/esm/components/DisabledMentionTooltip/main.js +17 -0
- package/dist/esm/components/Mention/PrimitiveMention.js +8 -1
- package/dist/esm/components/Mention/index.js +51 -12
- package/dist/esm/components/MentionAvatar/index.js +7 -2
- package/dist/esm/types.js +12 -0
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/api/ContextMentionResource.d.ts +6 -1
- package/dist/types/api/MentionResource.d.ts +2 -1
- package/dist/types/components/DisabledMentionTooltip/index.d.ts +6 -0
- package/dist/types/components/DisabledMentionTooltip/main.d.ts +12 -0
- package/dist/types/components/Mention/index.d.ts +12 -0
- package/dist/types/types.d.ts +67 -1
- package/docs/0-intro.tsx +21 -0
- package/element/package.json +1 -8
- package/item/package.json +1 -8
- package/mention/package.json +1 -8
- package/mention-item/package.json +1 -8
- package/mention-item/styles/package.json +1 -8
- package/mention-list/package.json +1 -8
- package/mention-name-client/package.json +1 -8
- package/mention-name-resolver/package.json +1 -8
- package/mention-picker/package.json +1 -8
- package/mention-resource/package.json +1 -8
- package/package.json +10 -5
- package/presence-resource/package.json +1 -8
- package/resource/package.json +1 -8
- package/resourced-mention/package.json +1 -8
- package/resourced-mention-list/package.json +1 -8
- package/shared-styles/package.json +1 -8
- package/team-mention-resource/package.json +1 -8
- package/team-resource/package.json +1 -8
- package/typeahead/package.json +1 -8
- package/types/package.json +1 -8
- package/dist/types-ts4.5/_constants.d.ts +0 -1
- package/dist/types-ts4.5/api/ContextMentionResource.d.ts +0 -23
- package/dist/types-ts4.5/api/MentionNameClient.d.ts +0 -11
- package/dist/types-ts4.5/api/MentionNameResolver.d.ts +0 -38
- package/dist/types-ts4.5/api/MentionResource.d.ts +0 -105
- package/dist/types-ts4.5/api/PresenceResource.d.ts +0 -158
- package/dist/types-ts4.5/api/TeamMentionResource.d.ts +0 -33
- package/dist/types-ts4.5/api/analytics.d.ts +0 -17
- package/dist/types-ts4.5/components/LockCircleIcon/index.d.ts +0 -7
- package/dist/types-ts4.5/components/Mention/PrimitiveMention.d.ts +0 -7
- package/dist/types-ts4.5/components/Mention/ResourcedMention.d.ts +0 -29
- package/dist/types-ts4.5/components/Mention/index.d.ts +0 -33
- package/dist/types-ts4.5/components/Mention/ufoExperiences.d.ts +0 -9
- package/dist/types-ts4.5/components/MentionAvatar/index.d.ts +0 -8
- package/dist/types-ts4.5/components/MentionDescriptionByline/TeamMentionDescriptionByline.d.ts +0 -7
- package/dist/types-ts4.5/components/MentionDescriptionByline/UserMentionDescriptionByline.d.ts +0 -5
- package/dist/types-ts4.5/components/MentionDescriptionByline/index.d.ts +0 -5
- package/dist/types-ts4.5/components/MentionDescriptionByline/styles.d.ts +0 -7
- package/dist/types-ts4.5/components/MentionDescriptionByline/types.d.ts +0 -4
- package/dist/types-ts4.5/components/MentionItem/MentionHighlightHelpers.d.ts +0 -3
- package/dist/types-ts4.5/components/MentionItem/index.d.ts +0 -19
- package/dist/types-ts4.5/components/MentionItem/styles.d.ts +0 -50
- package/dist/types-ts4.5/components/MentionList/index.d.ts +0 -43
- package/dist/types-ts4.5/components/MentionList/styles.d.ts +0 -10
- package/dist/types-ts4.5/components/MentionListError/GenericErrorIllustration.d.ts +0 -7
- package/dist/types-ts4.5/components/MentionListError/index.d.ts +0 -13
- package/dist/types-ts4.5/components/MentionListError/styles.d.ts +0 -7
- package/dist/types-ts4.5/components/MentionPicker/index.d.ts +0 -77
- package/dist/types-ts4.5/components/MentionPicker/styles.d.ts +0 -14
- package/dist/types-ts4.5/components/MessagesIntlProvider/index.d.ts +0 -3
- package/dist/types-ts4.5/components/NoAccessTooltip/index.d.ts +0 -6
- package/dist/types-ts4.5/components/NoAccessTooltip/main.d.ts +0 -7
- package/dist/types-ts4.5/components/Popup/index.d.ts +0 -25
- package/dist/types-ts4.5/components/ResourcedMentionList/index.d.ts +0 -46
- package/dist/types-ts4.5/components/Scrollable/index.d.ts +0 -10
- package/dist/types-ts4.5/components/Scrollable/styles.d.ts +0 -7
- package/dist/types-ts4.5/components/i18n.d.ts +0 -62
- package/dist/types-ts4.5/config/index.d.ts +0 -5
- package/dist/types-ts4.5/element.d.ts +0 -3
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -21
- package/dist/types-ts4.5/i18n/da.d.ts +0 -21
- package/dist/types-ts4.5/i18n/de.d.ts +0 -21
- package/dist/types-ts4.5/i18n/en.d.ts +0 -21
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -21
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -21
- package/dist/types-ts4.5/i18n/es.d.ts +0 -21
- package/dist/types-ts4.5/i18n/et.d.ts +0 -20
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -21
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -21
- package/dist/types-ts4.5/i18n/hr.d.ts +0 -21
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -21
- package/dist/types-ts4.5/i18n/index.d.ts +0 -37
- package/dist/types-ts4.5/i18n/is.d.ts +0 -24
- package/dist/types-ts4.5/i18n/it.d.ts +0 -21
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -21
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -21
- package/dist/types-ts4.5/i18n/languages.d.ts +0 -34
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -21
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -21
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -21
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -21
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -20
- package/dist/types-ts4.5/i18n/ro.d.ts +0 -24
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -21
- package/dist/types-ts4.5/i18n/sk.d.ts +0 -20
- package/dist/types-ts4.5/i18n/sl.d.ts +0 -21
- package/dist/types-ts4.5/i18n/sr_RS.d.ts +0 -21
- package/dist/types-ts4.5/i18n/sr_YR.d.ts +0 -21
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -21
- package/dist/types-ts4.5/i18n/th.d.ts +0 -21
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -21
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -21
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -21
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -21
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -21
- package/dist/types-ts4.5/index.d.ts +0 -17
- package/dist/types-ts4.5/item.d.ts +0 -2
- package/dist/types-ts4.5/resource.d.ts +0 -10
- package/dist/types-ts4.5/shared-styles.d.ts +0 -5
- package/dist/types-ts4.5/team-resource.d.ts +0 -8
- package/dist/types-ts4.5/typeahead.d.ts +0 -3
- package/dist/types-ts4.5/types.d.ts +0 -254
- package/dist/types-ts4.5/util/analytics.d.ts +0 -12
- package/dist/types-ts4.5/util/atl-attribution.d.ts +0 -8
- package/dist/types-ts4.5/util/i18n.d.ts +0 -29
- package/dist/types-ts4.5/util/id.d.ts +0 -2
- package/dist/types-ts4.5/util/index.d.ts +0 -1
- package/dist/types-ts4.5/util/logger.d.ts +0 -4
- package/dist/types-ts4.5/util/mouse.d.ts +0 -8
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'fabric.elements.mentions.team.member.50plus': string;
|
|
9
|
-
'fabric.elements.mentions.team.member.50plus.including.you': string;
|
|
10
|
-
'fabric.elements.mentions.team.member.count': string;
|
|
11
|
-
'fabric.elements.mentions.team.member.count.including.you': string;
|
|
12
|
-
'fabric.elements.mentions.xproduct.mention.description': string;
|
|
13
|
-
'fabric.mention.error.defaultAction': string;
|
|
14
|
-
'fabric.mention.error.defaultHeadline': string;
|
|
15
|
-
'fabric.mention.error.differentText': string;
|
|
16
|
-
'fabric.mention.error.loginAgain': string;
|
|
17
|
-
'fabric.mention.noAccess.label': string;
|
|
18
|
-
'fabric.mention.noAccess.warning': string;
|
|
19
|
-
'fabric.mention.unknow.user.error': string;
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'fabric.elements.mentions.team.member.50plus': string;
|
|
9
|
-
'fabric.elements.mentions.team.member.50plus.including.you': string;
|
|
10
|
-
'fabric.elements.mentions.team.member.count': string;
|
|
11
|
-
'fabric.elements.mentions.team.member.count.including.you': string;
|
|
12
|
-
'fabric.elements.mentions.xproduct.mention.description': string;
|
|
13
|
-
'fabric.mention.error.defaultAction': string;
|
|
14
|
-
'fabric.mention.error.defaultHeadline': string;
|
|
15
|
-
'fabric.mention.error.differentText': string;
|
|
16
|
-
'fabric.mention.error.loginAgain': string;
|
|
17
|
-
'fabric.mention.noAccess.label': string;
|
|
18
|
-
'fabric.mention.noAccess.warning': string;
|
|
19
|
-
'fabric.mention.unknow.user.error': string;
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import MentionResource, { AbstractMentionResource, type MentionContextIdentifier, type MentionProvider, type ResolvingMentionProvider, type MentionStats, type MentionResourceConfig, type TeamMentionResourceConfig, isResolvingMentionProvider } from './api/MentionResource';
|
|
2
|
-
import TeamMentionResource from './api/TeamMentionResource';
|
|
3
|
-
import PresenceResource, { type PresenceProvider, AbstractPresenceResource } from './api/PresenceResource';
|
|
4
|
-
import { DefaultMentionNameResolver, type MentionNameResolver } from './api/MentionNameResolver';
|
|
5
|
-
import { type MentionNameClient } from './api/MentionNameClient';
|
|
6
|
-
import MentionItem from './components/MentionItem';
|
|
7
|
-
import MentionList from './components/MentionList';
|
|
8
|
-
import ResourcedMentionList from './components/ResourcedMentionList';
|
|
9
|
-
import { MentionPickerWithAnalytics as MentionPicker } from './components/MentionPicker';
|
|
10
|
-
import Mention from './components/Mention';
|
|
11
|
-
import ResourcedMention from './components/Mention/ResourcedMention';
|
|
12
|
-
import { type MentionDescription, type MentionsResult, MentionNameStatus, type MentionNameDetails, type InviteFlow, isSpecialMention, type TeamMember, UserAccessLevel, type UserRole, UserType, ComponentNames, Actions, SliNames } from './types';
|
|
13
|
-
import { ELEMENTS_CHANNEL } from './_constants';
|
|
14
|
-
import ContextMentionResource from './api/ContextMentionResource';
|
|
15
|
-
export { ContextMentionResource, MentionResource, TeamMentionResource, PresenceResource, DefaultMentionNameResolver, AbstractMentionResource, AbstractPresenceResource, MentionNameStatus, MentionItem, MentionList, ResourcedMentionList, MentionPicker, Mention, ResourcedMention, UserAccessLevel, UserType, ComponentNames, SliNames, Actions, isSpecialMention, isResolvingMentionProvider, ELEMENTS_CHANNEL, };
|
|
16
|
-
export type { ResolvingMentionProvider, MentionProvider, PresenceProvider, MentionDescription, MentionsResult, MentionNameResolver, MentionNameClient, MentionNameDetails, MentionContextIdentifier, MentionStats, TeamMember, MentionResourceConfig, TeamMentionResourceConfig, InviteFlow, UserRole, };
|
|
17
|
-
export default MentionPicker;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import MentionResource, { AbstractMentionResource, type ResolvingMentionProvider, type MentionContextIdentifier, type MentionProvider, type MentionStats, type MentionResourceConfig, isResolvingMentionProvider } from './api/MentionResource';
|
|
2
|
-
import PresenceResource, { type PresenceProvider, AbstractPresenceResource } from './api/PresenceResource';
|
|
3
|
-
import { DefaultMentionNameResolver, type MentionNameResolver } from './api/MentionNameResolver';
|
|
4
|
-
import { type MentionNameClient } from './api/MentionNameClient';
|
|
5
|
-
import { type MentionDescription, type MentionsResult, isSpecialMention, MentionNameStatus, type MentionNameDetails } from './types';
|
|
6
|
-
import { ELEMENTS_CHANNEL } from './_constants';
|
|
7
|
-
import ContextMentionResource from './api/ContextMentionResource';
|
|
8
|
-
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE, buildSliPayload } from './util/analytics';
|
|
9
|
-
export { ContextMentionResource, MentionResource, PresenceResource, AbstractMentionResource, AbstractPresenceResource, DefaultMentionNameResolver, MentionNameStatus, isSpecialMention, isResolvingMentionProvider, ELEMENTS_CHANNEL, SLI_EVENT_TYPE, SMART_EVENT_TYPE, buildSliPayload, };
|
|
10
|
-
export type { ResolvingMentionProvider, MentionProvider, PresenceProvider, MentionDescription, MentionsResult, MentionNameClient, MentionNameResolver, MentionContextIdentifier, MentionStats, MentionResourceConfig, MentionNameDetails, };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const noDialogContainerBorderColor: 'var(--ds-border)';
|
|
2
|
-
export declare const noDialogContainerBorderRadius: 'var(--ds-radius-small)';
|
|
3
|
-
export declare const noDialogContainerBoxShadow: 'var(--ds-shadow-overlay)';
|
|
4
|
-
export declare const scrollableMaxHeight = "264px";
|
|
5
|
-
export declare const mentionListWidth = "340px";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import MentionResource, { AbstractMentionResource, type MentionContextIdentifier, type MentionProvider, type MentionStats, type MentionResourceConfig } from './api/MentionResource';
|
|
2
|
-
import TeamMentionResource from './api/TeamMentionResource';
|
|
3
|
-
import PresenceResource, { type PresenceProvider, AbstractPresenceResource } from './api/PresenceResource';
|
|
4
|
-
import { type MentionDescription, type MentionsResult, isSpecialMention, type TeamMember } from './types';
|
|
5
|
-
import { ELEMENTS_CHANNEL } from './_constants';
|
|
6
|
-
import ContextMentionResource from './api/ContextMentionResource';
|
|
7
|
-
export { ContextMentionResource, MentionResource, TeamMentionResource, PresenceResource, AbstractMentionResource, AbstractPresenceResource, isSpecialMention, ELEMENTS_CHANNEL, };
|
|
8
|
-
export type { MentionProvider, PresenceProvider, MentionDescription, MentionsResult, MentionContextIdentifier, MentionStats, TeamMember, MentionResourceConfig, };
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { type SyntheticEvent } from 'react';
|
|
2
|
-
import { type ServiceConfig } from '@atlaskit/util-service-support/types';
|
|
3
|
-
export interface MentionNameResolver {
|
|
4
|
-
cacheName(id: string, name: string): void;
|
|
5
|
-
lookupName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
|
|
6
|
-
}
|
|
7
|
-
export type MentionStats = {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
export interface ResultCallback<T> {
|
|
11
|
-
(result: T, query?: string, stats?: MentionStats): void;
|
|
12
|
-
}
|
|
13
|
-
export interface ErrorCallback {
|
|
14
|
-
(error: Error, query?: string): void;
|
|
15
|
-
}
|
|
16
|
-
export interface InfoCallback {
|
|
17
|
-
(info: string): void;
|
|
18
|
-
}
|
|
19
|
-
export interface AnalyticsCallback {
|
|
20
|
-
(event: string, actionSubject: string, action: string, attributes?: {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}): void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Configuration for the MentionResource, which provides a JavaScript API
|
|
26
|
-
* for fetching and searching user mentions from a remote service.
|
|
27
|
-
*
|
|
28
|
-
* Extends {@link ServiceConfig} which provides the base `url`, `securityProvider`,
|
|
29
|
-
* and `refreshedSecurityProvider` fields.
|
|
30
|
-
*/
|
|
31
|
-
export interface MentionResourceConfig extends ServiceConfig {
|
|
32
|
-
/**
|
|
33
|
-
* The ID of the container (e.g. a Confluence space or Jira project) used to scope
|
|
34
|
-
* mention search results. Can be overridden by `MentionContextIdentifier.containerId`.
|
|
35
|
-
*/
|
|
36
|
-
containerId?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Debounce time in milliseconds for the `filter` method. When set, rapid successive
|
|
39
|
-
* calls to `filter` will be debounced to reduce the number of network requests.
|
|
40
|
-
*/
|
|
41
|
-
debounceTime?: number;
|
|
42
|
-
/**
|
|
43
|
-
* Custom HTTP headers to include in mention service requests.
|
|
44
|
-
*/
|
|
45
|
-
headers?: Record<string, string>;
|
|
46
|
-
/**
|
|
47
|
-
* Callback to invite a cross-product user. Invoked when a user from another
|
|
48
|
-
* Atlassian product is selected for mention and needs to be invited.
|
|
49
|
-
*
|
|
50
|
-
* @param userId - The ID of the user to invite.
|
|
51
|
-
* @param mentionName - The display name of the user being invited.
|
|
52
|
-
* @returns A promise that resolves when the invitation is complete.
|
|
53
|
-
*/
|
|
54
|
-
inviteXProductUser?: (userId: string, mentionName: string) => Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* A resolver for looking up and caching mention display names by user ID.
|
|
57
|
-
* Used by `ResolvingMentionProvider` to resolve names for mentions that
|
|
58
|
-
* only have an ID (e.g. when rendering stored mention nodes).
|
|
59
|
-
*/
|
|
60
|
-
mentionNameResolver?: MentionNameResolver;
|
|
61
|
-
/**
|
|
62
|
-
* Callback invoked when the inline invite item is clicked in the mention picker.
|
|
63
|
-
*
|
|
64
|
-
* @param flow - The type of invite flow, either `'mention'` or `'assign'`.
|
|
65
|
-
*/
|
|
66
|
-
onInviteItemClick?: (flow: InviteFlow) => void;
|
|
67
|
-
/**
|
|
68
|
-
* The product identifier (e.g. `'confluence'`, `'jira'`) sent as a query parameter
|
|
69
|
-
* (`productIdentifier`) to the mention service for product-scoped results.
|
|
70
|
-
*/
|
|
71
|
-
productId?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The display name of the product, exposed on the `MentionProvider` for use
|
|
74
|
-
* by invite-related UI components.
|
|
75
|
-
*/
|
|
76
|
-
productName?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Whether to enable the inline invite functionality in the mention picker,
|
|
79
|
-
* allowing users to invite people who are not yet part of the site.
|
|
80
|
-
*/
|
|
81
|
-
shouldEnableInvite?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* A function to determine whether a given mention should be visually highlighted
|
|
84
|
-
* (e.g. as a self-mention). When provided, it is called for each mention to decide
|
|
85
|
-
* if the `MentionType.SELF` styling should be applied.
|
|
86
|
-
*
|
|
87
|
-
* @param mention - The mention to evaluate.
|
|
88
|
-
* @returns `true` if the mention should be highlighted.
|
|
89
|
-
*/
|
|
90
|
-
shouldHighlightMention?: (mention: MentionDescription) => boolean;
|
|
91
|
-
/**
|
|
92
|
-
* The role of the current user, used to determine invite permissions
|
|
93
|
-
* in the mention picker. Defaults to `'basic'` if not provided.
|
|
94
|
-
*/
|
|
95
|
-
userRole?: UserRole;
|
|
96
|
-
}
|
|
97
|
-
export interface ResourceProvider<Result> {
|
|
98
|
-
/**
|
|
99
|
-
* Subscribe to ResourceProvider results
|
|
100
|
-
*
|
|
101
|
-
* @param {string} key subscriber key used to unsubscribe
|
|
102
|
-
* @param {ResultCallback<Result>} callback This callback only receives latest results
|
|
103
|
-
* @param {ErrorCallback} errCallback This callback will errors
|
|
104
|
-
* @param {InfoCallback} infoCallback This callback will info
|
|
105
|
-
* @param {ResultCallback<Result>} allResultsCallback This callback will receive all results
|
|
106
|
-
*/
|
|
107
|
-
subscribe(key: string, callback?: ResultCallback<Result>, errCallback?: ErrorCallback, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback<Result>, analyticsCallback?: AnalyticsCallback): void;
|
|
108
|
-
/**
|
|
109
|
-
* Unsubscribe to this resource provider results
|
|
110
|
-
* @param {string} key key used when subscribing
|
|
111
|
-
*/
|
|
112
|
-
unsubscribe(key: string): void;
|
|
113
|
-
}
|
|
114
|
-
export type MentionContextIdentifier = {
|
|
115
|
-
childObjectId?: string;
|
|
116
|
-
containerId?: string;
|
|
117
|
-
objectId?: string;
|
|
118
|
-
sessionId?: string;
|
|
119
|
-
};
|
|
120
|
-
export interface MentionProvider extends ResourceProvider<MentionDescription[]>, InviteFromMentionProvider, XProductInviteMentionProvider {
|
|
121
|
-
filter(query?: string, contextIdentifier?: MentionContextIdentifier): void;
|
|
122
|
-
isFiltering(query: string): boolean;
|
|
123
|
-
recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): void;
|
|
124
|
-
shouldHighlightMention(mention: MentionDescription): boolean;
|
|
125
|
-
}
|
|
126
|
-
export interface HighlightDetail {
|
|
127
|
-
end: number;
|
|
128
|
-
start: number;
|
|
129
|
-
}
|
|
130
|
-
export interface Highlight {
|
|
131
|
-
mentionName: HighlightDetail[];
|
|
132
|
-
name: HighlightDetail[];
|
|
133
|
-
nickname: HighlightDetail[];
|
|
134
|
-
}
|
|
135
|
-
export interface Presence {
|
|
136
|
-
status?: string;
|
|
137
|
-
time?: string;
|
|
138
|
-
}
|
|
139
|
-
export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
|
|
140
|
-
export interface LozengeProps {
|
|
141
|
-
appearance?: LozengeColor;
|
|
142
|
-
text: React.ReactNode;
|
|
143
|
-
}
|
|
144
|
-
export interface MentionDescription {
|
|
145
|
-
accessLevel?: string;
|
|
146
|
-
appType?: string | null;
|
|
147
|
-
avatarUrl?: string;
|
|
148
|
-
context?: MentionDescContext;
|
|
149
|
-
highlight?: Highlight;
|
|
150
|
-
id: string;
|
|
151
|
-
inContext?: boolean;
|
|
152
|
-
isXProductUser?: boolean;
|
|
153
|
-
lozenge?: string | LozengeProps;
|
|
154
|
-
mentionName?: string;
|
|
155
|
-
name?: string;
|
|
156
|
-
nickname?: string;
|
|
157
|
-
presence?: Presence;
|
|
158
|
-
source?: string;
|
|
159
|
-
userType?: string;
|
|
160
|
-
}
|
|
161
|
-
export interface MentionDescContext {
|
|
162
|
-
includesYou: boolean;
|
|
163
|
-
memberCount: number;
|
|
164
|
-
members: TeamMember[];
|
|
165
|
-
teamLink: string;
|
|
166
|
-
}
|
|
167
|
-
export interface MentionsResult {
|
|
168
|
-
mentions: MentionDescription[];
|
|
169
|
-
query: string;
|
|
170
|
-
}
|
|
171
|
-
export interface TeamMember {
|
|
172
|
-
id: string;
|
|
173
|
-
name: string;
|
|
174
|
-
}
|
|
175
|
-
export interface Team {
|
|
176
|
-
displayName: string;
|
|
177
|
-
highlight?: Highlight;
|
|
178
|
-
id: string;
|
|
179
|
-
includesYou: boolean;
|
|
180
|
-
memberCount: number;
|
|
181
|
-
members: TeamMember[];
|
|
182
|
-
smallAvatarImageUrl: string;
|
|
183
|
-
}
|
|
184
|
-
export type MentionEventHandler = (mentionId: string, text: string, event?: SyntheticEvent<HTMLSpanElement>) => void;
|
|
185
|
-
export interface OnMentionEvent {
|
|
186
|
-
(mention: MentionDescription, event?: SyntheticEvent<any>): void;
|
|
187
|
-
}
|
|
188
|
-
export declare enum MentionType {
|
|
189
|
-
SELF = 0,
|
|
190
|
-
RESTRICTED = 1,
|
|
191
|
-
DEFAULT = 2
|
|
192
|
-
}
|
|
193
|
-
export declare enum UserAccessLevel {
|
|
194
|
-
NONE = 0,
|
|
195
|
-
SITE = 1,
|
|
196
|
-
APPLICATION = 2,
|
|
197
|
-
CONTAINER = 3
|
|
198
|
-
}
|
|
199
|
-
export declare enum UserType {
|
|
200
|
-
DEFAULT = 0,
|
|
201
|
-
SPECIAL = 1,
|
|
202
|
-
APP = 2,
|
|
203
|
-
TEAM = 3,
|
|
204
|
-
SYSTEM = 4
|
|
205
|
-
}
|
|
206
|
-
export declare enum SliNames {
|
|
207
|
-
SEARCH = "searchUser",
|
|
208
|
-
SEARCH_TEAM = "searchTeam",
|
|
209
|
-
INITIAL_STATE = "initialState",
|
|
210
|
-
SELECT = "select",
|
|
211
|
-
SELECT_TEAM = "selectTeam"
|
|
212
|
-
}
|
|
213
|
-
export declare enum ComponentNames {
|
|
214
|
-
TYPEAHEAD = "mentionTypeahead",
|
|
215
|
-
MENTION = "mention"
|
|
216
|
-
}
|
|
217
|
-
export declare enum Actions {
|
|
218
|
-
VIEWED = "viewed",
|
|
219
|
-
CLICKED = "clicked",
|
|
220
|
-
CLOSED = "closed",
|
|
221
|
-
SUCCEEDED = "succeeded",
|
|
222
|
-
FAILED = "failed"
|
|
223
|
-
}
|
|
224
|
-
export declare enum MentionNameStatus {
|
|
225
|
-
UNKNOWN = 0,
|
|
226
|
-
SERVICE_ERROR = 1,
|
|
227
|
-
OK = 2
|
|
228
|
-
}
|
|
229
|
-
export interface MentionNameDetails {
|
|
230
|
-
id: string;
|
|
231
|
-
name?: string;
|
|
232
|
-
status: MentionNameStatus;
|
|
233
|
-
}
|
|
234
|
-
export declare function isRestricted(accessLevel?: string): boolean;
|
|
235
|
-
export declare function isSpecialMention(mention: MentionDescription): boolean;
|
|
236
|
-
export declare function isAppMention(mention: MentionDescription): boolean | '' | undefined;
|
|
237
|
-
export declare function isTeamMention(mention: MentionDescription): boolean | '' | undefined;
|
|
238
|
-
export declare function isSpecialMentionText(mentionText: string): boolean | '';
|
|
239
|
-
export declare const isPromise: <T>(p: any) => p is Promise<T>;
|
|
240
|
-
export type InviteFlow = 'mention' | 'assign';
|
|
241
|
-
export type UserRole = 'admin' | 'trusted' | 'basic';
|
|
242
|
-
export interface InviteFromMentionProvider {
|
|
243
|
-
getShouldEnableInlineInvite?: () => boolean;
|
|
244
|
-
InlineInviteRecaptcha?: React.ComponentType<any> | null;
|
|
245
|
-
onInviteItemClick?(flow: InviteFlow): void;
|
|
246
|
-
productName?: string;
|
|
247
|
-
shouldEnableInvite?: boolean;
|
|
248
|
-
showInlineInviteRecaptcha?: (email: string) => void;
|
|
249
|
-
userEmailDomain?: string;
|
|
250
|
-
userRole?: UserRole;
|
|
251
|
-
}
|
|
252
|
-
export interface XProductInviteMentionProvider {
|
|
253
|
-
inviteXProductUser?: (userId: string, mentionName: string) => Promise<void>;
|
|
254
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type UIAnalyticsEvent, type WithAnalyticsEventsProps, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { type GasPayload } from '@atlaskit/analytics-gas-types';
|
|
3
|
-
export declare const SLI_EVENT_TYPE = "sli";
|
|
4
|
-
export declare const SMART_EVENT_TYPE = "smart";
|
|
5
|
-
export declare const fireAnalyticsMentionTypeaheadEvent: (props: WithAnalyticsEventsProps) => (action: string, duration: number, userIds?: string[], query?: string) => void;
|
|
6
|
-
export declare const fireAnalyticsMentionEvent: (createEvent: CreateUIAnalyticsEvent) => (actionSubject: string, action: string, text: string, id: string, accessLevel?: string) => UIAnalyticsEvent;
|
|
7
|
-
export declare const fireSliAnalyticsEvent: (props: WithAnalyticsEventsProps) => (actionSubject: string, action: string) => void;
|
|
8
|
-
export declare const buildSliPayload: (actionSubject: string, action: string, attributes?: {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}) => GasPayload;
|
|
11
|
-
export declare const fireAnalyticsMentionHydrationEvent: (props: WithAnalyticsEventsProps) => (action: string, userId: string, fromCache: boolean, duration: number) => void;
|
|
12
|
-
export declare const fireAnalytics: (firePrivateAnalyticsEvent?: Function) => (eventName: string, text: string, accessLevel?: string) => void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type MessageDescriptor } from 'react-intl';
|
|
3
|
-
export type Formatter = (props: {
|
|
4
|
-
children?(props: string): React.ReactElement;
|
|
5
|
-
values?: {
|
|
6
|
-
[k: string]: string;
|
|
7
|
-
};
|
|
8
|
-
}) => React.ReactElement | null;
|
|
9
|
-
type FormatterFactory = (messageDescriptor: MessageDescriptor) => Formatter;
|
|
10
|
-
export declare const propFormatter: FormatterFactory;
|
|
11
|
-
export declare const UnknownUserError: Formatter;
|
|
12
|
-
export declare const NoAccessWarning: Formatter;
|
|
13
|
-
export declare const NoAccessLabel: Formatter;
|
|
14
|
-
export declare const DefaultHeadline: Formatter;
|
|
15
|
-
export declare const DefaultAdvisedAction: Formatter;
|
|
16
|
-
export declare const LoginAgain: Formatter;
|
|
17
|
-
export declare const DifferentText: Formatter;
|
|
18
|
-
/**
|
|
19
|
-
* Tries to get the most specific messages bundle for a given locale.
|
|
20
|
-
*
|
|
21
|
-
* Strategy:
|
|
22
|
-
* 1. Try to find messages with the exact string (i.e. 'fr_FR')
|
|
23
|
-
* 2. If that doesn't work, try to find messages for the country locale (i.e. 'fr')
|
|
24
|
-
* 3. If that doesn't work, return english messages as a fallback.
|
|
25
|
-
*
|
|
26
|
-
* @param locale string specifying the locale like 'en_GB', or 'fr'.
|
|
27
|
-
*/
|
|
28
|
-
export declare const getMessagesForLocale: (locale: string) => Promise<Record<string, string>>;
|
|
29
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const padArray: (arr: any[], size: number, value: any) => any[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MouseEvent } from 'react';
|
|
2
|
-
export interface Position {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function mouseLocation(event: MouseEvent<any>): Position;
|
|
7
|
-
export declare function actualMouseMove(oldPosition: Position | undefined, newPosition: Position): boolean;
|
|
8
|
-
export declare function leftClick(event: MouseEvent<any>): boolean;
|