@aarhus-university/au-lib-react-components 8.20.1 → 8.81.0
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.js +44 -0
- package/README.md +19 -20
- package/babel.config.js +7 -0
- package/build/umd/all.css +1 -2
- package/build/umd/all.css.map +1 -1
- package/build/umd/all.js +1 -1
- package/build/umd/all.js.map +1 -1
- package/build/umd/alphabox.js +1 -1
- package/build/umd/alphabox.js.map +1 -1
- package/build/umd/databox.js +1 -6
- package/build/umd/databox.js.map +1 -1
- package/build/umd/diagramme.js +1 -1
- package/build/umd/diagramme.js.map +1 -1
- package/build/umd/flowbox.js +1 -1
- package/build/umd/flowbox.js.map +1 -1
- package/build/umd/universe.js +1 -1
- package/build/umd/universe.js.map +1 -1
- package/package.json +66 -65
- package/src/components/AUAlertComponent.tsx +70 -0
- package/src/components/{AutoSuggestComponent.js → AUAutoSuggestComponent.js} +45 -19
- package/src/components/AUCalendarComponent.tsx +493 -0
- package/src/components/AUContentToggleComponent.tsx +33 -0
- package/src/components/AUDatepickerComponent.tsx +117 -0
- package/src/components/AUMobilePrefixComponent.tsx +15 -0
- package/src/components/{delphinus/AUModalComponent.js → AUModalComponent.tsx} +78 -76
- package/src/components/{form/AUReceiptComponent.js → AUReceiptComponent.tsx} +33 -40
- package/src/components/AUSpinnerComponent.tsx +64 -0
- package/src/components/{delphinus/AUSubNavComponent.js → AUSubNavComponent.tsx} +38 -53
- package/src/components/{form/AUSubmitButtonContainerComponent.js → AUSubmitButtonContainerComponent.tsx} +31 -39
- package/src/components/AUTabbedContentComponent.tsx +145 -0
- package/src/components/{delphinus/AUTableComponent.js → AUTableComponent.tsx} +24 -28
- package/src/components/{delphinus/AUToastComponent.js → AUToastComponent.tsx} +104 -91
- package/src/components/{delphinus/AUToolbarComponent.js → AUToolbarComponent.tsx} +45 -48
- package/src/components/profile/AUProfileActions.js +128 -113
- package/src/components/profile/AUProfileAvatarComponent.js +83 -83
- package/src/components/profile/AUProfileAvatarV2Component.js +91 -0
- package/src/components/profile/AUProfileAvatarV3Component.tsx +42 -0
- package/src/components/profile/AUProfileContainerComponent.js +283 -285
- 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 +0 -2
- package/src/components/profile/AUProfileMailComponent.js +307 -299
- 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 -210
- package/src/components/profile/AUProfileWidgetComponent.js +95 -95
- package/src/components/profile/AUProfileWidgetV2Component.js +116 -0
- package/src/components/profile/AUProfileWidgetV3Component.tsx +118 -0
- package/src/components/wrapping/AUEmbedComponent.js +47 -47
- package/src/{components → layout-2016/components}/alphabox/AlphaBoxComponent.js +29 -28
- package/src/{components → layout-2016/components}/alphabox/AlphaBoxContentComponent.js +25 -14
- package/src/{components → layout-2016/components/common}/AUCollapsibleComponent.js +1 -22
- package/src/{components → layout-2016/components/common}/AUSpinnerComponent.js +2 -24
- package/src/{components → layout-2016/components}/databox/DataBoxAlphabetComponent.js +1 -1
- package/src/{components → layout-2016/components}/databox/DataBoxAssociationComponent.js +2 -2
- package/src/{components → layout-2016/components}/databox/DataBoxButtonComponent.js +7 -3
- package/src/{components → layout-2016/components}/databox/DataBoxComponent.js +2 -2
- package/src/{components → layout-2016/components}/databox/DataBoxGroupingComponent.js +2 -0
- package/src/{components → layout-2016/components}/databox/DataBoxSearchResultComponent.js +1 -5
- package/src/{components → layout-2016/components}/databox/DataBoxStackedAssociationComponent.js +1 -5
- package/src/{components → layout-2016/components}/databox/DataBoxSuggestionComponent.js +0 -0
- package/src/{components → layout-2016/components/diagramme}/AUDiagrammeComponent.js +5 -6
- package/src/{components → layout-2016/components}/flowbox/FlowBoxComponent.js +8 -8
- package/src/{components → layout-2016/components}/flowbox/FlowBoxPhoneComponent.js +3 -5
- package/src/{components → layout-2016/components}/profile/AUProfileAvatar2016Component.js +6 -2
- package/src/{components → layout-2016/components}/universe/StaffTopComponent.js +4 -3
- package/src/{components → layout-2016/components}/universe/StudentTopComponent.js +0 -0
- package/src/{components → layout-2016/components}/universe/UniverseContainerComponent.js +11 -8
- package/src/layout-2016/lib/all.js +3 -0
- package/src/{lib → layout-2016/lib}/au-alphabox.js +1 -3
- package/src/{lib → layout-2016/lib}/au-databox.js +6 -9
- package/src/{lib → layout-2016/lib}/au-diagramme.js +2 -4
- package/src/{lib → layout-2016/lib}/au-flowbox.js +1 -3
- package/src/{lib → layout-2016/lib}/universe.js +0 -0
- package/src/lib/{helpers.js → helpers.ts} +41 -66
- package/src/{components/delphinus/hooks.js → lib/hooks.ts} +33 -26
- package/src/lib/{i18n.js → i18n.ts} +600 -595
- package/src/lib/tracking.ts +69 -0
- package/src/lib/{wrapping.js → wrapping.ts} +21 -16
- package/src/styles/_settings.scss +11 -11
- package/src/styles/alphabox.scss +222 -209
- package/src/styles/app.scss +7 -12
- package/src/styles/autosuggest.scss +57 -57
- package/src/styles/databox.scss +563 -563
- package/src/styles/diagramme.scss +119 -119
- package/src/styles/flowbox.scss +72 -72
- package/src/styles/maps.scss +396 -0
- package/tsconfig.json +47 -0
- package/types/common/interfaces.d.ts +83 -0
- package/types/common/main.d.ts +4 -0
- package/types/common/package.json +5 -0
- package/types/common/payloads.d.ts +0 -0
- package/types/common/props.d.ts +158 -0
- package/webpack.config.js +89 -0
- package/.eslintrc +0 -19
- package/DOCUMENTATION.md +0 -369
- package/build/cjs/auAuth.js +0 -2
- package/build/cjs/auAuth.js.map +0 -1
- package/build/dev.html +0 -329
- package/build/umd/auAuth.js +0 -2
- package/build/umd/auAuth.js.map +0 -1
- package/build/umd/news.js +0 -2
- package/build/umd/news.js.map +0 -1
- package/src/all.js +0 -3
- package/src/app.js +0 -263
- package/src/components/AUAlertComponent.js +0 -158
- package/src/components/AUAmountComponent.js +0 -84
- package/src/components/AUBannerComponent.js +0 -99
- package/src/components/AUCalendarComponent.js +0 -393
- package/src/components/AUDatepickerComponent.js +0 -105
- package/src/components/AUFilterCheckboxComponent.js +0 -122
- package/src/components/AUFocusComponent.js +0 -55
- package/src/components/AUModalComponent.js +0 -94
- package/src/components/AUPaginationComponent.js +0 -103
- package/src/components/context/AUUserContextComponent.js +0 -91
- package/src/components/context/ImpersonateComponent.js +0 -54
- package/src/components/delphinus/AUCalendarComponent.js +0 -422
- package/src/components/delphinus/AUContentToggleComponent.js +0 -32
- package/src/components/delphinus/AUDatepickerComponent.js +0 -113
- package/src/components/delphinus/AULoginComponent.js +0 -65
- package/src/components/delphinus/AUSpinnerComponent.js +0 -114
- package/src/components/delphinus/AUTabbedContentComponent.js +0 -53
- package/src/components/form/AUMobilePrefixComponent.js +0 -18
- package/src/components/news/EventLayout1Component.js +0 -94
- package/src/components/news/EventLayout2Component.js +0 -90
- package/src/components/news/EventLayout3Component.js +0 -68
- package/src/components/news/NewsCategoriesComponent.js +0 -21
- package/src/components/news/NewsCollageBannerComponent.js +0 -71
- package/src/components/news/NewsColumnsComponent.js +0 -125
- package/src/components/news/NewsLanguageChangeComponent.js +0 -74
- package/src/components/news/NewsLayout1Component.js +0 -80
- package/src/components/news/NewsLayout2Component.js +0 -80
- package/src/components/news/NewsLayout3Component.js +0 -81
- package/src/components/news/NewsLayout4Component.js +0 -80
- package/src/components/news/NewsLayout5Component.js +0 -61
- package/src/components/news/NewsLayout6Component.js +0 -55
- package/src/components/news/NewsLayout7Component.js +0 -58
- package/src/components/news/NewsLayout8Component.js +0 -57
- package/src/components/news/NewsListComponent.js +0 -291
- package/src/components/news/NewsPopUpComponent.js +0 -591
- package/src/components/news/NewsRSSComponent.js +0 -74
- package/src/components/news/NewsSocialComponent.js +0 -104
- package/src/components/news/NewsSubHeaderComponent.js +0 -19
- package/src/components/password/AUChangePasswordComponent.js +0 -177
- package/src/components/password/AUCurrentPasswordComponent.js +0 -72
- package/src/components/password/AUNewPasswordComponent.js +0 -143
- package/src/components/password/AUPasswordActions.js +0 -101
- package/src/components/password/AUPasswordHooks.js +0 -47
- package/src/components/password/AUPasswordReducer.js +0 -78
- package/src/components/password/AUPasswordRequirementsComponent.js +0 -29
- package/src/config/webpack.cjs.config.js +0 -75
- package/src/config/webpack.dev.config.js +0 -61
- package/src/config/webpack.umd.config.js +0 -107
- package/src/index.js +0 -6
- package/src/lib/au-auth.js +0 -221
- package/src/lib/au-news.js +0 -306
- package/src/lib/menu.js +0 -10
- package/src/lib/urlHandler.js +0 -63
- package/src/lib/validation.js +0 -181
- package/src/styles/alert.scss +0 -39
- package/src/styles/calendar.scss +0 -112
- package/src/styles/filtercheckbox.scss +0 -5
- package/src/styles/modal.scss +0 -35
- package/src/styles/pagination.scss +0 -11
- package/src/styles/spinner.scss +0 -30
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/* eslint-env browser */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
|
|
5
|
-
class NewsLanguageChangeComponent extends React.Component {
|
|
6
|
-
constructor(props) {
|
|
7
|
-
super(props);
|
|
8
|
-
|
|
9
|
-
const { item } = props;
|
|
10
|
-
this.state = {
|
|
11
|
-
item,
|
|
12
|
-
lang: -1,
|
|
13
|
-
altLangLink: '',
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
componentDidMount() {
|
|
18
|
-
const { getItem, lang: pLang } = this.props;
|
|
19
|
-
const { item } = this.state;
|
|
20
|
-
const lang = pLang === 'da' ? 1 : 0;
|
|
21
|
-
let changeLangElement = document.querySelector('.language-selector a');
|
|
22
|
-
if (!changeLangElement) {
|
|
23
|
-
// Oh for fuck sake! Medarbejderheaderen...
|
|
24
|
-
changeLangElement = document.querySelector('.languageselector a');
|
|
25
|
-
}
|
|
26
|
-
if (changeLangElement) {
|
|
27
|
-
const t3LangChangeLink = changeLangElement.getAttribute('href');
|
|
28
|
-
if (t3LangChangeLink) {
|
|
29
|
-
getItem(item.id, lang, (data) => {
|
|
30
|
-
let hasAltLanguage = false;
|
|
31
|
-
const pl = data.permalink;
|
|
32
|
-
if (lang === 0 && pl.indexOf('/en/') === -1) {
|
|
33
|
-
// Klik på "dansk" fra engelsk nyhed
|
|
34
|
-
hasAltLanguage = true;
|
|
35
|
-
}
|
|
36
|
-
if (lang === 1 && pl.indexOf('/en/') > -1) {
|
|
37
|
-
// Klik på "english" fra dansk nyhed
|
|
38
|
-
hasAltLanguage = true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (hasAltLanguage) {
|
|
42
|
-
this.setState({
|
|
43
|
-
altLangLink: `${t3LangChangeLink}#news-${item.id}`,
|
|
44
|
-
lang,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
render() {
|
|
53
|
-
const { lang, altLangLink } = this.state;
|
|
54
|
-
if (lang === -1) {
|
|
55
|
-
return <span />;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<span className="au_news-single-language">
|
|
60
|
-
<a href={altLangLink}>{lang === 1 ? 'English' : 'Danish'}</a>
|
|
61
|
-
</span>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
NewsLanguageChangeComponent.propTypes = {
|
|
67
|
-
lang: PropTypes.string.isRequired,
|
|
68
|
-
item: PropTypes.shape({
|
|
69
|
-
}).isRequired,
|
|
70
|
-
getItem: PropTypes.func.isRequired,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
NewsLanguageChangeComponent.displayName = 'NewsLanguageChangeComponent';
|
|
74
|
-
export default NewsLanguageChangeComponent;
|
|
@@ -1,80 +0,0 @@
|
|
|
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 NewsCategoriesComponent from './NewsCategoriesComponent';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const NewsLayout1Component = (props) => {
|
|
9
|
-
const { item, listid, setPopupItem } = props;
|
|
10
|
-
if (!item) {
|
|
11
|
-
return <div />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
15
|
-
const domID = `news-${listid}-${i.id}`;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div id={domID} className="au_news-list1-item">
|
|
19
|
-
{(() => {
|
|
20
|
-
if (i.image) {
|
|
21
|
-
return (
|
|
22
|
-
<div className="au_news-list-item-img">
|
|
23
|
-
<a
|
|
24
|
-
onClick={() => {
|
|
25
|
-
if (!i.external) {
|
|
26
|
-
setPopupItem(item);
|
|
27
|
-
}
|
|
28
|
-
}}
|
|
29
|
-
href={i.url}
|
|
30
|
-
title={i.header}
|
|
31
|
-
>
|
|
32
|
-
<img src={i.image.layout1} alt="" />
|
|
33
|
-
</a>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
})()}
|
|
39
|
-
<div className="au_news-list-item-text">
|
|
40
|
-
<h2>
|
|
41
|
-
<a
|
|
42
|
-
onClick={() => {
|
|
43
|
-
if (!i.external) {
|
|
44
|
-
setPopupItem(item);
|
|
45
|
-
}
|
|
46
|
-
}}
|
|
47
|
-
href={i.url}
|
|
48
|
-
title={i.header}
|
|
49
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
50
|
-
/>
|
|
51
|
-
</h2>
|
|
52
|
-
<p className="au_news-legend">
|
|
53
|
-
<span className="au_news-list-date">{i.date}</span>
|
|
54
|
-
{' | '}
|
|
55
|
-
<NewsCategoriesComponent categories={i.categories} />
|
|
56
|
-
</p>
|
|
57
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
NewsLayout1Component.propTypes = {
|
|
64
|
-
item: PropTypes.shape({
|
|
65
|
-
id: PropTypes.number.isRequired,
|
|
66
|
-
header: PropTypes.string.isRequired,
|
|
67
|
-
subheader: PropTypes.string.isRequired,
|
|
68
|
-
url: PropTypes.string.isRequired,
|
|
69
|
-
external: PropTypes.bool.isRequired,
|
|
70
|
-
date: PropTypes.string.isRequired,
|
|
71
|
-
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
72
|
-
|
|
73
|
-
})).isRequired,
|
|
74
|
-
}).isRequired,
|
|
75
|
-
listid: PropTypes.number.isRequired,
|
|
76
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
NewsLayout1Component.displayName = 'NewsLayout1Component';
|
|
80
|
-
export default NewsLayout1Component;
|
|
@@ -1,80 +0,0 @@
|
|
|
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 NewsCategoriesComponent from './NewsCategoriesComponent';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const NewsLayout2Component = (props) => {
|
|
9
|
-
const { item, listid, setPopupItem } = props;
|
|
10
|
-
if (!item) {
|
|
11
|
-
return <div />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
15
|
-
const domID = `news-${listid}-${i.id}`;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div id={domID} className="au_news-list2-item">
|
|
19
|
-
{(() => {
|
|
20
|
-
if (i.image) {
|
|
21
|
-
return (
|
|
22
|
-
<div className="au_news-list-item-img">
|
|
23
|
-
<a
|
|
24
|
-
onClick={() => {
|
|
25
|
-
if (!i.external) {
|
|
26
|
-
setPopupItem(item);
|
|
27
|
-
}
|
|
28
|
-
}}
|
|
29
|
-
href={i.url}
|
|
30
|
-
title={i.header}
|
|
31
|
-
>
|
|
32
|
-
<img src={i.image.layout2} alt="" />
|
|
33
|
-
</a>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
})()}
|
|
39
|
-
<div className="au_news-list-item-text">
|
|
40
|
-
<h2>
|
|
41
|
-
<a
|
|
42
|
-
onClick={() => {
|
|
43
|
-
if (!i.external) {
|
|
44
|
-
setPopupItem(item);
|
|
45
|
-
}
|
|
46
|
-
}}
|
|
47
|
-
href={i.url}
|
|
48
|
-
title={i.header}
|
|
49
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
50
|
-
/>
|
|
51
|
-
</h2>
|
|
52
|
-
<p className="au_news-legend">
|
|
53
|
-
<span className="au_news-list-date">{i.date}</span>
|
|
54
|
-
{' | '}
|
|
55
|
-
<NewsCategoriesComponent categories={i.categories} />
|
|
56
|
-
</p>
|
|
57
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
NewsLayout2Component.propTypes = {
|
|
64
|
-
item: PropTypes.shape({
|
|
65
|
-
id: PropTypes.number.isRequired,
|
|
66
|
-
header: PropTypes.string.isRequired,
|
|
67
|
-
subheader: PropTypes.string.isRequired,
|
|
68
|
-
url: PropTypes.string.isRequired,
|
|
69
|
-
external: PropTypes.bool.isRequired,
|
|
70
|
-
date: PropTypes.string.isRequired,
|
|
71
|
-
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
72
|
-
|
|
73
|
-
})).isRequired,
|
|
74
|
-
}).isRequired,
|
|
75
|
-
listid: PropTypes.number.isRequired,
|
|
76
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
NewsLayout2Component.displayName = 'NewsLayout2Component';
|
|
80
|
-
export default NewsLayout2Component;
|
|
@@ -1,81 +0,0 @@
|
|
|
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 NewsCategoriesComponent from './NewsCategoriesComponent';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const NewsLayout3Component = (props) => {
|
|
9
|
-
const { item, listid, setPopupItem } = props;
|
|
10
|
-
if (!item) {
|
|
11
|
-
return <div />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
15
|
-
|
|
16
|
-
const domID = `news-${listid}-${i.id}`;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div id={domID} className="au_news-list3-item">
|
|
20
|
-
{(() => {
|
|
21
|
-
if (i.image) {
|
|
22
|
-
return (
|
|
23
|
-
<div className="au_news-list-item-img">
|
|
24
|
-
<a
|
|
25
|
-
onClick={() => {
|
|
26
|
-
if (!i.external) {
|
|
27
|
-
setPopupItem(item);
|
|
28
|
-
}
|
|
29
|
-
}}
|
|
30
|
-
href={i.url}
|
|
31
|
-
title={i.header}
|
|
32
|
-
>
|
|
33
|
-
<img src={i.image.layout3} alt="" />
|
|
34
|
-
</a>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
})()}
|
|
40
|
-
<div className="au_news-list-item-text">
|
|
41
|
-
<p className="au_news-legend">
|
|
42
|
-
<span className="au_news-list-date">{i.date}</span>
|
|
43
|
-
{' | '}
|
|
44
|
-
<NewsCategoriesComponent categories={i.categories} />
|
|
45
|
-
</p>
|
|
46
|
-
<h2>
|
|
47
|
-
<a
|
|
48
|
-
onClick={() => {
|
|
49
|
-
if (!i.external) {
|
|
50
|
-
setPopupItem(item);
|
|
51
|
-
}
|
|
52
|
-
}}
|
|
53
|
-
href={i.url}
|
|
54
|
-
title={i.header}
|
|
55
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
56
|
-
/>
|
|
57
|
-
</h2>
|
|
58
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
NewsLayout3Component.propTypes = {
|
|
65
|
-
item: PropTypes.shape({
|
|
66
|
-
id: PropTypes.number.isRequired,
|
|
67
|
-
header: PropTypes.string.isRequired,
|
|
68
|
-
subheader: PropTypes.string.isRequired,
|
|
69
|
-
url: PropTypes.string.isRequired,
|
|
70
|
-
external: PropTypes.bool.isRequired,
|
|
71
|
-
date: PropTypes.string.isRequired,
|
|
72
|
-
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
73
|
-
|
|
74
|
-
})).isRequired,
|
|
75
|
-
}).isRequired,
|
|
76
|
-
listid: PropTypes.number.isRequired,
|
|
77
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
NewsLayout3Component.displayName = 'NewsLayout3Component';
|
|
81
|
-
export default NewsLayout3Component;
|
|
@@ -1,80 +0,0 @@
|
|
|
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 NewsCategoriesComponent from './NewsCategoriesComponent';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const NewsLayout4Component = (props) => {
|
|
9
|
-
const { item, listid, setPopupItem } = props;
|
|
10
|
-
if (!item) {
|
|
11
|
-
return <div />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
15
|
-
const domID = `news-${listid}-${i.id}`;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div id={domID} className="au_news-list4-item">
|
|
19
|
-
{(() => {
|
|
20
|
-
if (i.image) {
|
|
21
|
-
return (
|
|
22
|
-
<div className="au_news-list-item-img">
|
|
23
|
-
<a
|
|
24
|
-
onClick={() => {
|
|
25
|
-
if (!i.external) {
|
|
26
|
-
setPopupItem(item);
|
|
27
|
-
}
|
|
28
|
-
}}
|
|
29
|
-
href={i.url}
|
|
30
|
-
title={i.header}
|
|
31
|
-
>
|
|
32
|
-
<img src={i.image.layout4} alt="" />
|
|
33
|
-
</a>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
})()}
|
|
39
|
-
<div className="au_news-list-item-text">
|
|
40
|
-
<p className="au_news-legend">
|
|
41
|
-
<span className="au_news-list-date">{i.date}</span>
|
|
42
|
-
{' | '}
|
|
43
|
-
<NewsCategoriesComponent categories={i.categories} />
|
|
44
|
-
</p>
|
|
45
|
-
<h2>
|
|
46
|
-
<a
|
|
47
|
-
onClick={() => {
|
|
48
|
-
if (!i.external) {
|
|
49
|
-
setPopupItem(item);
|
|
50
|
-
}
|
|
51
|
-
}}
|
|
52
|
-
href={i.url}
|
|
53
|
-
title={i.header}
|
|
54
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
55
|
-
/>
|
|
56
|
-
</h2>
|
|
57
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
NewsLayout4Component.propTypes = {
|
|
64
|
-
item: PropTypes.shape({
|
|
65
|
-
id: PropTypes.number.isRequired,
|
|
66
|
-
header: PropTypes.string.isRequired,
|
|
67
|
-
subheader: PropTypes.string.isRequired,
|
|
68
|
-
url: PropTypes.string.isRequired,
|
|
69
|
-
external: PropTypes.bool.isRequired,
|
|
70
|
-
date: PropTypes.string.isRequired,
|
|
71
|
-
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
72
|
-
|
|
73
|
-
})).isRequired,
|
|
74
|
-
}).isRequired,
|
|
75
|
-
listid: PropTypes.number.isRequired,
|
|
76
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
NewsLayout4Component.displayName = 'NewsLayout4Component';
|
|
80
|
-
export default NewsLayout4Component;
|
|
@@ -1,61 +0,0 @@
|
|
|
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 NewsCategoriesComponent from './NewsCategoriesComponent';
|
|
6
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
7
|
-
|
|
8
|
-
const NewsLayout5Component = (props) => {
|
|
9
|
-
const { item, listid, setPopupItem } = props;
|
|
10
|
-
if (!item) {
|
|
11
|
-
return <div />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
15
|
-
|
|
16
|
-
const domID = `news-${listid}-${i.id}`;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div id={domID} className="au_news-list5-item">
|
|
20
|
-
<div className="au_news-list-item-text">
|
|
21
|
-
<p className="au_news-legend">
|
|
22
|
-
<span className="au_news-list-date">{i.date}</span>
|
|
23
|
-
{' | '}
|
|
24
|
-
<NewsCategoriesComponent categories={i.categories} />
|
|
25
|
-
</p>
|
|
26
|
-
<h2>
|
|
27
|
-
<a
|
|
28
|
-
onClick={() => {
|
|
29
|
-
if (!i.external) {
|
|
30
|
-
setPopupItem(item);
|
|
31
|
-
}
|
|
32
|
-
}}
|
|
33
|
-
href={i.url}
|
|
34
|
-
title={i.header}
|
|
35
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
36
|
-
/>
|
|
37
|
-
</h2>
|
|
38
|
-
<NewsSubHeaderComponent subheader={i.subheader} trim={350} />
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
NewsLayout5Component.propTypes = {
|
|
45
|
-
item: PropTypes.shape({
|
|
46
|
-
id: PropTypes.number.isRequired,
|
|
47
|
-
header: PropTypes.string.isRequired,
|
|
48
|
-
subheader: PropTypes.string.isRequired,
|
|
49
|
-
url: PropTypes.string.isRequired,
|
|
50
|
-
external: PropTypes.bool.isRequired,
|
|
51
|
-
date: PropTypes.string.isRequired,
|
|
52
|
-
categories: PropTypes.arrayOf(PropTypes.shape({
|
|
53
|
-
|
|
54
|
-
})).isRequired,
|
|
55
|
-
}).isRequired,
|
|
56
|
-
listid: PropTypes.number.isRequired,
|
|
57
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
NewsLayout5Component.displayName = 'NewsLayout5Component';
|
|
61
|
-
export default NewsLayout5Component;
|
|
@@ -1,55 +0,0 @@
|
|
|
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 NewsLayout6Component = (props) => {
|
|
7
|
-
const { items, listid, setPopupItem } = props;
|
|
8
|
-
const renderItems = items.map((_i, j) => {
|
|
9
|
-
let i = _i;
|
|
10
|
-
const key = j;
|
|
11
|
-
if (i) {
|
|
12
|
-
i = AUNewsHelpers.setExternal(i);
|
|
13
|
-
const domID = `news-${listid}-${i.id}`;
|
|
14
|
-
return (
|
|
15
|
-
<li
|
|
16
|
-
key={key}
|
|
17
|
-
id={domID}
|
|
18
|
-
>
|
|
19
|
-
<a
|
|
20
|
-
onClick={() => {
|
|
21
|
-
if (!i.external) {
|
|
22
|
-
setPopupItem(i);
|
|
23
|
-
}
|
|
24
|
-
}}
|
|
25
|
-
href={i.url}
|
|
26
|
-
title={i.header}
|
|
27
|
-
dangerouslySetInnerHTML={{ __html: i.header }}
|
|
28
|
-
/>
|
|
29
|
-
</li>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<div className="au_news-header-list">
|
|
37
|
-
<ul>
|
|
38
|
-
{renderItems}
|
|
39
|
-
</ul>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
NewsLayout6Component.propTypes = {
|
|
45
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
|
46
|
-
id: PropTypes.number.isRequired,
|
|
47
|
-
url: PropTypes.string.isRequired,
|
|
48
|
-
header: PropTypes.string.isRequired,
|
|
49
|
-
})).isRequired,
|
|
50
|
-
listid: PropTypes.number.isRequired,
|
|
51
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
NewsLayout6Component.displayName = 'NewsLayout6Component';
|
|
55
|
-
export default NewsLayout6Component;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { newsLabels as labels } from '../../lib/i18n';
|
|
4
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
5
|
-
|
|
6
|
-
const NewsLayout7Component = (props) => {
|
|
7
|
-
const {
|
|
8
|
-
item,
|
|
9
|
-
listid,
|
|
10
|
-
setPopupItem,
|
|
11
|
-
lang,
|
|
12
|
-
} = props;
|
|
13
|
-
if (!item) {
|
|
14
|
-
return <div />;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
18
|
-
const domID = `news-${listid}-${i.id}`;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div id={domID} className="au_focus" style={{ backgroundImage: `url('${i.image ? i.image.src : ''}')` }}>
|
|
22
|
-
<div className="au_focus_content">
|
|
23
|
-
<h1 dangerouslySetInnerHTML={{ __html: i.header }} />
|
|
24
|
-
<p>{i.subheader}</p>
|
|
25
|
-
<ul>
|
|
26
|
-
<li>
|
|
27
|
-
<a
|
|
28
|
-
onClick={() => {
|
|
29
|
-
if (!i.external) {
|
|
30
|
-
setPopupItem(props.item);
|
|
31
|
-
}
|
|
32
|
-
}}
|
|
33
|
-
href={i.url}
|
|
34
|
-
>
|
|
35
|
-
{labels[lang].news.readMore}
|
|
36
|
-
</a>
|
|
37
|
-
</li>
|
|
38
|
-
</ul>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
NewsLayout7Component.propTypes = {
|
|
45
|
-
lang: PropTypes.string.isRequired,
|
|
46
|
-
item: PropTypes.shape({
|
|
47
|
-
id: PropTypes.number.isRequired,
|
|
48
|
-
header: PropTypes.string.isRequired,
|
|
49
|
-
subheader: PropTypes.string.isRequired,
|
|
50
|
-
url: PropTypes.string.isRequired,
|
|
51
|
-
external: PropTypes.bool.isRequired,
|
|
52
|
-
}).isRequired,
|
|
53
|
-
listid: PropTypes.number.isRequired,
|
|
54
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
NewsLayout7Component.displayName = 'NewsLayout7Component';
|
|
58
|
-
export default NewsLayout7Component;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { newsLabels as labels } from '../../lib/i18n';
|
|
4
|
-
import { AUNewsHelpers } from '../../lib/au-news';
|
|
5
|
-
|
|
6
|
-
const NewsLayout8Component = (props) => {
|
|
7
|
-
const {
|
|
8
|
-
item,
|
|
9
|
-
listid,
|
|
10
|
-
setPopupItem,
|
|
11
|
-
lang,
|
|
12
|
-
} = props;
|
|
13
|
-
if (!item) {
|
|
14
|
-
return <div />;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const i = AUNewsHelpers.setExternal(item);
|
|
18
|
-
const domID = `news-${listid}-${i.id}`;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div id={domID} className="au_focus au_focus_small" style={{ backgroundImage: `url('${i.image ? i.image.layout2 : ''}')` }}>
|
|
22
|
-
<div className="au_focus_content">
|
|
23
|
-
<div dangerouslySetInnerHTML={{ __html: i.header }} />
|
|
24
|
-
<ul>
|
|
25
|
-
<li>
|
|
26
|
-
<a
|
|
27
|
-
onClick={() => {
|
|
28
|
-
if (!i.external) {
|
|
29
|
-
setPopupItem(props.item);
|
|
30
|
-
}
|
|
31
|
-
}}
|
|
32
|
-
href={i.url}
|
|
33
|
-
>
|
|
34
|
-
{labels[lang].news.readMore}
|
|
35
|
-
</a>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
NewsLayout8Component.propTypes = {
|
|
44
|
-
lang: PropTypes.string.isRequired,
|
|
45
|
-
item: PropTypes.shape({
|
|
46
|
-
id: PropTypes.number.isRequired,
|
|
47
|
-
header: PropTypes.string.isRequired,
|
|
48
|
-
subheader: PropTypes.string.isRequired,
|
|
49
|
-
url: PropTypes.string.isRequired,
|
|
50
|
-
external: PropTypes.bool.isRequired,
|
|
51
|
-
}).isRequired,
|
|
52
|
-
listid: PropTypes.number.isRequired,
|
|
53
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
NewsLayout8Component.displayName = 'NewsLayout8Component';
|
|
57
|
-
export default NewsLayout8Component;
|