@activecollab/components 2.0.436 → 2.0.438
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/presentation/shared/ConnectRepositoryDialog.js +0 -3
- package/dist/cjs/presentation/shared/ConnectRepositoryDialog.js.map +1 -1
- package/dist/cjs/presentation/shared/LinkBranchOrPullRequestDialog.js +0 -3
- package/dist/cjs/presentation/shared/LinkBranchOrPullRequestDialog.js.map +1 -1
- package/dist/cjs/presentation/shared/TwoFactorDialogs.js +0 -9
- package/dist/cjs/presentation/shared/TwoFactorDialogs.js.map +1 -1
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.js +0 -3
- package/dist/esm/presentation/shared/ConnectRepositoryDialog.js.map +1 -1
- package/dist/esm/presentation/shared/LinkBranchOrPullRequestDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/LinkBranchOrPullRequestDialog.js +0 -3
- package/dist/esm/presentation/shared/LinkBranchOrPullRequestDialog.js.map +1 -1
- package/dist/esm/presentation/shared/TwoFactorDialogs.d.ts.map +1 -1
- package/dist/esm/presentation/shared/TwoFactorDialogs.js +0 -9
- package/dist/esm/presentation/shared/TwoFactorDialogs.js.map +1 -1
- package/package.json +1 -1
|
@@ -172,9 +172,6 @@ export const BackupCodesDialogs = _ref2 => {
|
|
|
172
172
|
autoComplete: "current-password"
|
|
173
173
|
})))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(Button, {
|
|
174
174
|
variant: "primary",
|
|
175
|
-
style: {
|
|
176
|
-
marginRight: 12
|
|
177
|
-
},
|
|
178
175
|
onClick: handleConfirm
|
|
179
176
|
}, "Regenerate Codes"), /*#__PURE__*/React.createElement(Button, {
|
|
180
177
|
variant: "secondary",
|
|
@@ -228,9 +225,6 @@ const BackupCodesRevealDialog = _ref3 => {
|
|
|
228
225
|
color: "secondary"
|
|
229
226
|
}, "Save them somewhere safe, they can't be displayed again. You can generate a new set from your profile at any time.")))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(Button, {
|
|
230
227
|
variant: "primary",
|
|
231
|
-
style: {
|
|
232
|
-
marginRight: 12
|
|
233
|
-
},
|
|
234
228
|
onClick: onClose,
|
|
235
229
|
disabled: loading
|
|
236
230
|
}, "I've Saved My Codes"), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -333,9 +327,6 @@ export const CreateLoginCodeDialogs = _ref4 => {
|
|
|
333
327
|
autoComplete: "current-password"
|
|
334
328
|
})))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(Button, {
|
|
335
329
|
variant: "primary",
|
|
336
|
-
style: {
|
|
337
|
-
marginRight: 12
|
|
338
|
-
},
|
|
339
330
|
onClick: handleConfirm
|
|
340
331
|
}, "Confirm"), /*#__PURE__*/React.createElement(Button, {
|
|
341
332
|
variant: "secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TwoFactorDialogs.js","names":["React","useEffect","useMemo","useState","styled","Button","Dialog","IconButton","CancelCrossIcon","CopyIcon","InfoBox","InputPassword","Label","SkeletonLoader","ToastMessage","Tooltip","SlideFromTop","Body2","Caption1","Header3","SANS","MONO","asInputChange","fn","SAMPLE_BACKUP_CODES","SAMPLE_LOGIN_CODE","StyledToastAnchor","div","withConfig","displayName","componentId","CopyToast","_ref","open","toastKey","text","onClose","createElement","in","key","className","type","dismissible","dropShadow","timeout","StyledGateBody","BackupCodesDialogs","_ref2","_useState","password","setPassword","_useState2","attempted","setAttempted","_useState3","revealOpen","setRevealOpen","_useState4","loading","setLoading","_useState5","copyOpen","setCopyOpen","_useState6","copyKey","setCopyKey","undefined","timer","window","setTimeout","clearTimeout","passwordInvalid","trim","handleConfirm","handleCopy","k","closeReveal","Fragment","disableCloseOnEsc","Title","ContentDivider","Content","color","lineHeight","htmlFor","id","wrapperClassName","value","onChange","invalid","errorMessage","autoFocus","autoComplete","Actions","variant","style","marginRight","onClick","BackupCodesRevealDialog","onCopy","StyledRevealBody","_ref3","Array","map","_","index","code","showIcon","title","disabled","StyledCodeRow","StyledRevealTitle","CreateLoginCodeDialogs","_ref4","userName","firstName","split","_useState7","_useState8","_useState9","_useState0","expiry","setExpiry","_useState1","_useState10","when","Date","now","hh","String","getHours","padStart","mm","getMinutes","disableDefaultHeading"],"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,OAAOA,KAAK,IAAkBC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEzE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,eAAe,EAAEC,QAAQ,QAAQ,wBAAwB;AAClE,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,YAAY,QAAQ,8BAA8B;AAC3D,SAASC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,6BAA6B;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,IAAI,GACR,kFAAkF;AACpF,MAAMC,IAAI,GACR,qEAAqE;;AAEvE;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GACjBC,EAA2B,IAE3BA,EAA2D;;AAE7D;AACA,MAAMC,m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AC,eAETlF,KAAA,CAAAqC,aAAA,CAACN,SAAS;IACRE,IAAI,EAAE4B,QAAS;IACf3B,QAAQ,EAAE8B,OAAQ;IAClB7B,IAAI,EAAC,iCAAiC;IACtCC,OAAO,EAAEA,CAAA,KAAM0B,WAAW,CAAC,KAAK;EAAE,CACnC,CACD,CAAC;AAEP,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"TwoFactorDialogs.js","names":["React","useEffect","useMemo","useState","styled","Button","Dialog","IconButton","CancelCrossIcon","CopyIcon","InfoBox","InputPassword","Label","SkeletonLoader","ToastMessage","Tooltip","SlideFromTop","Body2","Caption1","Header3","SANS","MONO","asInputChange","fn","SAMPLE_BACKUP_CODES","SAMPLE_LOGIN_CODE","StyledToastAnchor","div","withConfig","displayName","componentId","CopyToast","_ref","open","toastKey","text","onClose","createElement","in","key","className","type","dismissible","dropShadow","timeout","StyledGateBody","BackupCodesDialogs","_ref2","_useState","password","setPassword","_useState2","attempted","setAttempted","_useState3","revealOpen","setRevealOpen","_useState4","loading","setLoading","_useState5","copyOpen","setCopyOpen","_useState6","copyKey","setCopyKey","undefined","timer","window","setTimeout","clearTimeout","passwordInvalid","trim","handleConfirm","handleCopy","k","closeReveal","Fragment","disableCloseOnEsc","Title","ContentDivider","Content","color","lineHeight","htmlFor","id","wrapperClassName","value","onChange","invalid","errorMessage","autoFocus","autoComplete","Actions","variant","onClick","BackupCodesRevealDialog","onCopy","StyledRevealBody","_ref3","Array","map","_","index","code","showIcon","title","disabled","StyledCodeRow","StyledRevealTitle","CreateLoginCodeDialogs","_ref4","userName","firstName","split","_useState7","_useState8","_useState9","_useState0","expiry","setExpiry","_useState1","_useState10","when","Date","now","hh","String","getHours","padStart","mm","getMinutes","disableDefaultHeading"],"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 variant=\"primary\" onClick={handleConfirm}>\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 variant=\"primary\" onClick={onClose} disabled={loading}>\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 variant=\"primary\" onClick={handleConfirm}>\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,OAAOA,KAAK,IAAkBC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEzE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,MAAM,QAAQ,yBAAyB;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