synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
90 lines (89 loc) • 2.05 kB
JavaScript
import { mockUserGroupHeader as l, MOCK_USER_ID as d } from "../user/mock_user_profile.js";
import { MOCK_TEAM_ID_2 as I, MOCK_TEAM_ID_3 as g, MOCK_TEAM_ID_4 as h, MOCK_TEAM_ID_5 as _, MOCK_CHALLENGE_PARTICIPANT_TEAM_ID as r } from "../team/mockTeam.js";
const a = "1234", u = "syn12345678", o = "f1b29c62-e987-4e69-9cec-198bf017a586", m = (e) => {
const t = Math.pow(10, e - 1);
return Math.floor(Math.random() * 9 * t + t);
}, M = {
id: a,
etag: o,
projectId: u,
participantTeamId: String(r)
}, T = {
teamId: String(r),
member: l,
isAdmin: !1
}, f = (e = !1, t = !0) => ({
teamId: String(r),
userId: d.toString(),
isMember: e,
hasOpenInvitation: !1,
hasOpenRequest: !1,
canJoin: t,
membershipApprovalRequired: !1,
hasUnmetAccessRequirement: !1,
canSendEmail: !0
}), s = (e) => {
const t = m(6).toString(), n = m(6).toString();
return {
id: t,
etag: o,
challengeId: a,
teamId: n,
message: `Message for team ${n}`,
...e
};
}, E = () => {
const e = [];
do
e.push(s());
while (e.length < 10);
return {
results: e,
totalNumberOfResults: e.length
};
}, O = (e) => ({
list: e.map((n, c) => {
const i = c % 2 === 0;
return {
id: n.teamId,
name: `Team ${n.teamId}`,
description: `Description for team ${n.teamId}`,
icon: "",
canPublicJoin: i,
etag: o,
createdOn: "2023-05-25T14:24:28.840Z",
modifiedOn: "",
createdBy: "",
modifiedBy: ""
};
})
}), A = [
s({
teamId: String(I),
challengeId: a
}),
s({
teamId: String(g),
challengeId: a
}),
s({
teamId: String(h),
challengeId: a
}),
s({
teamId: String(_),
challengeId: a
})
];
export {
a as MOCK_CHALLENGE_ID,
u as MOCK_CHALLENGE_PROJECT_ID,
M as mockChallenge,
s as mockChallengeTeam,
T as mockChallengeTeamMember,
f as mockChallengeTeamMembershipStatus,
E as mockChallengeTeamResults,
A as mockRegisteredChallengeTeams,
O as mockTeamList
};
//# sourceMappingURL=mockChallenge.js.map