@burdenoff/microfe-devportal 2026.705.3 → 2026.707.1
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/dist/devportal/DevportalRoutes.js +19 -12
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +97 -74
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/InvitationDecisionPage.js +142 -0
- package/dist/devportal/pages/InvitationDecisionPage.js.map +1 -0
- package/dist/devportal/pages/OrganizationDetailPage.js +564 -403
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +354 -339
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/dist/generated/global-operations.js +146 -84
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
|
+
import { EmptyState as t } from "../components/EmptyState.js";
|
|
3
|
+
import { useAcceptInvitationMutation as n, useGetInvitationByTokenQuery as r, useRejectInvitationMutation as i } from "../../generated/global-operations.js";
|
|
4
|
+
import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
|
|
5
|
+
import "../hooks/index.js";
|
|
6
|
+
import { CheckCircle as s, Loader2 as c, Mail as l, Shield as u, XCircle as d } from "lucide-react";
|
|
7
|
+
import { useParams as f } from "react-router-dom";
|
|
8
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
//#region src/devportal/pages/InvitationDecisionPage.tsx
|
|
10
|
+
var h = () => {
|
|
11
|
+
let { token: h } = f(), { navigate: g, basePath: _ } = e(), { data: v, loading: y, error: b } = r({
|
|
12
|
+
variables: { token: h ?? "" },
|
|
13
|
+
skip: !h,
|
|
14
|
+
fetchPolicy: "cache-and-network"
|
|
15
|
+
}), [x, { loading: S, data: C }] = n(), [w, { loading: T, data: E }] = i(), D = v?.developerOrgInvitationByToken, O = C?.acceptDeveloperOrgInvitation, k = E?.rejectDeveloperOrgInvitation, A = async () => {
|
|
16
|
+
h && await x({ variables: { token: h } });
|
|
17
|
+
}, j = async () => {
|
|
18
|
+
h && await w({ variables: { token: h } });
|
|
19
|
+
};
|
|
20
|
+
return y && !D ? /* @__PURE__ */ p(a, {
|
|
21
|
+
title: "Developer Team Invitation",
|
|
22
|
+
children: /* @__PURE__ */ p("div", {
|
|
23
|
+
className: "flex items-center justify-center py-16 text-text-secondary",
|
|
24
|
+
children: /* @__PURE__ */ p(c, { className: "h-8 w-8 animate-spin" })
|
|
25
|
+
})
|
|
26
|
+
}) : b || !D ? /* @__PURE__ */ p(a, {
|
|
27
|
+
title: "Developer Team Invitation",
|
|
28
|
+
children: /* @__PURE__ */ p(t, {
|
|
29
|
+
icon: /* @__PURE__ */ p(d, {
|
|
30
|
+
size: 32,
|
|
31
|
+
className: "text-status-error-text"
|
|
32
|
+
}),
|
|
33
|
+
title: "Invitation not available",
|
|
34
|
+
description: b?.message || "This invitation is invalid, expired, or not available to your signed-in account."
|
|
35
|
+
})
|
|
36
|
+
}) : O ? /* @__PURE__ */ p(a, {
|
|
37
|
+
title: "Invitation accepted",
|
|
38
|
+
children: /* @__PURE__ */ p(t, {
|
|
39
|
+
icon: /* @__PURE__ */ p(s, {
|
|
40
|
+
size: 32,
|
|
41
|
+
className: "text-status-success-text"
|
|
42
|
+
}),
|
|
43
|
+
title: "You joined the developer organization",
|
|
44
|
+
description: `You now have ${D.role.toLowerCase()} access to ${D.organization.name}.`,
|
|
45
|
+
action: /* @__PURE__ */ p("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
onClick: () => g?.(`${_}/organizations/${D.organization.id}`),
|
|
48
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
49
|
+
children: "Open organization"
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
}) : k ? /* @__PURE__ */ p(a, {
|
|
53
|
+
title: "Invitation declined",
|
|
54
|
+
children: /* @__PURE__ */ p(t, {
|
|
55
|
+
icon: /* @__PURE__ */ p(d, {
|
|
56
|
+
size: 32,
|
|
57
|
+
className: "text-status-warning-text"
|
|
58
|
+
}),
|
|
59
|
+
title: "Invitation declined",
|
|
60
|
+
description: `You declined the invitation to join ${D.organization.name}.`,
|
|
61
|
+
action: /* @__PURE__ */ p("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
onClick: () => g?.(`${_}`),
|
|
64
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken",
|
|
65
|
+
children: "Return to Devportal"
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
}) : /* @__PURE__ */ p(a, {
|
|
69
|
+
title: "Developer Team Invitation",
|
|
70
|
+
description: "Review your invitation to join a developer organization",
|
|
71
|
+
children: /* @__PURE__ */ m("div", {
|
|
72
|
+
className: "mx-auto max-w-2xl space-y-6",
|
|
73
|
+
children: [/* @__PURE__ */ p(o, {
|
|
74
|
+
title: "Invitation details",
|
|
75
|
+
children: /* @__PURE__ */ m("div", {
|
|
76
|
+
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-4",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
79
|
+
className: "text-sm text-text-secondary",
|
|
80
|
+
children: "Organization"
|
|
81
|
+
}), /* @__PURE__ */ p("p", {
|
|
82
|
+
className: "text-lg font-semibold text-text-primary",
|
|
83
|
+
children: D.organization.name
|
|
84
|
+
})] }),
|
|
85
|
+
/* @__PURE__ */ m("div", {
|
|
86
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
87
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
88
|
+
className: "text-sm text-text-secondary",
|
|
89
|
+
children: "Invited email"
|
|
90
|
+
}), /* @__PURE__ */ m("p", {
|
|
91
|
+
className: "flex items-center gap-2 text-text-primary",
|
|
92
|
+
children: [/* @__PURE__ */ p(l, { size: 14 }), D.invitedEmail]
|
|
93
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
94
|
+
className: "text-sm text-text-secondary",
|
|
95
|
+
children: "Role"
|
|
96
|
+
}), /* @__PURE__ */ m("p", {
|
|
97
|
+
className: "flex items-center gap-2 text-text-primary",
|
|
98
|
+
children: [/* @__PURE__ */ p(u, { size: 14 }), D.role]
|
|
99
|
+
})] })]
|
|
100
|
+
}),
|
|
101
|
+
D.message ? /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
102
|
+
className: "text-sm text-text-secondary",
|
|
103
|
+
children: "Message"
|
|
104
|
+
}), /* @__PURE__ */ p("p", {
|
|
105
|
+
className: "rounded-md bg-bg-sunken px-3 py-2 text-sm text-text-primary whitespace-pre-line",
|
|
106
|
+
children: D.message
|
|
107
|
+
})] }) : null,
|
|
108
|
+
/* @__PURE__ */ m("p", {
|
|
109
|
+
className: "text-xs text-text-secondary",
|
|
110
|
+
children: ["Expires on ", new Date(D.expiresAt).toLocaleString()]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
}), /* @__PURE__ */ m("div", {
|
|
115
|
+
className: "flex flex-wrap gap-3 justify-end",
|
|
116
|
+
children: [/* @__PURE__ */ m("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: () => void j(),
|
|
119
|
+
disabled: S || T,
|
|
120
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50",
|
|
121
|
+
children: [T ? /* @__PURE__ */ p(c, {
|
|
122
|
+
size: 14,
|
|
123
|
+
className: "animate-spin"
|
|
124
|
+
}) : null, "Decline"]
|
|
125
|
+
}), /* @__PURE__ */ m("button", {
|
|
126
|
+
type: "button",
|
|
127
|
+
onClick: () => void A(),
|
|
128
|
+
disabled: S || T,
|
|
129
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
130
|
+
children: [S ? /* @__PURE__ */ p(c, {
|
|
131
|
+
size: 14,
|
|
132
|
+
className: "animate-spin"
|
|
133
|
+
}) : null, "Accept invitation"]
|
|
134
|
+
})]
|
|
135
|
+
})]
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
//#endregion
|
|
140
|
+
export { h as InvitationDecisionPage };
|
|
141
|
+
|
|
142
|
+
//# sourceMappingURL=InvitationDecisionPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationDecisionPage.js","names":[],"sources":["../../../src/devportal/pages/InvitationDecisionPage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport { CheckCircle, Loader2, Mail, Shield, XCircle } from \"lucide-react\";\n\nimport { PageLayout, PageSection } from \"../components/PageLayout\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { useDevportal } from \"../providers/DevportalProvider\";\nimport {\n useAcceptInvitationMutation,\n useGetInvitationByTokenQuery,\n useRejectInvitationMutation,\n} from \"../hooks\";\n\nexport const InvitationDecisionPage: FC = () => {\n const { token } = useParams<{ token: string }>();\n const { navigate, basePath } = useDevportal();\n\n const { data, loading, error } = useGetInvitationByTokenQuery({\n variables: { token: token ?? \"\" },\n skip: !token,\n fetchPolicy: \"cache-and-network\",\n });\n\n const [acceptInvitation, { loading: accepting, data: acceptedData }] =\n useAcceptInvitationMutation();\n const [rejectInvitation, { loading: rejecting, data: rejectedData }] =\n useRejectInvitationMutation();\n\n const invitation = data?.developerOrgInvitationByToken;\n const acceptedMember = acceptedData?.acceptDeveloperOrgInvitation;\n const rejected = rejectedData?.rejectDeveloperOrgInvitation;\n\n const handleAccept = async () => {\n if (!token) return;\n await acceptInvitation({ variables: { token } });\n };\n\n const handleReject = async () => {\n if (!token) return;\n await rejectInvitation({ variables: { token } });\n };\n\n if (loading && !invitation) {\n return (\n <PageLayout title=\"Developer Team Invitation\">\n <div className=\"flex items-center justify-center py-16 text-text-secondary\">\n <Loader2 className=\"h-8 w-8 animate-spin\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || !invitation) {\n return (\n <PageLayout title=\"Developer Team Invitation\">\n <EmptyState\n icon={<XCircle size={32} className=\"text-status-error-text\" />}\n title=\"Invitation not available\"\n description={\n error?.message ||\n \"This invitation is invalid, expired, or not available to your signed-in account.\"\n }\n />\n </PageLayout>\n );\n }\n\n if (acceptedMember) {\n return (\n <PageLayout title=\"Invitation accepted\">\n <EmptyState\n icon={<CheckCircle size={32} className=\"text-status-success-text\" />}\n title=\"You joined the developer organization\"\n description={`You now have ${invitation.role.toLowerCase()} access to ${invitation.organization.name}.`}\n action={\n <button\n type=\"button\"\n onClick={() =>\n navigate?.(`${basePath}/organizations/${invitation.organization.id}`)\n }\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n Open organization\n </button>\n }\n />\n </PageLayout>\n );\n }\n\n if (rejected) {\n return (\n <PageLayout title=\"Invitation declined\">\n <EmptyState\n icon={<XCircle size={32} className=\"text-status-warning-text\" />}\n title=\"Invitation declined\"\n description={`You declined the invitation to join ${invitation.organization.name}.`}\n action={\n <button\n type=\"button\"\n onClick={() => navigate?.(`${basePath}`)}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken\"\n >\n Return to Devportal\n </button>\n }\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"Developer Team Invitation\"\n description=\"Review your invitation to join a developer organization\"\n >\n <div className=\"mx-auto max-w-2xl space-y-6\">\n <PageSection title=\"Invitation details\">\n <div className=\"rounded-card border border-border-seam bg-bg-surface p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Organization</p>\n <p className=\"text-lg font-semibold text-text-primary\">\n {invitation.organization.name}\n </p>\n </div>\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invited email</p>\n <p className=\"flex items-center gap-2 text-text-primary\">\n <Mail size={14} />\n {invitation.invitedEmail}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Role</p>\n <p className=\"flex items-center gap-2 text-text-primary\">\n <Shield size={14} />\n {invitation.role}\n </p>\n </div>\n </div>\n {invitation.message ? (\n <div>\n <p className=\"text-sm text-text-secondary\">Message</p>\n <p className=\"rounded-md bg-bg-sunken px-3 py-2 text-sm text-text-primary whitespace-pre-line\">\n {invitation.message}\n </p>\n </div>\n ) : null}\n <p className=\"text-xs text-text-secondary\">\n Expires on {new Date(invitation.expiresAt).toLocaleString()}\n </p>\n </div>\n </PageSection>\n\n <div className=\"flex flex-wrap gap-3 justify-end\">\n <button\n type=\"button\"\n onClick={() => void handleReject()}\n disabled={accepting || rejecting}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50\"\n >\n {rejecting ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Decline\n </button>\n <button\n type=\"button\"\n onClick={() => void handleAccept()}\n disabled={accepting || rejecting}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {accepting ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Accept invitation\n </button>\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;AAaA,IAAa,UAAmC;CAC9C,IAAM,EAAE,aAAU,GAA8B,EAC1C,EAAE,aAAU,gBAAa,G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