@atlaskit/profilecard 19.12.0 → 19.14.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 (82) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  3. package/dist/cjs/components/Team/TeamProfileCard.js +1 -2
  4. package/dist/cjs/components/Team/TeamProfileCardTrigger.js +10 -5
  5. package/dist/cjs/components/User/ProfileCardTrigger.js +7 -4
  6. package/dist/cjs/components/User/ProfileCardTriggerNext.js +1 -2
  7. package/dist/cjs/styled/Card.js +50 -5
  8. package/dist/cjs/styled/Error.js +9 -0
  9. package/dist/cjs/styled/ReportingLines.js +9 -0
  10. package/dist/cjs/styled/TeamCard.js +28 -1
  11. package/dist/cjs/util/analytics.js +1 -1
  12. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  13. package/dist/es2019/components/Team/TeamProfileCard.js +1 -2
  14. package/dist/es2019/components/Team/TeamProfileCardTrigger.js +10 -5
  15. package/dist/es2019/components/User/ProfileCardTrigger.js +7 -4
  16. package/dist/es2019/components/User/ProfileCardTriggerNext.js +1 -2
  17. package/dist/es2019/styled/Card.js +47 -3
  18. package/dist/es2019/styled/Error.js +10 -0
  19. package/dist/es2019/styled/ReportingLines.js +10 -0
  20. package/dist/es2019/styled/TeamCard.js +29 -1
  21. package/dist/es2019/util/analytics.js +1 -1
  22. package/dist/esm/client/getTeamFromAGG.js +1 -1
  23. package/dist/esm/components/Team/TeamProfileCard.js +1 -2
  24. package/dist/esm/components/Team/TeamProfileCardTrigger.js +10 -5
  25. package/dist/esm/components/User/ProfileCardTrigger.js +7 -4
  26. package/dist/esm/components/User/ProfileCardTriggerNext.js +1 -2
  27. package/dist/esm/styled/Card.js +50 -5
  28. package/dist/esm/styled/Error.js +10 -0
  29. package/dist/esm/styled/ReportingLines.js +10 -0
  30. package/dist/esm/styled/TeamCard.js +29 -1
  31. package/dist/esm/util/analytics.js +1 -1
  32. package/dist/types/client/ProfileCardClient.d.ts +2 -2
  33. package/dist/types/client/TeamCentralCardClient.d.ts +1 -1
  34. package/dist/types/client/TeamProfileCardClient.d.ts +1 -1
  35. package/dist/types/client/UserProfileCardClient.d.ts +2 -2
  36. package/dist/types/client/errorUtils.d.ts +1 -1
  37. package/dist/types/components/Error/ErrorMessage.d.ts +2 -2
  38. package/dist/types/components/Team/TeamForbiddenErrorState.d.ts +1 -1
  39. package/dist/types/components/Team/TeamLoadingState.d.ts +1 -1
  40. package/dist/types/components/User/OverflowProfileCardButtons.d.ts +1 -1
  41. package/dist/types/components/User/ProfileCard.d.ts +1 -1
  42. package/dist/types/components/User/ProfileCardDetails.d.ts +1 -1
  43. package/dist/types/components/User/ProfileCardResourced.d.ts +2 -2
  44. package/dist/types/components/User/ReportingLinesDetails.d.ts +1 -1
  45. package/dist/types/components/User/UserLoadingState.d.ts +1 -1
  46. package/dist/types/internal/filterActions.d.ts +1 -1
  47. package/dist/types/internal/getLabelMessage.d.ts +1 -1
  48. package/dist/types/internal/relative-date.d.ts +1 -1
  49. package/dist/types/mocks/mock-team-client.d.ts +1 -1
  50. package/dist/types/mocks/reporting-lines-data.d.ts +1 -1
  51. package/dist/types/mocks/simple-mock-clients.d.ts +1 -1
  52. package/dist/types/mocks/team-data.d.ts +1 -1
  53. package/dist/types/types.d.ts +12 -6
  54. package/dist/types/util/analytics.d.ts +2 -2
  55. package/dist/types/util/click.d.ts +1 -1
  56. package/dist/types/util/withOuterListeners.d.ts +1 -1
  57. package/dist/types-ts4.5/client/ProfileCardClient.d.ts +2 -2
  58. package/dist/types-ts4.5/client/TeamCentralCardClient.d.ts +1 -1
  59. package/dist/types-ts4.5/client/TeamProfileCardClient.d.ts +1 -1
  60. package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +2 -2
  61. package/dist/types-ts4.5/client/errorUtils.d.ts +1 -1
  62. package/dist/types-ts4.5/components/Error/ErrorMessage.d.ts +2 -2
  63. package/dist/types-ts4.5/components/Team/TeamForbiddenErrorState.d.ts +1 -1
  64. package/dist/types-ts4.5/components/Team/TeamLoadingState.d.ts +1 -1
  65. package/dist/types-ts4.5/components/User/OverflowProfileCardButtons.d.ts +1 -1
  66. package/dist/types-ts4.5/components/User/ProfileCard.d.ts +1 -1
  67. package/dist/types-ts4.5/components/User/ProfileCardDetails.d.ts +1 -1
  68. package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +2 -2
  69. package/dist/types-ts4.5/components/User/ReportingLinesDetails.d.ts +1 -1
  70. package/dist/types-ts4.5/components/User/UserLoadingState.d.ts +1 -1
  71. package/dist/types-ts4.5/internal/filterActions.d.ts +1 -1
  72. package/dist/types-ts4.5/internal/getLabelMessage.d.ts +1 -1
  73. package/dist/types-ts4.5/internal/relative-date.d.ts +1 -1
  74. package/dist/types-ts4.5/mocks/mock-team-client.d.ts +1 -1
  75. package/dist/types-ts4.5/mocks/reporting-lines-data.d.ts +1 -1
  76. package/dist/types-ts4.5/mocks/simple-mock-clients.d.ts +1 -1
  77. package/dist/types-ts4.5/mocks/team-data.d.ts +1 -1
  78. package/dist/types-ts4.5/types.d.ts +12 -6
  79. package/dist/types-ts4.5/util/analytics.d.ts +2 -2
  80. package/dist/types-ts4.5/util/click.d.ts +1 -1
  81. package/dist/types-ts4.5/util/withOuterListeners.d.ts +1 -1
  82. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 19.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#102379](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102379)
