hr-design-system-handlebars 1.61.4 → 1.63.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 (71) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/assets/index.css +76 -12
  3. package/dist/assets/js/components/externalService/dataWrapperContentRefresher.subfeature.js +85 -0
  4. package/dist/assets/js/components/externalService/dataWrapperNoResponsiveIframe.subfeature.js +44 -0
  5. package/dist/assets/js/components/externalService/externalServiceDs.feature.js +123 -189
  6. package/dist/views/components/content/copytext/components/externalservice.hbs +3 -78
  7. package/dist/views/components/content/copytext/copytext.hbs +10 -1
  8. package/dist/views/components/event/label_byline.ssi.hbs +1 -1
  9. package/dist/views/components/externalService/components/external_service_caption.hbs +5 -0
  10. package/{src/stories/views/components/externalService → dist/views/components/externalService/components}/external_service_data_policy.hbs +6 -6
  11. package/{src/stories/views/components/externalService → dist/views/components/externalService/components}/external_service_form_checkbox.hbs +2 -2
  12. package/dist/views/components/externalService/{external_service_load_content_button.hbs → components/external_service_load_content_button.hbs} +2 -2
  13. package/{src/stories/views/components/externalService → dist/views/components/externalService/components}/external_service_settings_button.hbs +1 -1
  14. package/dist/views/components/externalService/external_service.hbs +34 -16
  15. package/dist/views/components/externalService/external_service_with_datapolicy_check.hbs +16 -0
  16. package/dist/views_static/components/content/copytext/components/externalservice.hbs +3 -78
  17. package/dist/views_static/components/content/copytext/copytext.hbs +10 -1
  18. package/dist/views_static/components/event/label_byline.ssi.hbs +1 -1
  19. package/dist/views_static/components/externalService/components/external_service_caption.hbs +5 -0
  20. package/dist/views_static/components/externalService/{external_service_data_policy.hbs → components/external_service_data_policy.hbs} +6 -6
  21. package/dist/views_static/components/externalService/{external_service_form_checkbox.hbs → components/external_service_form_checkbox.hbs} +2 -2
  22. package/{src/stories/views/components/externalService → dist/views_static/components/externalService/components}/external_service_load_content_button.hbs +2 -2
  23. package/dist/{views/components/externalService → views_static/components/externalService/components}/external_service_settings_button.hbs +1 -1
  24. package/dist/views_static/components/externalService/external_service.hbs +34 -16
  25. package/dist/views_static/components/externalService/external_service_with_datapolicy_check.hbs +16 -0
  26. package/package.json +1 -1
  27. package/src/assets/css/custom-utilities.css +49 -15
  28. package/src/assets/fixtures/content/copytext/copytext_externalservice.json +44 -1
  29. package/src/assets/fixtures/external_service/external_service.inc.json +3 -3
  30. package/src/assets/fixtures/teaser/teaser_labels.inc.json +1 -0
  31. package/src/stories/views/components/content/copytext/components/externalservice.hbs +3 -78
  32. package/src/stories/views/components/content/copytext/copytext.hbs +10 -1
  33. package/src/stories/views/components/content/copytext/fixtures/copytext_externalservice.json +1 -1
  34. package/src/stories/views/components/event/calendar/fixtures/event_calendar_event_teaser.json +1 -1
  35. package/src/stories/views/components/event/label_byline.ssi.hbs +1 -1
  36. package/src/stories/views/components/externalService/components/external_service_caption.hbs +5 -0
  37. package/{dist/views/components/externalService → src/stories/views/components/externalService/components}/external_service_data_policy.hbs +6 -6
  38. package/{dist/views/components/externalService → src/stories/views/components/externalService/components}/external_service_form_checkbox.hbs +2 -2
  39. package/{dist/views_static/components/externalService → src/stories/views/components/externalService/components}/external_service_load_content_button.hbs +2 -2
  40. package/{dist/views_static/components/externalService → src/stories/views/components/externalService/components}/external_service_settings_button.hbs +1 -1
  41. package/src/stories/views/components/externalService/dataWrapperContentRefresher.subfeature.js +85 -0
  42. package/src/stories/views/components/externalService/dataWrapperNoResponsiveIframe.subfeature.js +44 -0
  43. package/src/stories/views/components/externalService/externalServiceDs.feature.js +123 -189
  44. package/src/stories/views/components/externalService/external_service.data.js +1 -1
  45. package/src/stories/views/components/externalService/external_service.hbs +34 -16
  46. package/src/stories/views/components/externalService/external_service.stories.js +1 -1
  47. package/src/stories/views/components/externalService/external_service_with_datapolicy_check.hbs +16 -0
  48. package/src/stories/views/components/externalService/fixtures/external_service_with_datapolicy.json +166 -0
  49. package/src/stories/views/components/grid/grid.stories.js +1 -1
  50. package/src/stories/views/components/teaser/fixtures/stage_teaser_eventtag.json +1 -1
  51. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif_single_event.json +1 -1
  52. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif_two_events.json +1 -1
  53. package/src/stories/views/components/teaser/fixtures/teaser_event_calendar_100_serif.json +1 -1
  54. package/src/stories/views/components/teaser/fixtures/teaser_standard_100_serif_single_event.json +1 -1
  55. package/src/stories/views/components/teaser/fixtures/teaser_standard_100_serif_two_events.json +1 -1
  56. package/src/stories/views/components/teaser/fixtures/teaser_standard_33_serif_multiple_events.json +1 -1
  57. package/src/stories/views/components/teaser/fixtures/teaser_standard_33_serif_single_event.json +1 -1
  58. package/src/stories/views/components/teaser/fixtures/teaser_standard_33_serif_single_event_status.json +1 -1
  59. package/src/stories/views/components/teaser/fixtures/teaser_standard_33_serif_two_events.json +1 -1
  60. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_single_event.json +1 -1
  61. package/src/stories/views/components/teaser/fixtures/teaser_standard_66_serif_single_event.json +1 -1
  62. package/dist/views/components/externalService/external_service_caption.hbs +0 -3
  63. package/dist/views/components/externalService/externalservice.hbs +0 -38
  64. package/dist/views_static/components/externalService/external_service_caption.hbs +0 -3
  65. package/dist/views_static/components/externalService/externalservice.hbs +0 -38
  66. package/src/stories/views/components/externalService/external_service_caption.hbs +0 -3
  67. package/src/stories/views/components/externalService/externalservice.hbs +0 -38
  68. package/src/stories/views/components/externalService/fixtures/external_service.json +0 -1
  69. /package/dist/views/components/externalService/{data_policy_link.hbs → components/data_policy_link.hbs} +0 -0
  70. /package/dist/views_static/components/externalService/{data_policy_link.hbs → components/data_policy_link.hbs} +0 -0
  71. /package/src/stories/views/components/externalService/{data_policy_link.hbs → components/data_policy_link.hbs} +0 -0
