@activecollab/components 2.0.359 → 2.0.361
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/cjs/components/EditableText/EditableText.js +8 -2
- package/dist/cjs/components/EditableText/EditableText.js.map +1 -1
- package/dist/cjs/components/Icons/collection/Key.js +60 -0
- package/dist/cjs/components/Icons/collection/Key.js.map +1 -0
- package/dist/cjs/components/Icons/collection/index.js +7 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/presentation/shared/TwoFactorDialogs.js +432 -0
- package/dist/cjs/presentation/shared/TwoFactorDialogs.js.map +1 -0
- package/dist/cjs/presentation/shared/TwoFactorShield.js +31 -0
- package/dist/cjs/presentation/shared/TwoFactorShield.js.map +1 -0
- package/dist/cjs/presentation/shared/UserMenu.js +282 -0
- package/dist/cjs/presentation/shared/UserMenu.js.map +1 -0
- package/dist/cjs/presentation/shared/index.js +32 -1
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/esm/components/EditableText/EditableText.d.ts +2 -0
- package/dist/esm/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/esm/components/EditableText/EditableText.js +8 -2
- package/dist/esm/components/EditableText/EditableText.js.map +1 -1
- package/dist/esm/components/Icons/collection/Key.d.ts +32 -0
- package/dist/esm/components/Icons/collection/Key.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Key.js +53 -0
- package/dist/esm/components/Icons/collection/Key.js.map +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +1 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/presentation/shared/TwoFactorDialogs.d.ts +24 -0
- package/dist/esm/presentation/shared/TwoFactorDialogs.d.ts.map +1 -0
- package/dist/esm/presentation/shared/TwoFactorDialogs.js +383 -0
- package/dist/esm/presentation/shared/TwoFactorDialogs.js.map +1 -0
- package/dist/esm/presentation/shared/TwoFactorShield.d.ts +13 -0
- package/dist/esm/presentation/shared/TwoFactorShield.d.ts.map +1 -0
- package/dist/esm/presentation/shared/TwoFactorShield.js +25 -0
- package/dist/esm/presentation/shared/TwoFactorShield.js.map +1 -0
- package/dist/esm/presentation/shared/UserMenu.d.ts +27 -0
- package/dist/esm/presentation/shared/UserMenu.d.ts.map +1 -0
- package/dist/esm/presentation/shared/UserMenu.js +255 -0
- package/dist/esm/presentation/shared/UserMenu.js.map +1 -0
- package/dist/esm/presentation/shared/index.d.ts +6 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +3 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/index.js +326 -270
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
|
+
import { BackupCodesDialogs, CreateLoginCodeDialogs } from "./TwoFactorDialogs";
|
|
3
|
+
import { IconButton } from "../../components/IconButton";
|
|
4
|
+
import { ArchiveIcon, DollarIcon, EditIcon, HistoryOfChangesIcon, KeyIcon, LockIcon, PersonArrowOutCircleIcon, ProjectAddIcon, TrashIcon, TreeDotsIcon } from "../../components/Icons";
|
|
5
|
+
import { List, ListItem, ListSeparator } from "../../components/List";
|
|
6
|
+
import { Menu } from "../../components/Menu";
|
|
7
|
+
|
|
8
|
+
/* User three-dot options menu — the same component as the real
|
|
9
|
+
`PeopleItemMenu` in the app (Menu + List of leading-icon items). Shared by
|
|
10
|
+
every story under `Presentation/People/*` so the user-row actions stay
|
|
11
|
+
identical in one place. Companies get their own menu. Most clicks are
|
|
12
|
+
intentionally no-ops; the two self-hosted 2FA items open working dialogs. */
|
|
13
|
+
|
|
14
|
+
/** Which set of actions to show, from the owner/power-user's point of view.
|
|
15
|
+
* `self` = acting on their own row; `member` = another (active) member;
|
|
16
|
+
* `client` = a client/client+ (no rates & capacity — clients are excluded). */
|
|
17
|
+
|
|
18
|
+
/** A menu entry: a plain action row, a divider, or one of the self-hosted 2FA
|
|
19
|
+
* actions that open a dialog. */
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The two self-hosted 2FA menu items, kept separate from the always-present
|
|
23
|
+
* entries because they render only when {@link UserMenuProps.selfHosted2FA} is
|
|
24
|
+
* true. In the real app that flag is the combined guard
|
|
25
|
+
* `!isOnDemand && multiFactorEnabled` — a Cloud account (Shepherd handles 2FA)
|
|
26
|
+
* or a self-hosted account with 2FA off must never render them.
|
|
27
|
+
*
|
|
28
|
+
* - `backup-codes` — own account only (`self`), sits under Change Password.
|
|
29
|
+
* - `create-login-code` — an owner acting on another user (`member`/`client`),
|
|
30
|
+
* sits after Change Permissions.
|
|
31
|
+
*/
|
|
32
|
+
const TWO_FACTOR_ENTRIES = {
|
|
33
|
+
self: {
|
|
34
|
+
type: "twoFactor",
|
|
35
|
+
action: "backup-codes"
|
|
36
|
+
},
|
|
37
|
+
member: {
|
|
38
|
+
type: "twoFactor",
|
|
39
|
+
action: "create-login-code"
|
|
40
|
+
},
|
|
41
|
+
client: {
|
|
42
|
+
type: "twoFactor",
|
|
43
|
+
action: "create-login-code"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const TWO_FACTOR_LABELS = {
|
|
47
|
+
"backup-codes": "Backup Codes",
|
|
48
|
+
"create-login-code": "Create Login Code"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Menu contents per variant, mirroring the app's capability checks:
|
|
53
|
+
* - `self` can edit their profile, change their password (and, on self-hosted
|
|
54
|
+
* with 2FA on, manage their Backup Codes), see rates/capacity and history,
|
|
55
|
+
* and invite themselves to projects.
|
|
56
|
+
* - `member` (owner viewing another member) can change permissions (and, on
|
|
57
|
+
* self-hosted with 2FA on, Create Login Code), rates/capacity and history,
|
|
58
|
+
* invite to projects, then archive or delete.
|
|
59
|
+
* - `client` (owner viewing a client) can edit profile, change password and
|
|
60
|
+
* permissions (and Create Login Code), see history, invite to projects, then
|
|
61
|
+
* archive or delete — but NOT rates & capacity.
|
|
62
|
+
*
|
|
63
|
+
* The 2FA entry is spliced in right after the anchor action below.
|
|
64
|
+
*/
|
|
65
|
+
const BASE_ENTRIES = {
|
|
66
|
+
self: [{
|
|
67
|
+
type: "item",
|
|
68
|
+
icon: EditIcon,
|
|
69
|
+
label: "Edit Profile"
|
|
70
|
+
}, {
|
|
71
|
+
type: "item",
|
|
72
|
+
icon: LockIcon,
|
|
73
|
+
label: "Change Password"
|
|
74
|
+
}, {
|
|
75
|
+
type: "item",
|
|
76
|
+
icon: DollarIcon,
|
|
77
|
+
label: "Rates and Capacity"
|
|
78
|
+
}, {
|
|
79
|
+
type: "item",
|
|
80
|
+
icon: HistoryOfChangesIcon,
|
|
81
|
+
label: "History of Changes"
|
|
82
|
+
}, {
|
|
83
|
+
type: "separator"
|
|
84
|
+
}, {
|
|
85
|
+
type: "item",
|
|
86
|
+
icon: ProjectAddIcon,
|
|
87
|
+
label: "Invite to Projects"
|
|
88
|
+
}],
|
|
89
|
+
member: [{
|
|
90
|
+
type: "item",
|
|
91
|
+
icon: PersonArrowOutCircleIcon,
|
|
92
|
+
label: "Change Permissions"
|
|
93
|
+
}, {
|
|
94
|
+
type: "item",
|
|
95
|
+
icon: DollarIcon,
|
|
96
|
+
label: "Rates and Capacity"
|
|
97
|
+
}, {
|
|
98
|
+
type: "item",
|
|
99
|
+
icon: HistoryOfChangesIcon,
|
|
100
|
+
label: "History of Changes"
|
|
101
|
+
}, {
|
|
102
|
+
type: "separator"
|
|
103
|
+
}, {
|
|
104
|
+
type: "item",
|
|
105
|
+
icon: ProjectAddIcon,
|
|
106
|
+
label: "Invite to Projects"
|
|
107
|
+
}, {
|
|
108
|
+
type: "separator"
|
|
109
|
+
}, {
|
|
110
|
+
type: "item",
|
|
111
|
+
icon: ArchiveIcon,
|
|
112
|
+
label: "Archive"
|
|
113
|
+
}, {
|
|
114
|
+
type: "item",
|
|
115
|
+
icon: TrashIcon,
|
|
116
|
+
label: "Delete"
|
|
117
|
+
}],
|
|
118
|
+
client: [{
|
|
119
|
+
type: "item",
|
|
120
|
+
icon: EditIcon,
|
|
121
|
+
label: "Edit Profile"
|
|
122
|
+
}, {
|
|
123
|
+
type: "item",
|
|
124
|
+
icon: LockIcon,
|
|
125
|
+
label: "Change Password"
|
|
126
|
+
}, {
|
|
127
|
+
type: "item",
|
|
128
|
+
icon: PersonArrowOutCircleIcon,
|
|
129
|
+
label: "Change Permissions"
|
|
130
|
+
}, {
|
|
131
|
+
type: "item",
|
|
132
|
+
icon: HistoryOfChangesIcon,
|
|
133
|
+
label: "History of Changes"
|
|
134
|
+
}, {
|
|
135
|
+
type: "separator"
|
|
136
|
+
}, {
|
|
137
|
+
type: "item",
|
|
138
|
+
icon: ProjectAddIcon,
|
|
139
|
+
label: "Invite to Projects"
|
|
140
|
+
}, {
|
|
141
|
+
type: "separator"
|
|
142
|
+
}, {
|
|
143
|
+
type: "item",
|
|
144
|
+
icon: ArchiveIcon,
|
|
145
|
+
label: "Archive"
|
|
146
|
+
}, {
|
|
147
|
+
type: "item",
|
|
148
|
+
icon: TrashIcon,
|
|
149
|
+
label: "Delete"
|
|
150
|
+
}]
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/** The action row each variant's 2FA item is inserted directly after. */
|
|
154
|
+
const TWO_FACTOR_ANCHOR = {
|
|
155
|
+
self: "Change Password",
|
|
156
|
+
member: "Change Permissions",
|
|
157
|
+
client: "Change Permissions"
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/** Build the final entry list, splicing the 2FA item in after its anchor when
|
|
161
|
+
* the self-hosted + 2FA-enabled guard is on. */
|
|
162
|
+
const entriesFor = (variant, selfHosted2FA) => {
|
|
163
|
+
const base = BASE_ENTRIES[variant];
|
|
164
|
+
const twoFactor = TWO_FACTOR_ENTRIES[variant];
|
|
165
|
+
if (!selfHosted2FA || !twoFactor) {
|
|
166
|
+
return base;
|
|
167
|
+
}
|
|
168
|
+
const anchorLabel = TWO_FACTOR_ANCHOR[variant];
|
|
169
|
+
const out = [];
|
|
170
|
+
base.forEach(entry => {
|
|
171
|
+
out.push(entry);
|
|
172
|
+
if (entry.type === "item" && entry.label === anchorLabel) {
|
|
173
|
+
out.push(twoFactor);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
return out;
|
|
177
|
+
};
|
|
178
|
+
export const UserMenu = _ref => {
|
|
179
|
+
let _ref$variant = _ref.variant,
|
|
180
|
+
variant = _ref$variant === void 0 ? "member" : _ref$variant,
|
|
181
|
+
targetClassName = _ref.targetClassName,
|
|
182
|
+
_ref$size = _ref.size,
|
|
183
|
+
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
184
|
+
_ref$selfHosted2FA = _ref.selfHosted2FA,
|
|
185
|
+
selfHosted2FA = _ref$selfHosted2FA === void 0 ? true : _ref$selfHosted2FA,
|
|
186
|
+
_ref$userName = _ref.userName,
|
|
187
|
+
userName = _ref$userName === void 0 ? "this user" : _ref$userName;
|
|
188
|
+
const _useState = useState(false),
|
|
189
|
+
open = _useState[0],
|
|
190
|
+
setOpen = _useState[1];
|
|
191
|
+
const _useState2 = useState(false),
|
|
192
|
+
backupCodesOpen = _useState2[0],
|
|
193
|
+
setBackupCodesOpen = _useState2[1];
|
|
194
|
+
const _useState3 = useState(false),
|
|
195
|
+
loginCodeOpen = _useState3[0],
|
|
196
|
+
setLoginCodeOpen = _useState3[1];
|
|
197
|
+
const handleOpen = useCallback(() => setOpen(true), []);
|
|
198
|
+
const handleClose = useCallback(() => setOpen(false), []);
|
|
199
|
+
const handleTwoFactor = useCallback(action => {
|
|
200
|
+
// Close the menu first, then open the dialog (the app's
|
|
201
|
+
// closed-menu-then-dialog pattern).
|
|
202
|
+
setOpen(false);
|
|
203
|
+
if (action === "backup-codes") {
|
|
204
|
+
setBackupCodesOpen(true);
|
|
205
|
+
} else {
|
|
206
|
+
setLoginCodeOpen(true);
|
|
207
|
+
}
|
|
208
|
+
}, []);
|
|
209
|
+
const triggerClassName = [targetClassName, open ? "open" : ""].filter(Boolean).join(" ") || undefined;
|
|
210
|
+
const entries = entriesFor(variant, selfHosted2FA);
|
|
211
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Menu, {
|
|
212
|
+
open: open,
|
|
213
|
+
onOpen: handleOpen,
|
|
214
|
+
onClose: handleClose,
|
|
215
|
+
position: "bottom-end",
|
|
216
|
+
target: /*#__PURE__*/React.createElement(IconButton, {
|
|
217
|
+
type: "button",
|
|
218
|
+
variant: "text gray",
|
|
219
|
+
size: size,
|
|
220
|
+
className: triggerClassName,
|
|
221
|
+
active: open
|
|
222
|
+
}, /*#__PURE__*/React.createElement(TreeDotsIcon, null))
|
|
223
|
+
}, /*#__PURE__*/React.createElement(List, {
|
|
224
|
+
style: {
|
|
225
|
+
padding: "8px 0",
|
|
226
|
+
minWidth: 220
|
|
227
|
+
},
|
|
228
|
+
tabIndex: -1
|
|
229
|
+
}, entries.map((entry, index) => {
|
|
230
|
+
if (entry.type === "separator") {
|
|
231
|
+
return /*#__PURE__*/React.createElement(ListSeparator, {
|
|
232
|
+
key: "sep-" + index
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
if (entry.type === "twoFactor") {
|
|
236
|
+
return /*#__PURE__*/React.createElement(ListItem, {
|
|
237
|
+
key: entry.action,
|
|
238
|
+
onClick: () => handleTwoFactor(entry.action)
|
|
239
|
+
}, /*#__PURE__*/React.createElement(KeyIcon, null), TWO_FACTOR_LABELS[entry.action]);
|
|
240
|
+
}
|
|
241
|
+
return /*#__PURE__*/React.createElement(ListItem, {
|
|
242
|
+
key: entry.label,
|
|
243
|
+
onClick: () => undefined
|
|
244
|
+
}, /*#__PURE__*/React.createElement(entry.icon, null), entry.label);
|
|
245
|
+
}))), /*#__PURE__*/React.createElement(BackupCodesDialogs, {
|
|
246
|
+
open: backupCodesOpen,
|
|
247
|
+
onClose: () => setBackupCodesOpen(false)
|
|
248
|
+
}), /*#__PURE__*/React.createElement(CreateLoginCodeDialogs, {
|
|
249
|
+
open: loginCodeOpen,
|
|
250
|
+
onClose: () => setLoginCodeOpen(false),
|
|
251
|
+
userName: userName
|
|
252
|
+
}));
|
|
253
|
+
};
|
|
254
|
+
UserMenu.displayName = "UserMenu";
|
|
255
|
+
//# sourceMappingURL=UserMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserMenu.js","names":["React","useCallback","useState","BackupCodesDialogs","CreateLoginCodeDialogs","IconButton","ArchiveIcon","DollarIcon","EditIcon","HistoryOfChangesIcon","KeyIcon","LockIcon","PersonArrowOutCircleIcon","ProjectAddIcon","TrashIcon","TreeDotsIcon","List","ListItem","ListSeparator","Menu","TWO_FACTOR_ENTRIES","self","type","action","member","client","TWO_FACTOR_LABELS","BASE_ENTRIES","icon","label","TWO_FACTOR_ANCHOR","entriesFor","variant","selfHosted2FA","base","twoFactor","anchorLabel","out","forEach","entry","push","UserMenu","_ref","_ref$variant","targetClassName","_ref$size","size","_ref$selfHosted2FA","_ref$userName","userName","_useState","open","setOpen","_useState2","backupCodesOpen","setBackupCodesOpen","_useState3","loginCodeOpen","setLoginCodeOpen","handleOpen","handleClose","handleTwoFactor","triggerClassName","filter","Boolean","join","undefined","entries","createElement","Fragment","onOpen","onClose","position","target","className","active","style","padding","minWidth","tabIndex","map","index","key","onClick","displayName"],"sources":["../../../../src/presentation/shared/UserMenu.tsx"],"sourcesContent":["import React, { ReactElement, useCallback, useState } from \"react\";\n\nimport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArchiveIcon,\n DollarIcon,\n EditIcon,\n HistoryOfChangesIcon,\n KeyIcon,\n LockIcon,\n PersonArrowOutCircleIcon,\n ProjectAddIcon,\n TrashIcon,\n TreeDotsIcon,\n} from \"../../components/Icons\";\nimport { List, ListItem, ListSeparator } from \"../../components/List\";\nimport { Menu } from \"../../components/Menu\";\n\n/* User three-dot options menu — the same component as the real\n `PeopleItemMenu` in the app (Menu + List of leading-icon items). Shared by\n every story under `Presentation/People/*` so the user-row actions stay\n identical in one place. Companies get their own menu. Most clicks are\n intentionally no-ops; the two self-hosted 2FA items open working dialogs. */\n\n/** Which set of actions to show, from the owner/power-user's point of view.\n * `self` = acting on their own row; `member` = another (active) member;\n * `client` = a client/client+ (no rates & capacity — clients are excluded). */\nexport type UserMenuVariant = \"self\" | \"member\" | \"client\";\n\ntype MenuIcon = React.FC<React.SVGProps<SVGSVGElement>>;\n\n/** A menu entry: a plain action row, a divider, or one of the self-hosted 2FA\n * actions that open a dialog. */\ntype MenuEntry =\n | { type: \"separator\" }\n | { type: \"item\"; icon: MenuIcon; label: string }\n | { type: \"twoFactor\"; action: \"backup-codes\" | \"create-login-code\" };\n\n/**\n * The two self-hosted 2FA menu items, kept separate from the always-present\n * entries because they render only when {@link UserMenuProps.selfHosted2FA} is\n * true. In the real app that flag is the combined guard\n * `!isOnDemand && multiFactorEnabled` — a Cloud account (Shepherd handles 2FA)\n * or a self-hosted account with 2FA off must never render them.\n *\n * - `backup-codes` — own account only (`self`), sits under Change Password.\n * - `create-login-code` — an owner acting on another user (`member`/`client`),\n * sits after Change Permissions.\n */\nconst TWO_FACTOR_ENTRIES: Record<UserMenuVariant, MenuEntry | null> = {\n self: { type: \"twoFactor\", action: \"backup-codes\" },\n member: { type: \"twoFactor\", action: \"create-login-code\" },\n client: { type: \"twoFactor\", action: \"create-login-code\" },\n};\n\nconst TWO_FACTOR_LABELS: Record<\"backup-codes\" | \"create-login-code\", string> =\n {\n \"backup-codes\": \"Backup Codes\",\n \"create-login-code\": \"Create Login Code\",\n };\n\n/**\n * Menu contents per variant, mirroring the app's capability checks:\n * - `self` can edit their profile, change their password (and, on self-hosted\n * with 2FA on, manage their Backup Codes), see rates/capacity and history,\n * and invite themselves to projects.\n * - `member` (owner viewing another member) can change permissions (and, on\n * self-hosted with 2FA on, Create Login Code), rates/capacity and history,\n * invite to projects, then archive or delete.\n * - `client` (owner viewing a client) can edit profile, change password and\n * permissions (and Create Login Code), see history, invite to projects, then\n * archive or delete — but NOT rates & capacity.\n *\n * The 2FA entry is spliced in right after the anchor action below.\n */\nconst BASE_ENTRIES: Record<UserMenuVariant, MenuEntry[]> = {\n self: [\n { type: \"item\", icon: EditIcon, label: \"Edit Profile\" },\n { type: \"item\", icon: LockIcon, label: \"Change Password\" },\n { type: \"item\", icon: DollarIcon, label: \"Rates and Capacity\" },\n { type: \"item\", icon: HistoryOfChangesIcon, label: \"History of Changes\" },\n { type: \"separator\" },\n { type: \"item\", icon: ProjectAddIcon, label: \"Invite to Projects\" },\n ],\n member: [\n {\n type: \"item\",\n icon: PersonArrowOutCircleIcon,\n label: \"Change Permissions\",\n },\n { type: \"item\", icon: DollarIcon, label: \"Rates and Capacity\" },\n { type: \"item\", icon: HistoryOfChangesIcon, label: \"History of Changes\" },\n { type: \"separator\" },\n { type: \"item\", icon: ProjectAddIcon, label: \"Invite to Projects\" },\n { type: \"separator\" },\n { type: \"item\", icon: ArchiveIcon, label: \"Archive\" },\n { type: \"item\", icon: TrashIcon, label: \"Delete\" },\n ],\n client: [\n { type: \"item\", icon: EditIcon, label: \"Edit Profile\" },\n { type: \"item\", icon: LockIcon, label: \"Change Password\" },\n {\n type: \"item\",\n icon: PersonArrowOutCircleIcon,\n label: \"Change Permissions\",\n },\n { type: \"item\", icon: HistoryOfChangesIcon, label: \"History of Changes\" },\n { type: \"separator\" },\n { type: \"item\", icon: ProjectAddIcon, label: \"Invite to Projects\" },\n { type: \"separator\" },\n { type: \"item\", icon: ArchiveIcon, label: \"Archive\" },\n { type: \"item\", icon: TrashIcon, label: \"Delete\" },\n ],\n};\n\n/** The action row each variant's 2FA item is inserted directly after. */\nconst TWO_FACTOR_ANCHOR: Record<UserMenuVariant, string> = {\n self: \"Change Password\",\n member: \"Change Permissions\",\n client: \"Change Permissions\",\n};\n\n/** Build the final entry list, splicing the 2FA item in after its anchor when\n * the self-hosted + 2FA-enabled guard is on. */\nconst entriesFor = (\n variant: UserMenuVariant,\n selfHosted2FA: boolean\n): MenuEntry[] => {\n const base = BASE_ENTRIES[variant];\n const twoFactor = TWO_FACTOR_ENTRIES[variant];\n if (!selfHosted2FA || !twoFactor) {\n return base;\n }\n const anchorLabel = TWO_FACTOR_ANCHOR[variant];\n const out: MenuEntry[] = [];\n base.forEach((entry) => {\n out.push(entry);\n if (entry.type === \"item\" && entry.label === anchorLabel) {\n out.push(twoFactor);\n }\n });\n return out;\n};\n\nexport interface UserMenuProps {\n /** Which action set to render. Defaults to `member`. */\n variant?: UserMenuVariant;\n /** Class on the TreeDots trigger (parent controls its hover visibility). */\n targetClassName?: string;\n /** IconButton size of the trigger (omit for the default/regular size). */\n size?: \"small\" | \"medium\" | \"big\";\n /**\n * The combined self-hosted + 2FA-enabled guard (`!isOnDemand &&\n * multiFactorEnabled`). When true, the variant's 2FA item (Backup Codes for\n * `self`, Create Login Code otherwise) is shown. Defaults to true here so the\n * prototype demonstrates the enabled state.\n */\n selfHosted2FA?: boolean;\n /** Target user's name — drives the Create Login Code dialog copy. */\n userName?: string;\n}\n\nexport const UserMenu = ({\n variant = \"member\",\n targetClassName,\n size = \"medium\",\n selfHosted2FA = true,\n userName = \"this user\",\n}: UserMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const [backupCodesOpen, setBackupCodesOpen] = useState(false);\n const [loginCodeOpen, setLoginCodeOpen] = useState(false);\n const handleOpen = useCallback(() => setOpen(true), []);\n const handleClose = useCallback(() => setOpen(false), []);\n\n const handleTwoFactor = useCallback(\n (action: \"backup-codes\" | \"create-login-code\") => {\n // Close the menu first, then open the dialog (the app's\n // closed-menu-then-dialog pattern).\n setOpen(false);\n if (action === \"backup-codes\") {\n setBackupCodesOpen(true);\n } else {\n setLoginCodeOpen(true);\n }\n },\n []\n );\n\n const triggerClassName =\n [targetClassName, open ? \"open\" : \"\"].filter(Boolean).join(\" \") ||\n undefined;\n\n const entries = entriesFor(variant, selfHosted2FA);\n\n return (\n <>\n <Menu\n open={open}\n onOpen={handleOpen}\n onClose={handleClose}\n position=\"bottom-end\"\n target={\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n size={size}\n className={triggerClassName}\n active={open}\n >\n <TreeDotsIcon />\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\", minWidth: 220 }} tabIndex={-1}>\n {entries.map((entry, index) => {\n if (entry.type === \"separator\") {\n return <ListSeparator key={`sep-${index}`} />;\n }\n if (entry.type === \"twoFactor\") {\n return (\n <ListItem\n key={entry.action}\n onClick={() => handleTwoFactor(entry.action)}\n >\n <KeyIcon />\n {TWO_FACTOR_LABELS[entry.action]}\n </ListItem>\n );\n }\n return (\n <ListItem key={entry.label} onClick={() => undefined}>\n <entry.icon />\n {entry.label}\n </ListItem>\n );\n })}\n </List>\n </Menu>\n\n <BackupCodesDialogs\n open={backupCodesOpen}\n onClose={() => setBackupCodesOpen(false)}\n />\n <CreateLoginCodeDialogs\n open={loginCodeOpen}\n onClose={() => setLoginCodeOpen(false)}\n userName={userName}\n />\n </>\n );\n};\n\nUserMenu.displayName = \"UserMenu\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAkBC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAElE,SAASC,kBAAkB,EAAEC,sBAAsB,QAAQ,oBAAoB;AAC/E,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,oBAAoB,EACpBC,OAAO,EACPC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,SAAS,EACTC,YAAY,QACP,wBAAwB;AAC/B,SAASC,IAAI,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,uBAAuB;AACrE,SAASC,IAAI,QAAQ,uBAAuB;;AAE5C;AACA;AACA;AACA;AACA;;AAE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BAAkB,CAAC,KAAK;EAAE,CAC1C,CAAC,eACFvD,KAAA,CAAAoE,aAAA,CAAChE,sBAAsB;IACrB+C,IAAI,EAAEM,aAAc;IACpBc,OAAO,EAAEA,CAAA,KAAMb,gBAAgB,CAAC,KAAK,CAAE;IACvCT,QAAQ,EAAEA;EAAS,CACpB,CACD,CAAC;AAEP,CAAC;AAEDR,QAAQ,CAAC2C,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -26,4 +26,10 @@ export type { IssueEntry, CodeEntry, Stage, HistoryEvent, StageState, CodeStatus
|
|
|
26
26
|
export { SuggestSubtasksButton } from "./SuggestSubtasksButton";
|
|
27
27
|
export { TaskOptionsMenu, TaskListOptionsMenu } from "./TaskOptionsMenu";
|
|
28
28
|
export type { TaskOptionsMenuProps, TaskListOptionsMenuProps, } from "./TaskOptionsMenu";
|
|
29
|
+
export { UserMenu } from "./UserMenu";
|
|
30
|
+
export type { UserMenuProps, UserMenuVariant } from "./UserMenu";
|
|
31
|
+
export { TwoFactorShield } from "./TwoFactorShield";
|
|
32
|
+
export type { TwoFactorShieldProps } from "./TwoFactorShield";
|
|
33
|
+
export { BackupCodesDialogs, CreateLoginCodeDialogs } from "./TwoFactorDialogs";
|
|
34
|
+
export type { BackupCodesDialogsProps, CreateLoginCodeDialogsProps, } from "./TwoFactorDialogs";
|
|
29
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACl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B,wBAAwB,GACzB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACrE,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,YAAY,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,4BAA4B,EAC5B,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EACjB,UAAU,GACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,aAAa,EACb,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACzE,YAAY,EACV,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAChF,YAAY,EACV,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC"}
|
|
@@ -18,4 +18,7 @@ export { WebhookLogsDialog, WEBHOOK_CONNECTIONS, WEBHOOK_REPOSITORIES } from "./
|
|
|
18
18
|
export { SourceCodeSection, IssueRow, CodeRow, Spine, HistoryDialog, CompletedHeader } from "./SourceCodeSection";
|
|
19
19
|
export { SuggestSubtasksButton } from "./SuggestSubtasksButton";
|
|
20
20
|
export { TaskOptionsMenu, TaskListOptionsMenu } from "./TaskOptionsMenu";
|
|
21
|
+
export { UserMenu } from "./UserMenu";
|
|
22
|
+
export { TwoFactorShield } from "./TwoFactorShield";
|
|
23
|
+
export { BackupCodesDialogs, CreateLoginCodeDialogs } from "./TwoFactorDialogs";
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["MainLogo","RoundAvatar","PresentationShell","StyledPagePaper","PageHeader","ProjectPageHeader","TabHeader","FloatingControls","HelpAndSupportMenu","LinkingCommandsButton","LinkBranchOrPullRequestDialog","ConnectRepositoryDialog","RepositorySelect","buildRepoOptions","CONNECTIONS","PROJECT_REPOSITORIES","CONNECTABLE_REPOSITORIES","WebhookLogsDialog","WEBHOOK_CONNECTIONS","WEBHOOK_REPOSITORIES","SourceCodeSection","IssueRow","CodeRow","Spine","HistoryDialog","CompletedHeader","SuggestSubtasksButton","TaskOptionsMenu","TaskListOptionsMenu"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,SAASA,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,qBAAqB;AAExE,SAASC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,QAAQ,WAAW;AAMpE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,6BAA6B,QAAQ,iCAAiC;AAE/E,SACEC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,EACXC,oBAAoB,EACpBC,wBAAwB,QACnB,2BAA2B;AAQlC,SACEC,iBAAiB,EACjBC,mBAAmB,EACnBC,oBAAoB,QACf,qBAAqB;AAO5B,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,OAAO,EACPC,KAAK,EACLC,aAAa,EACbC,eAAe,QACV,qBAAqB;AAU5B,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["MainLogo","RoundAvatar","PresentationShell","StyledPagePaper","PageHeader","ProjectPageHeader","TabHeader","FloatingControls","HelpAndSupportMenu","LinkingCommandsButton","LinkBranchOrPullRequestDialog","ConnectRepositoryDialog","RepositorySelect","buildRepoOptions","CONNECTIONS","PROJECT_REPOSITORIES","CONNECTABLE_REPOSITORIES","WebhookLogsDialog","WEBHOOK_CONNECTIONS","WEBHOOK_REPOSITORIES","SourceCodeSection","IssueRow","CodeRow","Spine","HistoryDialog","CompletedHeader","SuggestSubtasksButton","TaskOptionsMenu","TaskListOptionsMenu","UserMenu","TwoFactorShield","BackupCodesDialogs","CreateLoginCodeDialogs"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,SAASA,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,qBAAqB;AAExE,SAASC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,QAAQ,WAAW;AAMpE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,6BAA6B,QAAQ,iCAAiC;AAE/E,SACEC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,EACXC,oBAAoB,EACpBC,wBAAwB,QACnB,2BAA2B;AAQlC,SACEC,iBAAiB,EACjBC,mBAAmB,EACnBC,oBAAoB,QACf,qBAAqB;AAO5B,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,OAAO,EACPC,KAAK,EACLC,aAAa,EACbC,eAAe,QACV,qBAAqB;AAU5B,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,mBAAmB;AAKxE,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,kBAAkB,EAAEC,sBAAsB,QAAQ,oBAAoB","ignoreList":[]}
|