pageflow 15.3.0 → 15.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +158 -353
  3. data/README.md +2 -3
  4. data/app/assets/javascripts/pageflow/dist/ui.js +99 -32
  5. data/app/assets/javascripts/pageflow/vendor.js +0 -1
  6. data/app/assets/stylesheets/pageflow/editor/base.scss +3 -2
  7. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +1 -1
  8. data/app/assets/stylesheets/pageflow/editor/select_button.scss +1 -1
  9. data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -1
  10. data/app/assets/stylesheets/pageflow/entries.scss +1 -1
  11. data/app/assets/stylesheets/pageflow/loading_spinner.scss +4 -1
  12. data/app/assets/stylesheets/pageflow/navigation_mobile.scss +4 -4
  13. data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +1 -1
  14. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +1 -1
  15. data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +1 -1
  16. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar.scss +1 -1
  17. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +1 -1
  18. data/app/assets/stylesheets/pageflow/themes/default/player_controls/shared/menu_bar.scss +2 -2
  19. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss +2 -2
  20. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +1 -1
  21. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/quality_menu.scss +2 -2
  22. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/wave.scss +1 -1
  23. data/app/assets/stylesheets/pageflow/ui/forms.scss +9 -2
  24. data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +2 -2
  25. data/app/models/pageflow/account_role_query.rb +1 -1
  26. data/app/models/pageflow/managed_user_query.rb +1 -1
  27. data/app/policies/pageflow/folder_policy.rb +2 -2
  28. data/app/policies/pageflow/membership_policy.rb +2 -2
  29. data/app/policies/pageflow/theming_policy.rb +2 -2
  30. data/app/policies/pageflow/user_policy.rb +1 -1
  31. data/app/views/pageflow/video_files/_video_file.json.jbuilder +8 -1
  32. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +103 -36
  33. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +42 -15
  34. data/entry_types/paged/app/assets/javascripts/pageflow_paged/vendor.js +1 -0
  35. data/entry_types/paged/app/assets/javascripts/pageflow_paged/videojs.js +6 -0
  36. data/entry_types/paged/app/views/layouts/pageflow_paged/_loading_spinner_inline_script.html.erb +1 -0
  37. data/entry_types/paged/app/views/layouts/pageflow_paged/application.html.erb +1 -1
  38. data/entry_types/paged/app/views/pageflow_paged/editor/entries/_head.html.erb +2 -0
  39. data/entry_types/paged/lib/tasks/pageflow_paged_tasks.rake +7 -0
  40. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/dash.all.min.js +0 -0
  41. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs-dash.js +0 -0
  42. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs.js +0 -0
  43. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +2 -0
  44. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +1 -0
  45. data/entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb +21 -0
  46. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +12 -5
  47. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +5 -7
  48. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +1 -0
  49. data/entry_types/scrolled/app/views/pageflow_scrolled/favicons/_entry.html.erb +10 -0
  50. data/entry_types/scrolled/config/locales/de.yml +655 -0
  51. data/entry_types/scrolled/config/locales/en.yml +522 -0
  52. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +5 -0
  53. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-192x192.png +0 -0
  54. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-512x512.png +0 -0
  55. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/apple-touch-icon.png +0 -0
  56. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/browserconfig.xml +9 -0
  57. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-16x16.png +0 -0
  58. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-32x32.png +0 -0
  59. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon.ico +0 -0
  60. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/mstile-150x150.png +0 -0
  61. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/safari-pinned-tab.svg +46 -0
  62. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/site.webmanifest +19 -0
  63. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/unmute.mp3 +0 -0
  64. data/entry_types/scrolled/lib/tasks/pageflow_scrolled_tasks.rake +1 -0
  65. data/entry_types/scrolled/package/contentElements-editor.js +14 -1
  66. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  67. data/entry_types/scrolled/package/contentElements-frontend.js +338 -104
  68. data/entry_types/scrolled/package/editor.js +594 -242
  69. data/entry_types/scrolled/package/frontend/{EditableText-4264c349.js → EditableText-43c50894.js} +331 -163
  70. data/entry_types/scrolled/package/frontend/{Wavesurfer-c3c45324.js → Wavesurfer-b88b02e0.js} +0 -3
  71. data/entry_types/scrolled/package/frontend/{components-cfe6a479.js → components-3ead1b4a.js} +509 -91
  72. data/entry_types/scrolled/package/frontend/index.css +2 -2
  73. data/entry_types/scrolled/package/frontend/index.js +2107 -1025
  74. data/entry_types/scrolled/package/package.json +15 -3
  75. data/lib/generators/pageflow/initializer/templates/pageflow.rb +2 -1
  76. data/lib/pageflow/engine.rb +0 -1
  77. data/lib/pageflow/themes.rb +4 -0
  78. data/lib/pageflow/version.rb +1 -1
  79. data/package/config/jest/index.js +7 -2
  80. data/package/config/webpack.js +1 -2
  81. data/package/editor.js +4 -4
  82. data/package/frontend.js +30 -13
  83. data/package/ui.js +99 -32
  84. metadata +25 -11
  85. data/app/assets/javascripts/pageflow/videojs.js +0 -6
  86. data/entry_types/scrolled/config/locales/new/de.yml +0 -601
  87. data/entry_types/scrolled/config/locales/new/en.yml +0 -507
@@ -24,6 +24,11 @@ module PageflowScrolled
24
24
  gsub_file('config/webpacker.yml',
25
25
  'extract_css: false',
26
26
  'extract_css: true')
27
+
28
+ inject_into_file('config/webpacker.yml',
29
+ after: "- .woff2\n") do
30
+ " - .mp3\n - .webmanifest\n - .xml\n"
31
+ end
27
32
  end
28
33
 