8
+ [`d8643ec13c0c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d8643ec13c0c) -
9
+ Added displayConfig prop, it has showKudos to control whether to show kudos.
10
+
11
+ ## 19.13.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#99727](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99727)
16
+ [`80b09c8a9a96`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80b09c8a9a96) -
17
+ hot-109153 Revert the changes PR#98596
18
+
3
19
  ## 19.12.0
4
20
 
5
21
  ### Minor Changes
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "19.12.0");
60
+ headers.append('atl-client-version', "19.14.0");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -188,8 +188,7 @@ var ExtraActions = function ExtraActions(_ref3) {
188
188
  })
189
189
  }));
190
190
  },
191
- zIndex: _constants.layers.modal(),
192
- shouldRenderToParent: true
191
+ zIndex: _constants.layers.modal()
193
192
  }));
194
193
  };
195
194
  var ButtonSection = function ButtonSection(_ref4) {
@@ -182,10 +182,11 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
182
182
  isLoading: true,
183
183
  data: null
184
184
  }, function () {
185
+ var _this$props$displayCo;
185
186
  var fireEvent = function fireEvent(event) {
186
187
  _this.fireAnalytics(event);
187
188
  };
188
- var requests = Promise.all([_this.props.resourceClient.getTeamProfile(teamId, orgId, fireEvent), _this.props.resourceClient.shouldShowGiveKudos()]);
189
+ var requests = Promise.all([_this.props.resourceClient.getTeamProfile(teamId, orgId, fireEvent), (_this$props$displayCo = _this.props.displayConfig) !== null && _this$props$displayCo !== void 0 && _this$props$displayCo.showKudos ? _this.props.resourceClient.shouldShowGiveKudos() : Promise.resolve(false)]);
189
190
  requests.then(function (res) {
190
191
  var _this2;
191
192
  return (_this2 = _this).handleClientSuccess.apply(_this2, (0, _toConsumableArray2.default)(res));
@@ -264,7 +265,9 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
264
265
  }, triggerProps, _this.triggerListeners), children));
265
266
  }
266
267
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, _this.renderKudosLauncher(), /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({
267
- "data-testid": "team-profilecard-trigger-wrapper",
268
+ "data-testid": "team-profilecard-trigger-wrapper"
269
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
270
+ ,
268
271
  style: {
269
272
  color: 'initial',
270
273
  textDecoration: 'none'
@@ -367,8 +370,7 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
367
370
  },
368
371
  zIndex: _constants.layers.modal(),
369
372
  shouldFlip: true,
370
- autoFocus: this.props.trigger !== 'hover' && !this.openedByHover,
371
- shouldRenderToParent: true
373
+ autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
372
374
  }));
373
375
  }
374
376
  }, {
@@ -387,6 +389,9 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
387
389
  actions: [],
388
390
  trigger: 'hover',
389
391
  position: 'bottom-start',
390
- triggerLinkType: 'link'
392
+ triggerLinkType: 'link',
393
+ displayConfig: {
394
+ showKudos: true
395
+ }
391
396
  });
392
397
  var _default = exports.default = (0, _analyticsNext.withAnalyticsEvents)()(TeamProfileCardTriggerInternal);
@@ -150,7 +150,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
150
150
  hasError: false,
151
151
  data: null
152
152
  }, function () {
153
- var requests = Promise.all([_this.props.resourceClient.getProfile(cloudId || '', userId, _this.fireAnalytics), _this.props.resourceClient.getReportingLines(userId), _this.props.resourceClient.shouldShowGiveKudos()]);
153
+ var _this$props$displayCo;
154
+ var requests = Promise.all([_this.props.resourceClient.getProfile(cloudId || '', userId, _this.fireAnalytics), _this.props.resourceClient.getReportingLines(userId), (_this$props$displayCo = _this.props.displayConfig) !== null && _this$props$displayCo !== void 0 && _this$props$displayCo.showKudos ? _this.props.resourceClient.shouldShowGiveKudos() : Promise.resolve(false)]);
154
155
  requests.then(function (res) {
155
156
  var _this2;
156
157
  return (_this2 = _this).handleClientSuccess.apply(_this2, (0, _toConsumableArray2.default)(res));
@@ -294,8 +295,7 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
294
295
  },
295
296
  zIndex: _constants.layers.modal(),
296
297
  shouldUseCaptureOnOutsideClick: true,
297
- autoFocus: this.props.trigger === 'click',
298
- shouldRenderToParent: true
298
+ autoFocus: this.props.trigger === 'click'
299
299
  }), this.state.shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
300
300
  fallback: null
301
301
  }, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
@@ -326,7 +326,10 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
326
326
  (0, _defineProperty2.default)(ProfilecardTrigger, "defaultProps", {
327
327
  actions: [],
328
328
  trigger: 'hover',
329
- position: 'bottom-start'
329
+ position: 'bottom-start',
330
+ displayConfig: {
331
+ showKudos: true
332
+ }
330
333
  });
331
334
  var ProfilecardTriggerLegacy = (0, _analyticsNext.withAnalyticsEvents)()(ProfilecardTrigger);
332
335
  function ProfilecardTriggerSwitch(props) {
@@ -331,8 +331,7 @@ function ProfilecardTriggerNext(_ref) {
331
331
  },
332
332
  zIndex: _constants.layers.modal(),
333
333
  shouldUseCaptureOnOutsideClick: true,
334
- autoFocus: trigger === 'click',
335
- shouldRenderToParent: true
334
+ autoFocus: trigger === 'click'
336
335
  }), shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
337
336
  fallback: null
338
337
  }, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
@@ -18,25 +18,53 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
18
18
  var getFullNameMargin = function getFullNameMargin(props) {
19
19
  return props.noMeta ? "var(--ds-space-400, 32px)".concat(" 0 ", "var(--ds-space-150, 12px)", " 0") : "var(--ds-space-150, 12px)".concat(" 0 0 0");
20
20
  };
21
+
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
21
23
  var CardWrapper = exports.CardWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", ";\n width: ", "px;\n"])), _constants2.bgColor, "var(--ds-border-radius, 3px)", (0, _constants.gridSize)() * 45);
24
+
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
22
26
  var ProfileImage = exports.ProfileImage = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", ";\n left: ", ";\n"])), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
27
+
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
23
29
  var ActionsFlexSpacer = exports.ActionsFlexSpacer = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 0 auto;\n"])));
24
30
 
25
31
  // eslint-disable-next-line @atlaskit/design-system/no-keyframes-tagged-template-expression -- needs manual remediation
26
32
  var kudosButtonAnimationTransformation = (0, _react2.keyframes)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n 0% { transform: translate(-80px, -50px); }\n 100% { transform: translate(90px, -70px); }\n"])));
33
+
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
27
35
  var KudosBlobAnimationStyle = exports.KudosBlobAnimationStyle = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: none;\n height: 150px;\n width: 150px;\n z-index: -1;\n position: absolute;\n top: ", "em;\n animation-name: ", ";\n animation-iteration-count: 1;\n animation-duration: 3s;\n background-image: radial-gradient(\n circle,\n ", " 0%,\n ", " 25%,\n transparent 50%\n );\n overflow: hidden;\n"])), (0, _constants.gridSize)() * 4 / (0, _constants.fontSize)(), kudosButtonAnimationTransformation, "var(--ds-background-information-pressed, #85B8FF)", "var(--ds-background-discovery-pressed, #B8ACF6)");
28
36
  var KudosBlobAnimation = exports.KudosBlobAnimation = function KudosBlobAnimation(props) {
29
- return /*#__PURE__*/_react.default.createElement(KudosBlobAnimationStyle, (0, _extends2.default)({
30
- className: "kudos-blob-animation"
31
- }, props));
37
+ return (
38
+ /*#__PURE__*/
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
40
+ _react.default.createElement(KudosBlobAnimationStyle, (0, _extends2.default)({
41
+ className: "kudos-blob-animation"
42
+ }, props))
43
+ );
32
44
  };
33
- var AnimationWrapper = exports.AnimationWrapper = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n clip-path: inset(0px 0px 0px 0px round ", "px);\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n"])), _constants.borderRadius);
45
+
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
47
+ var AnimationWrapper = exports.AnimationWrapper = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n clip-path: inset(0px 0px 0px 0px round ", "px);\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n"])), (0, _constants.borderRadius)());
48
+
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
34
50
  var AnimatedKudosButton = exports.AnimatedKudosButton = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n\n /* Need babel-plugin-emotion to use component selector */\n /* Previously with styled-components: &:hover {KudosBlobAnimation} { */\n &:focus-within .kudos-blob-animation,\n &:focus .kudos-blob-animation,\n &:hover .kudos-blob-animation {\n display: block;\n }\n"])), "var(--ds-space-100, 8px)");
51
+
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
35
53
  var ActionButtonGroup = exports.ActionButtonGroup = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n user-select: none;\n margin: ", " 0 0 0;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n\n button,\n a {\n position: relative;\n }\n\n button,\n a,\n span {\n margin-left: ", ";\n\n &:first-child {\n margin-left: ", ";\n }\n }\n\n a,\n button {\n &:focus {\n outline-color: ", ";\n outline-offset: ", ";\n outline-style: solid;\n outline-width: ", ";\n }\n }\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-0, 0px)", "var(--ds-border-focused, ".concat(_colors.B200, ")"), "var(--ds-border-width, 2px)", "var(--ds-border-width, 2px)");
54
+
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
36
56
  var OverflowActionButtonsWrapper = exports.OverflowActionButtonsWrapper = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n width: ", ";\n height: ", ";\n margin-left: ", ";\n\n button {\n &:focus {\n outline-color: ", ";\n outline-offset: ", ";\n outline-style: solid;\n outline-width: ", ";\n }\n }\n"])), "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)", "var(--ds-space-100, 8px)", "var(--ds-border-focused, ".concat(_colors.B200, ")"), "var(--ds-border-width, 2px)", "var(--ds-border-width, 2px)");
57
+
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
37
59
  var CardContent = exports.CardContent = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), (0, _constants.gridSize)() * 17);
60
+
61
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
38
62
  var DetailsGroup = exports.DetailsGroup = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), (0, _constants.gridSize)() * 14.5, (0, _constants.gridSize)() * 24.5);
39
- var DisabledInfo = exports.DisabledInfo = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n margin: ", " 0 0 0;\n line-height: 16px;\n"])), _constants.fontSizeSmall, _constants2.labelTextColor, "var(--ds-space-150, 12px)");
63
+
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
65
+ var DisabledInfo = exports.DisabledInfo = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n margin: ", " 0 0 0;\n line-height: 16px;\n"])), (0, _constants.fontSizeSmall)(), _constants2.labelTextColor, "var(--ds-space-150, 12px)");
66
+
67
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
40
68
  var FullNameLabel = exports.FullNameLabel = _styled.default.h2(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n font-weight: 400;\n letter-spacing: normal;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n :first-child {\n margin: ", ";\n }\n"])), function (props) {
41
69
  return props.isDisabledAccount ? _constants2.headerTextColorInactive : _constants2.headerTextColor;
42
70
  }, function (props) {
@@ -44,11 +72,22 @@ var FullNameLabel = exports.FullNameLabel = _styled.default.h2(_templateObject13
44
72
  }, 24 / 18, function (props) {
45
73
  return getFullNameMargin(props);
46
74
  });
75
+
76
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
47
77
  var LozengeWrapper = exports.LozengeWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n text-transform: uppercase;\n display: block;\n"])), "var(--ds-space-200, 16px)");
78
+
79
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
48
80
  var CustomLozengeContainer = exports.CustomLozengeContainer = (0, _styled.default)(LozengeWrapper)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: ", ";\n > * {\n margin-top: ", ";\n &:not(:last-child) {\n margin-right: ", ";\n }\n }\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
81
+
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
49
83
  var JobTitleLabel = exports.JobTitleLabel = _styled.default.span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 14px;\n color: ", ";\n margin: 0 0 ", " 0;\n line-height: ", "em;\n"])), _constants2.headerTextColor, "var(--ds-space-150, 12px)", 24 / 14);
84
+
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
50
86
  var AppTitleLabel = exports.AppTitleLabel = _styled.default.span(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n color: ", ";\n border-radius: ", ";\n padding: 0 ", ";\n width: fit-content;\n font-weight: bold;\n text-transform: uppercase;\n\n font-size: 12px;\n margin: ", " 0 ", " 0;\n line-height: ", "em;\n"])), _constants2.appLabelBgColor, _constants2.appLabelTextColor, (0, _constants.borderRadius)(), "var(--ds-space-075, 6px)", "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", 24 / 14);
87
+
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
51
89
  var SpinnerContainer = exports.SpinnerContainer = _styled.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n height: ", "px;\n justify-content: center;\n position: relative;\n"])), (0, _constants.gridSize)() * 12);
90
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
52
91
  var CardContainer = exports.CardContainer = _styled.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: linear-gradient(\n to bottom,\n ", "\n 0%,\n ", "\n 100%\n );\n background-repeat: no-repeat;\n background-size: 100% ", "px;\n box-sizing: content-box;\n padding: ", ";\n box-shadow: ", ";\n border-radius: ", ";\n\n overflow: hidden;\n"])), function (props) {
53
92
  return props.isDisabledUser ? _constants2.headerBgColorDisabledUser : _constants2.headerBgColor;
54
93
  }, function (props) {
@@ -58,6 +97,12 @@ var CardContainer = exports.CardContainer = _styled.default.div(_templateObject1
58
97
  }, function (props) {
59
98
  return props.withoutElevation ? '' : "".concat((0, _constants.borderRadius)(), "px");
60
99
  });
100
+
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
61
102
  var DetailsLabel = exports.DetailsLabel = _styled.default.div(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n line-height: 24px;\n font-size: ", "px;\n margin: ", " 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", ";\n }\n"])), (0, _constants.gridSize)() * 1.5, "var(--ds-space-200, 16px)", "var(--ds-space-025, 2px)");
103
+
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
62
105
  var DetailsLabelIcon = exports.DetailsLabelIcon = _styled.default.div(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", ";\n height: ", ";\n padding: ", ";\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), _constants2.labelIconColor, "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)", "var(--ds-space-050, 4px)");
106
+
107
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
63
108
  var DetailsLabelText = exports.DetailsLabelText = _styled.default.span(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n padding-left: ", ";\n"])), _constants2.labelTextColor, "var(--ds-space-050, 4px)");
@@ -10,20 +10,29 @@ var _colors = require("@atlaskit/theme/colors");
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
  var _typography = require("@atlaskit/theme/typography");
12
12
  var _constants2 = require("./constants");
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
13
14
  var ErrorWrapper = exports.ErrorWrapper = _styled.default.div({
14
15
  textAlign: 'center',
15
16
  padding: "var(--ds-space-300, 24px)",
16
17
  color: _constants2.errorIconColor
17
18
  });
19
+
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
18
21
  var ErrorTitle = exports.ErrorTitle = _styled.default.p({
19
22
  color: _constants2.errorTitleColor,
20
23
  lineHeight: "".concat((0, _constants.gridSize)() * 3, "px"),
21
24
  margin: "var(--ds-space-100, 8px)".concat(" 0")
22
25
  });
26
+
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
23
28
  var ErrorText = exports.ErrorText = _styled.default.span({
24
29
  color: _constants2.errorTextColor
25
30
  });
31
+
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
26
33
  var TeamErrorTitle = exports.TeamErrorTitle = _styled.default.p(_typography.h400);
34
+
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
27
36
  var TeamErrorText = exports.TeamErrorText = _styled.default.p({
28
37
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
29
38
  marginTop: "var(--ds-space-100, 8px)"
@@ -8,26 +8,35 @@ exports.ReportingLinesSection = exports.ReportingLinesHeading = exports.OffsetWr
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
  var _constants = require("@atlaskit/theme/constants");
10
10
  var _constants2 = require("./constants");
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
11
12
  var ReportingLinesSection = exports.ReportingLinesSection = _styled.default.div({
12
13
  // Minor left margin to align better with existing icon fields
13
14
  marginLeft: "var(--ds-space-050, 4px)",
14
15
  marginTop: "var(--ds-space-100, 8px)"
15
16
  });
17
+
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
16
19
  var ReportingLinesHeading = exports.ReportingLinesHeading = _styled.default.h3({
17
20
  color: _constants2.appLabelTextColor,
18
21
  fontSize: "".concat((0, _constants.gridSize)() * 1.5, "px"),
19
22
  fontWeight: 600,
20
23
  marginBottom: "var(--ds-space-100, 8px)"
21
24
  });
25
+
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
22
27
  var ManagerSection = exports.ManagerSection = _styled.default.div({
23
28
  display: 'flex',
24
29
  alignItems: 'center',
25
30
  margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-050, 4px)")
26
31
  });
32
+
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
27
34
  var ManagerName = exports.ManagerName = _styled.default.span({
28
35
  fontSize: "".concat((0, _constants.gridSize)() * 1.5, "px"),
29
36
  marginLeft: "var(--ds-space-100, 8px)"
30
37
  });
38
+
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
31
40
  var OffsetWrapper = exports.OffsetWrapper = _styled.default.div({
32
41
  marginTop: "var(--ds-space-050, 4px)",
33
42
  // Offset left margin so the avatar aligns with the heading
@@ -12,9 +12,12 @@ var _constants = require("@atlaskit/theme/constants");
12
12
  var _typography = require("@atlaskit/theme/typography");
13
13
  var _constants2 = require("./constants");
14
14
  var _templateObject;
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
15
16
  var CardTriggerWrapper = exports.CardTriggerWrapper = _styled.default.div({
16
17
  display: 'inherit'
17
18
  });
19
+
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
18
21
  var CardWrapper = exports.CardWrapper = _styled.default.div({
19
22
  backgroundColor: _constants2.bgColor,
20
23
  borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
@@ -23,23 +26,29 @@ var CardWrapper = exports.CardWrapper = _styled.default.div({
23
26
  WebkitFontSmoothing: 'antialiased',
24
27
  MozOsxFontSmoothing: 'grayscale'
25
28
  });
29
+
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
26
31
  var TeamForbiddenErrorStateWrapper = exports.TeamForbiddenErrorStateWrapper = _styled.default.div({
27
32
  width: "".concat((0, _constants.gridSize)() * 40, "px"),
28
33
  position: 'relative'
29
34
  });
30
35
 
31
- // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation
36
+ // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
32
37
  var CardHeader = exports.CardHeader = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n box-sizing: content-box;\n height: ", "px;\n"])), function (props) {
33
38
  return props.isLoading ? "var(--ds-background-neutral, ".concat(_colors.N20, ")") : props.image ? '' : _constants2.teamHeaderBgColor;
34
39
  }, function (props) {
35
40
  return props.image ? "url(".concat(props.image, ")") : '';
36
41
  }, (0, _constants.gridSize)() * 16);
42
+
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
37
44
  var CardContent = exports.CardContent = _styled.default.div({
38
45
  display: 'flex',
39
46
  flexDirection: 'column',
40
47
  padding: "var(--ds-space-300, 24px)",
41
48
  minHeight: "".concat((0, _constants.gridSize)() * 13, "px")
42
49
  });
50
+
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
43
52
  var TeamName = exports.TeamName = _styled.default.h6(_typography.h600, {
44
53
  textTransform: 'none',
45
54
  overflow: 'hidden',
@@ -48,19 +57,27 @@ var TeamName = exports.TeamName = _styled.default.h6(_typography.h600, {
48
57
  WebkitLineClamp: 2,
49
58
  WebkitBoxOrient: 'vertical'
50
59
  });
60
+
61
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
51
62
  var MemberCount = exports.MemberCount = _styled.default.div({
52
63
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
53
64
  marginTop: "var(--ds-space-050, 4px)"
54
65
  });
66
+
67
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
55
68
  var AvatarSection = exports.AvatarSection = _styled.default.div({
56
69
  marginTop: "var(--ds-space-200, 16px)",
57
70
  marginLeft: "var(--ds-space-negative-025, -2px)"
58
71
  });
72
+
73
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
59
74
  var DescriptionWrapper = exports.DescriptionWrapper = _styled.default.div({
60
75
  marginTop: "var(--ds-space-200, 16px)",
61
76
  alignItems: 'center',
62
77
  display: 'flex'
63
78
  });
79
+
80
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
64
81
  var Description = exports.Description = _styled.default.span({
65
82
  overflow: 'hidden',
66
83
  maxHeight: '60px',
@@ -68,6 +85,8 @@ var Description = exports.Description = _styled.default.span({
68
85
  WebkitLineClamp: 3,
69
86
  WebkitBoxOrient: 'vertical'
70
87
  });
88
+
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
71
90
  var ActionButtons = exports.ActionButtons = _styled.default.div({
72
91
  width: 'calc(100% + 8px)',
73
92
  display: 'flex',
@@ -75,18 +94,26 @@ var ActionButtons = exports.ActionButtons = _styled.default.div({
75
94
  margin: "var(--ds-space-300, 24px)".concat(" ", "var(--ds-space-negative-300, -24px)", " 0 ", "var(--ds-space-negative-100, -8px)"),
76
95
  backgroundColor: "var(--ds-surface-overlay, hsla(0, 100%, 100%, 0.2))"
77
96
  });
97
+
98
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
78
99
  var WrappedButton = exports.WrappedButton = _styled.default.div({
79
100
  flexBasis: 0,
80
101
  flexGrow: 1,
81
102
  marginLeft: "var(--ds-space-100, 8px)"
82
103
  });
104
+
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
83
106
  var MoreButton = exports.MoreButton = _styled.default.div({
84
107
  marginLeft: "var(--ds-space-100, 8px)"
85
108
  });
109
+
110
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
86
111
  var LoadingWrapper = exports.LoadingWrapper = _styled.default.div({
87
112
  textAlign: 'center',
88
113
  marginTop: "var(--ds-space-500, 40px)"
89
114
  });
115
+
116
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
90
117
  var AccessLockSVGWrapper = exports.AccessLockSVGWrapper = _styled.default.div({
91
118
  marginBottom: "var(--ds-space-300, 24px)"
92
119
  });
@@ -44,7 +44,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
44
44
  actionSubjectId: actionSubjectId,
45
45
  attributes: _objectSpread(_objectSpread({
46
46
  packageName: "@atlaskit/profilecard",
47
- packageVersion: "19.12.0"
47
+ packageVersion: "19.14.0"
48
48
  }, attributes), {}, {
49
49
  firedAt: Math.round((0, _performance.getPageTime)())
50
50
  })
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
67
67
  headers.append('X-ExperimentalApi', 'teams-beta');
68
68
  headers.append('X-ExperimentalApi', 'team-members-beta');
69
69
  headers.append('atl-client-name', "@atlaskit/profilecard");
70
- headers.append('atl-client-version', "19.12.0");
70
+ headers.append('atl-client-version', "19.14.0");
71
71
  return headers;
72
72
  };
73
73
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -154,8 +154,7 @@ const ExtraActions = ({
154
154
  label: "actions"
155
155
  })
156
156
  })),
157
- zIndex: layers.modal(),
158
- shouldRenderToParent: true
157
+ zIndex: layers.modal()
159
158
  }));
160
159
  };
161
160
  const ButtonSection = ({
@@ -157,10 +157,11 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
157
157
  isLoading: true,
158
158
  data: null
159
159
  }, () => {
160
+ var _this$props$displayCo;
160
161
  const fireEvent = event => {
161
162
  this.fireAnalytics(event);
162
163
  };
163
- const requests = Promise.all([this.props.resourceClient.getTeamProfile(teamId, orgId, fireEvent), this.props.resourceClient.shouldShowGiveKudos()]);
164
+ const requests = Promise.all([this.props.resourceClient.getTeamProfile(teamId, orgId, fireEvent), (_this$props$displayCo = this.props.displayConfig) !== null && _this$props$displayCo !== void 0 && _this$props$displayCo.showKudos ? this.props.resourceClient.shouldShowGiveKudos() : Promise.resolve(false)]);
164
165
  requests.then(res => this.handleClientSuccess(...res), err => this.handleClientError(err)).catch(err => this.handleClientError(err));
165
166
  });
166
167
  });
@@ -235,7 +236,9 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
235
236
  }, triggerProps, this.triggerListeners), children));
236
237
  }
237
238
  return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderKudosLauncher(), /*#__PURE__*/React.createElement("a", _extends({
238
- "data-testid": "team-profilecard-trigger-wrapper",
239
+ "data-testid": "team-profilecard-trigger-wrapper"
240
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
241
+ ,
239
242
  style: {
240
243
  color: 'initial',
241
244
  textDecoration: 'none'
@@ -322,8 +325,7 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
322
325
  trigger: triggerProps => this.renderTrigger(triggerProps),
323
326
  zIndex: layers.modal(),
324
327
  shouldFlip: true,
325
- autoFocus: this.props.trigger !== 'hover' && !this.openedByHover,
326
- shouldRenderToParent: true
328
+ autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
327
329
  }));
328
330
  }
329
331
  render() {
@@ -338,6 +340,9 @@ _defineProperty(TeamProfileCardTriggerInternal, "defaultProps", {
338
340
  actions: [],
339
341
  trigger: 'hover',
340
342
  position: 'bottom-start',
341
- triggerLinkType: 'link'
343
+ triggerLinkType: 'link',
344
+ displayConfig: {
345
+ showKudos: true
346
+ }
342
347
  });
343
348
  export default withAnalyticsEvents()(TeamProfileCardTriggerInternal);
@@ -123,7 +123,8 @@ class ProfilecardTrigger extends React.PureComponent {
123
123
  hasError: false,
124
124
  data: null
125
125
  }, () => {
126
- const requests = Promise.all([this.props.resourceClient.getProfile(cloudId || '', userId, this.fireAnalytics), this.props.resourceClient.getReportingLines(userId), this.props.resourceClient.shouldShowGiveKudos()]);
126
+ var _this$props$displayCo;
127
+ const requests = Promise.all([this.props.resourceClient.getProfile(cloudId || '', userId, this.fireAnalytics), this.props.resourceClient.getReportingLines(userId), (_this$props$displayCo = this.props.displayConfig) !== null && _this$props$displayCo !== void 0 && _this$props$displayCo.showKudos ? this.props.resourceClient.shouldShowGiveKudos() : Promise.resolve(false)]);
127
128
  requests.then(res => this.handleClientSuccess(...res), err => this.handleClientError(err)).catch(err => this.handleClientError(err));
128
129
  });
129
130
  });
@@ -249,8 +250,7 @@ class ProfilecardTrigger extends React.PureComponent {
249
250
  },
250
251
  zIndex: layers.modal(),
251
252
  shouldUseCaptureOnOutsideClick: true,
252
- autoFocus: this.props.trigger === 'click',
253
- shouldRenderToParent: true
253
+ autoFocus: this.props.trigger === 'click'
254
254
  }), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
255
255
  fallback: null
256
256
  }, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
@@ -277,7 +277,10 @@ class ProfilecardTrigger extends React.PureComponent {
277
277
  _defineProperty(ProfilecardTrigger, "defaultProps", {
278
278
  actions: [],
279
279
  trigger: 'hover',
280
- position: 'bottom-start'
280
+ position: 'bottom-start',
281
+ displayConfig: {
282
+ showKudos: true
283
+ }
281
284
  });
282
285
  const ProfilecardTriggerLegacy = withAnalyticsEvents()(ProfilecardTrigger);
283
286
  export default function ProfilecardTriggerSwitch(props) {
@@ -259,8 +259,7 @@ export default function ProfilecardTriggerNext({
259
259
  },
260
260
  zIndex: layers.modal(),
261
261
  shouldUseCaptureOnOutsideClick: true,
262
- autoFocus: trigger === 'click',
263
- shouldRenderToParent: true
262
+ autoFocus: trigger === 'click'
264
263
  }), shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
265
264
  fallback: null
266
265
  }, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {