@aarhus-university/au-lib-react-components 9.11.17 → 10.0.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 -6
- package/build/umd/all.css +1 -1
- 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 -2
- 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 -60
- package/src/components/{delphinus/AUAlertComponent.js → AUAlertComponent.tsx} +70 -85
- 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 -94
- package/src/components/{form/AUReceiptComponent.js → AUReceiptComponent.tsx} +33 -40
- package/src/components/AUSpinnerComponent.tsx +67 -0
- package/src/components/{delphinus/AUSubNavComponent.js → AUSubNavComponent.tsx} +38 -53
- package/src/components/{form/AUSubmitButtonContainerComponent.js → AUSubmitButtonContainerComponent.tsx} +31 -39
- package/src/components/{delphinus/AUTabbedContentComponent.js → AUTabbedContentComponent.tsx} +145 -150
- 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 -128
- package/src/components/profile/AUProfileAvatarComponent.js +83 -83
- package/src/components/profile/AUProfileAvatarV2Component.js +91 -91
- package/src/components/profile/AUProfileAvatarV3Component.tsx +42 -0
- 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 → AUProfileLoginComponent.tsx} +3 -18
- 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 → AUProfileWidgetV3Component.tsx} +122 -130
- package/src/components/wrapping/AUEmbedComponent.js +47 -47
- package/src/{components → layout-2016/components}/alphabox/AlphaBoxComponent.js +28 -25
- 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} +44 -66
- package/src/{components/delphinus/hooks.js → lib/hooks.ts} +33 -28
- package/src/lib/{i18n.js → i18n.ts} +600 -601
- package/src/lib/{tracking.js → tracking.ts} +69 -65
- package/src/lib/{wrapping.js → wrapping.ts} +21 -16
- package/src/styles/_settings.scss +10 -10
- package/src/styles/alphabox.scss +222 -208
- package/src/styles/app.scss +7 -13
- 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 +395 -395
- package/tsconfig.json +47 -0
- package/types/common/interfaces/gui.d.ts +52 -0
- package/types/common/interfaces/model.d.ts +29 -0
- package/types/common/main.d.ts +5 -0
- package/types/common/package.json +5 -0
- package/types/common/payloads.d.ts +0 -0
- package/types/common/props.d.ts +165 -0
- package/{src/config/webpack.umd.config.js → webpack.config.js} +20 -16
- package/.eslintrc +0 -19
- package/build/dev.html +0 -329
- package/build/umd/auAuth.js +0 -2
- package/build/umd/auAuth.js.map +0 -1
- package/build/umd/databox.js.LICENSE.txt +0 -5
- 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 -487
- package/src/components/delphinus/AUContentToggleComponent.js +0 -32
- package/src/components/delphinus/AUDatepickerComponent.js +0 -164
- package/src/components/delphinus/AULoginComponent.js +0 -65
- package/src/components/delphinus/AUSpinnerComponent.js +0 -114
- 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/NewsCollageBannerRSSComponent.js +0 -79
- 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/components/profile/AUProfileAvatarV3Component.js +0 -80
- package/src/config/webpack.dev.config.js +0 -47
- package/src/index.js +0 -6
- package/src/lib/au-auth.js +0 -227
- package/src/lib/au-news.js +0 -371
- 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,125 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import EventLayout1Component from './EventLayout1Component';
|
|
4
|
-
import EventLayout2Component from './EventLayout2Component';
|
|
5
|
-
import EventLayout3Component from './EventLayout3Component';
|
|
6
|
-
import NewsLayout1Component from './NewsLayout1Component';
|
|
7
|
-
import NewsLayout2Component from './NewsLayout2Component';
|
|
8
|
-
import NewsLayout3Component from './NewsLayout3Component';
|
|
9
|
-
import NewsLayout4Component from './NewsLayout4Component';
|
|
10
|
-
import NewsLayout5Component from './NewsLayout5Component';
|
|
11
|
-
import NewsLayout6Component from './NewsLayout6Component';
|
|
12
|
-
import NewsLayout7Component from './NewsLayout7Component';
|
|
13
|
-
import NewsLayout8Component from './NewsLayout8Component';
|
|
14
|
-
|
|
15
|
-
const NewsColumnsComponent = (props) => {
|
|
16
|
-
const layouts = [
|
|
17
|
-
<NewsLayout1Component />,
|
|
18
|
-
<NewsLayout2Component />,
|
|
19
|
-
<NewsLayout3Component />,
|
|
20
|
-
<NewsLayout4Component />,
|
|
21
|
-
<NewsLayout5Component />,
|
|
22
|
-
<NewsLayout6Component />,
|
|
23
|
-
<NewsLayout7Component />,
|
|
24
|
-
<NewsLayout8Component />,
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const layoutsEvents = [
|
|
28
|
-
<EventLayout1Component />,
|
|
29
|
-
<EventLayout2Component />,
|
|
30
|
-
<EventLayout3Component />,
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const {
|
|
34
|
-
type,
|
|
35
|
-
cols,
|
|
36
|
-
items,
|
|
37
|
-
setPopupItem,
|
|
38
|
-
incrementPointer,
|
|
39
|
-
listid,
|
|
40
|
-
lang,
|
|
41
|
-
} = props;
|
|
42
|
-
let count = -1;
|
|
43
|
-
const headerElementValue = type === 'events' ? 3 : 6;
|
|
44
|
-
const renderColumns = cols.map((col, i) => {
|
|
45
|
-
const outerKey = i; // LOL
|
|
46
|
-
let isHeader = false;
|
|
47
|
-
const renderItems = col.map((element, j) => {
|
|
48
|
-
const innerKey = j; // Mere LOL
|
|
49
|
-
count += 1;
|
|
50
|
-
if (parseInt(element, 10) === headerElementValue && !isHeader) {
|
|
51
|
-
isHeader = true;
|
|
52
|
-
const hItems = [];
|
|
53
|
-
for (let x = j; x < col.length; x += 1) {
|
|
54
|
-
if (parseInt(col[x], 10) === headerElementValue) {
|
|
55
|
-
hItems.push(items[count + x]);
|
|
56
|
-
} else {
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (type === 'events') {
|
|
62
|
-
return (
|
|
63
|
-
<EventLayout3Component
|
|
64
|
-
key={innerKey}
|
|
65
|
-
listid={listid}
|
|
66
|
-
items={hItems}
|
|
67
|
-
setPopupItem={setPopupItem}
|
|
68
|
-
lang={lang}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<NewsLayout6Component
|
|
75
|
-
key={innerKey}
|
|
76
|
-
listid={listid}
|
|
77
|
-
items={hItems}
|
|
78
|
-
setPopupItem={setPopupItem}
|
|
79
|
-
lang={lang}
|
|
80
|
-
/>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (parseInt(element, 10) !== headerElementValue) {
|
|
85
|
-
incrementPointer();
|
|
86
|
-
isHeader = false;
|
|
87
|
-
const layoutsArray = type === 'events' ? layoutsEvents : layouts;
|
|
88
|
-
return React.cloneElement(layoutsArray[parseInt(element, 10) - 1], {
|
|
89
|
-
key: innerKey,
|
|
90
|
-
item: items[count],
|
|
91
|
-
listid,
|
|
92
|
-
setPopupItem,
|
|
93
|
-
lang,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return null;
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<div key={outerKey} className="column large-6 medium-6 small-12">
|
|
102
|
-
{renderItems}
|
|
103
|
-
</div>
|
|
104
|
-
);
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<div className="row">
|
|
109
|
-
{renderColumns}
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
NewsColumnsComponent.propTypes = {
|
|
115
|
-
type: PropTypes.string.isRequired,
|
|
116
|
-
cols: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
|
117
|
-
items: PropTypes.shape({}).isRequired,
|
|
118
|
-
setPopupItem: PropTypes.func.isRequired,
|
|
119
|
-
incrementPointer: PropTypes.func.isRequired,
|
|
120
|
-
listid: PropTypes.number.isRequired,
|
|
121
|
-
lang: PropTypes.bool.isRequired,
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
NewsColumnsComponent.displayName = 'NewsColumnsComponent';
|
|
125
|
-
export default NewsColumnsComponent;
|
|
@@ -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;
|