@nexys/user-management-web 0.0.26

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.
Files changed (77) hide show
  1. package/README.md +61 -0
  2. package/components.json +21 -0
  3. package/package.json +66 -0
  4. package/src/components/audit/audit-log-table.test.tsx +91 -0
  5. package/src/components/audit/audit-log-table.tsx +226 -0
  6. package/src/components/auth/accept-invitation-card.tsx +100 -0
  7. package/src/components/auth/forgot-password-form.tsx +92 -0
  8. package/src/components/auth/reset-password-form.tsx +143 -0
  9. package/src/components/auth/sign-in-form.test.tsx +140 -0
  10. package/src/components/auth/sign-in-form.tsx +509 -0
  11. package/src/components/auth/sign-up-form.tsx +123 -0
  12. package/src/components/layout/app-shell.tsx +189 -0
  13. package/src/components/layout/auth-shell.tsx +28 -0
  14. package/src/components/layout/theme-toggle.tsx +55 -0
  15. package/src/components/layout/user-menu.tsx +84 -0
  16. package/src/components/primitives/empty-state.tsx +40 -0
  17. package/src/components/primitives/page-header.tsx +27 -0
  18. package/src/components/primitives/spinner.tsx +28 -0
  19. package/src/components/profile/api-tokens-card.tsx +235 -0
  20. package/src/components/profile/change-password-form.tsx +158 -0
  21. package/src/components/profile/passkeys-card.tsx +180 -0
  22. package/src/components/profile/profile-card.tsx +33 -0
  23. package/src/components/profile/two-factor-card.tsx +226 -0
  24. package/src/components/projects/project-consents.tsx +572 -0
  25. package/src/components/projects/project-create-dialog.tsx +209 -0
  26. package/src/components/projects/project-detail-tabs.tsx +63 -0
  27. package/src/components/projects/project-email-templates.tsx +282 -0
  28. package/src/components/projects/project-notices.tsx +458 -0
  29. package/src/components/projects/project-settings.tsx +1133 -0
  30. package/src/components/projects/project-tenants.tsx +107 -0
  31. package/src/components/projects/projects-table.test.tsx +95 -0
  32. package/src/components/projects/projects-table.tsx +240 -0
  33. package/src/components/roles/role-badge.tsx +91 -0
  34. package/src/components/roles/role-select.tsx +76 -0
  35. package/src/components/tenants/tenant-create-dialog.tsx +163 -0
  36. package/src/components/tenants/tenant-detail-tabs.tsx +51 -0
  37. package/src/components/tenants/tenant-members.tsx +578 -0
  38. package/src/components/tenants/tenant-roles.test.tsx +91 -0
  39. package/src/components/tenants/tenant-roles.tsx +414 -0
  40. package/src/components/tenants/tenant-settings.tsx +385 -0
  41. package/src/components/tenants/tenants-table.test.tsx +71 -0
  42. package/src/components/tenants/tenants-table.tsx +245 -0
  43. package/src/components/ui/alert.tsx +52 -0
  44. package/src/components/ui/avatar.tsx +46 -0
  45. package/src/components/ui/badge.tsx +32 -0
  46. package/src/components/ui/button.tsx +64 -0
  47. package/src/components/ui/card.tsx +65 -0
  48. package/src/components/ui/dialog.tsx +99 -0
  49. package/src/components/ui/dropdown-menu.tsx +97 -0
  50. package/src/components/ui/field.tsx +44 -0
  51. package/src/components/ui/input.tsx +23 -0
  52. package/src/components/ui/label.tsx +19 -0
  53. package/src/components/ui/select.tsx +87 -0
  54. package/src/components/ui/separator.tsx +22 -0
  55. package/src/components/ui/skeleton.tsx +13 -0
  56. package/src/components/ui/switch.tsx +29 -0
  57. package/src/components/ui/table.tsx +87 -0
  58. package/src/components/ui/tabs.tsx +51 -0
  59. package/src/components/ui/textarea.tsx +22 -0
  60. package/src/components/ui/tooltip.tsx +27 -0
  61. package/src/components/users/user-create-dialog.tsx +267 -0
  62. package/src/components/users/user-delete-dialog.tsx +88 -0
  63. package/src/components/users/user-detail.tsx +843 -0
  64. package/src/components/users/users-table.test.tsx +97 -0
  65. package/src/components/users/users-table.tsx +382 -0
  66. package/src/context/auth-context.tsx +124 -0
  67. package/src/context/theme-context.test.tsx +78 -0
  68. package/src/context/theme-context.tsx +110 -0
  69. package/src/hooks/use-call.ts +64 -0
  70. package/src/index.ts +159 -0
  71. package/src/lib/error-message.ts +16 -0
  72. package/src/lib/utils.test.ts +61 -0
  73. package/src/lib/utils.ts +79 -0
  74. package/src/lib/webauthn.ts +36 -0
  75. package/src/styles.css +107 -0
  76. package/src/test-setup.ts +5 -0
  77. package/tailwind.preset.cjs +15 -0
