@atlaskit/util-data-test 17.0.2 → 17.1.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 +6 -0
- package/dist/cjs/json-data/user-picker-data.json +9 -0
- package/dist/cjs/profilecard/get-mock-profilecard-client.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/json-data/user-picker-data.json +9 -0
- package/dist/es2019/profilecard/get-mock-profilecard-client.js +15 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/json-data/user-picker-data.json +9 -0
- package/dist/esm/profilecard/get-mock-profilecard-client.js +17 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/json-data/user-picker-data.json +9 -0
- package/dist/types/profilecard/get-mock-profilecard-client.d.ts +18 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/util-data-test
|
|
2
2
|
|
|
3
|
+
## 17.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a5c73ccaa58`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a5c73ccaa58) - Added manager and direct reports section to profile hover card"
|
|
8
|
+
|
|
3
9
|
## 17.0.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -338,5 +338,14 @@
|
|
|
338
338
|
"type": "user",
|
|
339
339
|
"isExternal": true,
|
|
340
340
|
"sources": ["github"]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"id": "external-5",
|
|
344
|
+
"name": "Dorian",
|
|
345
|
+
"email": "Dorian@email.com",
|
|
346
|
+
"avatarUrl": "https://ptc-directory-sited-static.us-east-1.staging.public.atl-paas.net/teams/avatars/4.svg",
|
|
347
|
+
"type": "user",
|
|
348
|
+
"isExternal": true,
|
|
349
|
+
"sources": []
|
|
341
350
|
}
|
|
342
351
|
]
|
|
@@ -115,6 +115,24 @@ var simpleMockProfilecardClient = function simpleMockProfilecardClient(modifyRes
|
|
|
115
115
|
return Promise.reject({
|
|
116
116
|
reason: 'not built yet'
|
|
117
117
|
});
|
|
118
|
+
},
|
|
119
|
+
getReportingLines: function getReportingLines(userId) {
|
|
120
|
+
var reportingLinesUsers = _profilecardData.profilecardData.map(function (user, index) {
|
|
121
|
+
return {
|
|
122
|
+
accountIdentifier: '123456:12345-67890-' + index,
|
|
123
|
+
identifierType: 'ATLASSIAN_ID',
|
|
124
|
+
pii: {
|
|
125
|
+
name: user.User.fullName,
|
|
126
|
+
picture: user.User.avatarUrl
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
var halfCount = Math.ceil(reportingLinesUsers.length / 2);
|
|
132
|
+
return Promise.resolve({
|
|
133
|
+
managers: reportingLinesUsers.slice(0, halfCount),
|
|
134
|
+
reports: reportingLinesUsers.slice(-halfCount)
|
|
135
|
+
});
|
|
118
136
|
}
|
|
119
137
|
};
|
|
120
138
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -338,5 +338,14 @@
|
|
|
338
338
|
"type": "user",
|
|
339
339
|
"isExternal": true,
|
|
340
340
|
"sources": ["github"]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"id": "external-5",
|
|
344
|
+
"name": "Dorian",
|
|
345
|
+
"email": "Dorian@email.com",
|
|
346
|
+
"avatarUrl": "https://ptc-directory-sited-static.us-east-1.staging.public.atl-paas.net/teams/avatars/4.svg",
|
|
347
|
+
"type": "user",
|
|
348
|
+
"isExternal": true,
|
|
349
|
+
"sources": []
|
|
341
350
|
}
|
|
342
351
|
]
|
|
@@ -67,5 +67,20 @@ export const simpleMockProfilecardClient = modifyResponse => ({
|
|
|
67
67
|
return Promise.reject({
|
|
68
68
|
reason: 'not built yet'
|
|
69
69
|
});
|
|
70
|
+
},
|
|
71
|
+
getReportingLines: userId => {
|
|
72
|
+
const reportingLinesUsers = profilecardData.map((user, index) => ({
|
|
73
|
+
accountIdentifier: '123456:12345-67890-' + index,
|
|
74
|
+
identifierType: 'ATLASSIAN_ID',
|
|
75
|
+
pii: {
|
|
76
|
+
name: user.User.fullName,
|
|
77
|
+
picture: user.User.avatarUrl
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
const halfCount = Math.ceil(reportingLinesUsers.length / 2);
|
|
81
|
+
return Promise.resolve({
|
|
82
|
+
managers: reportingLinesUsers.slice(0, halfCount),
|
|
83
|
+
reports: reportingLinesUsers.slice(-halfCount)
|
|
84
|
+
});
|
|
70
85
|
}
|
|
71
86
|
});
|
package/dist/es2019/version.json
CHANGED
|
@@ -338,5 +338,14 @@
|
|
|
338
338
|
"type": "user",
|
|
339
339
|
"isExternal": true,
|
|
340
340
|
"sources": ["github"]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"id": "external-5",
|
|
344
|
+
"name": "Dorian",
|
|
345
|
+
"email": "Dorian@email.com",
|
|
346
|
+
"avatarUrl": "https://ptc-directory-sited-static.us-east-1.staging.public.atl-paas.net/teams/avatars/4.svg",
|
|
347
|
+
"type": "user",
|
|
348
|
+
"isExternal": true,
|
|
349
|
+
"sources": []
|
|
341
350
|
}
|
|
342
351
|
]
|
|
@@ -99,6 +99,23 @@ export var simpleMockProfilecardClient = function simpleMockProfilecardClient(mo
|
|
|
99
99
|
return Promise.reject({
|
|
100
100
|
reason: 'not built yet'
|
|
101
101
|
});
|
|
102
|
+
},
|
|
103
|
+
getReportingLines: function getReportingLines(userId) {
|
|
104
|
+
var reportingLinesUsers = profilecardData.map(function (user, index) {
|
|
105
|
+
return {
|
|
106
|
+
accountIdentifier: '123456:12345-67890-' + index,
|
|
107
|
+
identifierType: 'ATLASSIAN_ID',
|
|
108
|
+
pii: {
|
|
109
|
+
name: user.User.fullName,
|
|
110
|
+
picture: user.User.avatarUrl
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
var halfCount = Math.ceil(reportingLinesUsers.length / 2);
|
|
115
|
+
return Promise.resolve({
|
|
116
|
+
managers: reportingLinesUsers.slice(0, halfCount),
|
|
117
|
+
reports: reportingLinesUsers.slice(-halfCount)
|
|
118
|
+
});
|
|
102
119
|
}
|
|
103
120
|
};
|
|
104
121
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -338,5 +338,14 @@
|
|
|
338
338
|
"type": "user",
|
|
339
339
|
"isExternal": true,
|
|
340
340
|
"sources": ["github"]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"id": "external-5",
|
|
344
|
+
"name": "Dorian",
|
|
345
|
+
"email": "Dorian@email.com",
|
|
346
|
+
"avatarUrl": "https://ptc-directory-sited-static.us-east-1.staging.public.atl-paas.net/teams/avatars/4.svg",
|
|
347
|
+
"type": "user",
|
|
348
|
+
"isExternal": true,
|
|
349
|
+
"sources": []
|
|
341
350
|
}
|
|
342
351
|
]
|
|
@@ -2,4 +2,22 @@ export declare function getMockProfilecardClient(BaseProfileClient: any, modifyR
|
|
|
2
2
|
export declare const simpleMockProfilecardClient: (modifyResponse: any) => {
|
|
3
3
|
getProfile: (cloudId: string, userId: string) => Promise<any>;
|
|
4
4
|
getTeamProfile: (orgId: string, teamId: string, analytics: any) => Promise<never>;
|
|
5
|
+
getReportingLines: (userId: string) => Promise<{
|
|
6
|
+
managers: {
|
|
7
|
+
accountIdentifier: string;
|
|
8
|
+
identifierType: string;
|
|
9
|
+
pii: {
|
|
10
|
+
name: string;
|
|
11
|
+
picture: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
}[];
|
|
14
|
+
reports: {
|
|
15
|
+
accountIdentifier: string;
|
|
16
|
+
identifierType: string;
|
|
17
|
+
pii: {
|
|
18
|
+
name: string;
|
|
19
|
+
picture: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
}>;
|
|
5
23
|
};
|