@aarhus-university/au-lib-react-components 9.11.19 → 9.12.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.
Files changed (148) hide show
  1. package/.eslintrc +18 -18
  2. package/README.md +20 -20
  3. package/babel.config.js +6 -6
  4. package/build/dev.html +328 -328
  5. package/build/umd/all.css +2 -2
  6. package/build/umd/all.css.map +1 -1
  7. package/build/umd/all.js +1 -1
  8. package/build/umd/alphabox.js +1 -1
  9. package/build/umd/alphabox.js.map +1 -1
  10. package/build/umd/auAuth.js +1 -1
  11. package/build/umd/auAuth.js.map +1 -1
  12. package/build/umd/databox.js +2 -2
  13. package/build/umd/databox.js.LICENSE.txt +5 -5
  14. package/build/umd/databox.js.map +1 -1
  15. package/build/umd/diagramme.js +1 -1
  16. package/build/umd/flowbox.js +1 -1
  17. package/build/umd/flowbox.js.map +1 -1
  18. package/build/umd/news.js +1 -1
  19. package/build/umd/news.js.map +1 -1
  20. package/build/umd/universe.js +1 -1
  21. package/build/umd/universe.js.map +1 -1
  22. package/package.json +60 -60
  23. package/src/all.js +3 -3
  24. package/src/app.js +263 -263
  25. package/src/components/AUAlertComponent.js +158 -158
  26. package/src/components/AUAmountComponent.js +84 -84
  27. package/src/components/AUBannerComponent.js +99 -99
  28. package/src/components/AUCalendarComponent.js +393 -393
  29. package/src/components/AUCollapsibleComponent.js +173 -173
  30. package/src/components/AUDatepickerComponent.js +105 -105
  31. package/src/components/AUDiagrammeComponent.js +310 -310
  32. package/src/components/AUFilterCheckboxComponent.js +122 -122
  33. package/src/components/AUFocusComponent.js +55 -55
  34. package/src/components/AUModalComponent.js +94 -94
  35. package/src/components/AUPaginationComponent.js +103 -103
  36. package/src/components/AUSpinnerComponent.js +125 -125
  37. package/src/components/AutoSuggestComponent.js +157 -132
  38. package/src/components/alphabox/AlphaBoxComponent.js +145 -140
  39. package/src/components/alphabox/AlphaBoxContentComponent.js +136 -125
  40. package/src/components/context/AUUserContextComponent.js +91 -91
  41. package/src/components/context/ImpersonateComponent.js +54 -54
  42. package/src/components/databox/DataBoxAlphabetComponent.js +144 -144
  43. package/src/components/databox/DataBoxAssociationComponent.js +122 -122
  44. package/src/components/databox/DataBoxButtonComponent.js +153 -153
  45. package/src/components/databox/DataBoxComponent.js +297 -297
  46. package/src/components/databox/DataBoxGroupingComponent.js +62 -62
  47. package/src/components/databox/DataBoxSearchResultComponent.js +40 -40
  48. package/src/components/databox/DataBoxStackedAssociationComponent.js +58 -58
  49. package/src/components/databox/DataBoxSuggestionComponent.js +39 -39
  50. package/src/components/delphinus/AUAlertComponent.js +85 -85
  51. package/src/components/delphinus/AUCalendarComponent.js +487 -487
  52. package/src/components/delphinus/AUContentToggleComponent.js +32 -32
  53. package/src/components/delphinus/AUDatepickerComponent.js +164 -164
  54. package/src/components/delphinus/AULoginComponent.js +65 -65
  55. package/src/components/delphinus/AUModalComponent.js +94 -94
  56. package/src/components/delphinus/AUSpinnerComponent.js +114 -114
  57. package/src/components/delphinus/AUSubNavComponent.js +53 -53
  58. package/src/components/delphinus/AUTabbedContentComponent.js +150 -150
  59. package/src/components/delphinus/AUTableComponent.js +28 -28
  60. package/src/components/delphinus/AUToastComponent.js +91 -91
  61. package/src/components/delphinus/AUToolbarComponent.js +48 -48
  62. package/src/components/delphinus/hooks.js +28 -28
  63. package/src/components/flowbox/FlowBoxComponent.js +126 -126
  64. package/src/components/flowbox/FlowBoxPhoneComponent.js +106 -106
  65. package/src/components/form/AUMobilePrefixComponent.js +18 -18
  66. package/src/components/form/AUReceiptComponent.js +40 -40
  67. package/src/components/form/AUSubmitButtonContainerComponent.js +39 -39
  68. package/src/components/news/EventLayout1Component.js +94 -94
  69. package/src/components/news/EventLayout2Component.js +90 -90
  70. package/src/components/news/EventLayout3Component.js +68 -68
  71. package/src/components/news/NewsCategoriesComponent.js +21 -21
  72. package/src/components/news/NewsCollageBannerComponent.js +71 -71
  73. package/src/components/news/NewsCollageBannerRSSComponent.js +79 -79
  74. package/src/components/news/NewsColumnsComponent.js +125 -125
  75. package/src/components/news/NewsLanguageChangeComponent.js +74 -74
  76. package/src/components/news/NewsLayout1Component.js +80 -80
  77. package/src/components/news/NewsLayout2Component.js +80 -80
  78. package/src/components/news/NewsLayout3Component.js +81 -81
  79. package/src/components/news/NewsLayout4Component.js +80 -80
  80. package/src/components/news/NewsLayout5Component.js +61 -61
  81. package/src/components/news/NewsLayout6Component.js +55 -55
  82. package/src/components/news/NewsLayout7Component.js +58 -58
  83. package/src/components/news/NewsLayout8Component.js +57 -57
  84. package/src/components/news/NewsListComponent.js +291 -291
  85. package/src/components/news/NewsPopUpComponent.js +591 -591
  86. package/src/components/news/NewsRSSComponent.js +74 -74
  87. package/src/components/news/NewsSocialComponent.js +104 -104
  88. package/src/components/news/NewsSubHeaderComponent.js +19 -19
  89. package/src/components/password/AUChangePasswordComponent.js +190 -177
  90. package/src/components/password/AUCurrentPasswordComponent.js +72 -72
  91. package/src/components/password/AUNewPasswordComponent.js +143 -143
  92. package/src/components/password/AUPasswordActions.js +101 -101
  93. package/src/components/password/AUPasswordHooks.js +47 -47
  94. package/src/components/password/AUPasswordReducer.js +78 -78
  95. package/src/components/password/AUPasswordRequirementsComponent.js +29 -29
  96. package/src/components/profile/AUProfileActions.js +128 -128
  97. package/src/components/profile/AUProfileAvatar2016Component.js +99 -99
  98. package/src/components/profile/AUProfileAvatarComponent.js +83 -83
  99. package/src/components/profile/AUProfileAvatarV2Component.js +91 -91
  100. package/src/components/profile/AUProfileAvatarV3Component.js +80 -80
  101. package/src/components/profile/AUProfileContainerComponent.js +283 -283
  102. package/src/components/profile/AUProfileHooks.js +30 -30
  103. package/src/components/profile/AUProfileItemComponent.js +54 -54
  104. package/src/components/profile/AUProfileLanguageComponent.js +131 -131
  105. package/src/components/profile/AUProfileLoginComponent.js +41 -41
  106. package/src/components/profile/AUProfileMailComponent.js +307 -307
  107. package/src/components/profile/AUProfileMobileComponent.js +164 -164
  108. package/src/components/profile/AUProfileNameComponent.js +253 -253
  109. package/src/components/profile/AUProfileNextOfKinComponent.js +216 -216
  110. package/src/components/profile/AUProfileReducer.js +230 -230
  111. package/src/components/profile/AUProfileWidgetComponent.js +95 -95
  112. package/src/components/profile/AUProfileWidgetV2Component.js +116 -116
  113. package/src/components/profile/AUProfileWidgetV3Component.js +130 -130
  114. package/src/components/universe/StaffTopComponent.js +362 -362
  115. package/src/components/universe/StudentTopComponent.js +137 -137
  116. package/src/components/universe/UniverseContainerComponent.js +62 -62
  117. package/src/components/wrapping/AUEmbedComponent.js +47 -47
  118. package/src/config/webpack.dev.config.js +47 -47
  119. package/src/config/webpack.umd.config.js +86 -85
  120. package/src/index.js +6 -6
  121. package/src/lib/au-alphabox.js +102 -102
  122. package/src/lib/au-auth.js +227 -227
  123. package/src/lib/au-databox.js +403 -403
  124. package/src/lib/au-diagramme.js +87 -87
  125. package/src/lib/au-flowbox.js +95 -95
  126. package/src/lib/au-news.js +371 -371
  127. package/src/lib/helpers.js +222 -222
  128. package/src/lib/i18n.js +603 -601
  129. package/src/lib/menu.js +10 -10
  130. package/src/lib/tracking.js +65 -65
  131. package/src/lib/universe.js +9 -9
  132. package/src/lib/urlHandler.js +63 -63
  133. package/src/lib/validation.js +219 -181
  134. package/src/lib/wrapping.js +16 -16
  135. package/src/styles/_settings.scss +10 -10
  136. package/src/styles/alert.scss +39 -39
  137. package/src/styles/alphabox.scss +222 -208
  138. package/src/styles/app.scss +13 -13
  139. package/src/styles/autosuggest.scss +57 -57
  140. package/src/styles/calendar.scss +111 -111
  141. package/src/styles/databox.scss +563 -563
  142. package/src/styles/diagramme.scss +119 -119
  143. package/src/styles/filtercheckbox.scss +4 -4
  144. package/src/styles/flowbox.scss +72 -72
  145. package/src/styles/maps.scss +395 -395
  146. package/src/styles/modal.scss +34 -34
  147. package/src/styles/pagination.scss +10 -10
  148. package/src/styles/spinner.scss +30 -30
