@aarhus-university/au-lib-react-components 9.11.5 → 9.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "@aarhus-university/au-lib-react-components",
4
- "version": "9.11.5",
4
+ "version": "9.11.9",
5
5
  "description": "Library for shared React components for various applications on au.dk",
6
6
  "main": "build/cjs/index.js",
7
7
  "scripts": {
@@ -51,6 +51,7 @@ const AUModalComponent = (props) => {
51
51
  }
52
52
  hideModal(domId, sender);
53
53
  }}
54
+ title={lang === 'da' ? 'Luk' : 'Close'}
54
55
  >
55
56
  {lang === 'da' ? 'Luk' : 'Close'}
56
57
  </button>
@@ -76,7 +76,7 @@ const AUProfileMailComponent = ({
76
76
  }];
77
77
 
78
78
  const validationRulesPrivateMail = [{
79
- message: profileLabels[lang].validMail,
79
+ message: profileLabels[lang].validMailPrivate,
80
80
  rule: (fieldValue) => fieldValue.trim().match(emailRegex) && !fieldValue.trim().endsWith(workMailPostfix),
81
81
  }];
82
82
 
@@ -17,7 +17,16 @@ const AUProfileWidgetComponent = React.memo(({
17
17
  const renderSettings = settings.map((s) => {
18
18
  const btnRef = useRef();
19
19
  if (s.type === 'anchor') {
20
- return <a key={s.url} className="sub-nav__item" href={s.url} data-gtm={s.dataGtm}>{s.text}</a>;
20
+ return (
21
+ <a
22
+ key={s.url}
23
+ className={`sub-nav__item ${s.classNames}`}
24
+ href={s.url}
25
+ data-icon={s.icon}
26
+ data-gtm={s.dataGtm}>
27
+ {s.text}
28
+ </a>
29
+ );
21
30
  }
22
31
  return (
23
32
  <button
package/src/lib/i18n.js CHANGED
@@ -143,6 +143,7 @@ const profileLabels = {
143
143
  mailNotice: '<strong>Vær opmærksom på, at der kan gå op til 15 minutter, før ændringer til din e-mailadresse slår igennem.</strong>',
144
144
  cancel: 'Annuller',
145
145
  validMail: 'Mailadressen du har skrevet er ikke gyldig.',
146
+ validMailPrivate: 'Mailadressen du har skrevet er ikke gyldig, eller du har forsøgt at benytte din AU-mailadresse som privat mailadresse.',
146
147
  validMobile: 'Telefonnummeret du har skrevet er ikke gyldigt.',
147
148
  validName: 'Skriv et navn.',
148
149
  validFirstName: 'Skriv et fornavn.',
@@ -203,6 +204,7 @@ const profileLabels = {
203
204
  mailNotice: '<strong>Please note that it may take up to 15 minutes for changes to your email address to take effect.</strong>',
204
205
  cancel: 'Cancel',
205
206
  validMail: 'The email address you have entered is not valid.',
207
+ validMailPrivate: 'The email address you have entered is not valid, or you have tried to use your AU email address as your private email address.',
206
208
  validMobile: 'The phone number you have entered is not valid.',
207
209
  validName: 'Enter a name.',
208
210
  validFirstName: 'Enter a first name.',