29
34
  def editor_pack
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/packs/media/pageflow-scrolled/themes/default/favicons/mstile-150x150-b864e2984146784ebc748b287926ef50.png"/>
6
+ <TileColor>#da532c</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="678.000000pt" height="678.000000pt" viewBox="0 0 678.000000 678.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.11, written by Peter Selinger 2001-2013
9
+ </metadata>
10
+ <g transform="translate(0.000000,678.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M3879 5786 c-2 -2 -42 -7 -89 -10 -47 -3 -96 -8 -110 -11 -14 -3 -41
13
+ -8 -60 -11 -41 -7 -113 -28 -190 -56 -54 -19 -220 -97 -230 -108 -3 -3 -21
14
+ -14 -40 -24 -119 -65 -214 -149 -648 -581 -327 -325 -474 -478 -528 -550 -41
15
+ -55 -79 -105 -84 -111 -18 -23 -100 -181 -129 -250 -38 -89 -77 -224 -88 -301
16
+ -10 -70 -9 -306 0 -348 4 -16 10 -46 13 -65 3 -19 10 -43 15 -52 5 -10 7 -18
17
+ 5 -18 -10 0 46 -136 86 -210 92 -172 123 -205 1073 -1158 l920 -923 480 482
18
+ c482 483 537 546 634 711 39 67 111 227 111 247 0 6 4 19 10 29 8 16 46 178
19
+ 49 212 21 250 -13 446 -110 641 -42 85 -138 230 -181 272 -33 33 -35 46 -10
20
+ 73 17 18 74 96 97 132 60 94 142 251 150 287 1 5 7 23 14 39 14 34 49 167 57
21
+ 217 14 80 13 296 -1 368 -21 105 -60 221 -105 310 -38 76 -134 224 -167 259
22
+ -10 10 -43 45 -74 78 -163 173 -331 289 -510 355 -109 40 -186 57 -290 64 -26
23
+ 1 -51 5 -57 9 -5 3 -11 4 -13 2z m141 -206 c80 -15 167 -44 242 -81 60 -30
24
+ 203 -125 235 -156 19 -18 0 -37 -809 -848 -501 -503 -852 -862 -888 -910 -33
25
+ -44 -64 -85 -68 -90 -5 -6 -11 -15 -13 -20 -2 -6 -21 -39 -41 -75 -33 -58
26
+ -102 -211 -113 -252 -2 -5 -4 -10 -5 -13 -1 -3 -3 -8 -4 -12 -2 -5 -8 -26 -14
27
+ -48 -6 -22 -14 -53 -16 -70 -3 -16 -9 -41 -12 -55 -12 -52 -12 -301 1 -355 7
28
+ -30 9 -55 5 -55 -13 0 -435 435 -465 480 -16 25 -35 50 -42 57 -20 22 -112
29
+ 217 -123 263 -46 190 -47 336 -4 504 42 161 143 357 258 501 40 50 888 902
30
+ 936 940 76 61 273 186 300 191 3 0 30 12 60 26 179 83 395 112 580 78z m693
31
+ -466 c187 -249 246 -497 191 -789 -22 -116 -138 -374 -206 -460 -5 -5 -27 -35
32
+ -50 -65 -23 -30 -240 -255 -482 -498 -502 -505 -448 -449 -507 -527 -159 -209
33
+ -266 -461 -294 -690 -6 -53 -7 -191 0 -235 2 -19 7 -56 10 -82 4 -26 10 -62
34
+ 16 -80 7 -27 -35 11 -219 198 -250 253 -253 257 -304 329 -83 117 -161 302
35
+ -175 415 -11 86 -5 255 11 325 9 39 19 81 22 95 3 13 10 30 16 37 6 7 8 13 5
36
+ 13 -4 0 6 28 22 63 15 34 34 77 42 95 7 17 17 32 20 32 4 0 9 8 12 19 2 10 31
37
+ 58 63 107 50 77 175 207 898 932 462 463 843 842 847 842 3 0 31 -34 62 -76z
38
+ m-34 -1678 c28 -35 51 -68 51 -74 0 -6 4 -12 8 -14 24 -9 127 -231 138 -298 3
39
+ -14 7 -32 10 -40 17 -48 22 -213 9 -310 -10 -72 -48 -204 -80 -273 -14 -31
40
+ -25 -58 -25 -60 0 -7 -82 -151 -90 -157 -3 -3 -18 -25 -34 -49 -43 -66 -61
41
+ -85 -469 -495 l-378 -379 -29 33 c-16 18 -42 51 -57 74 -15 22 -31 42 -35 44
42
+ -5 2 -8 8 -8 13 0 5 -11 26 -24 47 -27 44 -93 204 -100 247 -3 17 -9 51 -14
43
+ 76 -21 110 -6 263 42 449 8 29 77 185 98 220 105 174 132 206 532 608 220 221
44
+ 401 402 402 402 1 0 25 -29 53 -64z"/>
45
+ </g>
46
+ </svg>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/packs/media/pageflow-scrolled/themes/default/favicons/android-chrome-192x192-51c13a8bffeb2de9cad6501969363159.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/packs/media/pageflow-scrolled/themes/default/favicons/android-chrome-512x512-a4f131c6059e0d4b2f15e5f9aecfcf16.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
@@ -7,6 +7,7 @@ namespace :pageflow_scrolled do
7
7
 
8
8
  namespace :storybook do
9
9
  namespace :seed do
10
+ desc 'Recreate storybook entry and set up storybook JSON seed from it'
10
11
  task :setup, [:output] => [:destroy_entry, :create_entry, :generate_json]
11
12
 
12
13
  desc 'Destroy entry to generate Storybook entry JSON seed from'
@@ -79,8 +79,13 @@ editor.contentElementTypes.register('textBlock', {
79
79
  })];
80
80
  },
81
81
  merge: function merge(configurationA, configurationB) {
82
+ // Value might still be empty if text block has not been edited
83
+ var value = (configurationA.value || []).concat(configurationB.value || []);
82
84
  return _objectSpread2(_objectSpread2({}, configurationA), {}, {
83
- value: configurationA.value.concat(configurationB.value)
85
+ // Slate.js does not like empty arrays as value.
86
+ // `inlineEditing/EditableText` sets default value, but only if
87
+ // `value` is falsy.
88
+ value: value.length ? value : undefined
84
89
  });
85
90
  },
86
91
  handleDestroy: function handleDestroy(contentElement) {
@@ -464,6 +469,14 @@ editor.contentElementTypes.register('dataWrapperChart', {
464
469
  permitHttps: true
465
470
  });
466
471
  this.view(DatawrapperAdView);
472
+ this.input('title', TextInputView, {
473
+ placeholder: I18n.t('pageflow_scrolled.public.chart.default_title')
474
+ });
475
+ this.input('backgroundColor', ColorInputView, {
476
+ defaultValue: '#323d4d'
477
+ });
478
+ this.group('ContentElementCaption');
479
+ this.group('ContentElementPosition');
467
480
  });
468
481
  }
469
482
  });