@@ -1,591 +1,591 @@
1
- /* eslint-env browser */
2
- /* eslint jsx-a11y/no-noninteractive-tabindex: 0 */
3
- /* eslint jsx-a11y/control-has-associated-label: 0 */
4
- import React from 'react';
5
- import PropTypes from 'prop-types';
6
- import NewsLanguageChangeComponent from './NewsLanguageChangeComponent';
7
- import NewsSocialComponent from './NewsSocialComponent';
8
- import { newsLabels as labels } from '../../lib/i18n';
9
- import { AUNewsHelpers, AUNewsConfig } from '../../lib/au-news';
10
-
11
- const setFade = () => {
12
- const fade = document.getElementById('fade');
13
- if (fade) {
14
- fade.style.display = 'block';
15
- fade.style.opacity = 0.7;
16
- fade.style.zIndex = 101;
17
- }
18
- };
19
-
20
- class NewsPopUpComponent extends React.Component {
21
- static getItem(id, lang, callback) {
22
- const url = `${AUNewsConfig.server}/index.php?eID=getAuNewsFeed&mode=id&key=${id}&lang=${lang}&callback=?`;
23
- // Axios does not support JSONP requests!
24
- $.ajax({
25
- url,
26
- dataType: 'json',
27
- jsonpCallback: url.hashCode(),
28
- jsonp: true,
29
- cache: true,
30
- success: (data) => {
31
- if (data && data.length === 1) {
32
- if (typeof callback === 'function' && data[0].hidden !== '1') {
33
- callback(data[0]);
34
- }
35
- }
36
- },
37
- });
38
- }
39
-
40
- static calculateHeight() {
41
- if (document.querySelector('.au_news_popup') && !AU.helpers.isMobileDevice()) {
42
- const element = document.querySelector('.au_news_popup');
43
- const viewPortHeight = Math.max(
44
- document.documentElement.clientHeight, window.innerHeight || 0,
45
- );
46
- const popupTop = getComputedStyle(element).top.replace('px', '');
47
- const popupBottom = getComputedStyle(element).bottom.replace('px', '');
48
- element.querySelector('.au_news_popup_inner').style.height = `${viewPortHeight - popupTop - popupBottom}px`;
49
- }
50
- }
51
-
52
- constructor(props) {
53
- super(props);
54
-
55
- const { item } = props;
56
- this.state = {
57
- item,
58
- };
59
-
60
- this.posBeforeShow = 0;
61
- }
62
-
63
- componentDidMount() {
64
- const {
65
- item,
66
- id,
67
- lang,
68
- print,
69
- } = this.props;
70
- const { item: sItem } = this.state;
71
- if (item == null) {
72
- NewsPopUpComponent.getItem(id, lang, (_item) => {
73
- const trackerLink = `/virtual/news/${AUNewsHelpers.typeIdToText(_item.type)}/open-single/id-${_item.id}/${_item.permalink}`;
74
- AU.tracking.trackSingle(trackerLink);
75
- this.setState({
76
- item: _item,
77
- }, () => {
78
- if (print) {
79
- window.print();
80
- }
81
- });
82
- });
83
- }
84
-
85
- setFade();
86
- document.querySelector('.au_news_popup_inner').focus();
87
- NewsPopUpComponent.calculateHeight();
88
- if (sItem != null) {
89
- // this.setDisqus();
90
- NewsPopUpComponent.setLightBox();
91
- }
92
- this.posBeforeShow = document.documentElement.scrollTop === 0
93
- ? document.body.scrollTop : document.documentElement.scrollTop;
94
- document.querySelector('body').classList.add('news-overlay-open');
95
- AU.resize.push(() => {
96
- NewsPopUpComponent.calculateHeight();
97
- });
98
- }
99
-
100
- componentDidUpdate() {
101
- const { item } = this.state;
102
- if (item != null) {
103
- // this.setDisqus();
104
- NewsPopUpComponent.setLightBox();
105
- setFade();
106
- }
107
- }
108
-
109
- componentWillUnmount() {
110
- const fade = document.getElementById('fade');
111
- if (fade) {
112
- fade.style.display = 'none';
113
- document.querySelector('body').style.overflowY = 'visible';
114
- document.documentElement.scrollTop = this.posBeforeShow;
115
- document.body.scrollTop = this.posBeforeShow;
116
- }
117
- }
118
-
119
- setDisqus() {
120
- const { item } = this.state;
121
- window.disqus_url = item.permalink;
122
- if (window.disqus_url !== '' && !item.comments_closed && item.id > 0) {
123
- if (!window.disqus_loaded) {
124
- $.getScript('//disqus.com/forums/rapexegesis/embed.js', () => {
125
- window.disqus_loaded = true;
126
- });
127
- } else {
128
- window.DISQUS.reset({
129
- reload: true,
130
- });
131
- }
132
- }
133
- }
134
-
135
- static setLightBox() {
136
- $('.au_news_popup a[rel="lightbox"]').magnificPopup({
137
- type: 'image',
138
- gallery: {
139
- enabled: true,
140
- },
141
- modal: false,
142
- });
143
- }
144
-
145
- render() {
146
- const { item } = this.state;
147
- const { lang } = this.props;
148
-
149
- let outerClassName = 'au_news_popup social';
150
- if (AUNewsHelpers.isiPad()) {
151
- outerClassName += ' ipad';
152
- }
153
-
154
- if (!item) {
155
- return (
156
- <div className={outerClassName}>
157
- <div className="au_news_popup_inner" tabIndex="0" />
158
- </div>
159
- );
160
- }
161
-
162
- const additionalInfo = item.links.length > 0
163
- || item.related.length > 0
164
- || item.files.length > 0;
165
- const renderCategories = null; /* item.categories ? item.categories.map(
166
- (c, j) => (
167
- <span key={c.category}>
168
- {`${j === 0 ? '' : ', '} ${c.category}`}
169
- </span>
170
- ),
171
- ) : ''; */
172
-
173
- const printUrl = window.location.href.replace(window.location.hash, `?newsprint=true${window.location.hash}`);
174
-
175
- return (
176
- <div className="au_news_popup social">
177
- <div className="au_news_popup_inner" tabIndex="0">
178
- <div className="au_news_overlay">
179
- <span className="au_news-single-print">
180
- <a
181
- href={printUrl}
182
- onClick={(e) => {
183
- e.preventDefault();
184
- window.open(printUrl, '', 'width=1025,height=600');
185
- }}
186
- >
187
- Print
188
- </a>
189
- </span>
190
- <NewsLanguageChangeComponent
191
- getItem={NewsPopUpComponent.getItem}
192
- item={item}
193
- lang={lang}
194
- />
195
- </div>
196
- <div className="au_news_overlay_wrapper">
197
- <h1
198
- className="au_news_overlay_header"
199
- dangerouslySetInnerHTML={{
200
- __html: item.header,
201
- }}
202
- />
203
- <div className="header_bg" />
204
- <div className="au_news-single-item au_news-single2-item">
205
- <p
206
- className="au_news-single-subheader"
207
- dangerouslySetInnerHTML={{
208
- __html: item.subheader,
209
- }}
210
- />
211
- {(() => {
212
- if (item.event_from == null) {
213
- return (
214
- <p className="au_news-legend">
215
- <span className="au_news-single-date">{item.date}</span>
216
- <span>
217
- <span className="au_news-date-author-separator"> | </span>
218
- <span className="aunews-single-author">
219
- <a href={`mailto:${item.author.email}`}>{item.author.name}</a>
220
- </span>
221
- </span>
222
- </p>
223
- );
224
- }
225
- return null;
226
- })()}
227
- {(() => {
228
- if (item.image.src !== '' && item.layout === 'Standard') {
229
- return (
230
- <div className="news-set1-img1all">
231
- <a href={item.image.href} title={item.image.title} rel="lightbox">
232
- <img
233
- src={item.image.src}
234
- alt={item.image.title}
235
- width={item.image.width}
236
- height={item.image.height}
237
- />
238
- </a>
239
- <p className="au_news-single2-imgcaption">{item.image.title}</p>
240
- </div>
241
- );
242
- }
243
- return null;
244
- })()}
245
- {(() => {
246
- if (item.event_from) {
247
- const fromDateSplit = item.event_from.date.split('.');
248
- const toDateSplit = item.event_to.date.split('.');
249
- let fromDate;
250
- let toDate;
251
-
252
- if (lang === 'en') {
253
- fromDate = new Date(
254
- parseInt(fromDateSplit[0], 10),
255
- parseInt(fromDateSplit[1], 10) - 1,
256
- parseInt(fromDateSplit[2], 10),
257
- );
258
- toDate = new Date(
259
- parseInt(toDateSplit[0], 10),
260
- parseInt(toDateSplit[1], 10) - 1,
261
- parseInt(toDateSplit[2], 10),
262
- );
263
- } else {
264
- fromDate = new Date(
265
- parseInt(fromDateSplit[2], 10),
266
- parseInt(fromDateSplit[1], 10) - 1,
267
- parseInt(fromDateSplit[0], 10),
268
- );
269
- toDate = new Date(
270
- parseInt(toDateSplit[2], 10),
271
- parseInt(toDateSplit[1], 10) - 1,
272
- parseInt(toDateSplit[0], 10),
273
- );
274
- }
275
-
276
- const differentDays = !(
277
- toDate.getFullYear() === fromDate.getFullYear()
278
- && toDate.getMonth() === fromDate.getMonth()
279
- && toDate.getDate() === fromDate.getDate()
280
- );
281
-
282
- return (
283
- <div>
284
- <table className="au_newsevent-event">
285
- <colgroup>
286
- <col className="first-col" />
287
- <col className="second-col" />
288
- </colgroup>
289
- <tbody>
290
- <tr className="au_newsevent_date_wrap">
291
- <td className="au_newsevent-date-text">{labels[lang].news.eventDate}</td>
292
- <td>
293
- <span className="au_newsevent-from-date">
294
- <span className="au_news_events_weekday">
295
- {`${labels[lang].news.weekdays[fromDate.getDay()]} `}
296
- </span>
297
- <span className="au_news_events_date">
298
- {`${fromDate.getDate() + (lang === 'da' ? '.' : '')} `}
299
- </span>
300
- <span className="au_news_events_month">
301
- {`${labels[lang].news.months[fromDate.getMonth()]} ${fromDate.getFullYear()}`}
302
- </span>
303
- </span>
304
- {(() => {
305
- if (differentDays) {
306
- return (
307
- <span>
308
- <span className="au_newsevent-to-text"> &mdash; </span>
309
- <span className="au_newsevent-to-date">
310
- <span className="au_news_events_weekday">
311
- {`${labels[lang].news.weekdays[toDate.getDay()]} `}
312
- </span>
313
- <span className="au_news_events_date">
314
- {`${toDate.getDate() + (lang === 'da' ? '.' : '')} `}
315
- </span>
316
- <span className="au_news_events_month">
317
- {`${labels[lang].news.months[toDate.getMonth()]} ${toDate.getFullYear()}`}
318
- </span>
319
- </span>
320
- </span>
321
- );
322
- }
323
- return null;
324
- })()}
325
-
326
- </td>
327
- </tr>
328
- <tr className="au_newsevent-row-even">
329
- <td className="au_newsevent-time-text">{labels[lang].news.eventTime}</td>
330
- <td>
331
- <span className="au_newsevent-from-time">{item.event_from.time}</span>
332
- {(() => {
333
- if (!differentDays) {
334
- return (
335
- <span>
336
- <span className="au_newsevent-to-text"> &mdash; </span>
337
- <span className="au_newsevent-to-time">{item.event_to.time}</span>
338
- </span>
339
- );
340
- }
341
- return null;
342
- })()}
343
- </td>
344
- </tr>
345
- <tr className="au_newsevent_where_wrap">
346
- <td className="au_newsevent-where-text">{labels[lang].news.eventWhere}</td>
347
- <td className="au_newsevent-where">{item.event_where}</td>
348
- </tr>
349
- </tbody>
350
- </table>
351
- {(() => {
352
- if (item.event_regurl !== '') {
353
- if (lang === 'da' && item.event_regfrom && item.event_regto) {
354
- const regFromDateSplit = item.event_regfrom.date.split('.');
355
- item.event_regfrom.date = `${regFromDateSplit[2]}.${regFromDateSplit[1]}.${regFromDateSplit[0]}`;
356
- const regToDateSplit = item.event_regto.date.split('.');
357
- item.event_regto.date = `${regToDateSplit[2]}.${regToDateSplit[1]}.${regToDateSplit[0]}`;
358
- }
359
-
360
- if (!(item.event_regfrom && item.event_regto) || (new Date() > new Date(item.event_regfrom.date.replace(/\./g, '-')) && new Date() < new Date(item.event_regto.date.replace(/\./g, '-')))) {
361
- return (
362
- <span className="au_newsevent_register">
363
- <a className="button" href={(item.event_regurl.indexOf('@') > -1 ? 'mailto:' : '') + item.event_regurl}>{labels[lang].news.eventRegistration}</a>
364
- </span>
365
- );
366
- }
367
- }
368
- return null;
369
- })()}
370
- </div>
371
- );
372
- }
373
- return null;
374
- })()}
375
- {(() => {
376
- const renderSubImages = item.subimages.map((s) => (
377
- <div key={s.href}>
378
- <a href={s.href} title={s.title} rel="lightbox">
379
- <img src={s.src} alt={s.title} width={s.width} height={s.height} />
380
- </a>
381
- <p className="au_news-single-imgcaption">
382
- {s.title}
383
- </p>
384
- </div>
385
- ));
386
-
387
- if (item.image.src !== '' && item.image.layout5 !== '' && item.layout === 'Alternativ 1') {
388
- return (
389
- <div className="au_news-single-sub-images">
390
- <div>
391
- <a href={item.image.href} title={item.image.title} rel="lightbox">
392
- <img src={item.image.layout5} alt={item.image.title} />
393
- </a>
394
- <p className="au_news-single-imgcaption">
395
- {item.image.title}
396
- </p>
397
- </div>
398
- {renderSubImages}
399
- </div>
400
- );
401
- }
402
-
403
- if (item.subimages.length > 0 && item.image.src !== '' && item.layout === 'Standard') {
404
- return (
405
- <div className="au_news-single-sub-images">
406
- {renderSubImages}
407
- </div>
408
- );
409
- }
410
- return null;
411
- })()}
412
- <div
413
- className="au_news_content"
414
- dangerouslySetInnerHTML={{
415
- __html: item.content,
416
- }}
417
- />
418
- {(() => {
419
- if (item.event_from) {
420
- return (
421
- <p className="au_news-legend">
422
- <span className="au_news-single-date">{item.date}</span>
423
- <span>
424
- <span className="au_news-date-author-separator"> | </span>
425
- <span className="aunews-single-author">
426
- <a href={`mailto:${item.author.email}`}>{item.author.name}</a>
427
- </span>
428
- </span>
429
- </p>
430
- );
431
- }
432
- return null;
433
- })()}
434
- <div className="au_news-single-news-category">
435
- <strong>{renderCategories}</strong>
436
- </div>
437
- <div className="au_news-single-news-permalink">
438
- <strong><a href={item.permalink}>{item.permalink}</a></strong>
439
- </div>
440
- {(() => {
441
- if (additionalInfo) {
442
- const renderLinks = item.links.map((l) => <a href={l.href}>{l.text}</a>);
443
-
444
- const renderRelated = item.related.map((r) => (
445
- <span>
446
- <a className="au_news-related-link" href={`${AUNewsConfig.newsUrl}${r.id}`}>{r.text}</a>
447
- {` ${r.date}`}
448
- </span>
449
- ));
450
-
451
- const renderFiles = item.files.map((f) => <a href={f.href}>{f.text}</a>);
452
-
453
- return (
454
- <div className="au_bt_dark au_bb_dark au_news-single-additional-info">
455
- {(() => {
456
- if (item.links.length > 0) {
457
- return (
458
- <dl className="au_news-single-links">
459
- <dt>Links</dt>
460
- <dd>
461
- {renderLinks}
462
- </dd>
463
- </dl>
464
- );
465
- }
466
- return null;
467
- })()}
468
- {(() => {
469
- if (item.related.length > 0) {
470
- return (
471
- <dl className="au_news-single-related">
472
- <dt>{lang === 'da' ? 'Læs også' : 'Read more'}</dt>
473
- <dd>
474
- {renderRelated}
475
- </dd>
476
- </dl>
477
- );
478
- }
479
- return null;
480
- })()}
481
- {(() => {
482
- if (item.files.length > 0) {
483
- return (
484
- <dl className="au_news-single-files">
485
- <dt>Download</dt>
486
- <dd>
487
- {renderFiles}
488
- </dd>
489
- </dl>
490
- );
491
- }
492
- return null;
493
- })()}
494
- </div>
495
- );
496
- }
497
- return null;
498
- })()}
499
- </div>
500
- {(() => {
501
- if (!item.comments_closed) {
502
- return <div id="disqus_thread" />;
503
- }
504
- return null;
505
- })()}
506
- </div>
507
- <NewsSocialComponent item={item} lang={lang} />
508
- </div>
509
- <button
510
- type="button"
511
- className="au_news_overlay_close"
512
- onClick={() => {
513
- window.location.hash = '';
514
- }}
515
- />
516
- </div>
517
- );
518
- }
519
- }
520
-
521
- NewsPopUpComponent.propTypes = {
522
- lang: PropTypes.string.isRequired,
523
- print: PropTypes.bool.isRequired,
524
- item: PropTypes.shape({
525
- type: PropTypes.number.isRequired,
526
- id: PropTypes.number.isRequired,
527
- header: PropTypes.string.isRequired,
528
- subheader: PropTypes.string.isRequired,
529
- url: PropTypes.string.isRequired,
530
- permalink: PropTypes.string.isRequired,
531
- comments_closed: PropTypes.bool.isRequired,
532
- links: PropTypes.arrayOf(PropTypes.shape({
533
- href: PropTypes.string.isRequired,
534
- text: PropTypes.string.isRequired,
535
- })).isRequired,
536
- categories: PropTypes.arrayOf(PropTypes.shape({
537
- category: PropTypes.string.isRequired,
538
- })).isRequired,
539
- files: PropTypes.arrayOf(PropTypes.shape({
540
- href: PropTypes.string.isRequired,
541
- text: PropTypes.string.isRequired,
542
- })).isRequired,
543
- related: PropTypes.arrayOf(PropTypes.shape({
544
- id: PropTypes.number.isRequired,
545
- text: PropTypes.string.isRequired,
546
- })).isRequired,
547
- event_from: PropTypes.shape({
548
- date: PropTypes.string,
549
- time: PropTypes.string,
550
- }),
551
- event_to: PropTypes.shape({
552
- date: PropTypes.string,
553
- time: PropTypes.string,
554
- }),
555
- event_where: PropTypes.string.isRequired,
556
- event_regfrom: PropTypes.shape({
557
- date: PropTypes.string,
558
- time: PropTypes.string,
559
- }),
560
- event_regto: PropTypes.shape({
561
- date: PropTypes.string,
562
- time: PropTypes.string,
563
- }),
564
- event_regurl: PropTypes.string.isRequired,
565
- date: PropTypes.string.isRequired,
566
- autor: PropTypes.shape({
567
- email: PropTypes.string.isRequired,
568
- name: PropTypes.string.isRequired,
569
- }).isRequired,
570
- image: PropTypes.shape({
571
- src: PropTypes.string.isRequired,
572
- href: PropTypes.string.isRequired,
573
- title: PropTypes.string.isRequired,
574
- width: PropTypes.string.isRequired,
575
- height: PropTypes.string.isRequired,
576
- layout5: PropTypes.string.isRequired,
577
- }),
578
- subimages: PropTypes.arrayOf(PropTypes.shape({
579
- href: PropTypes.string.isRequired,
580
- title: PropTypes.string.isRequired,
581
- width: PropTypes.string.isRequired,
582
- height: PropTypes.string.isRequired,
583
- })),
584
- layout: PropTypes.string.isRequired,
585
- content: PropTypes.string.isRequired,
586
- }).isRequired,
587
- id: PropTypes.number.isRequired,
588
- };
589
-
590
- NewsPopUpComponent.displayName = 'NewsPopUpComponent';
591
- export default NewsPopUpComponent;
1
+ /* eslint-env browser */
2
+ /* eslint jsx-a11y/no-noninteractive-tabindex: 0 */
3
+ /* eslint jsx-a11y/control-has-associated-label: 0 */
4
+ import React from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import NewsLanguageChangeComponent from './NewsLanguageChangeComponent';
7
+ import NewsSocialComponent from './NewsSocialComponent';
8
+ import { newsLabels as labels } from '../../lib/i18n';
9
+ import { AUNewsHelpers, AUNewsConfig } from '../../lib/au-news';
10
+
11
+ const setFade = () => {
12
+ const fade = document.getElementById('fade');
13
+ if (fade) {
14
+ fade.style.display = 'block';
15
+ fade.style.opacity = 0.7;
16
+ fade.style.zIndex = 101;
17
+ }
18
+ };
19
+
20
+ class NewsPopUpComponent extends React.Component {
21
+ static getItem(id, lang, callback) {
22
+ const url = `${AUNewsConfig.server}/index.php?eID=getAuNewsFeed&mode=id&key=${id}&lang=${lang}&callback=?`;
23
+ // Axios does not support JSONP requests!
24
+ $.ajax({
25
+ url,
26
+ dataType: 'json',
27
+ jsonpCallback: url.hashCode(),
28
+ jsonp: true,
29
+ cache: true,
30
+ success: (data) => {
31
+ if (data && data.length === 1) {
32
+ if (typeof callback === 'function' && data[0].hidden !== '1') {
33
+ callback(data[0]);
34
+ }
35
+ }
36
+ },
37
+ });
38
+ }
39
+
40
+ static calculateHeight() {
41
+ if (document.querySelector('.au_news_popup') && !AU.helpers.isMobileDevice()) {
42
+ const element = document.querySelector('.au_news_popup');
43
+ const viewPortHeight = Math.max(
44
+ document.documentElement.clientHeight, window.innerHeight || 0,
45
+ );
46
+ const popupTop = getComputedStyle(element).top.replace('px', '');
47
+ const popupBottom = getComputedStyle(element).bottom.replace('px', '');
48
+ element.querySelector('.au_news_popup_inner').style.height = `${viewPortHeight - popupTop - popupBottom}px`;
49
+ }
50
+ }
51
+
52
+ constructor(props) {
53
+ super(props);
54
+
55
+ const { item } = props;
56
+ this.state = {
57
+ item,
58
+ };
59
+
60
+ this.posBeforeShow = 0;
61
+ }
62
+
63
+ componentDidMount() {
64
+ const {
65
+ item,
66
+ id,
67
+ lang,
68
+ print,
69
+ } = this.props;
70
+ const { item: sItem } = this.state;
71
+ if (item == null) {
72
+ NewsPopUpComponent.getItem(id, lang, (_item) => {
73
+ const trackerLink = `/virtual/news/${AUNewsHelpers.typeIdToText(_item.type)}/open-single/id-${_item.id}/${_item.permalink}`;
74
+ AU.tracking.trackSingle(trackerLink);
75
+ this.setState({
76
+ item: _item,
77
+ }, () => {
78
+ if (print) {
79
+ window.print();
80
+ }
81
+ });
82
+ });
83
+ }
84
+
85
+ setFade();
86
+ document.querySelector('.au_news_popup_inner').focus();
87
+ NewsPopUpComponent.calculateHeight();
88
+ if (sItem != null) {
89
+ // this.setDisqus();
90
+ NewsPopUpComponent.setLightBox();
91
+ }
92
+ this.posBeforeShow = document.documentElement.scrollTop === 0
93
+ ? document.body.scrollTop : document.documentElement.scrollTop;
94
+ document.querySelector('body').classList.add('news-overlay-open');
95
+ AU.resize.push(() => {
96
+ NewsPopUpComponent.calculateHeight();
97
+ });
98
+ }
99
+
100
+ componentDidUpdate() {
101
+ const { item } = this.state;
102
+ if (item != null) {
103
+ // this.setDisqus();
104
+ NewsPopUpComponent.setLightBox();
105
+ setFade();
106
+ }
107
+ }
108
+
109
+ componentWillUnmount() {
110
+ const fade = document.getElementById('fade');
111
+ if (fade) {
112
+ fade.style.display = 'none';
113
+ document.querySelector('body').style.overflowY = 'visible';
114
+ document.documentElement.scrollTop = this.posBeforeShow;
115
+ document.body.scrollTop = this.posBeforeShow;
116
+ }
117
+ }
118
+
119
+ setDisqus() {
120
+ const { item } = this.state;
121
+ window.disqus_url = item.permalink;
122
+ if (window.disqus_url !== '' && !item.comments_closed && item.id > 0) {
123
+ if (!window.disqus_loaded) {
124
+ $.getScript('//disqus.com/forums/rapexegesis/embed.js', () => {
125
+ window.disqus_loaded = true;
126
+ });
127
+ } else {
128
+ window.DISQUS.reset({
129
+ reload: true,
130
+ });
131
+ }
132
+ }
133
+ }
134
+
135
+ static setLightBox() {
136
+ $('.au_news_popup a[rel="lightbox"]').magnificPopup({
137
+ type: 'image',
138
+ gallery: {
139
+ enabled: true,
140
+ },
141
+ modal: false,
142
+ });
143
+ }
144
+
145
+ render() {
146
+ const { item } = this.state;
147
+ const { lang } = this.props;
148
+
149
+ let outerClassName = 'au_news_popup social';
150
+ if (AUNewsHelpers.isiPad()) {
151
+ outerClassName += ' ipad';
152
+ }
153
+
154
+ if (!item) {
155
+ return (
156
+ <div className={outerClassName}>
157
+ <div className="au_news_popup_inner" tabIndex="0" />
158
+ </div>
159
+ );
160
+ }
161
+
162
+ const additionalInfo = item.links.length > 0
163
+ || item.related.length > 0
164
+ || item.files.length > 0;
165
+ const renderCategories = null; /* item.categories ? item.categories.map(
166
+ (c, j) => (
167
+ <span key={c.category}>
168
+ {`${j === 0 ? '' : ', '} ${c.category}`}
169
+ </span>
170
+ ),
171
+ ) : ''; */
172
+
173
+ const printUrl = window.location.href.replace(window.location.hash, `?newsprint=true${window.location.hash}`);
174
+
175
+ return (
176
+ <div className="au_news_popup social">
177
+ <div className="au_news_popup_inner" tabIndex="0">
178
+ <div className="au_news_overlay">
179
+ <span className="au_news-single-print">
180
+ <a
181
+ href={printUrl}
182
+ onClick={(e) => {
183
+ e.preventDefault();
184
+ window.open(printUrl, '', 'width=1025,height=600');
185
+ }}
186
+ >
187
+ Print
188
+ </a>
189
+ </span>
190
+ <NewsLanguageChangeComponent
191
+ getItem={NewsPopUpComponent.getItem}
192
+ item={item}
193
+ lang={lang}
194
+ />
195
+ </div>
196
+ <div className="au_news_overlay_wrapper">
197
+ <h1
198
+ className="au_news_overlay_header"
199
+ dangerouslySetInnerHTML={{
200
+ __html: item.header,
201
+ }}
202
+ />
203
+ <div className="header_bg" />
204
+ <div className="au_news-single-item au_news-single2-item">
205
+ <p
206
+ className="au_news-single-subheader"
207
+ dangerouslySetInnerHTML={{
208
+ __html: item.subheader,
209
+ }}
210
+ />
211
+ {(() => {
212
+ if (item.event_from == null) {
213
+ return (
214
+ <p className="au_news-legend">
215
+ <span className="au_news-single-date">{item.date}</span>
216
+ <span>
217
+ <span className="au_news-date-author-separator"> | </span>
218
+ <span className="aunews-single-author">
219
+ <a href={`mailto:${item.author.email}`}>{item.author.name}</a>
220
+ </span>
221
+ </span>
222
+ </p>
223
+ );
224
+ }
225
+ return null;
226
+ })()}
227
+ {(() => {
228
+ if (item.image.src !== '' && item.layout === 'Standard') {
229
+ return (
230
+ <div className="news-set1-img1all">
231
+ <a href={item.image.href} title={item.image.title} rel="lightbox">
232
+ <img
233
+ src={item.image.src}
234
+ alt={item.image.title}
235
+ width={item.image.width}
236
+ height={item.image.height}
237
+ />
238
+ </a>
239
+ <p className="au_news-single2-imgcaption">{item.image.title}</p>
240
+ </div>
241
+ );
242
+ }
243
+ return null;
244
+ })()}
245
+ {(() => {
246
+ if (item.event_from) {
247
+ const fromDateSplit = item.event_from.date.split('.');
248
+ const toDateSplit = item.event_to.date.split('.');
249
+ let fromDate;
250
+ let toDate;
251
+
252
+ if (lang === 'en') {
253
+ fromDate = new Date(
254
+ parseInt(fromDateSplit[0], 10),
255
+ parseInt(fromDateSplit[1], 10) - 1,
256
+ parseInt(fromDateSplit[2], 10),
257
+ );
258
+ toDate = new Date(
259
+ parseInt(toDateSplit[0], 10),
260
+ parseInt(toDateSplit[1], 10) - 1,
261
+ parseInt(toDateSplit[2], 10),
262
+ );
263
+ } else {
264
+ fromDate = new Date(
265
+ parseInt(fromDateSplit[2], 10),
266
+ parseInt(fromDateSplit[1], 10) - 1,
267
+ parseInt(fromDateSplit[0], 10),
268
+ );
269
+ toDate = new Date(
270
+ parseInt(toDateSplit[2], 10),
271
+ parseInt(toDateSplit[1], 10) - 1,
272
+ parseInt(toDateSplit[0], 10),
273
+ );
274
+ }
275
+
276
+ const differentDays = !(
277
+ toDate.getFullYear() === fromDate.getFullYear()
278
+ && toDate.getMonth() === fromDate.getMonth()
279
+ && toDate.getDate() === fromDate.getDate()
280
+ );
281
+
282
+ return (
283
+ <div>
284
+ <table className="au_newsevent-event">
285
+ <colgroup>
286
+ <col className="first-col" />
287
+ <col className="second-col" />
288
+ </colgroup>
289
+ <tbody>
290
+ <tr className="au_newsevent_date_wrap">
291
+ <td className="au_newsevent-date-text">{labels[lang].news.eventDate}</td>
292
+ <td>
293
+ <span className="au_newsevent-from-date">
294
+ <span className="au_news_events_weekday">
295
+ {`${labels[lang].news.weekdays[fromDate.getDay()]} `}
296
+ </span>
297
+ <span className="au_news_events_date">
298
+ {`${fromDate.getDate() + (lang === 'da' ? '.' : '')} `}
299
+ </span>
300
+ <span className="au_news_events_month">
301
+ {`${labels[lang].news.months[fromDate.getMonth()]} ${fromDate.getFullYear()}`}
302
+ </span>
303
+ </span>
304
+ {(() => {
305
+ if (differentDays) {
306
+ return (
307
+ <span>
308
+ <span className="au_newsevent-to-text"> &mdash; </span>
309
+ <span className="au_newsevent-to-date">
310
+ <span className="au_news_events_weekday">
311
+ {`${labels[lang].news.weekdays[toDate.getDay()]} `}
312
+ </span>
313
+ <span className="au_news_events_date">
314
+ {`${toDate.getDate() + (lang === 'da' ? '.' : '')} `}
315
+ </span>
316
+ <span className="au_news_events_month">
317
+ {`${labels[lang].news.months[toDate.getMonth()]} ${toDate.getFullYear()}`}
318
+ </span>
319
+ </span>
320
+ </span>
321
+ );
322
+ }
323
+ return null;
324
+ })()}
325
+
326
+ </td>
327
+ </tr>
328
+ <tr className="au_newsevent-row-even">
329
+ <td className="au_newsevent-time-text">{labels[lang].news.eventTime}</td>
330
+ <td>
331
+ <span className="au_newsevent-from-time">{item.event_from.time}</span>
332
+ {(() => {
333
+ if (!differentDays) {
334
+ return (
335
+ <span>
336
+ <span className="au_newsevent-to-text"> &mdash; </span>
337
+ <span className="au_newsevent-to-time">{item.event_to.time}</span>
338
+ </span>
339
+ );
340
+ }
341
+ return null;
342
+ })()}
343
+ </td>
344
+ </tr>
345
+ <tr className="au_newsevent_where_wrap">
346
+ <td className="au_newsevent-where-text">{labels[lang].news.eventWhere}</td>
347
+ <td className="au_newsevent-where">{item.event_where}</td>
348
+ </tr>
349
+ </tbody>
350
+ </table>
351
+ {(() => {
352
+ if (item.event_regurl !== '') {
353
+ if (lang === 'da' && item.event_regfrom && item.event_regto) {
354
+ const regFromDateSplit = item.event_regfrom.date.split('.');
355
+ item.event_regfrom.date = `${regFromDateSplit[2]}.${regFromDateSplit[1]}.${regFromDateSplit[0]}`;
356
+ const regToDateSplit = item.event_regto.date.split('.');
357
+ item.event_regto.date = `${regToDateSplit[2]}.${regToDateSplit[1]}.${regToDateSplit[0]}`;
358
+ }
359
+
360
+ if (!(item.event_regfrom && item.event_regto) || (new Date() > new Date(item.event_regfrom.date.replace(/\./g, '-')) && new Date() < new Date(item.event_regto.date.replace(/\./g, '-')))) {
361
+ return (
362
+ <span className="au_newsevent_register">
363
+ <a className="button" href={(item.event_regurl.indexOf('@') > -1 ? 'mailto:' : '') + item.event_regurl}>{labels[lang].news.eventRegistration}</a>
364
+ </span>
365
+ );
366
+ }
367
+ }
368
+ return null;
369
+ })()}
370
+ </div>
371
+ );
372
+ }
373
+ return null;
374
+ })()}
375
+ {(() => {
376
+ const renderSubImages = item.subimages.map((s) => (
377
+ <div key={s.href}>
378
+ <a href={s.href} title={s.title} rel="lightbox">
379
+ <img src={s.src} alt={s.title} width={s.width} height={s.height} />
380
+ </a>
381
+ <p className="au_news-single-imgcaption">
382
+ {s.title}
383
+ </p>
384
+ </div>
385
+ ));
386
+
387
+ if (item.image.src !== '' && item.image.layout5 !== '' && item.layout === 'Alternativ 1') {
388
+ return (
389
+ <div className="au_news-single-sub-images">
390
+ <div>
391
+ <a href={item.image.href} title={item.image.title} rel="lightbox">
392
+ <img src={item.image.layout5} alt={item.image.title} />
393
+ </a>
394
+ <p className="au_news-single-imgcaption">
395
+ {item.image.title}
396
+ </p>
397
+ </div>
398
+ {renderSubImages}
399
+ </div>
400
+ );
401
+ }
402
+
403
+ if (item.subimages.length > 0 && item.image.src !== '' && item.layout === 'Standard') {
404
+ return (
405
+ <div className="au_news-single-sub-images">
406
+ {renderSubImages}
407
+ </div>
408
+ );
409
+ }
410
+ return null;
411
+ })()}
412
+ <div
413
+ className="au_news_content"
414
+ dangerouslySetInnerHTML={{
415
+ __html: item.content,
416
+ }}
417
+ />
418
+ {(() => {
419
+ if (item.event_from) {
420
+ return (
421
+ <p className="au_news-legend">
422
+ <span className="au_news-single-date">{item.date}</span>
423
+ <span>
424
+ <span className="au_news-date-author-separator"> | </span>
425
+ <span className="aunews-single-author">
426
+ <a href={`mailto:${item.author.email}`}>{item.author.name}</a>
427
+ </span>
428
+ </span>
429
+ </p>
430
+ );
431
+ }
432
+ return null;
433
+ })()}
434
+ <div className="au_news-single-news-category">
435
+ <strong>{renderCategories}</strong>
436
+ </div>
437
+ <div className="au_news-single-news-permalink">
438
+ <strong><a href={item.permalink}>{item.permalink}</a></strong>
439
+ </div>
440
+ {(() => {
441
+ if (additionalInfo) {
442
+ const renderLinks = item.links.map((l) => <a href={l.href}>{l.text}</a>);
443
+
444
+ const renderRelated = item.related.map((r) => (
445
+ <span>
446
+ <a className="au_news-related-link" href={`${AUNewsConfig.newsUrl}${r.id}`}>{r.text}</a>
447
+ {` ${r.date}`}
448
+ </span>
449
+ ));
450
+
451
+ const renderFiles = item.files.map((f) => <a href={f.href}>{f.text}</a>);
452
+
453
+ return (
454
+ <div className="au_bt_dark au_bb_dark au_news-single-additional-info">
455
+ {(() => {
456
+ if (item.links.length > 0) {
457
+ return (
458
+ <dl className="au_news-single-links">
459
+ <dt>Links</dt>
460
+ <dd>
461
+ {renderLinks}
462
+ </dd>
463
+ </dl>
464
+ );
465
+ }
466
+ return null;
467
+ })()}
468
+ {(() => {
469
+ if (item.related.length > 0) {
470
+ return (
471
+ <dl className="au_news-single-related">
472
+ <dt>{lang === 'da' ? 'Læs også' : 'Read more'}</dt>
473
+ <dd>
474
+ {renderRelated}
475
+ </dd>
476
+ </dl>
477
+ );
478
+ }
479
+ return null;
480
+ })()}
481
+ {(() => {
482
+ if (item.files.length > 0) {
483
+ return (
484
+ <dl className="au_news-single-files">
485
+ <dt>Download</dt>
486
+ <dd>
487
+ {renderFiles}
488
+ </dd>
489
+ </dl>
490
+ );
491
+ }
492
+ return null;
493
+ })()}
494
+ </div>
495
+ );
496
+ }
497
+ return null;
498
+ })()}
499
+ </div>
500
+ {(() => {
501
+ if (!item.comments_closed) {
502
+ return <div id="disqus_thread" />;
503
+ }
504
+ return null;
505
+ })()}
506
+ </div>
507
+ <NewsSocialComponent item={item} lang={lang} />
508
+ </div>
509
+ <button
510
+ type="button"
511
+ className="au_news_overlay_close"
512
+ onClick={() => {
513
+ window.location.hash = '';
514
+ }}
515
+ />
516
+ </div>
517
+ );
518
+ }
519
+ }
520
+
521
+ NewsPopUpComponent.propTypes = {
522
+ lang: PropTypes.string.isRequired,
523
+ print: PropTypes.bool.isRequired,
524
+ item: PropTypes.shape({
525
+ type: PropTypes.number.isRequired,
526
+ id: PropTypes.number.isRequired,
527
+ header: PropTypes.string.isRequired,
528
+ subheader: PropTypes.string.isRequired,
529
+ url: PropTypes.string.isRequired,
530
+ permalink: PropTypes.string.isRequired,
531
+ comments_closed: PropTypes.bool.isRequired,
532
+ links: PropTypes.arrayOf(PropTypes.shape({
533
+ href: PropTypes.string.isRequired,
534
+ text: PropTypes.string.isRequired,
535
+ })).isRequired,
536
+ categories: PropTypes.arrayOf(PropTypes.shape({
537
+ category: PropTypes.string.isRequired,
538
+ })).isRequired,
539
+ files: PropTypes.arrayOf(PropTypes.shape({
540
+ href: PropTypes.string.isRequired,
541
+ text: PropTypes.string.isRequired,
542
+ })).isRequired,
543
+ related: PropTypes.arrayOf(PropTypes.shape({
544
+ id: PropTypes.number.isRequired,
545
+ text: PropTypes.string.isRequired,
546
+ })).isRequired,
547
+ event_from: PropTypes.shape({
548
+ date: PropTypes.string,
549
+ time: PropTypes.string,
550
+ }),
551
+ event_to: PropTypes.shape({
552
+ date: PropTypes.string,
553
+ time: PropTypes.string,
554
+ }),
555
+ event_where: PropTypes.string.isRequired,
556
+ event_regfrom: PropTypes.shape({
557
+ date: PropTypes.string,
558
+ time: PropTypes.string,
559
+ }),
560
+ event_regto: PropTypes.shape({
561
+ date: PropTypes.string,
562
+ time: PropTypes.string,
563
+ }),
564
+ event_regurl: PropTypes.string.isRequired,
565
+ date: PropTypes.string.isRequired,
566
+ autor: PropTypes.shape({
567
+ email: PropTypes.string.isRequired,
568
+ name: PropTypes.string.isRequired,
569
+ }).isRequired,
570
+ image: PropTypes.shape({
571
+ src: PropTypes.string.isRequired,
572
+ href: PropTypes.string.isRequired,
573
+ title: PropTypes.string.isRequired,
574
+ width: PropTypes.string.isRequired,
575
+ height: PropTypes.string.isRequired,
576
+ layout5: PropTypes.string.isRequired,
577
+ }),
578
+ subimages: PropTypes.arrayOf(PropTypes.shape({
579
+ href: PropTypes.string.isRequired,
580
+ title: PropTypes.string.isRequired,
581
+ width: PropTypes.string.isRequired,
582
+ height: PropTypes.string.isRequired,
583
+ })),
584
+ layout: PropTypes.string.isRequired,
585
+ content: PropTypes.string.isRequired,
586
+ }).isRequired,
587
+ id: PropTypes.number.isRequired,
588
+ };
589
+
590
+ NewsPopUpComponent.displayName = 'NewsPopUpComponent';
591
+ export default NewsPopUpComponent;