@atlaskit/profilecard 19.17.5 → 19.17.7
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 +14 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/client/ProfileCardClient.js +10 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +44 -2
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +153 -0
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +93 -3
- package/dist/cjs/components/Agent/AgentProfileCardWrapper.js +19 -0
- package/dist/cjs/components/User/ProfileCardTrigger.js +3 -1
- package/dist/cjs/components/common/LoadingState.js +25 -0
- package/dist/cjs/components/common/ProfileCardTrigger.js +42 -10
- package/dist/cjs/mocks/agent-data.js +20 -0
- package/dist/cjs/mocks/index.js +6 -0
- package/dist/cjs/mocks/simple-mock-clients.js +21 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/util/useProfileInfo.js +58 -0
- package/dist/es2019/client/ProfileCardClient.js +8 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +44 -2
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +76 -0
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +51 -3
- package/dist/es2019/components/Agent/AgentProfileCardWrapper.js +13 -0
- package/dist/es2019/components/User/ProfileCardTrigger.js +3 -1
- package/dist/es2019/components/common/LoadingState.js +16 -0
- package/dist/es2019/components/common/ProfileCardTrigger.js +17 -5
- package/dist/es2019/mocks/agent-data.js +14 -0
- package/dist/es2019/mocks/index.js +1 -1
- package/dist/es2019/mocks/simple-mock-clients.js +10 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/util/useProfileInfo.js +23 -0
- package/dist/esm/client/ProfileCardClient.js +10 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +44 -2
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +143 -0
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +93 -3
- package/dist/esm/components/Agent/AgentProfileCardWrapper.js +12 -0
- package/dist/esm/components/User/ProfileCardTrigger.js +3 -1
- package/dist/esm/components/common/LoadingState.js +15 -0
- package/dist/esm/components/common/ProfileCardTrigger.js +42 -10
- package/dist/esm/mocks/agent-data.js +14 -0
- package/dist/esm/mocks/index.js +1 -1
- package/dist/esm/mocks/simple-mock-clients.js +20 -1
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/util/useProfileInfo.js +51 -0
- package/dist/types/client/ProfileCardClient.d.ts +3 -0
- package/dist/types/components/Agent/AgentProfileCard.d.ts +7 -4
- package/dist/types/components/Agent/AgentProfileCardResourced.d.ts +10 -0
- package/dist/types/components/Agent/AgentProfileCardWrapper.d.ts +4 -0
- package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +4 -2
- package/dist/types/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types/components/common/LoadingState.d.ts +8 -0
- package/dist/types/components/common/PopupTrigger.d.ts +2 -2
- package/dist/types/components/common/ProfileCardTrigger.d.ts +1 -1
- package/dist/types/components/common/types.d.ts +6 -3
- package/dist/types/mocks/agent-data.d.ts +3 -0
- package/dist/types/mocks/index.d.ts +1 -1
- package/dist/types/mocks/simple-mock-clients.d.ts +6 -1
- package/dist/types/types.d.ts +28 -0
- package/dist/types/util/analytics.d.ts +1 -1
- package/dist/types/util/useProfileInfo.d.ts +7 -0
- package/dist/types-ts4.5/client/ProfileCardClient.d.ts +3 -0
- package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +7 -4
- package/dist/types-ts4.5/components/Agent/AgentProfileCardResourced.d.ts +10 -0
- package/dist/types-ts4.5/components/Agent/AgentProfileCardWrapper.d.ts +4 -0
- package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +4 -2
- package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types-ts4.5/components/common/LoadingState.d.ts +8 -0
- package/dist/types-ts4.5/components/common/PopupTrigger.d.ts +2 -2
- package/dist/types-ts4.5/components/common/ProfileCardTrigger.d.ts +1 -1
- package/dist/types-ts4.5/components/common/types.d.ts +6 -3
- package/dist/types-ts4.5/mocks/agent-data.d.ts +3 -0
- package/dist/types-ts4.5/mocks/index.d.ts +1 -1
- package/dist/types-ts4.5/mocks/simple-mock-clients.d.ts +6 -1
- package/dist/types-ts4.5/types.d.ts +28 -0
- package/dist/types-ts4.5/util/analytics.d.ts +1 -1
- package/dist/types-ts4.5/util/useProfileInfo.d.ts +7 -0
- package/package.json +5 -4
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import ProfileCardClient from '../client/ProfileCardClient';
|
|
2
|
+
import RovoAgentCardClient from '../client/RovoAgentCardClient';
|
|
2
3
|
import TeamProfileCardClient from '../client/TeamProfileCardClient';
|
|
3
4
|
import UserProfileCardClient from '../client/UserProfileCardClient';
|
|
4
|
-
import { type ProfileCardClientData, type Team } from '../types';
|
|
5
|
+
import { type ProfileCardClientData, type RovoAgent, type Team } from '../types';
|
|
5
6
|
declare class SimpleMockTeamClient extends TeamProfileCardClient {
|
|
6
7
|
makeRequest(teamId: string): Promise<Team>;
|
|
7
8
|
}
|
|
8
9
|
declare class SimpleMockUserClient extends UserProfileCardClient {
|
|
9
10
|
makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
|
|
10
11
|
}
|
|
12
|
+
declare class SimpleMockAgentClient extends RovoAgentCardClient {
|
|
13
|
+
makeRequest(userId: string): Promise<RovoAgent>;
|
|
14
|
+
}
|
|
11
15
|
export declare const simpleMockUserClient: SimpleMockUserClient;
|
|
12
16
|
export declare const simpleMockTeamClient: SimpleMockTeamClient;
|
|
17
|
+
export declare const simpleMockAgentClient: SimpleMockAgentClient;
|
|
13
18
|
export declare const simpleProfileClient: ProfileCardClient;
|
|
14
19
|
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type IntlShape } from 'react-intl-next';
|
|
3
3
|
import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type RovoAgentCardClient from './client/RovoAgentCardClient';
|
|
4
5
|
import type TeamCentralCardClient from './client/TeamCentralCardClient';
|
|
5
6
|
import type TeamProfileCardClient from './client/TeamProfileCardClient';
|
|
6
7
|
import type UserProfileCardClient from './client/UserProfileCardClient';
|
|
@@ -41,7 +42,32 @@ export interface Team {
|
|
|
41
42
|
}
|
|
42
43
|
export interface RovoAgent {
|
|
43
44
|
id: string;
|
|
45
|
+
identity_account_id?: string | null;
|
|
46
|
+
named_id: string;
|
|
44
47
|
name: string;
|
|
48
|
+
description: string | null;
|
|
49
|
+
system_prompt_template?: string | null;
|
|
50
|
+
creator_type: 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY';
|
|
51
|
+
creator?: string | null;
|
|
52
|
+
visibility?: 'PUBLIC' | 'PRIVATE' | null;
|
|
53
|
+
is_default: boolean;
|
|
54
|
+
actor_type: 'AGENT';
|
|
55
|
+
creator_cloud_id?: string | null;
|
|
56
|
+
follow_up_prompt_template?: string | null;
|
|
57
|
+
plugin_routing_type?: 'DEFAULT' | 'SKIP' | null;
|
|
58
|
+
user_defined_conversation_starters: string[] | null;
|
|
59
|
+
favourite: boolean;
|
|
60
|
+
deactivated: boolean;
|
|
61
|
+
deactivatedAt?: string;
|
|
62
|
+
favourite_count: number;
|
|
63
|
+
}
|
|
64
|
+
export interface RovoAgentCreatorInfo {
|
|
65
|
+
type: 'CUSTOMER' | 'SYSTEM' | 'THIRD_PARTY';
|
|
66
|
+
name?: string;
|
|
67
|
+
profileLink?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface RovoAgentProfileCardInfo extends RovoAgent {
|
|
70
|
+
creatorInfo: RovoAgentCreatorInfo | undefined;
|
|
45
71
|
}
|
|
46
72
|
export interface ProfileCardClientData {
|
|
47
73
|
isBot: boolean;
|
|
@@ -347,6 +373,7 @@ export interface ProfileClient {
|
|
|
347
373
|
getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
|
|
348
374
|
shouldShowGiveKudos: () => Promise<boolean>;
|
|
349
375
|
getTeamCentralBaseUrl: () => string | undefined;
|
|
376
|
+
getRovoAgentProfile: (agentId: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<RovoAgent>;
|
|
350
377
|
}
|
|
351
378
|
export type ProfilecardTriggerPosition = 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'top-end' | 'top' | 'top-start' | 'right-end' | 'right' | 'right-start';
|
|
352
379
|
export type ProfileCardErrorType = {
|
|
@@ -372,6 +399,7 @@ export interface ClientOverrides {
|
|
|
372
399
|
userClient?: UserProfileCardClient;
|
|
373
400
|
teamClient?: TeamProfileCardClient;
|
|
374
401
|
teamCentralClient?: TeamCentralCardClient;
|
|
402
|
+
rovoAgentClient?: RovoAgentCardClient;
|
|
375
403
|
}
|
|
376
404
|
/** This interface represents the data that is prepopulated in the profile card. **/
|
|
377
405
|
export interface PrepopulatedData {
|
|
@@ -18,7 +18,7 @@ export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' |
|
|
|
18
18
|
export declare const userRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
|
|
19
19
|
duration: number;
|
|
20
20
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
21
|
-
export declare const profileCardRendered: (type: 'user' | 'team', actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
|
|
21
|
+
export declare const profileCardRendered: (type: 'user' | 'team' | 'agent', actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
|
|
22
22
|
duration?: number;
|
|
23
23
|
errorType?: 'default' | 'NotFound';
|
|
24
24
|
hasRetry?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type ClientOverrides, type ProfileClientOptions, type TeamCentralReportingLinesData } from '../types';
|
|
3
|
+
import RovoAgentCardClient from './RovoAgentCardClient';
|
|
3
4
|
import TeamCentralCardClient from './TeamCentralCardClient';
|
|
4
5
|
import TeamProfileCardClient from './TeamProfileCardClient';
|
|
5
6
|
import UserProfileCardClient from './UserProfileCardClient';
|
|
@@ -7,6 +8,7 @@ declare class ProfileCardClient {
|
|
|
7
8
|
userClient: UserProfileCardClient;
|
|
8
9
|
teamClient: TeamProfileCardClient;
|
|
9
10
|
tcClient?: TeamCentralCardClient;
|
|
11
|
+
rovoAgentClient: RovoAgentCardClient;
|
|
10
12
|
constructor(config: ProfileClientOptions, clients?: ClientOverrides);
|
|
11
13
|
flushCache(): void;
|
|
12
14
|
getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
|
|
@@ -14,5 +16,6 @@ declare class ProfileCardClient {
|
|
|
14
16
|
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
15
17
|
getTeamCentralBaseUrl(): string | undefined;
|
|
16
18
|
shouldShowGiveKudos(): Promise<boolean>;
|
|
19
|
+
getRovoAgentProfile(agentId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<import("../types").RovoAgent>;
|
|
17
20
|
}
|
|
18
21
|
export default ProfileCardClient;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
agent
|
|
5
|
-
|
|
2
|
+
import { type RovoAgentProfileCardInfo } from '../../types';
|
|
3
|
+
type AgentProfileCardProps = {
|
|
4
|
+
agent: RovoAgentProfileCardInfo;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const AgentProfileCard: ({ agent, isLoading }: AgentProfileCardProps) => JSX.Element;
|
|
6
9
|
export default AgentProfileCard;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ProfileClient, type TriggerType } from '../../types';
|
|
3
|
+
export interface AgentProfileCardResourcedProps {
|
|
4
|
+
agentId: string;
|
|
5
|
+
cloudId: string;
|
|
6
|
+
resourceClient: ProfileClient;
|
|
7
|
+
trigger?: TriggerType;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => JSX.Element | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent }: {
|
|
3
|
-
agent
|
|
2
|
+
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading }: {
|
|
3
|
+
agent: import("../../types").RovoAgentProfileCardInfo;
|
|
4
|
+
isLoading?: boolean | undefined;
|
|
5
|
+
hasError?: boolean | undefined;
|
|
4
6
|
}) => JSX.Element>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ProfileCardTriggerProps } from '../../types';
|
|
3
|
-
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, }: ProfileCardTriggerProps): JSX.Element;
|
|
3
|
+
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, }: ProfileCardTriggerProps): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
|
+
interface AnalyticsProps {
|
|
4
|
+
fireAnalytics?: (payload: AnalyticsEventPayload) => void;
|
|
5
|
+
profileType: 'user' | 'team' | 'agent';
|
|
6
|
+
}
|
|
7
|
+
declare const LoadingState: ({ fireAnalytics, profileType }: AnalyticsProps) => JSX.Element;
|
|
8
|
+
export default LoadingState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type TriggerProps } from '@atlaskit/popup';
|
|
3
3
|
import { type ProfileCardTriggerProps } from './types';
|
|
4
|
-
export declare const PopupTrigger: ({ children, trigger, forwardRef, showProfilecard, hideProfilecard, ariaLabelledBy, ...props }: Partial<TriggerProps> & {
|
|
4
|
+
export declare const PopupTrigger: <T>({ children, trigger, forwardRef, showProfilecard, hideProfilecard, ariaLabelledBy, ...props }: Partial<TriggerProps> & {
|
|
5
5
|
showProfilecard: () => void;
|
|
6
6
|
hideProfilecard: () => void;
|
|
7
7
|
forwardRef: React.Ref<HTMLSpanElement>;
|
|
8
|
-
} & Pick<ProfileCardTriggerProps
|
|
8
|
+
} & Pick<ProfileCardTriggerProps<T>, "children" | "trigger" | "ariaLabelledBy">) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ProfileCardTriggerProps } from './types';
|
|
3
|
-
declare function ProfileCardTrigger<T>({ trigger, ariaLabelledBy, children, renderProfileCard, fetchProfile, disabledAriaAttributes, ...popupProps }: ProfileCardTriggerProps): JSX.Element;
|
|
3
|
+
declare function ProfileCardTrigger<T>({ trigger, ariaLabelledBy, children, renderProfileCard, fetchProfile, disabledAriaAttributes, ...popupProps }: ProfileCardTriggerProps<T>): JSX.Element;
|
|
4
4
|
export default ProfileCardTrigger;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type PopupProps } from '@atlaskit/popup';
|
|
3
|
-
export type ProfileCardTriggerProps = {
|
|
3
|
+
export type ProfileCardTriggerProps<T> = {
|
|
4
4
|
trigger: 'hover' | 'click';
|
|
5
5
|
ariaLabelledBy?: string;
|
|
6
6
|
disabledAriaAttributes?: boolean;
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
-
renderProfileCard: (
|
|
9
|
-
|
|
8
|
+
renderProfileCard: ({ profileData, isLoading, }: {
|
|
9
|
+
profileData?: T;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
}) => React.ReactNode;
|
|
12
|
+
fetchProfile?: () => Promise<T>;
|
|
10
13
|
} & Omit<PopupProps, 'trigger' | 'isOpen' | 'content'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as getMockProfileClient } from './mock-profile-client';
|
|
2
2
|
export { default as getMockTeamClient } from './mock-team-client';
|
|
3
3
|
export { default as profiles } from './profile-data';
|
|
4
|
-
export { simpleMockTeamClient, simpleMockUserClient, simpleProfileClient, } from './simple-mock-clients';
|
|
4
|
+
export { simpleMockTeamClient, simpleMockUserClient, simpleProfileClient, simpleMockAgentClient, } from './simple-mock-clients';
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import ProfileCardClient from '../client/ProfileCardClient';
|
|
2
|
+
import RovoAgentCardClient from '../client/RovoAgentCardClient';
|
|
2
3
|
import TeamProfileCardClient from '../client/TeamProfileCardClient';
|
|
3
4
|
import UserProfileCardClient from '../client/UserProfileCardClient';
|
|
4
|
-
import { type ProfileCardClientData, type Team } from '../types';
|
|
5
|
+
import { type ProfileCardClientData, type RovoAgent, type Team } from '../types';
|
|
5
6
|
declare class SimpleMockTeamClient extends TeamProfileCardClient {
|
|
6
7
|
makeRequest(teamId: string): Promise<Team>;
|
|
7
8
|
}
|
|
8
9
|
declare class SimpleMockUserClient extends UserProfileCardClient {
|
|
9
10
|
makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
|
|
10
11
|
}
|
|
12
|
+
declare class SimpleMockAgentClient extends RovoAgentCardClient {
|
|
13
|
+
makeRequest(userId: string): Promise<RovoAgent>;
|
|
14
|
+
}
|
|
11
15
|
export declare const simpleMockUserClient: SimpleMockUserClient;
|
|
12
16
|
export declare const simpleMockTeamClient: SimpleMockTeamClient;
|
|
17
|
+
export declare const simpleMockAgentClient: SimpleMockAgentClient;
|
|
13
18
|
export declare const simpleProfileClient: ProfileCardClient;
|
|
14
19
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type IntlShape } from 'react-intl-next';
|
|
3
3
|
import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type RovoAgentCardClient from './client/RovoAgentCardClient';
|
|
4
5
|
import type TeamCentralCardClient from './client/TeamCentralCardClient';
|
|
5
6
|
import type TeamProfileCardClient from './client/TeamProfileCardClient';
|
|
6
7
|
import type UserProfileCardClient from './client/UserProfileCardClient';
|
|
@@ -41,7 +42,32 @@ export interface Team {
|
|
|
41
42
|
}
|
|
42
43
|
export interface RovoAgent {
|
|
43
44
|
id: string;
|
|
45
|
+
identity_account_id?: string | null;
|
|
46
|
+
named_id: string;
|
|
44
47
|
name: string;
|
|
48
|
+
description: string | null;
|
|
49
|
+
system_prompt_template?: string | null;
|
|
50
|
+
creator_type: 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY';
|
|
51
|
+
creator?: string | null;
|
|
52
|
+
visibility?: 'PUBLIC' | 'PRIVATE' | null;
|
|
53
|
+
is_default: boolean;
|
|
54
|
+
actor_type: 'AGENT';
|
|
55
|
+
creator_cloud_id?: string | null;
|
|
56
|
+
follow_up_prompt_template?: string | null;
|
|
57
|
+
plugin_routing_type?: 'DEFAULT' | 'SKIP' | null;
|
|
58
|
+
user_defined_conversation_starters: string[] | null;
|
|
59
|
+
favourite: boolean;
|
|
60
|
+
deactivated: boolean;
|
|
61
|
+
deactivatedAt?: string;
|
|
62
|
+
favourite_count: number;
|
|
63
|
+
}
|
|
64
|
+
export interface RovoAgentCreatorInfo {
|
|
65
|
+
type: 'CUSTOMER' | 'SYSTEM' | 'THIRD_PARTY';
|
|
66
|
+
name?: string;
|
|
67
|
+
profileLink?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface RovoAgentProfileCardInfo extends RovoAgent {
|
|
70
|
+
creatorInfo: RovoAgentCreatorInfo | undefined;
|
|
45
71
|
}
|
|
46
72
|
export interface ProfileCardClientData {
|
|
47
73
|
isBot: boolean;
|
|
@@ -350,6 +376,7 @@ export interface ProfileClient {
|
|
|
350
376
|
getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
|
|
351
377
|
shouldShowGiveKudos: () => Promise<boolean>;
|
|
352
378
|
getTeamCentralBaseUrl: () => string | undefined;
|
|
379
|
+
getRovoAgentProfile: (agentId: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<RovoAgent>;
|
|
353
380
|
}
|
|
354
381
|
export type ProfilecardTriggerPosition = 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'top-end' | 'top' | 'top-start' | 'right-end' | 'right' | 'right-start';
|
|
355
382
|
export type ProfileCardErrorType = {
|
|
@@ -375,6 +402,7 @@ export interface ClientOverrides {
|
|
|
375
402
|
userClient?: UserProfileCardClient;
|
|
376
403
|
teamClient?: TeamProfileCardClient;
|
|
377
404
|
teamCentralClient?: TeamCentralCardClient;
|
|
405
|
+
rovoAgentClient?: RovoAgentCardClient;
|
|
378
406
|
}
|
|
379
407
|
/** This interface represents the data that is prepopulated in the profile card. **/
|
|
380
408
|
export interface PrepopulatedData {
|
|
@@ -18,7 +18,7 @@ export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' |
|
|
|
18
18
|
export declare const userRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
|
|
19
19
|
duration: number;
|
|
20
20
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
21
|
-
export declare const profileCardRendered: (type: 'user' | 'team', actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
|
|
21
|
+
export declare const profileCardRendered: (type: 'user' | 'team' | 'agent', actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
|
|
22
22
|
duration?: number;
|
|
23
23
|
errorType?: 'default' | 'NotFound';
|
|
24
24
|
hasRetry?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.17.
|
|
3
|
+
"version": "19.17.7",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/atlassian-context": "^0.0.0",
|
|
57
57
|
"@atlaskit/avatar": "^21.15.0",
|
|
58
58
|
"@atlaskit/avatar-group": "^9.11.0",
|
|
59
|
-
"@atlaskit/button": "^20.
|
|
59
|
+
"@atlaskit/button": "^20.1.0",
|
|
60
60
|
"@atlaskit/dropdown-menu": "^12.17.0",
|
|
61
61
|
"@atlaskit/empty-state": "^7.11.0",
|
|
62
62
|
"@atlaskit/focus-ring": "^1.6.0",
|
|
@@ -65,11 +65,12 @@
|
|
|
65
65
|
"@atlaskit/lozenge": "^11.10.0",
|
|
66
66
|
"@atlaskit/menu": "^2.12.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
68
|
-
"@atlaskit/popup": "^1.
|
|
68
|
+
"@atlaskit/popup": "^1.23.0",
|
|
69
69
|
"@atlaskit/primitives": "^12.0.0",
|
|
70
|
+
"@atlaskit/rovo-agent-components": "0.4.0",
|
|
70
71
|
"@atlaskit/spinner": "^16.3.0",
|
|
71
72
|
"@atlaskit/theme": "^13.0.0",
|
|
72
|
-
"@atlaskit/tokens": "^1.
|
|
73
|
+
"@atlaskit/tokens": "^1.59.0",
|
|
73
74
|
"@atlaskit/tooltip": "^18.7.0",
|
|
74
75
|
"@babel/runtime": "^7.0.0",
|
|
75
76
|
"@emotion/react": "^11.7.1",
|