@atlaskit/profilecard 24.14.0 → 24.15.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 +21 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state--default.png +0 -0
- package/__tests__/vr-tests/agent-profilecard.vr.tsx +7 -1
- package/__tests__/vr-tests/user-profilecard.vr.tsx +42 -6
- 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/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/Actions.js +25 -11
- package/dist/cjs/components/Agent/ActionsCompiled.compiled.css +19 -0
- package/dist/cjs/components/Agent/ActionsCompiled.js +150 -0
- package/dist/cjs/components/Agent/AgentDeleteConfirmationModal.js +2 -4
- package/dist/cjs/components/Agent/AgentProfileCard.js +28 -14
- package/dist/cjs/components/Agent/AgentProfileCardCompiled.compiled.css +8 -0
- package/dist/cjs/components/Agent/AgentProfileCardCompiled.js +257 -0
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +8 -5
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +6 -2
- package/dist/cjs/components/Agent/AgentProfileCardWrapper.compiled.css +1 -0
- package/dist/cjs/components/Agent/AgentProfileCardWrapper.js +9 -8
- package/dist/cjs/components/Agent/ConversationStarters.js +2 -4
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +61 -30
- package/dist/cjs/components/Error/ErrorMessage.js +3 -3
- 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 +107 -36
- package/dist/cjs/components/User/ProfileCardDetails.compiled.css +0 -1
- package/dist/cjs/components/User/ProfileCardDetails.js +2 -4
- package/dist/cjs/components/User/ReportingLinesDetails.js +4 -1
- package/dist/cjs/components/User/ReportingLinesDetailsCompiled.compiled.css +11 -0
- package/dist/cjs/components/User/ReportingLinesDetailsCompiled.js +109 -0
- package/dist/cjs/components/common/ProfileCardWrapper.compiled.css +1 -0
- package/dist/cjs/components/common/ProfileCardWrapper.js +9 -8
- package/dist/cjs/components/team-profile-card/main.js +18 -9
- package/dist/cjs/components/team-profile-card/team-actions/more-actions/index.js +2 -4
- package/dist/cjs/components/team-profile-card/team-connections/main.js +36 -17
- package/dist/cjs/styled/CoverImage.compiled.css +2 -0
- package/dist/cjs/styled/CoverImage.js +4 -2
- package/dist/cjs/styled/Error.compiled.css +0 -2
- package/dist/cjs/styled/Error.js +5 -3
- package/dist/cjs/util/analytics.js +57 -2
- 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/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/Actions.js +26 -11
- package/dist/es2019/components/Agent/ActionsCompiled.compiled.css +19 -0
- package/dist/es2019/components/Agent/ActionsCompiled.js +127 -0
- package/dist/es2019/components/Agent/AgentDeleteConfirmationModal.js +1 -2
- package/dist/es2019/components/Agent/AgentProfileCard.js +28 -13
- package/dist/es2019/components/Agent/AgentProfileCardCompiled.compiled.css +8 -0
- package/dist/es2019/components/Agent/AgentProfileCardCompiled.js +200 -0
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +9 -5
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +7 -2
- package/dist/es2019/components/Agent/AgentProfileCardWrapper.compiled.css +1 -0
- package/dist/es2019/components/Agent/AgentProfileCardWrapper.js +8 -7
- package/dist/es2019/components/Agent/ConversationStarters.js +1 -3
- package/dist/es2019/components/Agent/hooks/useAgentActions.js +62 -30
- package/dist/es2019/components/Error/ErrorMessage.js +1 -2
- 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 +75 -12
- package/dist/es2019/components/User/ProfileCardDetails.compiled.css +0 -1
- package/dist/es2019/components/User/ProfileCardDetails.js +1 -4
- package/dist/es2019/components/User/ReportingLinesDetails.js +4 -1
- package/dist/es2019/components/User/ReportingLinesDetailsCompiled.compiled.css +11 -0
- package/dist/es2019/components/User/ReportingLinesDetailsCompiled.js +96 -0
- package/dist/es2019/components/common/ProfileCardWrapper.compiled.css +1 -0
- package/dist/es2019/components/common/ProfileCardWrapper.js +8 -7
- package/dist/es2019/components/team-profile-card/main.js +19 -9
- package/dist/es2019/components/team-profile-card/team-actions/more-actions/index.js +1 -2
- package/dist/es2019/components/team-profile-card/team-connections/main.js +38 -17
- package/dist/es2019/styled/CoverImage.compiled.css +2 -0
- package/dist/es2019/styled/CoverImage.js +4 -2
- package/dist/es2019/styled/Error.compiled.css +0 -2
- package/dist/es2019/styled/Error.js +6 -4
- package/dist/es2019/util/analytics.js +57 -2
- 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/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/Actions.js +25 -11
- package/dist/esm/components/Agent/ActionsCompiled.compiled.css +19 -0
- package/dist/esm/components/Agent/ActionsCompiled.js +141 -0
- package/dist/esm/components/Agent/AgentDeleteConfirmationModal.js +1 -2
- package/dist/esm/components/Agent/AgentProfileCard.js +29 -13
- package/dist/esm/components/Agent/AgentProfileCardCompiled.compiled.css +8 -0
- package/dist/esm/components/Agent/AgentProfileCardCompiled.js +248 -0
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +8 -5
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +6 -2
- package/dist/esm/components/Agent/AgentProfileCardWrapper.compiled.css +1 -0
- package/dist/esm/components/Agent/AgentProfileCardWrapper.js +8 -7
- package/dist/esm/components/Agent/ConversationStarters.js +1 -3
- package/dist/esm/components/Agent/hooks/useAgentActions.js +61 -30
- package/dist/esm/components/Error/ErrorMessage.js +1 -2
- 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 +106 -36
- package/dist/esm/components/User/ProfileCardDetails.compiled.css +0 -1
- package/dist/esm/components/User/ProfileCardDetails.js +1 -4
- package/dist/esm/components/User/ReportingLinesDetails.js +4 -1
- package/dist/esm/components/User/ReportingLinesDetailsCompiled.compiled.css +11 -0
- package/dist/esm/components/User/ReportingLinesDetailsCompiled.js +102 -0
- package/dist/esm/components/common/ProfileCardWrapper.compiled.css +1 -0
- package/dist/esm/components/common/ProfileCardWrapper.js +8 -7
- package/dist/esm/components/team-profile-card/main.js +18 -9
- package/dist/esm/components/team-profile-card/team-actions/more-actions/index.js +1 -2
- package/dist/esm/components/team-profile-card/team-connections/main.js +36 -17
- package/dist/esm/styled/CoverImage.compiled.css +2 -0
- package/dist/esm/styled/CoverImage.js +4 -2
- package/dist/esm/styled/Error.compiled.css +0 -2
- package/dist/esm/styled/Error.js +6 -4
- package/dist/esm/util/analytics.js +57 -2
- 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/Agent/Actions.d.ts +10 -1
- package/dist/types/components/Agent/ActionsCompiled.d.ts +14 -0
- package/dist/types/components/Agent/AgentProfileCard.d.ts +13 -3
- package/dist/types/components/Agent/AgentProfileCardCompiled.d.ts +4 -0
- package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +12 -1
- 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/components/User/ReportingLinesDetails.d.ts +2 -2
- package/dist/types/components/User/ReportingLinesDetailsCompiled.d.ts +5 -0
- 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/Agent/Actions.d.ts +10 -1
- package/dist/types-ts4.5/components/Agent/ActionsCompiled.d.ts +14 -0
- package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +13 -3
- package/dist/types-ts4.5/components/Agent/AgentProfileCardCompiled.d.ts +4 -0
- package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +12 -1
- 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/components/User/ReportingLinesDetails.d.ts +2 -2
- package/dist/types-ts4.5/components/User/ReportingLinesDetailsCompiled.d.ts +5 -0
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/dist/types-ts4.5/util/analytics.d.ts +46 -2
- package/package.json +15 -9
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
._18u0ze3t{margin-left:var(--ds-space-0,0)}
|
|
6
6
|
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
7
7
|
._19pkxy5q{margin-top:var(--ds-space-400,2pc)}
|
|
8
|
-
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
9
8
|
._1bguutpp#profilecard-name-label{margin-bottom:var(--ds-space-150,9pt)}
|
|
10
9
|
._1bto1l2s{text-overflow:ellipsis}
|
|
11
10
|
._1hpmutpp#profilecard-name-label{margin-top:var(--ds-space-150,9pt)}
|
|
@@ -9,16 +9,13 @@ import { cx } from '@compiled/react';
|
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import Lozenge from '@atlaskit/lozenge';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
|
|
13
|
-
import { Text } from '@atlaskit/primitives';
|
|
14
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
12
|
+
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
15
13
|
import relativeDate from '../../internal/relative-date';
|
|
16
14
|
import messages from '../../messages';
|
|
17
15
|
import { AppTitleLabel, CustomLozengeContainer, DetailsGroup, DisabledInfo, JobTitleLabel, LozengeWrapper } from '../../styled/Card';
|
|
18
16
|
import { IconLabel } from '../Icon';
|
|
19
17
|
import ReportingLinesDetails from './ReportingLinesDetails';
|
|
20
18
|
var styles = {
|
|
21
|
-
detailedListWrapper: "_19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t",
|
|
22
19
|
detailedListWrapperNext: "_19pkxy5q _2hwxze3t _otyrze3t _18u0ze3t _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t",
|
|
23
20
|
fullNameLabel: "_1reo15vq _18m915vq _11c81ixg _1bto1l2s _o5721q9c",
|
|
24
21
|
noMetaLabel: "_2hwxidpf _18u0idpf _rcujxy5q _1l6uutpp",
|
|
@@ -9,6 +9,7 @@ import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
|
9
9
|
import Avatar from '@atlaskit/avatar';
|
|
10
10
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
12
13
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
14
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
15
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
@@ -16,6 +17,7 @@ import messages from '../../messages';
|
|
|
16
17
|
import { ManagerName, ManagerSection, OffsetWrapper, ReportingLinesSection } from '../../styled/ReportingLines';
|
|
17
18
|
import { PACKAGE_META_DATA, reportingLinesClicked } from '../../util/analytics';
|
|
18
19
|
import { getPageTime } from '../../util/performance';
|
|
20
|
+
import { default as ReportingLinesDetailsCompiled } from './ReportingLinesDetailsCompiled';
|
|
19
21
|
function getProfileHref(userId, profileUrl) {
|
|
20
22
|
return profileUrl ? profileUrl + userId : undefined;
|
|
21
23
|
}
|
|
@@ -133,4 +135,5 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
133
135
|
showMoreButtonProps: showMoreButtonProps
|
|
134
136
|
})));
|
|
135
137
|
};
|
|
136
|
-
|
|
138
|
+
var ReportingLinesDetailsExport = componentWithFG('profilecard_primitives_compiled', ReportingLinesDetailsCompiled, ReportingLinesDetails);
|
|
139
|
+
export default ReportingLinesDetailsExport;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
._11c81vhk{font:var(--ds-font-heading-xxsmall,normal 600 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
3
|
+
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
4
|
+
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
5
|
+
._k48p1pd9{font-weight:var(--ds-font-weight-semibold,600)}
|
|
6
|
+
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
7
|
+
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
8
|
+
._otyrze3t{margin-bottom:var(--ds-space-0,0)}
|
|
9
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
10
|
+
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
11
|
+
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* ReportingLinesDetailsCompiled.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./ReportingLinesDetailsCompiled.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
|
+
import Avatar from '@atlaskit/avatar';
|
|
7
|
+
import AvatarGroup from '@atlaskit/avatar-group';
|
|
8
|
+
import { cx } from '@atlaskit/css';
|
|
9
|
+
import { Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
10
|
+
import messages from '../../messages';
|
|
11
|
+
import { ManagerName, ManagerSection, OffsetWrapper, ReportingLinesSection } from '../../styled/ReportingLines';
|
|
12
|
+
import { reportingLinesClicked } from '../../util/analytics';
|
|
13
|
+
function getProfileHref(userId, profileUrl) {
|
|
14
|
+
return profileUrl ? profileUrl + userId : undefined;
|
|
15
|
+
}
|
|
16
|
+
var styles = {
|
|
17
|
+
reportingLinesButton: "_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _bfhksm61 _irr3166n",
|
|
18
|
+
reportingLinesHeadingDefaultStyles: "_11c81vhk _syaz1fxt _k48p1pd9 _otyru2gc",
|
|
19
|
+
reportingLinesHeadingStyles: "_otyrze3t"
|
|
20
|
+
};
|
|
21
|
+
var avatarGroupMaxCount = 5;
|
|
22
|
+
var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
23
|
+
var _manager$pii, _manager$pii2;
|
|
24
|
+
var _useIntl = useIntl(),
|
|
25
|
+
formatMessage = _useIntl.formatMessage;
|
|
26
|
+
var fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
|
|
27
|
+
_props$reportingLines = props.reportingLines,
|
|
28
|
+
reportingLines = _props$reportingLines === void 0 ? {} : _props$reportingLines,
|
|
29
|
+
reportingLinesProfileUrl = props.reportingLinesProfileUrl,
|
|
30
|
+
onReportingLinesClick = props.onReportingLinesClick;
|
|
31
|
+
var _reportingLines$manag = reportingLines.managers,
|
|
32
|
+
managers = _reportingLines$manag === void 0 ? [] : _reportingLines$manag,
|
|
33
|
+
_reportingLines$repor = reportingLines.reports,
|
|
34
|
+
reports = _reportingLines$repor === void 0 ? [] : _reportingLines$repor;
|
|
35
|
+
var manager = managers.length >= 1 ? managers[0] : undefined;
|
|
36
|
+
var hasReports = reports.length > 0;
|
|
37
|
+
var getReportingLinesOnClick = function getReportingLinesOnClick(user, userType) {
|
|
38
|
+
return onReportingLinesClick ? function () {
|
|
39
|
+
fireAnalyticsWithDuration(function (duration) {
|
|
40
|
+
return reportingLinesClicked({
|
|
41
|
+
duration: duration,
|
|
42
|
+
userType: userType
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
onReportingLinesClick(user);
|
|
46
|
+
} : undefined;
|
|
47
|
+
};
|
|
48
|
+
var onReportingLinksClick = function onReportingLinksClick(user, userType, href) {
|
|
49
|
+
var shouldPreventDefault = false;
|
|
50
|
+
if (onReportingLinesClick) {
|
|
51
|
+
shouldPreventDefault = onReportingLinesClick(user) === false;
|
|
52
|
+
}
|
|
53
|
+
fireAnalyticsWithDuration(function (duration) {
|
|
54
|
+
return reportingLinesClicked({
|
|
55
|
+
duration: duration,
|
|
56
|
+
userType: userType
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
if (shouldPreventDefault) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (href) {
|
|
63
|
+
window.location.href = href;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var showMoreButtonProps = {
|
|
67
|
+
'aria-label': formatMessage(messages.profileCardMoreReportingLinesLabel, {
|
|
68
|
+
count: reports.length - avatarGroupMaxCount + 1
|
|
69
|
+
})
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, manager && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
72
|
+
xcss: cx(styles.reportingLinesHeadingDefaultStyles, styles.reportingLinesHeadingStyles)
|
|
73
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.managerSectionHeading)), /*#__PURE__*/React.createElement(OffsetWrapper, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
74
|
+
onClick: function onClick() {
|
|
75
|
+
return onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl));
|
|
76
|
+
},
|
|
77
|
+
isDisabled: !onReportingLinesClick,
|
|
78
|
+
xcss: styles.reportingLinesButton
|
|
79
|
+
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
80
|
+
size: "xsmall",
|
|
81
|
+
src: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.picture
|
|
82
|
+
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
83
|
+
xcss: styles.reportingLinesHeadingDefaultStyles
|
|
84
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.directReportsSectionHeading)), /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
85
|
+
appearance: "stack",
|
|
86
|
+
size: "small",
|
|
87
|
+
data: reports.map(function (member) {
|
|
88
|
+
var _member$pii, _member$pii2;
|
|
89
|
+
return {
|
|
90
|
+
key: member.accountIdentifier,
|
|
91
|
+
name: ((_member$pii = member.pii) === null || _member$pii === void 0 ? void 0 : _member$pii.name) || '',
|
|
92
|
+
src: (_member$pii2 = member.pii) === null || _member$pii2 === void 0 ? void 0 : _member$pii2.picture,
|
|
93
|
+
href: getProfileHref(member.accountIdentifier, reportingLinesProfileUrl),
|
|
94
|
+
onClick: getReportingLinesOnClick(member, 'direct-report')
|
|
95
|
+
};
|
|
96
|
+
}),
|
|
97
|
+
maxCount: avatarGroupMaxCount,
|
|
98
|
+
testId: "profilecard-reports-avatar-group",
|
|
99
|
+
showMoreButtonProps: showMoreButtonProps
|
|
100
|
+
})));
|
|
101
|
+
};
|
|
102
|
+
export default ReportingLinesDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1bsb1gwv{width:360px}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
/* ProfileCardWrapper.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./ProfileCardWrapper.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
width: '360px'
|
|
7
|
-
});
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
wrapper: "_1bsb1gwv"
|
|
8
|
+
};
|
|
8
9
|
export var ProfileCardWrapper = function ProfileCardWrapper(_ref) {
|
|
9
10
|
var children = _ref.children,
|
|
10
11
|
testId = _ref.testId;
|
|
11
12
|
return /*#__PURE__*/React.createElement(Box, {
|
|
12
|
-
xcss: styles,
|
|
13
|
+
xcss: styles.wrapper,
|
|
13
14
|
testId: testId
|
|
14
15
|
}, children);
|
|
15
16
|
};
|
|
@@ -11,7 +11,9 @@ import AvatarGroup from '@atlaskit/avatar-group';
|
|
|
11
11
|
import Heading from '@atlaskit/heading';
|
|
12
12
|
import LinkItem from '@atlaskit/menu/link-item';
|
|
13
13
|
import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { Box, Flex, Inline, Pressable, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
16
|
+
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
15
17
|
import TeamAvatar from '@atlaskit/teams-avatar';
|
|
16
18
|
import { TeamContainers, useTeamContainers } from '@atlaskit/teams-public';
|
|
17
19
|
import { fireEvent } from '../../util/analytics';
|
|
@@ -73,6 +75,8 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
|
|
|
73
75
|
loading = _useTeamContainers.loading;
|
|
74
76
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
75
77
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
78
|
+
var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
|
|
79
|
+
fireEventNext = _useAnalyticsEventsNe.fireEvent;
|
|
76
80
|
// Ensure that the current container is not the only connection for this team before showing the "Where we work" section
|
|
77
81
|
var hasOtherTeamConnections = useMemo(function () {
|
|
78
82
|
return teamContainers.filter(function (tc) {
|
|
@@ -83,18 +87,22 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
|
|
|
83
87
|
// TODO: set isNewLayout to be true when clean up 'team-bi-directional-container-connection' experiment
|
|
84
88
|
var isNewLayout = Boolean(props.isKudosEnabled || props.otherActions);
|
|
85
89
|
var onClick = useCallback(function () {
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
91
|
+
fireEventNext('ui.button.clicked.viewTeamProfileButton', {});
|
|
92
|
+
} else {
|
|
93
|
+
if (createAnalyticsEvent) {
|
|
94
|
+
fireEvent(createAnalyticsEvent, {
|
|
95
|
+
action: 'clicked',
|
|
96
|
+
actionSubject: 'button',
|
|
97
|
+
actionSubjectId: 'viewTeamProfileButton',
|
|
98
|
+
attributes: {}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
if (!isNewLayout) {
|
|
95
103
|
window.open(teamProfileUrl, '_blank');
|
|
96
104
|
}
|
|
97
|
-
}, [createAnalyticsEvent, teamProfileUrl, isNewLayout]);
|
|
105
|
+
}, [createAnalyticsEvent, teamProfileUrl, isNewLayout, fireEventNext]);
|
|
98
106
|
if (isNewLayout) {
|
|
99
107
|
return /*#__PURE__*/React.createElement(Box, {
|
|
100
108
|
xcss: styles.wrapperStyles,
|
|
@@ -179,7 +187,8 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
|
|
|
179
187
|
testId: "team-app-tile",
|
|
180
188
|
alt: "team-app-tile",
|
|
181
189
|
xcss: styles.teamAppTileStyles
|
|
182
|
-
})
|
|
190
|
+
}),
|
|
191
|
+
testId: "team-profile-card-profile-link-item"
|
|
183
192
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
184
193
|
maxLines: 1,
|
|
185
194
|
color: "color.text"
|
|
@@ -6,8 +6,7 @@ import { IconButton } from '@atlaskit/button/new';
|
|
|
6
6
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
7
7
|
import { MenuGroup, Section } from '@atlaskit/menu';
|
|
8
8
|
import Popup from '@atlaskit/popup';
|
|
9
|
-
|
|
10
|
-
import { Box } from '@atlaskit/primitives';
|
|
9
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { messages } from './messages';
|
|
12
11
|
export var MoreActions = function MoreActions(_ref) {
|
|
13
12
|
var actions = _ref.actions,
|
|
@@ -4,7 +4,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
6
|
import { LinkItem } from '@atlaskit/menu';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { Box, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
9
|
+
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
8
10
|
import { ContainerIcon, getContainerProperties } from '@atlaskit/teams-public';
|
|
9
11
|
import { fireEvent } from '../../../util/analytics';
|
|
10
12
|
var styles = {
|
|
@@ -27,16 +29,24 @@ export var TeamConnections = function TeamConnections(_ref) {
|
|
|
27
29
|
containerTypeText = _getContainerProperti.containerTypeText;
|
|
28
30
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
29
31
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
32
|
+
var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
|
|
33
|
+
fireEventNext = _useAnalyticsEventsNe.fireEvent;
|
|
30
34
|
var onClick = useCallback(function () {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
actionSubject: 'teamConnectionItem',
|
|
34
|
-
actionSubjectId: 'teamProfileCard',
|
|
35
|
-
attributes: {
|
|
35
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
36
|
+
fireEventNext('ui.teamConnectionItem.clicked.teamProfileCard', {
|
|
36
37
|
container: containerType
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
fireEvent(createAnalyticsEvent, {
|
|
41
|
+
action: 'clicked',
|
|
42
|
+
actionSubject: 'teamConnectionItem',
|
|
43
|
+
actionSubjectId: 'teamProfileCard',
|
|
44
|
+
attributes: {
|
|
45
|
+
container: containerType
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}, [containerType, createAnalyticsEvent, fireEventNext]);
|
|
40
50
|
return /*#__PURE__*/React.createElement(LinkItem, {
|
|
41
51
|
href: link,
|
|
42
52
|
onClick: onClick,
|
|
@@ -81,16 +91,24 @@ export var NewTeamConnections = function NewTeamConnections(_ref2) {
|
|
|
81
91
|
containerTypeText = _getContainerProperti2.containerTypeText;
|
|
82
92
|
var _useAnalyticsEvents2 = useAnalyticsEvents(),
|
|
83
93
|
createAnalyticsEvent = _useAnalyticsEvents2.createAnalyticsEvent;
|
|
94
|
+
var _useAnalyticsEventsNe2 = useAnalyticsEventsNext(),
|
|
95
|
+
fireEventNext = _useAnalyticsEventsNe2.fireEvent;
|
|
84
96
|
var onClick = useCallback(function () {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
actionSubject: 'teamConnectionItem',
|
|
88
|
-
actionSubjectId: 'teamProfileCard',
|
|
89
|
-
attributes: {
|
|
97
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
98
|
+
fireEventNext('ui.teamConnectionItem.clicked.teamProfileCard', {
|
|
90
99
|
container: containerType
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
100
|
+
});
|
|
101
|
+
} else {
|
|
102
|
+
fireEvent(createAnalyticsEvent, {
|
|
103
|
+
action: 'clicked',
|
|
104
|
+
actionSubject: 'teamConnectionItem',
|
|
105
|
+
actionSubjectId: 'teamProfileCard',
|
|
106
|
+
attributes: {
|
|
107
|
+
container: containerType
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}, [containerType, createAnalyticsEvent, fireEventNext]);
|
|
94
112
|
return /*#__PURE__*/React.createElement(LinkItem, {
|
|
95
113
|
href: link,
|
|
96
114
|
onClick: onClick,
|
|
@@ -114,7 +132,8 @@ export var NewTeamConnections = function NewTeamConnections(_ref2) {
|
|
|
114
132
|
backgroundColor: 'color.background.neutral.subtle',
|
|
115
133
|
xcss: styles.containerTypeIconButtonStyles,
|
|
116
134
|
testId: "container-type-icon"
|
|
117
|
-
}, icon)
|
|
135
|
+
}, icon),
|
|
136
|
+
testId: "team-connection-item"
|
|
118
137
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
119
138
|
maxLines: 1,
|
|
120
139
|
color: "color.text"
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
._1e0c1txw{display:flex}
|
|
7
7
|
._1reo15vq{overflow-x:hidden}
|
|
8
8
|
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1osq{height:100%}
|
|
9
10
|
._4t3i1qr7{height:8pc}
|
|
10
11
|
._4t3i1wug{height:auto}
|
|
12
|
+
._5ral1dfr{object-fit:cover}
|
|
11
13
|
._kqswh2mm{position:relative}
|
|
12
14
|
._qrwq12b0{border-top-right-radius:var(--ds-radius-small,4px)}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import "./CoverImage.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
7
|
var styles = {
|
|
7
8
|
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13li12b0 _qrwq12b0 _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
8
|
-
image: "_1bsbnklw _4t3i1wug"
|
|
9
|
+
image: "_1bsbnklw _4t3i1wug",
|
|
10
|
+
imageNext: "_4t3i1osq _5ral1dfr"
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -26,6 +28,6 @@ export var CoverImage = function CoverImage(_ref) {
|
|
|
26
28
|
ref: imgRef,
|
|
27
29
|
src: src,
|
|
28
30
|
alt: alt,
|
|
29
|
-
xcss: styles.image
|
|
31
|
+
xcss: fg('cover-header-image-team-profilecard') ? styles.imageNext : styles.image
|
|
30
32
|
}));
|
|
31
33
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
1
|
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
3
2
|
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
4
3
|
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
5
4
|
._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
|
|
6
|
-
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
7
5
|
._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
|
|
8
6
|
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
9
7
|
._y3gn1h6o{text-align:center}
|
package/dist/esm/styled/Error.js
CHANGED
|
@@ -4,11 +4,11 @@ import "./Error.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
|
+
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import { N200 } from '@atlaskit/theme/colors';
|
|
9
9
|
var styles = {
|
|
10
10
|
errorWrapper: "_y3gn1h6o _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb",
|
|
11
|
-
errorTitle: "
|
|
11
|
+
errorTitle: "_19pku2gc",
|
|
12
12
|
teamErrorText: "_syaz1wmz _19pku2gc"
|
|
13
13
|
};
|
|
14
14
|
export var ErrorWrapper = function ErrorWrapper(props) {
|
|
@@ -18,8 +18,10 @@ export var ErrorWrapper = function ErrorWrapper(props) {
|
|
|
18
18
|
};
|
|
19
19
|
export var ErrorTitle = function ErrorTitle(props) {
|
|
20
20
|
return /*#__PURE__*/React.createElement(Box, {
|
|
21
|
-
xcss:
|
|
22
|
-
},
|
|
21
|
+
xcss: styles.errorTitle
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
23
|
+
color: "color.text"
|
|
24
|
+
}, props.children));
|
|
23
25
|
};
|
|
24
26
|
export var TeamErrorText = function TeamErrorText(props) {
|
|
25
27
|
return /*#__PURE__*/React.createElement(Box, {
|
|
@@ -7,7 +7,7 @@ import { getPageTime } from './performance';
|
|
|
7
7
|
var ANALYTICS_CHANNEL = 'peopleTeams';
|
|
8
8
|
export var PACKAGE_META_DATA = {
|
|
9
9
|
packageName: "@atlaskit/profilecard",
|
|
10
|
-
packageVersion: "
|
|
10
|
+
packageVersion: "0.0.0-development"
|
|
11
11
|
};
|
|
12
12
|
var runItLater = function runItLater(cb) {
|
|
13
13
|
var requestIdleCallback = window.requestIdleCallback;
|
|
@@ -52,7 +52,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
52
52
|
actionSubjectId: actionSubjectId,
|
|
53
53
|
attributes: _objectSpread(_objectSpread({
|
|
54
54
|
packageName: "@atlaskit/profilecard",
|
|
55
|
-
packageVersion: "
|
|
55
|
+
packageVersion: "0.0.0-development"
|
|
56
56
|
}, attributes), {}, {
|
|
57
57
|
firedAt: Math.round(getPageTime())
|
|
58
58
|
})
|
|
@@ -70,6 +70,11 @@ export var getActionSubject = function getActionSubject(type) {
|
|
|
70
70
|
return 'user';
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @private
|
|
76
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
77
|
+
*/
|
|
73
78
|
export var cardTriggered = function cardTriggered(type, method, teamId) {
|
|
74
79
|
return createEvent('ui', 'triggered', getActionSubject(type), undefined, _objectSpread({
|
|
75
80
|
method: method
|
|
@@ -77,33 +82,83 @@ export var cardTriggered = function cardTriggered(type, method, teamId) {
|
|
|
77
82
|
teamId: teamId
|
|
78
83
|
} : {}));
|
|
79
84
|
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @private
|
|
88
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
89
|
+
*/
|
|
80
90
|
export var teamRequestAnalytics = function teamRequestAnalytics(action, attributes) {
|
|
81
91
|
return createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
82
92
|
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
97
|
+
*/
|
|
83
98
|
export var userRequestAnalytics = function userRequestAnalytics(action, attributes) {
|
|
84
99
|
return createEvent('operational', action, USER_SUBJECT, 'request', attributes);
|
|
85
100
|
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @private
|
|
104
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
105
|
+
*/
|
|
86
106
|
export var profileCardRendered = function profileCardRendered(type, actionSubjectId, attributes) {
|
|
87
107
|
return createEvent('ui', 'rendered', getActionSubject(type), actionSubjectId, attributes);
|
|
88
108
|
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @private
|
|
112
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
113
|
+
*/
|
|
89
114
|
export var actionClicked = function actionClicked(type, attributes) {
|
|
90
115
|
return createEvent('ui', 'clicked', getActionSubject(type), 'action', attributes);
|
|
91
116
|
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @private
|
|
120
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
121
|
+
*/
|
|
92
122
|
export var reportingLinesClicked = function reportingLinesClicked(attributes) {
|
|
93
123
|
return createEvent('ui', 'clicked', USER_SUBJECT, 'reportingLines', attributes);
|
|
94
124
|
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @private
|
|
128
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
129
|
+
*/
|
|
95
130
|
export var moreActionsClicked = function moreActionsClicked(type, attributes) {
|
|
96
131
|
return createEvent('ui', 'clicked', getActionSubject(type), 'moreActions', attributes);
|
|
97
132
|
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @private
|
|
136
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
137
|
+
*/
|
|
98
138
|
export var teamAvatarClicked = function teamAvatarClicked(attributes) {
|
|
99
139
|
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'avatar', attributes);
|
|
100
140
|
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @private
|
|
144
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
145
|
+
*/
|
|
101
146
|
export var moreMembersClicked = function moreMembersClicked(attributes) {
|
|
102
147
|
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'moreMembers', attributes);
|
|
103
148
|
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @private
|
|
152
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
153
|
+
*/
|
|
104
154
|
export var errorRetryClicked = function errorRetryClicked(attributes) {
|
|
105
155
|
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'errorRetry', attributes);
|
|
106
156
|
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @private
|
|
160
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
161
|
+
*/
|
|
107
162
|
export var agentRequestAnalytics = function agentRequestAnalytics(action, actionSubjectId, attributes) {
|
|
108
163
|
return createEvent('operational', action, AGENT_SUBJECT, actionSubjectId || 'request', attributes);
|
|
109
164
|
};
|
|
@@ -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
|
+
};
|
|
@@ -10,5 +10,14 @@ type AgentActionsProps = {
|
|
|
10
10
|
onViewFullProfileClick: () => void;
|
|
11
11
|
resourceClient: ProfileClient;
|
|
12
12
|
};
|
|
13
|
-
export declare const AgentActions:
|
|
13
|
+
export declare const AgentActions: React.FC<{
|
|
14
|
+
agent: RovoAgentProfileCardInfo;
|
|
15
|
+
onEditAgent: () => void;
|
|
16
|
+
onCopyAgent: () => void;
|
|
17
|
+
onDuplicateAgent: () => void;
|
|
18
|
+
onDeleteAgent: () => void;
|
|
19
|
+
onChatClick: (event: React.MouseEvent) => void;
|
|
20
|
+
onViewFullProfileClick: () => void;
|
|
21
|
+
resourceClient: ProfileClient;
|
|
22
|
+
} & AgentActionsProps>;
|
|
14
23
|
export {};
|