@atlaskit/profilecard 16.6.0 → 16.8.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.
Files changed (128) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/client/TeamCentralCardClient.js +1 -1
  3. package/dist/cjs/components/User/OverflowProfileCardButtons.js +69 -0
  4. package/dist/cjs/components/User/ProfileCard.js +42 -18
  5. package/dist/cjs/i18n/cs.js +1 -0
  6. package/dist/cjs/i18n/da.js +1 -0
  7. package/dist/cjs/i18n/de.js +1 -0
  8. package/dist/cjs/i18n/en.js +1 -0
  9. package/dist/cjs/i18n/en_GB.js +1 -0
  10. package/dist/cjs/i18n/en_ZZ.js +1 -0
  11. package/dist/cjs/i18n/es.js +1 -0
  12. package/dist/cjs/i18n/fi.js +1 -0
  13. package/dist/cjs/i18n/fr.js +1 -0
  14. package/dist/cjs/i18n/hu.js +1 -0
  15. package/dist/cjs/i18n/it.js +1 -0
  16. package/dist/cjs/i18n/ja.js +1 -0
  17. package/dist/cjs/i18n/ko.js +1 -0
  18. package/dist/cjs/i18n/nb.js +1 -0
  19. package/dist/cjs/i18n/nl.js +1 -0
  20. package/dist/cjs/i18n/pl.js +1 -0
  21. package/dist/cjs/i18n/pt_BR.js +1 -0
  22. package/dist/cjs/i18n/ru.js +1 -0
  23. package/dist/cjs/i18n/sv.js +1 -0
  24. package/dist/cjs/i18n/th.js +1 -0
  25. package/dist/cjs/i18n/tr.js +1 -0
  26. package/dist/cjs/i18n/uk.js +1 -0
  27. package/dist/cjs/i18n/vi.js +1 -0
  28. package/dist/cjs/i18n/zh.js +1 -0
  29. package/dist/cjs/i18n/zh_TW.js +1 -0
  30. package/dist/cjs/messages.js +5 -0
  31. package/dist/cjs/styled/Card.js +32 -17
  32. package/dist/cjs/util/analytics.js +1 -1
  33. package/dist/cjs/version.json +1 -1
  34. package/dist/es2019/client/TeamCentralCardClient.js +1 -1
  35. package/dist/es2019/components/User/OverflowProfileCardButtons.js +33 -0
  36. package/dist/es2019/components/User/ProfileCard.js +34 -17
  37. package/dist/es2019/i18n/cs.js +1 -0
  38. package/dist/es2019/i18n/da.js +1 -0
  39. package/dist/es2019/i18n/de.js +1 -0
  40. package/dist/es2019/i18n/en.js +1 -0
  41. package/dist/es2019/i18n/en_GB.js +1 -0
  42. package/dist/es2019/i18n/en_ZZ.js +1 -0
  43. package/dist/es2019/i18n/es.js +1 -0
  44. package/dist/es2019/i18n/fi.js +1 -0
  45. package/dist/es2019/i18n/fr.js +1 -0
  46. package/dist/es2019/i18n/hu.js +1 -0
  47. package/dist/es2019/i18n/it.js +1 -0
  48. package/dist/es2019/i18n/ja.js +1 -0
  49. package/dist/es2019/i18n/ko.js +1 -0
  50. package/dist/es2019/i18n/nb.js +1 -0
  51. package/dist/es2019/i18n/nl.js +1 -0
  52. package/dist/es2019/i18n/pl.js +1 -0
  53. package/dist/es2019/i18n/pt_BR.js +1 -0
  54. package/dist/es2019/i18n/ru.js +1 -0
  55. package/dist/es2019/i18n/sv.js +1 -0
  56. package/dist/es2019/i18n/th.js +1 -0
  57. package/dist/es2019/i18n/tr.js +1 -0
  58. package/dist/es2019/i18n/uk.js +1 -0
  59. package/dist/es2019/i18n/vi.js +1 -0
  60. package/dist/es2019/i18n/zh.js +1 -0
  61. package/dist/es2019/i18n/zh_TW.js +1 -0
  62. package/dist/es2019/messages.js +5 -0
  63. package/dist/es2019/styled/Card.js +43 -1
  64. package/dist/es2019/util/analytics.js +1 -1
  65. package/dist/es2019/version.json +1 -1
  66. package/dist/esm/client/TeamCentralCardClient.js +1 -1
  67. package/dist/esm/components/User/OverflowProfileCardButtons.js +43 -0
  68. package/dist/esm/components/User/ProfileCard.js +41 -19
  69. package/dist/esm/i18n/cs.js +1 -0
  70. package/dist/esm/i18n/da.js +1 -0
  71. package/dist/esm/i18n/de.js +1 -0
  72. package/dist/esm/i18n/en.js +1 -0
  73. package/dist/esm/i18n/en_GB.js +1 -0
  74. package/dist/esm/i18n/en_ZZ.js +1 -0
  75. package/dist/esm/i18n/es.js +1 -0
  76. package/dist/esm/i18n/fi.js +1 -0
  77. package/dist/esm/i18n/fr.js +1 -0
  78. package/dist/esm/i18n/hu.js +1 -0
  79. package/dist/esm/i18n/it.js +1 -0
  80. package/dist/esm/i18n/ja.js +1 -0
  81. package/dist/esm/i18n/ko.js +1 -0
  82. package/dist/esm/i18n/nb.js +1 -0
  83. package/dist/esm/i18n/nl.js +1 -0
  84. package/dist/esm/i18n/pl.js +1 -0
  85. package/dist/esm/i18n/pt_BR.js +1 -0
  86. package/dist/esm/i18n/ru.js +1 -0
  87. package/dist/esm/i18n/sv.js +1 -0
  88. package/dist/esm/i18n/th.js +1 -0
  89. package/dist/esm/i18n/tr.js +1 -0
  90. package/dist/esm/i18n/uk.js +1 -0
  91. package/dist/esm/i18n/vi.js +1 -0
  92. package/dist/esm/i18n/zh.js +1 -0
  93. package/dist/esm/i18n/zh_TW.js +1 -0
  94. package/dist/esm/messages.js +5 -0
  95. package/dist/esm/styled/Card.js +22 -17
  96. package/dist/esm/util/analytics.js +1 -1
  97. package/dist/esm/version.json +1 -1
  98. package/dist/types/client/TeamCentralCardClient.d.ts +1 -1
  99. package/dist/types/components/User/OverflowProfileCardButtons.d.ts +8 -0
  100. package/dist/types/components/User/ProfileCard.d.ts +2 -0
  101. package/dist/types/i18n/cs.d.ts +1 -0
  102. package/dist/types/i18n/da.d.ts +1 -0
  103. package/dist/types/i18n/de.d.ts +1 -0
  104. package/dist/types/i18n/en.d.ts +1 -0
  105. package/dist/types/i18n/en_GB.d.ts +1 -0
  106. package/dist/types/i18n/en_ZZ.d.ts +1 -0
  107. package/dist/types/i18n/es.d.ts +1 -0
  108. package/dist/types/i18n/fi.d.ts +1 -0
  109. package/dist/types/i18n/fr.d.ts +1 -0
  110. package/dist/types/i18n/hu.d.ts +1 -0
  111. package/dist/types/i18n/it.d.ts +1 -0
  112. package/dist/types/i18n/ja.d.ts +1 -0
  113. package/dist/types/i18n/ko.d.ts +1 -0
  114. package/dist/types/i18n/nb.d.ts +1 -0
  115. package/dist/types/i18n/nl.d.ts +1 -0
  116. package/dist/types/i18n/pl.d.ts +1 -0
  117. package/dist/types/i18n/pt_BR.d.ts +1 -0
  118. package/dist/types/i18n/ru.d.ts +1 -0
  119. package/dist/types/i18n/sv.d.ts +1 -0
  120. package/dist/types/i18n/th.d.ts +1 -0
  121. package/dist/types/i18n/tr.d.ts +1 -0
  122. package/dist/types/i18n/uk.d.ts +1 -0
  123. package/dist/types/i18n/vi.d.ts +1 -0
  124. package/dist/types/i18n/zh.d.ts +1 -0
  125. package/dist/types/i18n/zh_TW.d.ts +1 -0
  126. package/dist/types/messages.d.ts +5 -0
  127. package/dist/types/styled/Card.d.ts +3 -0
  128. package/package.json +2 -1
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.6.0"
3
+ "version": "16.8.0"
4
4
  }