@@ -1 +1 @@
1
- .Heading-module_root__33TFw{margin-top:.2em;margin-bottom:0;padding-top:.3em}@media (orientation:landscape){.Heading-module_first__1PMJX{padding-top:25%}}.BeforeAfter-module_sliderStart__2C5cN{background-color:#fff;position:absolute;z-index:1}.BeforeAfter-module_container__2Lm06{--frame1pos:-8;--frame2pos:16;--frame3pos:-32;--frame4pos:32;--frame1px:calc(var(--frame1pos)*1px);--frame2px:calc(var(--frame2pos)*1px);--frame3px:calc(var(--frame3pos)*1px);--frame4px:calc(var(--frame4pos)*1px)}.BeforeAfter-module_container__2Lm06.BeforeAfter-module_wiggle__3nVSe div div:nth-child(3){-webkit-animation:BeforeAfter-module_SliderLeftRightShake__2mcn5 1.5s cubic-bezier(.36,.07,.19,.97) both;animation:BeforeAfter-module_SliderLeftRightShake__2mcn5 1.5s cubic-bezier(.36,.07,.19,.97) both}.BeforeAfter-module_container__2Lm06.BeforeAfter-module_wiggle__3nVSe div img:nth-child(2){-webkit-animation:BeforeAfter-module_BeforeImageLeftRightShake__38m9V 1.5s cubic-bezier(.36,.07,.19,.97) both;animation:BeforeAfter-module_BeforeImageLeftRightShake__38m9V 1.5s cubic-bezier(.36,.07,.19,.97) both}.BeforeAfter-module_container__2Lm06 div div:nth-child(4) div{transition:opacity .1s ease-out .3s!important}.BeforeAfter-module_container__2Lm06.BeforeAfter-module_wiggle__3nVSe div img:first-child{-webkit-animation:BeforeAfter-module_AfterImageLeftRightShake__3WMf1 1.5s cubic-bezier(.36,.07,.19,.97) both;animation:BeforeAfter-module_AfterImageLeftRightShake__3WMf1 1.5s cubic-bezier(.36,.07,.19,.97) both}.BeforeAfter-module_container__2Lm06 div div:nth-child(5) div{transition:opacity .1s ease-out .3s!important}@-webkit-keyframes BeforeAfter-module_BeforeImageLeftRightShake__38m9V{10%,90%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame1px)),auto,auto)}20%,80%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame2px)),auto,auto)}30%,50%,70%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame3px)),auto,auto)}40%,60%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame4px)),auto,auto)}}@keyframes BeforeAfter-module_BeforeImageLeftRightShake__38m9V{10%,90%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame1px)),auto,auto)}20%,80%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame2px)),auto,auto)}30%,50%,70%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame3px)),auto,auto)}40%,60%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame4px)),auto,auto)}}@-webkit-keyframes BeforeAfter-module_AfterImageLeftRightShake__3WMf1{10%,90%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame1px)))}20%,80%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame2px)))}30%,50%,70%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame3px)))}40%,60%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame4px)))}}@keyframes BeforeAfter-module_AfterImageLeftRightShake__3WMf1{10%,90%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame1px)))}20%,80%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame2px)))}30%,50%,70%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame3px)))}40%,60%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame4px)))}}@-webkit-keyframes BeforeAfter-module_SliderLeftRightShake__2mcn5{10%,90%{transform:translate3d(-20%,0,0)}20%,80%{transform:translate3d(40%,0,0)}30%,50%,70%{transform:translate3d(-80%,0,0)}40%,60%{transform:translate3d(80%,0,0)}}@keyframes BeforeAfter-module_SliderLeftRightShake__2mcn5{10%,90%{transform:translate3d(-20%,0,0)}20%,80%{transform:translate3d(40%,0,0)}30%,50%,70%{transform:translate3d(-80%,0,0)}40%,60%{transform:translate3d(80%,0,0)}}.SoundDisclaimer-module_soundDisclaimer__31hWh{text-align:center;border:1px solid;border-radius:4px;cursor:pointer;font-size:inherit}.SoundDisclaimer-module_soundDisclaimer__31hWh:hover{background:hsla(0,0%,100%,.25)}.TextBlock-module_text__21Hk4 h2,.TextBlock-module_text__21Hk4 li,.TextBlock-module_text__21Hk4 p{margin:1em 0 0}.TextBlock-module_text__21Hk4 a{color:currentColor;word-wrap:break-word}.TextBlock-module_text__21Hk4 ol,.TextBlock-module_text__21Hk4 ul{margin:0;padding-left:20px}.TextBlock-module_text__21Hk4 blockquote{padding:.5em 1em .5em 2em;margin:1em 0 0 .5em;position:relative}.TextBlock-module_text__21Hk4 blockquote:before{content:"\201C";font-size:3em;font-weight:700;color:#aaa;position:absolute;top:0;left:0;line-height:1em}.VideoEmbed-module_embedPlayer__54NKG{background-color:#000;position:absolute;top:0;left:0;bottom:0;right:0}.ExternalLink-module_hidden__3jer0{display:none}.ExternalLink-module_link_item__Blypv{width:45%;max-width:45%;vertical-align:top;margin:2% auto;background-color:#fff;color:#000;text-decoration:none;transition:transform .3s}.ExternalLink-module_link_item__Blypv.ExternalLink-module_invert__1zrgN{background-color:#222;color:#fff}.ExternalLink-module_link_item__Blypv.ExternalLink-module_layout_center__3NRpQ{width:29%;max-width:29%}.ExternalLink-module_link_item__Blypv:hover{transform:scale(1.05)}.ExternalLink-module_link_item__Blypv:hover .ExternalLink-module_link_title__FZJ-0{text-decoration:underline}.ExternalLink-module_link_thumbnail__2_BHq{width:auto;background-repeat:no-repeat;background-size:cover;padding-top:56.25%;position:relative}.ExternalLink-module_link_details__lRhKU{margin:20px}.ExternalLink-module_link_details__lRhKU>.ExternalLink-module_link_title__FZJ-0{font-size:1.2em;font-weight:700;margin-bottom:20px}.ExternalLink-module_link_details__lRhKU>p{width:100%;white-space:normal;line-height:1.3em}.ExternalLink-module_tooltip__18MpC{position:absolute;left:50%;top:80px;width:180px;padding:5px;margin-left:-95px;background-color:#444;color:#fff;border:1px solid #fff;opacity:.9;font-size:13px;text-align:center;white-space:normal}.ExternalLink-module_tooltip__18MpC>span{display:block;color:#fff;text-decoration:underline}.ExternalLinkList-module_ext_links_container__16IIo{display:flex;flex-wrap:wrap;border-collapse:separate;border-spacing:10px;min-height:240px;width:auto;height:auto;pointer-events:all;position:relative;transition:opacity .5s;transition-timing-function:cubic-bezier(.1,.57,.1,1);transition-duration:0ms}.DataWrapperChart-module_container__2eZ15{min-height:200px;background-color:rgba(0,0,0,.5)}.DataWrapperChart-module_container__2eZ15>iframe{width:100%;height:100%;position:relative;top:0}
1
+ .Heading-module_root__33TFw{-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;word-wrap:break-word;margin-top:.2em;margin-bottom:0;padding-top:.3em}@media (orientation:landscape){.Heading-module_first__1PMJX{padding-top:25%}}.BeforeAfter-module_sliderStart__2C5cN{background-color:#fff;position:absolute;z-index:1}.BeforeAfter-module_container__2Lm06{height:100%;--frame1pos:-8;--frame2pos:16;--frame3pos:-32;--frame4pos:32;--frame1px:calc(var(--frame1pos)*1px);--frame2px:calc(var(--frame2pos)*1px);--frame3px:calc(var(--frame3pos)*1px);--frame4px:calc(var(--frame4pos)*1px)}.BeforeAfter-module_container__2Lm06>div{height:100%!important}.BeforeAfter-module_container__2Lm06.BeforeAfter-module_wiggle__3nVSe div div:nth-child(3){-webkit-animation:BeforeAfter-module_SliderLeftRightShake__2mcn5 1.5s cubic-bezier(.36,.07,.19,.97) both;animation:BeforeAfter-module_SliderLeftRightShake__2mcn5 1.5s cubic-bezier(.36,.07,.19,.97) both}.BeforeAfter-module_container__2Lm06.BeforeAfter-module_wiggle__3nVSe div img:nth-child(2){-webkit-animation:BeforeAfter-module_BeforeImageLeftRightShake__38m9V 1.5s cubic-bezier(.36,.07,.19,.97) both;animation:BeforeAfter-module_BeforeImageLeftRightShake__38m9V 1.5s cubic-bezier(.36,.07,.19,.97) both}.BeforeAfter-module_container__2Lm06 div div:nth-child(4) div{transition:opacity .1s ease-out .3s!important}.BeforeAfter-module_container__2Lm06.BeforeAfter-module_wiggle__3nVSe div img:first-child{-webkit-animation:BeforeAfter-module_AfterImageLeftRightShake__3WMf1 1.5s cubic-bezier(.36,.07,.19,.97) both;animation:BeforeAfter-module_AfterImageLeftRightShake__3WMf1 1.5s cubic-bezier(.36,.07,.19,.97) both}.BeforeAfter-module_container__2Lm06 div div:nth-child(5) div{transition:opacity .1s ease-out .3s!important}@-webkit-keyframes BeforeAfter-module_BeforeImageLeftRightShake__38m9V{10%,to{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame1px)),auto,auto)}20%,80%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame2px)),auto,auto)}30%,50%,70%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame3px)),auto,auto)}40%,60%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame4px)),auto,auto)}}@keyframes BeforeAfter-module_BeforeImageLeftRightShake__38m9V{10%,to{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame1px)),auto,auto)}20%,80%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame2px)),auto,auto)}30%,50%,70%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame3px)),auto,auto)}40%,60%{clip:rect(auto,calc(var(--initial-rect-width) + var(--frame4px)),auto,auto)}}@-webkit-keyframes BeforeAfter-module_AfterImageLeftRightShake__3WMf1{10%,to{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame1px)))}20%,80%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame2px)))}30%,50%,70%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame3px)))}40%,60%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame4px)))}}@keyframes BeforeAfter-module_AfterImageLeftRightShake__3WMf1{10%,to{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame1px)))}20%,80%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame2px)))}30%,50%,70%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame3px)))}40%,60%{clip:rect(auto,auto,auto,calc(var(--initial-rect-width) + var(--frame4px)))}}@-webkit-keyframes BeforeAfter-module_SliderLeftRightShake__2mcn5{10%,to{transform:translate3d(-20%,0,0)}20%,80%{transform:translate3d(40%,0,0)}30%,50%,70%{transform:translate3d(-80%,0,0)}40%,60%{transform:translate3d(80%,0,0)}}@keyframes BeforeAfter-module_SliderLeftRightShake__2mcn5{10%,to{transform:translate3d(-20%,0,0)}20%,80%{transform:translate3d(40%,0,0)}30%,50%,70%{transform:translate3d(-80%,0,0)}40%,60%{transform:translate3d(80%,0,0)}}.SoundDisclaimer-module_soundDisclaimer__31hWh{display:grid;border:1px solid;border-radius:4px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.SoundDisclaimer-module_unmute__1V4Ab,.SoundDisclaimer-module_unmuted__22CJ5{grid-column:1;grid-row:1;display:flex;align-items:center;transition-property:opacity,visibility;transition-duration:.09s;transition-timing-function:ease-out;opacity:0;visibility:hidden;padding:0 15px}.SoundDisclaimer-module_unmute__1V4Ab{position:relative;border:0;background-color:transparent;font:inherit;color:currentColor;text-align:initial;width:100%;z-index:1;cursor:pointer}.SoundDisclaimer-module_active__11_kc{opacity:1;visibility:visible;transition-delay:.09s;transition-duration:.21s;transition-timing-function:ease-in}.SoundDisclaimer-module_soundDisclaimer__31hWh svg{flex:0 0 25px;fill:currentColor;margin-right:15px}.TextBlock-module_text__21Hk4 h2,.TextBlock-module_text__21Hk4 li,.TextBlock-module_text__21Hk4 p{margin:1em 0 0}.TextBlock-module_text__21Hk4 a{color:currentColor;word-wrap:break-word}.TextBlock-module_text__21Hk4 ol,.TextBlock-module_text__21Hk4 ul{margin:0;padding-left:20px;clear:both}.TextBlock-module_text__21Hk4 blockquote{padding:.5em 1em .5em 2em;margin:1em 0 0 .5em;position:relative;overflow:hidden}.TextBlock-module_text__21Hk4 blockquote:before{content:"\201C";font-size:3em;font-weight:700;color:#aaa;position:absolute;top:0;left:0;line-height:1em}.VideoEmbed-module_VideoEmbed__3BUjc{background-color:#000}.VideoEmbed-module_embedPlayer__54NKG{position:absolute;top:0;left:0;bottom:0;right:0}.ExternalLink-module_hidden__3jer0{display:none}.ExternalLink-module_link_item__Blypv{width:45%;vertical-align:top;margin:2% auto;background-color:#fff;color:#000;text-decoration:none;transition:transform .3s}.ExternalLink-module_link_item__Blypv.ExternalLink-module_invert__1zrgN{background-color:#222;color:#fff}.ExternalLink-module_link_item__Blypv.ExternalLink-module_layout_center__3NRpQ{width:29%}.ExternalLink-module_link_item__Blypv:hover{transform:scale(1.05)}.ExternalLink-module_link_item__Blypv:hover .ExternalLink-module_link_title__FZJ-0{text-decoration:underline}.ExternalLink-module_link_thumbnail__2_BHq{width:auto;background-repeat:no-repeat;background-size:cover;padding-top:56.25%;position:relative}.ExternalLink-module_link_details__lRhKU{margin:20px}.ExternalLink-module_link_details__lRhKU>.ExternalLink-module_link_title__FZJ-0{font-size:1.2em;font-weight:700;margin-bottom:20px}.ExternalLink-module_link_details__lRhKU>p{width:100%;white-space:normal;line-height:1.3em}.ExternalLink-module_tooltip__18MpC{position:absolute;left:50%;top:80px;width:180px;padding:5px;margin-left:-95px;background-color:#444;color:#fff;border:1px solid #fff;opacity:.9;font-size:13px;text-align:center;white-space:normal}.ExternalLink-module_tooltip__18MpC>span{display:block;color:#fff;text-decoration:underline}@media only screen and (max-width:600px){.ExternalLink-module_link_item__Blypv.ExternalLink-module_layout_center__3NRpQ{width:45%}}@media only screen and (max-width:350px){.ExternalLink-module_link_item__Blypv,.ExternalLink-module_link_item__Blypv.ExternalLink-module_layout_center__3NRpQ{width:85%}}.ExternalLinkList-module_ext_links_container__16IIo{display:flex;flex-wrap:wrap;border-collapse:separate;border-spacing:10px;min-height:240px;width:auto;height:auto;pointer-events:auto;position:relative;transition:opacity .5s;transition-timing-function:cubic-bezier(.1,.57,.1,1);transition-duration:0ms}.DataWrapperChart-module_container__2eZ15{min-height:200px;padding:20px 5%}.DataWrapperChart-module_container__2eZ15>iframe{width:100%;height:100%;position:relative;top:0;border:0}
@@ -1,4 +1,4 @@
1
- import { useContentElementConfigurationUpdate, useI18n, withShadowClassName, Text, EditableInlineText, frontend, useFile, useContentElementEditorState, ViewportDependentPillarBoxes, useContentElementLifecycle, Figure, Image, usePlayerState, MediaInteractionTracking, VideoPlayer, VideoPlayerControls, AudioPlayer, AudioPlayerControls, EditableText, useDarkBackground } from 'pageflow-scrolled/frontend';
1
+ import { useContentElementConfigurationUpdate, useI18n, withShadowClassName, Text, EditableInlineText, frontend, useFile, useContentElementEditorState, ViewportDependentPillarBoxes, useContentElementLifecycle, Figure, Image, usePlayerState, useAudioFocus, MediaInteractionTracking, VideoPlayerControls, VideoPlayer, AudioPlayerControls, AudioPlayer, useMediaMuted, EditableText, ThirdPartyOptOutInfo, ThirdPartyOptIn, useDarkBackground, textColorForBackgroundColor } from 'pageflow-scrolled/frontend';
2
2
  import React, { useRef, useState, useEffect } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import ReactCompareImage from 'react-compare-image';
@@ -49,7 +49,7 @@ function Heading(_ref) {
49
49
  React.createElement(EditableInlineText, {
50
50
  value: configuration.value,
51
51
  defaultValue: legacyValue,
52
- placeholder: t('pageflow_scrolled.inline_editing.type_heading'),
52
+ placeholder: firstSectionInEntry ? t('pageflow_scrolled.inline_editing.type_title') : t('pageflow_scrolled.inline_editing.type_heading'),
53
53
  onChange: function onChange(value) {
54
54
  return updateConfiguration({
55
55
  value: value
@@ -167,7 +167,7 @@ function BeforeAfter(_ref) {
167
167
  var _cx;
168
168
 
169
169
  var isActive = _ref.isActive,
170
- isPrepared = _ref.isPrepared,
170
+ load = _ref.load,
171
171
  position = _ref.position,
172
172
  before_id = _ref.before_id,
173
173
  before_label = _ref.before_label,
@@ -278,7 +278,7 @@ function BeforeAfter(_ref) {
278
278
  );
279
279
 
280
280
  function renderCompareImage() {
281
- if (!isPrepared) {
281
+ if (!load) {
282
282
  return null;
283
283
  }
284
284
 
@@ -324,12 +324,12 @@ function InitialSliderPositionIndicator(_ref2) {
324
324
  function InlineBeforeAfter(props) {
325
325
  var _useContentElementLif = useContentElementLifecycle(),
326
326
  isActive = _useContentElementLif.isActive,
327
- isPrepared = _useContentElementLif.isPrepared;
327
+ shouldLoad = _useContentElementLif.shouldLoad;
328
328
 
329
329
  return (
330
330
  /*#__PURE__*/
331
331
  React.createElement(BeforeAfter, Object.assign({}, props.configuration, {
332
- isPrepared: isPrepared,
332
+ load: shouldLoad,
333
333
  isActive: isActive
334
334
  }))
335
335
  );
@@ -344,7 +344,7 @@ function InlineImage(_ref) {
344
344
  var configuration = _ref.configuration;
345
345
 
346
346
  var _useContentElementLif = useContentElementLifecycle(),
347
- isPrepared = _useContentElementLif.isPrepared;
347
+ shouldLoad = _useContentElementLif.shouldLoad;
348
348
 
349
349
  var imageFile = useFile({
350
350
  collectionName: 'imageFiles',
@@ -363,11 +363,12 @@ function InlineImage(_ref) {
363
363
  opaque: !!configuration.caption
364
364
  },
365
365
  /*#__PURE__*/
366
- React.createElement(Image, Object.assign({}, configuration, {
367
- isPrepared: isPrepared,
366
+ React.createElement(Image, {
367
+ imageFile: imageFile,
368
+ load: shouldLoad,
368
369
  structuredData: true,
369
370
  variant: configuration.position === 'full' ? 'large' : 'medium'
370
- }))))
371
+ })))
371
372
  );
372
373
  }
373
374
 
@@ -377,8 +378,17 @@ frontend.contentElementTypes.register('inlineImage', {
377
378
  });
378
379
 
379
380
  function InlineVideo(_ref) {
380
- var sectionProps = _ref.sectionProps,
381
+ var contentElementId = _ref.contentElementId,
382
+ sectionProps = _ref.sectionProps,
381
383
  configuration = _ref.configuration;
384
+ var videoFile = useFile({
385
+ collectionName: 'videoFiles',
386
+ permaId: configuration.id
387
+ });
388
+ var posterImageFile = useFile({
389
+ collectionName: 'imageFiles',
390
+ permaId: configuration.posterId
391
+ });
382
392
 
383
393
  var _usePlayerState = usePlayerState(),
384
394
  _usePlayerState2 = _slicedToArray(_usePlayerState, 2),
@@ -399,7 +409,16 @@ function InlineVideo(_ref) {
399
409
  playerActions.fadeOutAndPause(400);
400
410
  }
401
411
  }),
402
- isPrepared = _useContentElementLif.isPrepared;
412
+ shouldLoad = _useContentElementLif.shouldLoad,
413
+ shouldPrepare = _useContentElementLif.shouldPrepare;
414
+
415
+ useAudioFocus({
416
+ key: contentElementId,
417
+ request: playerState.shouldPlay,
418
+ onLost: function onLost() {
419
+ playerActions.fadeOutAndPause(400);
420
+ }
421
+ });
403
422
 
404
423
  var onPlayerClick = function onPlayerClick() {
405
424
  if (isEditable && !isSelected) {
@@ -424,29 +443,29 @@ function InlineVideo(_ref) {
424
443
  playerActions: playerActions
425
444
  },
426
445
  /*#__PURE__*/
446
+ React.createElement(VideoPlayerControls, {
447
+ videoFile: videoFile,
448
+ defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
449
+ playerState: playerState,
450
+ playerActions: playerActions,
451
+ configuration: configuration,
452
+ sectionProps: sectionProps,
453
+ onPlayerClick: onPlayerClick
454
+ },
455
+ /*#__PURE__*/
427
456
  React.createElement(VideoPlayer, {
428
- isPrepared: isPrepared,
457
+ load: shouldPrepare ? 'auto' : shouldLoad ? 'poster' : 'none',
429
458
  position: configuration.position,
430
459
  controls: configuration.controls,
431
460
  playerState: playerState,
432
461
  playerActions: playerActions,
433
- id: configuration.id,
434
- posterId: configuration.posterId,
462
+ videoFile: videoFile,
463
+ posterImageFile: posterImageFile,
435
464
  defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
436
465
  quality: 'high',
437
466
  playsInline: true,
438
- atmoDuringPlayback: configuration.atmoDuringPlayback,
439
- onClick: onPlayerClick
440
- }),
441
- /*#__PURE__*/
442
- React.createElement(VideoPlayerControls, {
443
- videoFilePermaId: configuration.id,
444
- defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
445
- playerState: playerState,
446
- playerActions: playerActions,
447
- configuration: configuration,
448
- sectionProps: sectionProps
449
- })))
467
+ atmoDuringPlayback: configuration.atmoDuringPlayback
468
+ }))))
450
469
  );
451
470
  }
452
471
 
@@ -456,8 +475,17 @@ frontend.contentElementTypes.register('inlineVideo', {
456
475
  });
457
476
 
458
477
  function InlineAudio(_ref) {
459
- var sectionProps = _ref.sectionProps,
478
+ var contentElementId = _ref.contentElementId,
479
+ sectionProps = _ref.sectionProps,
460
480
  configuration = _ref.configuration;
481
+ var audioFile = useFile({
482
+ collectionName: 'audioFiles',
483
+ permaId: configuration.id
484
+ });
485
+ var posterImageFile = useFile({
486
+ collectionName: 'imageFiles',
487
+ permaId: configuration.posterId
488
+ });
461
489
 
462
490
  var _usePlayerState = usePlayerState(),
463
491
  _usePlayerState2 = _slicedToArray(_usePlayerState, 2),
@@ -475,10 +503,19 @@ function InlineAudio(_ref) {
475
503
  }
476
504
  },
477
505
  onDeactivate: function onDeactivate() {
478
- playerActions.pause();
506
+ playerActions.fadeOutAndPause(400);
479
507
  }
480
508
  }),
481
- isPrepared = _useContentElementLif.isPrepared;
509
+ shouldLoad = _useContentElementLif.shouldLoad,
510
+ shouldPrepare = _useContentElementLif.shouldPrepare;
511
+
512
+ useAudioFocus({
513
+ key: contentElementId,
514
+ request: playerState.shouldPlay,
515
+ onLost: function onLost() {
516
+ playerActions.fadeOutAndPause(400);
517
+ }
518
+ });
482
519
 
483
520
  var onPlayerClick = function onPlayerClick() {
484
521
  if (isEditable && !isSelected) {
@@ -498,29 +535,30 @@ function InlineAudio(_ref) {
498
535
  caption: configuration.caption
499
536
  },
500
537
  /*#__PURE__*/
538
+ React.createElement(AudioPlayerControls, {
539
+ audioFile: audioFile,
540
+ defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
541
+ playerState: playerState,
542
+ playerActions: playerActions,
543
+ standAlone: !posterImageFile,
544
+ configuration: configuration,
545
+ sectionProps: sectionProps,
546
+ onPlayerClick: onPlayerClick
547
+ },
548
+ /*#__PURE__*/
501
549
  React.createElement(AudioPlayer, {
502
- isPrepared: isPrepared,
550
+ load: shouldPrepare ? 'auto' : shouldLoad ? 'poster' : 'none',
503
551
  position: configuration.position,
504
552
  controls: configuration.controls,
505
553
  playerState: playerState,
506
554
  playerActions: playerActions,
507
- id: configuration.id,
508
- posterId: configuration.posterId,
555
+ audioFile: audioFile,
556
+ posterImageFile: posterImageFile,
509
557
  defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
510
558
  quality: 'high',
511
559
  playsInline: true,
512
- atmoDuringPlayback: configuration.atmoDuringPlayback,
513
- onClick: onPlayerClick
514
- }),
515
- /*#__PURE__*/
516
- React.createElement(AudioPlayerControls, {
517
- audioFilePermaId: configuration.id,
518
- defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
519
- playerState: playerState,
520
- playerActions: playerActions,
521
- configuration: configuration,
522
- sectionProps: sectionProps
523
- }))
560
+ atmoDuringPlayback: configuration.atmoDuringPlayback
561
+ })))
524
562
  );
