@atlaskit/profilecard 18.1.2 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/client/ProfileCardClient.js +4 -4
- package/dist/cjs/client/TeamCentralCardClient.js +13 -0
- package/dist/cjs/styled/TeamCard.js +4 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/ProfileCardClient.js +4 -4
- package/dist/es2019/client/TeamCentralCardClient.js +10 -0
- package/dist/es2019/styled/TeamCard.js +2 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/ProfileCardClient.js +4 -4
- package/dist/esm/client/TeamCentralCardClient.js +13 -0
- package/dist/esm/styled/TeamCard.js +4 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/client/TeamCentralCardClient.d.ts +1 -0
- package/package.json +1 -1
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 18.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`da891855ee9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/da891855ee9) - Remove Atlas give kudos M2 feature flag check
|
|
8
|
+
|
|
9
|
+
## 18.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`5e697be0410`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5e697be0410) - [ux] Fix team header image bug
|
|
14
|
+
|
|
3
15
|
## 18.1.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -70,11 +70,11 @@ var ProfileCardClient = /*#__PURE__*/function () {
|
|
|
70
70
|
}, {
|
|
71
71
|
key: "shouldShowGiveKudos",
|
|
72
72
|
value: function shouldShowGiveKudos() {
|
|
73
|
-
|
|
73
|
+
if (!this.tcClient || !this.getTeamCentralBaseUrl()) {
|
|
74
|
+
return Promise.resolve(false);
|
|
75
|
+
}
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
// if the user does not have TC the tc client will be undefined.
|
|
77
|
-
return this.getTeamCentralBaseUrl() && ((_this$tcClient4 = this.tcClient) === null || _this$tcClient4 === void 0 ? void 0 : _this$tcClient4.getFlagEnabled('team-central-kudos-enabled-m2', (_this$tcClient5 = this.tcClient) === null || _this$tcClient5 === void 0 ? void 0 : _this$tcClient5.options.productIdentifier)) || Promise.resolve(false);
|
|
77
|
+
return this.tcClient.checkWorkspaceExists();
|
|
78
78
|
}
|
|
79
79
|
}]);
|
|
80
80
|
return ProfileCardClient;
|
|
@@ -280,6 +280,19 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
}, {
|
|
283
|
+
key: "checkWorkspaceExists",
|
|
284
|
+
value: function checkWorkspaceExists() {
|
|
285
|
+
return this.isTCReadyPromise.then(function (workSpaceExists) {
|
|
286
|
+
if (workSpaceExists) {
|
|
287
|
+
return Promise.resolve(true);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return Promise.resolve(false);
|
|
291
|
+
}, function () {
|
|
292
|
+
return Promise.resolve(false);
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}, {
|
|
283
296
|
key: "filterReportingLinesUser",
|
|
284
297
|
value: function filterReportingLinesUser() {
|
|
285
298
|
var users = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -29,8 +29,10 @@ var CardWrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0
|
|
|
29
29
|
|
|
30
30
|
exports.CardWrapper = CardWrapper;
|
|
31
31
|
|
|
32
|
-
var CardHeader = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\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
|
-
return props.isLoading ? "var(--ds-background-neutral, ".concat(_colors.N20, ")") : props.image ?
|
|
32
|
+
var CardHeader = _styled.default.div(_templateObject3 || (_templateObject3 = (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
|
+
return props.isLoading ? "var(--ds-background-neutral, ".concat(_colors.N20, ")") : props.image ? '' : _constants2.teamHeaderBgColor;
|
|
34
|
+
}, function (props) {
|
|
35
|
+
return props.image ? "url(".concat(props.image, ")") : '';
|
|
34
36
|
}, (0, _constants.gridSize)() * 16);
|
|
35
37
|
|
|
36
38
|
exports.CardHeader = CardHeader;
|
|
@@ -59,7 +59,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
59
59
|
actionSubjectId: actionSubjectId,
|
|
60
60
|
attributes: _objectSpread(_objectSpread({
|
|
61
61
|
packageName: "@atlaskit/profilecard",
|
|
62
|
-
packageVersion: "18.
|
|
62
|
+
packageVersion: "18.2.0"
|
|
63
63
|
}, attributes), {}, {
|
|
64
64
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
65
65
|
})
|
package/dist/cjs/version.json
CHANGED
|
@@ -41,11 +41,11 @@ class ProfileCardClient {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
shouldShowGiveKudos() {
|
|
44
|
-
|
|
44
|
+
if (!this.tcClient || !this.getTeamCentralBaseUrl()) {
|
|
45
|
+
return Promise.resolve(false);
|
|
46
|
+
}
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
// if the user does not have TC the tc client will be undefined.
|
|
48
|
-
return this.getTeamCentralBaseUrl() && ((_this$tcClient4 = this.tcClient) === null || _this$tcClient4 === void 0 ? void 0 : _this$tcClient4.getFlagEnabled('team-central-kudos-enabled-m2', (_this$tcClient5 = this.tcClient) === null || _this$tcClient5 === void 0 ? void 0 : _this$tcClient5.options.productIdentifier)) || Promise.resolve(false);
|
|
48
|
+
return this.tcClient.checkWorkspaceExists();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
}
|
|
@@ -199,6 +199,16 @@ class TeamCentralCardClient extends CachingClient {
|
|
|
199
199
|
}, () => Promise.resolve(false));
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
checkWorkspaceExists() {
|
|
203
|
+
return this.isTCReadyPromise.then(workSpaceExists => {
|
|
204
|
+
if (workSpaceExists) {
|
|
205
|
+
return Promise.resolve(true);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return Promise.resolve(false);
|
|
209
|
+
}, () => Promise.resolve(false));
|
|
210
|
+
}
|
|
211
|
+
|
|
202
212
|
filterReportingLinesUser(users = []) {
|
|
203
213
|
return users.filter(user => user.identifierType === 'ATLASSIAN_ID');
|
|
204
214
|
}
|
|
@@ -15,7 +15,8 @@ export const CardWrapper = styled.div`
|
|
|
15
15
|
-moz-osx-font-smoothing: grayscale;
|
|
16
16
|
`;
|
|
17
17
|
export const CardHeader = styled.div`
|
|
18
|
-
background-color: ${props => props.isLoading ? `var(--ds-background-neutral, ${N20})` : props.image ?
|
|
18
|
+
background-color: ${props => props.isLoading ? `var(--ds-background-neutral, ${N20})` : props.image ? '' : teamHeaderBgColor};
|
|
19
|
+
background-image: ${props => props.image ? `url(${props.image})` : ''};
|
|
19
20
|
background-repeat: no-repeat;
|
|
20
21
|
background-position: center;
|
|
21
22
|
background-size: cover;
|
|
@@ -38,7 +38,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
38
38
|
actionSubjectId,
|
|
39
39
|
attributes: {
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "18.
|
|
41
|
+
packageVersion: "18.2.0",
|
|
42
42
|
...attributes,
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -58,11 +58,11 @@ var ProfileCardClient = /*#__PURE__*/function () {
|
|
|
58
58
|
}, {
|
|
59
59
|
key: "shouldShowGiveKudos",
|
|
60
60
|
value: function shouldShowGiveKudos() {
|
|
61
|
-
|
|
61
|
+
if (!this.tcClient || !this.getTeamCentralBaseUrl()) {
|
|
62
|
+
return Promise.resolve(false);
|
|
63
|
+
}
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
// if the user does not have TC the tc client will be undefined.
|
|
65
|
-
return this.getTeamCentralBaseUrl() && ((_this$tcClient4 = this.tcClient) === null || _this$tcClient4 === void 0 ? void 0 : _this$tcClient4.getFlagEnabled('team-central-kudos-enabled-m2', (_this$tcClient5 = this.tcClient) === null || _this$tcClient5 === void 0 ? void 0 : _this$tcClient5.options.productIdentifier)) || Promise.resolve(false);
|
|
65
|
+
return this.tcClient.checkWorkspaceExists();
|
|
66
66
|
}
|
|
67
67
|
}]);
|
|
68
68
|
|
|
@@ -265,6 +265,19 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
}, {
|
|
268
|
+
key: "checkWorkspaceExists",
|
|
269
|
+
value: function checkWorkspaceExists() {
|
|
270
|
+
return this.isTCReadyPromise.then(function (workSpaceExists) {
|
|
271
|
+
if (workSpaceExists) {
|
|
272
|
+
return Promise.resolve(true);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return Promise.resolve(false);
|
|
276
|
+
}, function () {
|
|
277
|
+
return Promise.resolve(false);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}, {
|
|
268
281
|
key: "filterReportingLinesUser",
|
|
269
282
|
value: function filterReportingLinesUser() {
|
|
270
283
|
var users = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -9,8 +9,10 @@ import { h600 } from '@atlaskit/theme/typography';
|
|
|
9
9
|
import { bgColor, teamHeaderBgColor } from './constants';
|
|
10
10
|
export var CardTriggerWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inherit;\n"])));
|
|
11
11
|
export var CardWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n"])), bgColor, borderRadius, gridSize() * 40);
|
|
12
|
-
export var CardHeader = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n box-sizing: content-box;\n height: ", "px;\n"])), function (props) {
|
|
13
|
-
return props.isLoading ? "var(--ds-background-neutral, ".concat(N20, ")") : props.image ?
|
|
12
|
+
export var CardHeader = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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) {
|
|
13
|
+
return props.isLoading ? "var(--ds-background-neutral, ".concat(N20, ")") : props.image ? '' : teamHeaderBgColor;
|
|
14
|
+
}, function (props) {
|
|
15
|
+
return props.image ? "url(".concat(props.image, ")") : '';
|
|
14
16
|
}, gridSize() * 16);
|
|
15
17
|
export var CardContent = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ", "px;\n min-height: ", "px;\n"])), gridSize() * 3, gridSize() * 13);
|
|
16
18
|
export var TeamName = styled.h6(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n text-transform: none;\n overflow: hidden;\n max-height: 48px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])), h600);
|
|
@@ -48,7 +48,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
48
48
|
actionSubjectId: actionSubjectId,
|
|
49
49
|
attributes: _objectSpread(_objectSpread({
|
|
50
50
|
packageName: "@atlaskit/profilecard",
|
|
51
|
-
packageVersion: "18.
|
|
51
|
+
packageVersion: "18.2.0"
|
|
52
52
|
}, attributes), {}, {
|
|
53
53
|
firedAt: Math.round(getPageTime())
|
|
54
54
|
})
|
package/dist/esm/version.json
CHANGED
|
@@ -26,6 +26,7 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
|
|
|
26
26
|
makeRequest(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
27
27
|
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
28
28
|
getFlagEnabled(featureKey: string, productIdentifier?: string): Promise<boolean>;
|
|
29
|
+
checkWorkspaceExists(): Promise<boolean>;
|
|
29
30
|
private filterReportingLinesUser;
|
|
30
31
|
}
|
|
31
32
|
export default TeamCentralCardClient;
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -557,6 +557,8 @@ class TeamCentralCardClient extends CachingClient<TeamCentralReportingLinesData>
|
|
|
557
557
|
constructor(options: TeamCentralCardClientOptions);
|
|
558
558
|
bypassOnFailure: boolean;
|
|
559
559
|
// (undocumented)
|
|
560
|
+
checkWorkspaceExists(): Promise<boolean>;
|
|
561
|
+
// (undocumented)
|
|
560
562
|
createTcReadyPromise(config: ProfileClientOptions): Promise<boolean>;
|
|
561
563
|
// (undocumented)
|
|
562
564
|
featureFlagKeys: Map<string, boolean>;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -455,6 +455,8 @@ class TeamCentralCardClient extends CachingClient<TeamCentralReportingLinesData>
|
|
|
455
455
|
constructor(options: TeamCentralCardClientOptions);
|
|
456
456
|
bypassOnFailure: boolean;
|
|
457
457
|
// (undocumented)
|
|
458
|
+
checkWorkspaceExists(): Promise<boolean>;
|
|
459
|
+
// (undocumented)
|
|
458
460
|
createTcReadyPromise(config: ProfileClientOptions): Promise<boolean>;
|
|
459
461
|
// (undocumented)
|
|
460
462
|
featureFlagKeys: Map<string, boolean>;
|