@atlaskit/profilecard 24.14.1 → 24.16.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 +22 -0
- package/__tests__/vr-tests/agent-profilecard.vr.tsx +5 -5
- package/__tests__/vr-tests/user-profilecard.vr.tsx +30 -30
- package/dist/cjs/client/ProfileCardClient.js +10 -10
- package/dist/cjs/client/RovoAgentCardClient.js +172 -56
- package/dist/cjs/client/TeamProfileCardClient.js +44 -14
- package/dist/cjs/client/UserProfileCardClient.js +2 -9
- package/dist/cjs/client/errorUtils.js +83 -5
- package/dist/cjs/components/Agent/Actions.js +20 -9
- package/dist/cjs/components/Agent/ActionsCompiled.js +18 -8
- package/dist/cjs/components/Agent/AgentDeleteConfirmationModal.js +3 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +24 -14
- package/dist/cjs/components/Agent/AgentProfileCardCompiled.js +23 -8
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +8 -5
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +6 -2
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +61 -30
- package/dist/cjs/components/Team/TeamForbiddenErrorState.js +21 -6
- package/dist/cjs/components/Team/TeamLoadingState.js +21 -6
- package/dist/cjs/components/Team/TeamProfileCard.js +155 -60
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +104 -33
- package/dist/cjs/components/common/ProfileCardTrigger.js +3 -1
- package/dist/cjs/components/team-profile-card/main.js +18 -9
- package/dist/cjs/components/team-profile-card/team-connections/main.js +36 -17
- package/dist/cjs/util/analytics.js +55 -0
- package/dist/es2019/client/ProfileCardClient.js +10 -10
- package/dist/es2019/client/RovoAgentCardClient.js +186 -58
- package/dist/es2019/client/TeamProfileCardClient.js +49 -16
- package/dist/es2019/client/UserProfileCardClient.js +3 -10
- package/dist/es2019/client/errorUtils.js +84 -3
- package/dist/es2019/components/Agent/Actions.js +21 -9
- package/dist/es2019/components/Agent/ActionsCompiled.js +19 -8
- package/dist/es2019/components/Agent/AgentDeleteConfirmationModal.js +3 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +24 -13
- package/dist/es2019/components/Agent/AgentProfileCardCompiled.js +23 -9
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +9 -5
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +7 -2
- package/dist/es2019/components/Agent/hooks/useAgentActions.js +62 -30
- package/dist/es2019/components/Team/TeamForbiddenErrorState.js +17 -6
- package/dist/es2019/components/Team/TeamLoadingState.js +17 -6
- package/dist/es2019/components/Team/TeamProfileCard.js +144 -54
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +74 -10
- package/dist/es2019/components/common/ProfileCardTrigger.js +3 -1
- package/dist/es2019/components/team-profile-card/main.js +19 -9
- package/dist/es2019/components/team-profile-card/team-connections/main.js +38 -17
- package/dist/es2019/util/analytics.js +55 -0
- package/dist/esm/client/ProfileCardClient.js +10 -10
- package/dist/esm/client/RovoAgentCardClient.js +174 -58
- package/dist/esm/client/TeamProfileCardClient.js +46 -16
- package/dist/esm/client/UserProfileCardClient.js +3 -10
- package/dist/esm/client/errorUtils.js +82 -4
- package/dist/esm/components/Agent/Actions.js +20 -9
- package/dist/esm/components/Agent/ActionsCompiled.js +18 -8
- package/dist/esm/components/Agent/AgentDeleteConfirmationModal.js +3 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +25 -13
- package/dist/esm/components/Agent/AgentProfileCardCompiled.js +24 -9
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +8 -5
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +6 -2
- package/dist/esm/components/Agent/hooks/useAgentActions.js +61 -30
- package/dist/esm/components/Team/TeamForbiddenErrorState.js +22 -7
- package/dist/esm/components/Team/TeamLoadingState.js +22 -7
- package/dist/esm/components/Team/TeamProfileCard.js +156 -61
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +105 -34
- package/dist/esm/components/common/ProfileCardTrigger.js +3 -1
- package/dist/esm/components/team-profile-card/main.js +18 -9
- package/dist/esm/components/team-profile-card/team-connections/main.js +36 -17
- package/dist/esm/util/analytics.js +55 -0
- package/dist/types/client/ProfileCardClient.d.ts +5 -5
- package/dist/types/client/RovoAgentCardClient.d.ts +5 -4
- package/dist/types/client/TeamProfileCardClient.d.ts +2 -1
- package/dist/types/client/errorUtils.d.ts +2 -1
- package/dist/types/client/types.d.ts +14 -2
- package/dist/types/components/Team/TeamForbiddenErrorState.d.ts +2 -1
- package/dist/types/components/Team/TeamLoadingState.d.ts +2 -1
- package/dist/types/components/Team/TeamProfileCardTrigger.d.ts +7 -2
- package/dist/types/types.d.ts +2 -0
- package/dist/types/util/analytics.d.ts +46 -2
- package/dist/types-ts4.5/client/ProfileCardClient.d.ts +5 -5
- package/dist/types-ts4.5/client/RovoAgentCardClient.d.ts +5 -4
- package/dist/types-ts4.5/client/TeamProfileCardClient.d.ts +2 -1
- package/dist/types-ts4.5/client/errorUtils.d.ts +2 -1
- package/dist/types-ts4.5/client/types.d.ts +14 -2
- package/dist/types-ts4.5/components/Team/TeamForbiddenErrorState.d.ts +2 -1
- package/dist/types-ts4.5/components/Team/TeamLoadingState.d.ts +2 -1
- package/dist/types-ts4.5/components/Team/TeamProfileCardTrigger.d.ts +7 -2
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/dist/types-ts4.5/util/analytics.d.ts +46 -2
- package/package.json +8 -8
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
4
4
|
import { type TriggerProps } from '@atlaskit/popup/types';
|
|
5
|
+
import { type AnalyticsEventAttributes, type FireEventType } from '@atlaskit/teams-app-internal-analytics';
|
|
5
6
|
import type { AnalyticsFromDuration, AnalyticsProps, ProfileCardAction, Team, TeamProfileCardTriggerProps, TeamProfileCardTriggerState } from '../../types';
|
|
6
7
|
export declare class TeamProfileCardTriggerInternal extends React.PureComponent<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, TeamProfileCardTriggerState> {
|
|
7
8
|
static defaultProps: Partial<TeamProfileCardTriggerProps>;
|
|
@@ -11,7 +12,9 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
|
|
|
11
12
|
openedByHover: boolean;
|
|
12
13
|
openTime: number;
|
|
13
14
|
fireAnalytics: (payload: AnalyticsEventPayload) => void;
|
|
15
|
+
fireAnalyticsNext: FireEventType;
|
|
14
16
|
fireAnalyticsWithDuration: (generator: AnalyticsFromDuration) => void;
|
|
17
|
+
fireAnalyticsWithDurationNext: <K extends keyof AnalyticsEventAttributes>(eventKey: K, generator: (duration: number) => AnalyticsEventAttributes[K]) => void;
|
|
15
18
|
hideProfilecard: (delay?: number) => void;
|
|
16
19
|
showProfilecard: (delay?: number) => void;
|
|
17
20
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -48,7 +51,9 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
|
|
|
48
51
|
renderPopup(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
49
52
|
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
50
53
|
}
|
|
51
|
-
declare const _default: React.
|
|
54
|
+
declare const _default: React.FC<Omit<TeamProfileCardTriggerProps & WrappedComponentProps, "intl"> & {
|
|
52
55
|
forwardedRef?: React.Ref<any>;
|
|
53
|
-
},
|
|
56
|
+
} & Omit<Omit<Omit<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, "intl"> & {
|
|
57
|
+
forwardedRef?: React.Ref<any>;
|
|
58
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
|
|
54
59
|
export default _default;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -455,6 +455,8 @@ export interface TeamProfilecardProps extends TeamProfilecardCoreProps {
|
|
|
455
455
|
clientFetchProfile?: () => void;
|
|
456
456
|
/** Details relevant to passing around analytics. */
|
|
457
457
|
analytics: AnalyticsFunction;
|
|
458
|
+
/** Details relevant to passing around analytics with @atlaskit/teams-app-internal-analytics. */
|
|
459
|
+
analyticsNext: AnalyticsFunctionNext;
|
|
458
460
|
/** Set auto focus for actionable items */
|
|
459
461
|
isTriggeredByKeyboard?: boolean;
|
|
460
462
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
3
|
-
import { type ErrorAttributes } from '../client/types';
|
|
3
|
+
import { type DEPRECATED_ErrorAttributes, type ErrorAttributes } from '../client/types';
|
|
4
4
|
import { type ProfileType } from '../types';
|
|
5
5
|
export declare const PACKAGE_META_DATA: {
|
|
6
6
|
packageName: string;
|
|
7
7
|
packageVersion: string;
|
|
8
8
|
};
|
|
9
|
-
type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes;
|
|
9
|
+
type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes | DEPRECATED_ErrorAttributes;
|
|
10
10
|
interface AnalyticsEvent {
|
|
11
11
|
action?: string;
|
|
12
12
|
actionSubject?: string;
|
|
@@ -21,13 +21,29 @@ interface AnalyticsEvent {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
|
|
23
23
|
export declare const getActionSubject: (type: string) => "teamProfileCard" | "profilecard" | "rovoAgentProfilecard" | "user";
|
|
24
|
+
/**
|
|
25
|
+
* @private
|
|
26
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
27
|
+
*/
|
|
24
28
|
export declare const cardTriggered: (type: ProfileType, method: "hover" | "click", teamId?: string) => AnalyticsEventPayload;
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
32
|
+
*/
|
|
25
33
|
export declare const teamRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
|
|
26
34
|
duration: number;
|
|
27
35
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
36
|
+
/**
|
|
37
|
+
* @private
|
|
38
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
39
|
+
*/
|
|
28
40
|
export declare const userRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
|
|
29
41
|
duration: number;
|
|
30
42
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
43
|
+
/**
|
|
44
|
+
* @private
|
|
45
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
46
|
+
*/
|
|
31
47
|
export declare const profileCardRendered: (type: ProfileType, actionSubjectId: "spinner" | "content" | "error" | "errorBoundary", attributes?: {
|
|
32
48
|
duration?: number;
|
|
33
49
|
errorType?: "default" | "NotFound";
|
|
@@ -38,6 +54,10 @@ export declare const profileCardRendered: (type: ProfileType, actionSubjectId: "
|
|
|
38
54
|
descriptionLength?: number;
|
|
39
55
|
titleLength?: number;
|
|
40
56
|
}) => AnalyticsEventPayload;
|
|
57
|
+
/**
|
|
58
|
+
* @private
|
|
59
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
60
|
+
*/
|
|
41
61
|
export declare const actionClicked: (type: ProfileType, attributes: {
|
|
42
62
|
duration: number;
|
|
43
63
|
hasHref: boolean;
|
|
@@ -45,27 +65,51 @@ export declare const actionClicked: (type: ProfileType, attributes: {
|
|
|
45
65
|
index: number;
|
|
46
66
|
actionId: string;
|
|
47
67
|
}) => AnalyticsEventPayload;
|
|
68
|
+
/**
|
|
69
|
+
* @private
|
|
70
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
71
|
+
*/
|
|
48
72
|
export declare const reportingLinesClicked: (attributes: {
|
|
49
73
|
userType: "manager" | "direct-report";
|
|
50
74
|
duration: number;
|
|
51
75
|
}) => AnalyticsEventPayload;
|
|
76
|
+
/**
|
|
77
|
+
* @private
|
|
78
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
79
|
+
*/
|
|
52
80
|
export declare const moreActionsClicked: (type: ProfileType, attributes: {
|
|
53
81
|
duration: number;
|
|
54
82
|
numActions: number;
|
|
55
83
|
}) => AnalyticsEventPayload;
|
|
84
|
+
/**
|
|
85
|
+
* @private
|
|
86
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
87
|
+
*/
|
|
56
88
|
export declare const teamAvatarClicked: (attributes: {
|
|
57
89
|
duration: number;
|
|
58
90
|
hasHref: boolean;
|
|
59
91
|
hasOnClick: boolean;
|
|
60
92
|
index: number;
|
|
61
93
|
}) => AnalyticsEventPayload;
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
97
|
+
*/
|
|
62
98
|
export declare const moreMembersClicked: (attributes: {
|
|
63
99
|
duration: number;
|
|
64
100
|
memberCount: number;
|
|
65
101
|
}) => AnalyticsEventPayload;
|
|
102
|
+
/**
|
|
103
|
+
* @private
|
|
104
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
105
|
+
*/
|
|
66
106
|
export declare const errorRetryClicked: (attributes: {
|
|
67
107
|
duration: number;
|
|
68
108
|
}) => AnalyticsEventPayload;
|
|
109
|
+
/**
|
|
110
|
+
* @private
|
|
111
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
112
|
+
*/
|
|
69
113
|
export declare const agentRequestAnalytics: (action: "triggered" | "succeeded" | "failed", actionSubjectId?: string, attributes?: {
|
|
70
114
|
duration: number;
|
|
71
115
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
@@ -17,13 +17,13 @@ declare class ProfileCardClient implements ProfileClient {
|
|
|
17
17
|
constructor(config: ProfileClientOptions, clients?: ClientOverrides);
|
|
18
18
|
flushCache(): void;
|
|
19
19
|
getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
|
|
20
|
-
getTeamProfile(teamId: string, orgId?: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<import("../types").Team>;
|
|
20
|
+
getTeamProfile(teamId: string, orgId?: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<import("../types").Team>;
|
|
21
21
|
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
22
22
|
getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
|
|
23
23
|
shouldShowGiveKudos(): Promise<boolean>;
|
|
24
|
-
getRovoAgentProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void): Promise<import("../types").RovoAgent>;
|
|
25
|
-
getRovoAgentPermissions(id: string, fireAnalytics?: ((event: AnalyticsEventPayload) => void) | undefined): Promise<import("../types").AgentPermissions>;
|
|
26
|
-
deleteAgent(id: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<void>;
|
|
27
|
-
setFavouriteAgent(id: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void): Promise<void>;
|
|
24
|
+
getRovoAgentProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<import("../types").RovoAgent>;
|
|
25
|
+
getRovoAgentPermissions(id: string, fireAnalytics?: ((event: AnalyticsEventPayload) => void) | undefined, analyticsNext?: FireEventType): Promise<import("../types").AgentPermissions>;
|
|
26
|
+
deleteAgent(id: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
|
|
27
|
+
setFavouriteAgent(id: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
|
|
28
28
|
}
|
|
29
29
|
export default ProfileCardClient;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
+
import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
|
|
2
3
|
import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgent } from '../types';
|
|
3
4
|
import CachingClient from './CachingClient';
|
|
4
5
|
export default class RovoAgentCardClient extends CachingClient<RovoAgent> {
|
|
@@ -6,8 +7,8 @@ export default class RovoAgentCardClient extends CachingClient<RovoAgent> {
|
|
|
6
7
|
constructor(options: ProfileClientOptions);
|
|
7
8
|
private basePath;
|
|
8
9
|
makeRequest(id: AgentIdType, cloudId: string): Promise<RovoAgent>;
|
|
9
|
-
getProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void): Promise<RovoAgent>;
|
|
10
|
-
deleteAgent(agentId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<void>;
|
|
11
|
-
setFavouriteAgent(agentId: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void): Promise<void>;
|
|
12
|
-
getPermissions(id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void): Promise<AgentPermissions>;
|
|
10
|
+
getProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<RovoAgent>;
|
|
11
|
+
deleteAgent(agentId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
|
|
12
|
+
setFavouriteAgent(agentId: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
|
|
13
|
+
getPermissions(id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType): Promise<AgentPermissions>;
|
|
13
14
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
+
import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
|
|
2
3
|
import type { ProfileClientOptions, Team } from '../types';
|
|
3
4
|
import CachingClient from './CachingClient';
|
|
4
5
|
export default class TeamProfileCardClient extends CachingClient<Team> {
|
|
5
6
|
options: ProfileClientOptions;
|
|
6
7
|
constructor(options: ProfileClientOptions);
|
|
7
8
|
makeRequest(teamId: string, _orgId: string | undefined): Promise<Team>;
|
|
8
|
-
getProfile(teamId: string, orgId: string | undefined, analytics?: (event: AnalyticsEventPayload) => void): Promise<Team>;
|
|
9
|
+
getProfile(teamId: string, orgId: string | undefined, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<Team>;
|
|
9
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AGGError, AGGErrors, DirectoryGraphQLError, DirectoryGraphQLErrors } from '../util/errors';
|
|
2
|
-
import { type ErrorAttributes } from './types';
|
|
2
|
+
import { type DEPRECATED_ErrorAttributes, type ErrorAttributes } from './types';
|
|
3
|
+
export declare const DEPRECATED_getErrorAttributes: (error?: DirectoryGraphQLErrors | Error | unknown | DirectoryGraphQLError | AGGError | AGGErrors) => DEPRECATED_ErrorAttributes;
|
|
3
4
|
export declare const getErrorAttributes: (error?: DirectoryGraphQLErrors | Error | unknown | DirectoryGraphQLError | AGGError | AGGErrors) => ErrorAttributes;
|
|
4
5
|
export declare const handleDirectoryGraphQLErrors: (errors: unknown, traceId: string | null) => void;
|
|
5
6
|
export declare const handleAGGErrors: (errors: unknown, traceId: string | null) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type DEPRECATED_ErrorAttributes = {
|
|
2
2
|
errorCount?: number;
|
|
3
|
-
errorDetails?: Omit<
|
|
3
|
+
errorDetails?: Omit<DEPRECATED_ErrorAttributes, 'errorDetails'>[];
|
|
4
4
|
errorMessage: string;
|
|
5
5
|
errorCategory?: string;
|
|
6
6
|
errorType?: string;
|
|
@@ -10,3 +10,15 @@ export type ErrorAttributes = {
|
|
|
10
10
|
traceId?: string | null;
|
|
11
11
|
errorStatusCode?: number;
|
|
12
12
|
};
|
|
13
|
+
export type ErrorAttributes = {
|
|
14
|
+
errorCount: number | null;
|
|
15
|
+
errorDetails: Omit<ErrorAttributes, 'errorDetails'>[] | null;
|
|
16
|
+
errorMessage: string;
|
|
17
|
+
errorCategory: string | null;
|
|
18
|
+
errorType: string | null;
|
|
19
|
+
errorPath: string | null;
|
|
20
|
+
errorNumber: number | null;
|
|
21
|
+
isSLOFailure: boolean;
|
|
22
|
+
traceId: string | null;
|
|
23
|
+
errorStatusCode: number | null;
|
|
24
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AnalyticsFunction } from '../../types';
|
|
2
|
+
import { type AnalyticsFunction, type AnalyticsFunctionNext } from '../../types';
|
|
3
3
|
declare const _default: (props: {
|
|
4
4
|
analytics: AnalyticsFunction;
|
|
5
|
+
analyticsNext: AnalyticsFunctionNext;
|
|
5
6
|
}) => React.JSX.Element;
|
|
6
7
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AnalyticsFunction } from '../../types';
|
|
2
|
+
import { type AnalyticsFunction, type AnalyticsFunctionNext } from '../../types';
|
|
3
3
|
declare const _default: (props: {
|
|
4
4
|
analytics: AnalyticsFunction;
|
|
5
|
+
analyticsNext: AnalyticsFunctionNext;
|
|
5
6
|
}) => React.JSX.Element;
|
|
6
7
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
4
4
|
import { type TriggerProps } from '@atlaskit/popup/types';
|
|
5
|
+
import { type AnalyticsEventAttributes, type FireEventType } from '@atlaskit/teams-app-internal-analytics';
|
|
5
6
|
import type { AnalyticsFromDuration, AnalyticsProps, ProfileCardAction, Team, TeamProfileCardTriggerProps, TeamProfileCardTriggerState } from '../../types';
|
|
6
7
|
export declare class TeamProfileCardTriggerInternal extends React.PureComponent<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, TeamProfileCardTriggerState> {
|
|
7
8
|
static defaultProps: Partial<TeamProfileCardTriggerProps>;
|
|
@@ -11,7 +12,9 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
|
|
|
11
12
|
openedByHover: boolean;
|
|
12
13
|
openTime: number;
|
|
13
14
|
fireAnalytics: (payload: AnalyticsEventPayload) => void;
|
|
15
|
+
fireAnalyticsNext: FireEventType;
|
|
14
16
|
fireAnalyticsWithDuration: (generator: AnalyticsFromDuration) => void;
|
|
17
|
+
fireAnalyticsWithDurationNext: <K extends keyof AnalyticsEventAttributes>(eventKey: K, generator: (duration: number) => AnalyticsEventAttributes[K]) => void;
|
|
15
18
|
hideProfilecard: (delay?: number) => void;
|
|
16
19
|
showProfilecard: (delay?: number) => void;
|
|
17
20
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -48,7 +51,9 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
|
|
|
48
51
|
renderPopup(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
49
52
|
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
50
53
|
}
|
|
51
|
-
declare const _default: React.
|
|
54
|
+
declare const _default: React.FC<Omit<TeamProfileCardTriggerProps & WrappedComponentProps, "intl"> & {
|
|
52
55
|
forwardedRef?: React.Ref<any>;
|
|
53
|
-
},
|
|
56
|
+
} & Omit<Omit<Omit<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, "intl"> & {
|
|
57
|
+
forwardedRef?: React.Ref<any>;
|
|
58
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
|
|
54
59
|
export default _default;
|
|
@@ -461,6 +461,8 @@ export interface TeamProfilecardProps extends TeamProfilecardCoreProps {
|
|
|
461
461
|
clientFetchProfile?: () => void;
|
|
462
462
|
/** Details relevant to passing around analytics. */
|
|
463
463
|
analytics: AnalyticsFunction;
|
|
464
|
+
/** Details relevant to passing around analytics with @atlaskit/teams-app-internal-analytics. */
|
|
465
|
+
analyticsNext: AnalyticsFunctionNext;
|
|
464
466
|
/** Set auto focus for actionable items */
|
|
465
467
|
isTriggeredByKeyboard?: boolean;
|
|
466
468
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
3
|
-
import { type ErrorAttributes } from '../client/types';
|
|
3
|
+
import { type DEPRECATED_ErrorAttributes, type ErrorAttributes } from '../client/types';
|
|
4
4
|
import { type ProfileType } from '../types';
|
|
5
5
|
export declare const PACKAGE_META_DATA: {
|
|
6
6
|
packageName: string;
|
|
7
7
|
packageVersion: string;
|
|
8
8
|
};
|
|
9
|
-
type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes;
|
|
9
|
+
type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes | DEPRECATED_ErrorAttributes;
|
|
10
10
|
interface AnalyticsEvent {
|
|
11
11
|
action?: string;
|
|
12
12
|
actionSubject?: string;
|
|
@@ -21,13 +21,29 @@ interface AnalyticsEvent {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
|
|
23
23
|
export declare const getActionSubject: (type: string) => "teamProfileCard" | "profilecard" | "rovoAgentProfilecard" | "user";
|
|
24
|
+
/**
|
|
25
|
+
* @private
|
|
26
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
27
|
+
*/
|
|
24
28
|
export declare const cardTriggered: (type: ProfileType, method: "hover" | "click", teamId?: string) => AnalyticsEventPayload;
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
32
|
+
*/
|
|
25
33
|
export declare const teamRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
|
|
26
34
|
duration: number;
|
|
27
35
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
36
|
+
/**
|
|
37
|
+
* @private
|
|
38
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
39
|
+
*/
|
|
28
40
|
export declare const userRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
|
|
29
41
|
duration: number;
|
|
30
42
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
43
|
+
/**
|
|
44
|
+
* @private
|
|
45
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
46
|
+
*/
|
|
31
47
|
export declare const profileCardRendered: (type: ProfileType, actionSubjectId: "spinner" | "content" | "error" | "errorBoundary", attributes?: {
|
|
32
48
|
duration?: number;
|
|
33
49
|
errorType?: "default" | "NotFound";
|
|
@@ -38,6 +54,10 @@ export declare const profileCardRendered: (type: ProfileType, actionSubjectId: "
|
|
|
38
54
|
descriptionLength?: number;
|
|
39
55
|
titleLength?: number;
|
|
40
56
|
}) => AnalyticsEventPayload;
|
|
57
|
+
/**
|
|
58
|
+
* @private
|
|
59
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
60
|
+
*/
|
|
41
61
|
export declare const actionClicked: (type: ProfileType, attributes: {
|
|
42
62
|
duration: number;
|
|
43
63
|
hasHref: boolean;
|
|
@@ -45,27 +65,51 @@ export declare const actionClicked: (type: ProfileType, attributes: {
|
|
|
45
65
|
index: number;
|
|
46
66
|
actionId: string;
|
|
47
67
|
}) => AnalyticsEventPayload;
|
|
68
|
+
/**
|
|
69
|
+
* @private
|
|
70
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
71
|
+
*/
|
|
48
72
|
export declare const reportingLinesClicked: (attributes: {
|
|
49
73
|
userType: "manager" | "direct-report";
|
|
50
74
|
duration: number;
|
|
51
75
|
}) => AnalyticsEventPayload;
|
|
76
|
+
/**
|
|
77
|
+
* @private
|
|
78
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
79
|
+
*/
|
|
52
80
|
export declare const moreActionsClicked: (type: ProfileType, attributes: {
|
|
53
81
|
duration: number;
|
|
54
82
|
numActions: number;
|
|
55
83
|
}) => AnalyticsEventPayload;
|
|
84
|
+
/**
|
|
85
|
+
* @private
|
|
86
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
87
|
+
*/
|
|
56
88
|
export declare const teamAvatarClicked: (attributes: {
|
|
57
89
|
duration: number;
|
|
58
90
|
hasHref: boolean;
|
|
59
91
|
hasOnClick: boolean;
|
|
60
92
|
index: number;
|
|
61
93
|
}) => AnalyticsEventPayload;
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
97
|
+
*/
|
|
62
98
|
export declare const moreMembersClicked: (attributes: {
|
|
63
99
|
duration: number;
|
|
64
100
|
memberCount: number;
|
|
65
101
|
}) => AnalyticsEventPayload;
|
|
102
|
+
/**
|
|
103
|
+
* @private
|
|
104
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
105
|
+
*/
|
|
66
106
|
export declare const errorRetryClicked: (attributes: {
|
|
67
107
|
duration: number;
|
|
68
108
|
}) => AnalyticsEventPayload;
|
|
109
|
+
/**
|
|
110
|
+
* @private
|
|
111
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
112
|
+
*/
|
|
69
113
|
export declare const agentRequestAnalytics: (action: "triggered" | "succeeded" | "failed", actionSubjectId?: string, attributes?: {
|
|
70
114
|
duration: number;
|
|
71
115
|
} & GenericAttributes) => AnalyticsEventPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.16.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/heading": "^5.2.0",
|
|
54
54
|
"@atlaskit/icon": "^28.3.0",
|
|
55
55
|
"@atlaskit/link": "^3.2.0",
|
|
56
|
-
"@atlaskit/logo": "^19.
|
|
56
|
+
"@atlaskit/logo": "^19.8.0",
|
|
57
57
|
"@atlaskit/lozenge": "^13.0.0",
|
|
58
58
|
"@atlaskit/menu": "^8.4.0",
|
|
59
59
|
"@atlaskit/modal-dialog": "^14.4.0",
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
63
63
|
"@atlaskit/popup": "^4.4.0",
|
|
64
64
|
"@atlaskit/primitives": "^14.15.0",
|
|
65
|
-
"@atlaskit/rovo-agent-components": "^3.
|
|
66
|
-
"@atlaskit/rovo-triggers": "^3.
|
|
65
|
+
"@atlaskit/rovo-agent-components": "^3.6.0",
|
|
66
|
+
"@atlaskit/rovo-triggers": "^3.12.0",
|
|
67
67
|
"@atlaskit/spinner": "^19.0.0",
|
|
68
68
|
"@atlaskit/teams-app-config": "^1.11.0",
|
|
69
|
-
"@atlaskit/teams-app-internal-analytics": "^1.
|
|
69
|
+
"@atlaskit/teams-app-internal-analytics": "^1.7.0",
|
|
70
70
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
71
|
-
"@atlaskit/teams-public": "^0.
|
|
71
|
+
"@atlaskit/teams-public": "^0.61.0",
|
|
72
72
|
"@atlaskit/theme": "^21.0.0",
|
|
73
|
-
"@atlaskit/tokens": "^6.
|
|
74
|
-
"@atlaskit/tooltip": "^20.
|
|
73
|
+
"@atlaskit/tokens": "^6.4.0",
|
|
74
|
+
"@atlaskit/tooltip": "^20.5.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
76
76
|
"@compiled/react": "^0.18.3",
|
|
77
77
|
"@emotion/react": "^11.7.1",
|