525
563
  }
526
564
 
@@ -529,26 +567,154 @@ frontend.contentElementTypes.register('inlineAudio', {
529
567
  lifecycle: true
530
568
  });
531
569
 
532
- var styles$2 = {"soundDisclaimer":"SoundDisclaimer-module_soundDisclaimer__31hWh"};
570
+ var styles$2 = {"soundDisclaimer":"SoundDisclaimer-module_soundDisclaimer__31hWh","unmute":"SoundDisclaimer-module_unmute__1V4Ab","unmuted":"SoundDisclaimer-module_unmuted__22CJ5","active":"SoundDisclaimer-module_active__11_kc"};
571
+
572
+ function _objectWithoutPropertiesLoose(source, excluded) {
573
+ if (source == null) return {};
574
+ var target = {};
575
+ var sourceKeys = Object.keys(source);
576
+ var key, i;
577
+
578
+ for (i = 0; i < sourceKeys.length; i++) {
579
+ key = sourceKeys[i];
580
+ if (excluded.indexOf(key) >= 0) continue;
581
+ target[key] = source[key];
582
+ }
583
+
584
+ return target;
585
+ }
586
+
587
+ function _objectWithoutProperties(source, excluded) {
588
+ if (source == null) return {};
589
+ var target = _objectWithoutPropertiesLoose(source, excluded);
590
+ var key, i;
591
+
592
+ if (Object.getOwnPropertySymbols) {
593
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
594
+
595
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
596
+ key = sourceSymbolKeys[i];
597
+ if (excluded.indexOf(key) >= 0) continue;
598
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
599
+ target[key] = source[key];
600
+ }
601
+ }
602
+
603
+ return target;
604
+ }
605
+
606
+ function _extends() {
607
+ _extends = Object.assign || function (target) {
608
+ for (var i = 1; i < arguments.length; i++) {
609
+ var source = arguments[i];
610
+
611
+ for (var key in source) {
612
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
613
+ target[key] = source[key];
614
+ }
615
+ }
616
+ }
617
+
618
+ return target;
619
+ };
620
+
621
+ return _extends.apply(this, arguments);
622
+ }
623
+ var MutedIcon = (function (_ref) {
624
+ var _ref$styles = _ref.styles,
625
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
626
+ props = _objectWithoutProperties(_ref, ["styles"]);
627
+
628
+ return React.createElement("svg", _extends({
629
+ "aria-hidden": "true",
630
+ "data-prefix": "fas",
631
+ "data-icon": "volume-mute",
632
+ className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-volume-mute"] || "fa-volume-mute") + " " + (styles["fa-w-16"] || "fa-w-16"),
633
+ xmlns: "http://www.w3.org/2000/svg",
634
+ viewBox: "0 0 512 512"
635
+ }, props), React.createElement("path", {
636
+ d: "M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"
637
+ }));
638
+ });
639
+
640
+ function _extends$1() {
641
+ _extends$1 = Object.assign || function (target) {
642
+ for (var i = 1; i < arguments.length; i++) {
643
+ var source = arguments[i];
644
+
645
+ for (var key in source) {
646
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
647
+ target[key] = source[key];
648
+ }
649
+ }
650
+ }
651
+
652
+ return target;
653
+ };
654
+
655
+ return _extends$1.apply(this, arguments);
656
+ }
657
+ var UnmutedIcon = (function (_ref) {
658
+ var _ref$styles = _ref.styles,
659
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
660
+ props = _objectWithoutProperties(_ref, ["styles"]);
661
+
662
+ return React.createElement("svg", _extends$1({
663
+ "aria-hidden": "true",
664
+ "data-prefix": "fas",
665
+ "data-icon": "volume-mute",
666
+ className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-volume-mute"] || "fa-volume-mute") + " " + (styles["fa-w-16"] || "fa-w-16"),
667
+ xmlns: "http://www.w3.org/2000/svg",
668
+ viewBox: "0 0 512 512"
669
+ }, props), React.createElement("path", {
670
+ d: "M232.36 64.01a24.007 24.007 0 00-1.176.002c-5.703.15-11.464 2.348-16.155 7.039L126.061 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-14.293-11.514-23.733-23.64-24.01zm149.5 31.994c-8.107-.16-16.098 3.814-20.75 11.217-7.09 11.28-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256c0-63.53-32.06-121.94-85.77-156.24a23.808 23.808 0 00-12.37-3.756zm-55.032 80.174c-8.51-.046-16.795 4.42-21.209 12.402-6.39 11.61-2.159 26.2 9.451 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88 0-31.88-17.54-61.32-45.78-76.86a23.987 23.987 0 00-11.402-2.952z"
671
+ }));
672
+ });
533
673
 
