@aarhus-university/au-lib-react-components 9.18.0 → 9.18.2
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/.eslintrc +18 -18
- package/README.md +20 -20
- package/babel.config.js +6 -6
- package/build/dev.html +328 -328
- package/build/umd/all.css +2 -2
- package/build/umd/all.js +1 -1
- package/build/umd/alphabox.js +1 -1
- package/build/umd/auAuth.js +1 -1
- package/build/umd/databox.js +2 -2
- package/build/umd/databox.js.LICENSE.txt +5 -5
- package/build/umd/diagramme.js +1 -1
- package/build/umd/flowbox.js +1 -1
- package/build/umd/news.js +1 -1
- package/build/umd/universe.js +1 -1
- package/package.json +60 -60
- package/src/all.js +3 -3
- package/src/app.js +263 -263
- package/src/components/AUAlertComponent.js +158 -158
- package/src/components/AUAmountComponent.js +84 -84
- package/src/components/AUBannerComponent.js +99 -99
- package/src/components/AUCalendarComponent.js +393 -393
- package/src/components/AUCollapsibleComponent.js +173 -173
- package/src/components/AUDatepickerComponent.js +105 -105
- package/src/components/AUDiagrammeComponent.js +310 -310
- package/src/components/AUFilterCheckboxComponent.js +122 -122
- package/src/components/AUFocusComponent.js +55 -55
- package/src/components/AUModalComponent.js +94 -94
- package/src/components/AUPaginationComponent.js +103 -103
- package/src/components/AUSpinnerComponent.js +125 -125
- package/src/components/AutoSuggestComponent.js +157 -157
- package/src/components/alphabox/AlphaBoxComponent.js +145 -145
- package/src/components/alphabox/AlphaBoxContentComponent.js +136 -136
- package/src/components/context/AUUserContextComponent.js +91 -91
- package/src/components/context/ImpersonateComponent.js +54 -54
- package/src/components/databox/DataBoxAlphabetComponent.js +144 -144
- package/src/components/databox/DataBoxAssociationComponent.js +122 -122
- package/src/components/databox/DataBoxButtonComponent.js +153 -153
- package/src/components/databox/DataBoxComponent.js +297 -297
- package/src/components/databox/DataBoxGroupingComponent.js +62 -62
- package/src/components/databox/DataBoxSearchResultComponent.js +40 -40
- package/src/components/databox/DataBoxStackedAssociationComponent.js +58 -58
- package/src/components/databox/DataBoxSuggestionComponent.js +39 -39
- package/src/components/delphinus/AUAlertComponent.js +85 -85
- package/src/components/delphinus/AUCalendarComponent.js +487 -487
- package/src/components/delphinus/AUContentToggleComponent.js +32 -32
- package/src/components/delphinus/AUDatepickerComponent.js +164 -164
- package/src/components/delphinus/AULoginComponent.js +65 -65
- package/src/components/delphinus/AUModalComponent.js +94 -94
- package/src/components/delphinus/AUSpinnerComponent.js +114 -114
- package/src/components/delphinus/AUSubNavComponent.js +53 -53
- package/src/components/delphinus/AUTabbedContentComponent.js +150 -150
- package/src/components/delphinus/AUTableComponent.js +28 -28
- package/src/components/delphinus/AUToastComponent.js +91 -91
- package/src/components/delphinus/AUToolbarComponent.js +48 -48
- package/src/components/delphinus/hooks.js +28 -28
- package/src/components/flowbox/FlowBoxComponent.js +126 -126
- package/src/components/flowbox/FlowBoxPhoneComponent.js +106 -106
- package/src/components/form/AUMobilePrefixComponent.js +18 -18
- package/src/components/form/AUReceiptComponent.js +40 -40
- package/src/components/form/AUSubmitButtonContainerComponent.js +39 -39
- package/src/components/news/EventLayout1Component.js +94 -94
- package/src/components/news/EventLayout2Component.js +90 -90
- package/src/components/news/EventLayout3Component.js +68 -68
- package/src/components/news/NewsCategoriesComponent.js +21 -21
- package/src/components/news/NewsCollageBannerComponent.js +71 -71
- package/src/components/news/NewsCollageBannerRSSComponent.js +79 -79
- package/src/components/news/NewsColumnsComponent.js +125 -125
- package/src/components/news/NewsLanguageChangeComponent.js +74 -74
- package/src/components/news/NewsLayout1Component.js +80 -80
- package/src/components/news/NewsLayout2Component.js +80 -80
- package/src/components/news/NewsLayout3Component.js +81 -81
- package/src/components/news/NewsLayout4Component.js +80 -80
- package/src/components/news/NewsLayout5Component.js +61 -61
- package/src/components/news/NewsLayout6Component.js +55 -55
- package/src/components/news/NewsLayout7Component.js +58 -58
- package/src/components/news/NewsLayout8Component.js +57 -57
- package/src/components/news/NewsListComponent.js +291 -291
- package/src/components/news/NewsPopUpComponent.js +591 -591
- package/src/components/news/NewsRSSComponent.js +74 -74
- package/src/components/news/NewsSocialComponent.js +104 -104
- package/src/components/news/NewsSubHeaderComponent.js +19 -19
- package/src/components/password/AUChangePasswordComponent.js +189 -189
- package/src/components/password/AUCurrentPasswordComponent.js +72 -72
- package/src/components/password/AUNewPasswordComponent.js +151 -151
- package/src/components/password/AUPasswordActions.js +101 -101
- package/src/components/password/AUPasswordHooks.js +47 -47
- package/src/components/password/AUPasswordReducer.js +78 -78
- package/src/components/password/AUPasswordRequirementsComponent.js +29 -29
- package/src/components/profile/AUProfileActions.js +128 -128
- package/src/components/profile/AUProfileAvatar2016Component.js +99 -99
- package/src/components/profile/AUProfileAvatarComponent.js +83 -83
- package/src/components/profile/AUProfileAvatarV2Component.js +91 -91
- package/src/components/profile/AUProfileAvatarV3Component.js +80 -80
- package/src/components/profile/AUProfileContainerComponent.js +283 -283
- package/src/components/profile/AUProfileHooks.js +30 -30
- package/src/components/profile/AUProfileItemComponent.js +54 -54
- package/src/components/profile/AUProfileLanguageComponent.js +131 -131
- package/src/components/profile/AUProfileLoginComponent.js +41 -41
- package/src/components/profile/AUProfileMailComponent.js +307 -307
- package/src/components/profile/AUProfileMobileComponent.js +164 -164
- package/src/components/profile/AUProfileNameComponent.js +253 -253
- package/src/components/profile/AUProfileNextOfKinComponent.js +216 -216
- package/src/components/profile/AUProfileReducer.js +230 -230
- package/src/components/profile/AUProfileWidgetComponent.js +95 -95
- package/src/components/profile/AUProfileWidgetV2Component.js +116 -116
- package/src/components/profile/AUProfileWidgetV3Component.js +130 -130
- package/src/components/universe/StaffTopComponent.js +366 -366
- package/src/components/universe/StudentTopComponent.js +137 -137
- package/src/components/universe/UniverseContainerComponent.js +62 -62
- package/src/components/wrapping/AUEmbedComponent.js +47 -47
- package/src/config/webpack.dev.config.js +47 -47
- package/src/config/webpack.umd.config.js +86 -86
- package/src/index.js +6 -6
- package/src/lib/au-alphabox.js +102 -102
- package/src/lib/au-auth.js +227 -227
- package/src/lib/au-databox.js +403 -403
- package/src/lib/au-diagramme.js +87 -87
- package/src/lib/au-flowbox.js +95 -95
- package/src/lib/au-news.js +371 -371
- package/src/lib/helpers.js +222 -222
- package/src/lib/i18n.js +605 -605
- package/src/lib/menu.js +10 -10
- package/src/lib/tracking.js +65 -65
- package/src/lib/universe.js +9 -9
- package/src/lib/urlHandler.js +63 -63
- package/src/lib/validation.js +219 -219
- package/src/lib/wrapping.js +16 -16
- package/src/styles/_settings.scss +10 -10
- package/src/styles/alert.scss +39 -39
- package/src/styles/alphabox.scss +222 -222
- package/src/styles/app.scss +13 -13
- package/src/styles/autosuggest.scss +57 -57
- package/src/styles/calendar.scss +111 -111
- package/src/styles/databox.scss +563 -563
- package/src/styles/diagramme.scss +119 -119
- package/src/styles/filtercheckbox.scss +4 -4
- package/src/styles/flowbox.scss +72 -72
- package/src/styles/maps.scss +395 -395
- package/src/styles/modal.scss +34 -34
- package/src/styles/pagination.scss +10 -10
- package/src/styles/spinner.scss +30 -30
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { profileLabels } from '../../lib/i18n';
|
|
4
|
-
|
|
5
|
-
const AUSubmitButtonContainerComponent = ({
|
|
6
|
-
lang,
|
|
7
|
-
disabled,
|
|
8
|
-
onSubmit,
|
|
9
|
-
onCancel,
|
|
10
|
-
}) => (
|
|
11
|
-
<div className="submit button-container">
|
|
12
|
-
<button
|
|
13
|
-
type="submit"
|
|
14
|
-
className={`button${disabled ? ' button--processing' : ''}`}
|
|
15
|
-
disabled={disabled}
|
|
16
|
-
onClick={onSubmit}
|
|
17
|
-
>
|
|
18
|
-
{profileLabels[lang].save}
|
|
19
|
-
</button>
|
|
20
|
-
<button
|
|
21
|
-
type="button"
|
|
22
|
-
className="button button--text"
|
|
23
|
-
disabled={disabled}
|
|
24
|
-
onClick={onCancel}
|
|
25
|
-
>
|
|
26
|
-
{profileLabels[lang].cancel}
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
AUSubmitButtonContainerComponent.propTypes = {
|
|
32
|
-
lang: PropTypes.string.isRequired,
|
|
33
|
-
disabled: PropTypes.bool.isRequired,
|
|
34
|
-
onSubmit: PropTypes.func.isRequired,
|
|
35
|
-
onCancel: PropTypes.func.isRequired,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
AUSubmitButtonContainerComponent.displayName = 'AUSubmitButtonContainerComponent';
|
|
39
|
-
export default AUSubmitButtonContainerComponent;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { profileLabels } from '../../lib/i18n';
|
|
4
|
+
|
|
5
|
+
const AUSubmitButtonContainerComponent = ({
|
|
6
|
+
lang,
|
|
7
|
+
disabled,
|
|
8
|
+
onSubmit,
|
|
9
|
+
onCancel,
|
|
10
|
+
}) => (
|
|
11
|
+
<div className="submit button-container">
|
|
12
|
+
<button
|
|
13
|
+
type="submit"
|
|
14
|
+
className={`button${disabled ? ' button--processing' : ''}`}
|
|
15
|
+
disabled={disabled}
|
|
16
|
+
onClick={onSubmit}
|
|
17
|
+
>
|
|
18
|
+
{profileLabels[lang].save}
|
|
19
|
+
</button>
|
|
20
|
+
<button
|
|
21
|
+
type="button"
|
|
22
|
+
className="button button--text"
|
|
23
|
+
disabled={disabled}
|
|
24
|
+
onClick={onCancel}
|
|
25
|
+
>
|
|
26
|
+
{profileLabels[lang].cancel}
|
|
27
|
+
</button>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
AUSubmitButtonContainerComponent.propTypes = {
|
|
32
|
+
lang: PropTypes.string.isRequired,
|
|
33
|
+
disabled: PropTypes.bool.isRequired,
|
|
34
|
+
onSubmit: PropTypes.func.isRequired,
|
|
35
|
+
onCancel: PropTypes.func.isRequired,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
AUSubmitButtonContainerComponent.displayName = 'AUSubmitButtonContainerComponent';
|
|
39
|
+
export default AUSubmitButtonContainerComponent;
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
/* eslint jsx-a11y/control-has-associated-label: 0 */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import NewsSubHeaderComponent from './NewsSubHeaderComponent';
|
|
5
|
-
import { newsLabels as labels } from '../../lib/i18n';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const EventLayout1Component = (props) => {
|
|
9
|
-
const {
|
|
10
|
-
item,
|
|
11
|
-
listid,
|
|
12
|
-
setPopupItem,
|
|
13
|
-
lang,
|
|
14
|
-
} = props;
|
|
15
|
-
if (!item) {
|
|
16
|
-
return <div />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
20
|
-
|
|
21
|
-
const domID = `news-${listid}-${i.id}`;
|
|
22
|
-
const {
|
|
23
|
-
fromDate,
|
|
24
|
-
toDate,
|
|
25
|
-
fromDateSplit,
|
|
26
|
-
toDateSplit,
|
|
27
|
-
} = AUNewsHelpers.getEventDates(i, lang);
|
|
28
|
-
const multipleDates = fromDate.getTime() !== toDate.getTime();
|
|
29
|
-
const showYear = i.showyear === '1'; // Oh ffs...
|
|
30
|
-
const className = `au_news_eventlist1-calendar ${(multipleDates ? 'multiple' : 'single')}`;
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<div id={domID} className="au_news-eventlist1-item">
|
|
34
|
-
<div className={className}>
|
|
35
|
-
<span className="au_news_events_weekday">
|
|
36
|
-
{labels[lang].news.weekdaysShort[fromDate.getDay()]}
|
|
37
|
-
</span>
|
|
38
|
-
<span className="au_news_events_date">
|
|
39
|
-
{fromDateSplit[lang === 'da' ? 0 : 2]}
|
|
40
|
-
</span>
|
|
41
|
-
<span className="au_news_events_month">
|
|
42
|
-
{labels[lang].news.monthsShort[fromDate.getMonth()] + (showYear ? (` ${(`${fromDate.getFullYear()}`).substring(2)}`) : '')}
|
|
43
|
-
</span>
|
|
44
|
-
<span className="au_news_events_weekday_end multiple">
|
|
45
|
-
{labels[lang].news.weekdaysShort[toDate.getDay()]}
|
|
46
|
-
</span>
|
|
47
|
-
<span className="au_news_events_date_end multiple">
|
|
48
|
-
{toDateSplit[lang === 'da' ? 0 : 2]}
|
|
49
|
-
</span>
|
|
50
|
-
<span className="au_news_events_month_end multiple">
|
|
51
|
-
{labels[lang].news.monthsShort[toDate.getMonth()] + (showYear ? (` ${(`${toDate.getFullYear()}`).substring(2)}`) : '')}
|
|
52
|
-
</span>
|
|
53
|
-
</div>
|
|
54
|
-
<div className="au_news_eventlist1-text">
|
|
55
|
-
<p>
|
|
56
|
-
<span className="au_news_events_time">
|
|
57
|
-
{`${(multipleDates ? `${i.event_from.date} ` : '')} ${`${i.event_from.time} `} ${(multipleDates ? `${i.event_to.date} ` : '')} ${i.event_to.time}`}
|
|
58
|
-
</span>
|
|
59
|
-
{' | '}
|
|
60
|
-
<span className="au_news_events_place">
|
|
61
|
-
{i.event_where}
|
|
62
|
-
</span>
|
|
63
|
-
<br />
|
|
64
|
-
<a
|
|
65
|
-
onClick={() => {
|
|
66
|
-
if (!i.external) {
|
|
67
|
-
setPopupItem(props.item);
|
|
68
|
-
}
|
|
69
|
-
}}
|
|
70
|
-
href={i.url}
|
|
71
|
-
title={i.header}
|
|
72
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
73
|
-
/>
|
|
74
|
-
</p>
|
|
75
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
76
|
-
</div>
|
|
77
|
-
<div className="au_news_clear" />
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
EventLayout1Component.propTypes = {
|
|
83
|
-
lang: PropTypes.string.isRequired,
|
|
84
|
-
item: PropTypes.shape({
|
|
85
|
-
id: PropTypes.number.isRequired,
|
|
86
|
-
url: PropTypes.string.isRequired,
|
|
87
|
-
header: PropTypes.string.isRequired,
|
|
88
|
-
}).isRequired,
|
|
89
|
-
listid: PropTypes.number.isRequired,
|
|
90
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
EventLayout1Component.displayName = 'EventLayout1Component';
|
|
94
|
-
export default EventLayout1Component;
|
|
1
|
+
/* eslint jsx-a11y/control-has-associated-label: 0 */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import NewsSubHeaderComponent from './NewsSubHeaderComponent';
|
|
5
|
+
import { newsLabels as labels } from '../../lib/i18n';
|
|
6
|
+
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
+
|
|
8
|
+
const EventLayout1Component = (props) => {
|
|
9
|
+
const {
|
|
10
|
+
item,
|
|
11
|
+
listid,
|
|
12
|
+
setPopupItem,
|
|
13
|
+
lang,
|
|
14
|
+
} = props;
|
|
15
|
+
if (!item) {
|
|
16
|
+
return <div />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const i = AUNewsHelpers.setExternal(item);
|
|
20
|
+
|
|
21
|
+
const domID = `news-${listid}-${i.id}`;
|
|
22
|
+
const {
|
|
23
|
+
fromDate,
|
|
24
|
+
toDate,
|
|
25
|
+
fromDateSplit,
|
|
26
|
+
toDateSplit,
|
|
27
|
+
} = AUNewsHelpers.getEventDates(i, lang);
|
|
28
|
+
const multipleDates = fromDate.getTime() !== toDate.getTime();
|
|
29
|
+
const showYear = i.showyear === '1'; // Oh ffs...
|
|
30
|
+
const className = `au_news_eventlist1-calendar ${(multipleDates ? 'multiple' : 'single')}`;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div id={domID} className="au_news-eventlist1-item">
|
|
34
|
+
<div className={className}>
|
|
35
|
+
<span className="au_news_events_weekday">
|
|
36
|
+
{labels[lang].news.weekdaysShort[fromDate.getDay()]}
|
|
37
|
+
</span>
|
|
38
|
+
<span className="au_news_events_date">
|
|
39
|
+
{fromDateSplit[lang === 'da' ? 0 : 2]}
|
|
40
|
+
</span>
|
|
41
|
+
<span className="au_news_events_month">
|
|
42
|
+
{labels[lang].news.monthsShort[fromDate.getMonth()] + (showYear ? (` ${(`${fromDate.getFullYear()}`).substring(2)}`) : '')}
|
|
43
|
+
</span>
|
|
44
|
+
<span className="au_news_events_weekday_end multiple">
|
|
45
|
+
{labels[lang].news.weekdaysShort[toDate.getDay()]}
|
|
46
|
+
</span>
|
|
47
|
+
<span className="au_news_events_date_end multiple">
|
|
48
|
+
{toDateSplit[lang === 'da' ? 0 : 2]}
|
|
49
|
+
</span>
|
|
50
|
+
<span className="au_news_events_month_end multiple">
|
|
51
|
+
{labels[lang].news.monthsShort[toDate.getMonth()] + (showYear ? (` ${(`${toDate.getFullYear()}`).substring(2)}`) : '')}
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
<div className="au_news_eventlist1-text">
|
|
55
|
+
<p>
|
|
56
|
+
<span className="au_news_events_time">
|
|
57
|
+
{`${(multipleDates ? `${i.event_from.date} ` : '')} ${`${i.event_from.time} `} ${(multipleDates ? `${i.event_to.date} ` : '')} ${i.event_to.time}`}
|
|
58
|
+
</span>
|
|
59
|
+
{' | '}
|
|
60
|
+
<span className="au_news_events_place">
|
|
61
|
+
{i.event_where}
|
|
62
|
+
</span>
|
|
63
|
+
<br />
|
|
64
|
+
<a
|
|
65
|
+
onClick={() => {
|
|
66
|
+
if (!i.external) {
|
|
67
|
+
setPopupItem(props.item);
|
|
68
|
+
}
|
|
69
|
+
}}
|
|
70
|
+
href={i.url}
|
|
71
|
+
title={i.header}
|
|
72
|
+
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
73
|
+
/>
|
|
74
|
+
</p>
|
|
75
|
+
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
76
|
+
</div>
|
|
77
|
+
<div className="au_news_clear" />
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
EventLayout1Component.propTypes = {
|
|
83
|
+
lang: PropTypes.string.isRequired,
|
|
84
|
+
item: PropTypes.shape({
|
|
85
|
+
id: PropTypes.number.isRequired,
|
|
86
|
+
url: PropTypes.string.isRequired,
|
|
87
|
+
header: PropTypes.string.isRequired,
|
|
88
|
+
}).isRequired,
|
|
89
|
+
listid: PropTypes.number.isRequired,
|
|
90
|
+
setPopupItem: PropTypes.func.isRequired,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
EventLayout1Component.displayName = 'EventLayout1Component';
|
|
94
|
+
export default EventLayout1Component;
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
/* eslint jsx-a11y/control-has-associated-label: 0 */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import NewsSubHeaderComponent from './NewsSubHeaderComponent';
|
|
5
|
-
import { newsLabels as labels } from '../../lib/i18n';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const EventLayout2Component = (props) => {
|
|
9
|
-
const {
|
|
10
|
-
item,
|
|
11
|
-
listid,
|
|
12
|
-
setPopupItem,
|
|
13
|
-
lang,
|
|
14
|
-
} = props;
|
|
15
|
-
if (!item) {
|
|
16
|
-
return <div />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
20
|
-
|
|
21
|
-
const domID = `news-${listid}-${i.id}`;
|
|
22
|
-
const { fromDate, toDate, fromDateSplit } = AUNewsHelpers.getEventDates(i, lang);
|
|
23
|
-
const multipleDates = fromDate.getTime() !== toDate.getTime();
|
|
24
|
-
const showYear = i.showyear === '1';
|
|
25
|
-
const classNameOuter = `au_news-eventlist2-item ${(i.featured ? 'au_event-featured' : '')}`;
|
|
26
|
-
const classNameInner = `au_news_eventlist2-calendar ${(multipleDates ? 'multiple' : 'single') + (showYear ? ' show-year' : '')}`;
|
|
27
|
-
const style = i.image.list === '' ? {} : {
|
|
28
|
-
backgroundImage: `url('${i.image.list}')`,
|
|
29
|
-
backgroundPosition: 'top center',
|
|
30
|
-
backgroundRepeat: 'no-repeat',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div id={domID} className={classNameOuter}>
|
|
35
|
-
<div className="au_padding">
|
|
36
|
-
<div className={classNameInner} style={style}>
|
|
37
|
-
<span className="au_news_events_weekday">
|
|
38
|
-
{labels[lang].news.weekdaysShort[fromDate.getDay()]}
|
|
39
|
-
</span>
|
|
40
|
-
<span className="au_news_events_date">
|
|
41
|
-
{fromDateSplit[lang === 'da' ? 0 : 2]}
|
|
42
|
-
</span>
|
|
43
|
-
<span className="au_news_events_month">
|
|
44
|
-
{labels[lang].news.monthsShort[fromDate.getMonth()] + (showYear ? (` ${(`${fromDate.getFullYear()}`).substring(2)}`) : '')}
|
|
45
|
-
</span>
|
|
46
|
-
</div>
|
|
47
|
-
<div className="au_news_eventlist2-text">
|
|
48
|
-
<h2>
|
|
49
|
-
<a
|
|
50
|
-
onClick={() => {
|
|
51
|
-
if (!i.external) {
|
|
52
|
-
setPopupItem(props.item);
|
|
53
|
-
}
|
|
54
|
-
}}
|
|
55
|
-
href={i.url}
|
|
56
|
-
title={i.header}
|
|
57
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
58
|
-
/>
|
|
59
|
-
</h2>
|
|
60
|
-
<div>
|
|
61
|
-
<span className="au_news_events_time">
|
|
62
|
-
{`${(multipleDates ? `${i.event_from.date} ` : '')} ${`${i.event_from.time} `} ${(multipleDates ? `${i.event_to.date} ` : '')} ${i.event_to.time}`}
|
|
63
|
-
</span>
|
|
64
|
-
{' | '}
|
|
65
|
-
<span className="au_news_events_place">
|
|
66
|
-
{i.event_where}
|
|
67
|
-
</span>
|
|
68
|
-
<br />
|
|
69
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
<div className="au_news_clear" />
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
EventLayout2Component.propTypes = {
|
|
79
|
-
lang: PropTypes.string.isRequired,
|
|
80
|
-
item: PropTypes.shape({
|
|
81
|
-
id: PropTypes.number.isRequired,
|
|
82
|
-
url: PropTypes.string.isRequired,
|
|
83
|
-
header: PropTypes.string.isRequired,
|
|
84
|
-
}).isRequired,
|
|
85
|
-
listid: PropTypes.number.isRequired,
|
|
86
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
EventLayout2Component.displayName = 'EventLayout2Component';
|
|
90
|
-
export default EventLayout2Component;
|
|
1
|
+
/* eslint jsx-a11y/control-has-associated-label: 0 */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import NewsSubHeaderComponent from './NewsSubHeaderComponent';
|
|
5
|
+
import { newsLabels as labels } from '../../lib/i18n';
|
|
6
|
+
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
+
|
|
8
|
+
const EventLayout2Component = (props) => {
|
|
9
|
+
const {
|
|
10
|
+
item,
|
|
11
|
+
listid,
|
|
12
|
+
setPopupItem,
|
|
13
|
+
lang,
|
|
14
|
+
} = props;
|
|
15
|
+
if (!item) {
|
|
16
|
+
return <div />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const i = AUNewsHelpers.setExternal(item);
|
|
20
|
+
|
|
21
|
+
const domID = `news-${listid}-${i.id}`;
|
|
22
|
+
const { fromDate, toDate, fromDateSplit } = AUNewsHelpers.getEventDates(i, lang);
|
|
23
|
+
const multipleDates = fromDate.getTime() !== toDate.getTime();
|
|
24
|
+
const showYear = i.showyear === '1';
|
|
25
|
+
const classNameOuter = `au_news-eventlist2-item ${(i.featured ? 'au_event-featured' : '')}`;
|
|
26
|
+
const classNameInner = `au_news_eventlist2-calendar ${(multipleDates ? 'multiple' : 'single') + (showYear ? ' show-year' : '')}`;
|
|
27
|
+
const style = i.image.list === '' ? {} : {
|
|
28
|
+
backgroundImage: `url('${i.image.list}')`,
|
|
29
|
+
backgroundPosition: 'top center',
|
|
30
|
+
backgroundRepeat: 'no-repeat',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div id={domID} className={classNameOuter}>
|
|
35
|
+
<div className="au_padding">
|
|
36
|
+
<div className={classNameInner} style={style}>
|
|
37
|
+
<span className="au_news_events_weekday">
|
|
38
|
+
{labels[lang].news.weekdaysShort[fromDate.getDay()]}
|
|
39
|
+
</span>
|
|
40
|
+
<span className="au_news_events_date">
|
|
41
|
+
{fromDateSplit[lang === 'da' ? 0 : 2]}
|
|
42
|
+
</span>
|
|
43
|
+
<span className="au_news_events_month">
|
|
44
|
+
{labels[lang].news.monthsShort[fromDate.getMonth()] + (showYear ? (` ${(`${fromDate.getFullYear()}`).substring(2)}`) : '')}
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div className="au_news_eventlist2-text">
|
|
48
|
+
<h2>
|
|
49
|
+
<a
|
|
50
|
+
onClick={() => {
|
|
51
|
+
if (!i.external) {
|
|
52
|
+
setPopupItem(props.item);
|
|
53
|
+
}
|
|
54
|
+
}}
|
|
55
|
+
href={i.url}
|
|
56
|
+
title={i.header}
|
|
57
|
+
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
58
|
+
/>
|
|
59
|
+
</h2>
|
|
60
|
+
<div>
|
|
61
|
+
<span className="au_news_events_time">
|
|
62
|
+
{`${(multipleDates ? `${i.event_from.date} ` : '')} ${`${i.event_from.time} `} ${(multipleDates ? `${i.event_to.date} ` : '')} ${i.event_to.time}`}
|
|
63
|
+
</span>
|
|
64
|
+
{' | '}
|
|
65
|
+
<span className="au_news_events_place">
|
|
66
|
+
{i.event_where}
|
|
67
|
+
</span>
|
|
68
|
+
<br />
|
|
69
|
+
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div className="au_news_clear" />
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
EventLayout2Component.propTypes = {
|
|
79
|
+
lang: PropTypes.string.isRequired,
|
|
80
|
+
item: PropTypes.shape({
|
|
81
|
+
id: PropTypes.number.isRequired,
|
|
82
|
+
url: PropTypes.string.isRequired,
|
|
83
|
+
header: PropTypes.string.isRequired,
|
|
84
|
+
}).isRequired,
|
|
85
|
+
listid: PropTypes.number.isRequired,
|
|
86
|
+
setPopupItem: PropTypes.func.isRequired,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
EventLayout2Component.displayName = 'EventLayout2Component';
|
|
90
|
+
export default EventLayout2Component;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
/* eslint jsx-a11y/control-has-associated-label: 0 */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
5
|
-
|
|
6
|
-
const EventLayout3Component = (props) => {
|
|
7
|
-
const {
|
|
8
|
-
items,
|
|
9
|
-
listid,
|
|
10
|
-
setPopupItem,
|
|
11
|
-
lang,
|
|
12
|
-
} = props;
|
|
13
|
-
const renderItems = items.map((_i, j) => {
|
|
14
|
-
let i = _i;
|
|
15
|
-
const key = j;
|
|
16
|
-
if (i) {
|
|
17
|
-
i = AUNewsHelpers.setExternal(i);
|
|
18
|
-
const { fromDate, toDate } = AUNewsHelpers.getEventDates(i, lang);
|
|
19
|
-
const multipleDates = fromDate.getTime() !== toDate.getTime();
|
|
20
|
-
const domID = `news-${listid}-${i.id}`;
|
|
21
|
-
return (
|
|
22
|
-
<li
|
|
23
|
-
key={key}
|
|
24
|
-
id={domID}
|
|
25
|
-
>
|
|
26
|
-
<a
|
|
27
|
-
onClick={() => {
|
|
28
|
-
if (!i.external) {
|
|
29
|
-
setPopupItem(i);
|
|
30
|
-
}
|
|
31
|
-
}}
|
|
32
|
-
href={i.url}
|
|
33
|
-
title={i.header}
|
|
34
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
35
|
-
/>
|
|
36
|
-
{' ('}
|
|
37
|
-
<span className="au_news_events_time">
|
|
38
|
-
{`${i.event_from.date} ${i.event_from.time} - ${(multipleDates ? `${i.event_to.date} ` : '')} ${i.event_to.time}`}
|
|
39
|
-
</span>
|
|
40
|
-
{`, ${i.event_where}) `}
|
|
41
|
-
</li>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<div className="au_news-header-list">
|
|
49
|
-
<ul>
|
|
50
|
-
{renderItems}
|
|
51
|
-
</ul>
|
|
52
|
-
</div>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
EventLayout3Component.propTypes = {
|
|
57
|
-
lang: PropTypes.string.isRequired,
|
|
58
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
|
59
|
-
id: PropTypes.number.isRequired,
|
|
60
|
-
url: PropTypes.string.isRequired,
|
|
61
|
-
header: PropTypes.string.isRequired,
|
|
62
|
-
})).isRequired,
|
|
63
|
-
listid: PropTypes.number.isRequired,
|
|
64
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
EventLayout3Component.displayName = 'EventLayout3Component';
|
|
68
|
-
export default EventLayout3Component;
|
|
1
|
+
/* eslint jsx-a11y/control-has-associated-label: 0 */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { AUNewsHelpers } from '../../lib/au-news';
|
|
5
|
+
|
|
6
|
+
const EventLayout3Component = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
items,
|
|
9
|
+
listid,
|
|
10
|
+
setPopupItem,
|
|
11
|
+
lang,
|
|
12
|
+
} = props;
|
|
13
|
+
const renderItems = items.map((_i, j) => {
|
|
14
|
+
let i = _i;
|
|
15
|
+
const key = j;
|
|
16
|
+
if (i) {
|
|
17
|
+
i = AUNewsHelpers.setExternal(i);
|
|
18
|
+
const { fromDate, toDate } = AUNewsHelpers.getEventDates(i, lang);
|
|
19
|
+
const multipleDates = fromDate.getTime() !== toDate.getTime();
|
|
20
|
+
const domID = `news-${listid}-${i.id}`;
|
|
21
|
+
return (
|
|
22
|
+
<li
|
|
23
|
+
key={key}
|
|
24
|
+
id={domID}
|
|
25
|
+
>
|
|
26
|
+
<a
|
|
27
|
+
onClick={() => {
|
|
28
|
+
if (!i.external) {
|
|
29
|
+
setPopupItem(i);
|
|
30
|
+
}
|
|
31
|
+
}}
|
|
32
|
+
href={i.url}
|
|
33
|
+
title={i.header}
|
|
34
|
+
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
35
|
+
/>
|
|
36
|
+
{' ('}
|
|
37
|
+
<span className="au_news_events_time">
|
|
38
|
+
{`${i.event_from.date} ${i.event_from.time} - ${(multipleDates ? `${i.event_to.date} ` : '')} ${i.event_to.time}`}
|
|
39
|
+
</span>
|
|
40
|
+
{`, ${i.event_where}) `}
|
|
41
|
+
</li>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div className="au_news-header-list">
|
|
49
|
+
<ul>
|
|
50
|
+
{renderItems}
|
|
51
|
+
</ul>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
EventLayout3Component.propTypes = {
|
|
57
|
+
lang: PropTypes.string.isRequired,
|
|
58
|
+
items: PropTypes.arrayOf(PropTypes.shape({
|
|
59
|
+
id: PropTypes.number.isRequired,
|
|
60
|
+
url: PropTypes.string.isRequired,
|
|
61
|
+
header: PropTypes.string.isRequired,
|
|
62
|
+
})).isRequired,
|
|
63
|
+
listid: PropTypes.number.isRequired,
|
|
64
|
+
setPopupItem: PropTypes.func.isRequired,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
EventLayout3Component.displayName = 'EventLayout3Component';
|
|
68
|
+
export default EventLayout3Component;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
const NewsCategoriesComponent = (props) => {
|
|
5
|
-
const { categories } = props;
|
|
6
|
-
const renderCategories = categories.slice(0, 1).map((cat, i) => {
|
|
7
|
-
const key = i;
|
|
8
|
-
return <span key={key}>{(i > 0 ? ', ' : '') + cat.category}</span>;
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
return <span className="au_news-list-news-category">{renderCategories}</span>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
NewsCategoriesComponent.propTypes = {
|
|
15
|
-
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
16
|
-
category: PropTypes.string.isRequired,
|
|
17
|
-
})).isRequired,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
NewsCategoriesComponent.displayName = 'NewsCategoriesComponent';
|
|
21
|
-
export default NewsCategoriesComponent;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const NewsCategoriesComponent = (props) => {
|
|
5
|
+
const { categories } = props;
|
|
6
|
+
const renderCategories = categories.slice(0, 1).map((cat, i) => {
|
|
7
|
+
const key = i;
|
|
8
|
+
return <span key={key}>{(i > 0 ? ', ' : '') + cat.category}</span>;
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
return <span className="au_news-list-news-category">{renderCategories}</span>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
NewsCategoriesComponent.propTypes = {
|
|
15
|
+
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
16
|
+
category: PropTypes.string.isRequired,
|
|
17
|
+
})).isRequired,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
NewsCategoriesComponent.displayName = 'NewsCategoriesComponent';
|
|
21
|
+
export default NewsCategoriesComponent;
|