@@ -0,0 +1,209 @@
1
+ import { type TenancyMode } from "@nexys/user-management-client";
2
+ import { AlertCircle, Plus } from "lucide-react";
3
+ import { useState, type FormEvent, type ReactNode } from "react";
4
+
5
+ import { useUmClient } from "../../context/auth-context.js";
6
+ import { errorMessage } from "../../lib/error-message.js";
7
+ import { Alert, AlertDescription } from "../ui/alert.js";
8
+ import { Button } from "../ui/button.js";
9
+ import {
10
+ Dialog,
11
+ DialogContent,
12
+ DialogDescription,
13
+ DialogFooter,
14
+ DialogHeader,
15
+ DialogTitle,
16
+ DialogTrigger,
17
+ } from "../ui/dialog.js";
18
+ import { Field } from "../ui/field.js";
19
+ import { Input } from "../ui/input.js";
20
+ import { Label } from "../ui/label.js";
21
+ import {
22
+ Select,
23
+ SelectContent,
24
+ SelectItem,
25
+ SelectTrigger,
26
+ SelectValue,
27
+ } from "../ui/select.js";
28
+ import { Switch } from "../ui/switch.js";
29
+
30
+ export interface ProjectCreateDialogProps {
31
+ /** Override the trigger button. */
32
+ trigger?: ReactNode;
33
+ onCreated?: (project: { id: string; name: string; slug: string }) => void;
34
+ }
35
+
36
+ export const ProjectCreateDialog = ({ trigger, onCreated }: ProjectCreateDialogProps) => {
37
+ const client = useUmClient();
38
+ const [open, setOpen] = useState(false);
39
+ const [name, setName] = useState("");
40
+ const [slug, setSlug] = useState("");
41
+ const [ownerEmail, setOwnerEmail] = useState("");
42
+ const [tenancyMode, setTenancyMode] = useState<TenancyMode>("multi");
43
+ const [allowSignup, setAllowSignup] = useState(false);
44
+ const [allowTenantCreation, setAllowTenantCreation] = useState(false);
45
+ const [loading, setLoading] = useState(false);
46
+ const [error, setError] = useState<string | null>(null);
47
+
48
+ const reset = () => {
49
+ setName("");
50
+ setSlug("");
51
+ setOwnerEmail("");
52
+ setTenancyMode("multi");
53
+ setAllowSignup(false);
54
+ setAllowTenantCreation(false);
55
+ setError(null);
56
+ setLoading(false);
57
+ };
58
+
59
+ const submit = async (e: FormEvent) => {
60
+ e.preventDefault();
61
+ setLoading(true);
62
+ setError(null);
63
+ const res = await client.createProject({
64
+ name: name.trim(),
65
+ slug: slug.trim() || undefined,
66
+ ownerEmail: ownerEmail.trim() || undefined,
67
+ tenancyMode,
68
+ allowSignup,
69
+ allowTenantCreation,
70
+ });
71
+ setLoading(false);
72
+ if (res.ok) {
73
+ onCreated?.({ id: res.data.id, name: res.data.name, slug: res.data.slug });
74
+ reset();
75
+ setOpen(false);
76
+ } else {
77
+ setError(errorMessage(res.error, "Couldn't create product."));
78
+ }
79
+ };
80
+
81
+ return (
82
+ <Dialog
83
+ open={open}
84
+ onOpenChange={(o) => {
85
+ setOpen(o);
86
+ if (!o) reset();
87
+ }}
88
+ >
89
+ <DialogTrigger asChild>
90
+ {trigger ?? (
91
+ <Button>
92
+ <Plus />
93
+ New product
94
+ </Button>
95
+ )}
96
+ </DialogTrigger>
97
+ <DialogContent>
98
+ <DialogHeader>
99
+ <DialogTitle>Create a new product</DialogTitle>
100
+ <DialogDescription>
101
+ Each product is an isolated user-management space (project) with
102
+ its own tenancy configuration.
103
+ </DialogDescription>
104
+ </DialogHeader>
105
+ <form onSubmit={submit} className="grid gap-4" noValidate>
106
+ <Field label="Name" htmlFor="project-name" required>
107
+ <Input
108
+ id="project-name"
109
+ autoFocus
110
+ required
111
+ value={name}
112
+ onChange={(e) => setName(e.target.value)}
113
+ placeholder="Digis"
114
+ />
115
+ </Field>
116
+ <Field
117
+ label="Slug"
118
+ htmlFor="project-slug"
119
+ description="URL-safe identifier. Leave blank to derive from the name."
120
+ >
121
+ <Input
122
+ id="project-slug"
123
+ value={slug}
124
+ onChange={(e) => setSlug(e.target.value.toLowerCase().replace(/\s+/g, "-"))}
125
+ placeholder="digis"
126
+ />
127
+ </Field>
128
+ <Field
129
+ label="Owner"
130
+ htmlFor="project-owner"
131
+ description="Email of the account that will own this product. Leave blank to own it yourself."
132
+ >
133
+ <Input
134
+ id="project-owner"
135
+ type="email"
136
+ value={ownerEmail}
137
+ onChange={(e) => setOwnerEmail(e.target.value)}
138
+ placeholder="you@example.com"
139
+ />
140
+ </Field>
141
+ <Field
142
+ label="Tenancy"
143
+ htmlFor="project-tenancy"
144
+ description="Single gives the product exactly one tenant, created now, which everyone who joins the product is put in; multi allows any number."
145
+ >
146
+ <Select
147
+ value={tenancyMode}
148
+ onValueChange={(v) => setTenancyMode(v as TenancyMode)}
149
+ >
150
+ <SelectTrigger id="project-tenancy">
151
+ <SelectValue />
152
+ </SelectTrigger>
153
+ <SelectContent>
154
+ <SelectItem value="multi">Multi-tenant</SelectItem>
155
+ <SelectItem value="single">Single tenant</SelectItem>
156
+ </SelectContent>
157
+ </Select>
158
+ </Field>
159
+ <div className="flex items-center justify-between gap-4">
160
+ <div className="grid gap-0.5">
161
+ <Label htmlFor="project-allow-signup">Open sign-up</Label>
162
+ <p className="text-muted-foreground text-xs">
163
+ Allow self-service sign-up scoped to this product.
164
+ </p>
165
+ </div>
166
+ <Switch
167
+ id="project-allow-signup"
168
+ checked={allowSignup}
169
+ onCheckedChange={setAllowSignup}
170
+ />
171
+ </div>
172
+ <div className="flex items-center justify-between gap-4">
173
+ <div className="grid gap-0.5">
174
+ <Label htmlFor="project-allow-tenants">Self-serve tenants</Label>
175
+ <p className="text-muted-foreground text-xs">
176
+ Allow any authenticated user to create a tenant inside this
177
+ product.
178
+ </p>
179
+ </div>
180
+ <Switch
181
+ id="project-allow-tenants"
182
+ checked={allowTenantCreation}
183
+ onCheckedChange={setAllowTenantCreation}
184
+ />
185
+ </div>
186
+ {error ? (
187
+ <Alert variant="destructive">
188
+ <AlertCircle />
189
+ <AlertDescription>{error}</AlertDescription>
190
+ </Alert>
191
+ ) : null}
192
+ <DialogFooter>
193
+ <Button
194
+ type="button"
195
+ variant="ghost"
196
+ onClick={() => setOpen(false)}
197
+ disabled={loading}
198
+ >
199
+ Cancel
200
+ </Button>
201
+ <Button type="submit" loading={loading} disabled={!name.trim()}>
202
+ Create product
203
+ </Button>
204
+ </DialogFooter>
205
+ </form>
206
+ </DialogContent>
207
+ </Dialog>
208
+ );
209
+ };
@@ -0,0 +1,63 @@
1
+
2
+ import { useCall } from "../../hooks/use-call.js";
3
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs.js";
4
+ import { ProjectConsents } from "./project-consents.js";
5
+ import { ProjectEmailTemplates } from "./project-email-templates.js";
6
+ import { ProjectNotices } from "./project-notices.js";
7
+ import { ProjectSettings } from "./project-settings.js";
8
+ import { ProjectTenants } from "./project-tenants.js";
9
+
10
+ export interface ProjectDetailTabsProps {
11
+ projectId: string;
12
+ canManage?: boolean;
13
+ canDelete?: boolean;
14
+ onDeleted?: () => void;
15
+ onSelectTenant?: (id: string) => void;
16
+ }
17
+
18
+ export const ProjectDetailTabs = ({
19
+ projectId,
20
+ canManage = false,
21
+ canDelete = false,
22
+ onDeleted,
23
+ onSelectTenant,
24
+ }: ProjectDetailTabsProps) => {
25
+ // The email tab opens on the product's default locale.
26
+ const { data } = useCall("getProject", { projectId });
27
+
28
+ return (
29
+ <Tabs defaultValue="tenants">
30
+ <TabsList>
31
+ <TabsTrigger value="tenants">Tenants</TabsTrigger>
32
+ <TabsTrigger value="emails">Emails</TabsTrigger>
33
+ <TabsTrigger value="consents">Consents</TabsTrigger>
34
+ <TabsTrigger value="notices">Notices</TabsTrigger>
35
+ <TabsTrigger value="settings">Settings</TabsTrigger>
36
+ </TabsList>
37
+ <TabsContent value="tenants" className="mt-4">
38
+ <ProjectTenants projectId={projectId} onSelectTenant={onSelectTenant} />
39
+ </TabsContent>
40
+ <TabsContent value="emails" className="mt-4">
41
+ <ProjectEmailTemplates
42
+ projectId={projectId}
43
+ defaultLocale={data?.defaultLocale ?? "en"}
44
+ canManage={canManage}
45
+ />
46
+ </TabsContent>
47
+ <TabsContent value="consents" className="mt-4">
48
+ <ProjectConsents projectId={projectId} canManage={canManage} />
49
+ </TabsContent>
50
+ <TabsContent value="notices" className="mt-4">
51
+ <ProjectNotices projectId={projectId} canManage={canManage} />
52
+ </TabsContent>
53
+ <TabsContent value="settings" className="mt-4">
54
+ <ProjectSettings
55
+ projectId={projectId}
56
+ canManage={canManage}
57
+ canDelete={canDelete}
58
+ onDeleted={onDeleted}
59
+ />
60
+ </TabsContent>
61
+ </Tabs>
62
+ );
63
+ };
@@ -0,0 +1,282 @@
1
+ import {
2
+ type EmailTemplateRow,
3
+ } from "@nexys/user-management-client";
4
+ import { AlertCircle, Check, RotateCcw, Save } from "lucide-react";
5
+ import { useEffect, useState, type FormEvent } from "react";
6
+
7
+ import { useUmClient } from "../../context/auth-context.js";
8
+ import { useCall } from "../../hooks/use-call.js";
9
+ import { errorMessage } from "../../lib/error-message.js";
10
+ import { Alert, AlertDescription } from "../ui/alert.js";
11
+ import { Badge } from "../ui/badge.js";
12
+ import { Button } from "../ui/button.js";
13
+ import { Field } from "../ui/field.js";
14
+ import { Input } from "../ui/input.js";
15
+ import { Label } from "../ui/label.js";
16
+ import { Skeleton } from "../ui/skeleton.js";
17
+ import { Textarea } from "../ui/textarea.js";
18
+
19
+ const TEMPLATE_LABELS: Record<string, string> = {
20
+ verification: "Verify email address",
21
+ magic_link: "Magic sign-in link",
22
+ password_reset: "Password reset",
23
+ invitation: "Tenant invitation",
24
+ };
25
+
26
+ const SOURCE_LABELS: Record<EmailTemplateRow["source"], string> = {
27
+ project: "customised",
28
+ global: "inherited (global default)",
29
+ builtin: "inherited (built-in)",
30
+ };
31
+
32
+ export interface ProjectEmailTemplatesProps {
33
+ projectId: string;
34
+ /** The product's default locale — the variant shown first. */
35
+ defaultLocale: string;
36
+ canManage?: boolean;
37
+ }
38
+
39
+ /**
40
+ * Per-product editor for the transactional emails. Each template shows
41
+ * the copy that will actually be sent plus where it comes from, so an
42
+ * owner can override it or reset back to what it inherits.
43
+ */
44
+ export const ProjectEmailTemplates = ({
45
+ projectId,
46
+ defaultLocale,
47
+ canManage = false,
48
+ }: ProjectEmailTemplatesProps) => {
49
+ const [locale, setLocale] = useState(defaultLocale);
50
+ const { data, loading, error, refresh } = useCall("listProjectEmailTemplates", {
51
+ projectId,
52
+ locale,
53
+ });
54
+
55
+ // The product's default locale changed underneath us (settings saved).
56
+ useEffect(() => setLocale(defaultLocale), [defaultLocale]);
57
+
58
+ if (error) {
59
+ return (
60
+ <Alert variant="destructive">
61
+ <AlertCircle />
62
+ <AlertDescription>{errorMessage(error)}</AlertDescription>
63
+ </Alert>
64
+ );
65
+ }
66
+
67
+ return (
68
+ <div className="grid gap-4">
69
+ <LocalePicker
70
+ value={locale}
71
+ defaultLocale={defaultLocale}
72
+ onChange={setLocale}
73
+ />
74
+ {loading ? (
75
+ <>
76
+ <Skeleton className="h-28 w-full" />
77
+ <Skeleton className="h-28 w-full" />
78
+ </>
79
+ ) : (
80
+ (data?.templates ?? []).map((t) => (
81
+ <TemplateEditor
82
+ // Remount when the stored copy changes underneath the form.
83
+ key={`${t.templateKey}:${t.locale}:${t.updatedAt ?? "builtin"}`}
84
+ projectId={projectId}
85
+ locale={locale}
86
+ template={t}
87
+ canManage={canManage}
88
+ onChanged={refresh}
89
+ />
90
+ ))
91
+ )}
92
+ </div>
93
+ );
94
+ };
95
+
96
+ /**
97
+ * Locale of the variant being edited. Free text rather than a fixed
98
+ * list — the service accepts any BCP-47 tag, and a product may ship
99
+ * copy in languages this console doesn't know about.
100
+ */
101
+ const LocalePicker = ({
102
+ value,
103
+ defaultLocale,
104
+ onChange,
105
+ }: {
106
+ value: string;
107
+ defaultLocale: string;
108
+ onChange: (v: string) => void;
109
+ }) => {
110
+ const [draft, setDraft] = useState(value);
111
+ useEffect(() => setDraft(value), [value]);
112
+
113
+ return (
114
+ <form
115
+ className="flex items-end gap-2"
116
+ onSubmit={(e) => {
117
+ e.preventDefault();
118
+ const next = draft.trim().toLowerCase();
119
+ if (next) onChange(next);
120
+ }}
121
+ >
122
+ <Field
123
+ label="Locale"
124
+ htmlFor="email-template-locale"
125
+ description={`Which language variant to edit. The product default is "${defaultLocale}".`}
126
+ >
127
+ <Input
128
+ id="email-template-locale"
129
+ value={draft}
130
+ onChange={(e) => setDraft(e.target.value)}
131
+ placeholder={defaultLocale}
132
+ className="w-[8rem] font-mono"
133
+ />
134
+ </Field>
135
+ <Button
136
+ type="submit"
137
+ variant="outline"
138
+ disabled={!draft.trim() || draft.trim().toLowerCase() === value}
139
+ >
140
+ Load
141
+ </Button>
142
+ </form>
143
+ );
144
+ };
145
+
146
+ const TemplateEditor = ({
147
+ projectId,
148
+ locale,
149
+ template,
150
+ canManage,
151
+ onChanged,
152
+ }: {
153
+ projectId: string;
154
+ locale: string;
155
+ template: EmailTemplateRow;
156
+ canManage: boolean;
157
+ onChanged: () => void;
158
+ }) => {
159
+ const client = useUmClient();
160
+ const [subject, setSubject] = useState(template.subject);
161
+ const [body, setBody] = useState(template.body);
162
+ const [saving, setSaving] = useState(false);
163
+ const [saved, setSaved] = useState(false);
164
+ const [resetting, setResetting] = useState(false);
165
+ const [error, setError] = useState<string | null>(null);
166
+
167
+ const dirty =
168
+ subject.trim() !== template.subject.trim() || body !== template.body;
169
+ const overridden = template.source === "project";
170
+
171
+ const submit = async (e: FormEvent) => {
172
+ e.preventDefault();
173
+ setSaving(true);
174
+ setError(null);
175
+ setSaved(false);
176
+ const res = await client.saveProjectEmailTemplate({
177
+ projectId,
178
+ templateKey: template.templateKey,
179
+ subject: subject.trim(),
180
+ body,
181
+ locale,
182
+ });
183
+ setSaving(false);
184
+ if (res.ok) {
185
+ setSaved(true);
186
+ setTimeout(() => setSaved(false), 2000);
187
+ onChanged();
188
+ } else {
189
+ setError(errorMessage(res.error, "Couldn't save this template."));
190
+ }
191
+ };
192
+
193
+ /** Drop the override so the template falls back to what it inherits. */
194
+ const resetToInherited = async () => {
195
+ setResetting(true);
196
+ setError(null);
197
+ const res = await client.deleteProjectEmailTemplate({
198
+ projectId,
199
+ templateKey: template.templateKey,
200
+ locale,
201
+ });
202
+ setResetting(false);
203
+ if (res.ok) {
204
+ onChanged();
205
+ } else {
206
+ setError(errorMessage(res.error, "Couldn't reset this template."));
207
+ }
208
+ };
209
+
210
+ return (
211
+ <form
212
+ onSubmit={submit}
213
+ className="grid gap-3 rounded-lg border bg-card p-4"
214
+ noValidate
215
+ >
216
+ <div className="flex flex-wrap items-center justify-between gap-2">
217
+ <div className="grid gap-0.5">
218
+ <Label className="text-sm font-medium">
219
+ {TEMPLATE_LABELS[template.templateKey] ?? template.templateKey}
220
+ </Label>
221
+ <code className="text-muted-foreground font-mono text-xs">
222
+ {template.templateKey}
223
+ </code>
224
+ </div>
225
+ <Badge variant={overridden ? "default" : "muted"}>
226
+ {SOURCE_LABELS[template.source]}
227
+ </Badge>
228
+ </div>
229
+
230
+ {error ? (
231
+ <Alert variant="destructive">
232
+ <AlertCircle />
233
+ <AlertDescription>{error}</AlertDescription>
234
+ </Alert>
235
+ ) : null}
236
+
237
+ <Field label="Subject" htmlFor={`subject-${template.templateKey}`}>
238
+ <Input
239
+ id={`subject-${template.templateKey}`}
240
+ value={subject}
241
+ onChange={(e) => setSubject(e.target.value)}
242
+ disabled={!canManage}
243
+ />
244
+ </Field>
245
+ <Field
246
+ label="Body"
247
+ htmlFor={`body-${template.templateKey}`}
248
+ description={`Plain text. Available placeholders: ${template.variables
249
+ .map((v) => `{{${v}}}`)
250
+ .join(", ")}`}
251
+ >
252
+ <Textarea
253
+ id={`body-${template.templateKey}`}
254
+ value={body}
255
+ onChange={(e) => setBody(e.target.value)}
256
+ rows={8}
257
+ disabled={!canManage}
258
+ className="font-mono text-xs"
259
+ />
260
+ </Field>
261
+
262
+ {canManage ? (
263
+ <div className="flex flex-wrap items-center gap-2">
264
+ <Button type="submit" loading={saving} disabled={!dirty}>
265
+ {saved ? <Check /> : <Save />}
266
+ {saved ? "Saved" : "Save"}
267
+ </Button>
268
+ {overridden ? (
269
+ <Button
270
+ type="button"
271
+ variant="ghost"
272
+ loading={resetting}
273
+ onClick={() => void resetToInherited()}
274
+ >
275
+ <RotateCcw /> Reset to inherited
276
+ </Button>
277
+ ) : null}
278
+ </div>
279
+ ) : null}
280
+ </form>
281
+ );
282
+ };