534
674
  function SoundDisclaimer() {
675
+ var _useContentElementEdi = useContentElementEditorState(),
676
+ isEditable = _useContentElementEdi.isEditable,
677
+ isSelected = _useContentElementEdi.isSelected;
678
+
535
679
  var _useI18n = useI18n(),
536
680
  t = _useI18n.t;
537
681
 
682
+ var muted = useMediaMuted();
538
683
  return (
539
684
  /*#__PURE__*/
540
685
  React.createElement("div", {
541
686
  className: classNames(styles$2.soundDisclaimer),
687
+ style: {
688
+ pointerEvents: isEditable && !isSelected ? 'none' : undefined
689
+ }
690
+ },
691
+ /*#__PURE__*/
692
+ React.createElement("button", {
693
+ className: classNames(styles$2.unmute, _defineProperty({}, styles$2.active, muted)),
542
694
  onClick: function onClick() {
543
695
  return media.mute(false);
544
696
  }
545
697
  },
546
698
  /*#__PURE__*/
699
+ React.createElement(MutedIcon, null),
700
+ /*#__PURE__*/
547
701
  React.createElement("p", {
548
702
  dangerouslySetInnerHTML: {
549
- __html: t('pageflow_scrolled.public.sound_disclaimer.help_text')
703
+ __html: t('pageflow_scrolled.public.sound_disclaimer.help_muted')
550
704
  }
551
- }))
705
+ })),
706
+ /*#__PURE__*/
707
+ React.createElement("div", {
708
+ className: classNames(styles$2.unmuted, _defineProperty({}, styles$2.active, !muted))
709
+ },
710
+ /*#__PURE__*/
711
+ React.createElement(UnmutedIcon, null),
712
+ /*#__PURE__*/
713
+ React.createElement("p", {
714
+ dangerouslySetInnerHTML: {
715
+ __html: t('pageflow_scrolled.public.sound_disclaimer.help_unmuted')
716
+ }
717
+ })))
552
718
  );
