@atlaskit/profilecard 21.0.1 → 21.0.3
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 +20 -0
- package/dist/cjs/client/CachingClient.js +1 -2
- package/dist/cjs/client/ProfileCardClient.js +1 -2
- package/dist/cjs/client/RovoAgentCardClient.js +5 -7
- package/dist/cjs/client/TeamCentralCardClient.js +5 -7
- package/dist/cjs/client/TeamProfileCardClient.js +5 -7
- package/dist/cjs/client/UserProfileCardClient.js +5 -7
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/Actions.js +1 -1
- package/dist/cjs/components/Error/ErrorBoundary.js +5 -7
- package/dist/cjs/components/Error/ErrorMessage.js +4 -1
- package/dist/cjs/components/Icon/IconLabel.js +5 -7
- package/dist/cjs/components/Team/TeamProfileCard.js +4 -1
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +30 -33
- package/dist/cjs/components/User/ProfileCardResourced.js +12 -15
- package/dist/cjs/components/User/ReportingLinesDetails.js +1 -1
- package/dist/cjs/mocks/mock-profile-client.js +11 -16
- package/dist/cjs/mocks/mock-team-client.js +5 -7
- package/dist/cjs/mocks/simple-mock-clients.js +11 -17
- package/dist/cjs/styled/Card.js +2 -2
- package/dist/cjs/styled/Error.js +5 -17
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/util/errors.js +12 -17
- package/dist/cjs/util/withOuterListeners.js +8 -11
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/Actions.js +1 -1
- package/dist/es2019/components/Error/ErrorMessage.js +5 -2
- package/dist/es2019/components/Team/TeamProfileCard.js +6 -3
- package/dist/es2019/components/User/ReportingLinesDetails.js +1 -1
- package/dist/es2019/styled/Card.js +2 -2
- package/dist/es2019/styled/Error.js +2 -14
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/CachingClient.js +1 -2
- package/dist/esm/client/ProfileCardClient.js +1 -2
- package/dist/esm/client/RovoAgentCardClient.js +5 -7
- package/dist/esm/client/TeamCentralCardClient.js +5 -7
- package/dist/esm/client/TeamProfileCardClient.js +5 -7
- package/dist/esm/client/UserProfileCardClient.js +5 -7
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/Actions.js +1 -1
- package/dist/esm/components/Error/ErrorBoundary.js +5 -7
- package/dist/esm/components/Error/ErrorMessage.js +5 -2
- package/dist/esm/components/Icon/IconLabel.js +5 -7
- package/dist/esm/components/Team/TeamProfileCard.js +6 -3
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +30 -33
- package/dist/esm/components/User/ProfileCardResourced.js +12 -15
- package/dist/esm/components/User/ReportingLinesDetails.js +1 -1
- package/dist/esm/mocks/mock-profile-client.js +11 -16
- package/dist/esm/mocks/mock-team-client.js +5 -7
- package/dist/esm/mocks/simple-mock-clients.js +11 -17
- package/dist/esm/styled/Card.js +2 -2
- package/dist/esm/styled/Error.js +2 -14
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/util/errors.js +12 -17
- package/dist/esm/util/withOuterListeners.js +8 -11
- package/dist/types/styled/Error.d.ts +0 -8
- package/dist/types-ts4.5/styled/Error.d.ts +0 -8
- package/package.json +1 -2
|
@@ -2,12 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
import React, { Suspense } from 'react';
|
|
13
12
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -26,21 +25,19 @@ import { ErrorBoundary } from '../Error';
|
|
|
26
25
|
import { TeamProfileCardLazy } from './lazyTeamProfileCard';
|
|
27
26
|
import TeamLoadingState from './TeamLoadingState';
|
|
28
27
|
export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
29
|
-
_inherits(TeamProfileCardTriggerInternal, _React$PureComponent);
|
|
30
|
-
var _super = _createSuper(TeamProfileCardTriggerInternal);
|
|
31
28
|
function TeamProfileCardTriggerInternal() {
|
|
32
29
|
var _this;
|
|
33
30
|
_classCallCheck(this, TeamProfileCardTriggerInternal);
|
|
34
31
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
32
|
args[_key] = arguments[_key];
|
|
36
33
|
}
|
|
37
|
-
_this =
|
|
38
|
-
_defineProperty(
|
|
39
|
-
_defineProperty(
|
|
40
|
-
_defineProperty(
|
|
41
|
-
_defineProperty(
|
|
42
|
-
_defineProperty(
|
|
43
|
-
_defineProperty(
|
|
34
|
+
_this = _callSuper(this, TeamProfileCardTriggerInternal, [].concat(args));
|
|
35
|
+
_defineProperty(_this, "_isMounted", false);
|
|
36
|
+
_defineProperty(_this, "showTimer", 0);
|
|
37
|
+
_defineProperty(_this, "hideTimer", 0);
|
|
38
|
+
_defineProperty(_this, "openedByHover", false);
|
|
39
|
+
_defineProperty(_this, "openTime", 0);
|
|
40
|
+
_defineProperty(_this, "fireAnalytics", function (payload) {
|
|
44
41
|
// Don't fire any analytics if the component is unmounted
|
|
45
42
|
if (!_this._isMounted) {
|
|
46
43
|
return;
|
|
@@ -49,11 +46,11 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
49
46
|
fireEvent(_this.props.createAnalyticsEvent, payload);
|
|
50
47
|
}
|
|
51
48
|
});
|
|
52
|
-
_defineProperty(
|
|
49
|
+
_defineProperty(_this, "fireAnalyticsWithDuration", function (generator) {
|
|
53
50
|
var event = generator(getPageTime() - _this.openTime);
|
|
54
51
|
_this.fireAnalytics(event);
|
|
55
52
|
});
|
|
56
|
-
_defineProperty(
|
|
53
|
+
_defineProperty(_this, "hideProfilecard", function () {
|
|
57
54
|
var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
58
55
|
clearTimeout(_this.showTimer);
|
|
59
56
|
clearTimeout(_this.hideTimer);
|
|
@@ -63,7 +60,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
63
60
|
});
|
|
64
61
|
}, delay);
|
|
65
62
|
});
|
|
66
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "showProfilecard", function () {
|
|
67
64
|
var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
68
65
|
clearTimeout(_this.hideTimer);
|
|
69
66
|
clearTimeout(_this.showTimer);
|
|
@@ -77,7 +74,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
77
74
|
}
|
|
78
75
|
}, delay);
|
|
79
76
|
});
|
|
80
|
-
_defineProperty(
|
|
77
|
+
_defineProperty(_this, "onClick", function (event) {
|
|
81
78
|
if (_this.props.triggerLinkType === 'link') {
|
|
82
79
|
// We want to prevent navigation occurring on basic click, but it's important that
|
|
83
80
|
// cmd+click, ctrl+click, etc. still work as expected.
|
|
@@ -98,7 +95,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
97
|
});
|
|
101
|
-
_defineProperty(
|
|
98
|
+
_defineProperty(_this, "onMouseEnter", function () {
|
|
102
99
|
if (_this.props.trigger === 'click') {
|
|
103
100
|
return;
|
|
104
101
|
}
|
|
@@ -108,7 +105,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
108
105
|
}
|
|
109
106
|
_this.showProfilecard(DELAY_MS_SHOW);
|
|
110
107
|
});
|
|
111
|
-
_defineProperty(
|
|
108
|
+
_defineProperty(_this, "onMouseLeave", function () {
|
|
112
109
|
if (_this.props.trigger === 'click') {
|
|
113
110
|
return;
|
|
114
111
|
}
|
|
@@ -116,41 +113,41 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
116
113
|
_this.hideProfilecard(DELAY_MS_HIDE);
|
|
117
114
|
}
|
|
118
115
|
});
|
|
119
|
-
_defineProperty(
|
|
116
|
+
_defineProperty(_this, "onClose", function () {
|
|
120
117
|
_this.hideProfilecard();
|
|
121
118
|
});
|
|
122
|
-
_defineProperty(
|
|
119
|
+
_defineProperty(_this, "openKudosDrawer", function () {
|
|
123
120
|
_this.hideProfilecard(DELAY_MS_HIDE);
|
|
124
121
|
_this.setState({
|
|
125
122
|
kudosDrawerOpen: true
|
|
126
123
|
});
|
|
127
124
|
});
|
|
128
|
-
_defineProperty(
|
|
125
|
+
_defineProperty(_this, "closeKudosDrawer", function () {
|
|
129
126
|
_this.setState({
|
|
130
127
|
kudosDrawerOpen: false
|
|
131
128
|
});
|
|
132
129
|
});
|
|
133
|
-
_defineProperty(
|
|
130
|
+
_defineProperty(_this, "kudosUrl", function () {
|
|
134
131
|
var recipientId = _this.props.teamId && "&recipientId=".concat(_this.props.teamId) || '';
|
|
135
132
|
var cloudId = _this.props.cloudId && "&cloudId=".concat(_this.props.cloudId) || '';
|
|
136
133
|
return "".concat(_this.state.teamCentralBaseUrl, "/kudos/give?type=team").concat(recipientId).concat(cloudId);
|
|
137
134
|
});
|
|
138
|
-
_defineProperty(
|
|
135
|
+
_defineProperty(_this, "stopPropagation", function (event) {
|
|
139
136
|
// We need to stop propagation when users click on the card, so that it
|
|
140
137
|
// doesn't trigger any special effects that occur when clicking the trigger.
|
|
141
138
|
event.stopPropagation();
|
|
142
139
|
});
|
|
143
|
-
_defineProperty(
|
|
140
|
+
_defineProperty(_this, "triggerListeners", {
|
|
144
141
|
onClick: _this.onClick,
|
|
145
142
|
onMouseEnter: _this.onMouseEnter,
|
|
146
143
|
onMouseLeave: _this.onMouseLeave
|
|
147
144
|
});
|
|
148
|
-
_defineProperty(
|
|
145
|
+
_defineProperty(_this, "cardListeners", {
|
|
149
146
|
onClick: _this.stopPropagation,
|
|
150
147
|
onMouseEnter: _this.onMouseEnter,
|
|
151
148
|
onMouseLeave: _this.onMouseLeave
|
|
152
149
|
});
|
|
153
|
-
_defineProperty(
|
|
150
|
+
_defineProperty(_this, "state", {
|
|
154
151
|
visible: false,
|
|
155
152
|
isLoading: undefined,
|
|
156
153
|
hasError: false,
|
|
@@ -160,7 +157,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
160
157
|
teamCentralBaseUrl: undefined,
|
|
161
158
|
kudosDrawerOpen: false
|
|
162
159
|
});
|
|
163
|
-
_defineProperty(
|
|
160
|
+
_defineProperty(_this, "clientFetchProfile", function () {
|
|
164
161
|
var _this$props = _this.props,
|
|
165
162
|
orgId = _this$props.orgId,
|
|
166
163
|
teamId = _this$props.teamId;
|
|
@@ -190,7 +187,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
190
187
|
});
|
|
191
188
|
});
|
|
192
189
|
});
|
|
193
|
-
_defineProperty(
|
|
190
|
+
_defineProperty(_this, "onErrorBoundary", function () {
|
|
194
191
|
_this.fireAnalytics(profileCardRendered('team', 'errorBoundary', {
|
|
195
192
|
duration: 0
|
|
196
193
|
}));
|
|
@@ -198,7 +195,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
198
195
|
renderError: true
|
|
199
196
|
});
|
|
200
197
|
});
|
|
201
|
-
_defineProperty(
|
|
198
|
+
_defineProperty(_this, "renderProfileCard", function () {
|
|
202
199
|
var _this$props2 = _this.props,
|
|
203
200
|
generateUserLink = _this$props2.generateUserLink,
|
|
204
201
|
onUserClick = _this$props2.onUserClick,
|
|
@@ -231,7 +228,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
231
228
|
errorType: error
|
|
232
229
|
}))));
|
|
233
230
|
});
|
|
234
|
-
_defineProperty(
|
|
231
|
+
_defineProperty(_this, "renderKudosLauncher", function () {
|
|
235
232
|
return _this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
236
233
|
fallback: null
|
|
237
234
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -247,7 +244,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
247
244
|
onClose: _this.closeKudosDrawer
|
|
248
245
|
}));
|
|
249
246
|
});
|
|
250
|
-
_defineProperty(
|
|
247
|
+
_defineProperty(_this, "renderTrigger", function (triggerProps) {
|
|
251
248
|
var _this$props3 = _this.props,
|
|
252
249
|
children = _this$props3.children,
|
|
253
250
|
triggerLinkType = _this$props3.triggerLinkType,
|
|
@@ -272,7 +269,8 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
272
269
|
});
|
|
273
270
|
return _this;
|
|
274
271
|
}
|
|
275
|
-
|
|
272
|
+
_inherits(TeamProfileCardTriggerInternal, _React$PureComponent);
|
|
273
|
+
return _createClass(TeamProfileCardTriggerInternal, [{
|
|
276
274
|
key: "componentDidMount",
|
|
277
275
|
value: function componentDidMount() {
|
|
278
276
|
this._isMounted = true;
|
|
@@ -377,7 +375,6 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
377
375
|
}
|
|
378
376
|
}
|
|
379
377
|
}]);
|
|
380
|
-
return TeamProfileCardTriggerInternal;
|
|
381
378
|
}(React.PureComponent);
|
|
382
379
|
_defineProperty(TeamProfileCardTriggerInternal, "defaultProps", {
|
|
383
380
|
actions: [],
|
|
@@ -2,14 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
-
function
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
import React, { Suspense } from 'react';
|
|
15
14
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -21,17 +20,15 @@ import { ErrorMessage } from '../Error';
|
|
|
21
20
|
import ProfileCard from './ProfileCard';
|
|
22
21
|
import UserLoadingState from './UserLoadingState';
|
|
23
22
|
var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
-
_inherits(ProfileCardResourced, _React$PureComponent);
|
|
25
|
-
var _super = _createSuper(ProfileCardResourced);
|
|
26
23
|
function ProfileCardResourced() {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, ProfileCardResourced);
|
|
29
26
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
27
|
args[_key] = arguments[_key];
|
|
31
28
|
}
|
|
32
|
-
_this =
|
|
33
|
-
_defineProperty(
|
|
34
|
-
_defineProperty(
|
|
29
|
+
_this = _callSuper(this, ProfileCardResourced, [].concat(args));
|
|
30
|
+
_defineProperty(_this, "_isMounted", false);
|
|
31
|
+
_defineProperty(_this, "state", {
|
|
35
32
|
visible: false,
|
|
36
33
|
isLoading: undefined,
|
|
37
34
|
hasError: false,
|
|
@@ -42,7 +39,7 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
42
39
|
kudosDrawerOpen: false,
|
|
43
40
|
teamCentralBaseUrl: undefined
|
|
44
41
|
});
|
|
45
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(_this, "fireAnalytics", function (payload) {
|
|
46
43
|
// Don't fire analytics if the component is unmounted
|
|
47
44
|
if (!_this._isMounted) {
|
|
48
45
|
return;
|
|
@@ -51,7 +48,7 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51
48
|
fireEvent(_this.props.createAnalyticsEvent, payload);
|
|
52
49
|
}
|
|
53
50
|
});
|
|
54
|
-
_defineProperty(
|
|
51
|
+
_defineProperty(_this, "clientFetchProfile", function () {
|
|
55
52
|
var _this$props = _this.props,
|
|
56
53
|
cloudId = _this$props.cloudId,
|
|
57
54
|
userId = _this$props.userId;
|
|
@@ -79,22 +76,23 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
79
76
|
});
|
|
80
77
|
});
|
|
81
78
|
});
|
|
82
|
-
_defineProperty(
|
|
79
|
+
_defineProperty(_this, "filterActions", function () {
|
|
83
80
|
return filterActions(_this.props.actions, _this.state.data);
|
|
84
81
|
});
|
|
85
|
-
_defineProperty(
|
|
82
|
+
_defineProperty(_this, "openKudosDrawer", function () {
|
|
86
83
|
_this.setState({
|
|
87
84
|
kudosDrawerOpen: true
|
|
88
85
|
});
|
|
89
86
|
});
|
|
90
|
-
_defineProperty(
|
|
87
|
+
_defineProperty(_this, "closeKudosDrawer", function () {
|
|
91
88
|
_this.setState({
|
|
92
89
|
kudosDrawerOpen: false
|
|
93
90
|
});
|
|
94
91
|
});
|
|
95
92
|
return _this;
|
|
96
93
|
}
|
|
97
|
-
|
|
94
|
+
_inherits(ProfileCardResourced, _React$PureComponent);
|
|
95
|
+
return _createClass(ProfileCardResourced, [{
|
|
98
96
|
key: "componentDidMount",
|
|
99
97
|
value: function componentDidMount() {
|
|
100
98
|
this._isMounted = true;
|
|
@@ -207,7 +205,6 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
207
205
|
}))));
|
|
208
206
|
}
|
|
209
207
|
}]);
|
|
210
|
-
return ProfileCardResourced;
|
|
211
208
|
}(React.PureComponent);
|
|
212
209
|
_defineProperty(ProfileCardResourced, "defaultProps", {
|
|
213
210
|
actions: []
|
|
@@ -14,7 +14,7 @@ function getProfileHref(userId, profileUrl) {
|
|
|
14
14
|
var reportingLinesHeadingDefaultStyles = xcss({
|
|
15
15
|
color: 'color.text',
|
|
16
16
|
font: 'font.heading.xxsmall',
|
|
17
|
-
fontWeight:
|
|
17
|
+
fontWeight: 'font.weight.semibold',
|
|
18
18
|
marginBottom: 'space.100'
|
|
19
19
|
});
|
|
20
20
|
var reportingLinesHeadingStyles = xcss({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import TeamCentralCardClient from '../client/TeamCentralCardClient';
|
|
12
12
|
import UserProfileCardClient from '../client/UserProfileCardClient';
|
|
@@ -15,13 +15,12 @@ import { reportingLinesData } from './reporting-lines-data';
|
|
|
15
15
|
import { getTimeString, getWeekday, random } from './util';
|
|
16
16
|
export default function getMockProfileClient(BaseProfileClient, modifyResponse) {
|
|
17
17
|
var MockUserClient = /*#__PURE__*/function (_UserProfileCardClien) {
|
|
18
|
-
_inherits(MockUserClient, _UserProfileCardClien);
|
|
19
|
-
var _super = _createSuper(MockUserClient);
|
|
20
18
|
function MockUserClient() {
|
|
21
19
|
_classCallCheck(this, MockUserClient);
|
|
22
|
-
return
|
|
20
|
+
return _callSuper(this, MockUserClient, arguments);
|
|
23
21
|
}
|
|
24
|
-
|
|
22
|
+
_inherits(MockUserClient, _UserProfileCardClien);
|
|
23
|
+
return _createClass(MockUserClient, [{
|
|
25
24
|
key: "makeRequest",
|
|
26
25
|
value: function makeRequest(cloudId, userId) {
|
|
27
26
|
var timeout = random(1500) + 500;
|
|
@@ -51,16 +50,14 @@ export default function getMockProfileClient(BaseProfileClient, modifyResponse)
|
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
52
|
}]);
|
|
54
|
-
return MockUserClient;
|
|
55
53
|
}(UserProfileCardClient);
|
|
56
54
|
var MockTeamCentralClient = /*#__PURE__*/function (_TeamCentralCardClien) {
|
|
57
|
-
_inherits(MockTeamCentralClient, _TeamCentralCardClien);
|
|
58
|
-
var _super2 = _createSuper(MockTeamCentralClient);
|
|
59
55
|
function MockTeamCentralClient() {
|
|
60
56
|
_classCallCheck(this, MockTeamCentralClient);
|
|
61
|
-
return
|
|
57
|
+
return _callSuper(this, MockTeamCentralClient, arguments);
|
|
62
58
|
}
|
|
63
|
-
|
|
59
|
+
_inherits(MockTeamCentralClient, _TeamCentralCardClien);
|
|
60
|
+
return _createClass(MockTeamCentralClient, [{
|
|
64
61
|
key: "createTcReadyPromise",
|
|
65
62
|
value: function createTcReadyPromise(config) {
|
|
66
63
|
return Promise.resolve(true);
|
|
@@ -83,21 +80,19 @@ export default function getMockProfileClient(BaseProfileClient, modifyResponse)
|
|
|
83
80
|
});
|
|
84
81
|
}
|
|
85
82
|
}]);
|
|
86
|
-
return MockTeamCentralClient;
|
|
87
83
|
}(TeamCentralCardClient);
|
|
88
84
|
return /*#__PURE__*/function (_BaseProfileClient) {
|
|
89
|
-
_inherits(MockProfileClient, _BaseProfileClient);
|
|
90
|
-
var _super3 = _createSuper(MockProfileClient);
|
|
91
85
|
function MockProfileClient(options) {
|
|
92
86
|
var clients = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
93
87
|
_classCallCheck(this, MockProfileClient);
|
|
94
|
-
return
|
|
88
|
+
return _callSuper(this, MockProfileClient, [options, _objectSpread({
|
|
95
89
|
userClient: new MockUserClient(options),
|
|
96
90
|
teamCentralClient: new MockTeamCentralClient(_objectSpread(_objectSpread({}, options), {}, {
|
|
97
91
|
gatewayGraphqlUrl: 'defaultGatewayGraphqlUrl'
|
|
98
92
|
}))
|
|
99
|
-
}, clients));
|
|
93
|
+
}, clients)]);
|
|
100
94
|
}
|
|
95
|
+
_inherits(MockProfileClient, _BaseProfileClient);
|
|
101
96
|
return _createClass(MockProfileClient);
|
|
102
97
|
}(BaseProfileClient);
|
|
103
98
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { handleAGGErrors } from '../client/errorUtils';
|
|
9
9
|
import TeamProfileCardClient from '../client/TeamProfileCardClient';
|
|
10
10
|
export default function getMockTeamClient(data) {
|
|
11
11
|
return /*#__PURE__*/function (_TeamProfileCardClien) {
|
|
12
|
-
_inherits(MockTeamClient, _TeamProfileCardClien);
|
|
13
|
-
var _super = _createSuper(MockTeamClient);
|
|
14
12
|
function MockTeamClient() {
|
|
15
13
|
_classCallCheck(this, MockTeamClient);
|
|
16
|
-
return
|
|
14
|
+
return _callSuper(this, MockTeamClient, arguments);
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
_inherits(MockTeamClient, _TeamProfileCardClien);
|
|
17
|
+
return _createClass(MockTeamClient, [{
|
|
19
18
|
key: "makeRequest",
|
|
20
19
|
value: function makeRequest(teamId) {
|
|
21
20
|
var _data$error, _data$error2, _data$error3, _data$error4, _data$error5;
|
|
@@ -46,6 +45,5 @@ export default function getMockTeamClient(data) {
|
|
|
46
45
|
});
|
|
47
46
|
}
|
|
48
47
|
}]);
|
|
49
|
-
return MockTeamClient;
|
|
50
48
|
}(TeamProfileCardClient);
|
|
51
49
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import ProfileCardClient from '../client/ProfileCardClient';
|
|
12
12
|
import RovoAgentCardClient from '../client/RovoAgentCardClient';
|
|
@@ -17,13 +17,12 @@ import profiles from './profile-data';
|
|
|
17
17
|
import teamData from './team-data';
|
|
18
18
|
import { getTimeString, getWeekday } from './util';
|
|
19
19
|
var SimpleMockTeamClient = /*#__PURE__*/function (_TeamProfileCardClien) {
|
|
20
|
-
_inherits(SimpleMockTeamClient, _TeamProfileCardClien);
|
|
21
|
-
var _super = _createSuper(SimpleMockTeamClient);
|
|
22
20
|
function SimpleMockTeamClient() {
|
|
23
21
|
_classCallCheck(this, SimpleMockTeamClient);
|
|
24
|
-
return
|
|
22
|
+
return _callSuper(this, SimpleMockTeamClient, arguments);
|
|
25
23
|
}
|
|
26
|
-
|
|
24
|
+
_inherits(SimpleMockTeamClient, _TeamProfileCardClien);
|
|
25
|
+
return _createClass(SimpleMockTeamClient, [{
|
|
27
26
|
key: "makeRequest",
|
|
28
27
|
value: function makeRequest(teamId) {
|
|
29
28
|
var simpleMockTeam = teamData({
|
|
@@ -34,16 +33,14 @@ var SimpleMockTeamClient = /*#__PURE__*/function (_TeamProfileCardClien) {
|
|
|
34
33
|
}, simpleMockTeam));
|
|
35
34
|
}
|
|
36
35
|
}]);
|
|
37
|
-
return SimpleMockTeamClient;
|
|
38
36
|
}(TeamProfileCardClient);
|
|
39
37
|
var SimpleMockUserClient = /*#__PURE__*/function (_UserProfileCardClien) {
|
|
40
|
-
_inherits(SimpleMockUserClient, _UserProfileCardClien);
|
|
41
|
-
var _super2 = _createSuper(SimpleMockUserClient);
|
|
42
38
|
function SimpleMockUserClient() {
|
|
43
39
|
_classCallCheck(this, SimpleMockUserClient);
|
|
44
|
-
return
|
|
40
|
+
return _callSuper(this, SimpleMockUserClient, arguments);
|
|
45
41
|
}
|
|
46
|
-
|
|
42
|
+
_inherits(SimpleMockUserClient, _UserProfileCardClien);
|
|
43
|
+
return _createClass(SimpleMockUserClient, [{
|
|
47
44
|
key: "makeRequest",
|
|
48
45
|
value: function makeRequest(cloudId, userId) {
|
|
49
46
|
var profile = profiles[0];
|
|
@@ -55,22 +52,19 @@ var SimpleMockUserClient = /*#__PURE__*/function (_UserProfileCardClien) {
|
|
|
55
52
|
return Promise.resolve(data);
|
|
56
53
|
}
|
|
57
54
|
}]);
|
|
58
|
-
return SimpleMockUserClient;
|
|
59
55
|
}(UserProfileCardClient);
|
|
60
56
|
var SimpleMockAgentClient = /*#__PURE__*/function (_RovoAgentCardClient) {
|
|
61
|
-
_inherits(SimpleMockAgentClient, _RovoAgentCardClient);
|
|
62
|
-
var _super3 = _createSuper(SimpleMockAgentClient);
|
|
63
57
|
function SimpleMockAgentClient() {
|
|
64
58
|
_classCallCheck(this, SimpleMockAgentClient);
|
|
65
|
-
return
|
|
59
|
+
return _callSuper(this, SimpleMockAgentClient, arguments);
|
|
66
60
|
}
|
|
67
|
-
|
|
61
|
+
_inherits(SimpleMockAgentClient, _RovoAgentCardClient);
|
|
62
|
+
return _createClass(SimpleMockAgentClient, [{
|
|
68
63
|
key: "makeRequest",
|
|
69
64
|
value: function makeRequest(id, cloudId) {
|
|
70
65
|
return Promise.resolve(agentData);
|
|
71
66
|
}
|
|
72
67
|
}]);
|
|
73
|
-
return SimpleMockAgentClient;
|
|
74
68
|
}(RovoAgentCardClient);
|
|
75
69
|
var args = {
|
|
76
70
|
cacheSize: 10,
|
package/dist/esm/styled/Card.js
CHANGED
|
@@ -61,7 +61,7 @@ export var DetailsGroup = styled.div(_templateObject11 || (_templateObject11 = _
|
|
|
61
61
|
export var DisabledInfo = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\tfont-size: ", "px;\n\tcolor: ", ";\n\tmargin: ", " 0 0 0;\n\tline-height: 16px;\n"])), fontSizeSmall(), labelTextColor, "var(--ds-space-150, 12px)");
|
|
62
62
|
|
|
63
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
|
-
export var FullNameLabel = styled.h2(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 18px;\n\tfont-weight:
|
|
64
|
+
export var FullNameLabel = styled.h2(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 18px;\n\tfont-weight: ", ";\n\tletter-spacing: normal;\n\tcolor: ", ";\n\tmargin: ", ";\n\tline-height: ", "em;\n\t:first-child {\n\t\tmargin: ", ";\n\t}\n"])), "var(--ds-font-weight-regular, 400)", function (props) {
|
|
65
65
|
return props.isDisabledAccount ? headerTextColorInactive : headerTextColor;
|
|
66
66
|
}, function (props) {
|
|
67
67
|
return getFullNameMargin(props);
|
|
@@ -79,7 +79,7 @@ export var CustomLozengeContainer = styled(LozengeWrapper)(_templateObject15 ||
|
|
|
79
79
|
export var JobTitleLabel = styled.span(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 14px;\n\tcolor: ", ";\n\tmargin: 0 0 ", " 0;\n\tline-height: ", "em;\n"])), headerTextColor, "var(--ds-space-150, 12px)", 24 / 14);
|
|
80
80
|
|
|
81
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
82
|
-
export var AppTitleLabel = styled.span(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: 0 ", ";\n\twidth: fit-content;\n\tfont-weight:
|
|
82
|
+
export var AppTitleLabel = styled.span(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: 0 ", ";\n\twidth: fit-content;\n\tfont-weight: ", ";\n\ttext-transform: uppercase;\n\n\tfont-size: 12px;\n\tmargin: ", " 0 ", " 0;\n\tline-height: ", "em;\n"])), appLabelBgColor, appLabelTextColor, borderRadius(), "var(--ds-space-075, 6px)", "var(--ds-font-weight-bold, 700)", "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", 24 / 14);
|
|
83
83
|
|
|
84
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
85
85
|
export var SpinnerContainer = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n\talign-items: center;\n\tdisplay: flex;\n\theight: ", "px;\n\tjustify-content: center;\n\tposition: relative;\n"])), gridSize() * 12);
|
package/dist/esm/styled/Error.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { N200 } from '@atlaskit/theme/colors';
|
|
4
|
-
import {
|
|
5
|
-
import { h400 } from '@atlaskit/theme/typography';
|
|
6
|
-
import { errorIconColor, errorTextColor, errorTitleColor } from './constants';
|
|
4
|
+
import { errorIconColor, errorTitleColor } from './constants';
|
|
7
5
|
|
|
8
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
7
|
export var ErrorWrapper = styled.div({
|
|
@@ -15,22 +13,12 @@ export var ErrorWrapper = styled.div({
|
|
|
15
13
|
|
|
16
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
15
|
export var ErrorTitle = styled.p({
|
|
16
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
18
|
color: errorTitleColor,
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
|
-
lineHeight: "".concat(gridSize() * 3, "px"),
|
|
22
19
|
margin: "var(--ds-space-100, 8px)".concat(" 0")
|
|
23
20
|
});
|
|
24
21
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
|
-
export var ErrorText = styled.span({
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
-
color: errorTextColor
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
-
export var TeamErrorTitle = styled.p(h400);
|
|
33
|
-
|
|
34
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
23
|
export var TeamErrorText = styled.p({
|
|
36
24
|
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
39
39
|
actionSubjectId: actionSubjectId,
|
|
40
40
|
attributes: _objectSpread(_objectSpread({
|
|
41
41
|
packageName: "@atlaskit/profilecard",
|
|
42
|
-
packageVersion: "21.0.
|
|
42
|
+
packageVersion: "21.0.3"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|