@@ -42,7 +42,7 @@ const buildCheckFeatureFlagQuery = (featureKey, context) => ({
42
42
  `,
43
43
  variables: {
44
44
  featureKey,
45
- context
45
+ context: context || []
46
46
  }
47
47
  });
48
48
 
@@ -0,0 +1,33 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import { useIntl } from 'react-intl-next';
4
+ import Button from '@atlaskit/button/custom-theme-button';
5
+ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
6
+ import MoreIcon from '@atlaskit/icon/glyph/more';
7
+ import messages from '../../messages';
8
+ import { OverflowActionButtonsWrapper } from '../../styled/Card';
9
+ export const OverflowProfileCardButtons = props => {
10
+ const intl = useIntl();
11
+ return /*#__PURE__*/React.createElement(OverflowActionButtonsWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
12
+ placement: 'bottom-end',
13
+ trigger: ({
14
+ triggerRef,
15
+ isSelected,
16
+ testId,
17
+ ...providedProps
18
+ }) => /*#__PURE__*/React.createElement(Button, _extends({
19
+ type: "button"
20
+ }, providedProps, {
21
+ ref: triggerRef,
22
+ iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
23
+ label: intl.formatMessage(messages.profileCardMoreIconLabel)
24
+ })
25
+ }))
26
+ }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, props.actions.map(action => /*#__PURE__*/React.createElement(DropdownItem, {
27
+ key: action.id,
28
+ onClick: (event, ...args) => {
29
+ props.onItemClick(action, args, event);
30
+ },
31
+ href: action.link
32
+ }, action.label)))));
33
+ };
@@ -11,15 +11,18 @@ import { token } from '@atlaskit/tokens';
11
11
  import { AnalyticsName } from '../../internal/analytics';
12
12
  import relativeDate from '../../internal/relative-date';
13
13
  import messages from '../../messages';
14
- import { ActionButtonGroup, ActionsFlexSpacer, AppTitleLabel, CardContainer, CardContent, CardWrapper, CustomLozengeContainer, DetailsGroup, DisabledInfo, FullNameLabel, JobTitleLabel, LozengeWrapper, ProfileImage, SpinnerContainer } from '../../styled/Card';
14
+ import { ActionButtonGroup, ActionsFlexSpacer, AnimatedKudosButton, AppTitleLabel, CardContainer, CardContent, CardWrapper, CustomLozengeContainer, DetailsGroup, DisabledInfo, FullNameLabel, JobTitleLabel, KudosBlobAnimation, LozengeWrapper, ProfileImage, SpinnerContainer } from '../../styled/Card';
15
15
  import { isBasicClick } from '../../util/click';
16
16
  import { ErrorMessage } from '../Error';
17
17
  import { IconLabel } from '../Icon';
18
+ import { OverflowProfileCardButtons } from './OverflowProfileCardButtons';
18
19
  import ReportingLinesDetails from './ReportingLinesDetails';
19
20
  export default class Profilecard extends React.PureComponent {
20
21
  constructor(props) {
21
22
  super(props);
22
23
 
24
+ _defineProperty(this, "GIVE_KUDOS_ACTION_ID", 'give-kudos');
25
+
23
26
  _defineProperty(this, "durationSince", from => {
24
27
  const fromParsed = from || 0;
25
28
  return fromParsed > 0 ? Date.now() - fromParsed : null;
@@ -52,22 +55,19 @@ export default class Profilecard extends React.PureComponent {
52
55
  });
53
56
 
54
57
  _defineProperty(this, "renderButton", (action, idx) => {
55
- return /*#__PURE__*/React.createElement(Button, {
56
- appearance: idx === 0 ? 'default' : 'subtle',
58
+ const isGiveKudosActionButton = action.id === this.GIVE_KUDOS_ACTION_ID;
59
+ const actionButton = /*#__PURE__*/React.createElement(Button, {
60
+ appearance: "default",
57
61
  key: action.id || idx,
58
- onClick: (event, ...args) => {
59
- this.callAnalytics(AnalyticsName.PROFILE_CARD_CLICK, {
60
- id: action.id || null,
61
- duration: this.durationSince(this.timeOpen)
62
- });
63
-
64
- if (action.callback && isBasicClick(event)) {
65
- event.preventDefault();
66
- action.callback(event, ...args);
67
- }
68
- },
62
+ onClick: (event, ...args) => this.onActionClick(action, args, event),
69
63
  href: action.link
70
- }, action.label);
64
+ }, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(KudosBlobAnimation, null));
65
+
66
+ if (isGiveKudosActionButton) {
67
+ return /*#__PURE__*/React.createElement(AnimatedKudosButton, null, actionButton);
68
+ }
69
+
70
+ return actionButton;
71
71
  });
72
72
 
73
73
  this.timeOpen = null;
@@ -96,7 +96,7 @@ export default class Profilecard extends React.PureComponent {
96
96
  if (!this.props.isCurrentUser && this.props.isKudosEnabled) {
97
97
  const kudosAction = {
98
98
  label: /*#__PURE__*/React.createElement(FormattedMessage, messages.giveKudosButton),
99
- id: 'give-kudos',
99
+ id: this.GIVE_KUDOS_ACTION_ID,
100
100
  callback: () => {
101
101
  this.kudosButtonCallback();
102
102
  },
@@ -114,7 +114,24 @@ export default class Profilecard extends React.PureComponent {
114
114
  }
115
115
 
116
116
  const actions = this.getActions();
117
- return /*#__PURE__*/React.createElement(ActionButtonGroup, null, actions.map((action, idx) => this.renderButton(action, idx)));
117
+ const firstTwoActions = actions.slice(0, 2);
118
+ const restOfActions = actions && actions.length > 2 ? actions.slice(2) : undefined;
119
+ return /*#__PURE__*/React.createElement(ActionButtonGroup, null, firstTwoActions.map((action, idx) => this.renderButton(action, idx)), restOfActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, {
120
+ actions: restOfActions,
121
+ onItemClick: (action, args, event) => this.onActionClick(action, args, event)
122
+ }));
123
+ }
124
+
125
+ onActionClick(action, args, event) {
126
+ this.callAnalytics(AnalyticsName.PROFILE_CARD_CLICK, {
127
+ id: action.id || null,
128
+ duration: this.durationSince(this.timeOpen)
129
+ });
130
+
131
+ if (action.callback && isBasicClick(event)) {
132
+ event.preventDefault();
133
+ action.callback(event, ...args);
134
+ }
118
135
  }
119
136
 
120
137
  renderCardDetailsDefault() {
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Účet uživatele byl smazán.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Bývalý uživatel',
18
18
  'pt.profile-card.general.msg.disabled.user': 'S touto osobou již nemůžete spolupracovat.',
19
+ 'pt.profile-card.give-kudos': 'Pogratulovat',
19
20
  'pt.profile-card.inactive.account': 'Deaktivovaný účet',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Účet uživatele je deaktivovaný již několik měsíců.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Účet uživatele byl deaktivován minulý měsíc.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Personens konto er blevet slettet.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Forhenværende bruger',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Du kan ikke længere samarbejde med denne person.',
19
+ 'pt.profile-card.give-kudos': 'Giv ros',
19
20
  'pt.profile-card.inactive.account': 'Konto deaktiveret',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Personens konto har været deaktiveret i nogle måneder.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Personens konto blev deaktiveret i sidste måned.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Das Konto dieser Person wurde gelöscht.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Ehemaliger Benutzer',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Sie können mit dieser Person nicht mehr zusammenarbeiten.',
19
+ 'pt.profile-card.give-kudos': 'Loben',
19
20
  'pt.profile-card.inactive.account': 'Konto deaktiviert',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Das Konto dieser Person wurde vor wenigen Monaten gelöscht.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Das Konto dieser Person wurde letzten Monat deaktiviert.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Their account has been deleted.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Former user',
18
18
  'pt.profile-card.general.msg.disabled.user': 'You can no longer collaborate with this person.',
19
+ 'pt.profile-card.give-kudos': 'Give kudos',
19
20
  'pt.profile-card.inactive.account': 'Account deactivated',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Their account has been deactivated for a few months.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Their account was deactivated last month.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Their account has been deleted.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Former user',
18
18
  'pt.profile-card.general.msg.disabled.user': 'You can no longer collaborate with this person.',
19
+ 'pt.profile-card.give-kudos': 'Give kudos',
19
20
  'pt.profile-card.inactive.account': 'Account deactivated',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Their account has been deactivated for a few months.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Their account was deactivated last month.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': '⁣⁢Their account has been deleted.‌؜⁠⁡‌‌‌‌⁡⁡‌؜؜؜⁠⁣⁤',
17
17
  'pt.profile-card.disabled.account.default.name': '⁣⁢Former user‍‌⁠⁡‍⁡‌‌‍⁡⁣⁤',
18
18
  'pt.profile-card.general.msg.disabled.user': '⁣⁢You can no longer collaborate with this person.⁠⁠⁡؜⁠⁠⁣⁤',
19
+ 'pt.profile-card.give-kudos': '⁣⁢Give kudos‌⁡‍‌‍‌⁠؜‍؜؜⁣⁤',
19
20
  'pt.profile-card.inactive.account': '⁣⁢Account deactivated‍؜⁡⁠‌؜‍⁡⁣⁤',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': '⁣⁢Their account has been deactivated for a few months.‌‌⁡⁠⁡⁠؜⁣⁤',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': '⁣⁢Their account was deactivated last month.‌‍‍⁠‍⁡؜‌⁡⁡⁠⁣⁤',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Su cuenta está eliminada.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Antiguo usuario',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Ya no puedes colaborar con esta persona.',
19
+ 'pt.profile-card.give-kudos': 'Felicitar',
19
20
  'pt.profile-card.inactive.account': 'Cuenta desactivada',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Su cuenta se desactivó hace algunos meses.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Su cuenta se desactivó el mes pasado.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Hänen tilinsä on poistettu.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Entinen käyttäjä',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Et voi enää tehdä yhteistyötä tämän henkilön kanssa.',
19
+ 'pt.profile-card.give-kudos': 'Anna kehuja',
19
20
  'pt.profile-card.inactive.account': 'Tili poistettu käytöstä',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Hänen tilinsä on ollut poissa käytöstä muutaman kuukauden ajan.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Hänen tilinsä poistettiin käytöstä viime kuussa.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Son compte a été supprimé.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Ancien utilisateur',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Vous ne pouvez plus collaborer avec cette personne.',
19
+ 'pt.profile-card.give-kudos': 'Féliciter',
19
20
  'pt.profile-card.inactive.account': 'Compte désactivé',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Son compte a été désactivé il y a quelques mois.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Son compte a été désactivé le mois dernier.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'A fiókját töröltük.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Korábbi felhasználó',
18
18
  'pt.profile-card.general.msg.disabled.user': 'A továbbiakban nem működhet együtt ezzel a személlyel.',
19
+ 'pt.profile-card.give-kudos': 'Dicséret',
19
20
  'pt.profile-card.inactive.account': 'A fiók inaktiválva.',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'A fiókját néhány hónapja inaktiváltuk.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'A fiókját a múlt hónapban inaktiváltuk.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Il suo account è stato eliminato.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Ex utente',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Non puoi più collaborare con questa persona.',
19
+ 'pt.profile-card.give-kudos': 'Complimentati',
19
20
  'pt.profile-card.inactive.account': 'Account disattivato',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Il suo account è disattivato da qualche mese.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Il suo account è stato disattivato il mese scorso.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'アカウントは削除されています。',
17
17
  'pt.profile-card.disabled.account.default.name': '元ユーザー',
18
18
  'pt.profile-card.general.msg.disabled.user': 'もうこの人とコラボレーションすることはできません。',
19
+ 'pt.profile-card.give-kudos': '賞賛を送る',
19
20
  'pt.profile-card.inactive.account': '無効なアカウント',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'アカウントは 2〜3 か月前に無効になりました。',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'アカウントは先月無効になりました。',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': '계정이 삭제되었습니다.',
17
17
  'pt.profile-card.disabled.account.default.name': '이전 사용자',
18
18
  'pt.profile-card.general.msg.disabled.user': '더 이상 이 사람과 협업할 수 없습니다.',
19
+ 'pt.profile-card.give-kudos': '칭찬하기',
19
20
  'pt.profile-card.inactive.account': '계정이 비활성화됨',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': '계정이 몇 달 전에 비활성화되었습니다.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': '계정이 지난달에 비활성화되었습니다.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Vedkommendes konto er slettet.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Tidligere bruker',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Du kan ikke lenger samarbeide med denne personen.',
19
+ 'pt.profile-card.give-kudos': 'Gi kudos',
19
20
  'pt.profile-card.inactive.account': 'Kontoen er deaktivert',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Vedkommendes konto har vært deaktivert i noen måneder.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Vedkommendes konto ble deaktivert denne måneden.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Zijn/haar account is verwijderd.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Voormalige gebruiker',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Je kunt niet meer samenwerken met deze persoon.',
19
+ 'pt.profile-card.give-kudos': 'Geef kudos',
19
20
  'pt.profile-card.inactive.account': 'Account gedeactiveerd',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Zijn/haar account is al een paar maanden gedeactiveerd.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Zijn/haar account is vorige maand gedeactiveerd.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Jej konto zostało usunięte.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Były użytkownik',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Nie możesz już współpracować z tą osobą.',
19
+ 'pt.profile-card.give-kudos': 'Przekaż wyrazy uznania',
19
20
  'pt.profile-card.inactive.account': 'Konto zdezaktywowane',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Jej konto zostało zdezaktywowane przynajmniej kilka miesięcy temu.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Jej konto zdezaktywowane w zeszłym miesiącu.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'A conta do usuário foi excluída.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Ex-usuário',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Você não pode mais colaborar com essa pessoa.',
19
+ 'pt.profile-card.give-kudos': 'Envie elogios',
19
20
  'pt.profile-card.inactive.account': 'Conta desativada',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'A conta do usuário foi desativada há alguns meses.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'A conta do usuário foi desativada no mês passado.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Его аккаунт был удален.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Бывший пользователь',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Вы больше не можете работать с этим пользователем.',
19
+ 'pt.profile-card.give-kudos': 'Похвалить',
19
20
  'pt.profile-card.inactive.account': 'Аккаунт отключен',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Его аккаунт был отключен несколько месяцев назад.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Его аккаунт был отключен в прошлом месяце.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Personens konto har tagits bort.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Före detta användare',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Du kan inte längre samarbeta med den här personen.',
19
+ 'pt.profile-card.give-kudos': 'Ge beröm',
19
20
  'pt.profile-card.inactive.account': 'Kontot är inaktiverat',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Personens konto har varit inaktiverat i några få månader.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Personens konto inaktiverades förra månaden.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'บัญชีของผู้ใช้ถูกลบไปแล้ว',
17
17
  'pt.profile-card.disabled.account.default.name': 'ผู้ใช้เดิม',
18
18
  'pt.profile-card.general.msg.disabled.user': 'คุณไม่สามารถทำงานร่วมกับบุคคลนี้ได้อีก',
19
+ 'pt.profile-card.give-kudos': 'แสดงความชื่นชม',
19
20
  'pt.profile-card.inactive.account': 'ปิดใช้งานบัญชีแล้ว',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'บัญชีของผู้ใช้ถูกปิดใช้งานไปแล้วไม่กี่เดือน',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'บัญชีของผู้ใช้ถูกปิดใช้งานไปเมื่อเดือนที่แล้ว',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Bu kullanıcının hesabı silindi.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Eski kullanıcı',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Artık bu kişiyle iş birliği yapamazsınız.',
19
+ 'pt.profile-card.give-kudos': 'Tebrik edin',
19
20
  'pt.profile-card.inactive.account': 'Hesap devre dışı bırakıldı',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Bu kullanıcının hesabı birkaç ay önce devre dışı bırakıldı.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Bu kullanıcının hesabı geçen ay devre dışı bırakıldı.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Обліковий запис користувача видалено.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Колишній користувач',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Ви більше не можете співпрацювати з цим користувачем.',
19
+ 'pt.profile-card.give-kudos': 'Похвалити',
19
20
  'pt.profile-card.inactive.account': 'Обліковий запис деактивовано',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Обліковий запис користувача деактивовано кілька місяців тому.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Обліковий запис користувача деактивовано минулого місяця.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': 'Tài khoản của họ đã bị xóa.',
17
17
  'pt.profile-card.disabled.account.default.name': 'Người dùng cũ',
18
18
  'pt.profile-card.general.msg.disabled.user': 'Bạn không thể hợp tác với người này được nữa.',
19
+ 'pt.profile-card.give-kudos': 'Khen ngợi',
19
20
  'pt.profile-card.inactive.account': 'Tài khoản đã bị hủy kích hoạt',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': 'Tài khoản của họ đã bị hủy kích hoạt một vài tháng.',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': 'Tài khoản của họ đã bị hủy kích hoạt tháng trước.',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': '他们的帐户已被删除。',
17
17
  'pt.profile-card.disabled.account.default.name': '前用户',
18
18
  'pt.profile-card.general.msg.disabled.user': '您无法再与此人合作。',
19
+ 'pt.profile-card.give-kudos': '给予称赞',
19
20
  'pt.profile-card.inactive.account': '帐户已停用',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': '他们的帐户已被停用数月。',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': '他们的帐户上月已被停用。',
@@ -16,6 +16,7 @@ export default {
16
16
  'pt.profile-card.closed.account.no.date': '其帳戶已刪除。',
17
17
  'pt.profile-card.disabled.account.default.name': '舊使用者',
18
18
  'pt.profile-card.general.msg.disabled.user': '您無法再與此人員合作。',
19
+ 'pt.profile-card.give-kudos': '給予讚美',
19
20
  'pt.profile-card.inactive.account': '帳戶已停用',
20
21
  'pt.profile-card.inactive.account.has.date.a.few.months': '其帳戶已停用幾個月了。',
21
22
  'pt.profile-card.inactive.account.has.date.last.month': '其帳戶在上個月已停用。',
@@ -144,6 +144,11 @@ const messages = defineMessages({
144
144
  id: 'pt.profile-card.give-kudos',
145
145
  defaultMessage: 'Give kudos',
146
146
  description: 'Title for the button on the profile card for a user to give a kudos'
147
+ },
148
+ profileCardMoreIconLabel: {
149
+ id: 'pt.profile-card.more-icon-label',
150
+ defaultMessage: 'More',
151
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
147
152
  }
148
153
  });
149
154
  export default messages;
@@ -1,5 +1,6 @@
1
- import styled, { css } from 'styled-components';
1
+ import styled, { css, keyframes } from 'styled-components';
2
2
  import { borderRadius, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
3
+ import { token } from '@atlaskit/tokens';
3
4
  import { appLabelBgColor, appLabelTextColor, bgColor, boxShadow, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from '../styled/constants';
4
5
 
5
6
  const getFullNameMargin = props => props.noMeta ? `${gridSize() * 4.5}px 0 ${gridSize() * 1.5}px 0` : `${gridSize() * 1.5}px 0 0 0`;
@@ -18,10 +19,44 @@ export const ProfileImage = styled.div`
18
19
  export const ActionsFlexSpacer = styled.div`
19
20
  flex: 1 0 auto;
20
21
  `;
22
+ const kudosButtonAnimationTransformation = keyframes`{
23
+ 0% { transform: translate(-80px, -50px); }
24
+ 100% { transform: translate(90px, -70px); }
25
+ }`;
26
+ export const KudosBlobAnimation = styled.div`
27
+ display: none;
28
+ height: 150px;
29
+ width: 150px;
30
+ z-index: -1;
31
+ position: absolute;
32
+ animation-name: ${kudosButtonAnimationTransformation};
33
+ animation-iteration-count: 1;
34
+ animation-duration: 3s;
35
+ background-image: radial-gradient(
36
+ circle,
37
+ ${token('color.background.information.pressed', '#85B8FF')} 0%,
38
+ ${token('color.background.discovery.pressed', '#B8ACF6')} 25%,
39
+ transparent 50%
40
+ );
41
+ overflow: hidden;
42
+ `;
43
+ export const AnimatedKudosButton = styled.div`
44
+ margin-left: ${gridSize}px;
45
+ &:hover ${KudosBlobAnimation} {
46
+ display: block;
47
+ }
48
+
49
+ button,
50
+ a {
51
+ clip-path: inset(0px 0px 0px 0px round ${borderRadius}px);
52
+ }
53
+ `;
21
54
  export const ActionButtonGroup = styled.div`
22
55
  user-select: none;
23
56
  margin: ${2 * gridSize()}px 0 0 0;
24
57
  text-align: right;
58
+ display: flex;
59
+ justify-content: flex-end;
25
60
 
26
61
  button,
27
62
  a,
@@ -33,6 +68,12 @@ export const ActionButtonGroup = styled.div`
33
68
  }
34
69
  }
35
70
  `;
71
+ export const OverflowActionButtonsWrapper = styled.div`
72
+ display: inline-block;
73
+ width: 32px;
74
+ height: 32px;
75
+ margin-left: ${gridSize}px;
76
+ `;
36
77
  export const CardContent = styled.div`
37
78
  display: flex;
38
79
  flex-direction: column;
@@ -133,6 +174,7 @@ export const CardContainer = styled.div`
133
174
  border-radius: ${borderRadius}px;
134
175
  `;
135
176
  }}
177
+ overflow: hidden;
136
178
  `;
137
179
  export const DetailsLabel = styled.div`
138
180
  display: flex;
@@ -35,7 +35,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
35
35
  actionSubjectId,
36
36
  attributes: {
37
37
  packageName: "@atlaskit/profilecard",
38
- packageVersion: "16.6.0",
38
+ packageVersion: "16.8.0",
39
39
  ...attributes,
40
40
  firedAt: getPageTime()
41
41
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.6.0"
3
+ "version": "16.8.0"
4
4
  }
@@ -27,7 +27,7 @@ var buildCheckFeatureFlagQuery = function buildCheckFeatureFlagQuery(featureKey,
27
27
  query: "\n query isFeatureKeyEnabled($featureKey: String!, $context: [IsFeatureEnabledContextInput]) {\n isFeatureEnabled(featureKey: $featureKey, context: $context) {\n enabled\n }\n }\n ",
28
28
  variables: {
29
29
  featureKey: featureKey,
30
- context: context
30
+ context: context || []
31
31
  }
32
32
  };
