@activecollab/components 2.0.359 → 2.0.360
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/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/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 +318 -268
- 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,432 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CreateLoginCodeDialogs = exports.BackupCodesDialogs = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _Button = require("../../components/Button");
|
|
10
|
+
var _Dialog = require("../../components/Dialog");
|
|
11
|
+
var _IconButton = require("../../components/IconButton");
|
|
12
|
+
var _Icons = require("../../components/Icons");
|
|
13
|
+
var _InfoBox = require("../../components/InfoBox");
|
|
14
|
+
var _Input = require("../../components/Input");
|
|
15
|
+
var _Label = require("../../components/Label");
|
|
16
|
+
var _Loaders = require("../../components/Loaders");
|
|
17
|
+
var _ToastMessage = require("../../components/ToastMessage");
|
|
18
|
+
var _Tooltip = require("../../components/Tooltip");
|
|
19
|
+
var _Transitions = require("../../components/Transitions");
|
|
20
|
+
var _Typography = require("../../components/Typography");
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
24
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
26
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
27
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
28
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
29
|
+
/**
|
|
30
|
+
* Self-hosted 2FA dialogs shared by the People stories (Users list + User
|
|
31
|
+
* profile). Two flows, both reached from the user three-dot menu and both
|
|
32
|
+
* gated (in the menu) behind the self-hosted + 2FA-enabled guard:
|
|
33
|
+
*
|
|
34
|
+
* - **Backup Codes** (own account, `self` menu): a single dialog that both
|
|
35
|
+
* explains the destructive regenerate and takes the password (identity
|
|
36
|
+
* confirmation is "valid password + submit", no separate confirm step).
|
|
37
|
+
* Submitting opens the reveal dialog, which shows a skeleton while the new
|
|
38
|
+
* set "loads", then the 10 codes once.
|
|
39
|
+
* - **Create Login Code** (another user, `member`/`client` menu): an owner
|
|
40
|
+
* re-enters their own password, then a one-time code is revealed once with
|
|
41
|
+
* its expiry and a "user notified" note. (Task #18.)
|
|
42
|
+
*
|
|
43
|
+
* Everything is mocked locally: passwords aren't checked, the "load" is a
|
|
44
|
+
* timer, and the codes are static samples.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
var SANS = '-apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif';
|
|
48
|
+
var MONO = '"SF Mono", "Roboto Mono", Menlo, Consolas, "Courier New", monospace';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* DS `InputPassword` calls `onChange` with the string value at runtime, but its
|
|
52
|
+
* type is still inherited from the native input (`ChangeEventHandler`). Adapt a
|
|
53
|
+
* string handler so TypeScript is satisfied without lying about the value.
|
|
54
|
+
*/
|
|
55
|
+
var asInputChange = function asInputChange(fn) {
|
|
56
|
+
return fn;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/* Sample codes (10+10 A-Z0-9), mirroring the real generator's format. */
|
|
60
|
+
var SAMPLE_BACKUP_CODES = ["4K7Q9ZM2XN-8V3TJRD6WP", "P2W8XK4M9Q-3RJ7VND5TZ", "9ZM2XN4K7Q-6WP8V3TJRD", "TJRD6WP8V3-2XN4K7Q9ZM", "V3TJRD6WP8-K7Q9ZM2XN4", "8V3TJRD6WP-Q9ZM2XN4K7", "RD5TZP2W8X-M9Q3RJ7VND", "3RJ7VND5TZ-8XK4M9QP2W", "N4K7Q9ZM2X-6WP8V3TJRD", "Q9ZM2XN4K7-8V3TJRD6WP"];
|
|
61
|
+
var SAMPLE_LOGIN_CODE = "4K7Q9ZM2XN-8V3TJRD6WP";
|
|
62
|
+
|
|
63
|
+
/* ------------------------------------------------------------------ */
|
|
64
|
+
/* Toast (reuses the fixed upper-right anchor pattern from headers) */
|
|
65
|
+
/* ------------------------------------------------------------------ */
|
|
66
|
+
|
|
67
|
+
var StyledToastAnchor = _styledComponents.default.div.withConfig({
|
|
68
|
+
displayName: "TwoFactorDialogs__StyledToastAnchor",
|
|
69
|
+
componentId: "sc-nn5qbh-0"
|
|
70
|
+
})(["position:fixed;top:16px;right:16px;z-index:10000;pointer-events:none;.c-toast-message{pointer-events:auto;}"]);
|
|
71
|
+
var CopyToast = function CopyToast(_ref) {
|
|
72
|
+
var open = _ref.open,
|
|
73
|
+
toastKey = _ref.toastKey,
|
|
74
|
+
text = _ref.text,
|
|
75
|
+
onClose = _ref.onClose;
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(StyledToastAnchor, null, /*#__PURE__*/_react.default.createElement(_Transitions.SlideFromTop, {
|
|
77
|
+
in: open
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_ToastMessage.ToastMessage, {
|
|
79
|
+
key: toastKey,
|
|
80
|
+
className: "c-toast-message",
|
|
81
|
+
type: "success",
|
|
82
|
+
text: text,
|
|
83
|
+
dismissible: true,
|
|
84
|
+
dropShadow: true,
|
|
85
|
+
timeout: 3000,
|
|
86
|
+
onClose: onClose
|
|
87
|
+
})));
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/* ------------------------------------------------------------------ */
|
|
91
|
+
/* Shared password-gate body (describe + password in one dialog) */
|
|
92
|
+
/* ------------------------------------------------------------------ */
|
|
93
|
+
|
|
94
|
+
var StyledGateBody = _styledComponents.default.div.withConfig({
|
|
95
|
+
displayName: "TwoFactorDialogs__StyledGateBody",
|
|
96
|
+
componentId: "sc-nn5qbh-1"
|
|
97
|
+
})(["font-family:", ";display:flex;flex-direction:column;gap:16px;.pg-field{display:flex;flex-direction:column;gap:4px;}.pg-input.c-input-wrapper,.pg-input{width:100%;max-width:none;}"], SANS);
|
|
98
|
+
|
|
99
|
+
/* ------------------------------------------------------------------ */
|
|
100
|
+
/* Backup Codes — combined describe + password dialog */
|
|
101
|
+
/* ------------------------------------------------------------------ */
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The full Backup Codes flow: the combined regenerate/password dialog, then the
|
|
105
|
+
* one-time reveal dialog with its loading skeleton. Cancelling the first dialog
|
|
106
|
+
* is a pure no-op — no codes are issued, no toast.
|
|
107
|
+
*/
|
|
108
|
+
var BackupCodesDialogs = exports.BackupCodesDialogs = function BackupCodesDialogs(_ref2) {
|
|
109
|
+
var open = _ref2.open,
|
|
110
|
+
onClose = _ref2.onClose;
|
|
111
|
+
var _useState = (0, _react.useState)(""),
|
|
112
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
113
|
+
password = _useState2[0],
|
|
114
|
+
setPassword = _useState2[1];
|
|
115
|
+
var _useState3 = (0, _react.useState)(false),
|
|
116
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
117
|
+
attempted = _useState4[0],
|
|
118
|
+
setAttempted = _useState4[1];
|
|
119
|
+
var _useState5 = (0, _react.useState)(false),
|
|
120
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
121
|
+
revealOpen = _useState6[0],
|
|
122
|
+
setRevealOpen = _useState6[1];
|
|
123
|
+
var _useState7 = (0, _react.useState)(true),
|
|
124
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
125
|
+
loading = _useState8[0],
|
|
126
|
+
setLoading = _useState8[1];
|
|
127
|
+
var _useState9 = (0, _react.useState)(false),
|
|
128
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
129
|
+
copyOpen = _useState0[0],
|
|
130
|
+
setCopyOpen = _useState0[1];
|
|
131
|
+
var _useState1 = (0, _react.useState)(0),
|
|
132
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
133
|
+
copyKey = _useState10[0],
|
|
134
|
+
setCopyKey = _useState10[1];
|
|
135
|
+
|
|
136
|
+
// Reset the gate each time it (re)opens.
|
|
137
|
+
(0, _react.useEffect)(function () {
|
|
138
|
+
if (open) {
|
|
139
|
+
setPassword("");
|
|
140
|
+
setAttempted(false);
|
|
141
|
+
}
|
|
142
|
+
}, [open]);
|
|
143
|
+
|
|
144
|
+
// Simulate the API generating the new set: a ~1s skeleton on reveal.
|
|
145
|
+
(0, _react.useEffect)(function () {
|
|
146
|
+
if (!revealOpen) {
|
|
147
|
+
return undefined;
|
|
148
|
+
}
|
|
149
|
+
setLoading(true);
|
|
150
|
+
var timer = window.setTimeout(function () {
|
|
151
|
+
return setLoading(false);
|
|
152
|
+
}, 1100);
|
|
153
|
+
return function () {
|
|
154
|
+
return window.clearTimeout(timer);
|
|
155
|
+
};
|
|
156
|
+
}, [revealOpen]);
|
|
157
|
+
var passwordInvalid = attempted && password.trim() === "";
|
|
158
|
+
var handleConfirm = function handleConfirm() {
|
|
159
|
+
if (password.trim() === "") {
|
|
160
|
+
setAttempted(true);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
// Valid password + submit is all the confirmation we need: close the gate
|
|
164
|
+
// and open the reveal (which regenerates the set).
|
|
165
|
+
onClose();
|
|
166
|
+
setRevealOpen(true);
|
|
167
|
+
};
|
|
168
|
+
var handleCopy = function handleCopy() {
|
|
169
|
+
setCopyOpen(true);
|
|
170
|
+
setCopyKey(function (k) {
|
|
171
|
+
return k + 1;
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
var closeReveal = function closeReveal() {
|
|
175
|
+
setRevealOpen(false);
|
|
176
|
+
};
|
|
177
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
178
|
+
open: open,
|
|
179
|
+
onClose: onClose,
|
|
180
|
+
disableCloseOnEsc: true
|
|
181
|
+
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, null, "Regenerate Backup Codes"), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(StyledGateBody, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
182
|
+
color: "secondary",
|
|
183
|
+
lineHeight: "loose"
|
|
184
|
+
}, "This drops all of your existing backup codes and creates a new set of 10. Any codes you saved before will stop working. The new codes are shown only once. Enter your password to confirm it's you."), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
className: "pg-field"
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.Label, {
|
|
187
|
+
htmlFor: "backup-codes-password"
|
|
188
|
+
}, "Your Password"), /*#__PURE__*/_react.default.createElement(_Input.InputPassword, {
|
|
189
|
+
id: "backup-codes-password",
|
|
190
|
+
wrapperClassName: "pg-input",
|
|
191
|
+
value: password,
|
|
192
|
+
onChange: asInputChange(function (value) {
|
|
193
|
+
setPassword(value);
|
|
194
|
+
setAttempted(false);
|
|
195
|
+
}),
|
|
196
|
+
invalid: passwordInvalid,
|
|
197
|
+
errorMessage: passwordInvalid ? "Your password is required." : undefined,
|
|
198
|
+
autoFocus: true,
|
|
199
|
+
autoComplete: "current-password"
|
|
200
|
+
})))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Actions, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
201
|
+
variant: "primary",
|
|
202
|
+
style: {
|
|
203
|
+
marginRight: 12
|
|
204
|
+
},
|
|
205
|
+
onClick: handleConfirm
|
|
206
|
+
}, "Regenerate Codes"), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
207
|
+
variant: "secondary",
|
|
208
|
+
onClick: onClose
|
|
209
|
+
}, "Cancel"))), /*#__PURE__*/_react.default.createElement(BackupCodesRevealDialog, {
|
|
210
|
+
open: revealOpen,
|
|
211
|
+
loading: loading,
|
|
212
|
+
onClose: closeReveal,
|
|
213
|
+
onCopy: handleCopy
|
|
214
|
+
}), /*#__PURE__*/_react.default.createElement(CopyToast, {
|
|
215
|
+
open: copyOpen,
|
|
216
|
+
toastKey: copyKey,
|
|
217
|
+
text: "Backup codes copied to clipboard.",
|
|
218
|
+
onClose: function onClose() {
|
|
219
|
+
return setCopyOpen(false);
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/* ------------------------------------------------------------------ */
|
|
225
|
+
/* Backup Codes — one-time reveal (skeleton while loading) */
|
|
226
|
+
/* ------------------------------------------------------------------ */
|
|
227
|
+
|
|
228
|
+
var StyledRevealBody = _styledComponents.default.div.withConfig({
|
|
229
|
+
displayName: "TwoFactorDialogs__StyledRevealBody",
|
|
230
|
+
componentId: "sc-nn5qbh-2"
|
|
231
|
+
})(["font-family:", ";display:flex;flex-direction:column;gap:16px;.bc-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;}.bc-code{font-family:", ";font-size:14px;letter-spacing:0.5px;color:var(--color-theme-900);padding:6px 10px;border-radius:6px;background-color:var(--color-theme-200);text-align:center;}.bc-skeleton{height:32px;border-radius:6px;width:100%;}"], SANS, MONO);
|
|
232
|
+
var BackupCodesRevealDialog = function BackupCodesRevealDialog(_ref3) {
|
|
233
|
+
var open = _ref3.open,
|
|
234
|
+
loading = _ref3.loading,
|
|
235
|
+
onClose = _ref3.onClose,
|
|
236
|
+
onCopy = _ref3.onCopy;
|
|
237
|
+
return /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
238
|
+
open: open,
|
|
239
|
+
onClose: onClose,
|
|
240
|
+
disableCloseOnEsc: true
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, null, "Your Backup Codes"), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(StyledRevealBody, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
242
|
+
color: "secondary",
|
|
243
|
+
lineHeight: "loose"
|
|
244
|
+
}, "Use a backup code to log in when email isn't available. Each code works once."), /*#__PURE__*/_react.default.createElement("div", {
|
|
245
|
+
className: "bc-grid"
|
|
246
|
+
}, loading ? [...Array(10)].map(function (_, index) {
|
|
247
|
+
return /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
248
|
+
key: index,
|
|
249
|
+
className: "bc-skeleton"
|
|
250
|
+
});
|
|
251
|
+
}) : SAMPLE_BACKUP_CODES.map(function (code) {
|
|
252
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
253
|
+
key: code,
|
|
254
|
+
className: "bc-code"
|
|
255
|
+
}, code);
|
|
256
|
+
})), /*#__PURE__*/_react.default.createElement(_InfoBox.InfoBox, {
|
|
257
|
+
type: "note",
|
|
258
|
+
showIcon: true,
|
|
259
|
+
title: "Codes are shown only once"
|
|
260
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
261
|
+
color: "secondary"
|
|
262
|
+
}, "Save them somewhere safe, they can't be displayed again. You can generate a new set from your profile at any time.")))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Actions, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
263
|
+
variant: "primary",
|
|
264
|
+
style: {
|
|
265
|
+
marginRight: 12
|
|
266
|
+
},
|
|
267
|
+
onClick: onClose,
|
|
268
|
+
disabled: loading
|
|
269
|
+
}, "I've Saved My Codes"), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
270
|
+
variant: "secondary",
|
|
271
|
+
onClick: onCopy,
|
|
272
|
+
disabled: loading
|
|
273
|
+
}, "Copy Codes")));
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/* ------------------------------------------------------------------ */
|
|
277
|
+
/* Create Login Code — password gate + one-time reveal */
|
|
278
|
+
/* ------------------------------------------------------------------ */
|
|
279
|
+
|
|
280
|
+
var StyledCodeRow = _styledComponents.default.div.withConfig({
|
|
281
|
+
displayName: "TwoFactorDialogs__StyledCodeRow",
|
|
282
|
+
componentId: "sc-nn5qbh-3"
|
|
283
|
+
})(["font-family:", ";display:flex;flex-direction:column;gap:16px;.lc-label{display:block;margin-bottom:6px;}.lc-code-field{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;background-color:var(--color-theme-200);}.lc-code{font-family:", ";font-size:15px;letter-spacing:0.5px;color:var(--color-theme-900);flex:1 1 auto;}.lc-copy svg{fill:var(--color-theme-600);}.lc-caption{display:block;margin-top:6px;}"], SANS, MONO);
|
|
284
|
+
|
|
285
|
+
/* Title row for the reveal dialog: heading on the left, X close on the right
|
|
286
|
+
(the app's Use Token dialog pattern). Applied via className since
|
|
287
|
+
Dialog.Title doesn't accept inline style. */
|
|
288
|
+
var StyledRevealTitle = _styledComponents.default.div.withConfig({
|
|
289
|
+
displayName: "TwoFactorDialogs__StyledRevealTitle",
|
|
290
|
+
componentId: "sc-nn5qbh-4"
|
|
291
|
+
})(["display:flex;justify-content:space-between;align-items:center;width:100%;.lc-close svg{fill:var(--color-theme-600);}"]);
|
|
292
|
+
/**
|
|
293
|
+
* Owner-minted login code flow (task #18): password gate first, then the
|
|
294
|
+
* one-time reveal. The reveal has no footer — an X in the title closes it —
|
|
295
|
+
* mirroring the app's Use Token dialog.
|
|
296
|
+
*/
|
|
297
|
+
var CreateLoginCodeDialogs = exports.CreateLoginCodeDialogs = function CreateLoginCodeDialogs(_ref4) {
|
|
298
|
+
var open = _ref4.open,
|
|
299
|
+
onClose = _ref4.onClose,
|
|
300
|
+
userName = _ref4.userName;
|
|
301
|
+
var firstName = (0, _react.useMemo)(function () {
|
|
302
|
+
return userName.split(" ")[0] || userName;
|
|
303
|
+
}, [userName]);
|
|
304
|
+
var _useState11 = (0, _react.useState)(""),
|
|
305
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
306
|
+
password = _useState12[0],
|
|
307
|
+
setPassword = _useState12[1];
|
|
308
|
+
var _useState13 = (0, _react.useState)(false),
|
|
309
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
310
|
+
attempted = _useState14[0],
|
|
311
|
+
setAttempted = _useState14[1];
|
|
312
|
+
var _useState15 = (0, _react.useState)(false),
|
|
313
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
314
|
+
revealOpen = _useState16[0],
|
|
315
|
+
setRevealOpen = _useState16[1];
|
|
316
|
+
// Expiry copy: computed as "now + 10 min" at the moment the code is minted.
|
|
317
|
+
var _useState17 = (0, _react.useState)(""),
|
|
318
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
319
|
+
expiry = _useState18[0],
|
|
320
|
+
setExpiry = _useState18[1];
|
|
321
|
+
var _useState19 = (0, _react.useState)(false),
|
|
322
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
323
|
+
copyOpen = _useState20[0],
|
|
324
|
+
setCopyOpen = _useState20[1];
|
|
325
|
+
var _useState21 = (0, _react.useState)(0),
|
|
326
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
327
|
+
copyKey = _useState22[0],
|
|
328
|
+
setCopyKey = _useState22[1];
|
|
329
|
+
(0, _react.useEffect)(function () {
|
|
330
|
+
if (open) {
|
|
331
|
+
setPassword("");
|
|
332
|
+
setAttempted(false);
|
|
333
|
+
}
|
|
334
|
+
}, [open]);
|
|
335
|
+
var passwordInvalid = attempted && password.trim() === "";
|
|
336
|
+
var handleConfirm = function handleConfirm() {
|
|
337
|
+
if (password.trim() === "") {
|
|
338
|
+
setAttempted(true);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
var when = new Date(Date.now() + 10 * 60000);
|
|
342
|
+
var hh = String(when.getHours()).padStart(2, "0");
|
|
343
|
+
var mm = String(when.getMinutes()).padStart(2, "0");
|
|
344
|
+
setExpiry("".concat(hh, ":").concat(mm));
|
|
345
|
+
onClose();
|
|
346
|
+
setRevealOpen(true);
|
|
347
|
+
};
|
|
348
|
+
var handleCopy = function handleCopy() {
|
|
349
|
+
setCopyOpen(true);
|
|
350
|
+
setCopyKey(function (k) {
|
|
351
|
+
return k + 1;
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
355
|
+
open: open,
|
|
356
|
+
onClose: onClose,
|
|
357
|
+
disableCloseOnEsc: true
|
|
358
|
+
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, null, "Confirm Password"), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(StyledGateBody, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
359
|
+
color: "secondary",
|
|
360
|
+
lineHeight: "loose"
|
|
361
|
+
}, "You're about to create a one-time login code for ", userName, ". Any code they already had pending will be replaced."), /*#__PURE__*/_react.default.createElement("div", {
|
|
362
|
+
className: "pg-field"
|
|
363
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.Label, {
|
|
364
|
+
htmlFor: "login-code-password"
|
|
365
|
+
}, "Your Password"), /*#__PURE__*/_react.default.createElement(_Input.InputPassword, {
|
|
366
|
+
id: "login-code-password",
|
|
367
|
+
wrapperClassName: "pg-input",
|
|
368
|
+
value: password,
|
|
369
|
+
onChange: asInputChange(function (value) {
|
|
370
|
+
setPassword(value);
|
|
371
|
+
setAttempted(false);
|
|
372
|
+
}),
|
|
373
|
+
invalid: passwordInvalid,
|
|
374
|
+
errorMessage: passwordInvalid ? "Your password is required." : undefined,
|
|
375
|
+
autoFocus: true,
|
|
376
|
+
autoComplete: "current-password"
|
|
377
|
+
})))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Actions, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
378
|
+
variant: "primary",
|
|
379
|
+
style: {
|
|
380
|
+
marginRight: 12
|
|
381
|
+
},
|
|
382
|
+
onClick: handleConfirm
|
|
383
|
+
}, "Confirm"), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
384
|
+
variant: "secondary",
|
|
385
|
+
onClick: onClose
|
|
386
|
+
}, "Cancel"))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
387
|
+
open: revealOpen,
|
|
388
|
+
onClose: function onClose() {
|
|
389
|
+
return setRevealOpen(false);
|
|
390
|
+
}
|
|
391
|
+
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, {
|
|
392
|
+
disableDefaultHeading: true
|
|
393
|
+
}, /*#__PURE__*/_react.default.createElement(StyledRevealTitle, null, /*#__PURE__*/_react.default.createElement(_Typography.Header3, null, "One-Time Login Code"), /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
394
|
+
variant: "text gray",
|
|
395
|
+
className: "lc-close",
|
|
396
|
+
onClick: function onClick() {
|
|
397
|
+
return setRevealOpen(false);
|
|
398
|
+
}
|
|
399
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null)))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(StyledCodeRow, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
400
|
+
color: "secondary",
|
|
401
|
+
lineHeight: "loose"
|
|
402
|
+
}, "Share this code with ", firstName, " through a secure channel. They'll still need their password to log in, the code alone won't work."), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Label.Label, {
|
|
403
|
+
className: "lc-label"
|
|
404
|
+
}, "Login Code"), /*#__PURE__*/_react.default.createElement("div", {
|
|
405
|
+
className: "lc-code-field"
|
|
406
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
407
|
+
className: "lc-code"
|
|
408
|
+
}, SAMPLE_LOGIN_CODE), /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
409
|
+
title: "Copy code"
|
|
410
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
411
|
+
variant: "text gray",
|
|
412
|
+
className: "lc-copy",
|
|
413
|
+
onClick: handleCopy
|
|
414
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.CopyIcon, null)))), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
415
|
+
color: "tertiary",
|
|
416
|
+
className: "lc-caption"
|
|
417
|
+
}, "Expires at ", expiry, " (in 10 minutes), it can't be shown again.")), /*#__PURE__*/_react.default.createElement(_InfoBox.InfoBox, {
|
|
418
|
+
type: "default",
|
|
419
|
+
showIcon: true,
|
|
420
|
+
title: "".concat(firstName, " has been notified")
|
|
421
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
422
|
+
color: "secondary"
|
|
423
|
+
}, "They received an email saying you created this code for their account. The email doesn't include the code."))))), /*#__PURE__*/_react.default.createElement(CopyToast, {
|
|
424
|
+
open: copyOpen,
|
|
425
|
+
toastKey: copyKey,
|
|
426
|
+
text: "Login code copied to clipboard.",
|
|
427
|
+
onClose: function onClose() {
|
|
428
|
+
return setCopyOpen(false);
|
|
429
|
+
}
|
|
430
|
+
}));
|
|
431
|
+
};
|
|
432
|
+
//# sourceMappingURL=TwoFactorDialogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoFactorDialogs.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_Button","_Dialog","_IconButton","_Icons","_InfoBox","_Input","_Label","_Loaders","_ToastMessage","_Tooltip","_Transitions","_Typography","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","SANS","MONO","asInputChange","fn","SAMPLE_BACKUP_CODES","SAMPLE_LOGIN_CODE","StyledToastAnchor","styled","div","withConfig","displayName","componentId","CopyToast","_ref","open","toastKey","text","onClose","createElement","SlideFromTop","in","ToastMessage","key","className","type","dismissible","dropShadow","timeout","StyledGateBody","BackupCodesDialogs","exports","_ref2","_useState","useState","_useState2","password","setPassword","_useState3","_useState4","attempted","setAttempted","_useState5","_useState6","revealOpen","setRevealOpen","_useState7","_useState8","loading","setLoading","_useState9","_useState0","copyOpen","setCopyOpen","_useState1","_useState10","copyKey","setCopyKey","useEffect","undefined","timer","window","setTimeout","clearTimeout","passwordInvalid","trim","handleConfirm","handleCopy","k","closeReveal","Fragment","Dialog","disableCloseOnEsc","Title","ContentDivider","Content","Body2","color","lineHeight","Label","htmlFor","InputPassword","id","wrapperClassName","onChange","invalid","errorMessage","autoFocus","autoComplete","Actions","Button","variant","style","marginRight","onClick","BackupCodesRevealDialog","onCopy","StyledRevealBody","_ref3","map","_","index","SkeletonLoader","code","InfoBox","showIcon","title","disabled","StyledCodeRow","StyledRevealTitle","CreateLoginCodeDialogs","_ref4","userName","firstName","useMemo","split","_useState11","_useState12","_useState13","_useState14","_useState15","_useState16","_useState17","_useState18","expiry","setExpiry","_useState19","_useState20","_useState21","_useState22","when","Date","now","hh","String","getHours","padStart","mm","getMinutes","concat","disableDefaultHeading","Header3","IconButton","CancelCrossIcon","Tooltip","CopyIcon","Caption1"],"sources":["../../../../src/presentation/shared/TwoFactorDialogs.tsx"],"sourcesContent":["import React, { ReactElement, useEffect, useMemo, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Button } from \"../../components/Button\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, CopyIcon } from \"../../components/Icons\";\nimport { InfoBox } from \"../../components/InfoBox\";\nimport { InputPassword } from \"../../components/Input\";\nimport { Label } from \"../../components/Label\";\nimport { SkeletonLoader } from \"../../components/Loaders\";\nimport { ToastMessage } from \"../../components/ToastMessage\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { SlideFromTop } from \"../../components/Transitions\";\nimport { Body2, Caption1, Header3 } from \"../../components/Typography\";\n\n/**\n * Self-hosted 2FA dialogs shared by the People stories (Users list + User\n * profile). Two flows, both reached from the user three-dot menu and both\n * gated (in the menu) behind the self-hosted + 2FA-enabled guard:\n *\n * - **Backup Codes** (own account, `self` menu): a single dialog that both\n * explains the destructive regenerate and takes the password (identity\n * confirmation is \"valid password + submit\", no separate confirm step).\n * Submitting opens the reveal dialog, which shows a skeleton while the new\n * set \"loads\", then the 10 codes once.\n * - **Create Login Code** (another user, `member`/`client` menu): an owner\n * re-enters their own password, then a one-time code is revealed once with\n * its expiry and a \"user notified\" note. (Task #18.)\n *\n * Everything is mocked locally: passwords aren't checked, the \"load\" is a\n * timer, and the codes are static samples.\n */\n\nconst SANS =\n '-apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\", Arial, sans-serif';\nconst MONO =\n '\"SF Mono\", \"Roboto Mono\", Menlo, Consolas, \"Courier New\", monospace';\n\n/**\n * DS `InputPassword` calls `onChange` with the string value at runtime, but its\n * type is still inherited from the native input (`ChangeEventHandler`). Adapt a\n * string handler so TypeScript is satisfied without lying about the value.\n */\nconst asInputChange = (\n fn: (value: string) => void\n): React.ChangeEventHandler<HTMLInputElement> =>\n fn as unknown as React.ChangeEventHandler<HTMLInputElement>;\n\n/* Sample codes (10+10 A-Z0-9), mirroring the real generator's format. */\nconst SAMPLE_BACKUP_CODES = [\n \"4K7Q9ZM2XN-8V3TJRD6WP\",\n \"P2W8XK4M9Q-3RJ7VND5TZ\",\n \"9ZM2XN4K7Q-6WP8V3TJRD\",\n \"TJRD6WP8V3-2XN4K7Q9ZM\",\n \"V3TJRD6WP8-K7Q9ZM2XN4\",\n \"8V3TJRD6WP-Q9ZM2XN4K7\",\n \"RD5TZP2W8X-M9Q3RJ7VND\",\n \"3RJ7VND5TZ-8XK4M9QP2W\",\n \"N4K7Q9ZM2X-6WP8V3TJRD\",\n \"Q9ZM2XN4K7-8V3TJRD6WP\",\n];\n\nconst SAMPLE_LOGIN_CODE = \"4K7Q9ZM2XN-8V3TJRD6WP\";\n\n/* ------------------------------------------------------------------ */\n/* Toast (reuses the fixed upper-right anchor pattern from headers) */\n/* ------------------------------------------------------------------ */\n\nconst StyledToastAnchor = styled.div`\n position: fixed;\n top: 16px;\n right: 16px;\n z-index: 10000;\n pointer-events: none;\n\n .c-toast-message {\n pointer-events: auto;\n }\n`;\n\ninterface CopyToastProps {\n open: boolean;\n toastKey: number;\n text: string;\n onClose: () => void;\n}\n\nconst CopyToast = ({\n open,\n toastKey,\n text,\n onClose,\n}: CopyToastProps): ReactElement => (\n <StyledToastAnchor>\n <SlideFromTop in={open}>\n <ToastMessage\n key={toastKey}\n className=\"c-toast-message\"\n type=\"success\"\n text={text}\n dismissible\n dropShadow\n timeout={3000}\n onClose={onClose}\n />\n </SlideFromTop>\n </StyledToastAnchor>\n);\n\n/* ------------------------------------------------------------------ */\n/* Shared password-gate body (describe + password in one dialog) */\n/* ------------------------------------------------------------------ */\n\nconst StyledGateBody = styled.div`\n font-family: ${SANS};\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .pg-field {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n /* DS InputPassword wrapper is fixed-width — fill the dialog. */\n .pg-input.c-input-wrapper,\n .pg-input {\n width: 100%;\n max-width: none;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Backup Codes — combined describe + password dialog */\n/* ------------------------------------------------------------------ */\n\nexport interface BackupCodesDialogsProps {\n open: boolean;\n onClose: () => void;\n}\n\n/**\n * The full Backup Codes flow: the combined regenerate/password dialog, then the\n * one-time reveal dialog with its loading skeleton. Cancelling the first dialog\n * is a pure no-op — no codes are issued, no toast.\n */\nexport const BackupCodesDialogs = ({\n open,\n onClose,\n}: BackupCodesDialogsProps): ReactElement => {\n const [password, setPassword] = useState(\"\");\n const [attempted, setAttempted] = useState(false);\n const [revealOpen, setRevealOpen] = useState(false);\n const [loading, setLoading] = useState(true);\n\n const [copyOpen, setCopyOpen] = useState(false);\n const [copyKey, setCopyKey] = useState(0);\n\n // Reset the gate each time it (re)opens.\n useEffect(() => {\n if (open) {\n setPassword(\"\");\n setAttempted(false);\n }\n }, [open]);\n\n // Simulate the API generating the new set: a ~1s skeleton on reveal.\n useEffect(() => {\n if (!revealOpen) {\n return undefined;\n }\n setLoading(true);\n const timer = window.setTimeout(() => setLoading(false), 1100);\n return () => window.clearTimeout(timer);\n }, [revealOpen]);\n\n const passwordInvalid = attempted && password.trim() === \"\";\n\n const handleConfirm = (): void => {\n if (password.trim() === \"\") {\n setAttempted(true);\n return;\n }\n // Valid password + submit is all the confirmation we need: close the gate\n // and open the reveal (which regenerates the set).\n onClose();\n setRevealOpen(true);\n };\n\n const handleCopy = (): void => {\n setCopyOpen(true);\n setCopyKey((k) => k + 1);\n };\n\n const closeReveal = (): void => {\n setRevealOpen(false);\n };\n\n return (\n <>\n <Dialog open={open} onClose={onClose} disableCloseOnEsc>\n <Dialog.Title>Regenerate Backup Codes</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledGateBody>\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n This drops all of your existing backup codes and creates a new set\n of 10. Any codes you saved before will stop working. The new codes\n are shown only once. Enter your password to confirm it's you.\n </Body2>\n <div className=\"pg-field\">\n <Label htmlFor=\"backup-codes-password\">Your Password</Label>\n <InputPassword\n id=\"backup-codes-password\"\n wrapperClassName=\"pg-input\"\n value={password}\n onChange={asInputChange((value) => {\n setPassword(value);\n setAttempted(false);\n })}\n invalid={passwordInvalid}\n errorMessage={\n passwordInvalid ? \"Your password is required.\" : undefined\n }\n autoFocus\n autoComplete=\"current-password\"\n />\n </div>\n </StyledGateBody>\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: 12 }}\n onClick={handleConfirm}\n >\n Regenerate Codes\n </Button>\n <Button variant=\"secondary\" onClick={onClose}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n\n <BackupCodesRevealDialog\n open={revealOpen}\n loading={loading}\n onClose={closeReveal}\n onCopy={handleCopy}\n />\n\n <CopyToast\n open={copyOpen}\n toastKey={copyKey}\n text=\"Backup codes copied to clipboard.\"\n onClose={() => setCopyOpen(false)}\n />\n </>\n );\n};\n\n/* ------------------------------------------------------------------ */\n/* Backup Codes — one-time reveal (skeleton while loading) */\n/* ------------------------------------------------------------------ */\n\nconst StyledRevealBody = styled.div`\n font-family: ${SANS};\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .bc-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px 16px;\n }\n\n .bc-code {\n font-family: ${MONO};\n font-size: 14px;\n letter-spacing: 0.5px;\n color: var(--color-theme-900);\n padding: 6px 10px;\n border-radius: 6px;\n background-color: var(--color-theme-200);\n text-align: center;\n }\n\n .bc-skeleton {\n height: 32px;\n border-radius: 6px;\n width: 100%;\n }\n`;\n\ninterface BackupCodesRevealDialogProps {\n open: boolean;\n loading: boolean;\n onClose: () => void;\n onCopy: () => void;\n}\n\nconst BackupCodesRevealDialog = ({\n open,\n loading,\n onClose,\n onCopy,\n}: BackupCodesRevealDialogProps): ReactElement => (\n <Dialog open={open} onClose={onClose} disableCloseOnEsc>\n <Dialog.Title>Your Backup Codes</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledRevealBody>\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n Use a backup code to log in when email isn't available. Each code\n works once.\n </Body2>\n <div className=\"bc-grid\">\n {loading\n ? [...Array(10)].map((_, index) => (\n <SkeletonLoader key={index} className=\"bc-skeleton\" />\n ))\n : SAMPLE_BACKUP_CODES.map((code) => (\n <div key={code} className=\"bc-code\">\n {code}\n </div>\n ))}\n </div>\n <InfoBox type=\"note\" showIcon title=\"Codes are shown only once\">\n <Body2 color=\"secondary\">\n Save them somewhere safe, they can't be displayed again. You\n can generate a new set from your profile at any time.\n </Body2>\n </InfoBox>\n </StyledRevealBody>\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: 12 }}\n onClick={onClose}\n disabled={loading}\n >\n I've Saved My Codes\n </Button>\n <Button variant=\"secondary\" onClick={onCopy} disabled={loading}>\n Copy Codes\n </Button>\n </Dialog.Actions>\n </Dialog>\n);\n\n/* ------------------------------------------------------------------ */\n/* Create Login Code — password gate + one-time reveal */\n/* ------------------------------------------------------------------ */\n\nconst StyledCodeRow = styled.div`\n font-family: ${SANS};\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .lc-label {\n display: block;\n margin-bottom: 6px;\n }\n\n .lc-code-field {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 8px;\n background-color: var(--color-theme-200);\n }\n\n .lc-code {\n font-family: ${MONO};\n font-size: 15px;\n letter-spacing: 0.5px;\n color: var(--color-theme-900);\n flex: 1 1 auto;\n }\n\n .lc-copy svg {\n fill: var(--color-theme-600);\n }\n\n .lc-caption {\n display: block;\n margin-top: 6px;\n }\n`;\n\n/* Title row for the reveal dialog: heading on the left, X close on the right\n (the app's Use Token dialog pattern). Applied via className since\n Dialog.Title doesn't accept inline style. */\nconst StyledRevealTitle = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n .lc-close svg {\n fill: var(--color-theme-600);\n }\n`;\n\nexport interface CreateLoginCodeDialogsProps {\n open: boolean;\n onClose: () => void;\n /** Target user's full name (drives the dialog copy). */\n userName: string;\n}\n\n/**\n * Owner-minted login code flow (task #18): password gate first, then the\n * one-time reveal. The reveal has no footer — an X in the title closes it —\n * mirroring the app's Use Token dialog.\n */\nexport const CreateLoginCodeDialogs = ({\n open,\n onClose,\n userName,\n}: CreateLoginCodeDialogsProps): ReactElement => {\n const firstName = useMemo(\n () => userName.split(\" \")[0] || userName,\n [userName]\n );\n\n const [password, setPassword] = useState(\"\");\n const [attempted, setAttempted] = useState(false);\n const [revealOpen, setRevealOpen] = useState(false);\n // Expiry copy: computed as \"now + 10 min\" at the moment the code is minted.\n const [expiry, setExpiry] = useState(\"\");\n\n const [copyOpen, setCopyOpen] = useState(false);\n const [copyKey, setCopyKey] = useState(0);\n\n useEffect(() => {\n if (open) {\n setPassword(\"\");\n setAttempted(false);\n }\n }, [open]);\n\n const passwordInvalid = attempted && password.trim() === \"\";\n\n const handleConfirm = (): void => {\n if (password.trim() === \"\") {\n setAttempted(true);\n return;\n }\n const when = new Date(Date.now() + 10 * 60000);\n const hh = String(when.getHours()).padStart(2, \"0\");\n const mm = String(when.getMinutes()).padStart(2, \"0\");\n setExpiry(`${hh}:${mm}`);\n onClose();\n setRevealOpen(true);\n };\n\n const handleCopy = (): void => {\n setCopyOpen(true);\n setCopyKey((k) => k + 1);\n };\n\n return (\n <>\n <Dialog open={open} onClose={onClose} disableCloseOnEsc>\n <Dialog.Title>Confirm Password</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledGateBody>\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n You're about to create a one-time login code for {userName}.\n Any code they already had pending will be replaced.\n </Body2>\n <div className=\"pg-field\">\n <Label htmlFor=\"login-code-password\">Your Password</Label>\n <InputPassword\n id=\"login-code-password\"\n wrapperClassName=\"pg-input\"\n value={password}\n onChange={asInputChange((value) => {\n setPassword(value);\n setAttempted(false);\n })}\n invalid={passwordInvalid}\n errorMessage={\n passwordInvalid ? \"Your password is required.\" : undefined\n }\n autoFocus\n autoComplete=\"current-password\"\n />\n </div>\n </StyledGateBody>\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: 12 }}\n onClick={handleConfirm}\n >\n Confirm\n </Button>\n <Button variant=\"secondary\" onClick={onClose}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n\n <Dialog open={revealOpen} onClose={() => setRevealOpen(false)}>\n <Dialog.Title disableDefaultHeading>\n <StyledRevealTitle>\n <Header3>One-Time Login Code</Header3>\n <IconButton\n variant=\"text gray\"\n className=\"lc-close\"\n onClick={() => setRevealOpen(false)}\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledRevealTitle>\n </Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledCodeRow>\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n Share this code with {firstName} through a secure channel.\n They'll still need their password to log in, the code alone\n won't work.\n </Body2>\n <div>\n <Label className=\"lc-label\">Login Code</Label>\n <div className=\"lc-code-field\">\n <span className=\"lc-code\">{SAMPLE_LOGIN_CODE}</span>\n <Tooltip title=\"Copy code\">\n <IconButton\n variant=\"text gray\"\n className=\"lc-copy\"\n onClick={handleCopy}\n >\n <CopyIcon />\n </IconButton>\n </Tooltip>\n </div>\n <Caption1 color=\"tertiary\" className=\"lc-caption\">\n Expires at {expiry} (in 10 minutes), it can't be shown\n again.\n </Caption1>\n </div>\n <InfoBox\n type=\"default\"\n showIcon\n title={`${firstName} has been notified`}\n >\n <Body2 color=\"secondary\">\n They received an email saying you created this code for their\n account. The email doesn't include the code.\n </Body2>\n </InfoBox>\n </StyledCodeRow>\n </Dialog.Content>\n </Dialog>\n\n <CopyToast\n open={copyOpen}\n toastKey={copyKey}\n text=\"Login code copied to clipboard.\"\n onClose={() => setCopyOpen(false)}\n />\n </>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAA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AACxE,QAAA,CAAA6J,OAAO;IACN/E,IAAI,EAAC,SAAS;IACdgF,QAAQ;IACRC,KAAK,KAAAiC,MAAA,CAAK1B,SAAS;EAAqB,gBAExC/K,MAAA,CAAAmB,OAAA,CAAA8D,aAAA,CAACjE,WAAA,CAAA0H,KAAK;IAACC,KAAK,EAAC;EAAW,GAAC,4GAGlB,CACA,CACI,CACD,CACV,CAAC,eAET3I,MAAA,CAAAmB,OAAA,CAAA8D,aAAA,CAACN,SAAS;IACRE,IAAI,EAAEqC,QAAS;IACfpC,QAAQ,EAAEwC,OAAQ;IAClBvC,IAAI,EAAC,iCAAiC;IACtCC,OAAO,EAAE,SAATA,OAAOA,CAAA;MAAA,OAAQmC,WAAW,CAAC,KAAK,CAAC;IAAA;EAAC,CACnC,CACD,CAAC;AAEP,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TwoFactorShield = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Icons = require("../../components/Icons");
|
|
9
|
+
var _Tooltip = require("../../components/Tooltip");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/* Two-factor-authentication shield — the same indicator as the app's
|
|
12
|
+
`User2FA` (ShieldIcon + Tooltip). Shared by the Users list and the User
|
|
13
|
+
profile so the icon and its tooltip stay identical in one place. The shield
|
|
14
|
+
uses its default muted `--color-theme-600` fill. */
|
|
15
|
+
|
|
16
|
+
var TwoFactorShield = exports.TwoFactorShield = function TwoFactorShield(_ref) {
|
|
17
|
+
var _ref$needsSetup = _ref.needsSetup,
|
|
18
|
+
needsSetup = _ref$needsSetup === void 0 ? false : _ref$needsSetup,
|
|
19
|
+
className = _ref.className;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
21
|
+
title: needsSetup ? "Enable two-factor authentication" : "Two-factor authentication enabled"
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.ShieldIcon, {
|
|
23
|
+
className: className,
|
|
24
|
+
style: needsSetup ? {
|
|
25
|
+
opacity: 0.5,
|
|
26
|
+
cursor: "pointer"
|
|
27
|
+
} : undefined
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
TwoFactorShield.displayName = "TwoFactorShield";
|
|
31
|
+
//# sourceMappingURL=TwoFactorShield.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoFactorShield.js","names":["_react","_interopRequireDefault","require","_Icons","_Tooltip","e","__esModule","default","TwoFactorShield","exports","_ref","_ref$needsSetup","needsSetup","className","createElement","Tooltip","title","ShieldIcon","style","opacity","cursor","undefined","displayName"],"sources":["../../../../src/presentation/shared/TwoFactorShield.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport { ShieldIcon } from \"../../components/Icons\";\nimport { Tooltip } from \"../../components/Tooltip\";\n\n/* Two-factor-authentication shield — the same indicator as the app's\n `User2FA` (ShieldIcon + Tooltip). Shared by the Users list and the User\n profile so the icon and its tooltip stay identical in one place. The shield\n uses its default muted `--color-theme-600` fill. */\n\nexport interface TwoFactorShieldProps {\n /** When true, 2FA isn't set up yet for the logged-in user: the shield is\n * dimmed and clickable, and the tooltip prompts to enable it. Otherwise it\n * reads as \"enabled\" (the default). Mirrors `isLoggedUser2FADisabled`. */\n needsSetup?: boolean;\n className?: string;\n}\n\nexport const TwoFactorShield = ({\n needsSetup = false,\n className,\n}: TwoFactorShieldProps): ReactElement => (\n <Tooltip\n title={\n needsSetup\n ? \"Enable two-factor authentication\"\n : \"Two-factor authentication enabled\"\n }\n >\n <ShieldIcon\n className={className}\n style={needsSetup ? { opacity: 0.5, cursor: \"pointer\" } : undefined}\n />\n </Tooltip>\n);\n\nTwoFactorShield.displayName = \"TwoFactorShield\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAAmD,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnD;AACA;AACA;AACA;;AAUO,IAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,SAAlBA,eAAeA,CAAAE,IAAA;EAAA,IAAAC,eAAA,GAAAD,IAAA,CAC1BE,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAClBE,SAAS,GAAAH,IAAA,CAATG,SAAS;EAAA,oBAETb,MAAA,CAAAO,OAAA,CAAAO,aAAA,CAACV,QAAA,CAAAW,OAAO;IACNC,KAAK,EACHJ,UAAU,GACN,kCAAkC,GAClC;EACL,gBAEDZ,MAAA,CAAAO,OAAA,CAAAO,aAAA,CAACX,MAAA,CAAAc,UAAU;IACTJ,SAAS,EAAEA,SAAU;IACrBK,KAAK,EAAEN,UAAU,GAAG;MAAEO,OAAO,EAAE,GAAG;MAAEC,MAAM,EAAE;IAAU,CAAC,GAAGC;EAAU,CACrE,CACM,CAAC;AAAA,CACX;AAEDb,eAAe,CAACc,WAAW,GAAG,iBAAiB","ignoreList":[]}
|