@digitaldefiance/express-suite-react-components 4.27.5 → 4.27.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/express-suite-react-components",
|
|
3
|
-
"version": "4.27.
|
|
3
|
+
"version": "4.27.6",
|
|
4
4
|
"homepage": "https://github.com/Digital-Defiance/react-components",
|
|
5
5
|
"description": "React MUI components for Digital Defiance Express Suite",
|
|
6
6
|
"repository": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSettingsForm.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/components/UserSettingsForm.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,EAAE,EAA6C,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAK3B,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,sBAAsB,CAAC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,OAAO,CACjD;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GACrC;QACE,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CA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,EAAE,MAAM,CAAC;QACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"UserSettingsForm.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/components/UserSettingsForm.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,EAAE,EAA6C,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAK3B,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,sBAAsB,CAAC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,OAAO,CACjD;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GACrC;QACE,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CA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,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAmwBtD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -243,23 +243,23 @@ const UserSettingsForm = ({ initialValues, onSubmit, languages, emailValidation,
|
|
|
243
243
|
tComponent(suite_core_lib_1.SuiteCoreComponentId, suite_core_lib_1.SuiteCoreStringKey.Registration_DirectChallengeLabel) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "text.secondary", sx: { ml: 4, mt: -1 }, children: labels.directChallengeHelper ||
|
|
244
244
|
tComponent(suite_core_lib_1.SuiteCoreComponentId, suite_core_lib_1.SuiteCoreStringKey.Registration_DirectChallengeHelper) })] }), additionalFields && additionalFields(formik), totpStatus !== undefined && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { mt: 3, mb: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", component: "h2", gutterBottom: true, children: labels.totpSectionTitle || 'Two-Factor Authentication' }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: totpStatus
|
|
245
245
|
? (labels.totpStatusEnabled || '2FA is currently enabled')
|
|
246
|
-
: (labels.totpStatusDisabled || '2FA is currently disabled') }), totpError && ((0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "error", sx: { mb: 2 }, role: "alert", children: totpError })), !totpStatus && !showTotpSetup && ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", onClick: handleEnableTotp, disabled: totpSetupLoading, "data-testid": "enable-totp-button", children: totpSetupLoading
|
|
246
|
+
: (labels.totpStatusDisabled || '2FA is currently disabled') }), totpError && ((0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "error", sx: { mb: 2 }, role: "alert", children: totpError })), !totpStatus && !showTotpSetup && ((0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "outlined", onClick: handleEnableTotp, disabled: totpSetupLoading, "data-testid": "enable-totp-button", children: totpSetupLoading
|
|
247
247
|
? 'Setting up...'
|
|
248
|
-
: (labels.totpEnableButton || 'Enable 2FA') })), showTotpSetup && totpProvisioningUri && totpSecret && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2 }, children: [(0, jsx_runtime_1.jsx)(TotpSetupForm_1.TotpSetupForm, { provisioningUri: totpProvisioningUri, secret: totpSecret, onConfirm: handleTotpConfirm }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { textAlign: 'center', mt: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", onClick: handleCancelTotpAction, "data-testid": "cancel-totp-setup-button", children: labels.totpCancelButton || 'Cancel' }) })] })), totpStatus && !showTotpSetup && !showDisablePrompt && !showResetPrompt && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", color: "error", onClick: () => { setShowDisablePrompt(true); setTotpError(null); }, "data-testid": "disable-totp-button", children: labels.totpDisableButton || 'Disable 2FA' }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", onClick: () => { setShowResetPrompt(true); setTotpError(null); }, "data-testid": "reset-totp-button", children: labels.totpResetButton || 'Reset 2FA' })] })), showDisablePrompt && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: { mb: 1 }, children: "Enter your current 2FA code to disable two-factor authentication:" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, id: "totp-disable-code", name: "totp-disable-code", label: labels.totpDisableCodeLabel || 'TOTP Code', value: disableCode, onChange: (e) => setDisableCode(e.target.value), inputProps: {
|
|
248
|
+
: (labels.totpEnableButton || 'Enable 2FA') })), showTotpSetup && totpProvisioningUri && totpSecret && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2 }, children: [(0, jsx_runtime_1.jsx)(TotpSetupForm_1.TotpSetupForm, { provisioningUri: totpProvisioningUri, secret: totpSecret, onConfirm: handleTotpConfirm }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { textAlign: 'center', mt: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "text", onClick: handleCancelTotpAction, "data-testid": "cancel-totp-setup-button", children: labels.totpCancelButton || 'Cancel' }) })] })), totpStatus && !showTotpSetup && !showDisablePrompt && !showResetPrompt && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "outlined", color: "error", onClick: () => { setShowDisablePrompt(true); setTotpError(null); }, "data-testid": "disable-totp-button", children: labels.totpDisableButton || 'Disable 2FA' }), (0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "outlined", onClick: () => { setShowResetPrompt(true); setTotpError(null); }, "data-testid": "reset-totp-button", children: labels.totpResetButton || 'Reset 2FA' })] })), showDisablePrompt && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: { mb: 1 }, children: "Enter your current 2FA code to disable two-factor authentication:" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, id: "totp-disable-code", name: "totp-disable-code", label: labels.totpDisableCodeLabel || 'TOTP Code', value: disableCode, onChange: (e) => setDisableCode(e.target.value), inputProps: {
|
|
249
249
|
'aria-label': labels.totpDisableCodeLabel || 'TOTP Code',
|
|
250
250
|
inputMode: 'numeric',
|
|
251
251
|
maxLength: 6,
|
|
252
252
|
pattern: '\\d{6}',
|
|
253
|
-
}, autoComplete: "one-time-code", margin: "normal" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2, mt: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "error", onClick: handleDisableTotp, disabled: disableSubmitting || !/^\d{6}$/.test(disableCode), "data-testid": "disable-totp-submit-button", children: disableSubmitting
|
|
253
|
+
}, autoComplete: "one-time-code", margin: "normal" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2, mt: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "contained", color: "error", onClick: handleDisableTotp, disabled: disableSubmitting || !/^\d{6}$/.test(disableCode), "data-testid": "disable-totp-submit-button", children: disableSubmitting
|
|
254
254
|
? 'Disabling...'
|
|
255
|
-
: (labels.totpDisableSubmitButton || 'Confirm Disable') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", onClick: handleCancelTotpAction, "data-testid": "cancel-disable-totp-button", children: labels.totpCancelButton || 'Cancel' })] })] })), showResetPrompt && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: { mb: 1 }, children: "Enter your current 2FA code to reset two-factor authentication:" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, id: "totp-reset-code", name: "totp-reset-code", label: labels.totpResetCodeLabel || 'TOTP Code', value: resetCode, onChange: (e) => setResetCode(e.target.value), inputProps: {
|
|
255
|
+
: (labels.totpDisableSubmitButton || 'Confirm Disable') }), (0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "text", onClick: handleCancelTotpAction, "data-testid": "cancel-disable-totp-button", children: labels.totpCancelButton || 'Cancel' })] })] })), showResetPrompt && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: { mb: 1 }, children: "Enter your current 2FA code to reset two-factor authentication:" }), (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, id: "totp-reset-code", name: "totp-reset-code", label: labels.totpResetCodeLabel || 'TOTP Code', value: resetCode, onChange: (e) => setResetCode(e.target.value), inputProps: {
|
|
256
256
|
'aria-label': labels.totpResetCodeLabel || 'TOTP Code',
|
|
257
257
|
inputMode: 'numeric',
|
|
258
258
|
maxLength: 6,
|
|
259
259
|
pattern: '\\d{6}',
|
|
260
|
-
}, autoComplete: "one-time-code", margin: "normal" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2, mt: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: handleResetTotp, disabled: resetSubmitting || !/^\d{6}$/.test(resetCode), "data-testid": "reset-totp-submit-button", children: resetSubmitting
|
|
260
|
+
}, autoComplete: "one-time-code", margin: "normal" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2, mt: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "contained", onClick: handleResetTotp, disabled: resetSubmitting || !/^\d{6}$/.test(resetCode), "data-testid": "reset-totp-submit-button", children: resetSubmitting
|
|
261
261
|
? 'Resetting...'
|
|
262
|
-
: (labels.totpResetSubmitButton || 'Confirm Reset') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", onClick: handleCancelTotpAction, "data-testid": "cancel-reset-totp-button", children: labels.totpCancelButton || 'Cancel' })] })] }))] })), apiErrors.general && ((0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "error", sx: { mt: 2, mb: 2 }, children: apiErrors.general })), successMessage && ((0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "success", sx: { mt: 2, mb: 2 }, children: successMessage })), (0, jsx_runtime_1.jsx)(material_1.Button, { type: "submit", fullWidth: true, variant: "contained", color: "primary", sx: { mt: 3, mb: 2 }, disabled: formik.isSubmitting, children: saving
|
|
262
|
+
: (labels.totpResetSubmitButton || 'Confirm Reset') }), (0, jsx_runtime_1.jsx)(material_1.Button, { type: "button", variant: "text", onClick: handleCancelTotpAction, "data-testid": "cancel-reset-totp-button", children: labels.totpCancelButton || 'Cancel' })] })] }))] })), apiErrors.general && ((0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "error", sx: { mt: 2, mb: 2 }, children: apiErrors.general })), successMessage && ((0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "success", sx: { mt: 2, mb: 2 }, children: successMessage })), (0, jsx_runtime_1.jsx)(material_1.Button, { type: "submit", fullWidth: true, variant: "contained", color: "primary", sx: { mt: 3, mb: 2 }, disabled: formik.isSubmitting, children: saving
|
|
263
263
|
? labels.saving ||
|
|
264
264
|
tComponent(suite_core_lib_1.SuiteCoreComponentId, suite_core_lib_1.SuiteCoreStringKey.Settings_Saving)
|
|
265
265
|
: labels.save ||
|