From e871ec74d7a0d912d42f1dd2f8ebfdaa8a9e38b4 Mon Sep 17 00:00:00 2001 From: Laurin Weger <59744144+Laurin-W@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:40:06 +0200 Subject: [PATCH] fix: reset password form issues --- .../packages/auth-provider/dist/index.cjs.js | 332 +++---- .../auth-provider/dist/index.cjs.js.map | 2 +- .../packages/auth-provider/dist/index.d.ts | 851 ++++++++++-------- .../auth-provider/dist/index.d.ts.map | 2 +- .../packages/auth-provider/dist/index.es.js | 332 +++---- .../auth-provider/dist/index.es.js.map | 2 +- .../LocalLoginPage/NewPasswordForm.js | 119 --- .../LocalLoginPage/NewPasswordForm.tsx | 148 +++ .../LocalLoginPage/ResetPasswordForm.js | 58 -- .../LocalLoginPage/ResetPasswordForm.tsx | 77 ++ .../auth-provider/src/messages/english.js | 3 +- .../auth-provider/src/messages/french.js | 3 +- 12 files changed, 1045 insertions(+), 884 deletions(-) delete mode 100644 src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js create mode 100644 src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.tsx delete mode 100644 src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js create mode 100644 src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.tsx diff --git a/src/frontend/packages/auth-provider/dist/index.cjs.js b/src/frontend/packages/auth-provider/dist/index.cjs.js index 928e74a32..c5a582124 100644 --- a/src/frontend/packages/auth-provider/dist/index.cjs.js +++ b/src/frontend/packages/auth-provider/dist/index.cjs.js @@ -1920,17 +1920,33 @@ var $403a8b015c5eea65$export$2e2bcd8739ae039 = $403a8b015c5eea65$var$LoginForm; -const $176df6bd8edc5f4d$var$samePassword = (value, allValues)=>{ - if (value && value !== allValues.password) return "Mot de passe diff\xe9rent du premier"; +const $2f0ce992717e175e$var$samePassword = (value, allValues)=>{ + if (value && value !== allValues.password) return "auth.input.password_mismatch"; }; /** * * @param {string} redirectTo - * @param {Object} passwordScorer Scorer to evaluate and indicate password strength. + * @param {typeof defaultScorer} passwordScorer Scorer to evaluate and indicate password strength. * Set to `null` or `false`, if you don't want password strength checks. Default is * passwordStrength's `defaultScorer`. * @returns - */ const $176df6bd8edc5f4d$var$NewPasswordForm = ({ redirectTo: redirectTo, passwordScorer: passwordScorer = (0, $d1ca1e1d215e32ca$export$19dcdb21c6965fb8) })=>{ + */ const $2f0ce992717e175e$var$NewPasswordForm = ({ redirectTo: redirectTo, passwordScorer: passwordScorer = (0, $d1ca1e1d215e32ca$export$19dcdb21c6965fb8) })=>{ + const [searchParams] = (0, $4Uj5b$reactrouterdom.useSearchParams)(); + const [handleSubmit, setHandleSubmit] = (0, $4Uj5b$react.useState)(()=>{}); + return /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.Form), { + onSubmit: handleSubmit, + noValidate: true, + defaultValues: { + email: searchParams.get("email") + }, + children: /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)($2f0ce992717e175e$var$FormContent, { + setHandleSubmit: setHandleSubmit, + redirectTo: redirectTo, + passwordScorer: passwordScorer + }) + }); +}; +const $2f0ce992717e175e$var$FormContent = ({ setHandleSubmit: setHandleSubmit, redirectTo: redirectTo, passwordScorer: passwordScorer })=>{ const location = (0, $4Uj5b$reactrouterdom.useLocation)(); const searchParams = new URLSearchParams(location.search); const token = searchParams.get("token"); @@ -1939,169 +1955,173 @@ const $176df6bd8edc5f4d$var$samePassword = (value, allValues)=>{ const translate = (0, $4Uj5b$reactadmin.useTranslate)(); const notify = (0, $4Uj5b$reactadmin.useNotify)(); const [newPassword, setNewPassword] = (0, $4Uj5b$react.useState)(""); - const submit = (values)=>{ - setLoading(true); - authProvider.setNewPassword({ - ...values, - token: token - }).then(()=>{ - setTimeout(()=>{ - const url = new URL("/login", window.location.origin); - if (redirectTo) url.searchParams.append("redirect", redirectTo); - url.searchParams.append("email", values.email); - window.location.href = url.toString(); - setLoading(false); - }, 2000); - notify("auth.notification.password_changed", { - type: "info" - }); - }).catch((error)=>{ - setLoading(false); - notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { - type: "warning", - messageArgs: { - _: typeof error === "string" ? error : error && error.message ? error.message : undefined - } + (0, $4Uj5b$react.useEffect)(()=>{ + setHandleSubmit(()=>async (values)=>{ + setLoading(true); + authProvider.setNewPassword({ + ...values, + token: token + }).then(()=>{ + setTimeout(()=>{ + const url = new URL("/login", window.location.origin); + if (redirectTo) url.searchParams.append("redirect", redirectTo); + url.searchParams.append("email", values.email); + window.location.href = url.toString(); + setLoading(false); + }, 2000); + notify("auth.notification.password_changed", { + type: "info" + }); + }).catch((error)=>{ + setLoading(false); + notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { + type: "warning", + messageArgs: { + _: typeof error === "string" ? error : error && error.message ? error.message : undefined + } + }); + }); }); - }); - }; - return /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.Form), { - onSubmit: submit, - noValidate: true, - defaultValues: { - email: searchParams.get("email") - }, - children: /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$muimaterial.CardContent), { - children: [ - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { - autoFocus: true, - source: "email", - label: translate("auth.input.email"), - autoComplete: "email", - fullWidth: true, - disabled: loading, - validate: (0, $4Uj5b$reactadmin.required)(), - format: (value)=>value ? value.toLowerCase() : "" - }), - passwordScorer && /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$reactjsxruntime.Fragment), { - children: [ - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$muimaterial.Typography), { - variant: "caption", - style: { - marginBottom: 3 - }, - children: [ - translate("auth.input.password_strength"), - ":", - " " - ] - }), - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $edfec7f9e9fd7881$export$2e2bcd8739ae039), { - password: newPassword, - scorer: passwordScorer, - sx: { - width: "100%" - } - }) - ] - }), - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { - autoFocus: true, - type: "password", - source: "password", - value: newPassword, - label: translate("auth.input.new_password"), - autoComplete: "current-password", - fullWidth: true, - disabled: loading, - validate: [ - (0, $4Uj5b$reactadmin.required)(), - (0, $eab41bc89667b2c6$export$2e2bcd8739ae039)(passwordScorer) - ], - onChange: (e)=>setNewPassword(e.target.value) - }), - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { - type: "password", - source: "confirm-password", - label: translate("auth.input.confirm_new_password"), - autoComplete: "current-password", - fullWidth: true, - disabled: loading, - validate: [ - (0, $4Uj5b$reactadmin.required)(), - $176df6bd8edc5f4d$var$samePassword - ] - }), - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$muimaterial.Button), { - variant: "contained", - type: "submit", - color: "primary", - disabled: loading, - fullWidth: true, - children: translate("auth.action.set_new_password") - }) - ] - }) + }); + return /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$muimaterial.CardContent), { + children: [ + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { + autoFocus: true, + source: "email", + label: translate("auth.input.email"), + autoComplete: "email", + fullWidth: true, + disabled: loading, + validate: (0, $4Uj5b$reactadmin.required)(), + format: (value)=>value ? value.toLowerCase() : "" + }), + passwordScorer && /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$reactjsxruntime.Fragment), { + children: [ + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$muimaterial.Typography), { + variant: "caption", + style: { + marginBottom: 3 + }, + children: [ + translate("auth.input.password_strength"), + ":", + " " + ] + }), + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $edfec7f9e9fd7881$export$2e2bcd8739ae039), { + password: newPassword, + scorer: passwordScorer, + sx: { + width: "100%" + } + }) + ] + }), + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { + autoFocus: true, + type: "password", + source: "password", + value: newPassword, + label: translate("auth.input.new_password"), + autoComplete: "current-password", + fullWidth: true, + disabled: loading, + validate: [ + (0, $4Uj5b$reactadmin.required)(), + (0, $eab41bc89667b2c6$export$2e2bcd8739ae039)(passwordScorer) + ], + onChange: (e)=>setNewPassword(e.target.value) + }), + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { + type: "password", + source: "confirm-password", + label: translate("auth.input.confirm_new_password"), + autoComplete: "current-password", + fullWidth: true, + disabled: loading, + validate: [ + (0, $4Uj5b$reactadmin.required)(), + $2f0ce992717e175e$var$samePassword + ] + }), + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$muimaterial.Button), { + variant: "contained", + type: "submit", + color: "primary", + disabled: loading, + fullWidth: true, + children: translate("auth.action.set_new_password") + }) + ] }); }; -var $176df6bd8edc5f4d$export$2e2bcd8739ae039 = $176df6bd8edc5f4d$var$NewPasswordForm; +var $2f0ce992717e175e$export$2e2bcd8739ae039 = $2f0ce992717e175e$var$NewPasswordForm; -const $a04debd4e4af2a01$var$ResetPasswordForm = ()=>{ +const $be1129164d40878e$var$ResetPasswordForm = ()=>{ + const [handleSubmit, setHandleSubmit] = (0, $4Uj5b$react.useState)(()=>{}); + return /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.Form), { + onSubmit: handleSubmit, + noValidate: true, + children: /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)($be1129164d40878e$var$FormContent, { + setHandleSubmit: setHandleSubmit + }) + }); +}; +const $be1129164d40878e$var$FormContent = ({ setHandleSubmit: setHandleSubmit })=>{ const [loading, setLoading] = (0, $4Uj5b$reactadmin.useSafeSetState)(false); const authProvider = (0, $4Uj5b$reactadmin.useAuthProvider)(); const translate = (0, $4Uj5b$reactadmin.useTranslate)(); const notify = (0, $4Uj5b$reactadmin.useNotify)(); - const submit = (values)=>{ - setLoading(true); - authProvider.resetPassword({ - ...values - }).then((res)=>{ - setLoading(false); - notify("auth.notification.reset_password_submitted", { - type: "info" - }); - }).catch((error)=>{ - setLoading(false); - notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { - type: "warning", - messageArgs: { - _: typeof error === "string" ? error : error && error.message ? error.message : undefined - } + (0, $4Uj5b$react.useEffect)(()=>{ + setHandleSubmit(()=>async (values)=>{ + setLoading(true); + authProvider.resetPassword({ + ...values + }).then(()=>{ + setLoading(false); + notify("auth.notification.reset_password_submitted", { + type: "info" + }); + }).catch((error)=>{ + setLoading(false); + notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { + type: "warning", + messageArgs: { + _: typeof error === "string" ? error : error && error.message ? error.message : undefined + } + }); + }); }); - }); - }; - return /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.Form), { - onSubmit: submit, - children: /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$muimaterial.CardContent), { - children: [ - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { - autoFocus: true, - source: "email", - label: translate("auth.input.email"), - autoComplete: "email", - fullWidth: true, - disabled: loading, - validate: (0, $4Uj5b$reactadmin.required)(), - format: (value)=>value ? value.toLowerCase() : "" - }), - /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$muimaterial.Button), { - variant: "contained", - type: "submit", - color: "primary", - disabled: loading, - fullWidth: true, - children: translate("auth.action.submit") - }) - ] - }) + }); + return /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsxs)((0, $4Uj5b$muimaterial.CardContent), { + children: [ + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$reactadmin.TextInput), { + autoFocus: true, + source: "email", + label: translate("auth.input.email"), + autoComplete: "email", + fullWidth: true, + disabled: loading, + validate: (0, $4Uj5b$reactadmin.required)(), + format: (value)=>value ? value.toLowerCase() : "" + }), + /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $4Uj5b$muimaterial.Button), { + variant: "contained", + type: "submit", + color: "primary", + disabled: loading, + fullWidth: true, + children: translate("auth.action.submit") + }) + ] }); }; -var $a04debd4e4af2a01$export$2e2bcd8739ae039 = $a04debd4e4af2a01$var$ResetPasswordForm; +var $be1129164d40878e$export$2e2bcd8739ae039 = $be1129164d40878e$var$ResetPasswordForm; @@ -2271,8 +2291,8 @@ var $cd7709c431b14d14$export$2e2bcd8739ae039 = $cd7709c431b14d14$var$getSearchPa additionalSignupValues: additionalSignupValues, passwordScorer: passwordScorer }), - isResetPassword && /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $a04debd4e4af2a01$export$2e2bcd8739ae039), {}), - isNewPassword && /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $176df6bd8edc5f4d$export$2e2bcd8739ae039), { + isResetPassword && /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $be1129164d40878e$export$2e2bcd8739ae039), {}), + isNewPassword && /*#__PURE__*/ (0, $4Uj5b$reactjsxruntime.jsx)((0, $2f0ce992717e175e$export$2e2bcd8739ae039), { redirectTo: redirectTo, passwordScorer: passwordScorer }), @@ -2546,7 +2566,8 @@ const $be2fdde9f3e3137d$var$englishMessages = { new_password: "New password", confirm_new_password: "Confirm new password", password_strength: "Password strength", - password_too_weak: "Password too weak. Increase length or add special characters." + password_too_weak: "Password too weak. Increase length or add special characters.", + password_mismatch: "The passwords you provided do not match." }, helper: { login: "Sign in to your account", @@ -2640,7 +2661,8 @@ const $6dbc362c3d93e01d$var$frenchMessages = { new_password: "Nouveau mot de passe", confirm_new_password: "Confirmer le nouveau mot de passe", password_strength: "Force du mot de passe", - password_too_weak: "Mot de passe trop faible. Augmenter la longueur ou ajouter des caract\xe8res sp\xe9ciaux." + password_too_weak: "Mot de passe trop faible. Augmenter la longueur ou ajouter des caract\xe8res sp\xe9ciaux.", + password_mismatch: "Mot de passe diff\xe9rent du premier" }, helper: { login: "Connectez-vous \xe0 votre compte.", diff --git a/src/frontend/packages/auth-provider/dist/index.cjs.js.map b/src/frontend/packages/auth-provider/dist/index.cjs.js.map index 412b6ab1e..2e5d26d13 100644 --- a/src/frontend/packages/auth-provider/dist/index.cjs.js.map +++ b/src/frontend/packages/auth-provider/dist/index.cjs.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5F,MAAM,4CAAY,CAAA;IACvB,MAAM,YAAY,IAAI,IAAI;IAC1B,OAAO,CAAA,GAAA,wCAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,UAAU,QAAQ;AAC7D;AAEO,MAAM,4CAAgB,CAAA,UAAY,CAAA;QACvC,SAAS;QACT,KAAK;QACL,MAAM;QACN,aAAa;YAAE,SAAS;QAAM;QAC9B,kBAAkB;YAAE,SAAS;QAAM;QACnC,kBAAkB;YAAE,SAAS;QAAM;QACnC,YAAY;YAAE,SAAS;QAAM;QAC7B,gBAAgB;YAAE,SAAS;QAAM;IACnC,CAAA;AAEO,MAAM,4CAAmB,OAAM;IACpC,MAAM,cAAc,MAAM,aAAa,cAAc;IAC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;IAEA,2CAAe;;;AC7Ff,MAAM,uCAAiB;IACrB,MAAM;QACJ,QAAQ;YACN,uBAAuB;YACvB,sBAAsB;YACtB,gBAAgB;QAClB;QACA,QAAQ;YACN,QAAQ;YACR,aAAa;YACb,QAAQ;YACR,gBAAgB;YAChB,kBAAkB;YAClB,QAAQ;YACR,OAAO;YACP,iBAAiB;YACjB,iBAAiB;QACnB;QACA,OAAO;YACL,UAAU;gBACR,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,SAAS;YACX;YACA,WAAW;gBACT,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,SAAS;YACX;QACF;QACA,OAAO;YACL,WAAW;YACX,eAAe;QACjB;QACA,OAAO;YACL,cAAc;YACd,MAAM;YACN,UAAU;YACV,OAAO;YACP,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,sBAAsB;YACtB,mBAAmB;YACnB,mBAAmB;QACrB;QACA,QAAQ;YACN,OAAO;YACP,QAAQ;YACR,gBACE;YACF,kBAAkB;QACpB;QACA,SAAS;YACP,yBAAyB;YACzB,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;YAC3B,mBAAmB;YACnB,2BAA2B;YAC3B,wBAAwB;YACxB,cAAc;YACd,2BAA2B;YAC3B,sBAAsB;YACtB,kBAAkB;YAClB,gBAAgB;YAChB,kBACE;YACF,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,0BAA0B;YAC1B,mBAAmB;YACnB,qBACE;YACF,yBAAyB;QAC3B;QACA,cAAc;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.ts","packages/auth-provider/src/constants.ts","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.tsx","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.tsx","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.tsx","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.tsx","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n const callCheckUser = async webId => {\n if (checkUser) {\n try {\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (checkUser(userData) === false) throw new Error('auth.message.user_not_allowed_to_login');\n } catch (e) {\n localStorage.removeItem('token');\n throw e;\n }\n }\n };\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n let { webId, issuer, redirect = '/', isSignup = false } = params;\n\n if (webId && !issuer) {\n // Find issuer from webId\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (!userData['solid:oidcIssuer']) throw new Error('auth.message.no_associated_oidc_issuer');\n issuer = userData?.['solid:oidcIssuer'];\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response))\n .catch(() => {\n throw new Error('auth.message.unreachable_auth_server');\n });\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n localStorage.setItem('redirect', redirect);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n authorizationUrl.searchParams.set('is_signup', isSignup);\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim()\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n\n // Set token now as it is required for refreshConfig\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve data set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n const redirect = localStorage.getItem('redirect');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove we don't need it anymore\n localStorage.removeItem('code_verifier');\n localStorage.removeItem('redirect');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = redirect || '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, ...profileData } = params;\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username?.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error('auth.message.signup_error');\n }\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n\n return webId;\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async params => {\n const { redirectUrl } = params || {};\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n if (redirectUrl) {\n return redirectUrl;\n } else {\n // We don't need the token to fetch the WebID since it is public\n const { json: userData } = await dataProvider.fetch(webId);\n\n // Redirect to the Pod provider\n return userData?.['solid:oidcIssuer'] || new URL(webId).origin;\n }\n } else {\n return redirectUrl;\n }\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => {\n // We want to disconnect only with INVALID_TOKEN errors\n if (error.status === 401 && error.body && error.body.type === 'INVALID_TOKEN') {\n localStorage.removeItem('token');\n return Promise.reject();\n } else {\n // Other error code (404, 500, etc): no need to log out\n return Promise.resolve();\n }\n },\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n\n // Backend-generated tokens use webId but Solid-OIDC tokens use webid\n const webId = authType === AUTH_TYPE_SOLID_OIDC ? payload.webid : payload.webId;\n\n if (!webId) {\n // If webId is not set, it is probably because we have ActivityPods v1 tokens and we need to disconnect\n localStorage.removeItem('token');\n window.location.href = '/login';\n throw new Error('No webId found on provided token !');\n }\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.reset_password_error');\n }\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.new_password_error');\n }\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a Pod provider, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainerUri()(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\nimport { Permissions } from '../types';\n\nconst useCheckPermissions = (uri: string, mode: keyof typeof rights, redirectUrl: string = '/') => {\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, redirect, notify]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import { AclClass, AclMode } from './types';\n\nexport const ACL_READ: AclMode = 'acl:Read';\nexport const ACL_APPEND: AclMode = 'acl:Append';\nexport const ACL_WRITE: AclMode = 'acl:Write';\nexport const ACL_CONTROL: AclMode = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT: AclClass = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT: AclClass = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete: AclMode[] = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl: AclMode[] = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n ShowButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToList, rightsToShow } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasShow && permissions && permissions.some(p => rightsToShow.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit, rightsToList } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { data: identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import { useEffect, useMemo } from 'react';\nimport { Link, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Box, Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {function} props.onLogin Optional function to call when login is completed\n * @param {function} props.onSignup Optional function to call when signup is completed\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n onLogin,\n onSignup,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect') || '/';\n const { data: identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n (async () => {\n if (!isLoading && identity?.id) {\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }\n })();\n }, [identity, isLoading, redirectTo, onLogin]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isLogin && }\n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n \n {(isSignup || isResetPassword) && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import { useEffect, useState } from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\n\ninterface FormValues {\n username: string;\n password: string;\n email: string;\n}\n\ninterface SignupFormProps {\n onSignup: (redirectTo: string) => void;\n additionalSignupValues: object;\n delayBeforeRedirect: number;\n passwordScorer: typeof defaultScorer;\n}\n\n/**\n * @param onSignup Optional function to call when signup is completed. Called after the `delayBeforeRedirect`.\n * @param additionalSignupValues Passed to react-admin's signup function.\n * @param delayBeforeRedirect In milliseconds\n * @param passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues = {},\n delayBeforeRedirect = 0\n}: SignupFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues,\n delayBeforeRedirect = 0,\n setHandleSubmit\n}: SignupFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const [locale] = useLocaleState();\n const [password, setPassword] = useState('');\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await signup({\n ...values,\n ...additionalSignupValues\n });\n setTimeout(() => {\n if (onSignup) {\n onSignup(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }, delayBeforeRedirect);\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, signup, additionalSignupValues, redirectTo, notify, onSignup, formContext]);\n\n return (\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n \n );\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","import { useEffect, useState } from 'react';\nimport { useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin, Form } from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent } from '@mui/material';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\n\ninterface FormValues {\n username: string;\n password: string;\n}\n\ninterface LoginFormProps {\n /**\n * Called on login.\n * @param {string} redirectTo The location the form asks to redirect to, if set in search param `redirect`.\n */\n onLogin: (redirectTo: string) => void;\n /** If the form should allow login with username (in addition to email). */\n allowUsername: boolean;\n}\nconst LoginForm = ({ onLogin, allowUsername }: LoginFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n onLogin,\n allowUsername,\n setHandleSubmit\n}: LoginFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await login(values);\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, login, redirectTo, notify, onLogin]);\n\n return (\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n \n );\n};\n\nLoginForm.defaultValues = {\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\n\nconst samePassword = (value, allValues) => {\n if (value && value !== allValues.password) {\n return 'Mot de passe différent du premier';\n }\n};\n\n/**\n *\n * @param {string} redirectTo\n * @param {Object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n\n const [newPassword, setNewPassword] = useState('');\n\n const submit = values => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(() => {\n setTimeout(() => {\n const url = new URL('/login', window.location.origin);\n if (redirectTo) url.searchParams.append('redirect', redirectTo);\n url.searchParams.append('email', values.email);\n window.location.href = url.toString();\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n />\n \n \n \n
\n );\n};\n\nexport default NewPasswordForm;\n","import React from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent } from '@mui/material';\n\nconst ResetPasswordForm = () => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n\n const submit = values => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(res => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n \n \n
\n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main,\n [theme.breakpoints.down('sm')]: {\n padding: '1em'\n }\n },\n card: {\n width: '100%',\n maxWidth: 450,\n marginTop: '6em'\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { data: identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { data: identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n submit: 'Submit',\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n no_associated_oidc_issuer: 'No OIDC issuer associated with the provided WebID',\n invalid_token_returned: 'Invalid token returned',\n signup_error: 'Account registration failed',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a Pod provider in the list below. All application data will be saved on your Pod.',\n unreachable_auth_server: 'The authentication server cannot be reached'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n submit: 'Soumettre',\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n no_associated_oidc_issuer: 'Aucun serveur de connexion associé avec le WebID fourni',\n invalid_token_returned: 'Token invalide',\n signup_error: \"L'inscription a échoué\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de Pods dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre Pod.\",\n unreachable_auth_server: 'Le serveur de connexion ne peut être atteint'\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.cjs.js.map"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5F,MAAM,4CAAY,CAAA;IACvB,MAAM,YAAY,IAAI,IAAI;IAC1B,OAAO,CAAA,GAAA,wCAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,UAAU,QAAQ;AAC7D;AAEO,MAAM,4CAAgB,CAAA,UAAY,CAAA;QACvC,SAAS;Q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A,OAAO;YACL,cAAc;YACd,MAAM;YACN,UAAU;YACV,OAAO;YACP,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,sBAAsB;YACtB,mBAAmB;YACnB,mBAAmB;YACnB,mBAAmB;QACrB;QACA,QAAQ;YACN,OAAO;YACP,QAAQ;YACR,gBACE;YACF,kBAAkB;QACpB;QACA,SAAS;YACP,yBAAyB;YACzB,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;YAC3B,mBAAmB;YACnB,2BAA2B;YAC3B,wBAAwB;YACxB,cAAc;YACd,2BAA2B;YAC3B,sBAAsB;YACtB,kBAAkB;YAClB,gBAAgB;YAChB,kBACE;YACF,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,0BAA0B;YAC1B,mBAAmB;YACnB,qBACE;YACF,yBAAyB;QAC3B;QACA,cAAc;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.ts","packages/auth-provider/src/constants.ts","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.tsx","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.tsx","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.tsx","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.tsx","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.tsx","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.tsx","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n const callCheckUser = async webId => {\n if (checkUser) {\n try {\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (checkUser(userData) === false) throw new Error('auth.message.user_not_allowed_to_login');\n } catch (e) {\n localStorage.removeItem('token');\n throw e;\n }\n }\n };\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n let { webId, issuer, redirect = '/', isSignup = false } = params;\n\n if (webId && !issuer) {\n // Find issuer from webId\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (!userData['solid:oidcIssuer']) throw new Error('auth.message.no_associated_oidc_issuer');\n issuer = userData?.['solid:oidcIssuer'];\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response))\n .catch(() => {\n throw new Error('auth.message.unreachable_auth_server');\n });\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n localStorage.setItem('redirect', redirect);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n authorizationUrl.searchParams.set('is_signup', isSignup);\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim()\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n\n // Set token now as it is required for refreshConfig\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve data set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n const redirect = localStorage.getItem('redirect');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove we don't need it anymore\n localStorage.removeItem('code_verifier');\n localStorage.removeItem('redirect');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = redirect || '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, ...profileData } = params;\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username?.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error('auth.message.signup_error');\n }\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n\n return webId;\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async params => {\n const { redirectUrl } = params || {};\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n if (redirectUrl) {\n return redirectUrl;\n } else {\n // We don't need the token to fetch the WebID since it is public\n const { json: userData } = await dataProvider.fetch(webId);\n\n // Redirect to the Pod provider\n return userData?.['solid:oidcIssuer'] || new URL(webId).origin;\n }\n } else {\n return redirectUrl;\n }\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => {\n // We want to disconnect only with INVALID_TOKEN errors\n if (error.status === 401 && error.body && error.body.type === 'INVALID_TOKEN') {\n localStorage.removeItem('token');\n return Promise.reject();\n } else {\n // Other error code (404, 500, etc): no need to log out\n return Promise.resolve();\n }\n },\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n\n // Backend-generated tokens use webId but Solid-OIDC tokens use webid\n const webId = authType === AUTH_TYPE_SOLID_OIDC ? payload.webid : payload.webId;\n\n if (!webId) {\n // If webId is not set, it is probably because we have ActivityPods v1 tokens and we need to disconnect\n localStorage.removeItem('token');\n window.location.href = '/login';\n throw new Error('No webId found on provided token !');\n }\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.reset_password_error');\n }\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.new_password_error');\n }\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a Pod provider, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainerUri()(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\nimport { Permissions } from '../types';\n\nconst useCheckPermissions = (uri: string, mode: keyof typeof rights, redirectUrl: string = '/') => {\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, redirect, notify]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import { AclClass, AclMode } from './types';\n\nexport const ACL_READ: AclMode = 'acl:Read';\nexport const ACL_APPEND: AclMode = 'acl:Append';\nexport const ACL_WRITE: AclMode = 'acl:Write';\nexport const ACL_CONTROL: AclMode = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT: AclClass = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT: AclClass = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete: AclMode[] = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl: AclMode[] = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n ShowButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToList, rightsToShow } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasShow && permissions && permissions.some(p => rightsToShow.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit, rightsToList } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { data: identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import { useEffect, useMemo } from 'react';\nimport { Link, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Box, Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {function} props.onLogin Optional function to call when login is completed\n * @param {function} props.onSignup Optional function to call when signup is completed\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n onLogin,\n onSignup,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect') || '/';\n const { data: identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n (async () => {\n if (!isLoading && identity?.id) {\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }\n })();\n }, [identity, isLoading, redirectTo, onLogin]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isLogin && }\n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n \n {(isSignup || isResetPassword) && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import { useEffect, useState } from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\n\ninterface FormValues {\n username: string;\n password: string;\n email: string;\n}\n\ninterface SignupFormProps {\n onSignup: (redirectTo: string) => void;\n additionalSignupValues: object;\n delayBeforeRedirect: number;\n passwordScorer: typeof defaultScorer;\n}\n\n/**\n * @param onSignup Optional function to call when signup is completed. Called after the `delayBeforeRedirect`.\n * @param additionalSignupValues Passed to react-admin's signup function.\n * @param delayBeforeRedirect In milliseconds\n * @param passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues = {},\n delayBeforeRedirect = 0\n}: SignupFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues,\n delayBeforeRedirect = 0,\n setHandleSubmit\n}: SignupFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const [locale] = useLocaleState();\n const [password, setPassword] = useState('');\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await signup({\n ...values,\n ...additionalSignupValues\n });\n setTimeout(() => {\n if (onSignup) {\n onSignup(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }, delayBeforeRedirect);\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, signup, additionalSignupValues, redirectTo, notify, onSignup, formContext]);\n\n return (\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n \n );\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","import { useEffect, useState } from 'react';\nimport { useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin, Form } from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent } from '@mui/material';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\n\ninterface FormValues {\n username: string;\n password: string;\n}\n\ninterface LoginFormProps {\n /**\n * Called on login.\n * @param {string} redirectTo The location the form asks to redirect to, if set in search param `redirect`.\n */\n onLogin: (redirectTo: string) => void;\n /** If the form should allow login with username (in addition to email). */\n allowUsername: boolean;\n}\nconst LoginForm = ({ onLogin, allowUsername }: LoginFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n onLogin,\n allowUsername,\n setHandleSubmit\n}: LoginFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await login(values);\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, login, redirectTo, notify, onLogin]);\n\n return (\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n \n );\n};\n\nLoginForm.defaultValues = {\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useEffect, useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\nimport { SubmitHandler } from 'react-hook-form';\n\ninterface FormProps {\n redirectTo: string;\n passwordScorer: typeof defaultScorer;\n}\n\ninterface FormValues {\n email: string;\n password: string;\n 'confirm-password': string;\n}\n\nconst samePassword = (value: string, allValues: FormValues) => {\n if (value && value !== allValues.password) {\n return 'auth.input.password_mismatch';\n }\n};\n\n/**\n *\n * @param {string} redirectTo\n * @param {typeof defaultScorer} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }: FormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n setHandleSubmit,\n redirectTo,\n passwordScorer\n}: FormProps & {\n setHandleSubmit: React.Dispatch>>;\n}) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n\n const [newPassword, setNewPassword] = useState('');\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(() => {\n setTimeout(() => {\n const url = new URL('/login', window.location.origin);\n if (redirectTo) url.searchParams.append('redirect', redirectTo);\n url.searchParams.append('email', values.email);\n window.location.href = url.toString();\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch((error: Error) => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n });\n });\n\n return (\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n />\n \n \n \n );\n};\n\nexport default NewPasswordForm;\n","import React, { useEffect, useState } from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent } from '@mui/material';\nimport { SubmitHandler } from 'react-hook-form';\n\ninterface FormValues {\n email: string;\n}\n\nconst ResetPasswordForm = () => {\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n setHandleSubmit\n}: {\n setHandleSubmit: React.Dispatch>>;\n}) => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(() => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch((error: Error) => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n });\n });\n\n return (\n \n (value ? value.toLowerCase() : '')}\n />\n \n \n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main,\n [theme.breakpoints.down('sm')]: {\n padding: '1em'\n }\n },\n card: {\n width: '100%',\n maxWidth: 450,\n marginTop: '6em'\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { data: identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { data: identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n submit: 'Submit',\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.',\n password_mismatch: 'The passwords you provided do not match.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n no_associated_oidc_issuer: 'No OIDC issuer associated with the provided WebID',\n invalid_token_returned: 'Invalid token returned',\n signup_error: 'Account registration failed',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a Pod provider in the list below. All application data will be saved on your Pod.',\n unreachable_auth_server: 'The authentication server cannot be reached'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n submit: 'Soumettre',\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.',\n password_mismatch: 'Mot de passe différent du premier'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n no_associated_oidc_issuer: 'Aucun serveur de connexion associé avec le WebID fourni',\n invalid_token_returned: 'Token invalide',\n signup_error: \"L'inscription a échoué\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de Pods dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre Pod.\",\n unreachable_auth_server: 'Le serveur de connexion ne peut être atteint'\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.cjs.js.map"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/dist/index.d.ts b/src/frontend/packages/auth-provider/dist/index.d.ts index ff6f8b552..b0c505c0a 100644 --- a/src/frontend/packages/auth-provider/dist/index.d.ts +++ b/src/frontend/packages/auth-provider/dist/index.d.ts @@ -1,161 +1,202 @@ -import React from "react"; -import { ToolbarProps } from "react-admin"; -export function authProvider({ dataProvider, authType, allowAnonymous, checkUser, checkPermissions, clientId }: { - dataProvider: any; - authType: any; - allowAnonymous?: boolean | undefined; - checkUser: any; - checkPermissions?: boolean | undefined; - clientId: any; +import React from 'react'; +import { ToolbarProps } from 'react-admin'; +export function authProvider({ + dataProvider, + authType, + allowAnonymous, + checkUser, + checkPermissions, + clientId +}: { + dataProvider: any; + authType: any; + allowAnonymous?: boolean | undefined; + checkUser: any; + checkPermissions?: boolean | undefined; + clientId: any; }): { - login: (params: any) => Promise; - handleCallback: () => Promise; - signup: (params: any) => Promise; - logout: (params: any) => Promise; - checkAuth: () => Promise; - checkUser: (userData: any) => any; - checkError: (error: any) => Promise; - getPermissions: (uri: any) => Promise; - addPermission: (uri: any, agentId: any, predicate: any, mode: any) => Promise; - removePermission: (uri: any, agentId: any, predicate: any, mode: any) => Promise; - getIdentity: () => Promise<{ + login: (params: any) => Promise; + handleCallback: () => Promise; + signup: (params: any) => Promise; + logout: (params: any) => Promise; + checkAuth: () => Promise; + checkUser: (userData: any) => any; + checkError: (error: any) => Promise; + getPermissions: (uri: any) => Promise; + addPermission: (uri: any, agentId: any, predicate: any, mode: any) => Promise; + removePermission: (uri: any, agentId: any, predicate: any, mode: any) => Promise; + getIdentity: () => Promise< + | { id: any; fullName: any; profileData: any; webIdData: any; - } | undefined>; - resetPassword: (params: any) => Promise; - setNewPassword: (params: any) => Promise; - getAccountSettings: (params: any) => Promise; - updateAccountSettings: (params: any) => Promise; + } + | undefined + >; + resetPassword: (params: any) => Promise; + setNewPassword: (params: any) => Promise; + getAccountSettings: (params: any) => Promise; + updateAccountSettings: (params: any) => Promise; }; type AclMode = 'acl:Read' | 'acl:Append' | 'acl:Write' | 'acl:Control'; /** foaf:Agent = anonymous, acl:AuthenticatedAgent = logged */ type AclClass = 'foaf:Agent' | 'acl:AuthenticatedAgent'; type BasePermission = { - /** '#Control' | '#Read' | '#Write' | custom string */ - '@id': string; - '@type': 'acl:Authorization'; - 'acl:mode': AclMode; -} & ({ - /** Related resource URI */ - 'acl:accessTo'?: string; -} | { - /** Parent resource URI */ - 'acl:default': string; -}); + /** '#Control' | '#Read' | '#Write' | custom string */ + '@id': string; + '@type': 'acl:Authorization'; + 'acl:mode': AclMode; +} & ( + | { + /** Related resource URI */ + 'acl:accessTo'?: string; + } + | { + /** Parent resource URI */ + 'acl:default': string; + } +); type UserPermission = BasePermission & { - /** User resource URI */ - 'acl:agent': string; + /** User resource URI */ + 'acl:agent': string; }; type GroupPermission = BasePermission & { - /** ACL Group resource URI */ - 'acl:agentGroup': string; + /** ACL Group resource URI */ + 'acl:agentGroup': string; }; type ClassPermission = BasePermission & { - 'acl:agentClass': AclClass | AclClass[]; + 'acl:agentClass': AclClass | AclClass[]; }; type Permission = UserPermission | GroupPermission | ClassPermission; type Permissions = Permission[]; declare const rights: { - show: AclMode[]; - list: AclMode[]; - create: AclMode[]; - edit: AclMode[]; - delete: AclMode[]; - control: AclMode[]; + show: AclMode[]; + list: AclMode[]; + create: AclMode[]; + edit: AclMode[]; + delete: AclMode[]; + control: AclMode[]; }; -export const useCheckPermissions: (uri: string, mode: keyof typeof rights, redirectUrl?: string) => Permissions | undefined; -export function CreateWithPermissions(props: any): import("react/jsx-runtime").JSX.Element; +export const useCheckPermissions: ( + uri: string, + mode: keyof typeof rights, + redirectUrl?: string +) => Permissions | undefined; +export function CreateWithPermissions(props: any): import('react/jsx-runtime').JSX.Element; declare namespace CreateWithPermissions { - namespace defaultProps { - let actions: import("react/jsx-runtime").JSX.Element; - } + namespace defaultProps { + let actions: import('react/jsx-runtime').JSX.Element; + } } export function useAgents(uri: any): { - agents: {}; - addPermission: (agentId: any, predicate: any, mode: any) => void; - removePermission: (agentId: any, predicate: any, mode: any) => void; + agents: {}; + addPermission: (agentId: any, predicate: any, mode: any) => void; + removePermission: (agentId: any, predicate: any, mode: any) => void; }; -export function PermissionsButton({ isContainer }: { - isContainer: any; -}): import("react/jsx-runtime").JSX.Element; +export function PermissionsButton({ isContainer }: { isContainer: any }): import('react/jsx-runtime').JSX.Element; declare namespace PermissionsButton { - namespace defaultProps { - let isContainer: boolean; - } + namespace defaultProps { + let isContainer: boolean; + } } -export const EditActionsWithPermissions: () => import("react/jsx-runtime").JSX.Element; -export function DeleteButtonWithPermissions(props: any): import("react/jsx-runtime").JSX.Element | null; +export const EditActionsWithPermissions: () => import('react/jsx-runtime').JSX.Element; +export function DeleteButtonWithPermissions(props: any): import('react/jsx-runtime').JSX.Element | null; export const EditToolbarWithPermissions: React.FunctionComponent; -export function EditWithPermissions(props: any): import("react/jsx-runtime").JSX.Element; +export function EditWithPermissions(props: any): import('react/jsx-runtime').JSX.Element; declare namespace EditWithPermissions { - namespace defaultProps { - let actions: import("react/jsx-runtime").JSX.Element; - } + namespace defaultProps { + let actions: import('react/jsx-runtime').JSX.Element; + } } -export function EditButtonWithPermissions(props: any): import("react/jsx-runtime").JSX.Element | null; -export function ListActionsWithPermissions({ bulkActions, sort, displayedFilters, exporter, filters, filterValues, onUnselectItems, selectedIds, showFilter, total }: { - bulkActions: any; - sort: any; - displayedFilters: any; - exporter: any; - filters: any; - filterValues: any; - onUnselectItems: any; - selectedIds: any; - showFilter: any; - total: any; -}): import("react/jsx-runtime").JSX.Element; -export function ListWithPermissions(props: any): import("react/jsx-runtime").JSX.Element; +export function EditButtonWithPermissions(props: any): import('react/jsx-runtime').JSX.Element | null; +export function ListActionsWithPermissions({ + bulkActions, + sort, + displayedFilters, + exporter, + filters, + filterValues, + onUnselectItems, + selectedIds, + showFilter, + total +}: { + bulkActions: any; + sort: any; + displayedFilters: any; + exporter: any; + filters: any; + filterValues: any; + onUnselectItems: any; + selectedIds: any; + showFilter: any; + total: any; +}): import('react/jsx-runtime').JSX.Element; +export function ListWithPermissions(props: any): import('react/jsx-runtime').JSX.Element; declare namespace ListWithPermissions { - namespace defaultProps { - let actions: import("react/jsx-runtime").JSX.Element; - } + namespace defaultProps { + let actions: import('react/jsx-runtime').JSX.Element; + } } -export const ShowActionsWithPermissions: () => import("react/jsx-runtime").JSX.Element; -export function ShowWithPermissions(props: any): import("react/jsx-runtime").JSX.Element; +export const ShowActionsWithPermissions: () => import('react/jsx-runtime').JSX.Element; +export function ShowWithPermissions(props: any): import('react/jsx-runtime').JSX.Element; declare namespace ShowWithPermissions { - namespace defaultProps { - let actions: import("react/jsx-runtime").JSX.Element; - } + namespace defaultProps { + let actions: import('react/jsx-runtime').JSX.Element; + } } -export function AuthDialog({ open, onClose, title, message, redirect, ...rest }: { - [x: string]: any; - open: any; - onClose: any; - title: any; - message: any; - redirect: any; -}): import("react/jsx-runtime").JSX.Element; +export function AuthDialog({ + open, + onClose, + title, + message, + redirect, + ...rest +}: { + [x: string]: any; + open: any; + onClose: any; + title: any; + message: any; + redirect: any; +}): import('react/jsx-runtime').JSX.Element; declare namespace AuthDialog { - namespace defaultProps { - let title: string; - let message: string; - } + namespace defaultProps { + let title: string; + let message: string; + } } export declare namespace SsoLoginPageClasses { - export let card: string; - export let avatar: string; - export let icon: string; - let _switch: string; - export { _switch as switch }; + export let card: string; + export let avatar: string; + export let icon: string; + let _switch: string; + export { _switch as switch }; } -export function LoginPage({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }: { - [x: string]: any; - children: any; - backgroundImage: any; - buttons: any; - userResource: any; - propertiesExist: any; - text: any; -}): import("react/jsx-runtime").JSX.Element | null; +export function LoginPage({ + children, + backgroundImage, + buttons, + userResource, + propertiesExist, + text, + ...rest +}: { + [x: string]: any; + children: any; + backgroundImage: any; + buttons: any; + userResource: any; + propertiesExist: any; + text: any; +}): import('react/jsx-runtime').JSX.Element | null; declare namespace SsoLoginPage { - namespace defaultProps { - let propertiesExist: never[]; - let buttons: import("react/jsx-runtime").JSX.Element[]; - let userResource: string; - } + namespace defaultProps { + let propertiesExist: never[]; + let buttons: import('react/jsx-runtime').JSX.Element[]; + let userResource: string; + } } export function useSignup(): (params?: {}) => any; /** @@ -171,64 +212,73 @@ export function useSignup(): (params?: {}) => any; */ /** @type {PasswordStrengthOptions} */ export const defaultPasswordScorerOptions: PasswordStrengthOptions; -export function createPasswordScorer(options?: PasswordStrengthOptions, minRequiredScore?: number): { - scoreFn: (password: any) => number; - minRequiredScore: number; - maxScore: number; +export function createPasswordScorer( + options?: PasswordStrengthOptions, + minRequiredScore?: number +): { + scoreFn: (password: any) => number; + minRequiredScore: number; + maxScore: number; }; export declare namespace defaultScorer { - export function scoreFn(password: any): number; - export { minRequiredScore }; - export let maxScore: number; + export function scoreFn(password: any): number; + export { minRequiredScore }; + export let maxScore: number; } type PasswordStrengthOptions = { - /** - * - Required characters for a very long password (default: 12) - */ - isVeryLongLength: number; - /** - * - Required characters for a long password (default: 6) - */ - isLongLength: number; - /** - * - Score for a very long password (default: 2.5) - */ - isVeryLongScore: number; - /** - * - Score for a long password (default: 1.5) - */ - isLongScore: number; - /** - * - Score for a password with uppercase letters (default: 1) - */ - uppercaseScore: number; - /** - * - Score for a password with lowercase letters (default: 1) - */ - lowercaseScore: number; - /** - * - Score for a password with numbers (default: 1) - */ - numbersScore: number; - /** - * - Score for a password without non-alphanumeric characters (default: 1) - */ - nonAlphanumericsScore: number; + /** + * - Required characters for a very long password (default: 12) + */ + isVeryLongLength: number; + /** + * - Required characters for a long password (default: 6) + */ + isLongLength: number; + /** + * - Score for a very long password (default: 2.5) + */ + isVeryLongScore: number; + /** + * - Score for a long password (default: 1.5) + */ + isLongScore: number; + /** + * - Score for a password with uppercase letters (default: 1) + */ + uppercaseScore: number; + /** + * - Score for a password with lowercase letters (default: 1) + */ + lowercaseScore: number; + /** + * - Score for a password with numbers (default: 1) + */ + numbersScore: number; + /** + * - Score for a password without non-alphanumeric characters (default: 1) + */ + nonAlphanumericsScore: number; }; export function validatePasswordStrength(scorer?: { - scoreFn: (password: any) => number; - minRequiredScore: number; - maxScore: number; -}): (value: any) => "auth.input.password_too_weak" | undefined; -export function PasswordStrengthIndicator({ scorer, password, ...restProps }: { - [x: string]: any; - scorer?: { + scoreFn: (password: any) => number; + minRequiredScore: number; + maxScore: number; +}): (value: any) => 'auth.input.password_too_weak' | undefined; +export function PasswordStrengthIndicator({ + scorer, + password, + ...restProps +}: { + [x: string]: any; + scorer?: + | { scoreFn: (password: any) => number; minRequiredScore: number; maxScore: number; - } | undefined; - password: any; -}): import("react/jsx-runtime").JSX.Element; + } + | undefined; + password: any; +}): import('react/jsx-runtime').JSX.Element; /** * @param {object} props Props * @param {boolean} props.hasSignup If to show signup form. @@ -241,242 +291,259 @@ export function PasswordStrengthIndicator({ scorer, password, ...restProps }: { * passwordStrength's `defaultScorer`. * @returns */ -export function LocalLoginPage({ hasSignup, allowUsername, onLogin, onSignup, additionalSignupValues, passwordScorer }: { - hasSignup: boolean; - allowUsername: boolean; - onLogin: Function; - onSignup: Function; - additionalSignupValues: object; - passwordScorer: object; -}): import("react/jsx-runtime").JSX.Element | null; +export function LocalLoginPage({ + hasSignup, + allowUsername, + onLogin, + onSignup, + additionalSignupValues, + passwordScorer +}: { + hasSignup: boolean; + allowUsername: boolean; + onLogin: Function; + onSignup: Function; + additionalSignupValues: object; + passwordScorer: object; +}): import('react/jsx-runtime').JSX.Element | null; declare namespace LocalLoginPage { - namespace defaultProps { - let hasSignup: boolean; - let allowUsername: boolean; - let additionalSignupValues: {}; - } + namespace defaultProps { + let hasSignup: boolean; + let allowUsername: boolean; + let additionalSignupValues: {}; + } } -export function ResourceWithPermissions({ name, create, ...rest }: { - [x: string]: any; - name: any; - create: any; -}): import("react/jsx-runtime").JSX.Element; -export function UserMenu({ logout, profileResource, ...otherProps }: { - [x: string]: any; - logout: any; - profileResource: any; -}): import("react/jsx-runtime").JSX.Element; +export function ResourceWithPermissions({ + name, + create, + ...rest +}: { + [x: string]: any; + name: any; + create: any; +}): import('react/jsx-runtime').JSX.Element; +export function UserMenu({ + logout, + profileResource, + ...otherProps +}: { + [x: string]: any; + logout: any; + profileResource: any; +}): import('react/jsx-runtime').JSX.Element; declare namespace UserMenu { - namespace defaultProps { - let logout: import("react/jsx-runtime").JSX.Element; - let profileResource: string; - } + namespace defaultProps { + let logout: import('react/jsx-runtime').JSX.Element; + let profileResource: string; + } } export function useCheckAuthenticated(message: any): { - identity: import("react-admin").UserIdentity | undefined; - isLoading: boolean; + identity: import('react-admin').UserIdentity | undefined; + isLoading: boolean; }; export function usePermissionsWithRefetch(params?: {}): { - refetch: () => Promise; - permissions?: any; + refetch: () => Promise; + permissions?: any; }; declare namespace englishMessages { - namespace auth { - namespace dialog { - let container_permissions: string; - let resource_permissions: string; - let login_required: string; - } - namespace action { - let submit: string; - let permissions: string; - let signup: string; - let reset_password: string; - let set_new_password: string; - let logout: string; - let login: string; - let view_my_profile: string; - let edit_my_profile: string; - } - namespace right { - namespace resource { - let read: string; - let append: string; - let write: string; - let control: string; - } - namespace container { - let read_1: string; - export { read_1 as read }; - let append_1: string; - export { append_1 as append }; - let write_1: string; - export { write_1 as write }; - let control_1: string; - export { control_1 as control }; - } - } - namespace agent { - let anonymous: string; - let authenticated: string; - } - namespace input { - let agent_select: string; - let name: string; - let username: string; - let email: string; - let username_or_email: string; - let current_password: string; - let new_password: string; - let confirm_new_password: string; - let password_strength: string; - let password_too_weak: string; - } - namespace helper { - let login_1: string; - export { login_1 as login }; - let signup_1: string; - export { signup_1 as signup }; - let reset_password_1: string; - export { reset_password_1 as reset_password }; - let set_new_password_1: string; - export { set_new_password_1 as set_new_password }; - } - namespace message { - let resource_show_forbidden: string; - let resource_edit_forbidden: string; - let resource_delete_forbidden: string; - let resource_control_forbidden: string; - let container_create_forbidden: string; - let container_list_forbidden: string; - let unable_to_fetch_user_data: string; - let no_token_returned: string; - let no_associated_oidc_issuer: string; - let invalid_token_returned: string; - let signup_error: string; - let user_not_allowed_to_login: string; - let user_email_not_found: string; - let user_email_exist: string; - let username_exist: string; - let username_invalid: string; - let new_user_created: string; - let user_connected: string; - let user_disconnected: string; - let bad_request: string; - let account_settings_updated: string; - let login_to_continue: string; - let choose_pod_provider: string; - let unreachable_auth_server: string; - } - namespace notification { - let reset_password_submitted: string; - let reset_password_error: string; - let password_changed: string; - let new_password_error: string; - let invalid_password: string; - let get_settings_error: string; - let update_settings_error: string; - } + namespace auth { + namespace dialog { + let container_permissions: string; + let resource_permissions: string; + let login_required: string; + } + namespace action { + let submit: string; + let permissions: string; + let signup: string; + let reset_password: string; + let set_new_password: string; + let logout: string; + let login: string; + let view_my_profile: string; + let edit_my_profile: string; + } + namespace right { + namespace resource { + let read: string; + let append: string; + let write: string; + let control: string; + } + namespace container { + let read_1: string; + export { read_1 as read }; + let append_1: string; + export { append_1 as append }; + let write_1: string; + export { write_1 as write }; + let control_1: string; + export { control_1 as control }; + } } + namespace agent { + let anonymous: string; + let authenticated: string; + } + namespace input { + let agent_select: string; + let name: string; + let username: string; + let email: string; + let username_or_email: string; + let current_password: string; + let new_password: string; + let confirm_new_password: string; + let password_strength: string; + let password_too_weak: string; + let password_mismatch: string; + } + namespace helper { + let login_1: string; + export { login_1 as login }; + let signup_1: string; + export { signup_1 as signup }; + let reset_password_1: string; + export { reset_password_1 as reset_password }; + let set_new_password_1: string; + export { set_new_password_1 as set_new_password }; + } + namespace message { + let resource_show_forbidden: string; + let resource_edit_forbidden: string; + let resource_delete_forbidden: string; + let resource_control_forbidden: string; + let container_create_forbidden: string; + let container_list_forbidden: string; + let unable_to_fetch_user_data: string; + let no_token_returned: string; + let no_associated_oidc_issuer: string; + let invalid_token_returned: string; + let signup_error: string; + let user_not_allowed_to_login: string; + let user_email_not_found: string; + let user_email_exist: string; + let username_exist: string; + let username_invalid: string; + let new_user_created: string; + let user_connected: string; + let user_disconnected: string; + let bad_request: string; + let account_settings_updated: string; + let login_to_continue: string; + let choose_pod_provider: string; + let unreachable_auth_server: string; + } + namespace notification { + let reset_password_submitted: string; + let reset_password_error: string; + let password_changed: string; + let new_password_error: string; + let invalid_password: string; + let get_settings_error: string; + let update_settings_error: string; + } + } } declare namespace frenchMessages { - namespace auth { - namespace dialog { - let container_permissions: string; - let resource_permissions: string; - let login_required: string; - } - namespace action { - let submit: string; - let permissions: string; - let signup: string; - let reset_password: string; - let set_new_password: string; - let logout: string; - let login: string; - let view_my_profile: string; - let edit_my_profile: string; - } - namespace right { - namespace resource { - let read: string; - let append: string; - let write: string; - let control: string; - } - namespace container { - let read_1: string; - export { read_1 as read }; - let append_1: string; - export { append_1 as append }; - let write_1: string; - export { write_1 as write }; - let control_1: string; - export { control_1 as control }; - } - } - namespace agent { - let anonymous: string; - let authenticated: string; - } - namespace input { - let agent_select: string; - let name: string; - let username: string; - let email: string; - let username_or_email: string; - let current_password: string; - let new_password: string; - let confirm_new_password: string; - let password_strength: string; - let password_too_weak: string; - } - namespace helper { - let login_1: string; - export { login_1 as login }; - let signup_1: string; - export { signup_1 as signup }; - let reset_password_1: string; - export { reset_password_1 as reset_password }; - let set_new_password_1: string; - export { set_new_password_1 as set_new_password }; - } - namespace message { - let resource_show_forbidden: string; - let resource_edit_forbidden: string; - let resource_delete_forbidden: string; - let resource_control_forbidden: string; - let container_create_forbidden: string; - let container_list_forbidden: string; - let unable_to_fetch_user_data: string; - let no_token_returned: string; - let no_associated_oidc_issuer: string; - let invalid_token_returned: string; - let signup_error: string; - let user_not_allowed_to_login: string; - let user_email_not_found: string; - let user_email_exist: string; - let username_exist: string; - let username_invalid: string; - let new_user_created: string; - let user_connected: string; - let user_disconnected: string; - let bad_request: string; - let account_settings_updated: string; - let login_to_continue: string; - let choose_pod_provider: string; - let unreachable_auth_server: string; - } - namespace notification { - let reset_password_submitted: string; - let reset_password_error: string; - let password_changed: string; - let new_password_error: string; - let invalid_password: string; - let get_settings_error: string; - let update_settings_error: string; - } + namespace auth { + namespace dialog { + let container_permissions: string; + let resource_permissions: string; + let login_required: string; + } + namespace action { + let submit: string; + let permissions: string; + let signup: string; + let reset_password: string; + let set_new_password: string; + let logout: string; + let login: string; + let view_my_profile: string; + let edit_my_profile: string; + } + namespace right { + namespace resource { + let read: string; + let append: string; + let write: string; + let control: string; + } + namespace container { + let read_1: string; + export { read_1 as read }; + let append_1: string; + export { append_1 as append }; + let write_1: string; + export { write_1 as write }; + let control_1: string; + export { control_1 as control }; + } + } + namespace agent { + let anonymous: string; + let authenticated: string; + } + namespace input { + let agent_select: string; + let name: string; + let username: string; + let email: string; + let username_or_email: string; + let current_password: string; + let new_password: string; + let confirm_new_password: string; + let password_strength: string; + let password_too_weak: string; + let password_mismatch: string; + } + namespace helper { + let login_1: string; + export { login_1 as login }; + let signup_1: string; + export { signup_1 as signup }; + let reset_password_1: string; + export { reset_password_1 as reset_password }; + let set_new_password_1: string; + export { set_new_password_1 as set_new_password }; + } + namespace message { + let resource_show_forbidden: string; + let resource_edit_forbidden: string; + let resource_delete_forbidden: string; + let resource_control_forbidden: string; + let container_create_forbidden: string; + let container_list_forbidden: string; + let unable_to_fetch_user_data: string; + let no_token_returned: string; + let no_associated_oidc_issuer: string; + let invalid_token_returned: string; + let signup_error: string; + let user_not_allowed_to_login: string; + let user_email_not_found: string; + let user_email_exist: string; + let username_exist: string; + let username_invalid: string; + let new_user_created: string; + let user_connected: string; + let user_disconnected: string; + let bad_request: string; + let account_settings_updated: string; + let login_to_continue: string; + let choose_pod_provider: string; + let unreachable_auth_server: string; + } + namespace notification { + let reset_password_submitted: string; + let reset_password_error: string; + let password_changed: string; + let new_password_error: string; + let invalid_password: string; + let get_settings_error: string; + let update_settings_error: string; } + } } //# sourceMappingURL=index.d.ts.map diff --git a/src/frontend/packages/auth-provider/dist/index.d.ts.map b/src/frontend/packages/auth-provider/dist/index.d.ts.map index 3aab03d51..6f679008b 100644 --- a/src/frontend/packages/auth-provider/dist/index.d.ts.map +++ b/src/frontend/packages/auth-provider/dist/index.d.ts.map @@ -1 +1 @@ -{"mappings":";;ACUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAidC;AC3dD,eAAsB,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,CAAC;AAE9E,8DAA8D;AAC9D,gBAAu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,+CAAqD;;;;;;;;sBAjDpD,MAAM;;;;kBACN,MAAM;;;;qBACN,MAAM;;;;iBACN,MAAM;;;;oBACN,MAAM;;;;oBACN,MAAM;;;;kBACN,MAAM;;;;2BACN,MAAM;;ACTpB;;;;+DAOC;AELD;;;;;;;;4CAGC;AOMD;;;;;;;;;;;GAWG;AACH;IAV0B,SAAS,EAAxB,OAAO;IACQ,aAAa,EAA5B,OAAO;IACS,OAAO;IACP,QAAQ;IACV,sBAAsB,EAApC,MAAM;IACQ,cAAc,EAA5B,MAAM;mDA2FhB;;;;;;;;ACzGD;;;;4CAYC;ACWD;;;;4CA0BC;;;;;;;ACnDD;;;EAcC;ACPD;;;EA6BC","sources":["packages/auth-provider/src/src/utils.js","packages/auth-provider/src/src/authProvider.js","packages/auth-provider/src/src/types.ts","packages/auth-provider/src/src/constants.ts","packages/auth-provider/src/src/hooks/useCheckPermissions.ts","packages/auth-provider/src/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/src/hooks/useAgents.js","packages/auth-provider/src/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/src/crud/edit/EditActionsWithPermissions.tsx","packages/auth-provider/src/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/src/crud/show/ShowActionsWithPermissions.tsx","packages/auth-provider/src/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/src/components/AuthDialog.js","packages/auth-provider/src/src/components/SsoLoginPage.js","packages/auth-provider/src/src/hooks/useSignup.js","packages/auth-provider/src/src/passwordScorer.js","packages/auth-provider/src/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/src/components/LocalLoginPage/SignupForm.tsx","packages/auth-provider/src/src/components/LocalLoginPage/LoginForm.tsx","packages/auth-provider/src/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/src/components/ResourceWithPermissions.js","packages/auth-provider/src/src/components/UserMenu.js","packages/auth-provider/src/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/src/messages/english.js","packages/auth-provider/src/src/messages/french.js","packages/auth-provider/src/src/index.ts","packages/auth-provider/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n"],"names":[],"version":3,"file":"index.d.ts.map"} \ No newline at end of file +{"mappings":";;ACUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAidC;AC3dD,eAAsB,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,CAAC;AAE9E,8DAA8D;AAC9D,gBAAuB,YAAY,GAAG,wBAAwB,CAAC;AAE/D,sBAAsB;IACpB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,CACA;IACE,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GACD;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B,OAAO;IACQ,aAAa,EAA5B,OAAO;IACS,OAAO;IACP,QAAQ;IACV,sBAAsB,EAApC,MAAM;IACQ,cAAc,EAA5B,MAAM;mDA2FhB;;;;;;;;ACzGD;;;;4CAYC;ACWD;;;;4CA0BC;;;;;;;ACnDD;;;EAcC;ACPD;;;EA6BC","sources":["packages/auth-provider/src/src/utils.js","packages/auth-provider/src/src/authProvider.js","packages/auth-provider/src/src/types.ts","packages/auth-provider/src/src/constants.ts","packages/auth-provider/src/src/hooks/useCheckPermissions.ts","packages/auth-provider/src/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/src/hooks/useAgents.js","packages/auth-provider/src/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/src/crud/edit/EditActionsWithPermissions.tsx","packages/auth-provider/src/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/src/crud/show/ShowActionsWithPermissions.tsx","packages/auth-provider/src/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/src/components/AuthDialog.js","packages/auth-provider/src/src/components/SsoLoginPage.js","packages/auth-provider/src/src/hooks/useSignup.js","packages/auth-provider/src/src/passwordScorer.js","packages/auth-provider/src/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/src/components/LocalLoginPage/SignupForm.tsx","packages/auth-provider/src/src/components/LocalLoginPage/LoginForm.tsx","packages/auth-provider/src/src/components/LocalLoginPage/NewPasswordForm.tsx","packages/auth-provider/src/src/components/LocalLoginPage/ResetPasswordForm.tsx","packages/auth-provider/src/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/src/components/ResourceWithPermissions.js","packages/auth-provider/src/src/components/UserMenu.js","packages/auth-provider/src/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/src/messages/english.js","packages/auth-provider/src/src/messages/french.js","packages/auth-provider/src/src/index.ts","packages/auth-provider/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n"],"names":[],"version":3,"file":"index.d.ts.map"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/dist/index.es.js b/src/frontend/packages/auth-provider/dist/index.es.js index 4b230c79f..91befda1f 100644 --- a/src/frontend/packages/auth-provider/dist/index.es.js +++ b/src/frontend/packages/auth-provider/dist/index.es.js @@ -1881,17 +1881,33 @@ var $326df91dd4ec3405$export$2e2bcd8739ae039 = $326df91dd4ec3405$var$LoginForm; -const $b403c35bd8d76c50$var$samePassword = (value, allValues)=>{ - if (value && value !== allValues.password) return "Mot de passe diff\xe9rent du premier"; +const $ddc5b4ef9210a90f$var$samePassword = (value, allValues)=>{ + if (value && value !== allValues.password) return "auth.input.password_mismatch"; }; /** * * @param {string} redirectTo - * @param {Object} passwordScorer Scorer to evaluate and indicate password strength. + * @param {typeof defaultScorer} passwordScorer Scorer to evaluate and indicate password strength. * Set to `null` or `false`, if you don't want password strength checks. Default is * passwordStrength's `defaultScorer`. * @returns - */ const $b403c35bd8d76c50$var$NewPasswordForm = ({ redirectTo: redirectTo, passwordScorer: passwordScorer = (0, $646d64648a630b24$export$19dcdb21c6965fb8) })=>{ + */ const $ddc5b4ef9210a90f$var$NewPasswordForm = ({ redirectTo: redirectTo, passwordScorer: passwordScorer = (0, $646d64648a630b24$export$19dcdb21c6965fb8) })=>{ + const [searchParams] = (0, $1obPJ$useSearchParams)(); + const [handleSubmit, setHandleSubmit] = (0, $1obPJ$useState)(()=>{}); + return /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Form), { + onSubmit: handleSubmit, + noValidate: true, + defaultValues: { + email: searchParams.get("email") + }, + children: /*#__PURE__*/ (0, $1obPJ$jsx)($ddc5b4ef9210a90f$var$FormContent, { + setHandleSubmit: setHandleSubmit, + redirectTo: redirectTo, + passwordScorer: passwordScorer + }) + }); +}; +const $ddc5b4ef9210a90f$var$FormContent = ({ setHandleSubmit: setHandleSubmit, redirectTo: redirectTo, passwordScorer: passwordScorer })=>{ const location = (0, $1obPJ$useLocation)(); const searchParams = new URLSearchParams(location.search); const token = searchParams.get("token"); @@ -1900,169 +1916,173 @@ const $b403c35bd8d76c50$var$samePassword = (value, allValues)=>{ const translate = (0, $1obPJ$useTranslate)(); const notify = (0, $1obPJ$useNotify)(); const [newPassword, setNewPassword] = (0, $1obPJ$useState)(""); - const submit = (values)=>{ - setLoading(true); - authProvider.setNewPassword({ - ...values, - token: token - }).then(()=>{ - setTimeout(()=>{ - const url = new URL("/login", window.location.origin); - if (redirectTo) url.searchParams.append("redirect", redirectTo); - url.searchParams.append("email", values.email); - window.location.href = url.toString(); - setLoading(false); - }, 2000); - notify("auth.notification.password_changed", { - type: "info" - }); - }).catch((error)=>{ - setLoading(false); - notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { - type: "warning", - messageArgs: { - _: typeof error === "string" ? error : error && error.message ? error.message : undefined - } + (0, $1obPJ$useEffect)(()=>{ + setHandleSubmit(()=>async (values)=>{ + setLoading(true); + authProvider.setNewPassword({ + ...values, + token: token + }).then(()=>{ + setTimeout(()=>{ + const url = new URL("/login", window.location.origin); + if (redirectTo) url.searchParams.append("redirect", redirectTo); + url.searchParams.append("email", values.email); + window.location.href = url.toString(); + setLoading(false); + }, 2000); + notify("auth.notification.password_changed", { + type: "info" + }); + }).catch((error)=>{ + setLoading(false); + notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { + type: "warning", + messageArgs: { + _: typeof error === "string" ? error : error && error.message ? error.message : undefined + } + }); + }); }); - }); - }; - return /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Form), { - onSubmit: submit, - noValidate: true, - defaultValues: { - email: searchParams.get("email") - }, - children: /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$CardContent), { - children: [ - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { - autoFocus: true, - source: "email", - label: translate("auth.input.email"), - autoComplete: "email", - fullWidth: true, - disabled: loading, - validate: (0, $1obPJ$required)(), - format: (value)=>value ? value.toLowerCase() : "" - }), - passwordScorer && /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$Fragment), { - children: [ - /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$Typography), { - variant: "caption", - style: { - marginBottom: 3 - }, - children: [ - translate("auth.input.password_strength"), - ":", - " " - ] - }), - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $a8046307c9dfa483$export$2e2bcd8739ae039), { - password: newPassword, - scorer: passwordScorer, - sx: { - width: "100%" - } - }) - ] - }), - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { - autoFocus: true, - type: "password", - source: "password", - value: newPassword, - label: translate("auth.input.new_password"), - autoComplete: "current-password", - fullWidth: true, - disabled: loading, - validate: [ - (0, $1obPJ$required)(), - (0, $7a0bbe6824860dfe$export$2e2bcd8739ae039)(passwordScorer) - ], - onChange: (e)=>setNewPassword(e.target.value) - }), - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { - type: "password", - source: "confirm-password", - label: translate("auth.input.confirm_new_password"), - autoComplete: "current-password", - fullWidth: true, - disabled: loading, - validate: [ - (0, $1obPJ$required)(), - $b403c35bd8d76c50$var$samePassword - ] - }), - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Button1), { - variant: "contained", - type: "submit", - color: "primary", - disabled: loading, - fullWidth: true, - children: translate("auth.action.set_new_password") - }) - ] - }) + }); + return /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$CardContent), { + children: [ + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { + autoFocus: true, + source: "email", + label: translate("auth.input.email"), + autoComplete: "email", + fullWidth: true, + disabled: loading, + validate: (0, $1obPJ$required)(), + format: (value)=>value ? value.toLowerCase() : "" + }), + passwordScorer && /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$Fragment), { + children: [ + /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$Typography), { + variant: "caption", + style: { + marginBottom: 3 + }, + children: [ + translate("auth.input.password_strength"), + ":", + " " + ] + }), + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $a8046307c9dfa483$export$2e2bcd8739ae039), { + password: newPassword, + scorer: passwordScorer, + sx: { + width: "100%" + } + }) + ] + }), + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { + autoFocus: true, + type: "password", + source: "password", + value: newPassword, + label: translate("auth.input.new_password"), + autoComplete: "current-password", + fullWidth: true, + disabled: loading, + validate: [ + (0, $1obPJ$required)(), + (0, $7a0bbe6824860dfe$export$2e2bcd8739ae039)(passwordScorer) + ], + onChange: (e)=>setNewPassword(e.target.value) + }), + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { + type: "password", + source: "confirm-password", + label: translate("auth.input.confirm_new_password"), + autoComplete: "current-password", + fullWidth: true, + disabled: loading, + validate: [ + (0, $1obPJ$required)(), + $ddc5b4ef9210a90f$var$samePassword + ] + }), + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Button1), { + variant: "contained", + type: "submit", + color: "primary", + disabled: loading, + fullWidth: true, + children: translate("auth.action.set_new_password") + }) + ] }); }; -var $b403c35bd8d76c50$export$2e2bcd8739ae039 = $b403c35bd8d76c50$var$NewPasswordForm; +var $ddc5b4ef9210a90f$export$2e2bcd8739ae039 = $ddc5b4ef9210a90f$var$NewPasswordForm; -const $8d415f03f06df877$var$ResetPasswordForm = ()=>{ +const $4c941e9b40342087$var$ResetPasswordForm = ()=>{ + const [handleSubmit, setHandleSubmit] = (0, $1obPJ$useState)(()=>{}); + return /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Form), { + onSubmit: handleSubmit, + noValidate: true, + children: /*#__PURE__*/ (0, $1obPJ$jsx)($4c941e9b40342087$var$FormContent, { + setHandleSubmit: setHandleSubmit + }) + }); +}; +const $4c941e9b40342087$var$FormContent = ({ setHandleSubmit: setHandleSubmit })=>{ const [loading, setLoading] = (0, $1obPJ$useSafeSetState)(false); const authProvider = (0, $1obPJ$useAuthProvider)(); const translate = (0, $1obPJ$useTranslate)(); const notify = (0, $1obPJ$useNotify)(); - const submit = (values)=>{ - setLoading(true); - authProvider.resetPassword({ - ...values - }).then((res)=>{ - setLoading(false); - notify("auth.notification.reset_password_submitted", { - type: "info" - }); - }).catch((error)=>{ - setLoading(false); - notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { - type: "warning", - messageArgs: { - _: typeof error === "string" ? error : error && error.message ? error.message : undefined - } + (0, $1obPJ$useEffect)(()=>{ + setHandleSubmit(()=>async (values)=>{ + setLoading(true); + authProvider.resetPassword({ + ...values + }).then(()=>{ + setLoading(false); + notify("auth.notification.reset_password_submitted", { + type: "info" + }); + }).catch((error)=>{ + setLoading(false); + notify(typeof error === "string" ? error : typeof error === "undefined" || !error.message ? "auth.notification.reset_password_error" : error.message, { + type: "warning", + messageArgs: { + _: typeof error === "string" ? error : error && error.message ? error.message : undefined + } + }); + }); }); - }); - }; - return /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Form), { - onSubmit: submit, - children: /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$CardContent), { - children: [ - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { - autoFocus: true, - source: "email", - label: translate("auth.input.email"), - autoComplete: "email", - fullWidth: true, - disabled: loading, - validate: (0, $1obPJ$required)(), - format: (value)=>value ? value.toLowerCase() : "" - }), - /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Button1), { - variant: "contained", - type: "submit", - color: "primary", - disabled: loading, - fullWidth: true, - children: translate("auth.action.submit") - }) - ] - }) + }); + return /*#__PURE__*/ (0, $1obPJ$jsxs)((0, $1obPJ$CardContent), { + children: [ + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$TextInput), { + autoFocus: true, + source: "email", + label: translate("auth.input.email"), + autoComplete: "email", + fullWidth: true, + disabled: loading, + validate: (0, $1obPJ$required)(), + format: (value)=>value ? value.toLowerCase() : "" + }), + /*#__PURE__*/ (0, $1obPJ$jsx)((0, $1obPJ$Button1), { + variant: "contained", + type: "submit", + color: "primary", + disabled: loading, + fullWidth: true, + children: translate("auth.action.submit") + }) + ] }); }; -var $8d415f03f06df877$export$2e2bcd8739ae039 = $8d415f03f06df877$var$ResetPasswordForm; +var $4c941e9b40342087$export$2e2bcd8739ae039 = $4c941e9b40342087$var$ResetPasswordForm; @@ -2232,8 +2252,8 @@ var $2dfd781b793256e6$export$2e2bcd8739ae039 = $2dfd781b793256e6$var$getSearchPa additionalSignupValues: additionalSignupValues, passwordScorer: passwordScorer }), - isResetPassword && /*#__PURE__*/ (0, $1obPJ$jsx)((0, $8d415f03f06df877$export$2e2bcd8739ae039), {}), - isNewPassword && /*#__PURE__*/ (0, $1obPJ$jsx)((0, $b403c35bd8d76c50$export$2e2bcd8739ae039), { + isResetPassword && /*#__PURE__*/ (0, $1obPJ$jsx)((0, $4c941e9b40342087$export$2e2bcd8739ae039), {}), + isNewPassword && /*#__PURE__*/ (0, $1obPJ$jsx)((0, $ddc5b4ef9210a90f$export$2e2bcd8739ae039), { redirectTo: redirectTo, passwordScorer: passwordScorer }), @@ -2507,7 +2527,8 @@ const $22afd1c81635c9d9$var$englishMessages = { new_password: "New password", confirm_new_password: "Confirm new password", password_strength: "Password strength", - password_too_weak: "Password too weak. Increase length or add special characters." + password_too_weak: "Password too weak. Increase length or add special characters.", + password_mismatch: "The passwords you provided do not match." }, helper: { login: "Sign in to your account", @@ -2601,7 +2622,8 @@ const $509b6323d7902699$var$frenchMessages = { new_password: "Nouveau mot de passe", confirm_new_password: "Confirmer le nouveau mot de passe", password_strength: "Force du mot de passe", - password_too_weak: "Mot de passe trop faible. Augmenter la longueur ou ajouter des caract\xe8res sp\xe9ciaux." + password_too_weak: "Mot de passe trop faible. Augmenter la longueur ou ajouter des caract\xe8res sp\xe9ciaux.", + password_mismatch: "Mot de passe diff\xe9rent du premier" }, helper: { login: "Connectez-vous \xe0 votre compte.", diff --git a/src/frontend/packages/auth-provider/dist/index.es.js.map b/src/frontend/packages/auth-provider/dist/index.es.js.map index 009fd0f10..79aba62e7 100644 --- a/src/frontend/packages/auth-provider/dist/index.es.js.map +++ b/src/frontend/packages/auth-provider/dist/index.es.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5F,MAAM,4CAAY,CAAA;IACvB,MAAM,YAAY,IAAI,IAAI;IAC1B,OAAO,CAAA,GAAA,cAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,UAAU,QAAQ;AAC7D;AAEO,MAAM,4CAAgB,CAAA,UAAY,CAAA;QACvC,SAAS;QACT,KAAK;QACL,MAA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B;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.ts","packages/auth-provider/src/constants.ts","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.tsx","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.tsx","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.tsx","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.tsx","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n const callCheckUser = async webId => {\n if (checkUser) {\n try {\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (checkUser(userData) === false) throw new Error('auth.message.user_not_allowed_to_login');\n } catch (e) {\n localStorage.removeItem('token');\n throw e;\n }\n }\n };\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n let { webId, issuer, redirect = '/', isSignup = false } = params;\n\n if (webId && !issuer) {\n // Find issuer from webId\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (!userData['solid:oidcIssuer']) throw new Error('auth.message.no_associated_oidc_issuer');\n issuer = userData?.['solid:oidcIssuer'];\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response))\n .catch(() => {\n throw new Error('auth.message.unreachable_auth_server');\n });\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n localStorage.setItem('redirect', redirect);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n authorizationUrl.searchParams.set('is_signup', isSignup);\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim()\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n\n // Set token now as it is required for refreshConfig\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve data set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n const redirect = localStorage.getItem('redirect');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove we don't need it anymore\n localStorage.removeItem('code_verifier');\n localStorage.removeItem('redirect');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = redirect || '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, ...profileData } = params;\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username?.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error('auth.message.signup_error');\n }\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n\n return webId;\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async params => {\n const { redirectUrl } = params || {};\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n if (redirectUrl) {\n return redirectUrl;\n } else {\n // We don't need the token to fetch the WebID since it is public\n const { json: userData } = await dataProvider.fetch(webId);\n\n // Redirect to the Pod provider\n return userData?.['solid:oidcIssuer'] || new URL(webId).origin;\n }\n } else {\n return redirectUrl;\n }\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => {\n // We want to disconnect only with INVALID_TOKEN errors\n if (error.status === 401 && error.body && error.body.type === 'INVALID_TOKEN') {\n localStorage.removeItem('token');\n return Promise.reject();\n } else {\n // Other error code (404, 500, etc): no need to log out\n return Promise.resolve();\n }\n },\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n\n // Backend-generated tokens use webId but Solid-OIDC tokens use webid\n const webId = authType === AUTH_TYPE_SOLID_OIDC ? payload.webid : payload.webId;\n\n if (!webId) {\n // If webId is not set, it is probably because we have ActivityPods v1 tokens and we need to disconnect\n localStorage.removeItem('token');\n window.location.href = '/login';\n throw new Error('No webId found on provided token !');\n }\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.reset_password_error');\n }\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.new_password_error');\n }\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a Pod provider, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainerUri()(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\nimport { Permissions } from '../types';\n\nconst useCheckPermissions = (uri: string, mode: keyof typeof rights, redirectUrl: string = '/') => {\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, redirect, notify]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import { AclClass, AclMode } from './types';\n\nexport const ACL_READ: AclMode = 'acl:Read';\nexport const ACL_APPEND: AclMode = 'acl:Append';\nexport const ACL_WRITE: AclMode = 'acl:Write';\nexport const ACL_CONTROL: AclMode = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT: AclClass = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT: AclClass = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete: AclMode[] = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl: AclMode[] = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n ShowButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToList, rightsToShow } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasShow && permissions && permissions.some(p => rightsToShow.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit, rightsToList } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { data: identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import { useEffect, useMemo } from 'react';\nimport { Link, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Box, Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {function} props.onLogin Optional function to call when login is completed\n * @param {function} props.onSignup Optional function to call when signup is completed\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n onLogin,\n onSignup,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect') || '/';\n const { data: identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n (async () => {\n if (!isLoading && identity?.id) {\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }\n })();\n }, [identity, isLoading, redirectTo, onLogin]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isLogin && }\n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n \n {(isSignup || isResetPassword) && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import { useEffect, useState } from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\n\ninterface FormValues {\n username: string;\n password: string;\n email: string;\n}\n\ninterface SignupFormProps {\n onSignup: (redirectTo: string) => void;\n additionalSignupValues: object;\n delayBeforeRedirect: number;\n passwordScorer: typeof defaultScorer;\n}\n\n/**\n * @param onSignup Optional function to call when signup is completed. Called after the `delayBeforeRedirect`.\n * @param additionalSignupValues Passed to react-admin's signup function.\n * @param delayBeforeRedirect In milliseconds\n * @param passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues = {},\n delayBeforeRedirect = 0\n}: SignupFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues,\n delayBeforeRedirect = 0,\n setHandleSubmit\n}: SignupFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const [locale] = useLocaleState();\n const [password, setPassword] = useState('');\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await signup({\n ...values,\n ...additionalSignupValues\n });\n setTimeout(() => {\n if (onSignup) {\n onSignup(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }, delayBeforeRedirect);\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, signup, additionalSignupValues, redirectTo, notify, onSignup, formContext]);\n\n return (\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n \n );\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","import { useEffect, useState } from 'react';\nimport { useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin, Form } from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent } from '@mui/material';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\n\ninterface FormValues {\n username: string;\n password: string;\n}\n\ninterface LoginFormProps {\n /**\n * Called on login.\n * @param {string} redirectTo The location the form asks to redirect to, if set in search param `redirect`.\n */\n onLogin: (redirectTo: string) => void;\n /** If the form should allow login with username (in addition to email). */\n allowUsername: boolean;\n}\nconst LoginForm = ({ onLogin, allowUsername }: LoginFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n onLogin,\n allowUsername,\n setHandleSubmit\n}: LoginFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await login(values);\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, login, redirectTo, notify, onLogin]);\n\n return (\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n \n );\n};\n\nLoginForm.defaultValues = {\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\n\nconst samePassword = (value, allValues) => {\n if (value && value !== allValues.password) {\n return 'Mot de passe différent du premier';\n }\n};\n\n/**\n *\n * @param {string} redirectTo\n * @param {Object} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n\n const [newPassword, setNewPassword] = useState('');\n\n const submit = values => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(() => {\n setTimeout(() => {\n const url = new URL('/login', window.location.origin);\n if (redirectTo) url.searchParams.append('redirect', redirectTo);\n url.searchParams.append('email', values.email);\n window.location.href = url.toString();\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n />\n \n \n \n
\n );\n};\n\nexport default NewPasswordForm;\n","import React from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent } from '@mui/material';\n\nconst ResetPasswordForm = () => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n\n const submit = values => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(res => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n };\n\n return (\n
\n \n (value ? value.toLowerCase() : '')}\n />\n \n \n
\n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main,\n [theme.breakpoints.down('sm')]: {\n padding: '1em'\n }\n },\n card: {\n width: '100%',\n maxWidth: 450,\n marginTop: '6em'\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { data: identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { data: identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n submit: 'Submit',\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n no_associated_oidc_issuer: 'No OIDC issuer associated with the provided WebID',\n invalid_token_returned: 'Invalid token returned',\n signup_error: 'Account registration failed',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a Pod provider in the list below. All application data will be saved on your Pod.',\n unreachable_auth_server: 'The authentication server cannot be reached'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n submit: 'Soumettre',\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n no_associated_oidc_issuer: 'Aucun serveur de connexion associé avec le WebID fourni',\n invalid_token_returned: 'Token invalide',\n signup_error: \"L'inscription a échoué\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de Pods dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre Pod.\",\n unreachable_auth_server: 'Le serveur de connexion ne peut être atteint'\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.es.js.map"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEEO,MAAM,4CAAiB,CAAA,QAAU,CAAC,QAAQ,YAAY,MAAM,OAAO,CAAC,SAAS,QAAQ;QAAC;KAAM;AAI5F,MAAM,4CAAY,CAAA;IACvB,MAAM,YAAY,IAAI,IAAI;IAC1B,OAAO,CAAA,GAAA,cAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,UA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;YACP,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,sBAAsB;YACtB,mBAAmB;YACnB,mBAAmB;YACnB,mBAAmB;QACrB;QACA,QAAQ;YACN,OAAO;YACP,QAAQ;YACR,gBACE;YACF,kBAAkB;QACpB;QACA,SAAS;YACP,yBAAyB;YACzB,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;YAC3B,mBAAmB;YACnB,2BAA2B;YAC3B,wBAAwB;YACxB,cAAc;YACd,2BAA2B;YAC3B,sBAAsB;YACtB,kBAAkB;YAClB,gBAAgB;YAChB,kBACE;YACF,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,0BAA0B;YAC1B,mBAAmB;YACnB,qBACE;YACF,yBAAyB;QAC3B;QACA,cAAc;YACZ,0BAA0B;YAC1B,sBAAsB;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;QACzB;IACF;AACF;IAEA,2CAAe;","sources":["packages/auth-provider/src/index.ts","packages/auth-provider/src/authProvider.js","packages/auth-provider/src/utils.js","packages/auth-provider/src/crud/create/CreateWithPermissions.js","packages/auth-provider/src/hooks/useCheckPermissions.ts","packages/auth-provider/src/constants.ts","packages/auth-provider/src/crud/edit/EditWithPermissions.js","packages/auth-provider/src/crud/edit/EditActionsWithPermissions.tsx","packages/auth-provider/src/components/PermissionsButton/PermissionsButton.js","packages/auth-provider/src/components/PermissionsButton/PermissionsDialog.js","packages/auth-provider/src/components/PermissionsButton/AddPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/EditPermissionsForm.js","packages/auth-provider/src/components/PermissionsButton/AgentItem.js","packages/auth-provider/src/components/PermissionsButton/AgentIcon.js","packages/auth-provider/src/hooks/useAgents.js","packages/auth-provider/src/crud/edit/EditToolbarWithPermissions.tsx","packages/auth-provider/src/crud/edit/DeleteButtonWithPermissions.js","packages/auth-provider/src/crud/edit/EditButtonWithPermissions.js","packages/auth-provider/src/crud/list/ListWithPermissions.js","packages/auth-provider/src/crud/list/ListActionsWithPermissions.js","packages/auth-provider/src/crud/show/ShowWithPermissions.js","packages/auth-provider/src/crud/show/ShowActionsWithPermissions.tsx","packages/auth-provider/src/components/AuthDialog.js","packages/auth-provider/src/components/SsoLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/LocalLoginPage.js","packages/auth-provider/src/components/LocalLoginPage/SignupForm.tsx","packages/auth-provider/src/hooks/useSignup.js","packages/auth-provider/src/components/LocalLoginPage/validatePasswordStrength.js","packages/auth-provider/src/passwordScorer.js","packages/auth-provider/src/components/LocalLoginPage/PasswordStrengthIndicator.js","packages/auth-provider/src/components/LocalLoginPage/ColorGradientProgressBar.js","packages/auth-provider/src/components/LocalLoginPage/LoginForm.tsx","packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.tsx","packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.tsx","packages/auth-provider/src/components/LocalLoginPage/SimpleBox.js","packages/auth-provider/src/components/LocalLoginPage/getSearchParamsRest.js","packages/auth-provider/src/components/ResourceWithPermissions.js","packages/auth-provider/src/components/UserMenu.js","packages/auth-provider/src/hooks/useCheckAuthenticated.js","packages/auth-provider/src/hooks/usePermissionsWithRefetch.js","packages/auth-provider/src/messages/english.js","packages/auth-provider/src/messages/french.js"],"sourcesContent":["export { default as authProvider } from './authProvider';\n\n// Create\nexport { default as CreateWithPermissions } from './crud/create/CreateWithPermissions';\n\n// Edit\nexport { default as EditWithPermissions } from './crud/edit/EditWithPermissions';\nexport { default as EditActionsWithPermissions } from './crud/edit/EditActionsWithPermissions';\nexport { default as EditToolbarWithPermissions } from './crud/edit/EditToolbarWithPermissions';\nexport { default as EditButtonWithPermissions } from './crud/edit/EditButtonWithPermissions';\nexport { default as DeleteButtonWithPermissions } from './crud/edit/DeleteButtonWithPermissions';\n\n// List\nexport { default as ListWithPermissions } from './crud/list/ListWithPermissions';\nexport { default as ListActionsWithPermissions } from './crud/list/ListActionsWithPermissions';\n\n// Show\nexport { default as ShowWithPermissions } from './crud/show/ShowWithPermissions';\nexport { default as ShowActionsWithPermissions } from './crud/show/ShowActionsWithPermissions';\n\nexport { default as PermissionsButton } from './components/PermissionsButton/PermissionsButton';\nexport { default as AuthDialog } from './components/AuthDialog';\nexport { default as SsoLoginPage, default as LoginPage } from './components/SsoLoginPage';\nexport { default as LocalLoginPage } from './components/LocalLoginPage/LocalLoginPage';\nexport { default as ResourceWithPermissions } from './components/ResourceWithPermissions';\nexport { default as UserMenu } from './components/UserMenu';\n\nexport { default as useAgents } from './hooks/useAgents';\nexport { default as useCheckAuthenticated } from './hooks/useCheckAuthenticated';\nexport { default as useCheckPermissions } from './hooks/useCheckPermissions';\nexport { default as usePermissionsWithRefetch } from './hooks/usePermissionsWithRefetch';\nexport { default as useSignup } from './hooks/useSignup';\n\n// Password scoring\nexport { default as PasswordStrengthIndicator } from './components/LocalLoginPage/PasswordStrengthIndicator';\nexport { default as validatePasswordStrength } from './components/LocalLoginPage/validatePasswordStrength';\nexport {\n defaultScorer as defaultPasswordScorer,\n defaultOptions as defaultPasswordScorerOptions,\n createPasswordScorer\n} from './passwordScorer';\n\nexport { default as englishMessages } from './messages/english';\nexport { default as frenchMessages } from './messages/french';\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport * as oauth from 'oauth4webapi';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst AUTH_TYPE_SSO = 'sso';\nconst AUTH_TYPE_LOCAL = 'local';\nconst AUTH_TYPE_POD = 'pod';\nconst AUTH_TYPE_SOLID_OIDC = 'solid-oidc';\n\nconst authProvider = ({\n dataProvider,\n authType,\n allowAnonymous = true,\n checkUser,\n checkPermissions = false,\n clientId\n}) => {\n if (![AUTH_TYPE_SSO, AUTH_TYPE_LOCAL, AUTH_TYPE_POD, AUTH_TYPE_SOLID_OIDC].includes(authType))\n throw new Error('The authType parameter is missing from the auth provider');\n if (authType === AUTH_TYPE_SOLID_OIDC && !clientId)\n throw new Error('The clientId parameter is required for solid-oidc authentication');\n const callCheckUser = async webId => {\n if (checkUser) {\n try {\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (checkUser(userData) === false) throw new Error('auth.message.user_not_allowed_to_login');\n } catch (e) {\n localStorage.removeItem('token');\n throw e;\n }\n }\n };\n return {\n login: async params => {\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n let { webId, issuer, redirect = '/', isSignup = false } = params;\n\n if (webId && !issuer) {\n // Find issuer from webId\n const { json: userData } = await dataProvider.fetch(webId);\n if (!userData) throw new Error('auth.message.unable_to_fetch_user_data');\n if (!userData['solid:oidcIssuer']) throw new Error('auth.message.no_associated_oidc_issuer');\n issuer = userData?.['solid:oidcIssuer'];\n }\n\n const as = await oauth\n .discoveryRequest(new URL(issuer))\n .then(response => oauth.processDiscoveryResponse(new URL(issuer), response))\n .catch(() => {\n throw new Error('auth.message.unreachable_auth_server');\n });\n\n const codeVerifier = oauth.generateRandomCodeVerifier();\n const codeChallenge = await oauth.calculatePKCECodeChallenge(codeVerifier);\n const codeChallengeMethod = 'S256';\n\n // Save to use on handleCallback method\n localStorage.setItem('code_verifier', codeVerifier);\n localStorage.setItem('redirect', redirect);\n\n const authorizationUrl = new URL(as.authorization_endpoint);\n authorizationUrl.searchParams.set('response_type', 'code');\n authorizationUrl.searchParams.set('client_id', clientId);\n authorizationUrl.searchParams.set('code_challenge', codeChallenge);\n authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);\n authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);\n authorizationUrl.searchParams.set('scope', 'openid webid offline_access');\n authorizationUrl.searchParams.set('is_signup', isSignup);\n\n window.location = authorizationUrl;\n } else if (authType === AUTH_TYPE_LOCAL) {\n const { username, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n password: password.trim()\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n\n // Set token now as it is required for refreshConfig\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n } else if (authType === AUTH_TYPE_SSO) {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n let redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n if (params.redirect) redirectUrl += `&redirect=${encodeURIComponent(params.redirect)}`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n handleCallback: async () => {\n const { searchParams } = new URL(window.location);\n\n if (authType === AUTH_TYPE_SOLID_OIDC) {\n const issuer = new URL(searchParams.get('iss'));\n const as = await oauth\n .discoveryRequest(issuer)\n .then(response => oauth.processDiscoveryResponse(issuer, response));\n\n const client = {\n client_id: clientId,\n token_endpoint_auth_method: 'none' // We don't have a client secret\n };\n\n const currentUrl = new URL(window.location.href);\n const params = oauth.validateAuthResponse(as, client, currentUrl, oauth.expectNoState);\n if (oauth.isOAuth2Error(params)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Retrieve data set during login\n const codeVerifier = localStorage.getItem('code_verifier');\n const redirect = localStorage.getItem('redirect');\n\n const response = await oauth.authorizationCodeGrantRequest(\n as,\n client,\n params,\n `${window.location.origin}/auth-callback`,\n codeVerifier\n );\n\n const result = await oauth.processAuthorizationCodeOpenIDResponse(as, client, response);\n if (oauth.isOAuth2Error(result)) {\n throw new Error(`OAuth error: ${params.error} (${params.error_description})`);\n }\n\n // Until DPoP is implemented, use the ID token to log into local Pod\n // And the proxy endpoint to log into remote Pods\n localStorage.setItem('token', result.id_token);\n\n // Remove we don't need it anymore\n localStorage.removeItem('code_verifier');\n localStorage.removeItem('redirect');\n\n // Reload to ensure the dataServer config is reset\n window.location.href = redirect || '/';\n } else {\n const token = searchParams.get('token');\n if (!token) throw new Error('auth.message.no_token_returned');\n\n let webId;\n try {\n ({ webId } = jwtDecode(token));\n } catch (e) {\n throw new Error('auth.message.invalid_token_returned');\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (authType === AUTH_TYPE_LOCAL) {\n const { username, email, password, domain, ...profileData } = params;\n let token, webId;\n\n try {\n ({\n json: { token, webId }\n } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username?.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n }));\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error('auth.message.signup_error');\n }\n }\n\n localStorage.setItem('token', token);\n await dataProvider.refreshConfig();\n\n await callCheckUser(webId);\n\n return webId;\n } else {\n const redirectUrl = `${new URL(window.location.href).origin}/login?login=true`;\n window.location.href = urlJoin(authServerUrl, `auth?redirectUrl=${encodeURIComponent(redirectUrl)}`);\n }\n },\n logout: async params => {\n const { redirectUrl } = params || {};\n switch (authType) {\n case AUTH_TYPE_LOCAL: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n let result = {};\n\n try {\n result = await dataProvider.fetch(urlJoin(authServerUrl, '.well-known/openid-configuration'));\n } catch (e) {\n // Do nothing if it fails\n }\n\n if (result.status === 200 && result.json) {\n // Redirect to OIDC endpoint if it exists\n window.location.href = result.json.end_session_endpoint;\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n }\n\n break;\n }\n\n case AUTH_TYPE_SSO: {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n const baseUrl = new URL(window.location.href).origin;\n return urlJoin(\n authServerUrl,\n `auth/logout?redirectUrl=${encodeURIComponent(`${urlJoin(baseUrl, 'login')}?logout=true`)}`\n );\n }\n\n case AUTH_TYPE_POD: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n // Delete token but also any other value in local storage\n localStorage.clear();\n // Redirect to the POD provider\n return `${urlJoin(webId, 'openApp')}?type=${encodeURIComponent(\n 'http://activitypods.org/ns/core#FrontAppRegistration'\n )}`;\n }\n break;\n }\n\n case AUTH_TYPE_SOLID_OIDC: {\n const token = localStorage.getItem('token');\n if (token) {\n const { webid: webId } = jwtDecode(token); // Not webId !!\n\n // Delete token but also any other value in local storage\n localStorage.clear();\n\n if (redirectUrl) {\n return redirectUrl;\n } else {\n // We don't need the token to fetch the WebID since it is public\n const { json: userData } = await dataProvider.fetch(webId);\n\n // Redirect to the Pod provider\n return userData?.['solid:oidcIssuer'] || new URL(webId).origin;\n }\n } else {\n return redirectUrl;\n }\n }\n\n default:\n break;\n }\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n }\n return true;\n },\n checkError: error => {\n // We want to disconnect only with INVALID_TOKEN errors\n if (error.status === 401 && error.body && error.body.type === 'INVALID_TOKEN') {\n localStorage.removeItem('token');\n return Promise.reject();\n } else {\n // Other error code (404, 500, etc): no need to log out\n return Promise.resolve();\n }\n },\n getPermissions: async uri => {\n if (!checkPermissions) return;\n\n // React-admin calls getPermissions with an empty object on every page refresh\n // It also passes an object `{ params: { route: 'dashboard' } }` on the Dashboard\n // Ignore all this until we found a way to bypass these redundant calls\n if (typeof uri === 'object') return;\n\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch (e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const authorization = {\n '@id': `#${mode.replace('acl:', '')}`,\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n const { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const payload = jwtDecode(token);\n\n // Backend-generated tokens use webId but Solid-OIDC tokens use webid\n const webId = authType === AUTH_TYPE_SOLID_OIDC ? payload.webid : payload.webId;\n\n if (!webId) {\n // If webId is not set, it is probably because we have ActivityPods v1 tokens and we need to disconnect\n localStorage.removeItem('token');\n window.location.href = '/login';\n throw new Error('No webId found on provided token !');\n }\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName:\n profileData?.['vcard:given-name'] ||\n profileData?.['pair:label'] ||\n webIdData['foaf:name'] ||\n webIdData['pair:label'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.reset_password_error');\n }\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'email.not.exists') {\n throw new Error('auth.message.user_email_not_found');\n } else {\n throw new Error('auth.notification.new_password_error');\n }\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('auth.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({\n currentPassword,\n email: email?.trim(),\n newPassword\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('auth.notification.invalid_password');\n }\n\n throw new Error('auth.notification.update_settings_error');\n }\n }\n };\n};\n\nexport default authProvider;\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a Pod provider, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? new URL(authServer.baseUrl).origin : authServer.baseUrl;\n};\n\nexport const delay = async t => new Promise(resolve => setTimeout(resolve, t));\n","import React from 'react';\nimport { Create, CreateActions, useResourceContext } from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const resource = useResourceContext();\n const createContainerUri = useCreateContainerUri()(resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import { useEffect } from 'react';\nimport { usePermissions, useRedirect, useNotify } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\nimport { Permissions } from '../types';\n\nconst useCheckPermissions = (uri: string, mode: keyof typeof rights, redirectUrl: string = '/') => {\n const { permissions } = usePermissions(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], { type: 'error' });\n redirect(redirectUrl);\n }\n }, [permissions, redirect, notify]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import { AclClass, AclMode } from './types';\n\nexport const ACL_READ: AclMode = 'acl:Read';\nexport const ACL_APPEND: AclMode = 'acl:Append';\nexport const ACL_WRITE: AclMode = 'acl:Write';\nexport const ACL_CONTROL: AclMode = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT: AclClass = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT: AclClass = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList: AclMode[] = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit: AclMode[] = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete: AclMode[] = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl: AclMode[] = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React from 'react';\nimport { Edit, useGetRecordId } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport {\n ShowButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToList, rightsToShow } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst EditActionsWithPermissions = () => {\n const { hasList, hasShow } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasShow && permissions && permissions.some(p => rightsToShow.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React, { useState } from 'react';\nimport { Button, useRecordContext, useResourceContext } from 'react-admin';\nimport ShareIcon from '@mui/icons-material/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ isContainer }) => {\n const record = useRecordContext();\n const resource = useResourceContext();\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nPermissionsButton.defaultProps = {\n isContainer: false\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport PersonIcon from '@mui/icons-material/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { data } = useGetList(\n 'Person',\n {\n pagination: { page: 1, perPage: 100 },\n sort: { field: 'pair:label', order: 'ASC' },\n filter: { q: inputValue }\n },\n {\n enabled: inputValue.length > 0\n }\n );\n\n useEffect(() => {\n setOptions(data?.length > 0 ? Object.values(data) : []);\n }, [data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={(props, option) => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport { List } from '@mui/material';\nimport { styled } from '@mui/system';\nimport AgentItem from './AgentItem';\n\nconst StyledList = styled(List)(({ theme }) => ({\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport EditIcon from '@mui/icons-material/Edit';\nimport CheckIcon from '@mui/icons-material/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport PublicIcon from '@mui/icons-material/Public';\nimport VpnLockIcon from '@mui/icons-material/VpnLock';\nimport PersonIcon from '@mui/icons-material/Person';\nimport GroupIcon from '@mui/icons-material/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error(`Unknown agent predicate: ${agent.predicate}`);\n }\n};\n\nexport default AgentIcon;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissions, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissions(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n const result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (const p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { SaveButton, Toolbar, ToolbarProps } from 'react-admin';\nimport { styled } from '@mui/material/styles';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst StyledToolbar = styled(Toolbar)(() => ({\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n}));\n\nconst EditToolbarWithPermissions: React.FunctionComponent = props => (\n \n \n \n \n);\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { EditButton, useGetRecordId, usePermissions } from 'react-admin';\nimport { rightsToEdit } from '../../constants';\n\nconst EditButtonWithPermissions = props => {\n const recordId = useGetRecordId();\n const { permissions, isLoading } = usePermissions(recordId);\n if (!isLoading && permissions?.some(p => rightsToEdit.includes(p['acl:mode']))) {\n return ;\n }\n return null;\n};\n\nexport default EditButtonWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport {\n CreateButton,\n ExportButton,\n useResourceDefinition,\n TopToolbar,\n usePermissions,\n useResourceContext\n} from 'react-admin';\nimport { useMediaQuery } from '@mui/material';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n sort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n selectedIds,\n showFilter,\n total\n}) => {\n const resource = useResourceContext();\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition();\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissions(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n filterValues,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { Show, useGetRecordId } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n const recordId = useGetRecordId();\n useCheckPermissions(recordId, 'show');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport {\n EditButton,\n ListButton,\n TopToolbar,\n usePermissions,\n useResourceDefinition,\n useRecordContext,\n useResourceContext\n} from 'react-admin';\nimport { useCreateContainerUri } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit, rightsToList } from '../../constants';\nimport { Permissions } from '../../types';\n\nconst ShowActionsWithPermissions = () => {\n const { hasList, hasEdit } = useResourceDefinition();\n const record = useRecordContext();\n const { permissions } = usePermissions(record?.id);\n\n const resource = useResourceContext();\n const containerUri = useCreateContainerUri()(resource);\n const { permissions: containerPermissions } = usePermissions(containerUri);\n\n return (\n \n {hasList && containerPermissions && containerPermissions.some(p => rightsToList.includes(p['acl:mode'])) && (\n \n )}\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && }\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && }\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useRef, useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useDataProvider, useAuthProvider, useLogin, useGetIdentity, useNotify } from 'react-admin';\nimport { Card, Avatar, Typography, Button, CardActions } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport LockIcon from '@mui/icons-material/Lock';\n\nconst delay = async t => new Promise(resolve => setTimeout(resolve, t));\n\n// Inspired from https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/auth/Login.tsx\nconst SsoLoginPage = ({ children, backgroundImage, buttons, userResource, propertiesExist, text, ...rest }) => {\n const containerRef = useRef();\n let backgroundImageLoaded = false;\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { data: identity, isLoading } = useGetIdentity();\n\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n if (!isLoading && identity?.id) {\n // Already authenticated, redirect to the home page\n navigate(searchParams.get('redirect') || '/');\n }\n }, [identity, isLoading, navigate, searchParams]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', { type: 'error' });\n } else {\n notify('auth.message.bad_request', { type: 'error', messageArgs: { error: searchParams.get('error') } });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n localStorage.setItem('token', token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n localStorage.removeItem('token');\n notify('auth.message.user_not_allowed_to_login', { type: 'error' });\n navigate.replace('/login');\n } else if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = searchParams.get('redirect');\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', { type: 'info' });\n window.location.href = `/${userResource}/${encodeURIComponent(webId)}`;\n } else {\n notify('auth.message.user_connected', { type: 'info' });\n window.location.href = '/';\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', { type: 'info' });\n navigate('/');\n }\n })();\n }, [searchParams, navigate, notify, userResource]);\n\n const updateBackgroundImage = () => {\n if (!backgroundImageLoaded && containerRef.current) {\n containerRef.current.style.backgroundImage = `url(${backgroundImage})`;\n backgroundImageLoaded = true;\n }\n };\n\n // Load background image asynchronously to speed up time to interactive\n const lazyLoadBackgroundImage = () => {\n if (backgroundImage) {\n const img = new Image();\n img.onload = updateBackgroundImage;\n img.src = backgroundImage;\n }\n };\n\n useEffect(() => {\n if (!backgroundImageLoaded) {\n lazyLoadBackgroundImage();\n }\n });\n\n if (isLoading) return null;\n\n return (\n \n \n
\n \n \n \n
\n {text && {text}}\n {buttons?.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n );\n};\n\nconst PREFIX = 'SsoLoginPage';\n\nexport const SsoLoginPageClasses = {\n card: `${PREFIX}-card`,\n avatar: `${PREFIX}-avatar`,\n icon: `${PREFIX}-icon`,\n switch: `${PREFIX}-switch`\n};\n\nconst Root = styled('div', {\n name: PREFIX,\n overridesResolver: (props, styles) => styles.root\n})(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',\n [`& .${SsoLoginPageClasses.card}`]: {\n minWidth: 300,\n marginTop: '6em'\n },\n [`& .${SsoLoginPageClasses.avatar}`]: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n [`& .${SsoLoginPageClasses.icon}`]: {\n backgroundColor: theme.palette.secondary[500]\n },\n [`& .${SsoLoginPageClasses.switch}`]: {\n marginBottom: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import { useEffect, useMemo } from 'react';\nimport { Link, useSearchParams } from 'react-router-dom';\nimport { useTranslate, useGetIdentity } from 'react-admin';\nimport { Box, Card, Typography } from '@mui/material';\nimport LockIcon from '@mui/icons-material/Lock';\nimport SignupForm from './SignupForm';\nimport LoginForm from './LoginForm';\nimport NewPasswordForm from './NewPasswordForm';\nimport ResetPasswordForm from './ResetPasswordForm';\nimport SimpleBox from './SimpleBox';\nimport { defaultScorer } from '../../passwordScorer';\nimport getSearchParamsRest from './getSearchParamsRest';\n\n/**\n * @param {object} props Props\n * @param {boolean} props.hasSignup If to show signup form.\n * @param {boolean} props.allowUsername Indicates, if login is allowed with username (instead of email).\n * @param {function} props.onLogin Optional function to call when login is completed\n * @param {function} props.onSignup Optional function to call when signup is completed\n * @param {object} props.additionalSignupValues\n * @param {object} props.passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst LocalLoginPage = ({\n hasSignup,\n allowUsername,\n onLogin,\n onSignup,\n additionalSignupValues,\n passwordScorer = defaultScorer\n}) => {\n const translate = useTranslate();\n const [searchParams] = useSearchParams();\n const isSignup = hasSignup && searchParams.has('signup');\n const isResetPassword = searchParams.has('reset_password');\n const isNewPassword = searchParams.has('new_password');\n const isLogin = !isSignup && !isResetPassword && !isNewPassword;\n const redirectTo = searchParams.get('redirect') || '/';\n const { data: identity, isLoading } = useGetIdentity();\n\n useEffect(() => {\n (async () => {\n if (!isLoading && identity?.id) {\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }\n })();\n }, [identity, isLoading, redirectTo, onLogin]);\n\n const [title, text] = useMemo(() => {\n if (isSignup) {\n return ['auth.action.signup', 'auth.helper.signup'];\n }\n if (isLogin) {\n return ['auth.action.login', 'auth.helper.login'];\n }\n if (isResetPassword) {\n return ['auth.action.reset_password', 'auth.helper.reset_password'];\n }\n if (isNewPassword) {\n return ['auth.action.set_new_password', 'auth.helper.set_new_password'];\n }\n }, [isSignup, isLogin, isResetPassword, isNewPassword]);\n\n if (isLoading || identity?.id) return null;\n\n return (\n }>\n \n {isLogin && }\n {isSignup && (\n \n )}\n {isResetPassword && }\n {isNewPassword && }\n \n {(isSignup || isResetPassword) && (\n \n {translate('auth.action.login')}\n \n )}\n {isLogin && (\n <>\n {hasSignup && (\n
\n \n {translate('auth.action.signup')}\n \n
\n )}\n
\n \n {translate('auth.action.reset_password')}\n \n
\n \n )}\n
\n
\n
\n );\n};\n\nLocalLoginPage.defaultProps = {\n hasSignup: true,\n allowUsername: false,\n additionalSignupValues: {}\n};\n\nexport default LocalLoginPage;\n","import { useEffect, useState } from 'react';\nimport createSlug from 'speakingurl';\nimport {\n Form,\n useTranslate,\n useNotify,\n useSafeSetState,\n TextInput,\n minLength,\n required,\n email,\n useLocaleState\n} from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport useSignup from '../../hooks/useSignup';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport { defaultScorer } from '../../passwordScorer';\n\ninterface FormValues {\n username: string;\n password: string;\n email: string;\n}\n\ninterface SignupFormProps {\n onSignup: (redirectTo: string) => void;\n additionalSignupValues: object;\n delayBeforeRedirect: number;\n passwordScorer: typeof defaultScorer;\n}\n\n/**\n * @param onSignup Optional function to call when signup is completed. Called after the `delayBeforeRedirect`.\n * @param additionalSignupValues Passed to react-admin's signup function.\n * @param delayBeforeRedirect In milliseconds\n * @param passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst SignupForm = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues = {},\n delayBeforeRedirect = 0\n}: SignupFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n passwordScorer = defaultScorer,\n onSignup,\n additionalSignupValues,\n delayBeforeRedirect = 0,\n setHandleSubmit\n}: SignupFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const [locale] = useLocaleState();\n const [password, setPassword] = useState('');\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await signup({\n ...values,\n ...additionalSignupValues\n });\n setTimeout(() => {\n if (onSignup) {\n onSignup(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n }, delayBeforeRedirect);\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, signup, additionalSignupValues, redirectTo, notify, onSignup, formContext]);\n\n return (\n \n \n value\n ? createSlug(value, {\n lang: locale || 'fr',\n separator: '_',\n custom: ['.', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n })\n : ''\n }\n />\n \n {passwordScorer && password && !(searchParams.has('email') && searchParams.has('force-email')) && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n \n \n )}\n setPassword(e.target.value)}\n label={translate('ra.auth.password')}\n autoComplete=\"new-password\"\n fullWidth\n disabled={loading}\n validate={[required(), validatePasswordStrength(passwordScorer)]}\n />\n \n \n );\n};\n\nexport default SignupForm;\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import { defaultScorer } from '../../passwordScorer';\n\nconst validatePasswordStrength = (scorer = defaultScorer) => value => {\n if (!scorer) return undefined;\n const strength = scorer.scoreFn(value);\n if (strength < scorer.minRequiredScore) {\n return 'auth.input.password_too_weak';\n }\n return undefined;\n};\n\nexport default validatePasswordStrength;\n","// Inspired by https://github.com/bartlomiejzuber/password-strength-score\n\n/**\n * @typedef PasswordStrengthOptions\n * @property {number} isVeryLongLength - Required characters for a very long password (default: 12)\n * @property {number} isLongLength - Required characters for a long password (default: 6)\n * @property {number} isVeryLongScore - Score for a very long password (default: 2.5)\n * @property {number} isLongScore - Score for a long password (default: 1.5)\n * @property {number} uppercaseScore - Score for a password with uppercase letters (default: 1)\n * @property {number} lowercaseScore - Score for a password with lowercase letters (default: 1)\n * @property {number} numbersScore - Score for a password with numbers (default: 1)\n * @property {number} nonAlphanumericsScore - Score for a password without non-alphanumeric characters (default: 1)\n */\n\n/** @type {PasswordStrengthOptions} */\nexport const defaultOptions = {\n isVeryLongLength: 14,\n isLongLength: 8,\n isLongScore: 2,\n isVeryLongScore: 4,\n uppercaseScore: 1,\n lowercaseScore: 1,\n numbersScore: 1,\n nonAlphanumericsScore: 1\n};\n\n/**\n *\n * @param {string} password Password text.\n * @param {PasswordStrengthOptions} options Password options.\n * @returns {number} The password strength score.\n */\nexport const passwordStrength = (password, options) => {\n if (!password) {\n return 0;\n }\n\n const mergedOptions = { ...defaultOptions, ...options };\n\n const longScore = (password.length >= mergedOptions.isLongLength && mergedOptions.isLongScore) || 0;\n const veryLongScore = (password.length >= mergedOptions.isVeryLongLength && mergedOptions.isVeryLongScore) || 0;\n const lowercaseScore = (/[a-z]/.test(password) && mergedOptions.lowercaseScore) || 0;\n const uppercaseScore = (/[A-Z]/.test(password) && mergedOptions.uppercaseScore) || 0;\n const numbersScore = (/\\d/.test(password) && mergedOptions.numbersScore) || 0;\n const nonalphasScore = (/\\W/.test(password) && mergedOptions.nonAlphanumericsScore) || 0;\n\n return uppercaseScore + lowercaseScore + numbersScore + nonalphasScore + longScore + veryLongScore;\n};\n\nexport const createPasswordScorer = (options = defaultOptions, minRequiredScore = 5) => {\n const mergedOptions = { ...defaultOptions, ...options };\n\n return {\n scoreFn: password => passwordStrength(password, mergedOptions),\n minRequiredScore,\n maxScore:\n mergedOptions.uppercaseScore +\n mergedOptions.lowercaseScore +\n mergedOptions.numbersScore +\n mergedOptions.nonAlphanumericsScore +\n mergedOptions.isLongScore +\n mergedOptions.isVeryLongScore\n };\n};\n\nexport const defaultScorer = createPasswordScorer(defaultOptions, 5);\n","import React from 'react';\nimport ColorGradientProgressBar from './ColorGradientProgressBar';\nimport { defaultScorer } from '../../passwordScorer';\n\nexport default function PasswordStrengthIndicator({ scorer = defaultScorer, password, ...restProps }) {\n const strength = scorer.scoreFn(password);\n return ;\n}\n","import React from 'react';\nimport { LinearProgress } from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\n/**\n * @typedef {object} Color\n * @property {number} red\n * @property {number} green\n * @property {number} blue\n */\n\n/**\n * Calculate a rgb-color from a gradient between `color1` and `color2`\n * @param {number} fade - Indicates the fade between `color1` and `color2` in the range [0, 1].\n * @param {Color} color1\n * @param {Color} color2\n * @returns {string} `` `rgb(${red}, ${green}, ${blue})` ``\n */\nconst colorGradient = (fade, color1, color2) => {\n const diffRed = color2.red - color1.red;\n const diffGreen = color2.green - color1.green;\n const diffBlue = color2.blue - color1.blue;\n\n const gradient = {\n red: Math.floor(color1.red + diffRed * fade),\n green: Math.floor(color1.green + diffGreen * fade),\n blue: Math.floor(color1.blue + diffBlue * fade)\n };\n\n return `rgb(${gradient.red},${gradient.green},${gradient.blue})`;\n};\n\n/**\n * A progress bar that changes its color between its min an max value.\n * @param {object} props\n * @param {Color} [props.badColor] - default: `#FF4047`\n * @param {Color} [props.goodColor] - default: `#00FF6E`\n * @param {number} props.maxVal\n * @param {number} props.minVal\n * @param {number} props.currentVal\n */\nexport default function ColorGradientProgressBar(props) {\n const { minVal, maxVal, currentVal, badColor, goodColor, ...restProps } = props;\n\n const color1 = badColor || { red: 0xff, green: 0x40, blue: 0x47 };\n const color2 = goodColor || { red: 0x00, green: 0xff, blue: 0x6e };\n\n const fade = Math.max(0, Math.min(1, (currentVal - minVal) / (maxVal - minVal)));\n const currentColor = colorGradient(fade, color1, color2);\n\n const StyledLinearProgress = withStyles({\n colorPrimary: {\n backgroundColor: 'black' // '#e0e0e0'\n },\n barColorPrimary: {\n backgroundColor: currentColor\n }\n })(LinearProgress);\n\n return ;\n}\n","import { useEffect, useState } from 'react';\nimport { useTranslate, useNotify, useSafeSetState, TextInput, required, email, useLogin, Form } from 'react-admin';\nimport { useSearchParams } from 'react-router-dom';\nimport { Button, CardContent } from '@mui/material';\nimport { SubmitHandler, useFormContext } from 'react-hook-form';\n\ninterface FormValues {\n username: string;\n password: string;\n}\n\ninterface LoginFormProps {\n /**\n * Called on login.\n * @param {string} redirectTo The location the form asks to redirect to, if set in search param `redirect`.\n */\n onLogin: (redirectTo: string) => void;\n /** If the form should allow login with username (in addition to email). */\n allowUsername: boolean;\n}\nconst LoginForm = ({ onLogin, allowUsername }: LoginFormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n onLogin,\n allowUsername,\n setHandleSubmit\n}: LoginFormProps & { setHandleSubmit: React.Dispatch>> }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const login = useLogin();\n const translate = useTranslate();\n const notify = useNotify();\n const [searchParams] = useSearchParams();\n const redirectTo = searchParams.get('redirect') || '/';\n const formContext = useFormContext();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n try {\n setLoading(true);\n await login(values);\n if (onLogin) {\n onLogin(redirectTo);\n } else {\n window.location.href = redirectTo;\n }\n } catch (error) {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n {\n type: 'error',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n formContext.reset({ ...values }, { keepDirty: true, keepErrors: true });\n }\n });\n }, [setLoading, login, redirectTo, notify, onLogin]);\n\n return (\n \n (value ? value.toLowerCase() : '')}\n validate={allowUsername ? [required()] : [required(), email()]}\n />\n \n \n \n );\n};\n\nLoginForm.defaultValues = {\n allowUsername: false\n};\n\nexport default LoginForm;\n","import React, { useEffect, useState } from 'react';\nimport { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin';\nimport { useLocation, useSearchParams } from 'react-router-dom';\nimport { Button, CardContent, Typography } from '@mui/material';\nimport PasswordStrengthIndicator from './PasswordStrengthIndicator';\nimport validatePasswordStrength from './validatePasswordStrength';\nimport { defaultScorer } from '../../passwordScorer';\nimport { SubmitHandler } from 'react-hook-form';\n\ninterface FormProps {\n redirectTo: string;\n passwordScorer: typeof defaultScorer;\n}\n\ninterface FormValues {\n email: string;\n password: string;\n 'confirm-password': string;\n}\n\nconst samePassword = (value: string, allValues: FormValues) => {\n if (value && value !== allValues.password) {\n return 'auth.input.password_mismatch';\n }\n};\n\n/**\n *\n * @param {string} redirectTo\n * @param {typeof defaultScorer} passwordScorer Scorer to evaluate and indicate password strength.\n * Set to `null` or `false`, if you don't want password strength checks. Default is\n * passwordStrength's `defaultScorer`.\n * @returns\n */\nconst NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }: FormProps) => {\n const [searchParams] = useSearchParams();\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n setHandleSubmit,\n redirectTo,\n passwordScorer\n}: FormProps & {\n setHandleSubmit: React.Dispatch>>;\n}) => {\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n const token = searchParams.get('token');\n\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n\n const translate = useTranslate();\n const notify = useNotify();\n\n const [newPassword, setNewPassword] = useState('');\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n setLoading(true);\n authProvider\n .setNewPassword({ ...values, token })\n .then(() => {\n setTimeout(() => {\n const url = new URL('/login', window.location.origin);\n if (redirectTo) url.searchParams.append('redirect', redirectTo);\n url.searchParams.append('email', values.email);\n window.location.href = url.toString();\n setLoading(false);\n }, 2000);\n notify('auth.notification.password_changed', { type: 'info' });\n })\n .catch((error: Error) => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n });\n });\n\n return (\n \n (value ? value.toLowerCase() : '')}\n />\n {passwordScorer && (\n <>\n \n {translate('auth.input.password_strength')}:{' '}\n \n\n \n \n )}\n setNewPassword(e.target.value)}\n />\n \n \n \n );\n};\n\nexport default NewPasswordForm;\n","import React, { useEffect, useState } from 'react';\nimport { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin';\nimport { Button, CardContent } from '@mui/material';\nimport { SubmitHandler } from 'react-hook-form';\n\ninterface FormValues {\n email: string;\n}\n\nconst ResetPasswordForm = () => {\n const [handleSubmit, setHandleSubmit] = useState>(() => {});\n\n return (\n
\n \n \n );\n};\n\nconst FormContent = ({\n setHandleSubmit\n}: {\n setHandleSubmit: React.Dispatch>>;\n}) => {\n const [loading, setLoading] = useSafeSetState(false);\n const authProvider = useAuthProvider();\n const translate = useTranslate();\n const notify = useNotify();\n\n useEffect(() => {\n setHandleSubmit(() => async (values: FormValues) => {\n setLoading(true);\n authProvider\n .resetPassword({ ...values })\n .then(() => {\n setLoading(false);\n notify('auth.notification.reset_password_submitted', { type: 'info' });\n })\n .catch((error: Error) => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'auth.notification.reset_password_error'\n : error.message,\n {\n type: 'warning',\n messageArgs: {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n }\n );\n });\n });\n });\n\n return (\n \n (value ? value.toLowerCase() : '')}\n />\n \n \n );\n};\n\nexport default ResetPasswordForm;\n","import React from 'react';\nimport { Box, Card, Typography } from '@mui/material';\nimport { Notification } from 'react-admin';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.secondary.main\n }\n },\n root: {\n backgroundColor: theme.palette.secondary.main,\n [theme.breakpoints.down('sm')]: {\n padding: '1em'\n }\n },\n card: {\n width: '100%',\n maxWidth: 450,\n marginTop: '6em'\n },\n icon: {\n marginTop: 5,\n marginRight: 5\n },\n title: {\n [theme.breakpoints.down('sm')]: {\n fontWeight: 'bold',\n marginTop: 12\n }\n }\n}));\n\nconst SimpleBox = ({ title, icon, text, children }) => {\n const classes = useStyles();\n return (\n \n \n \n {icon && React.cloneElement(icon, { fontSize: 'large', className: classes.icon })}\n \n {title}\n \n \n \n {text}\n \n {children}\n \n \n \n );\n};\n\nexport default SimpleBox;\n","const USED_SEARCH_PARAMS = ['signup', 'reset_password', 'new_password', 'email', 'force-email'];\n\nconst getSearchParamsRest = searchParams => {\n const rest = [];\n for (const [key, value] of searchParams.entries()) {\n if (!USED_SEARCH_PARAMS.includes(key)) {\n rest.push(`${key}=${encodeURIComponent(value)}`);\n }\n }\n return rest.length > 0 ? rest.join('&') : '';\n};\n\nexport default getSearchParamsRest;\n","import React from 'react';\nimport { Resource, usePermissions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport { rightsToCreate } from '../constants';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissions(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef, useCallback } from 'react';\nimport { Logout, UserMenu as RaUserMenu, useGetIdentity, useTranslate, useUserMenu } from 'react-admin';\nimport { MenuItem, ListItemIcon, ListItemText } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useNavigate } from 'react-router-dom';\n\n// It's important to pass the ref to allow Material UI to manage the keyboard navigation\nconst UserMenuItem = forwardRef(({ label, icon, to, ...rest }, ref) => {\n const { onClose } = useUserMenu();\n const translate = useTranslate();\n const navigate = useNavigate();\n const onClick = useCallback(() => {\n navigate(to);\n onClose();\n }, [to, onClose, navigate]);\n return (\n \n {icon && {React.cloneElement(icon, { fontSize: 'small' })}}\n {translate(label)}\n \n );\n});\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { data: identity } = useGetIdentity();\n return (\n \n {identity && identity.id !== ''\n ? [\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}/show`}\n />,\n }\n to={`/${profileResource}/${encodeURIComponent(identity?.profileData?.id || identity.id)}`}\n />,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n logout: ,\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = message => {\n const { data: identity, isLoading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!isLoading && !identity?.id) {\n notify(message || 'ra.auth.auth_check_error', { type: 'error' });\n redirect(`/login?redirect=${encodeURIComponent(location.pathname + location.search)}`);\n }\n }, [isLoading, identity, redirect, notify, location]);\n\n return { identity, isLoading };\n};\n\nexport default useCheckAuthenticated;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n submit: 'Submit',\n permissions: 'Permissions',\n signup: 'Signup',\n reset_password: 'Reset password',\n set_new_password: 'Set new password',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address',\n current_password: 'Current password',\n new_password: 'New password',\n confirm_new_password: 'Confirm new password',\n password_strength: 'Password strength',\n password_too_weak: 'Password too weak. Increase length or add special characters.',\n password_mismatch: 'The passwords you provided do not match.'\n },\n helper: {\n login: 'Sign in to your account',\n signup: 'Create your account',\n reset_password: 'Enter your email address below and we will send you a link to reset your password',\n set_new_password: 'Please enter your email address and a new password below'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n unable_to_fetch_user_data: 'Unable to fetch user data',\n no_token_returned: 'No token returned',\n no_associated_oidc_issuer: 'No OIDC issuer associated with the provided WebID',\n invalid_token_returned: 'Invalid token returned',\n signup_error: 'Account registration failed',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider:\n 'Please choose a Pod provider in the list below. All application data will be saved on your Pod.',\n unreachable_auth_server: 'The authentication server cannot be reached'\n },\n notification: {\n reset_password_submitted: 'An email has been sent with reset password instructions',\n reset_password_error: 'An error occurred',\n password_changed: 'Password changed successfully',\n new_password_error: 'An error occurred',\n invalid_password: 'Invalid password',\n get_settings_error: 'An error occurred',\n update_settings_error: 'An error occurred'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la ressource',\n login_required: 'Connexion requise'\n },\n action: {\n submit: 'Soumettre',\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n reset_password: 'Mot de passe oublié ?',\n set_new_password: 'Définir le mot de passe',\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail',\n current_password: 'Mot de passe actuel',\n new_password: 'Nouveau mot de passe',\n confirm_new_password: 'Confirmer le nouveau mot de passe',\n password_strength: 'Force du mot de passe',\n password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.',\n password_mismatch: 'Mot de passe différent du premier'\n },\n helper: {\n login: 'Connectez-vous à votre compte.',\n signup: 'Créez votre compte',\n reset_password:\n 'Entrez votre adresse mail ci-dessous et nous vous enverrons un lien pour réinitialiser votre mot de passe',\n set_new_password: 'Veuillez entrer votre adresse mail et un nouveau mot de passe ci-dessous'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n unable_to_fetch_user_data: 'Impossible de récupérer les données du profil',\n no_token_returned: 'Aucun token a été retourné',\n no_associated_oidc_issuer: 'Aucun serveur de connexion associé avec le WebID fourni',\n invalid_token_returned: 'Token invalide',\n signup_error: \"L'inscription a échoué\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider:\n \"Veuillez choisir un fournisseur de Pods dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre Pod.\",\n unreachable_auth_server: 'Le serveur de connexion ne peut être atteint'\n },\n notification: {\n reset_password_submitted: 'Un e-mail a été envoyé avec les instructions de réinitialisation du mot de passe',\n reset_password_error: \"Une erreur s'est produite\",\n password_changed: 'Le mot de passe a été changé avec succès',\n new_password_error: \"Une erreur s'est produite\",\n invalid_password: 'Mot de passe incorrect',\n get_settings_error: \"Une erreur s'est produite\",\n update_settings_error: \"Une erreur s'est produite\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":[],"version":3,"file":"index.es.js.map"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js deleted file mode 100644 index 75aa3cae6..000000000 --- a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.js +++ /dev/null @@ -1,119 +0,0 @@ -import React, { useState } from 'react'; -import { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin'; -import { useLocation } from 'react-router-dom'; -import { Button, CardContent, Typography } from '@mui/material'; -import PasswordStrengthIndicator from './PasswordStrengthIndicator'; -import validatePasswordStrength from './validatePasswordStrength'; -import { defaultScorer } from '../../passwordScorer'; - -const samePassword = (value, allValues) => { - if (value && value !== allValues.password) { - return 'Mot de passe différent du premier'; - } -}; - -/** - * - * @param {string} redirectTo - * @param {Object} passwordScorer Scorer to evaluate and indicate password strength. - * Set to `null` or `false`, if you don't want password strength checks. Default is - * passwordStrength's `defaultScorer`. - * @returns - */ -const NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }) => { - const location = useLocation(); - const searchParams = new URLSearchParams(location.search); - const token = searchParams.get('token'); - - const [loading, setLoading] = useSafeSetState(false); - const authProvider = useAuthProvider(); - - const translate = useTranslate(); - const notify = useNotify(); - - const [newPassword, setNewPassword] = useState(''); - - const submit = values => { - setLoading(true); - authProvider - .setNewPassword({ ...values, token }) - .then(() => { - setTimeout(() => { - const url = new URL('/login', window.location.origin); - if (redirectTo) url.searchParams.append('redirect', redirectTo); - url.searchParams.append('email', values.email); - window.location.href = url.toString(); - setLoading(false); - }, 2000); - notify('auth.notification.password_changed', { type: 'info' }); - }) - .catch(error => { - setLoading(false); - notify( - typeof error === 'string' - ? error - : typeof error === 'undefined' || !error.message - ? 'auth.notification.reset_password_error' - : error.message, - { - type: 'warning', - messageArgs: { - _: typeof error === 'string' ? error : error && error.message ? error.message : undefined - } - } - ); - }); - }; - - return ( -
- - (value ? value.toLowerCase() : '')} - /> - {passwordScorer && ( - <> - - {translate('auth.input.password_strength')}:{' '} - - - - - )} - setNewPassword(e.target.value)} - /> - - - -
- ); -}; - -export default NewPasswordForm; diff --git a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.tsx b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.tsx new file mode 100644 index 000000000..4f45b5d70 --- /dev/null +++ b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/NewPasswordForm.tsx @@ -0,0 +1,148 @@ +import React, { useEffect, useState } from 'react'; +import { Form, useTranslate, useNotify, useSafeSetState, useAuthProvider, TextInput, required } from 'react-admin'; +import { useLocation, useSearchParams } from 'react-router-dom'; +import { Button, CardContent, Typography } from '@mui/material'; +import PasswordStrengthIndicator from './PasswordStrengthIndicator'; +import validatePasswordStrength from './validatePasswordStrength'; +import { defaultScorer } from '../../passwordScorer'; +import { SubmitHandler } from 'react-hook-form'; + +interface FormProps { + redirectTo: string; + passwordScorer: typeof defaultScorer; +} + +interface FormValues { + email: string; + password: string; + 'confirm-password': string; +} + +const samePassword = (value: string, allValues: FormValues) => { + if (value && value !== allValues.password) { + return 'auth.input.password_mismatch'; + } +}; + +/** + * + * @param {string} redirectTo + * @param {typeof defaultScorer} passwordScorer Scorer to evaluate and indicate password strength. + * Set to `null` or `false`, if you don't want password strength checks. Default is + * passwordStrength's `defaultScorer`. + * @returns + */ +const NewPasswordForm = ({ redirectTo, passwordScorer = defaultScorer }: FormProps) => { + const [searchParams] = useSearchParams(); + const [handleSubmit, setHandleSubmit] = useState>(() => {}); + + return ( +
+ + + ); +}; + +const FormContent = ({ + setHandleSubmit, + redirectTo, + passwordScorer +}: FormProps & { + setHandleSubmit: React.Dispatch>>; +}) => { + const location = useLocation(); + const searchParams = new URLSearchParams(location.search); + const token = searchParams.get('token'); + + const [loading, setLoading] = useSafeSetState(false); + const authProvider = useAuthProvider(); + + const translate = useTranslate(); + const notify = useNotify(); + + const [newPassword, setNewPassword] = useState(''); + + useEffect(() => { + setHandleSubmit(() => async (values: FormValues) => { + setLoading(true); + authProvider + .setNewPassword({ ...values, token }) + .then(() => { + setTimeout(() => { + const url = new URL('/login', window.location.origin); + if (redirectTo) url.searchParams.append('redirect', redirectTo); + url.searchParams.append('email', values.email); + window.location.href = url.toString(); + setLoading(false); + }, 2000); + notify('auth.notification.password_changed', { type: 'info' }); + }) + .catch((error: Error) => { + setLoading(false); + notify( + typeof error === 'string' + ? error + : typeof error === 'undefined' || !error.message + ? 'auth.notification.reset_password_error' + : error.message, + { + type: 'warning', + messageArgs: { + _: typeof error === 'string' ? error : error && error.message ? error.message : undefined + } + } + ); + }); + }); + }); + + return ( + + (value ? value.toLowerCase() : '')} + /> + {passwordScorer && ( + <> + + {translate('auth.input.password_strength')}:{' '} + + + + + )} + setNewPassword(e.target.value)} + /> + + + + ); +}; + +export default NewPasswordForm; diff --git a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js deleted file mode 100644 index 1eae27bbf..000000000 --- a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.js +++ /dev/null @@ -1,58 +0,0 @@ -import React from 'react'; -import { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin'; -import { Button, CardContent } from '@mui/material'; - -const ResetPasswordForm = () => { - const [loading, setLoading] = useSafeSetState(false); - const authProvider = useAuthProvider(); - const translate = useTranslate(); - const notify = useNotify(); - - const submit = values => { - setLoading(true); - authProvider - .resetPassword({ ...values }) - .then(res => { - setLoading(false); - notify('auth.notification.reset_password_submitted', { type: 'info' }); - }) - .catch(error => { - setLoading(false); - notify( - typeof error === 'string' - ? error - : typeof error === 'undefined' || !error.message - ? 'auth.notification.reset_password_error' - : error.message, - { - type: 'warning', - messageArgs: { - _: typeof error === 'string' ? error : error && error.message ? error.message : undefined - } - } - ); - }); - }; - - return ( -
- - (value ? value.toLowerCase() : '')} - /> - - -
- ); -}; - -export default ResetPasswordForm; diff --git a/src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.tsx b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.tsx new file mode 100644 index 000000000..a6378e4e7 --- /dev/null +++ b/src/frontend/packages/auth-provider/src/components/LocalLoginPage/ResetPasswordForm.tsx @@ -0,0 +1,77 @@ +import React, { useEffect, useState } from 'react'; +import { Form, TextInput, required, useTranslate, useNotify, useSafeSetState, useAuthProvider } from 'react-admin'; +import { Button, CardContent } from '@mui/material'; +import { SubmitHandler } from 'react-hook-form'; + +interface FormValues { + email: string; +} + +const ResetPasswordForm = () => { + const [handleSubmit, setHandleSubmit] = useState>(() => {}); + + return ( +
+ + + ); +}; + +const FormContent = ({ + setHandleSubmit +}: { + setHandleSubmit: React.Dispatch>>; +}) => { + const [loading, setLoading] = useSafeSetState(false); + const authProvider = useAuthProvider(); + const translate = useTranslate(); + const notify = useNotify(); + + useEffect(() => { + setHandleSubmit(() => async (values: FormValues) => { + setLoading(true); + authProvider + .resetPassword({ ...values }) + .then(() => { + setLoading(false); + notify('auth.notification.reset_password_submitted', { type: 'info' }); + }) + .catch((error: Error) => { + setLoading(false); + notify( + typeof error === 'string' + ? error + : typeof error === 'undefined' || !error.message + ? 'auth.notification.reset_password_error' + : error.message, + { + type: 'warning', + messageArgs: { + _: typeof error === 'string' ? error : error && error.message ? error.message : undefined + } + } + ); + }); + }); + }); + + return ( + + (value ? value.toLowerCase() : '')} + /> + + + ); +}; + +export default ResetPasswordForm; diff --git a/src/frontend/packages/auth-provider/src/messages/english.js b/src/frontend/packages/auth-provider/src/messages/english.js index 7a6615a0c..e5eb94938 100644 --- a/src/frontend/packages/auth-provider/src/messages/english.js +++ b/src/frontend/packages/auth-provider/src/messages/english.js @@ -44,7 +44,8 @@ const englishMessages = { new_password: 'New password', confirm_new_password: 'Confirm new password', password_strength: 'Password strength', - password_too_weak: 'Password too weak. Increase length or add special characters.' + password_too_weak: 'Password too weak. Increase length or add special characters.', + password_mismatch: 'The passwords you provided do not match.' }, helper: { login: 'Sign in to your account', diff --git a/src/frontend/packages/auth-provider/src/messages/french.js b/src/frontend/packages/auth-provider/src/messages/french.js index c1f9f8ee3..7b81acc8a 100644 --- a/src/frontend/packages/auth-provider/src/messages/french.js +++ b/src/frontend/packages/auth-provider/src/messages/french.js @@ -44,7 +44,8 @@ const frenchMessages = { new_password: 'Nouveau mot de passe', confirm_new_password: 'Confirmer le nouveau mot de passe', password_strength: 'Force du mot de passe', - password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.' + password_too_weak: 'Mot de passe trop faible. Augmenter la longueur ou ajouter des caractères spéciaux.', + password_mismatch: 'Mot de passe différent du premier' }, helper: { login: 'Connectez-vous à votre compte.',