553
719
  }
554
720
 
@@ -587,7 +753,8 @@ function TextBlock(props) {
587
753
 
588
754
  frontend.contentElementTypes.register('textBlock', {
589
755
  component: TextBlock,
590
- customSelectionRect: true
756
+ customSelectionRect: true,
757
+ supportsWrappingAroundFloats: true
591
758
  });
592
759
 
593
760
  var styles$4 = {"VideoEmbed":"VideoEmbed-module_VideoEmbed__3BUjc","embedPlayer":"VideoEmbed-module_embedPlayer__54NKG"};
@@ -599,52 +766,20 @@ var aspectRatios = {
599
766
  portrait: 1.7777
600
767
  };
601
768
  function VideoEmbed(_ref) {
602
- var configuration = _ref.configuration;
603
-
604
- var _useContentElementLif = useContentElementLifecycle(),
605
- isPrepared = _useContentElementLif.isPrepared;
769
+ var contentElementId = _ref.contentElementId,
770
+ configuration = _ref.configuration;
606
771
 
607
772
  var _useContentElementEdi = useContentElementEditorState(),
608
773
  isEditable = _useContentElementEdi.isEditable,
609
- isSelected = _useContentElementEdi.isSelected; // base64-encoded configuration
610
- // => make component re-render on configuration changes
611
-
612
-
613
- function keyFromConfiguration(config) {
614
- return btoa(JSON.stringify(config));
615
- }
774
+ isSelected = _useContentElementEdi.isSelected;
616
775
 
617
- function renderPlayer() {
618
- if (!isPrepared) {
619
- return null;
620
- }
776
+ var _useContentElementLif = useContentElementLifecycle(),
777
+ shouldLoad = _useContentElementLif.shouldLoad;
621
778
 
622
- return (
623
- /*#__PURE__*/
624
- React.createElement(ReactPlayer, {
625
- className: styles$4.embedPlayer,
626
- key: keyFromConfiguration(configuration),
627
- url: configuration.videoSource,
628
- playing: true,
629
- light: true,
630
- width: "100%",
631
- height: "100%",
632
- controls: !configuration.hideControls,
633
- config: {
634
- youtube: {
635
- playerVars: {
636
- showinfo: !configuration.hideInfo
637
- }
638
- },
639
- vimeo: {
640
- playerOptions: {
641
- byline: !configuration.hideInfo
642
- }
643
- }
644
- }
645
- })
646
- );
647
- }
779
+ var _useState = useState('unplayed'),
780
+ _useState2 = _slicedToArray(_useState, 2),
781
+ playerState = _useState2[0],
782
+ setPlayerState = _useState2[1];
648
783
 
649
784
  return (
650
785
  /*#__PURE__*/
@@ -663,7 +798,82 @@ function VideoEmbed(_ref) {
663
798
  aspectRatio: aspectRatios[configuration.aspectRatio || 'wide'],
664
799
  position: configuration.position,
665
800
  opaque: !!configuration.caption
666
- }, renderPlayer())))
801
+ }, shouldLoad &&
802
+ /*#__PURE__*/
803
+ React.createElement(PreparedPlayer, {
804
+ playerState: playerState,
805
+ setPlayerState: setPlayerState,
806
+ contentElementId: contentElementId,
807
+ configuration: configuration
808
+ })),
809
+ /*#__PURE__*/
810
+ React.createElement(ThirdPartyOptOutInfo, {
811
+ providerName: "video",
812
+ hide: playerState === 'playing',
813
+ contentElementPosition: configuration.position
814
+ })))
815
+ );
816
+ }
817
+
818
+ function PreparedPlayer(_ref2) {
819
+ var contentElementId = _ref2.contentElementId,
820
+ configuration = _ref2.configuration,
821
+ playerState = _ref2.playerState,
822
+ setPlayerState = _ref2.setPlayerState;
823
+ useAudioFocus({
824
+ key: contentElementId,
825
+ request: playerState === 'playing',
826
+ onLost: function onLost() {
827
+ setPlayerState('paused');
828
+ }
829
+ }); // base64-encoded configuration
830
+ // => make component re-render on configuration changes
831
+
832
+ function keyFromConfiguration(config) {
833
+ return btoa(JSON.stringify(config));
834
+ }
835
+
836
+ return (
837
+ /*#__PURE__*/
838
+ React.createElement(ThirdPartyOptIn, {
839
+ providerName: "video"
840
+ }, function (_ref3) {
841
+ var consentedHere = _ref3.consentedHere;
842
+ return (
843
+ /*#__PURE__*/
844
+ React.createElement(ReactPlayer, {
845
+ className: styles$4.embedPlayer,
846
+ key: keyFromConfiguration(configuration),
847
+ url: configuration.videoSource,
848
+ playing: playerState !== 'paused',
849
+ onPlay: function onPlay() {
850
+ return setPlayerState('playing');
851
+ },
852
+ onPause: function onPause() {
853
+ return setPlayerState('paused');
854
+ },
855
+ onEnded: function onEnded() {
856
+ return setPlayerState('paused');
857
+ },
858
+ light: !consentedHere && playerState === 'unplayed',
859
+ width: "100%",
860
+ height: "100%",
861
+ controls: !configuration.hideControls,
862
+ config: {
863
+ youtube: {
864
+ playerVars: {
865
+ showinfo: !configuration.hideInfo
866
+ }
867
+ },
868
+ vimeo: {
869
+ playerOptions: {
870
+ byline: !configuration.hideInfo
871
+ }
872
+ }
873
+ }
874
+ })
875
+ );
876
+ })
667
877
  );
668
878
  }