33
33
  };
@@ -0,0 +1,43 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["triggerRef", "isSelected", "testId"];
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import Button from '@atlaskit/button/custom-theme-button';
7
+ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
8
+ import MoreIcon from '@atlaskit/icon/glyph/more';
9
+ import messages from '../../messages';
10
+ import { OverflowActionButtonsWrapper } from '../../styled/Card';
11
+ export var OverflowProfileCardButtons = function OverflowProfileCardButtons(props) {
12
+ var intl = useIntl();
13
+ return /*#__PURE__*/React.createElement(OverflowActionButtonsWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
14
+ placement: 'bottom-end',
15
+ trigger: function trigger(_ref) {
16
+ var triggerRef = _ref.triggerRef,
17
+ isSelected = _ref.isSelected,
18
+ testId = _ref.testId,
19
+ providedProps = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return /*#__PURE__*/React.createElement(Button, _extends({
22
+ type: "button"
23
+ }, providedProps, {
24
+ ref: triggerRef,
25
+ iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
26
+ label: intl.formatMessage(messages.profileCardMoreIconLabel)
27
+ })
28
+ }));
29
+ }
30
+ }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, props.actions.map(function (action) {
31
+ return /*#__PURE__*/React.createElement(DropdownItem, {
32
+ key: action.id,
33
+ onClick: function onClick(event) {
34
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
35
+ args[_key - 1] = arguments[_key];
36
+ }
37
+
38
+ props.onItemClick(action, args, event);
39
+ },
40
+ href: action.link
41
+ }, action.label);
42
+ }))));
43
+ };