@@ -1,4 +1,6 @@
1
1
  import SettingsCookie from './globalSettingsCookie.subfeature'
2
+ import DataWrapperContentRefresher from './dataWrapperContentRefresher.subfeature'
3
+ import DataWrapperNoResponsiveIframe from './dataWrapperNoResponsiveIframe.subfeature'
2
4
  import {
3
5
  fireEvent,
4
6
  hr$,
@@ -12,9 +14,9 @@ import {
12
14
  } from 'hrQuery'
13
15
 
14
16
  const ExternalService = function (context) {
15
- const { options } = context,
16
- { element: rootElement } = context,
17
- rootParent = rootElement.parentNode
17
+ const { options } = context,
18
+ { element: rootElement } = context,
19
+ rootParent = rootElement.parentNode
18
20
  let dataPolicyBox = hr$('.js-datapolicy', rootElement)[0]
19
21
  const dataPolicyBoxHTML = typeof dataPolicyBox !== 'undefined' ? dataPolicyBox.outerHTML : '',
20
22
  contentSettingsButton = hr$('.js-content-settings-button', rootParent)[0],
@@ -33,22 +35,6 @@ const ExternalService = function (context) {
33
35
  settingsCookie,
34
36
  isExternalServiceLoaded = false
35
37
 
36
- const syncAppOptionsToSettingsCookie = function () {
37
- if (getJSONCookie('datapolicy')) {
38
- let dataPolicyCookie = getJSONCookie('datapolicy') || {}
39
- let objArray = Object.entries(dataPolicyCookie)
40
- objArray.forEach(([key, value]) => {
41
- settingsCookie.setCookieForOptions(key, value)
42
- })
43
- }
44
- }
45
-
46
- const setWhitelistServicesForInitialApp = function () {
47
- let whitelist = ['ard_mediathek', 'arte_concert', 'arte_concert_new', 'datawrapper_cdn']
48
- for (let i = 0; i < whitelist.length; ++i) {
49
- settingsCookie.setCookieForDataPolicy(whitelist[i], true)
50
- }
51
- }
52
38
 
53
39
  const embedExternalService = function (callback) {
54
40
  $.ajax({
@@ -84,66 +70,7 @@ const ExternalService = function (context) {
84
70
  })
85
71
  }
86
72
 
87
- const handleDatapolicy = function (event) {
88
- if (acceptAlwaysCheckbox.checked == true) {
89
- fireEvent('hr:externalService-activate-' + id)
90
- settingsCookie.setCookieForOptions(id)
91
- if (isWebview) {
92
- settingsCookie.setCookieForDataPolicy(id)
93
- }
94
- } else {
95
- loadServiceWithDataPolicyButton()
96
- console.log('External Service once loaded - ' + id)
97
- }
98
- event.stopPropagation()
99
- }
100
- const loadServiceWithDataPolicyButton = function () {
101
- if (rootElement.children[0].classList.contains('js-datapolicy')) {
102
- insertExternalService()
103
- isExternalServiceLoaded = true
104
- toggleContentSettingsButton()
105
- }
106
- }
107
- const toggleContentSettingsButton = function () {
108
- if (isExternalServiceLoaded) {
109
- contentSettingsButton.classList.remove('hideExtButton')
110
- } else {
111
- contentSettingsButton.classList.add('hideExtButton')
112
- }
113
- console.log('Toggle den Einstellungsbutton außerhalb weil ' + isExternalServiceLoaded)
114
- }
115
-
116
- const removeDatapolicyBox = function () {
117
- rootElement.innerHTML = ''
118
- rootElement.classList.remove('c-dataPolicy')
119
- }
120
-
121
- const initDataPolicy = function () {
122
- if (dataPolicyCheck) {
123
- settingsCookie = new SettingsCookie()
124
- acceptButton = hr$('.js-dataPolicy-accept', rootElement)[0]
125
- listen('click', handleDatapolicy, acceptButton)
126
- if (isWebview) {
127
- if (settingsCookie.isDataPolicyCookieAccepted(id)) {
128
- loadServiceWithDataPolicyButton()
129
- } else {
130
- dataPolicyBox.style.visibility = 'visible'
131
- }
132
- } else {
133
- if (settingsCookie.isSettingsCookieAccepted(id)) {
134
- loadServiceWithDataPolicyButton()
135
- } else {
136
- dataPolicyBox.style.visibility = 'visible'
137
- }
138
- }
139
- listen('hr:externalService-activate-' + id, loadServiceWithDataPolicyButton)
140
- listen('hr:externalService-deactivate-' + id, removeExternalService)
141
- } else {
142
- insertExternalService()
143
- }
144
- }
145
-
146
- const insertExternalService = function () {
73
+ const insertExternalService = function () {
147
74
  switch (embedType) {
148
75
  case 'js':
149
76
  switch (id) {
@@ -197,41 +124,21 @@ const ExternalService = function (context) {
197
124
  rootElement.appendChild(script)
198
125
  }
199
126
 
200
- const createDataWrapperUniqueID = function () {
201
- return Math.random()
202
- .toString(36)
203
- .replace(/[^a-z]+/g, '')
204
- .substr(2, 10)
205
- }
206
127
  const createDataWrapperEmbed = function () {
207
128
  removeDatapolicyBox()
208
- var uniqueID = createDataWrapperUniqueID()
209
- if (iFrameConfig.noResponsiveIframe == 'true') {
210
- var parentDiv = document.createElement('div')
211
- parentDiv.className = 'copytext__scrollWrapper'
212
- var div = document.createElement('div')
213
- if (iFrameConfig.aspectRatio === undefined) {
214
- div.className = 'noaspect_datawrapper_cdn'
215
- div.style.height = iFrameConfig.fixedHeight + 'px'
216
- div.style.width = '100%'
217
- } else {
218
- div.className = 'ar--' + iFrameConfig.aspectRatio + ' datawrapper_cdn'
219
- }
220
- var iframe = document.createElement('iframe')
221
- iframe.className = 'ar_iframe datawrapper_cdn'
222
- iframe.setAttribute('id', 'i_frame')
223
- iframe.setAttribute('data-isloaded', '0')
224
- iframe.setAttribute('webkitallowfullscreen', '')
225
- iframe.setAttribute('mozallowfullscreen', '')
226
- iframe.setAttribute('allowfullscreen', '')
227
- iframe.setAttribute('scrolling', 'no')
228
- iframe.setAttribute('frameborder', '0')
229
- iframe.src = embedCode
129
+ var uniqueID = function () {
130
+ return Math.random()
131
+ .toString(36)
132
+ .replace(/[^a-z]+/g, '')
133
+ .substring(2, 10)
134
+ }
135
+ let contentRefresher = new DataWrapperContentRefresher(context, uniqueID)
136
+ let noResponsiveIframe = new DataWrapperNoResponsiveIframe(context, iFrameConfig.aspectRatio, iFrameConfig.fixedHeight, embedCode)
230
137
 
231
- div.appendChild(iframe)
232
- parentDiv.appendChild(div)
233
- rootElement.appendChild(parentDiv)
234
- } else {
138
+ if (iFrameConfig.noResponsiveIframe == 'true') {
139
+ noResponsiveIframe.createNoResponsiveIframe(getAspectRatioClass())
140
+ }
141
+ else {
235
142
  var iframe = document.createElement('iframe')
236
143
  iframe.className = 'dataWrapper-embed'
237
144
  iframe.style.width = '0'
@@ -252,78 +159,7 @@ const ExternalService = function (context) {
252
159
  true
253
160
  )
254
161
  if (iFrameConfig.refreshContent == 'true') {
255
- var remainingTime
256
- var timer
257
- var iframeRefresh = document.getElementById('datawrapper-chart-' + uniqueID)
258
- var divCounter = document.createElement('div')
259
- var divOverlay = document.createElement('div')
260
- var divTextOverlay = document.createElement('div')
261
- divOverlay.id = 'overlay' + uniqueID
262
- divOverlay.style.position = 'absolute'
263
- divOverlay.style.top = '0'
264
- divOverlay.style.display = 'none'
265
- divOverlay.style.alignItems = 'center'
266
- divOverlay.style.justifyContent = 'center'
267
- divOverlay.style.backgroundColor = '#fff'
268
- divOverlay.style.width = '100%'
269
- divOverlay.style.height = 'calc(100% - 36px)'
270
- divOverlay.style.backgroundColor = '#d8e9f6'
271
- divTextOverlay.innerHTML = 'Lade Inhalt neu...'
272
- divTextOverlay.style.backgroundColor = '#005293'
273
- divTextOverlay.style.padding = '8px'
274
- divTextOverlay.style.color = '#fff'
275
- divTextOverlay.style.fontWeight = '800'
276
- divTextOverlay.style.fontFamily = 'RobotoSlab'
277
- divTextOverlay.style.borderRadius = '6px 6px 6px 6px'
278
- divOverlay.appendChild(divTextOverlay)
279
- divCounter.id = 'counter' + uniqueID
280
- divCounter.style.backgroundColor = '#006dc1'
281
- divCounter.style.color = '#fff'
282
- divCounter.style.fontSize = '12px'
283
- divCounter.style.padding = '8px'
284
- divCounter.style.borderRadius = '0 0 4px 4px'
285
- rootElement.style.position = 'relative'
286
- rootElement.appendChild(divCounter)
287
- rootElement.appendChild(divOverlay)
288
-
289
- const refreshIframe = function () {
290
- console.log('Reload')
291
- iframeRefresh.style.opacity = '0'
292
- iframeRefresh.src =
293
- iframeRefresh.src.split('?')[0] + '?_=' + new Date().getTime()
294
- clearInterval(timer)
295
- }
296
- const startCountdown = function () {
297
- remainingTime = Number(iFrameConfig.refreshIntervall)
298
- setTimeout(function () {
299
- iframeRefresh.style.opacity = '1'
300
- document.getElementById('overlay' + uniqueID).style.display = 'none'
301
- }, 1000)
302
- timer = setInterval(function () {
303
- checkTimer()
304
- }, 1000)
305
- }
306
- const checkTimer = function () {
307
- if (remainingTime >= 0) {
308
- document.getElementById('counter' + uniqueID).innerHTML =
309
- 'Dieser Inhalt wird automatisch aktualisiert in ' +
310
- secondsToTimeString(remainingTime) +
311
- ' Min.'
312
- remainingTime -= 1
313
- if (remainingTime == -1) {
314
- document.getElementById('overlay' + uniqueID).style.display = 'flex'
315
- document.getElementById('counter' + uniqueID).innerHTML =
316
- 'Zeitintervall wird neu gestartet...'
317
- }
318
- } else {
319
- refreshIframe()
320
- startCountdown()
321
- }
322
- }
323
- const secondsToTimeString = function (seconds) {
324
- return new Date(seconds * 1000).toISOString().substr(14, 5)
325
- }
326
- startCountdown()
162
+ contentRefresher.createRefresher()
327
163
  }
328
164
  }
329
165
  }
@@ -373,7 +209,7 @@ const ExternalService = function (context) {
373
209
  embedCode +
374
210
  "?utm_source=ig_embed&amp;utm_campaign=loading'" +
375
211
  "data-instgrm-version='14'" +
376
- "style='background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:660px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);' >" +
212
+ "style='background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:724px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);' >" +
377
213
  '</blockquote>'
378
214
  replaceAnimated(rootElement, instagramEmbedCode, false, reloadInstagramEmbed)
379
215
  }
@@ -415,6 +251,27 @@ const ExternalService = function (context) {
415
251
  }, 250)
416
252
  }
417
253
 
254
+ const getAspectRatioClass = function () {
255
+ switch (iFrameConfig.aspectRatio) {
256
+ case '16x9':
257
+ return "ar-16-9"
258
+ case '16x7':
259
+ return "ar-16-7"
260
+ case '4x3':
261
+ return "ar-4-3"
262
+ case '100x27':
263
+ return "ar-100-27"
264
+ case '100':
265
+ return "ar-1-1"
266
+ case '9x16':
267
+ return "ar-9-16"
268
+ case '7x16':
269
+ return "ar-7-16"
270
+ default:
271
+ return "ar-16-9"
272
+ }
273
+ }
274
+
418
275
  const loadIframe = function () {
419
276
  console.log('load iframe ' + id)
420
277
  iframe =
@@ -425,13 +282,13 @@ const ExternalService = function (context) {
425
282
  "' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"
426
283
  if (iFrameConfig.aspectRatio) {
427
284
  iframe =
428
- "<div class='copytext__scrollWrapper'><div class='ar--" +
429
- iFrameConfig.aspectRatio +
285
+ "<div class='copytext__scrollWrapper'><div class='" +
286
+ getAspectRatioClass() +
430
287
  ' ' +
431
288
  id +
432
289
  "'><iframe id='i_frame' data-isloaded='0' src='" +
433
290
  embedCode +
434
- "' frameborder='0' class='" +
291
+ "' frameborder='0' class='w-full h-full " +
435
292
  iFrameConfig.heightClass +
436
293
  ' ' +
437
294
  id +
@@ -442,14 +299,14 @@ const ExternalService = function (context) {
442
299
  iframe =
443
300
  "<div class='copytext__scrollWrapper -fixedHeight' style='height:" +
444
301
  iFrameConfig.fixedHeight +
445
- "px'><iframe data-isloaded='0' src='" +
302
+ "px'><iframe data-isloaded='0' class='w-full h-full' src='" +
446
303
  embedCode +
447
304
  "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"
448
305
  } else {
449
306
  iframe =
450
307
  "<div class='copytext__scrollWrapper " +
451
308
  id +
452
- "'><iframe data-isloaded='0' src='" +
309
+ "'><iframe data-isloaded='0' class='w-full h-full' src='" +
453
310
  embedCode +
454
311
  "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"
455
312
  }
@@ -458,6 +315,66 @@ const ExternalService = function (context) {
458
315
  replaceAnimated(rootElement, iframe, false)
459
316
  }
460
317
 
318
+ const initDataPolicy = function () {
319
+ if (dataPolicyCheck) {
320
+ settingsCookie = new SettingsCookie()
321
+ acceptButton = hr$('.js-dataPolicy-accept', rootElement)[0]
322
+ listen('click', handleDatapolicy, acceptButton)
323
+ if (isWebview) {
324
+ if (settingsCookie.isDataPolicyCookieAccepted(id)) {
325
+ loadServiceWithDataPolicyButton()
326
+ } else {
327
+ dataPolicyBox.style.visibility = 'visible'
328
+ }
329
+ } else {
330
+ if (settingsCookie.isSettingsCookieAccepted(id)) {
331
+ loadServiceWithDataPolicyButton()
332
+ } else {
333
+ dataPolicyBox.style.visibility = 'visible'
334
+ }
335
+ }
336
+ listen('hr:externalService-activate-' + id, loadServiceWithDataPolicyButton)
337
+ listen('hr:externalService-deactivate-' + id, removeExternalService)
338
+ } else {
339
+ insertExternalService()
340
+ }
341
+ }
342
+
343
+ const handleDatapolicy = function (event) {
344
+ if (acceptAlwaysCheckbox.checked == true) {
345
+ fireEvent('hr:externalService-activate-' + id)
346
+ settingsCookie.setCookieForOptions(id)
347
+ if (isWebview) {
348
+ settingsCookie.setCookieForDataPolicy(id)
349
+ }
350
+ } else {
351
+ loadServiceWithDataPolicyButton()
352
+ console.log('External Service once loaded - ' + id)
353
+ }
354
+ event.stopPropagation()
355
+ }
356
+
357
+ const loadServiceWithDataPolicyButton = function () {
358
+ if (rootElement.children[0].classList.contains('js-datapolicy')) {
359
+ insertExternalService()
360
+ isExternalServiceLoaded = true
361
+ toggleContentSettingsButton()
362
+ }
363
+ }
364
+ const toggleContentSettingsButton = function () {
365
+ if (isExternalServiceLoaded) {
366
+ contentSettingsButton.classList.remove('hidden')
367
+ } else {
368
+ contentSettingsButton.classList.add('hidden')
369
+ }
370
+ console.log('Toggle den Einstellungsbutton außerhalb weil ' + isExternalServiceLoaded)
371
+ }
372
+
373
+ const removeDatapolicyBox = function () {
374
+ rootElement.innerHTML = ''
375
+ rootElement.classList.remove('c-dataPolicy')
376
+ }
377
+
461
378
  const removeExternalService = function () {
462
379
  replaceAnimated(rootElement, dataPolicyBoxHTML, true, reinitiateDataPolicyBox)
463
380
  }
@@ -471,6 +388,23 @@ const ExternalService = function (context) {
471
388
  initDataPolicy()
472
389
  toggleContentSettingsButton()
473
390
  }
391
+
392
+ const syncAppOptionsToSettingsCookie = function () {
393
+ if (getJSONCookie('datapolicy')) {
394
+ let dataPolicyCookie = getJSONCookie('datapolicy') || {}
395
+ let objArray = Object.entries(dataPolicyCookie)
396
+ objArray.forEach(([key, value]) => {
397
+ settingsCookie.setCookieForOptions(key, value)
398
+ })
399
+ }
400
+ }
401
+
402
+ const setWhitelistServicesForInitialApp = function () {
403
+ let whitelist = ['ard_mediathek', 'arte_concert', 'arte_concert_new', 'datawrapper_cdn']
404
+ for (let i = 0; i < whitelist.length; ++i) {
405
+ settingsCookie.setCookieForDataPolicy(whitelist[i], true)
406
+ }
407
+ }
474
408
  const resetCheckboxForPermanentService = function () {
475
409
  /*Die Autocompletion des Browsers merkt sich die Zustände von Formularelementen nach einem Refresh, das wird hier hart zurückgesetzt*/
476
410
  var clist = document.getElementsByClassName('js-dataPolicy-acceptPermanentely')
@@ -1,80 +1,5 @@
1
- {{~#if (isStorybook)~}}
2
-
3
- {{#with this.toModel.externalService}}
4
-
5
- <!--div>serviceUrl: <b>{{this.serviceUrl}}</b></div-->
6
- <div>externalServiceName: <b>{{this.externalServiceConfig.externalServiceName}}</b></div>
7
- <div>makeConfigurable: <b>{{this.externalServiceConfig.makeConfigurable}}</b></div>
8
- <div>externalServiceId: <b>{{this.externalServiceConfig.externalServiceId}}</b></div>
9
- <div>externalServiceEmbedType: <b>{{this.externalServiceConfig.externalServiceEmbedType}}</b></div>
10
- <div>embedAsIFrame: <b>{{this.externalServiceConfig.embedAsIFrame}}</b></div>
11
- <div>fixedHeight: <b>{{this.fixedHeight}}</b></div>
12
- <div>aspectRatio: <b>{{this.aspectRatio}}</b></div>
13
- <div>setResponsiveIframe: <b>{{this.setResponsiveIframe}}</b></div>
14
- <div>setTimedReloadIframe: <b>{{this.setTimedReloadIframe}}</b></div>
15
- <div>setTimeForReload: <b>{{this.setTimeForReload}}</b></div>
16
- <div>externalServiceCaption: <b>{{this.externalServiceCaption}}</b></div>
17
-
18
- {{> components/externalService/externalservice }}
1
+ {{#with this.toModel.externalService}}
19
2
 
20
- {{/with}}
3
+ {{> components/externalService/external_service }}
21
4
 
22
- {{~else~}}
23
- {{#with this.toModel.externalService}}
24
- {{#if this.externalServiceConfig.makeConfigurable}}
25
- {{~> modules/externalService/externalService~}}
26
- {{else}}
27
- {{#if this.externalServiceConfig.embedAsIFrame}}
28
- {{#if this.fixedHeight}}
29
- {{#if this.serviceUrl}}
30
- <div class="copytext__externalService">
31
- {{~> base/a11y/hiddenText _locaTag="story_externalservice_intro_sr" ~}}
32
- <div class="copytext__scrollWrapper -fixedHeight"
33
- style="height:{{this.fixedHeight}}px;">
34
- <iframe frameborder="0" width="100%" height="100%"
35
- src="{{{this.serviceUrl}}}" webkitallowfullscreen mozallowfullscreen
36
- allowfullscreen scrolling='no'></iframe>
37
- </div>
38
- {{~> base/a11y/hiddenText _locaTag="story_externalservice_outro_sr" ~}}
39
- {{#with this.externalServiceCaption}}
40
- <div class="copytext__captionLine">
41
- <span class="figcaption">{{this}}</span>
42
- </div>
43
- {{/with}}
44
- </div>
45
- {{/if}}
46
- {{else}}
47
- {{#if this.serviceUrl}}
48
- <div class="copytext__externalService">
49
- {{~> base/a11y/hiddenText _locaTag="story_externalservice_intro_sr" ~}}
50
- <div class="copytext__scrollWrapper">
51
- <div class="ar--{{defaultIfEmpty this.aspectRatio "auto"}}">
52
- <iframe frameborder="0" class="ar__content" width="100%" height="100%"
53
- src="{{{this.serviceUrl}}}" webkitallowfullscreen
54
- mozallowfullscreen allowfullscreen></iframe>
55
- </div>
56
- </div>
57
- {{#with this.externalServiceCaption}}
58
- <div class="copytext__captionLine">
59
- <span class="figcaption">{{this}}</span>
60
- </div>
61
- {{/with}}
62
- {{~> base/a11y/hiddenText _locaTag="story_externalservice_outro_sr" ~}}
63
- </div>
64
- {{/if}}
65
- {{/if}}
66
- {{else}}
67
- <div class="copytext__externalService">
68
- <div class="c-externalService__{{this.externalServiceConfig.externalServiceId}} js-load"
69
- data-hr-external-service='{"id":"{{this.externalServiceConfig.externalServiceId}}","embedCode":"{{this.serviceUrl}}", "embedType": "{{this.externalServiceConfig.externalServiceEmbedType}}", "dataPolicyCheck": false, "iFrameConfig":{}}'>
70
- </div>
71
- {{#with this.externalServiceCaption}}
72
- <div class="copytext__captionLine js-externalservice__caption">
73
- <span class="figcaption">{{this}}</span>
74
- </div>
75
- {{/with}}
76
- </div>
77
- {{/if}}
78
- {{/if}}
79
- {{/with}}
80
- {{~/if~}}
5
+ {{/with}}
@@ -127,4 +127,13 @@
127
127
  {{> components/content/copytext/components/jobposting }}
128
128
  {{/if}}
129
129
  {{/each}}
130
- </div>
130
+ </div>
131
+ {{! Globaler Einstellungsbutton; nur für Copytext/Externe Dienste Story;
132
+ damit der Einstellungsdialog aufgerufen werden kann }}
133
+ {{~#if (isStorybook)~}}
134
+ {{#with @root.dataPolicy}}
135
+ <div class="p-4 bg-footer-bg mt-14">
136
+ {{~> components/dataPolicySettings/data_policy_settings ~}}
137
+ </div>
138
+ {{/with}}
139
+ {{~/if~}}
@@ -3,7 +3,7 @@
3
3
  {{> components/event/event_status _css="ml-2" _status=(loca this.statusDescriptionForLabelShort)}}
4
4
  {{else}}
5
5
  {{#> components/text/byline _css="ml-2"}}
6
- {{this.startDateTime.date}}, {{this.startDateTime.time}} Uhr
6
+ {{this.startDateTime.date}}{{#if this.hasStartTime}}, {{this.startDateTime.time}} Uhr{{/if}}
7
7
  {{/components/text/byline}}
8
8
  {{/if}}
9
9
  {{/with}}
@@ -0,0 +1,5 @@
1
+ {{#with this.externalServiceCaption}}
2
+ <div class="py-2.5">
3
+ <span class="text-sm font-copy dark:text-text-dark">{{this}}</span>
4
+ </div>
5
+ {{/with}}
@@ -1,19 +1,19 @@
1
- <div id="service--{{nextRandom}}" class="p-10 sm:mx-0 col-span-12 grid bg-highlight-1 rounded-tl-hr rounded-br-hr js-datapolicy">
1
+ <div id="service--{{nextRandom}}" class="grid col-span-12 p-10 sm:mx-0 bg-highlight-1 rounded-tl-hr rounded-br-hr js-datapolicy">
2
2
  <h3 class="text-2xl font-headingSerif">
3
3
  {{loca "ext_service_datapolicy_headline" this.externalServiceConfig.externalServiceName}}
4
4
  </h3>
5
5
  <div class="">
6
6
  <p class="pt-4 text-base font-copy">
7
7
  {{loca "ext_service_datapolicy_text" this.externalServiceConfig.externalServiceName}}
8
- {{~> components/externalService/data_policy_link ~}}
8
+ {{~> components/externalService/components/data_policy_link ~}}
9
9
  </p>
10
10
  <div class="pt-4">
11
- {{~> components/externalService/external_service_form_checkbox ~}}
11
+ {{~> components/externalService/components/external_service_form_checkbox ~}}
12
12
  </div>
13
- <div class="pt-4 float-right">
13
+ <div class="float-right pt-4">
14
14
  {{#with this}}
15
15
  <div class="inline-flex">
16
- {{~> components/externalService/external_service_settings_button ~}}
16
+ {{~> components/externalService/components/external_service_settings_button ~}}
17
17
  {{#*inline "htmlProperties"}}
18
18
  data-piano-tracking='{"label":"DSGVO-Overlay"}'
19
19
  data-a11y-dialog-show="datapolicy-settings-dialog"
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  {{/with}}
23
23
  <div class="inline-flex">
24
- {{~> components/externalService/external_service_load_content_button ~}}
24
+ {{~> components/externalService/components/external_service_load_content_button ~}}
25
25
  {{#*inline "htmlProperties"}}{{/inline}}
26
26
  </div>
27
27
  </div>
@@ -1,11 +1,11 @@
1
1
  <fieldset>
2
2
  <div class="mt-6 space-y-6">
3
3
  <div class="relative flex gap-x-3">
4
- <div class="flex h-6 items-center">
4
+ <div class="flex items-center h-6">
5
5
  <input id="dataPolicyAcceptPermanently-{{getRandom}}" name="dataPolicyAcceptPermanently"
6
6
  title="Externe Inhalte von {{this.externalServiceConfig.externalServiceName}} zukünftig immer laden."
7
7
  placeholder="Externe Inhalte von {{this.externalServiceConfig.externalServiceName}} zukünftig immer laden."
8
- value="0" required="" type="checkbox" class="h-6 w-6 rounded border-gray text-indigo focus:ring-indigo">
8
+ value="0" required="" type="checkbox" class="w-6 h-6 rounded js-dataPolicy-acceptPermanentely border-gray text-indigo focus:ring-indigo">
9
9
  </div>
10
10
  <div class="text-sm leading-6">
11
11
  <label for="dataPolicyAcceptPermanently-{{getRandom}}" class="text-base font-copy">
@@ -1,4 +1,4 @@
1
- {{#> components/button/button _size="md" _variant="primary" _css="" _type="button"}}
2
- {{> components/button/components/button_label _label="Inhalte anzeigen"}}
1
+ {{#> components/button/button _size="md" _variant="primary" _css="js-dataPolicy-accept" _type="submit"}}
3
2
  {{> components/button/components/button_icon _icon="reload" _iconmap="icons"}}
3
+ {{> components/button/components/button_label _label="Inhalte anzeigen"}}
4
4
  {{/components/button/button}}
@@ -1,6 +1,6 @@
1
1
  {{#> components/button/button _size="md" _variant="tertiary" _css="" _type="button"}}
2
- {{> components/button/components/button_label _label="Einstellungen"}}
3
2
  {{> components/button/components/button_icon _icon="settings" _iconmap="icons"}}
3
+ {{> components/button/components/button_label _label="Einstellungen"}}
4
4
  {{/components/button/button}}
5
5
  {{#*inline "htmlProperties"}}
6
6
  data-piano-tracking='{"label":"","secondLevelId":}'
@@ -1,17 +1,35 @@
1
- <div class="grid">
2
- {{~> components/base/a11y/hiddenText _locaTag="story_externalservice_intro_sr" ~}}
3
- <div class="c-externalService c-externalService__{{this.externalServiceConfig.externalServiceId}} js-load"
4
- data-hr-external-service='{"id":"{{this.externalServiceConfig.externalServiceId}}","embedCode":"{{this.serviceUrl}}", "embedType": "{{this.externalServiceConfig.externalServiceEmbedType}}", "dataPolicyCheck": true,"iFrameConfig": {"heightClass":"ar_iframe"{{#if
5
- this.fixedHeight}},"fixedHeight":"{{this.fixedHeight}}", "fixedHeightClass":"-fixedHeight"{{else}},{{#if
6
- this.aspectRatio}}"aspectRatio":"{{this.aspectRatio}}"{{else}}"aspectRatio":"16x9"{{/if}}{{/if}},"noResponsiveIframe":"{{{this.setResponsiveIframe}}}","refreshContent":"{{{this.setTimedReloadIframe}}}","refreshIntervall":"{{this.setTimeForReload}}"}}'>
7
- {{~> components/externalService/external_service_data_policy ~}}
1
+ {{#if this.externalServiceConfig.makeConfigurable}}
2
+
3
+ {{> components/externalService/external_service_with_datapolicy_check }}
4
+
5
+ {{else}}
6
+
7
+ {{#if this.serviceUrl}}
8
+ <div class="clear-both mt-10">
9
+ <span class="sr-only">{{loca "story_externalservice_intro_sr" }}</span>
10
+ {{#if this.externalServiceConfig.embedAsIFrame}}
11
+
12
+ <div class="{{#if this.fixedHeight}}overflow-y-hidden{{else}}overflow-hidden{{/if}}" {{#if this.fixedHeight}}style="height:{{this.fixedHeight}}px;"{{/if}}>
13
+ {{#unless this.fixedHeight}}<div class="{{~inline-switch this.aspectRatio '["16x9","16x7","4x3","100x27","100","9x16","7x16"]' '["ar-16-9","ar-16-7","ar-4-3","ar-100-27","ar-1-1","ar-9-16","ar-7-16","ar-16-9"]'~}}">{{/unless}}
14
+ <iframe frameborder="0" width="100%" height="100%"
15
+ src="{{{this.serviceUrl}}}" webkitallowfullscreen mozallowfullscreen
16
+ allowfullscreen scrolling='no'>
17
+ </iframe>
18
+ {{#unless this.fixedHeight}}</div>{{/unless}}
19
+ </div>
20
+
21
+ {{else}}
22
+
23
+ <div class="c-externalService__{{this.externalServiceConfig.externalServiceId}} js-load"
24
+ data-hr-external-service-ds='{"id":"{{this.externalServiceConfig.externalServiceId}}","embedCode":"{{this.serviceUrl}}", "embedType": "{{this.externalServiceConfig.externalServiceEmbedType}}", "dataPolicyCheck": false, "iFrameConfig":{}}'>
25
+ </div>
26
+
27
+ {{/if}}
28
+
29
+ {{~> components/externalService/components/external_service_caption ~}}
30
+
31
+ <span class="sr-only">{{loca "story_externalservice_outro_sr" }}</span>
8
32
  </div>
9
- {{~> components/externalService/external_service_caption ~}}
10
- {{~> components/base/a11y/hiddenText _locaTag="story_externalservice_outro_sr" ~}}
11
- <div >
12
- <div class="float-right">
13
- {{~> components/externalService/external_service_settings_button ~}}
14
- </div>
15
- </div>
16
- </div>
17
- {{~> components/dataPolicySettings/data_policy_settings ~}}
33
+ {{/if}}
34
+
35
+ {{/if}}