669
879
 
@@ -693,6 +903,11 @@ function ExternalLink(props) {
693
903
  isEditable = _useContentElementEdi.isEditable,
694
904
  isSelected = _useContentElementEdi.isSelected;
695
905
 
906
+ var thumbnailImageFile = useFile({
907
+ collectionName: 'imageFiles',
908
+ permaId: props.thumbnail
909
+ });
910
+
696
911
  var onClick = function onClick(event) {
697
912
  if (isEditable) {
698
913
  if (!props.open_in_new_tab || !isSelected) {
@@ -735,7 +950,8 @@ function ExternalLink(props) {
735
950
  href: props.url || 'about:blank',
736
951
  onClick: onClick,
737
952
  onMouseLeave: onMouseLeave,
738
- target: props.open_in_new_tab ? '_blank' : '_self'
953
+ target: props.open_in_new_tab ? '_blank' : '_self',
954
+ rel: props.open_in_new_tab ? 'noopen noreferrer' : undefined
739
955
  },
740
956
  /*#__PURE__*/
741
957
  React.createElement("div", {
@@ -743,8 +959,8 @@ function ExternalLink(props) {
743
959
  },
744
960
  /*#__PURE__*/
745
961
  React.createElement(Image, {
746
- id: props.thumbnail,
747
- isPrepared: props.isPrepared,
962
+ imageFile: thumbnailImageFile,
963
+ load: props.loadImages,
748
964
  variant: "linkThumbnailLarge"
749
965
  })),
750
966
  /*#__PURE__*/
@@ -768,7 +984,7 @@ function ExternalLinkList(props) {
768
984
  var linkList = props.configuration.links || [];
769
985
 
770
986
  var _useContentElementLif = useContentElementLifecycle(),
771
- isPrepared = _useContentElementLif.isPrepared;
987
+ shouldLoad = _useContentElementLif.shouldLoad;
772
988
 
773
989
  var darkBackground = useDarkBackground();
774
990
  return (
@@ -782,7 +998,7 @@ function ExternalLinkList(props) {
782
998
  key: link.id,
783
999
  invert: !darkBackground,
784
1000
  sectionProps: props.sectionProps,
785
- isPrepared: isPrepared
1001
+ loadImages: shouldLoad
786
1002
  }))
787
1003
  );
788
1004
  }))
@@ -806,7 +1022,7 @@ function useIframeHeight(url) {
806
1022
  function receive(event) {
807
1023
  if (typeof event.data['datawrapper-height'] !== 'undefined') {
808
1024
  for (var chartId in event.data['datawrapper-height']) {
809
- if (url.indexOf(chartId) > -1) {
1025
+ if ((url === null || url === void 0 ? void 0 : url.indexOf(chartId)) > -1) {
810
1026
  setHeight(event.data['datawrapper-height'][chartId] + 'px');
811
1027
  }
812
1028
  }
@@ -825,8 +1041,11 @@ var styles$7 = {"container":"DataWrapperChart-module_container__2eZ15"};
825
1041
  function DataWrapperChart(_ref) {
826
1042
  var configuration = _ref.configuration;
827
1043
 
1044
+ var _useI18n = useI18n(),
1045
+ t = _useI18n.t;
1046
+
828
1047
  var _useContentElementLif = useContentElementLifecycle(),
829
- isPrepared = _useContentElementLif.isPrepared;
1048
+ shouldLoad = _useContentElementLif.shouldLoad;
830
1049
 
831
1050
  var _useContentElementEdi = useContentElementEditorState(),
832
1051
  isEditable = _useContentElementEdi.isEditable,
@@ -836,24 +1055,40 @@ function DataWrapperChart(_ref) {
836
1055
 
837
1056
  var srcURL = '';
838
1057
 
839
- if (configuration.url && isPrepared) {
1058
+ if (configuration.url) {
840
1059
  srcURL = configuration.url.replace(/http(s|):/, '');
841
1060
  }
842
1061
 
1062
+ var backgroundColor = configuration.backgroundColor || '#323d4d';
843
1063
  return (
1064
+ /*#__PURE__*/
1065
+ React.createElement(Figure, {
1066
+ caption: configuration.caption
1067
+ },
844
1068
  /*#__PURE__*/
845
1069
  React.createElement("div", {
846
1070
  className: styles$7.container,
847
1071
  style: {
848
1072
  pointerEvents: isEditable && !isSelected ? 'none' : undefined,
1073
+ backgroundColor: backgroundColor,
1074
+ color: textColorForBackgroundColor(backgroundColor),
849
1075
  height: height
850
1076
  },
851
1077
  "data-percy": "hide"
852
- }, renderIframe(srcURL))
1078
+ },
1079
+ /*#__PURE__*/
1080
+ React.createElement(ThirdPartyOptIn, {
1081
+ providerName: "datawrapper"
1082
+ }, shouldLoad && renderIframe(srcURL, configuration.title || t('pageflow_scrolled.public.chart.default_title')),
1083
+ /*#__PURE__*/
1084
+ React.createElement(ThirdPartyOptOutInfo, {
1085
+ providerName: "datawrapper",
1086
+ contentElementPosition: configuration.position
1087
+ }))))
853
1088
  );
854
1089
  }
855
1090
 
856
- function renderIframe(url) {
1091
+ function renderIframe(url, title) {
857
1092
  if (!url) {
858
1093
  return null;
859
1094
  }
@@ -862,9 +1097,8 @@ function renderIframe(url) {
862
1097
  /*#__PURE__*/
863
1098
  React.createElement("iframe", {
864
1099
  src: url,
865
- scrolling: "auto",
866
- frameBorder: "0",
867
- align: "aus",
1100
+ title: title,
1101
+ scrolling: "no",
868
1102
  allowFullScreen: true,
869
1103
  mozallowfullscreen: "true",
870
1104
  webkitallowfullscreen: "true"