pageflow 17.0.4 → 17.1.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 (487) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +372 -26
  3. data/README.md +0 -1
  4. data/admins/pageflow/accounts.rb +16 -14
  5. data/admins/pageflow/entry.rb +68 -20
  6. data/admins/pageflow/entry_templates.rb +10 -9
  7. data/admins/pageflow/folder.rb +1 -1
  8. data/admins/pageflow/membership.rb +4 -4
  9. data/admins/pageflow/revisions.rb +5 -5
  10. data/admins/pageflow/site_root_entry.rb +64 -0
  11. data/admins/pageflow/sites.rb +12 -3
  12. data/admins/pageflow/translations.rb +75 -0
  13. data/admins/pageflow/user.rb +21 -35
  14. data/app/assets/javascripts/pageflow/admin/entries.js +30 -5
  15. data/app/assets/javascripts/pageflow/dist/ui.js +2865 -257
  16. data/app/assets/stylesheets/pageflow/admin/entries/index_table.scss +2 -1
  17. data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +2 -1
  18. data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +6 -0
  19. data/app/assets/stylesheets/pageflow/editor/base.scss +2 -0
  20. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +7 -1
  21. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +5 -1
  22. data/app/assets/stylesheets/pageflow/editor/files.scss +28 -16
  23. data/app/assets/stylesheets/pageflow/editor/filtered_files.scss +24 -0
  24. data/app/assets/stylesheets/pageflow/editor/info_box.scss +11 -3
  25. data/app/assets/stylesheets/pageflow/editor/list.scss +6 -4
  26. data/app/assets/stylesheets/pageflow/editor/list_search_field.scss +52 -0
  27. data/app/assets/stylesheets/pageflow/editor/outline.scss +0 -13
  28. data/app/assets/stylesheets/pageflow/editor/select_button.scss +1 -1
  29. data/app/assets/stylesheets/pageflow/editor/sortable.scss +12 -0
  30. data/app/assets/stylesheets/pageflow/mixins/buttons.scss +4 -4
  31. data/app/assets/stylesheets/pageflow/ui/forms.scss +4 -0
  32. data/app/assets/stylesheets/pageflow/ui/input/color_input.scss +8 -0
  33. data/app/assets/stylesheets/pageflow/ui/input/file_name_input.scss +37 -0
  34. data/app/assets/stylesheets/pageflow/ui/properties.scss +5 -0
  35. data/app/assets/stylesheets/pageflow/ui.scss +1 -0
  36. data/app/controllers/concerns/pageflow/controller_delegation.rb +1 -1
  37. data/app/controllers/concerns/pageflow/edit_locking.rb +17 -10
  38. data/app/controllers/concerns/pageflow/entry_password_protection.rb +1 -0
  39. data/app/controllers/concerns/pageflow/public_https_mode.rb +2 -1
  40. data/app/controllers/concerns/pageflow/quota_verification.rb +5 -4
  41. data/app/controllers/pageflow/admin/initial_passwords_controller.rb +1 -0
  42. data/app/controllers/pageflow/application_controller.rb +19 -19
  43. data/app/controllers/pageflow/chapters_controller.rb +3 -2
  44. data/app/controllers/pageflow/edit_locks_controller.rb +3 -2
  45. data/app/controllers/pageflow/editor/encoding_confirmations_controller.rb +1 -0
  46. data/app/controllers/pageflow/editor/entries_controller.rb +2 -1
  47. data/app/controllers/pageflow/editor/entry_publications_controller.rb +1 -0
  48. data/app/controllers/pageflow/editor/file_import_controller.rb +3 -3
  49. data/app/controllers/pageflow/editor/files_controller.rb +7 -6
  50. data/app/controllers/pageflow/editor/widgets_controller.rb +1 -0
  51. data/app/controllers/pageflow/entries_controller.rb +77 -17
  52. data/app/controllers/pageflow/feeds_controller.rb +1 -1
  53. data/app/controllers/pageflow/files_controller.rb +1 -0
  54. data/app/controllers/pageflow/pages_controller.rb +4 -2
  55. data/app/controllers/pageflow/revisions_controller.rb +2 -1
  56. data/app/controllers/pageflow/sitemaps_controller.rb +1 -1
  57. data/app/controllers/pageflow/storylines_controller.rb +1 -0
  58. data/app/helpers/pageflow/admin/cutoff_modes_helper.rb +12 -0
  59. data/app/helpers/pageflow/admin/entries_helper.rb +1 -1
  60. data/app/helpers/pageflow/admin/entry_translations_helper.rb +18 -0
  61. data/app/helpers/pageflow/admin/features_helper.rb +1 -1
  62. data/app/helpers/pageflow/admin/form_helper.rb +3 -3
  63. data/app/helpers/pageflow/admin/locales_helper.rb +10 -2
  64. data/app/helpers/pageflow/admin/memberships_helper.rb +32 -32
  65. data/app/helpers/pageflow/admin/revisions_helper.rb +1 -1
  66. data/app/helpers/pageflow/admin/sites_helper.rb +22 -0
  67. data/app/helpers/pageflow/admin/users_helper.rb +7 -5
  68. data/app/helpers/pageflow/admin/widgets_helper.rb +3 -3
  69. data/app/helpers/pageflow/asset_urls_helper.rb +1 -1
  70. data/app/helpers/pageflow/audio_files_helper.rb +5 -2
  71. data/app/helpers/pageflow/background_image_helper.rb +7 -6
  72. data/app/helpers/pageflow/common_entry_seed_helper.rb +2 -4
  73. data/app/helpers/pageflow/editor/config_helper.rb +1 -1
  74. data/app/helpers/pageflow/editor/files_helper.rb +1 -1
  75. data/app/helpers/pageflow/embed_code_helper.rb +3 -3
  76. data/app/helpers/pageflow/entries_helper.rb +58 -34
  77. data/app/helpers/pageflow/entry_json_seed_helper.rb +3 -2
  78. data/app/helpers/pageflow/feeds_helper.rb +2 -2
  79. data/app/helpers/pageflow/file_background_images_helper.rb +2 -2
  80. data/app/helpers/pageflow/file_thumbnails_helper.rb +4 -3
  81. data/app/helpers/pageflow/files_helper.rb +5 -4
  82. data/app/helpers/pageflow/folders_helper.rb +8 -5
  83. data/app/helpers/pageflow/help_entries_helper.rb +2 -2
  84. data/app/helpers/pageflow/hreflang_links_helper.rb +37 -0
  85. data/app/helpers/pageflow/info_box_helper.rb +7 -11
  86. data/app/helpers/pageflow/media_query_helper.rb +3 -3
  87. data/app/helpers/pageflow/navigation_bar_helper.rb +1 -1
  88. data/app/helpers/pageflow/overview_helper.rb +1 -1
  89. data/app/helpers/pageflow/page_types_helper.rb +5 -5
  90. data/app/helpers/pageflow/pages_helper.rb +29 -15
  91. data/app/helpers/pageflow/public_i18n_helper.rb +1 -1
  92. data/app/helpers/pageflow/quota_helper.rb +4 -4
  93. data/app/helpers/pageflow/render_json_helper.rb +6 -3
  94. data/app/helpers/pageflow/revision_file_helper.rb +2 -1
  95. data/app/helpers/pageflow/sites_helper.rb +3 -3
  96. data/app/helpers/pageflow/social_share_helper.rb +24 -10
  97. data/app/helpers/pageflow/social_share_links_helper.rb +12 -9
  98. data/app/helpers/pageflow/structured_data_helper.rb +1 -1
  99. data/app/helpers/pageflow/stub_page_configuration.rb +7 -3
  100. data/app/helpers/pageflow/text_direction_helper.rb +1 -1
  101. data/app/helpers/pageflow/themes_helper.rb +1 -1
  102. data/app/helpers/pageflow/video_files_helper.rb +29 -13
  103. data/app/helpers/pageflow/widgets_helper.rb +7 -6
  104. data/app/inputs/pageflow_permalink_input.rb +3 -2
  105. data/app/jobs/pageflow/application_job.rb +1 -0
  106. data/app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb +1 -1
  107. data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +1 -0
  108. data/app/jobs/pageflow/poll_zencoder_job.rb +3 -2
  109. data/app/jobs/pageflow/process_image_or_text_track_job.rb +1 -0
  110. data/app/jobs/pageflow/prune_auto_snapshots_job.rb +1 -0
  111. data/app/jobs/pageflow/request_meta_data_from_zencoder_job.rb +1 -0
  112. data/app/jobs/pageflow/submit_file_to_zencoder_job.rb +1 -0
  113. data/app/mailers/pageflow/user_mailer.rb +1 -0
  114. data/app/models/concerns/pageflow/auto_generated_perma_id.rb +13 -1
  115. data/app/models/concerns/pageflow/entry_publication_states.rb +7 -3
  116. data/app/models/concerns/pageflow/feature_target.rb +8 -4
  117. data/app/models/concerns/pageflow/output_source.rb +3 -3
  118. data/app/models/concerns/pageflow/permalinkable.rb +2 -1
  119. data/app/models/concerns/pageflow/reusable_file.rb +23 -23
  120. data/app/models/concerns/pageflow/serialization_blacklist.rb +1 -1
  121. data/app/models/concerns/pageflow/suspendable.rb +5 -3
  122. data/app/models/concerns/pageflow/theme_referencer.rb +1 -1
  123. data/app/models/concerns/pageflow/translatable.rb +62 -0
  124. data/app/models/concerns/pageflow/uploadable_file.rb +6 -6
  125. data/app/models/pageflow/account.rb +6 -5
  126. data/app/models/pageflow/account_member_query.rb +1 -1
  127. data/app/models/pageflow/account_role_query.rb +1 -1
  128. data/app/models/pageflow/application_query.rb +1 -1
  129. data/app/models/pageflow/application_record.rb +1 -1
  130. data/app/models/pageflow/audio_file.rb +4 -4
  131. data/app/models/pageflow/audio_file_url_templates.rb +1 -1
  132. data/app/models/pageflow/authentication_token.rb +2 -2
  133. data/app/models/pageflow/chapter.rb +6 -1
  134. data/app/models/pageflow/chapter_scaffold.rb +2 -4
  135. data/app/models/pageflow/cname_site_request_scope.rb +1 -1
  136. data/app/models/pageflow/customized_theme.rb +6 -6
  137. data/app/models/pageflow/draft_entry.rb +37 -9
  138. data/app/models/pageflow/edit_lock.rb +19 -21
  139. data/app/models/pageflow/encoding_confirmation.rb +2 -2
  140. data/app/models/pageflow/entries_feed.rb +2 -2
  141. data/app/models/pageflow/entry.rb +44 -30
  142. data/app/models/pageflow/entry_at_revision.rb +5 -1
  143. data/app/models/pageflow/entry_duplicate.rb +8 -5
  144. data/app/models/pageflow/entry_publication.rb +2 -2
  145. data/app/models/pageflow/entry_role_query.rb +4 -4
  146. data/app/models/pageflow/entry_template.rb +4 -4
  147. data/app/models/pageflow/entry_title_or_account_name_query.rb +2 -2
  148. data/app/models/pageflow/entry_translation_group.rb +42 -0
  149. data/app/models/pageflow/file_reuse.rb +2 -2
  150. data/app/models/pageflow/file_usage.rb +10 -3
  151. data/app/models/pageflow/folder.rb +2 -2
  152. data/app/models/pageflow/home_button.rb +7 -7
  153. data/app/models/pageflow/image_file.rb +20 -5
  154. data/app/models/pageflow/image_file_url_templates.rb +1 -1
  155. data/app/models/pageflow/invitation_form.rb +2 -1
  156. data/app/models/pageflow/managed_user_query.rb +1 -1
  157. data/app/models/pageflow/membership.rb +5 -5
  158. data/app/models/pageflow/nested_revision_component_copy.rb +263 -0
  159. data/app/models/pageflow/null_user.rb +1 -1
  160. data/app/models/pageflow/overview_button.rb +1 -1
  161. data/app/models/pageflow/page.rb +7 -3
  162. data/app/models/pageflow/permalink.rb +23 -2
  163. data/app/models/pageflow/permalink_directory.rb +7 -0
  164. data/app/models/pageflow/permalink_redirect.rb +7 -0
  165. data/app/models/pageflow/positioned_file.rb +5 -5
  166. data/app/models/pageflow/potential_entry_translations.rb +55 -0
  167. data/app/models/pageflow/potential_memberships.rb +5 -4
  168. data/app/models/pageflow/published_entry.rb +62 -11
  169. data/app/models/pageflow/revision.rb +24 -15
  170. data/app/models/pageflow/roles.rb +14 -18
  171. data/app/models/pageflow/site.rb +36 -3
  172. data/app/models/pageflow/site_root_entry_form.rb +27 -0
  173. data/app/models/pageflow/sitemaps.rb +10 -1
  174. data/app/models/pageflow/storyline.rb +5 -2
  175. data/app/models/pageflow/storyline_scaffold.rb +1 -1
  176. data/app/models/pageflow/text_track_file.rb +1 -1
  177. data/app/models/pageflow/text_track_file_url_templates.rb +1 -1
  178. data/app/models/pageflow/theme_customization_file.rb +3 -2
  179. data/app/models/pageflow/thumbnail_file_resolver.rb +1 -1
  180. data/app/models/pageflow/url_template.rb +1 -1
  181. data/app/models/pageflow/used_file.rb +7 -3
  182. data/app/models/pageflow/user_name_query.rb +2 -2
  183. data/app/models/pageflow/video_file.rb +22 -15
  184. data/app/models/pageflow/video_file_url_templates.rb +6 -4
  185. data/app/models/pageflow/widget.rb +4 -3
  186. data/app/models/pageflow/with_file_usage_extension.rb +1 -1
  187. data/app/models/pageflow/zencoder_attachment.rb +8 -8
  188. data/app/policies/pageflow/account_policy.rb +3 -1
  189. data/app/policies/pageflow/admin/admin_only_tab_policy.rb +1 -0
  190. data/app/policies/pageflow/admin/entry_tab_policy.rb +1 -0
  191. data/app/policies/pageflow/application_policy.rb +2 -0
  192. data/app/policies/pageflow/entry_policy.rb +7 -1
  193. data/app/policies/pageflow/entry_template_policy.rb +2 -1
  194. data/app/policies/pageflow/file_policy.rb +4 -7
  195. data/app/policies/pageflow/folder_policy.rb +18 -8
  196. data/app/policies/pageflow/membership_policy.rb +6 -4
  197. data/app/policies/pageflow/site_policy.rb +10 -3
  198. data/app/policies/pageflow/user_policy.rb +6 -4
  199. data/app/state_machines/pageflow/image_and_text_track_processing_state_machine.rb +3 -2
  200. data/app/state_machines/pageflow/media_encoding_state_machine.rb +5 -4
  201. data/app/views/admin/accounts/_entry_template_details.html.arb +2 -2
  202. data/app/views/admin/entries/_attributes_table.html.arb +6 -5
  203. data/app/views/admin/entries/_form.html.erb +2 -1
  204. data/app/views/admin/entries/_permalink_inputs.html.erb +9 -2
  205. data/app/views/admin/entry_templates/_form.html.erb +1 -3
  206. data/app/views/admin/site_root_entry/choose.html.erb +19 -0
  207. data/app/views/admin/sites/_fields.html.erb +14 -1
  208. data/app/views/admin/translations/_form.html.erb +31 -0
  209. data/app/views/admin/users/_attributes_table.html.arb +13 -0
  210. data/app/views/components/pageflow/admin/add_membership_button.rb +13 -12
  211. data/app/views/components/pageflow/admin/custom_scopes_renderer.rb +1 -0
  212. data/app/views/components/pageflow/admin/embed_code_field.rb +1 -0
  213. data/app/views/components/pageflow/admin/embedded_index_table.rb +9 -10
  214. data/app/views/components/pageflow/admin/entries_tab.rb +1 -0
  215. data/app/views/components/pageflow/admin/entry_publication_state_indicator.rb +6 -5
  216. data/app/views/components/pageflow/admin/entry_templates_tab.rb +2 -1
  217. data/app/views/components/pageflow/admin/entry_translations_tab.rb +102 -0
  218. data/app/views/components/pageflow/admin/entry_user_badge_list.rb +1 -0
  219. data/app/views/components/pageflow/admin/extensible_attributes_table.rb +9 -8
  220. data/app/views/components/pageflow/admin/features_tab.rb +1 -0
  221. data/app/views/components/pageflow/admin/grouped_folder_list.rb +1 -0
  222. data/app/views/components/pageflow/admin/icon_link_to.rb +1 -0
  223. data/app/views/components/pageflow/admin/members_tab.rb +4 -3
  224. data/app/views/components/pageflow/admin/membership_role_with_tooltip.rb +3 -2
  225. data/app/views/components/pageflow/admin/revisions_tab.rb +14 -10
  226. data/app/views/components/pageflow/admin/sites_tab.rb +1 -0
  227. data/app/views/components/pageflow/admin/tabs_view.rb +1 -0
  228. data/app/views/components/pageflow/admin/timestamp.rb +6 -5
  229. data/app/views/components/pageflow/admin/user_account_badge_list.rb +2 -3
  230. data/app/views/components/pageflow/admin/user_accounts_tab.rb +1 -0
  231. data/app/views/components/pageflow/admin/user_entries_tab.rb +1 -0
  232. data/app/views/components/pageflow/admin/users_tab.rb +1 -0
  233. data/app/views/pageflow/editor/config/_seeds.json.jbuilder +1 -1
  234. data/app/views/pageflow/editor/entries/index.json.jbuilder +1 -1
  235. data/app/views/pageflow/editor/entries/show.json.jbuilder +1 -1
  236. data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +2 -2
  237. data/app/views/pageflow/editor/files/_file.json.jbuilder +5 -13
  238. data/app/views/pageflow/editor/files/create.json.jbuilder +1 -1
  239. data/app/views/pageflow/editor/files/index.json.jbuilder +1 -1
  240. data/app/views/pageflow/editor/sites/_site.json.jbuilder +1 -0
  241. data/app/views/pageflow/editor/video_files/_video_file.json.jbuilder +1 -3
  242. data/app/views/pageflow/entries/share_menu/_bluesky_link.html.erb +8 -0
  243. data/app/views/pageflow/entries/share_menu/_threads_link.html.erb +8 -0
  244. data/app/views/pageflow/entries/share_menu/_twitter_link.html.erb +3 -13
  245. data/app/views/pageflow/files/_file.json.jbuilder +3 -3
  246. data/app/views/pageflow/sitemaps/index.xml.builder +9 -1
  247. data/app/views/pageflow/social_share/_entry_meta_tags.html.erb +1 -1
  248. data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
  249. data/config/initializers/active_admin_patches.rb +3 -6
  250. data/config/initializers/admin_resource_tabs.rb +3 -0
  251. data/config/initializers/paperclip.rb +1 -0
  252. data/config/initializers/symmetric_encryption.rb +1 -1
  253. data/config/initializers/zencoder.rb +24 -13
  254. data/config/locales/de.yml +110 -5
  255. data/config/locales/en.yml +109 -8
  256. data/config/routes.rb +15 -13
  257. data/config/spring.rb +2 -1
  258. data/db/migrate/20140418225525_setup_schema.rb +2 -2
  259. data/db/migrate/20190306161431_copy_file_attributes_of_failed_uploads.rb +2 -2
  260. data/db/migrate/20190820152900_drop_accounts_themes.rb +2 -1
  261. data/db/migrate/20191202145757_create_pageflow_scrolled_sections.rb +11 -11
  262. data/db/migrate/20191202150657_create_pageflow_scrolled_chapters.rb +1 -1
  263. data/db/migrate/20191202154723_create_pageflow_scrolled_content_elements.rb +9 -9
  264. data/db/migrate/20191219143450_add_position_to_content_elements.rb +2 -1
  265. data/db/migrate/20200117133200_change_revision_appearance_option_default_and_null.rb +2 -1
  266. data/db/migrate/20200122115400_create_pageflow_entry_templates.rb +25 -25
  267. data/db/migrate/20200206134400_convert_legacy_scrolled_content_element_types.rb +3 -3
  268. data/db/migrate/20221215120856_associate_entry_templates_with_sites.rb +2 -2
  269. data/db/migrate/20230120092923_create_other_files.rb +2 -1
  270. data/db/migrate/20230419083307_create_pageflow_entry_translation_group.rb +9 -0
  271. data/db/migrate/20240612110434_add_cutoff_mode_name_to_sites.rb +5 -0
  272. data/db/migrate/20240918084059_create_pageflow_permalink_redirects.rb +14 -0
  273. data/db/migrate/20250508172234_ensure_scrolled_entries_have_main_storyline.rb +14 -0
  274. data/db/migrate/20250617090048_add_custom404_entry_to_sites.rb +5 -0
  275. data/db/migrate/20250617100000_add_perma_id_counter_to_entries.rb +28 -0
  276. data/db/migrate/20250722174123_add_perma_id_to_chapters.rb +10 -0
  277. data/db/migrate/20250725080603_add_perma_id_indexes_to_revision_components.rb +13 -0
  278. data/db/migrate/20250726000000_add_display_name_to_file_usages.rb +5 -0
  279. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +3918 -1489
  280. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +468 -1161
  281. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +28125 -22
  282. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +26589 -19
  283. data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -0
  284. data/entry_types/paged/app/helpers/pageflow_paged/page_background_asset_helper.rb +1 -1
  285. data/entry_types/paged/app/helpers/pageflow_paged/third_party_embed_consent_helper.rb +7 -7
  286. data/entry_types/paged/app/views/pageflow_paged/editor/entries/_seed.json.jbuilder +1 -0
  287. data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
  288. data/entry_types/paged/lib/pageflow_paged/plugin.rb +4 -0
  289. data/entry_types/paged/lib/pageflow_paged/react/page_type.rb +1 -1
  290. data/entry_types/paged/lib/pageflow_paged/react/widget_type.rb +3 -3
  291. data/entry_types/paged/lib/pageflow_paged.rb +1 -1
  292. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +5 -3
  293. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +2 -2
  294. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +2 -2
  295. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +2 -1
  296. data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +2 -2
  297. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +1 -0
  298. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +2 -1
  299. data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +60 -6
  300. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +16 -2
  301. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +21 -23
  302. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +16 -1
  303. data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +15 -14
  304. data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +12 -0
  305. data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +12 -1
  306. data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +19 -1
  307. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -0
  308. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +2 -2
  309. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +2 -0
  310. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +17 -9
  311. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry_translations.json.jbuilder +14 -0
  312. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +25 -5
  313. data/entry_types/scrolled/app/views/pageflow_scrolled/storylines/_storyline.json.jbuilder +7 -0
  314. data/entry_types/scrolled/config/locales/de.yml +612 -49
  315. data/entry_types/scrolled/config/locales/en.yml +584 -51
  316. data/entry_types/scrolled/config/routes.rb +18 -8
  317. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +12 -20
  318. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/icons/information.svg +13 -0
  319. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/icons/muted.svg +1 -0
  320. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/icons/share.svg +12 -0
  321. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/icons/unmuted.svg +1 -0
  322. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDarkVariantDesktop.svg +56 -0
  323. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDarkVariantMobile.svg +22 -0
  324. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -11
  325. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +27 -8
  326. data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
  327. data/entry_types/scrolled/lib/pageflow_scrolled/additional_theme_assets.rb +27 -0
  328. data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +16 -4
  329. data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +1 -1
  330. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +24 -4
  331. data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +24 -22
  332. data/entry_types/scrolled/lib/pageflow_scrolled.rb +1 -1
  333. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +6 -5
  334. data/entry_types/scrolled/package/config/webpack.js +22 -0
  335. data/entry_types/scrolled/package/contentElements/hotspots-frontend.css +1 -0
  336. data/entry_types/scrolled/package/contentElements/hotspots-frontend.js +1529 -0
  337. data/entry_types/scrolled/package/contentElements/tikTokEmbed-frontend.css +1 -0
  338. data/entry_types/scrolled/package/contentElements/tikTokEmbed-frontend.js +59 -0
  339. data/entry_types/scrolled/package/contentElements-editor.js +2076 -322
  340. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  341. data/entry_types/scrolled/package/contentElements-frontend.js +1022 -648
  342. data/entry_types/scrolled/package/editor.js +2086 -1091
  343. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-6ee0e024.js → FloatingPortalRootProvider-51914be7.js} +1200 -1258
  344. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-b28d991a.js → PhonePlatformContext-9f76033e.js} +7 -8
  345. data/entry_types/scrolled/package/frontend/ThemeIcon-81f2f066.js +1932 -0
  346. data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-788e9cdb.js +39 -0
  347. data/entry_types/scrolled/package/frontend/{Viewer-6e4d14ed.js → Viewer-0345ce57.js} +36 -63
  348. data/entry_types/scrolled/package/frontend/{Viewer-32cd1ac1.js → Viewer-cdc549cc.js} +15 -22
  349. data/entry_types/scrolled/package/frontend/{Wavesurfer-7d9cf1b7.js → Wavesurfer-1cdc3925.js} +54 -74
  350. data/entry_types/scrolled/package/frontend/{components-24363f97.js → components-96660ffd.js} +1791 -841
  351. data/entry_types/scrolled/package/frontend/{index-fc4b13e6.js → index-eb670c2f.js} +11 -18
  352. data/entry_types/scrolled/package/frontend/index.css +1 -1
  353. data/entry_types/scrolled/package/frontend/index.js +517 -903
  354. data/entry_types/scrolled/package/frontend/{createSuper-d0f30da3.js → inherits-539844a6.js} +40 -56
  355. data/entry_types/scrolled/package/frontend/{useContentElementEditorState-245f1986.js → useContentElementEditorState-77fe6c79.js} +7 -8
  356. data/entry_types/scrolled/package/frontend/usePhonePlatform-c2ba875d.js +8 -0
  357. data/entry_types/scrolled/package/frontend-server.js +0 -1
  358. data/entry_types/scrolled/package/package.json +19 -10
  359. data/entry_types/scrolled/package/testHelpers.js +306 -70
  360. data/entry_types/scrolled/package/values/widgets.module.css +18 -0
  361. data/entry_types/scrolled/package/widgets/consentBar.css +1 -1
  362. data/entry_types/scrolled/package/widgets/consentBar.js +47 -66
  363. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  364. data/entry_types/scrolled/package/widgets/defaultNavigation.js +177 -207
  365. data/entry_types/scrolled/package/widgets/excursionDialog.css +1 -0
  366. data/entry_types/scrolled/package/widgets/excursionDialog.js +109 -0
  367. data/entry_types/scrolled/package/widgets/excursionSheet.css +1 -0
  368. data/entry_types/scrolled/package/widgets/excursionSheet.js +262 -0
  369. data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -1
  370. data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +6 -9
  371. data/entry_types/scrolled/package/widgets/iconScrollIndicator.css +1 -0
  372. data/entry_types/scrolled/package/widgets/iconScrollIndicator.js +48 -0
  373. data/entry_types/scrolled/package/widgets/mainStorylineSheet.css +1 -0
  374. data/entry_types/scrolled/package/widgets/mainStorylineSheet.js +144 -0
  375. data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -1
  376. data/entry_types/scrolled/package/widgets/textInlineFileRights.js +26 -9
  377. data/entry_types/scrolled/package/widgets-server.js +5 -0
  378. data/entry_types/scrolled/spec/factories/chapters.rb +14 -1
  379. data/entry_types/scrolled/spec/factories/content_elements.rb +1 -1
  380. data/lib/generators/pageflow/active_admin_initializer/active_admin_initializer_generator.rb +5 -3
  381. data/lib/generators/pageflow/assets/assets_generator.rb +7 -5
  382. data/lib/generators/pageflow/cancan/cancan_generator.rb +2 -1
  383. data/lib/generators/pageflow/cancan/templates/ability.rb +1 -1
  384. data/lib/generators/pageflow/error_pages/error_pages_generator.rb +2 -1
  385. data/lib/generators/pageflow/initializer/initializer_generator.rb +3 -2
  386. data/lib/generators/pageflow/install/install_generator.rb +2 -2
  387. data/lib/generators/pageflow/procfile/procfile_generator.rb +2 -1
  388. data/lib/generators/pageflow/resque/resque_generator.rb +6 -4
  389. data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
  390. data/lib/generators/pageflow/routes/routes_generator.rb +4 -2
  391. data/lib/generators/pageflow/seeds/seeds_generator.rb +3 -2
  392. data/lib/generators/pageflow/seeds/templates/seeds.rb +6 -6
  393. data/lib/generators/pageflow/theme/theme_generator.rb +2 -1
  394. data/lib/generators/pageflow/user/user_generator.rb +2 -1
  395. data/lib/pageflow/ability_mixin.rb +25 -15
  396. data/lib/pageflow/active_admin_patches/views/attributes_table.rb +1 -0
  397. data/lib/pageflow/active_admin_patches/views/pages/base.rb +3 -2
  398. data/lib/pageflow/active_admin_patches/views/table_for.rb +1 -0
  399. data/lib/pageflow/additional_headers.rb +27 -0
  400. data/lib/pageflow/admin/attributes_table_rows.rb +3 -3
  401. data/lib/pageflow/admin/tabs.rb +1 -1
  402. data/lib/pageflow/built_in_file_type.rb +1 -1
  403. data/lib/pageflow/built_in_page_types_plugin.rb +1 -1
  404. data/lib/pageflow/built_in_widget_type.rb +2 -2
  405. data/lib/pageflow/built_in_widget_types_plugin.rb +2 -1
  406. data/lib/pageflow/configuration.rb +141 -18
  407. data/lib/pageflow/cutoff_modes.rb +39 -0
  408. data/lib/pageflow/editor_controller.rb +6 -10
  409. data/lib/pageflow/engine.rb +4 -5
  410. data/lib/pageflow/entry_export_import/attachment_files.rb +1 -1
  411. data/lib/pageflow/entry_export_import/entry_serialization.rb +5 -4
  412. data/lib/pageflow/entry_export_import/file_mappings.rb +1 -0
  413. data/lib/pageflow/entry_export_import/revision_serialization/import.rb +1 -1
  414. data/lib/pageflow/entry_export_import.rb +3 -3
  415. data/lib/pageflow/entry_types.rb +2 -2
  416. data/lib/pageflow/feature.rb +1 -1
  417. data/lib/pageflow/features.rb +4 -6
  418. data/lib/pageflow/file_importers.rb +4 -4
  419. data/lib/pageflow/file_type.rb +3 -3
  420. data/lib/pageflow/file_types.rb +3 -3
  421. data/lib/pageflow/global_config_api.rb +5 -6
  422. data/lib/pageflow/help_entries.rb +7 -7
  423. data/lib/pageflow/help_entry.rb +1 -1
  424. data/lib/pageflow/hooks.rb +1 -1
  425. data/lib/pageflow/nested_revision_component.rb +9 -27
  426. data/lib/pageflow/news_item_api.rb +1 -1
  427. data/lib/pageflow/page_type.rb +2 -3
  428. data/lib/pageflow/page_types.rb +3 -3
  429. data/lib/pageflow/paperclip_interpolations/support.rb +1 -1
  430. data/lib/pageflow/paperclip_processors/vtt.rb +1 -0
  431. data/lib/pageflow/paperclip_processors/webp.rb +2 -2
  432. data/lib/pageflow/partial_editor_fragment_renderer.rb +2 -2
  433. data/lib/pageflow/plugin.rb +1 -2
  434. data/lib/pageflow/quota.rb +9 -5
  435. data/lib/pageflow/quotas.rb +1 -1
  436. data/lib/pageflow/rails_version.rb +1 -0
  437. data/lib/pageflow/react.rb +1 -1
  438. data/lib/pageflow/revision_component.rb +8 -40
  439. data/lib/pageflow/revision_components.rb +16 -6
  440. data/lib/pageflow/seeds.rb +12 -16
  441. data/lib/pageflow/theme.rb +1 -1
  442. data/lib/pageflow/theme_customizations.rb +10 -10
  443. data/lib/pageflow/themes.rb +3 -3
  444. data/lib/pageflow/user_mixin.rb +6 -6
  445. data/lib/pageflow/version.rb +1 -1
  446. data/lib/pageflow/widget_type.rb +4 -4
  447. data/lib/pageflow/widget_types.rb +9 -9
  448. data/lib/pageflow/zencoder_api.rb +32 -42
  449. data/lib/pageflow/zencoder_audio_output_definition.rb +14 -13
  450. data/lib/pageflow/zencoder_meta_data_output_definition.rb +3 -2
  451. data/lib/pageflow/zencoder_output_definition.rb +16 -14
  452. data/lib/pageflow/zencoder_video_output_definition.rb +140 -88
  453. data/lib/pageflow.rb +7 -2
  454. data/lib/tasks/pageflow_tasks.rake +1 -1
  455. data/package/editor.js +960 -871
  456. data/package/frontend.js +113 -387
  457. data/package/package.json +2 -1
  458. data/package/testHelpers.js +10 -56
  459. data/package/ui.js +209 -251
  460. data/spec/factories/accounts.rb +37 -22
  461. data/spec/factories/audio_files.rb +2 -2
  462. data/spec/factories/authentication_tokens.rb +4 -4
  463. data/spec/factories/chapters.rb +4 -4
  464. data/spec/factories/draft_entries.rb +14 -6
  465. data/spec/factories/edit_locks.rb +1 -1
  466. data/spec/factories/entries.rb +28 -19
  467. data/spec/factories/entry_translation_groups.rb +6 -0
  468. data/spec/factories/file_usages.rb +2 -1
  469. data/spec/factories/folders.rb +1 -1
  470. data/spec/factories/image_files.rb +2 -2
  471. data/spec/factories/pages.rb +3 -3
  472. data/spec/factories/published_entries.rb +26 -8
  473. data/spec/factories/revisions.rb +1 -1
  474. data/spec/factories/sites.rb +6 -0
  475. data/spec/factories/test_multi_attachment_files.rb +1 -1
  476. data/spec/factories/text_track_files.rb +1 -1
  477. data/spec/factories/uploadable_files.rb +1 -1
  478. data/spec/factories/users.rb +6 -6
  479. data/spec/factories/video_files.rb +2 -2
  480. data/spec/factories/widgets.rb +1 -1
  481. data/spec/fixtures/7x15_rotated.jpg +0 -0
  482. data/vendor/assets/javascripts/wysihtml-toolbar.js +19288 -0
  483. metadata +105 -41
  484. data/config/initializers/revision_components.rb +0 -5
  485. data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-8242f213.js +0 -107
  486. data/entry_types/scrolled/package/frontend/arrowRight-e42e6011.js +0 -77
  487. data/entry_types/scrolled/package/frontend/i18n-71c39823.js +0 -1129
@@ -1,4 +1,4 @@
1
- import { useContentElementConfigurationUpdate, useI18n, useDarkBackground, useContentElementEditorState, useIsStaticPreview, useContentElementLifecycle, utils, contentElementWidths, withShadowClassName, paletteColor, Text, EditableInlineText, frontend, useFileWithInlineRights, FitViewport, ContentElementBox, ContentElementFigure, InlineFileRights, usePortraitOrientation, ExpandableImage, Image, usePlayerState, MediaInteractionTracking, useAudioFocus, VideoPlayerControls, PlayerEventContextDataProvider, VideoPlayer, AudioPlayerControls, AudioPlayer, useMediaMuted, useTheme, EditableText, ThirdPartyOptOutInfo, useFile, ThirdPartyOptIn, useAtmo, textColorForBackgroundColor, Panorama, ThemeIcon, useLocale, Figure, usePhonePlatform, FullscreenViewer, ToggleFullscreenCornerButton } from 'pageflow-scrolled/frontend';
1
+ import { useContentElementConfigurationUpdate, useI18n, useDarkBackground, useContentElementEditorState, useIsStaticPreview, useContentElementLifecycle, utils, contentElementWidths, withShadowClassName, paletteColor, Text, EditableInlineText, frontend, useFileWithInlineRights, FitViewport, ContentElementBox, ContentElementFigure, InlineFileRights, usePortraitOrientation, ExpandableImage, Image, usePlayerState, MediaInteractionTracking, useBackgroundFile, useAudioFocus, VideoPlayerControls, PlayerEventContextDataProvider, VideoPlayer, AudioPlayerControls, AudioPlayer, useMediaMuted, useTheme, EditableText, ThirdPartyOptOutInfo, useFile, ThirdPartyOptIn, useAtmo, LinkButton, EditableLink, ScrollButton as ScrollButton$1, useContentElementEditorCommandSubscription, LinkTooltipProvider, contentElementWidthName, textColorForBackgroundColor, Panorama, ThemeIcon, useLocale, usePhonePlatform, FullscreenViewer, ToggleFullscreenCornerButton, PaginationIndicator, Figure, EditableTable } from 'pageflow-scrolled/frontend';
2
2
  import React, { useState, useRef, useEffect, useMemo, useCallback, forwardRef } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import ReactCompareImage from 'react-compare-image';
@@ -83,33 +83,27 @@ var styles = {"darkContentTextColor":"var(--theme-dark-content-text-color, #222)
83
83
 
84
84
  function Heading(_ref) {
85
85
  var configuration = _ref.configuration,
86
- sectionProps = _ref.sectionProps,
87
- contentElementWidth = _ref.contentElementWidth;
86
+ sectionProps = _ref.sectionProps,
87
+ contentElementWidth = _ref.contentElementWidth;
88
88
  var level = configuration.level || sectionProps.sectionIndex;
89
89
  var firstSectionInEntry = level === 0;
90
90
  var updateConfiguration = useContentElementConfigurationUpdate();
91
-
92
91
  var _useI18n = useI18n({
93
- locale: 'ui'
94
- }),
95
- t = _useI18n.t;
96
-
92
+ locale: 'ui'
93
+ }),
94
+ t = _useI18n.t;
97
95
  var darkBackground = useDarkBackground();
98
-
99
96
  var _useContentElementEdi = useContentElementEditorState(),
100
- isSelected = _useContentElementEdi.isSelected,
101
- isEditable = _useContentElementEdi.isEditable;
102
-
97
+ isSelected = _useContentElementEdi.isSelected,
98
+ isEditable = _useContentElementEdi.isEditable;
103
99
  var legacyValue = configuration.children;
104
100
  var Tag = firstSectionInEntry ? 'h1' : 'h2';
105
101
  var forcePaddingTop = firstSectionInEntry && !('marginTop' in configuration);
106
102
  var entranceAnimation = !useIsStaticPreview() && configuration.entranceAnimation || 'none';
107
-
108
103
  var _useState = useState(false),
109
- _useState2 = _slicedToArray(_useState, 2),
110
- animating = _useState2[0],
111
- setAnimating = _useState2[1];
112
-
104
+ _useState2 = _slicedToArray(_useState, 2),
105
+ animating = _useState2[0],
106
+ setAnimating = _useState2[1];
113
107
  useContentElementLifecycle({
114
108
  onActivate: function onActivate() {
115
109
  setAnimating(entranceAnimation !== 'none');
@@ -135,19 +129,16 @@ function Heading(_ref) {
135
129
  if (!previouslySelected.current && isSelected) {
136
130
  setAnimating(true);
137
131
  }
138
-
139
132
  previouslySelected.current = isSelected;
140
133
  }, [isSelected]);
141
-
142
134
  function renderSubtitle(name) {
143
135
  var value = configuration[name];
144
-
145
136
  if (!isSelected && utils.isBlankEditableTextValue(value)) {
146
137
  return null;
147
138
  }
148
-
149
139
  return /*#__PURE__*/React.createElement(Text, {
150
- scaleCategory: getScaleCategory(configuration, firstSectionInEntry, name)
140
+ scaleCategory: getScaleCategory(configuration, firstSectionInEntry, name),
141
+ typographyVariant: configuration.typographyVariant
151
142
  }, /*#__PURE__*/React.createElement("div", {
152
143
  className: styles[name],
153
144
  role: "doc-subtitle"
@@ -160,7 +151,6 @@ function Heading(_ref) {
160
151
  }
161
152
  })));
162
153
  }
163
-
164
154
  return /*#__PURE__*/React.createElement("header", {
165
155
  className: classNames(styles.root, styles["animation-".concat(entranceAnimation)], _defineProperty({}, styles.animating, animating), _defineProperty({}, styles.hasTagline, !utils.isBlankEditableTextValue(configuration.tagline) || isSelected), _defineProperty({}, styles.forcePaddingTop, forcePaddingTop), _defineProperty({}, styles[sectionProps.layout], contentElementWidth > contentElementWidths.md || sectionProps.layout === 'centerRagged'), _defineProperty({}, withShadowClassName, !sectionProps.invert))
166
156
  }, renderSubtitle('tagline'), /*#__PURE__*/React.createElement(Tag, {
@@ -183,26 +173,20 @@ function Heading(_ref) {
183
173
  }
184
174
  }))), renderSubtitle('subtitle'));
185
175
  }
186
-
187
176
  function getScaleCategory(configuration, firstSectionInEntry) {
188
177
  var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
189
178
  var base = "heading".concat(capitalize(suffix));
190
-
191
179
  switch (configuration.textSize) {
192
180
  case 'large':
193
181
  return "".concat(base, "-lg");
194
-
195
182
  case 'medium':
196
183
  return "".concat(base, "-md");
197
-
198
184
  case 'small':
199
185
  return "".concat(base, "-sm");
200
-
201
186
  default:
202
187
  return firstSectionInEntry ? "".concat(base, "-lg") : "".concat(base, "-sm");
203
188
  }
204
189
  }
205
-
206
190
  function capitalize(string) {
207
191
  return string.charAt(0).toUpperCase() + string.slice(1);
208
192
  }
@@ -222,22 +206,19 @@ var placeholderFile = {
222
206
  };
223
207
  function BeforeAfter(configuration) {
224
208
  var isActive = configuration.isActive,
225
- load = configuration.load,
226
- before_label = configuration.before_label,
227
- after_label = configuration.after_label,
228
- initial_slider_position = configuration.initial_slider_position,
229
- slider_color = configuration.slider_color;
230
-
209
+ load = configuration.load,
210
+ before_label = configuration.before_label,
211
+ after_label = configuration.after_label,
212
+ initial_slider_position = configuration.initial_slider_position,
213
+ slider_color = configuration.slider_color;
231
214
  var _useState = useState(false),
232
- _useState2 = _slicedToArray(_useState, 2),
233
- wiggle = _useState2[0],
234
- setWiggle = _useState2[1];
235
-
215
+ _useState2 = _slicedToArray(_useState, 2),
216
+ wiggle = _useState2[0],
217
+ setWiggle = _useState2[1];
236
218
  var _useState3 = useState(false),
237
- _useState4 = _slicedToArray(_useState3, 2),
238
- moved = _useState4[0],
239
- setMoved = _useState4[1];
240
-
219
+ _useState4 = _slicedToArray(_useState3, 2),
220
+ moved = _useState4[0],
221
+ setMoved = _useState4[1];
241
222
  useEffect(function () {
242
223
  // Only wiggle once per element, when it is active for the first
243
224
  // time
@@ -255,10 +236,8 @@ function BeforeAfter(configuration) {
255
236
  collectionName: 'imageFiles',
256
237
  propertyName: 'after_id'
257
238
  });
258
-
259
239
  var _useContentElementEdi = useContentElementEditorState(),
260
- isSelected = _useContentElementEdi.isSelected;
261
-
240
+ isSelected = _useContentElementEdi.isSelected;
262
241
  var beforeImageUrl = beforeImage && beforeImage.urls.large;
263
242
  var beforeImageAlt = beforeImage && beforeImage.configuration.alt;
264
243
  var afterImageUrl = afterImage && afterImage.urls.large;
@@ -272,40 +251,39 @@ function BeforeAfter(configuration) {
272
251
  label: 'after'
273
252
  }];
274
253
  return /*#__PURE__*/React.createElement(FitViewport, {
275
- file: beforeImage || afterImage || placeholderFile
254
+ file: beforeImage || afterImage || placeholderFile,
255
+ fill: configuration.position === 'backdrop'
276
256
  }, /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(ContentElementFigure, {
277
257
  configuration: configuration
278
258
  }, /*#__PURE__*/React.createElement(FitViewport.Content, null, /*#__PURE__*/React.createElement(Measure, {
279
259
  bounds: true
280
260
  }, function (_ref) {
281
- var _cx;
282
-
283
261
  var measureRef = _ref.measureRef,
284
- contentRect = _ref.contentRect;
262
+ contentRect = _ref.contentRect;
285
263
  var initialRectWidth = contentRect.bounds.width * initialSliderPos + 'px';
286
264
  return /*#__PURE__*/React.createElement("div", {
287
265
  ref: measureRef,
288
266
  style: {
289
267
  '--initial-rect-width': initialRectWidth
290
268
  },
291
- className: classNames((_cx = {}, _defineProperty(_cx, styles$1.selected, isSelected), _defineProperty(_cx, styles$1.wiggle, wiggle && !moved), _cx), styles$1.container)
269
+ className: classNames(_defineProperty(_defineProperty({}, styles$1.selected, isSelected), styles$1.wiggle, wiggle && !moved), styles$1.container)
292
270
  }, /*#__PURE__*/React.createElement(InitialSliderPositionIndicator, {
293
271
  parentSelected: isSelected,
294
272
  position: initial_slider_position
295
273
  }), renderCompareImage());
296
274
  }), /*#__PURE__*/React.createElement(InlineFileRights, {
275
+ configuration: configuration,
297
276
  context: "insideElement",
298
277
  items: inlineFileRightsItems
299
278
  })))), /*#__PURE__*/React.createElement(InlineFileRights, {
279
+ configuration: configuration,
300
280
  context: "afterElement",
301
281
  items: inlineFileRightsItems
302
282
  }));
303
-
304
283
  function renderCompareImage() {
305
284
  if (!load) {
306
285
  return null;
307
286
  }
308
-
309
287
  return /*#__PURE__*/React.createElement(ReactCompareImage, {
310
288
  leftImage: beforeImage ? beforeImageUrl : placeholderForBeforeImage,
311
289
  rightImage: afterImage ? afterImageUrl : placeholderForAfterImage,
@@ -321,10 +299,9 @@ function BeforeAfter(configuration) {
321
299
  });
322
300
  }
323
301
  }
324
-
325
302
  function InitialSliderPositionIndicator(_ref2) {
326
303
  var parentSelected = _ref2.parentSelected,
327
- position = _ref2.position;
304
+ position = _ref2.position;
328
305
  var indicatorWidth = '2px';
329
306
  var indicatorStyles = {
330
307
  left: "calc(".concat(position, "% - ").concat(indicatorWidth, "/2)"),
@@ -332,9 +309,10 @@ function InitialSliderPositionIndicator(_ref2) {
332
309
  height: '100%',
333
310
  borderLeft: '1px solid black',
334
311
  borderRight: '1px solid black'
335
- }; // In case this element is selected, and its initial slider position
336
- // is not in the middle, we show InitialSliderPositionIndicator
312
+ };
337
313
 
314
+ // In case this element is selected, and its initial slider position
315
+ // is not in the middle, we show InitialSliderPositionIndicator
338
316
  return parentSelected && position !== 50 ? /*#__PURE__*/React.createElement("div", {
339
317
  className: styles$1.sliderStart,
340
318
  style: indicatorStyles
@@ -343,9 +321,8 @@ function InitialSliderPositionIndicator(_ref2) {
343
321
 
344
322
  function InlineBeforeAfter(props) {
345
323
  var _useContentElementLif = useContentElementLifecycle(),
346
- isActive = _useContentElementLif.isActive,
347
- shouldLoad = _useContentElementLif.shouldLoad;
348
-
324
+ isActive = _useContentElementLif.isActive,
325
+ shouldLoad = _useContentElementLif.shouldLoad;
349
326
  return /*#__PURE__*/React.createElement(BeforeAfter, Object.assign({}, props.configuration, {
350
327
  load: shouldLoad,
351
328
  isActive: isActive
@@ -357,28 +334,65 @@ frontend.contentElementTypes.register('inlineBeforeAfter', {
357
334
  lifecycle: true
358
335
  });
359
336
 
337
+ function ownKeys(object, enumerableOnly) {
338
+ var keys = Object.keys(object);
339
+
340
+ if (Object.getOwnPropertySymbols) {
341
+ var symbols = Object.getOwnPropertySymbols(object);
342
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
343
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
344
+ });
345
+ keys.push.apply(keys, symbols);
346
+ }
347
+
348
+ return keys;
349
+ }
350
+
351
+ function _objectSpread2(target) {
352
+ for (var i = 1; i < arguments.length; i++) {
353
+ var source = arguments[i] != null ? arguments[i] : {};
354
+
355
+ if (i % 2) {
356
+ ownKeys(Object(source), true).forEach(function (key) {
357
+ _defineProperty(target, key, source[key]);
358
+ });
359
+ } else if (Object.getOwnPropertyDescriptors) {
360
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
361
+ } else {
362
+ ownKeys(Object(source)).forEach(function (key) {
363
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
364
+ });
365
+ }
366
+ }
367
+
368
+ return target;
369
+ }
370
+
360
371
  function InlineImage(_ref) {
361
372
  var contentElementId = _ref.contentElementId,
362
- contentElementWidth = _ref.contentElementWidth,
363
- configuration = _ref.configuration;
364
- var imageFile = useFileWithInlineRights({
373
+ contentElementWidth = _ref.contentElementWidth,
374
+ configuration = _ref.configuration;
375
+ var imageFile = useFileWithCropPosition(useFileWithInlineRights({
365
376
  configuration: configuration,
366
377
  collectionName: 'imageFiles',
367
378
  propertyName: 'id'
368
- });
369
- var portraitImageFile = useFileWithInlineRights({
379
+ }), configuration.cropPosition);
380
+ var portraitImageFile = useFileWithCropPosition(useFileWithInlineRights({
370
381
  configuration: configuration,
371
382
  collectionName: 'imageFiles',
372
383
  propertyName: 'portraitId'
373
- }); // Only render OrientationAwareInlineImage if a portrait image has
384
+ }), configuration.portraitCropPosition);
385
+
386
+ // Only render OrientationAwareInlineImage if a portrait image has
374
387
  // been selected. This prevents having the component rerender on
375
388
  // orientation changes even if it does not depend on orientation at
376
389
  // all.
377
-
378
390
  if (portraitImageFile) {
379
391
  return /*#__PURE__*/React.createElement(OrientationAwareInlineImage, {
380
392
  landscapeImageFile: imageFile,
381
393
  portraitImageFile: portraitImageFile,
394
+ landscapeImageModifiers: configuration.imageModifiers,
395
+ portraitImageModifiers: configuration.portraitImageModifiers,
382
396
  contentElementId: contentElementId,
383
397
  contentElementWidth: contentElementWidth,
384
398
  configuration: configuration
@@ -386,47 +400,58 @@ function InlineImage(_ref) {
386
400
  } else {
387
401
  return /*#__PURE__*/React.createElement(ImageWithCaption, {
388
402
  imageFile: imageFile,
403
+ imageModifiers: configuration.imageModifiers,
389
404
  contentElementId: contentElementId,
390
405
  contentElementWidth: contentElementWidth,
391
406
  configuration: configuration
392
407
  });
393
408
  }
394
409
  }
395
-
396
410
  function OrientationAwareInlineImage(_ref2) {
397
411
  var landscapeImageFile = _ref2.landscapeImageFile,
398
- portraitImageFile = _ref2.portraitImageFile,
399
- contentElementId = _ref2.contentElementId,
400
- contentElementWidth = _ref2.contentElementWidth,
401
- configuration = _ref2.configuration;
412
+ portraitImageFile = _ref2.portraitImageFile,
413
+ landscapeImageModifiers = _ref2.landscapeImageModifiers,
414
+ portraitImageModifiers = _ref2.portraitImageModifiers,
415
+ contentElementId = _ref2.contentElementId,
416
+ contentElementWidth = _ref2.contentElementWidth,
417
+ configuration = _ref2.configuration;
402
418
  var portraitOrientation = usePortraitOrientation();
403
419
  var imageFile = portraitOrientation && portraitImageFile ? portraitImageFile : landscapeImageFile;
420
+ var imageModifiers = portraitOrientation && portraitImageFile ? portraitImageModifiers : landscapeImageModifiers;
404
421
  return /*#__PURE__*/React.createElement(ImageWithCaption, {
405
422
  imageFile: imageFile,
423
+ imageModifiers: imageModifiers,
406
424
  contentElementId: contentElementId,
407
425
  contentElementWidth: contentElementWidth,
408
426
  configuration: configuration
409
427
  });
410
428
  }
411
-
412
429
  function ImageWithCaption(_ref3) {
413
430
  var imageFile = _ref3.imageFile,
414
- contentElementId = _ref3.contentElementId,
415
- contentElementWidth = _ref3.contentElementWidth,
416
- configuration = _ref3.configuration;
417
-
431
+ imageModifiers = _ref3.imageModifiers,
432
+ contentElementId = _ref3.contentElementId,
433
+ contentElementWidth = _ref3.contentElementWidth,
434
+ configuration = _ref3.configuration;
418
435
  var _useContentElementLif = useContentElementLifecycle(),
419
- shouldLoad = _useContentElementLif.shouldLoad;
420
-
436
+ shouldLoad = _useContentElementLif.shouldLoad;
421
437
  var enableFullscreen = configuration.enableFullscreen;
422
438
  var supportFullscreen = enableFullscreen && contentElementWidth < contentElementWidths.full;
439
+ var _processImageModifier = processImageModifiers(imageModifiers),
440
+ aspectRatio = _processImageModifier.aspectRatio,
441
+ rounded = _processImageModifier.rounded;
442
+ var isCircleCrop = rounded === 'circle';
423
443
  return /*#__PURE__*/React.createElement(FitViewport, {
424
444
  file: imageFile,
425
- aspectRatio: imageFile ? undefined : 0.75,
445
+ aspectRatio: aspectRatio || (imageFile ? undefined : 0.75),
426
446
  opaque: !imageFile
427
- }, /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(ContentElementFigure, {
447
+ }, /*#__PURE__*/React.createElement(ContentElementBox, {
448
+ borderRadius: isCircleCrop ? 'none' : rounded
449
+ }, /*#__PURE__*/React.createElement(ContentElementFigure, {
428
450
  configuration: configuration
429
- }, /*#__PURE__*/React.createElement(FitViewport.Content, null, /*#__PURE__*/React.createElement(ExpandableImage, {
451
+ }, /*#__PURE__*/React.createElement(FitViewport.Content, null, /*#__PURE__*/React.createElement(ContentElementBox, {
452
+ borderRadius: isCircleCrop ? 'circle' : 'none',
453
+ positioned: isCircleCrop
454
+ }, /*#__PURE__*/React.createElement(ExpandableImage, {
430
455
  enabled: supportFullscreen && shouldLoad,
431
456
  imageFile: imageFile,
432
457
  contentElementId: contentElementId
@@ -436,13 +461,15 @@ function ImageWithCaption(_ref3) {
436
461
  structuredData: true,
437
462
  variant: contentElementWidth === contentElementWidths.full ? 'large' : 'medium',
438
463
  preferSvg: true
439
- })), /*#__PURE__*/React.createElement(InlineFileRights, {
464
+ }))), /*#__PURE__*/React.createElement(InlineFileRights, {
465
+ configuration: configuration,
440
466
  context: "insideElement",
441
467
  items: [{
442
468
  file: imageFile,
443
469
  label: 'image'
444
470
  }]
445
471
  })))), /*#__PURE__*/React.createElement(InlineFileRights, {
472
+ configuration: configuration,
446
473
  context: "afterElement",
447
474
  items: [{
448
475
  file: imageFile,
@@ -450,12 +477,65 @@ function ImageWithCaption(_ref3) {
450
477
  }]
451
478
  }));
452
479
  }
480
+ function processImageModifiers(imageModifiers) {
481
+ var cropValue = getModiferValue(imageModifiers, 'crop');
482
+ var isCircleCrop = cropValue === 'circle';
483
+ return {
484
+ aspectRatio: isCircleCrop ? 1 : cropValue,
485
+ rounded: isCircleCrop ? 'circle' : getModiferValue(imageModifiers, 'rounded')
486
+ };
487
+ }
488
+ function getModiferValue(imageModifiers, name) {
489
+ var _find;
490
+ return (_find = (imageModifiers || []).find(function (imageModifier) {
491
+ return imageModifier.name === name;
492
+ })) === null || _find === void 0 ? void 0 : _find.value;
493
+ }
494
+ function useFileWithCropPosition(file, cropPosition) {
495
+ return file && _objectSpread2(_objectSpread2({}, file), {}, {
496
+ cropPosition: cropPosition
497
+ });
498
+ }
453
499
 
454
500
  frontend.contentElementTypes.register('inlineImage', {
455
501
  component: InlineImage,
456
502
  lifecycle: true
457
503
  });
458
504
 
505
+ function _objectWithoutPropertiesLoose(source, excluded) {
506
+ if (source == null) return {};
507
+ var target = {};
508
+ var sourceKeys = Object.keys(source);
509
+ var key, i;
510
+
511
+ for (i = 0; i < sourceKeys.length; i++) {
512
+ key = sourceKeys[i];
513
+ if (excluded.indexOf(key) >= 0) continue;
514
+ target[key] = source[key];
515
+ }
516
+
517
+ return target;
518
+ }
519
+
520
+ function _objectWithoutProperties(source, excluded) {
521
+ if (source == null) return {};
522
+ var target = _objectWithoutPropertiesLoose(source, excluded);
523
+ var key, i;
524
+
525
+ if (Object.getOwnPropertySymbols) {
526
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
527
+
528
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
529
+ key = sourceSymbolKeys[i];
530
+ if (excluded.indexOf(key) >= 0) continue;
531
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
532
+ target[key] = source[key];
533
+ }
534
+ }
535
+
536
+ return target;
537
+ }
538
+
459
539
  var styles$2 = {"wrapper":"MutedIndicator-module_wrapper__17JUY","visible":"MutedIndicator-module_visible__3qARn","eqBar":"MutedIndicator-module_eqBar__1cMDE","eqBar1":"MutedIndicator-module_eqBar1__2Ap_R MutedIndicator-module_eqBar__1cMDE","short-eq":"MutedIndicator-module_short-eq__1OYlk","eqBar2":"MutedIndicator-module_eqBar2__2QTgX MutedIndicator-module_eqBar__1cMDE","tall-eq":"MutedIndicator-module_tall-eq__6gm0B","eqBar3":"MutedIndicator-module_eqBar3__2S-y3 MutedIndicator-module_eqBar__1cMDE"};
460
540
 
461
541
  function MutedIndicator(_ref) {
@@ -516,13 +596,12 @@ function getLifecycleHandlers(configuration, playerActions) {
516
596
  }
517
597
  function getPlayerClickHandler(_ref) {
518
598
  var configuration = _ref.configuration,
519
- playerActions = _ref.playerActions,
520
- shouldPlay = _ref.shouldPlay,
521
- lastControlledVia = _ref.lastControlledVia,
522
- mediaMuted = _ref.mediaMuted,
523
- isEditable = _ref.isEditable,
524
- isSelected = _ref.isSelected;
525
-
599
+ playerActions = _ref.playerActions,
600
+ shouldPlay = _ref.shouldPlay,
601
+ lastControlledVia = _ref.lastControlledVia,
602
+ mediaMuted = _ref.mediaMuted,
603
+ isEditable = _ref.isEditable,
604
+ isSelected = _ref.isSelected;
526
605
  if (isEditable && !isSelected) {
527
606
  return null;
528
607
  } else if (configuration.playbackMode === 'loop') {
@@ -547,7 +626,6 @@ function getPlayerClickHandler(_ref) {
547
626
  if (configuration.rewindOnUnmute && lastControlledVia === 'autoplay') {
548
627
  playerActions.seekTo(0);
549
628
  }
550
-
551
629
  playerActions.playBlessed();
552
630
  } else if (shouldPlay) {
553
631
  playerActions.pause();
@@ -558,9 +636,11 @@ function getPlayerClickHandler(_ref) {
558
636
  }
559
637
  }
560
638
 
639
+ var _excluded = ["videoFile", "motifArea"];
561
640
  function InlineVideo(_ref) {
562
641
  var contentElementId = _ref.contentElementId,
563
- configuration = _ref.configuration;
642
+ configuration = _ref.configuration,
643
+ sectionProps = _ref.sectionProps;
564
644
  var videoFile = useFileWithInlineRights({
565
645
  configuration: configuration,
566
646
  collectionName: 'videoFiles',
@@ -580,60 +660,70 @@ function InlineVideo(_ref) {
580
660
  configuration: configuration,
581
661
  collectionName: 'imageFiles',
582
662
  propertyName: 'portraitPosterId'
583
- }); // Only render OrientationAwareInlineImage if a portrait image has
663
+ });
664
+
665
+ // Only render OrientationAwareInlineImage if a portrait image has
584
666
  // been selected. This prevents having the component rerender on
585
667
  // orientation changes even if it does not depend on orientation at
586
668
  // all.
587
-
588
669
  if (portraitVideoFile) {
589
670
  return /*#__PURE__*/React.createElement(OrientationAwareInlineVideo, {
590
671
  landscapeVideoFile: videoFile,
591
672
  portraitVideoFile: portraitVideoFile,
673
+ landscapeMotifArea: configuration.motifArea,
674
+ portraitMotifArea: configuration.portraitMotifArea,
592
675
  landscapePosterImageFile: posterImageFile,
593
676
  portraitPosterImageFile: portraitPosterImageFile,
594
677
  contentElementId: contentElementId,
678
+ sectionProps: sectionProps,
595
679
  configuration: configuration
596
680
  });
597
681
  } else {
598
682
  return /*#__PURE__*/React.createElement(OrientationUnawareInlineVideo, {
599
683
  videoFile: videoFile,
684
+ motifArea: configuration.motifArea,
600
685
  posterImageFile: posterImageFile,
601
686
  contentElementId: contentElementId,
687
+ sectionProps: sectionProps,
602
688
  configuration: configuration
603
689
  });
604
690
  }
605
691
  }
606
-
607
692
  function OrientationAwareInlineVideo(_ref2) {
608
693
  var landscapeVideoFile = _ref2.landscapeVideoFile,
609
- portraitVideoFile = _ref2.portraitVideoFile,
610
- landscapePosterImageFile = _ref2.landscapePosterImageFile,
611
- portraitPosterImageFile = _ref2.portraitPosterImageFile,
612
- contentElementId = _ref2.contentElementId,
613
- configuration = _ref2.configuration;
694
+ portraitVideoFile = _ref2.portraitVideoFile,
695
+ landscapePosterImageFile = _ref2.landscapePosterImageFile,
696
+ portraitPosterImageFile = _ref2.portraitPosterImageFile,
697
+ landscapeMotifArea = _ref2.landscapeMotifArea,
698
+ portraitMotifArea = _ref2.portraitMotifArea,
699
+ contentElementId = _ref2.contentElementId,
700
+ configuration = _ref2.configuration,
701
+ sectionProps = _ref2.sectionProps;
614
702
  var portraitOrientation = usePortraitOrientation();
615
703
  var videoFile = portraitOrientation && portraitVideoFile ? portraitVideoFile : landscapeVideoFile;
704
+ var motifArea = portraitOrientation && portraitVideoFile ? portraitMotifArea : landscapeMotifArea;
616
705
  var posterImageFile = portraitOrientation && portraitPosterImageFile ? portraitPosterImageFile : landscapePosterImageFile;
617
706
  return /*#__PURE__*/React.createElement(OrientationUnawareInlineVideo, {
618
707
  key: portraitOrientation,
619
708
  videoFile: videoFile,
709
+ motifArea: motifArea,
620
710
  posterImageFile: posterImageFile,
621
711
  contentElementId: contentElementId,
712
+ sectionProps: sectionProps,
622
713
  configuration: configuration
623
714
  });
624
715
  }
625
-
626
716
  function OrientationUnawareInlineVideo(_ref3) {
627
717
  var videoFile = _ref3.videoFile,
628
- posterImageFile = _ref3.posterImageFile,
629
- contentElementId = _ref3.contentElementId,
630
- configuration = _ref3.configuration;
631
-
718
+ posterImageFile = _ref3.posterImageFile,
719
+ contentElementId = _ref3.contentElementId,
720
+ configuration = _ref3.configuration,
721
+ sectionProps = _ref3.sectionProps,
722
+ motifArea = _ref3.motifArea;
632
723
  var _usePlayerState = usePlayerState(),
633
- _usePlayerState2 = _slicedToArray(_usePlayerState, 2),
634
- playerState = _usePlayerState2[0],
635
- playerActions = _usePlayerState2[1];
636
-
724
+ _usePlayerState2 = _slicedToArray(_usePlayerState, 2),
725
+ playerState = _usePlayerState2[0],
726
+ playerActions = _usePlayerState2[1];
637
727
  var inlineFileRightsItems = [{
638
728
  label: 'video',
639
729
  file: videoFile
@@ -641,12 +731,14 @@ function OrientationUnawareInlineVideo(_ref3) {
641
731
  label: 'poster',
642
732
  file: posterImageFile
643
733
  }];
734
+ var Player = (sectionProps === null || sectionProps === void 0 ? void 0 : sectionProps.containerDimension) && motifArea ? CropPositionComputingPlayer : PlayerWithControlBar;
644
735
  return /*#__PURE__*/React.createElement(MediaInteractionTracking, {
645
736
  playerState: playerState,
646
737
  playerActions: playerActions
647
738
  }, /*#__PURE__*/React.createElement(FitViewport, {
648
739
  file: videoFile,
649
740
  aspectRatio: videoFile ? undefined : fallbackAspectRatio,
741
+ fill: configuration.position === 'backdrop',
650
742
  opaque: !videoFile
651
743
  }, /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(ContentElementFigure, {
652
744
  configuration: configuration
@@ -654,7 +746,9 @@ function OrientationUnawareInlineVideo(_ref3) {
654
746
  visible: media.muted && playerState.shouldPlay && !configuration.keepMuted
655
747
  }), /*#__PURE__*/React.createElement(Player, {
656
748
  key: configuration.playbackMode === 'loop',
749
+ sectionProps: sectionProps,
657
750
  videoFile: videoFile,
751
+ motifArea: motifArea,
658
752
  posterImageFile: posterImageFile,
659
753
  inlineFileRightsItems: inlineFileRightsItems,
660
754
  playerState: playerState,
@@ -662,28 +756,39 @@ function OrientationUnawareInlineVideo(_ref3) {
662
756
  contentElementId: contentElementId,
663
757
  configuration: configuration
664
758
  })))), /*#__PURE__*/React.createElement(InlineFileRights, {
759
+ configuration: configuration,
665
760
  context: "afterElement",
666
761
  items: inlineFileRightsItems
667
762
  })));
668
763
  }
669
-
670
- function Player(_ref4) {
764
+ function CropPositionComputingPlayer(_ref4) {
671
765
  var videoFile = _ref4.videoFile,
672
- posterImageFile = _ref4.posterImageFile,
673
- inlineFileRightsItems = _ref4.inlineFileRightsItems,
674
- playerState = _ref4.playerState,
675
- playerActions = _ref4.playerActions,
676
- contentElementId = _ref4.contentElementId,
677
- configuration = _ref4.configuration;
678
-
766
+ motifArea = _ref4.motifArea,
767
+ props = _objectWithoutProperties(_ref4, _excluded);
768
+ var videoFileWithMotifArea = useBackgroundFile({
769
+ file: videoFile,
770
+ motifArea: motifArea,
771
+ containerDimension: props.sectionProps.containerDimension
772
+ });
773
+ return /*#__PURE__*/React.createElement(PlayerWithControlBar, Object.assign({}, props, {
774
+ videoFile: videoFileWithMotifArea
775
+ }));
776
+ }
777
+ function PlayerWithControlBar(_ref5) {
778
+ var videoFile = _ref5.videoFile,
779
+ posterImageFile = _ref5.posterImageFile,
780
+ inlineFileRightsItems = _ref5.inlineFileRightsItems,
781
+ playerState = _ref5.playerState,
782
+ playerActions = _ref5.playerActions,
783
+ contentElementId = _ref5.contentElementId,
784
+ configuration = _ref5.configuration,
785
+ sectionProps = _ref5.sectionProps;
679
786
  var _useContentElementEdi = useContentElementEditorState(),
680
- isEditable = _useContentElementEdi.isEditable,
681
- isSelected = _useContentElementEdi.isSelected;
682
-
787
+ isEditable = _useContentElementEdi.isEditable,
788
+ isSelected = _useContentElementEdi.isSelected;
683
789
  var _useContentElementLif = useContentElementLifecycle(getLifecycleHandlers(configuration, playerActions)),
684
- shouldLoad = _useContentElementLif.shouldLoad,
685
- shouldPrepare = _useContentElementLif.shouldPrepare;
686
-
790
+ shouldLoad = _useContentElementLif.shouldLoad,
791
+ shouldPrepare = _useContentElementLif.shouldPrepare;
687
792
  useAudioFocus({
688
793
  key: contentElementId,
689
794
  request: playerState.shouldPlay,
@@ -706,7 +811,6 @@ function Player(_ref4) {
706
811
  if (configuration.playbackMode !== 'loop') {
707
812
  return;
708
813
  }
709
-
710
814
  var documentState = documentHiddenState(function (visibilityState) {
711
815
  if (visibilityState === 'hidden') {
712
816
  playerActions.fadeOutAndPause(400);
@@ -720,6 +824,8 @@ function Player(_ref4) {
720
824
  }, [playerActions, configuration.playbackMode]);
721
825
  return /*#__PURE__*/React.createElement(VideoPlayerControls, {
722
826
  videoFile: videoFile,
827
+ fadedOut: sectionProps.isIntersecting,
828
+ sticky: configuration.position === 'backdrop',
723
829
  defaultTextTrackFilePermaId: configuration.defaultTextTrackFileId,
724
830
  playerState: playerState,
725
831
  playerActions: playerActions,
@@ -734,6 +840,7 @@ function Player(_ref4) {
734
840
  }, /*#__PURE__*/React.createElement(VideoPlayer, {
735
841
  load: shouldPrepare ? 'auto' : shouldLoad ? 'poster' : 'none',
736
842
  loop: configuration.playbackMode === 'loop',
843
+ fit: configuration.position === 'backdrop' ? 'cover' : 'contain',
737
844
  playerState: playerState,
738
845
  playerActions: playerActions,
739
846
  videoFile: videoFile,
@@ -744,7 +851,6 @@ function Player(_ref4) {
744
851
  atmoDuringPlayback: configuration.atmoDuringPlayback
745
852
  })));
746
853
  }
747
-
748
854
  var fallbackAspectRatio = 0.5625;
749
855
 
750
856
  frontend.contentElementTypes.register('inlineVideo', {
@@ -754,7 +860,7 @@ frontend.contentElementTypes.register('inlineVideo', {
754
860
 
755
861
  function InlineAudio(_ref) {
756
862
  var contentElementId = _ref.contentElementId,
757
- configuration = _ref.configuration;
863
+ configuration = _ref.configuration;
758
864
  var audioFile = useFileWithInlineRights({
759
865
  configuration: configuration,
760
866
  collectionName: 'audioFiles',
@@ -765,29 +871,25 @@ function InlineAudio(_ref) {
765
871
  collectionName: 'imageFiles',
766
872
  propertyName: 'posterId'
767
873
  });
768
-
769
874
  var _usePlayerState = usePlayerState(),
770
- _usePlayerState2 = _slicedToArray(_usePlayerState, 2),
771
- playerState = _usePlayerState2[0],
772
- playerActions = _usePlayerState2[1];
773
-
875
+ _usePlayerState2 = _slicedToArray(_usePlayerState, 2),
876
+ playerState = _usePlayerState2[0],
877
+ playerActions = _usePlayerState2[1];
774
878
  var _useContentElementEdi = useContentElementEditorState(),
775
- isEditable = _useContentElementEdi.isEditable,
776
- isSelected = _useContentElementEdi.isSelected;
777
-
879
+ isEditable = _useContentElementEdi.isEditable,
880
+ isSelected = _useContentElementEdi.isSelected;
778
881
  var _useContentElementLif = useContentElementLifecycle({
779
- onActivate: function onActivate() {
780
- if (configuration.autoplay && !media.muted) {
781
- playerActions.play();
882
+ onActivate: function onActivate() {
883
+ if (configuration.autoplay && !media.muted) {
884
+ playerActions.play();
885
+ }
886
+ },
887
+ onDeactivate: function onDeactivate() {
888
+ playerActions.fadeOutAndPause(400);
782
889
  }
783
- },
784
- onDeactivate: function onDeactivate() {
785
- playerActions.fadeOutAndPause(400);
786
- }
787
- }),
788
- shouldLoad = _useContentElementLif.shouldLoad,
789
- shouldPrepare = _useContentElementLif.shouldPrepare;
790
-
890
+ }),
891
+ shouldLoad = _useContentElementLif.shouldLoad,
892
+ shouldPrepare = _useContentElementLif.shouldPrepare;
791
893
  useAudioFocus({
792
894
  key: contentElementId,
793
895
  request: playerState.shouldPlay,
@@ -795,19 +897,16 @@ function InlineAudio(_ref) {
795
897
  playerActions.fadeOutAndPause(400);
796
898
  }
797
899
  });
798
-
799
900
  var onPlayerClick = function onPlayerClick() {
800
901
  if (isEditable && !isSelected) {
801
902
  return;
802
903
  }
803
-
804
904
  if (playerState.shouldPlay) {
805
905
  playerActions.pause();
806
906
  } else {
807
907
  playerActions.playBlessed();
808
908
  }
809
909
  };
810
-
811
910
  var inlineFileRightsItems = [{
812
911
  label: 'audio',
813
912
  file: audioFile
@@ -843,6 +942,7 @@ function InlineAudio(_ref) {
843
942
  playsInline: true,
844
943
  atmoDuringPlayback: configuration.atmoDuringPlayback
845
944
  })))))), /*#__PURE__*/React.createElement(InlineFileRights, {
945
+ configuration: configuration,
846
946
  context: "afterElement",
847
947
  items: inlineFileRightsItems
848
948
  }));
@@ -855,62 +955,25 @@ frontend.contentElementTypes.register('inlineAudio', {
855
955
 
856
956
  var styles$3 = {"soundDisclaimer":"SoundDisclaimer-module_soundDisclaimer__31hWh","unmute":"SoundDisclaimer-module_unmute__1V4Ab","unmuted":"SoundDisclaimer-module_unmuted__22CJ5","active":"SoundDisclaimer-module_active__11_kc"};
857
957
 
858
- function _objectWithoutPropertiesLoose(source, excluded) {
859
- if (source == null) return {};
860
- var target = {};
861
- var sourceKeys = Object.keys(source);
862
- var key, i;
863
-
864
- for (i = 0; i < sourceKeys.length; i++) {
865
- key = sourceKeys[i];
866
- if (excluded.indexOf(key) >= 0) continue;
867
- target[key] = source[key];
868
- }
869
-
870
- return target;
871
- }
872
-
873
- function _objectWithoutProperties(source, excluded) {
874
- if (source == null) return {};
875
- var target = _objectWithoutPropertiesLoose(source, excluded);
876
- var key, i;
877
-
878
- if (Object.getOwnPropertySymbols) {
879
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
880
-
881
- for (i = 0; i < sourceSymbolKeys.length; i++) {
882
- key = sourceSymbolKeys[i];
883
- if (excluded.indexOf(key) >= 0) continue;
884
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
885
- target[key] = source[key];
886
- }
887
- }
888
-
889
- return target;
890
- }
891
-
958
+ var _excluded$1 = ["styles"];
892
959
  function _extends() {
893
- _extends = Object.assign || function (target) {
960
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
894
961
  for (var i = 1; i < arguments.length; i++) {
895
962
  var source = arguments[i];
896
-
897
963
  for (var key in source) {
898
964
  if (Object.prototype.hasOwnProperty.call(source, key)) {
899
965
  target[key] = source[key];
900
966
  }
901
967
  }
902
968
  }
903
-
904
969
  return target;
905
970
  };
906
-
907
971
  return _extends.apply(this, arguments);
908
972
  }
909
973
  var MutedIcon = (function (_ref) {
910
974
  var _ref$styles = _ref.styles,
911
- styles = _ref$styles === void 0 ? {} : _ref$styles,
912
- props = _objectWithoutProperties(_ref, ["styles"]);
913
-
975
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
976
+ props = _objectWithoutProperties(_ref, _excluded$1);
914
977
  return /*#__PURE__*/React.createElement("svg", _extends({
915
978
  "aria-hidden": "true",
916
979
  "data-prefix": "fas",
@@ -923,28 +986,25 @@ var MutedIcon = (function (_ref) {
923
986
  }));
924
987
  });
925
988
 
989
+ var _excluded$2 = ["styles"];
926
990
  function _extends$1() {
927
- _extends$1 = Object.assign || function (target) {
991
+ _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
928
992
  for (var i = 1; i < arguments.length; i++) {
929
993
  var source = arguments[i];
930
-
931
994
  for (var key in source) {
932
995
  if (Object.prototype.hasOwnProperty.call(source, key)) {
933
996
  target[key] = source[key];
934
997
  }
935
998
  }
936
999
  }
937
-
938
1000
  return target;
939
1001
  };
940
-
941
1002
  return _extends$1.apply(this, arguments);
942
1003
  }
943
1004
  var UnmutedIcon = (function (_ref) {
944
1005
  var _ref$styles = _ref.styles,
945
- styles = _ref$styles === void 0 ? {} : _ref$styles,
946
- props = _objectWithoutProperties(_ref, ["styles"]);
947
-
1006
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
1007
+ props = _objectWithoutProperties(_ref, _excluded$2);
948
1008
  return /*#__PURE__*/React.createElement("svg", _extends$1({
949
1009
  "aria-hidden": "true",
950
1010
  "data-prefix": "fas",
@@ -957,14 +1017,13 @@ var UnmutedIcon = (function (_ref) {
957
1017
  }));
958
1018
  });
959
1019
 
960
- function SoundDisclaimer() {
1020
+ function SoundDisclaimer(_ref) {
1021
+ var configuration = _ref.configuration;
961
1022
  var _useContentElementEdi = useContentElementEditorState(),
962
- isEditable = _useContentElementEdi.isEditable,
963
- isSelected = _useContentElementEdi.isSelected;
964
-
1023
+ isEditable = _useContentElementEdi.isEditable,
1024
+ isSelected = _useContentElementEdi.isSelected;
965
1025
  var _useI18n = useI18n(),
966
- t = _useI18n.t;
967
-
1026
+ t = _useI18n.t;
968
1027
  var muted = useMediaMuted();
969
1028
  return /*#__PURE__*/React.createElement("div", {
970
1029
  className: classNames(styles$3.soundDisclaimer),
@@ -976,33 +1035,23 @@ function SoundDisclaimer() {
976
1035
  onClick: function onClick() {
977
1036
  return media.mute(false);
978
1037
  }
979
- }, /*#__PURE__*/React.createElement(MutedIcon, null), /*#__PURE__*/React.createElement("p", {
980
- dangerouslySetInnerHTML: {
981
- __html: t('pageflow_scrolled.public.sound_disclaimer.help_muted')
982
- }
983
- })), /*#__PURE__*/React.createElement("div", {
1038
+ }, /*#__PURE__*/React.createElement(MutedIcon, null), /*#__PURE__*/React.createElement("p", null, configuration.mutedText || t('pageflow_scrolled.public.sound_disclaimer.help_muted'))), /*#__PURE__*/React.createElement("div", {
984
1039
  className: classNames(styles$3.unmuted, _defineProperty({}, styles$3.active, !muted))
985
- }, /*#__PURE__*/React.createElement(UnmutedIcon, null), /*#__PURE__*/React.createElement("p", {
986
- dangerouslySetInnerHTML: {
987
- __html: t('pageflow_scrolled.public.sound_disclaimer.help_unmuted')
988
- }
989
- })));
1040
+ }, /*#__PURE__*/React.createElement(UnmutedIcon, null), /*#__PURE__*/React.createElement("p", null, configuration.unmutedText || t('pageflow_scrolled.public.sound_disclaimer.help_unmuted'))));
990
1041
  }
991
1042
 
992
1043
  frontend.contentElementTypes.register('soundDisclaimer', {
993
1044
  component: SoundDisclaimer
994
1045
  });
995
1046
 
996
- var styles$4 = {"contentLinkColor":"var(--content-link-color)","breakpoint-sm":"(min-width: 640px)","text":"TextBlock-module_text__21Hk4","quoteDesign-hanging":"TextBlock-module_quoteDesign-hanging__1c9AW","quoteDesign-largeHanging":"TextBlock-module_quoteDesign-largeHanging__2VkIW","layout-centerRagged":"TextBlock-module_layout-centerRagged__1tjoI"};
1047
+ var styles$4 = {"breakpoint-sm":"(min-width: 640px)","text":"TextBlock-module_text__21Hk4","quoteDesign-hanging":"TextBlock-module_quoteDesign-hanging__1c9AW","quoteDesign-largeHanging":"TextBlock-module_quoteDesign-largeHanging__2VkIW","layout-centerRagged":"TextBlock-module_layout-centerRagged__1tjoI"};
997
1048
 
998
1049
  function TextBlock(props) {
999
1050
  var updateConfiguration = useContentElementConfigurationUpdate();
1000
-
1001
1051
  var _useI18n = useI18n({
1002
- locale: 'ui'
1003
- }),
1004
- t = _useI18n.t;
1005
-
1052
+ locale: 'ui'
1053
+ }),
1054
+ t = _useI18n.t;
1006
1055
  var theme = useTheme();
1007
1056
  var className = classNames(styles$4.text, styles$4["quoteDesign-".concat(theme.options.quoteDesign || 'largeHanging')], styles$4["layout-".concat(props.sectionProps.layout)]);
1008
1057
  return /*#__PURE__*/React.createElement(EditableText, {
@@ -1036,7 +1085,6 @@ function getProviderName(url) {
1036
1085
  } else if (facebookMatcher.test(url)) {
1037
1086
  return 'facebook';
1038
1087
  }
1039
-
1040
1088
  return null;
1041
1089
  }
1042
1090
 
@@ -1050,20 +1098,16 @@ var aspectRatios = {
1050
1098
  };
1051
1099
  function VideoEmbed(_ref) {
1052
1100
  var contentElementId = _ref.contentElementId,
1053
- configuration = _ref.configuration;
1054
-
1101
+ configuration = _ref.configuration;
1055
1102
  var _useContentElementEdi = useContentElementEditorState(),
1056
- isEditable = _useContentElementEdi.isEditable,
1057
- isSelected = _useContentElementEdi.isSelected;
1058
-
1103
+ isEditable = _useContentElementEdi.isEditable,
1104
+ isSelected = _useContentElementEdi.isSelected;
1059
1105
  var _useContentElementLif = useContentElementLifecycle(),
1060
- shouldLoad = _useContentElementLif.shouldLoad;
1061
-
1106
+ shouldLoad = _useContentElementLif.shouldLoad;
1062
1107
  var _useState = useState('unplayed'),
1063
- _useState2 = _slicedToArray(_useState, 2),
1064
- playerState = _useState2[0],
1065
- setPlayerState = _useState2[1];
1066
-
1108
+ _useState2 = _slicedToArray(_useState, 2),
1109
+ playerState = _useState2[0],
1110
+ setPlayerState = _useState2[1];
1067
1111
  var providerName = getProviderName(configuration.videoSource);
1068
1112
  return /*#__PURE__*/React.createElement("div", {
1069
1113
  style: {
@@ -1084,13 +1128,12 @@ function VideoEmbed(_ref) {
1084
1128
  hide: playerState === 'playing'
1085
1129
  })))));
1086
1130
  }
1087
-
1088
1131
  function PreparedPlayer(_ref2) {
1089
1132
  var contentElementId = _ref2.contentElementId,
1090
- configuration = _ref2.configuration,
1091
- playerState = _ref2.playerState,
1092
- setPlayerState = _ref2.setPlayerState,
1093
- providerName = _ref2.providerName;
1133
+ configuration = _ref2.configuration,
1134
+ playerState = _ref2.playerState,
1135
+ setPlayerState = _ref2.setPlayerState,
1136
+ providerName = _ref2.providerName;
1094
1137
  useAudioFocus({
1095
1138
  key: contentElementId,
1096
1139
  request: playerState === 'playing',
@@ -1107,26 +1150,23 @@ function PreparedPlayer(_ref2) {
1107
1150
  collectionName: 'imageFiles',
1108
1151
  permaId: configuration.posterId
1109
1152
  });
1110
- var posterUrl = (posterImageFile === null || posterImageFile === void 0 ? void 0 : posterImageFile.isReady) && posterImageFile.urls.large; // React player does not re-create player when controls or config
1153
+ var posterUrl = (posterImageFile === null || posterImageFile === void 0 ? void 0 : posterImageFile.isReady) && posterImageFile.urls.large;
1154
+
1155
+ // React player does not re-create player when controls or config
1111
1156
  // prop changes. Ensure key changes to force React to re-mount
1112
1157
  // component.
1113
-
1114
1158
  function keyFromConfiguration(config) {
1115
1159
  return [config.hideControls, config.hideInfo].join('');
1116
1160
  }
1117
-
1118
1161
  var atmoHooks = useAtmoHooks(configuration.atmoDuringPlayback);
1119
-
1120
1162
  function onPlay() {
1121
1163
  setPlayerState('playing');
1122
1164
  atmoHooks.before();
1123
1165
  }
1124
-
1125
1166
  function onPauseOrEnd() {
1126
1167
  setPlayerState('paused');
1127
1168
  atmoHooks.after();
1128
1169
  }
1129
-
1130
1170
  return /*#__PURE__*/React.createElement(ThirdPartyOptIn, {
1131
1171
  providerName: providerName
1132
1172
  }, function (_ref3) {
@@ -1164,17 +1204,15 @@ function PreparedPlayer(_ref2) {
1164
1204
  });
1165
1205
  });
1166
1206
  }
1167
-
1168
1207
  function useAtmoHooks(atmoDuringPlayback) {
1169
1208
  var atmo = useAtmo();
1170
1209
  return useMemo(function () {
1171
1210
  var _ref4 = atmo.createMediaPlayerHooks(atmoDuringPlayback) || {
1172
- before: function before() {},
1173
- after: function after() {}
1174
- },
1175
- _before = _ref4.before,
1176
- _after = _ref4.after;
1177
-
1211
+ before: function before() {},
1212
+ after: function after() {}
1213
+ },
1214
+ _before = _ref4.before,
1215
+ _after = _ref4.after;
1178
1216
  var timeout;
1179
1217
  return {
1180
1218
  before: function before() {
@@ -1190,7 +1228,6 @@ function useAtmoHooks(atmoDuringPlayback) {
1190
1228
  // fired. Prevent briefly fading the atmo back in.
1191
1229
  timeout = setTimeout(function () {
1192
1230
  _after();
1193
-
1194
1231
  timeout = null;
1195
1232
  }, 1000);
1196
1233
  }
@@ -1203,9 +1240,8 @@ frontend.contentElementTypes.register('videoEmbed', {
1203
1240
  lifecycle: true,
1204
1241
  consentVendors: function consentVendors(_ref) {
1205
1242
  var configuration = _ref.configuration,
1206
- t = _ref.t;
1243
+ t = _ref.t;
1207
1244
  var provider = getProviderName(configuration.videoSource);
1208
-
1209
1245
  if (provider) {
1210
1246
  var prefix = 'pageflow_scrolled.public.video_embed.consent';
1211
1247
  return [{
@@ -1215,136 +1251,421 @@ frontend.contentElementTypes.register('videoEmbed', {
1215
1251
  paradigm: 'lazy opt-in'
1216
1252
  }];
1217
1253
  }
1218
-
1219
1254
  return [];
1220
1255
  }
1221
1256
  });
1222
1257
 
1223
- var styles$6 = {"darkContentSurfaceColor":"var(--theme-dark-content-surface-color, #101010)","lightContentSurfaceColor":"var(--theme-light-content-surface-color, #fff)","darkContentTextColor":"var(--theme-dark-content-text-color, #222)","lightContentTextColor":"var(--theme-light-content-text-color, #fff)","breakpoint-sm":"(min-width: 640px)","hidden":"ExternalLink-module_hidden__3jer0","link_item":"ExternalLink-module_link_item__Blypv","layout_center":"ExternalLink-module_layout_center__3NRpQ","link_title":"ExternalLink-module_link_title__FZJ-0","link_thumbnail":"ExternalLink-module_link_thumbnail__2_BHq","link_details":"ExternalLink-module_link_details__lRhKU","invert":"ExternalLink-module_invert__1zrgN","tooltip":"ExternalLink-module_tooltip__18MpC"};
1224
-
1225
- function ExternalLink(props) {
1226
- var _classNames2;
1227
-
1228
- var _useState = useState(true),
1229
- _useState2 = _slicedToArray(_useState, 2),
1230
- hideTooltip = _useState2[0],
1231
- setHideTooltip = _useState2[1];
1258
+ var styles$6 = {"darkContentSurfaceColor":"var(--theme-dark-content-surface-color, #101010)","lightContentSurfaceColor":"var(--theme-light-content-surface-color, #fff)","darkContentTextColor":"var(--theme-dark-content-text-color, #222)","lightContentTextColor":"var(--theme-light-content-text-color, #fff)","breakpoint-sm":"(min-width: 640px)","item":"ExternalLink-module_item__pIdgb","outlined":"ExternalLink-module_outlined__2fwWe","highlighted":"ExternalLink-module_highlighted__3AbWZ","selected":"ExternalLink-module_selected__1GFC_","textPosition-below":"ExternalLink-module_textPosition-below__nxm4V","cardWrapper":"ExternalLink-module_cardWrapper__4IWTr","textPosition-right":"ExternalLink-module_textPosition-right__3IHdZ","card":"ExternalLink-module_card__ww6Pq","textPosition-overlay":"ExternalLink-module_textPosition-overlay__1Y3PX","textPosition-none":"ExternalLink-module_textPosition-none__3pjcu ExternalLink-module_textPosition-below__nxm4V","textPosition-title":"ExternalLink-module_textPosition-title__2pZoW ExternalLink-module_textPosition-none__3pjcu ExternalLink-module_textPosition-below__nxm4V","link":"ExternalLink-module_link__dvyzo","title":"ExternalLink-module_title__3sVh4","thumbnail":"ExternalLink-module_thumbnail__24QzG","thumbnailSize-medium":"ExternalLink-module_thumbnailSize-medium__R0eu7","thumbnailSize-large":"ExternalLink-module_thumbnailSize-large__2siDe","light":"ExternalLink-module_light__3vIh1 scope-darkContent","dark":"ExternalLink-module_dark__1bh5x scope-lightContent","background":"ExternalLink-module_background__3GS-M","details":"ExternalLink-module_details__ewX5o","button":"ExternalLink-module_button__2lYHG","align-center":"ExternalLink-module_align-center__2c7VT","align-right":"ExternalLink-module_align-right__2qpdE","inlineFileRightsAfterCard":"ExternalLink-module_inlineFileRightsAfterCard__2TLR0"};
1232
1259
 
1233
- var layout = props.sectionProps.layout;
1234
-
1235
- var _useI18n = useI18n({
1236
- locale: 'ui'
1237
- }),
1238
- t = _useI18n.t;
1239
-
1240
- var _useContentElementEdi = useContentElementEditorState(),
1241
- isEditable = _useContentElementEdi.isEditable,
1242
- isSelected = _useContentElementEdi.isSelected;
1260
+ var styles$7 = {"thumbnail":"Thumbnail-module_thumbnail__3t8ND","cover":"Thumbnail-module_cover__3OoBo"};
1243
1261
 
1244
- var thumbnailImageFile = useFile({
1245
- collectionName: 'imageFiles',
1246
- permaId: props.thumbnail
1262
+ function Thumbnail(_ref) {
1263
+ var imageFile = _ref.imageFile,
1264
+ aspectRatio = _ref.aspectRatio,
1265
+ cropPosition = _ref.cropPosition,
1266
+ fit = _ref.fit,
1267
+ load = _ref.load,
1268
+ children = _ref.children;
1269
+ imageFile = _objectSpread2(_objectSpread2({}, imageFile), {}, {
1270
+ cropPosition: cropPosition
1247
1271
  });
1248
- var url = ensureAbsolute(props.url);
1249
-
1250
- var onClick = function onClick(event) {
1251
- if (isEditable) {
1252
- if (!props.open_in_new_tab || !isSelected) {
1253
- event.preventDefault();
1254
- }
1255
-
1256
- if (!props.open_in_new_tab && isSelected) {
1257
- setHideTooltip(false);
1258
- }
1259
- }
1260
- };
1261
-
1262
- var onMouseLeave = function onMouseLeave() {
1263
- setHideTooltip(true);
1264
- };
1265
-
1266
- function renderNewTabTooltip() {
1267
- if (isEditable) {
1268
- var onTooltipClick = function onTooltipClick() {
1269
- window.open(url, '_blank');
1270
- setHideTooltip(true);
1271
- };
1272
-
1273
- return /*#__PURE__*/React.createElement("div", {
1274
- className: classNames(_defineProperty({}, styles$6.hidden, hideTooltip), styles$6.tooltip),
1275
- onClick: onTooltipClick
1276
- }, t('pageflow_scrolled.inline_editing.external_links.open_in_new_tab_message'), /*#__PURE__*/React.createElement("span", null, t('pageflow_scrolled.inline_editing.external_links.open_in_new_tab')));
1272
+ var aspectRatioPadding = getAspectRatioPadding(aspectRatio, imageFile);
1273
+ return /*#__PURE__*/React.createElement("div", {
1274
+ className: classNames(styles$7.thumbnail, _defineProperty({}, styles$7.cover, fit === 'cover')),
1275
+ style: {
1276
+ paddingTop: aspectRatioPadding
1277
1277
  }
1278
+ }, /*#__PURE__*/React.createElement(Image, {
1279
+ imageFile: imageFile,
1280
+ load: load,
1281
+ preferSvg: true,
1282
+ variant: aspectRatio && aspectRatio !== 'wide' || cropPosition || fit === 'contain' ? 'medium' : 'linkThumbnailLarge',
1283
+ fit: fit
1284
+ }), children);
1285
+ }
1286
+ function getAspectRatioPadding(aspectRatio, imageFile) {
1287
+ if (aspectRatio === 'original' && imageFile) {
1288
+ return "".concat(imageFile.height / imageFile.width * 100, "%");
1278
1289
  }
1290
+ }
1279
1291
 
1280
- return /*#__PURE__*/React.createElement("a", {
1281
- className: classNames(styles$6.link_item, (_classNames2 = {}, _defineProperty(_classNames2, styles$6.invert, props.invert), _defineProperty(_classNames2, styles$6.layout_center, layout === 'center' || layout === 'centerRagged'), _classNames2)),
1282
- href: url || 'about:blank',
1283
- onClick: onClick,
1284
- onMouseLeave: onMouseLeave,
1285
- target: props.open_in_new_tab ? '_blank' : '_self',
1286
- rel: props.open_in_new_tab ? 'noopen noreferrer' : undefined
1287
- }, /*#__PURE__*/React.createElement("div", {
1288
- className: styles$6.link_thumbnail
1289
- }, /*#__PURE__*/React.createElement(Image, {
1290
- imageFile: thumbnailImageFile,
1291
- load: props.loadImages,
1292
- variant: "linkThumbnailLarge"
1293
- })), /*#__PURE__*/React.createElement("div", {
1294
- className: styles$6.link_details
1295
- }, /*#__PURE__*/React.createElement("p", {
1296
- className: styles$6.link_title
1297
- }, props.title), /*#__PURE__*/React.createElement("p", {
1298
- className: styles$6.link_desc
1299
- }, props.description)), renderNewTabTooltip());
1300
- }
1301
- ExternalLink.defaultProps = {
1302
- sectionProps: {}
1292
+ var _excluded$3 = ["id", "configuration"],
1293
+ _excluded2 = ["isEnabled", "isEditable"];
1294
+ var scaleCategorySuffixes = {
1295
+ small: 'sm',
1296
+ medium: 'md',
1297
+ large: 'lg'
1303
1298
  };
1304
-
1299
+ function ExternalLink(_ref) {
1300
+ var _itemLinks$id, _itemLinks$id2, _itemTexts$id5, _itemTexts$id6, _itemTexts$id7, _itemTexts$id8;
1301
+ var id = _ref.id,
1302
+ configuration = _ref.configuration,
1303
+ props = _objectWithoutProperties(_ref, _excluded$3);
1304
+ var _useContentElementEdi = useContentElementEditorState(),
1305
+ isEditable = _useContentElementEdi.isEditable,
1306
+ isSelected = _useContentElementEdi.isSelected;
1307
+ var updateConfiguration = useContentElementConfigurationUpdate();
1308
+ var _useI18n = useI18n({
1309
+ locale: 'ui'
1310
+ }),
1311
+ t = _useI18n.t;
1312
+ var itemTexts = configuration.itemTexts || {};
1313
+ var itemLinks = configuration.itemLinks || {};
1314
+ var thumbnailImageFile = useFileWithInlineRights({
1315
+ configuration: props,
1316
+ collectionName: 'imageFiles',
1317
+ propertyName: 'thumbnail'
1318
+ });
1319
+ function handleTextChange(propertyName, value) {
1320
+ updateConfiguration({
1321
+ itemTexts: _objectSpread2(_objectSpread2({}, itemTexts), {}, _defineProperty({}, id, _objectSpread2(_objectSpread2({}, itemTexts[id]), {}, _defineProperty({}, propertyName, value))))
1322
+ });
1323
+ }
1324
+ function handleLinkChange(value) {
1325
+ updateConfiguration({
1326
+ itemLinks: _objectSpread2(_objectSpread2({}, itemLinks), {}, _defineProperty({}, id, value))
1327
+ });
1328
+ }
1329
+ var legacyTexts = useMemo(function () {
1330
+ return {
1331
+ title: [{
1332
+ type: 'heading',
1333
+ children: [{
1334
+ text: props.title || ''
1335
+ }]
1336
+ }],
1337
+ description: [{
1338
+ type: 'paragraph',
1339
+ children: [{
1340
+ text: props.description || ''
1341
+ }]
1342
+ }]
1343
+ };
1344
+ }, [props.title, props.description]);
1345
+ function presentOrEditing(propertyName) {
1346
+ var _itemTexts$id, _itemTexts$id2, _itemTexts$id3, _itemTexts$id4;
1347
+ return !utils.isBlankEditableTextValue(((_itemTexts$id = itemTexts[id]) === null || _itemTexts$id === void 0 ? void 0 : _itemTexts$id[propertyName]) || legacyTexts[propertyName]) || isEditable && props.selected || isEditable && utils.isBlankEditableTextValue((_itemTexts$id2 = itemTexts[id]) === null || _itemTexts$id2 === void 0 ? void 0 : _itemTexts$id2.tagline) && utils.isBlankEditableTextValue(((_itemTexts$id3 = itemTexts[id]) === null || _itemTexts$id3 === void 0 ? void 0 : _itemTexts$id3.title) || legacyTexts.title) && utils.isBlankEditableTextValue(((_itemTexts$id4 = itemTexts[id]) === null || _itemTexts$id4 === void 0 ? void 0 : _itemTexts$id4.description) || legacyTexts.description);
1348
+ }
1349
+ var href = itemLinks[id] ? (_itemLinks$id = itemLinks[id]) === null || _itemLinks$id === void 0 ? void 0 : _itemLinks$id.href : ensureAbsolute(props.url);
1350
+ var openInNewTab = itemLinks[id] ? (_itemLinks$id2 = itemLinks[id]) === null || _itemLinks$id2 === void 0 ? void 0 : _itemLinks$id2.openInNewTab : props.open_in_new_tab;
1351
+ var scaleCategorySuffix = scaleCategorySuffixes[props.textSize || 'small'];
1352
+ var inlineFileRightsAfterCard = props.textPosition === 'right' || props.textPosition === 'overlay' || props.textPosition === 'none';
1353
+ var inlineFileRightsItems = [{
1354
+ file: thumbnailImageFile,
1355
+ label: 'image'
1356
+ }];
1357
+ return /*#__PURE__*/React.createElement("li", {
1358
+ className: classNames(styles$6.item, styles$6["textPosition-".concat(props.textPosition)], _defineProperty({}, styles$6.link, !!href && !configuration.displayButtons), _defineProperty({}, styles$6.outlined, props.outlined), _defineProperty({}, styles$6.highlighted, props.highlighted), _defineProperty({}, styles$6.selected, props.selected)),
1359
+ onClick: props.onClick
1360
+ }, /*#__PURE__*/React.createElement(Link, {
1361
+ isEnabled: !configuration.displayButtons,
1362
+ isEditable: isEditable,
1363
+ actionButtonVisible: props.selected,
1364
+ actionButtonPortal: true,
1365
+ href: href,
1366
+ openInNewTab: openInNewTab,
1367
+ onChange: handleLinkChange
1368
+ }, /*#__PURE__*/React.createElement("div", {
1369
+ className: styles$6.cardWrapper
1370
+ }, /*#__PURE__*/React.createElement("div", {
1371
+ className: classNames(styles$6.card, styles$6["thumbnailSize-".concat(props.thumbnailSize)])
1372
+ }, /*#__PURE__*/React.createElement("div", {
1373
+ className: styles$6.thumbnail,
1374
+ style: {
1375
+ backgroundColor: props.thumbnailBackgroundColor
1376
+ }
1377
+ }, /*#__PURE__*/React.createElement(Thumbnail, {
1378
+ imageFile: thumbnailImageFile,
1379
+ aspectRatio: props.thumbnailAspectRatio,
1380
+ cropPosition: props.thumbnailCropPosition,
1381
+ fit: props.thumbnailFit,
1382
+ load: props.loadImages
1383
+ }, /*#__PURE__*/React.createElement(InlineFileRights, {
1384
+ configuration: configuration,
1385
+ context: "insideElement",
1386
+ position: props.textPosition === 'overlay' ? 'top' : 'bottom',
1387
+ items: inlineFileRightsItems
1388
+ }))), /*#__PURE__*/React.createElement("div", {
1389
+ className: classNames(styles$6.background, styles$6["align-".concat(configuration.textAlign)], props.darkBackground ? styles$6.light : styles$6.dark),
1390
+ style: {
1391
+ pointerEvents: !isEditable || isSelected ? undefined : 'none'
1392
+ }
1393
+ }, !inlineFileRightsAfterCard && /*#__PURE__*/React.createElement(InlineFileRights, {
1394
+ configuration: configuration,
1395
+ context: "afterElement",
1396
+ items: inlineFileRightsItems
1397
+ }), /*#__PURE__*/React.createElement("div", {
1398
+ className: styles$6.details
1399
+ }, presentOrEditing('tagline') && /*#__PURE__*/React.createElement(Text, {
1400
+ scaleCategory: "teaserTagline-".concat(scaleCategorySuffix)
1401
+ }, /*#__PURE__*/React.createElement(EditableInlineText, {
1402
+ value: (_itemTexts$id5 = itemTexts[id]) === null || _itemTexts$id5 === void 0 ? void 0 : _itemTexts$id5.tagline,
1403
+ placeholder: t('pageflow_scrolled.inline_editing.type_tagline'),
1404
+ onChange: function onChange(value) {
1405
+ return handleTextChange('tagline', value);
1406
+ }
1407
+ })), /*#__PURE__*/React.createElement(Text, {
1408
+ scaleCategory: "teaserTitle-".concat(scaleCategorySuffix)
1409
+ }, /*#__PURE__*/React.createElement(EditableInlineText, {
1410
+ value: ((_itemTexts$id6 = itemTexts[id]) === null || _itemTexts$id6 === void 0 ? void 0 : _itemTexts$id6.title) || legacyTexts.title,
1411
+ placeholder: t('pageflow_scrolled.inline_editing.type_heading'),
1412
+ onChange: function onChange(value) {
1413
+ return handleTextChange('title', value);
1414
+ }
1415
+ })), presentOrEditing('description') && /*#__PURE__*/React.createElement(EditableText, {
1416
+ value: ((_itemTexts$id7 = itemTexts[id]) === null || _itemTexts$id7 === void 0 ? void 0 : _itemTexts$id7.description) || legacyTexts.description,
1417
+ scaleCategory: "teaserDescription-".concat(scaleCategorySuffix),
1418
+ placeholder: t('pageflow_scrolled.inline_editing.type_text'),
1419
+ onChange: function onChange(value) {
1420
+ return handleTextChange('description', value);
1421
+ }
1422
+ }), configuration.displayButtons && presentOrEditing('link') && /*#__PURE__*/React.createElement("div", {
1423
+ className: styles$6.button
1424
+ }, /*#__PURE__*/React.createElement(LinkButton, {
1425
+ href: href,
1426
+ openInNewTab: openInNewTab,
1427
+ value: (_itemTexts$id8 = itemTexts[id]) === null || _itemTexts$id8 === void 0 ? void 0 : _itemTexts$id8.link,
1428
+ linkPreviewDisabled: true,
1429
+ actionButtonVisible: false,
1430
+ onTextChange: function onTextChange(value) {
1431
+ return handleTextChange('link', value);
1432
+ },
1433
+ onLinkChange: function onLinkChange(value) {
1434
+ return handleLinkChange(value);
1435
+ }
1436
+ }))))), inlineFileRightsAfterCard && /*#__PURE__*/React.createElement("div", {
1437
+ className: styles$6.inlineFileRightsAfterCard
1438
+ }, /*#__PURE__*/React.createElement(InlineFileRights, {
1439
+ configuration: configuration,
1440
+ context: "afterElement",
1441
+ items: inlineFileRightsItems
1442
+ })))));
1443
+ }
1444
+ function Link(_ref2) {
1445
+ var isEnabled = _ref2.isEnabled,
1446
+ isEditable = _ref2.isEditable,
1447
+ props = _objectWithoutProperties(_ref2, _excluded2);
1448
+ if (isEnabled && props.href || isEditable) {
1449
+ return /*#__PURE__*/React.createElement(EditableLink, Object.assign({}, props, {
1450
+ actionButtonVisible: props.actionButtonVisible,
1451
+ allowRemove: true
1452
+ }));
1453
+ } else {
1454
+ return props.children;
1455
+ }
1456
+ }
1305
1457
  function ensureAbsolute(url) {
1306
- if (url.match(/^(https?:)?\/\//)) {
1458
+ if (!url || url.match(/^(https?:)?\/\//)) {
1307
1459
  return url;
1308
1460
  } else {
1309
1461
  return "http://".concat(url);
1310
1462
  }
1311
1463
  }
1312
1464
 
1313
- var styles$7 = {"contentColorScope":"colors-module_contentColorScope__3zLO1","ext_links_container":"ExternalLinkList-module_ext_links_container__16IIo scope-externalLinks colors-module_contentColorScope__3zLO1"};
1465
+ function Scroller(_ref) {
1466
+ var enabled = _ref.enabled,
1467
+ measureKey = _ref.measureKey,
1468
+ children = _ref.children;
1469
+ var ref = useRef();
1470
+ if (!enabled) {
1471
+ return children({});
1472
+ }
1473
+ return /*#__PURE__*/React.createElement(Measure, {
1474
+ scroll: true,
1475
+ client: true,
1476
+ innerRef: ref
1477
+ }, function (_ref2) {
1478
+ var contentRect = _ref2.contentRect,
1479
+ measureRef = _ref2.measureRef,
1480
+ measure = _ref2.measure;
1481
+ var canScrollLeft = contentRect.scroll.left > 0;
1482
+ var canScrollRight = contentRect.scroll.width > contentRect.client.width && contentRect.scroll.left < contentRect.scroll.width - contentRect.client.width - 5;
1483
+ function scrollBy(x) {
1484
+ var list = ref.current;
1485
+ var listRect = list.getBoundingClientRect();
1486
+ if (x > 0) {
1487
+ for (var i = 0; i < list.children.length; i++) {
1488
+ var child = list.children[i];
1489
+ var rect = child.getBoundingClientRect();
1490
+ if (Math.floor(rect.right - listRect.left) > contentRect.client.width) {
1491
+ ref.current.scrollTo(child.offsetLeft - list.firstChild.offsetLeft, 0);
1492
+ break;
1493
+ }
1494
+ }
1495
+ } else {
1496
+ var lastPartiallyVisibleChildRect;
1497
+ for (var _i = list.children.length - 1; _i >= 0; _i--) {
1498
+ var _child = list.children[_i];
1499
+ var _rect = _child.getBoundingClientRect();
1500
+ if (_rect.left < listRect.left) {
1501
+ lastPartiallyVisibleChildRect = _rect;
1502
+ break;
1503
+ }
1504
+ }
1505
+ if (!lastPartiallyVisibleChildRect) {
1506
+ return;
1507
+ }
1508
+ for (var _i2 = 0; _i2 < list.children.length - 1; _i2++) {
1509
+ var _child2 = list.children[_i2];
1510
+ var _rect2 = _child2.getBoundingClientRect();
1511
+ if (Math.floor(lastPartiallyVisibleChildRect.right - _rect2.left) <= contentRect.client.width) {
1512
+ ref.current.scrollTo(_child2.offsetLeft - list.firstChild.offsetLeft, 0);
1513
+ break;
1514
+ }
1515
+ }
1516
+ }
1517
+ }
1518
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Watch, {
1519
+ value: measureKey,
1520
+ onChange: measure
1521
+ }), /*#__PURE__*/React.createElement(ScrollButton$1, {
1522
+ direction: "left",
1523
+ disabled: !canScrollLeft,
1524
+ onClick: function onClick() {
1525
+ return scrollBy(-1);
1526
+ }
1527
+ }), /*#__PURE__*/React.createElement(ScrollButton$1, {
1528
+ direction: "right",
1529
+ disabled: !canScrollRight,
1530
+ onClick: function onClick() {
1531
+ return scrollBy(1);
1532
+ }
1533
+ }), children({
1534
+ scrollerRef: measureRef,
1535
+ handleScroll: function handleScroll() {
1536
+ return measure();
1537
+ }
1538
+ }));
1539
+ });
1540
+ }
1541
+ function Watch(_ref3) {
1542
+ var value = _ref3.value,
1543
+ onChange = _ref3.onChange;
1544
+ useEffect(function () {
1545
+ return onChange();
1546
+ }, [value, onChange]);
1547
+ return null;
1548
+ }
1549
+
1550
+ var styles$8 = {"contentColorScope":"colors-module_contentColorScope__3zLO1","contentMargin":"ExternalLinkList-module_contentMargin__2NpqM","scrollButtons-below":"ExternalLinkList-module_scrollButtons-below__2yP5A","container":"ExternalLinkList-module_container__3fVf0","fullContainer":"ExternalLinkList-module_fullContainer__3M7uT","list":"ExternalLinkList-module_list__2w4qM scope-externalLinks colors-module_contentColorScope__3zLO1","full":"ExternalLinkList-module_full__2l4qw","textPosition-below":"ExternalLinkList-module_textPosition-below__2zC66","textPosition-overlay":"ExternalLinkList-module_textPosition-overlay__3h5MM","scroller":"ExternalLinkList-module_scroller__30plD","layout-center":"ExternalLinkList-module_layout-center__3qU6q"};
1551
+
1552
+ var textPositionBelowStyles = {"list":"below-module_list__19HmU","scroller":"below-module_scroller__1NsM2","linkAlignment-left":"below-module_linkAlignment-left__3jA80","linkAlignment-right":"below-module_linkAlignment-right__1Z8_U","linkAlignment-center":"below-module_linkAlignment-center__2YvPE","linkWidth-full-xs":"below-module_linkWidth-full-xs__3uist","linkWidth-full-s":"below-module_linkWidth-full-s__1_4ij","linkWidth-full-m":"below-module_linkWidth-full-m__1Oy7S","linkWidth-full-l":"below-module_linkWidth-full-l__3HSsg","linkWidth-full-xl":"below-module_linkWidth-full-xl__2ZPa4","linkWidth-full-xxl":"below-module_linkWidth-full-xxl__Ttr0e","width-lg":"below-module_width-lg__2z5Fx","layout-center":"below-module_layout-center__2Q6iw","linkWidth-l":"below-module_linkWidth-l__1YJZr","width-xl":"below-module_width-xl__Bgvca","linkWidth-xl":"below-module_linkWidth-xl__1sGf5","linkWidth-s":"below-module_linkWidth-s__24kC5","linkWidth-xs":"below-module_linkWidth-xs__2sJdn","linkWidth-m":"below-module_linkWidth-m__3Nxbl"};
1553
+
1554
+ var textPositionRightStyles = {"list":"right-module_list__3z04e","scroller":"right-module_scroller__2FyXd","width-full":"right-module_width-full__22RJL","layout-center":"right-module_layout-center__3I_Ow","layout-right":"right-module_layout-right__1rFiS","linkWidth-full-xs":"right-module_linkWidth-full-xs__1d1Iy","linkWidth-full-s":"right-module_linkWidth-full-s__2-rCJ","linkWidth-full-m":"right-module_linkWidth-full-m__2VY87","linkWidth-full-l":"right-module_linkWidth-full-l__1Bql_","linkWidth-full-xl":"right-module_linkWidth-full-xl__iEoAg","linkWidth-full-xxl":"right-module_linkWidth-full-xxl__1a3HZ","linkWidth-xs":"right-module_linkWidth-xs__3kCk5","linkWidth-s":"right-module_linkWidth-s__1YNwt","linkWidth-l":"right-module_linkWidth-l__1OLzb","width-xl":"right-module_width-xl__2xDcy","layout-left":"right-module_layout-left__1P-tW","linkWidth-m":"right-module_linkWidth-m__18F2B"};
1314
1555
 
1556
+ var linkWidths = function linkWidths(value) {
1557
+ return ['xs', 's', 'm', 'l', 'xl', 'xxl'][value + 2];
1558
+ };
1315
1559
  function ExternalLinkList(props) {
1316
1560
  var linkList = props.configuration.links || [];
1317
-
1318
1561
  var _useContentElementLif = useContentElementLifecycle(),
1319
- shouldLoad = _useContentElementLif.shouldLoad;
1320
-
1562
+ shouldLoad = _useContentElementLif.shouldLoad;
1321
1563
  var darkBackground = useDarkBackground();
1564
+ var theme = useTheme();
1565
+ var _useContentElementEdi = useContentElementEditorState(),
1566
+ setTransientState = _useContentElementEdi.setTransientState,
1567
+ isSelected = _useContentElementEdi.isSelected;
1568
+ var _useState = useState(),
1569
+ _useState2 = _slicedToArray(_useState, 2),
1570
+ selectedItemId = _useState2[0],
1571
+ setSelectedItemId = _useState2[1];
1572
+ var _useState3 = useState(-1),
1573
+ _useState4 = _slicedToArray(_useState3, 2),
1574
+ highlightedIndex = _useState4[0],
1575
+ setHighlightedIndex = _useState4[1];
1576
+ useContentElementEditorCommandSubscription(function (command) {
1577
+ if (command.type === 'HIGHLIGHT_ITEM') {
1578
+ setHighlightedIndex(command.index);
1579
+ } else if (command.type === 'RESET_ITEM_HIGHLIGHT') {
1580
+ setHighlightedIndex(-1);
1581
+ } else if (command.type === 'SET_SELECTED_ITEM') {
1582
+ var _linkList$command$ind;
1583
+ setSelectedItemId((_linkList$command$ind = linkList[command.index]) === null || _linkList$command$ind === void 0 ? void 0 : _linkList$command$ind.id);
1584
+ }
1585
+ });
1586
+ function handleItemClick(event, id) {
1587
+ if (isSelected) {
1588
+ setTransientState({
1589
+ selectedItemId: id
1590
+ });
1591
+ setSelectedItemId(id);
1592
+ event.preventDefault();
1593
+ }
1594
+ }
1595
+ function handleListClick(event) {
1596
+ if (!event.defaultPrevented) {
1597
+ setTransientState({
1598
+ selectedItemId: null
1599
+ });
1600
+ setSelectedItemId(null);
1601
+ }
1602
+ }
1603
+ var layout = props.sectionProps.layout === 'centerRagged' ? 'center' : props.sectionProps.layout;
1604
+ var linkWidth = linkWidths('linkWidth' in props.configuration ? props.configuration.linkWidth : -1);
1605
+ var textPosition = props.configuration.textPosition || 'below';
1606
+ var textPositionStyles = textPosition === 'right' ? textPositionRightStyles : textPositionBelowStyles;
1607
+ var scrollerEnabled = props.configuration.enableScroller === 'always';
1608
+ var fullWidth = props.contentElementWidth === contentElementWidths.full;
1609
+ var linkAlignment = scrollerEnabled ? 'left' : props.configuration.linkAlignment;
1322
1610
  return /*#__PURE__*/React.createElement("div", {
1323
- className: classNames(styles$7.ext_links_container, props.configuration.variant && "scope-externalLinkList-".concat(props.configuration.variant))
1324
- }, linkList.map(function (link, index) {
1325
- return /*#__PURE__*/React.createElement(ExternalLink, Object.assign({}, link, {
1326
- key: link.id,
1327
- invert: !darkBackground,
1328
- sectionProps: props.sectionProps,
1329
- loadImages: shouldLoad
1330
- }));
1611
+ className: classNames(_defineProperty({}, styles$8.contentMargin, props.customMargin || fullWidth), styles$8["scrollButtons-".concat(theme.options.teasersScrollButtons)]),
1612
+ onClick: handleListClick
1613
+ }, /*#__PURE__*/React.createElement(Scroller, {
1614
+ enabled: scrollerEnabled,
1615
+ measureKey: linkList.length
1616
+ }, function (_ref) {
1617
+ var scrollerRef = _ref.scrollerRef,
1618
+ handleScroll = _ref.handleScroll;
1619
+ return /*#__PURE__*/React.createElement("div", {
1620
+ className: classNames(styles$8.container, _defineProperty({}, styles$8.fullContainer, fullWidth))
1621
+ }, /*#__PURE__*/React.createElement(LinkTooltipProvider, {
1622
+ align: "center"
1623
+ }, /*#__PURE__*/React.createElement("ul", {
1624
+ ref: scrollerRef,
1625
+ className: classNames(styles$8.list, styles$8["textPosition-".concat(textPosition)], styles$8["layout-".concat(layout)], _defineProperty({}, styles$8.full, fullWidth), _defineProperty({}, styles$8.scroller, scrollerEnabled), props.configuration.variant && "scope-externalLinkList-".concat(props.configuration.variant), textPositionStyles.list, textPositionStyles["layout-".concat(layout)], textPositionStyles["width-".concat(contentElementWidthName(props.contentElementWidth))], textPositionStyles["linkWidth-".concat(fullWidth ? 'full-' : '').concat(linkWidth)], textPositionStyles["linkAlignment-".concat(linkAlignment)], textPositionStyles["textPosition-".concat(textPosition)], _defineProperty({}, textPositionStyles.scroller, scrollerEnabled)),
1626
+ style: {
1627
+ '--overlay-opacity': (props.configuration.overlayOpacity || 70) / 100,
1628
+ '--thumbnail-aspect-ratio': "var(--theme-aspect-ratio-".concat(props.configuration.thumbnailAspectRatio || 'wide', ")")
1629
+ },
1630
+ onScroll: handleScroll
1631
+ }, linkList.map(function (link, index) {
1632
+ return /*#__PURE__*/React.createElement(ExternalLink, Object.assign({}, link, {
1633
+ key: link.id,
1634
+ configuration: props.configuration,
1635
+ thumbnailAspectRatio: props.configuration.thumbnailAspectRatio,
1636
+ thumbnailSize: props.configuration.thumbnailSize || 'small',
1637
+ thumbnailFit: props.configuration.thumbnailFit || 'cover',
1638
+ textPosition: props.configuration.textPosition || 'below',
1639
+ textSize: props.configuration.textSize || 'small',
1640
+ darkBackground: darkBackground,
1641
+ loadImages: shouldLoad,
1642
+ outlined: isSelected,
1643
+ highlighted: highlightedIndex === index,
1644
+ selected: link.id === selectedItemId && isSelected,
1645
+ onClick: function onClick(event) {
1646
+ return handleItemClick(event, link.id);
1647
+ }
1648
+ }));
1649
+ }))));
1331
1650
  }));
1332
1651
  }
1333
1652
 
1334
1653
  frontend.contentElementTypes.register('externalLinkList', {
1335
1654
  component: ExternalLinkList,
1655
+ customMargin: function customMargin(_ref) {
1656
+ var configuration = _ref.configuration;
1657
+ return configuration.enableScroller === 'always';
1658
+ },
1336
1659
  lifecycle: true
1337
1660
  });
1338
1661
 
1339
1662
  function useIframeHeight(url) {
1340
1663
  var _useState = useState('400px'),
1341
- _useState2 = _slicedToArray(_useState, 2),
1342
- height = _useState2[0],
1343
- setHeight = _useState2[1];
1344
-
1664
+ _useState2 = _slicedToArray(_useState, 2),
1665
+ height = _useState2[0],
1666
+ setHeight = _useState2[1];
1345
1667
  useEffect(function () {
1346
1668
  window.addEventListener('message', receive);
1347
-
1348
1669
  function receive(event) {
1349
1670
  if (typeof event.data['datawrapper-height'] !== 'undefined') {
1350
1671
  for (var chartId in event.data['datawrapper-height']) {
@@ -1354,7 +1675,6 @@ function useIframeHeight(url) {
1354
1675
  }
1355
1676
  }
1356
1677
  }
1357
-
1358
1678
  return function () {
1359
1679
  return window.removeEventListener('message', receive);
1360
1680
  };
@@ -1362,34 +1682,29 @@ function useIframeHeight(url) {
1362
1682
  return height;
1363
1683
  }
1364
1684
 
1365
- var styles$8 = {"container":"DataWrapperChart-module_container__2eZ15"};
1685
+ var styles$9 = {"container":"DataWrapperChart-module_container__2eZ15"};
1366
1686
 
1367
1687
  function DataWrapperChart(_ref) {
1368
1688
  var configuration = _ref.configuration;
1369
-
1370
1689
  var _useI18n = useI18n(),
1371
- t = _useI18n.t;
1372
-
1690
+ t = _useI18n.t;
1373
1691
  var _useContentElementLif = useContentElementLifecycle(),
1374
- shouldLoad = _useContentElementLif.shouldLoad;
1375
-
1692
+ shouldLoad = _useContentElementLif.shouldLoad;
1376
1693
  var _useContentElementEdi = useContentElementEditorState(),
1377
- isEditable = _useContentElementEdi.isEditable,
1378
- isSelected = _useContentElementEdi.isSelected;
1379
-
1380
- var height = useIframeHeight(configuration.url); // remove url protocol, so that it is selected by the browser itself
1694
+ isEditable = _useContentElementEdi.isEditable,
1695
+ isSelected = _useContentElementEdi.isSelected;
1696
+ var height = useIframeHeight(configuration.url);
1381
1697
 
1698
+ // remove url protocol, so that it is selected by the browser itself
1382
1699
  var srcURL = '';
1383
-
1384
1700
  if (configuration.url) {
1385
1701
  srcURL = configuration.url.replace(/http(s|):/, '');
1386
1702
  }
1387
-
1388
1703
  var backgroundColor = configuration.backgroundColor || '#323d4d';
1389
1704
  return /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(ContentElementFigure, {
1390
1705
  configuration: configuration
1391
1706
  }, /*#__PURE__*/React.createElement("div", {
1392
- className: styles$8.container,
1707
+ className: styles$9.container,
1393
1708
  style: {
1394
1709
  pointerEvents: isEditable && !isSelected ? 'none' : undefined,
1395
1710
  backgroundColor: backgroundColor,
@@ -1403,22 +1718,18 @@ function DataWrapperChart(_ref) {
1403
1718
  providerName: "datawrapper"
1404
1719
  }))));
1405
1720
  }
1406
-
1407
1721
  function DatawrapperOptOutInfo(props) {
1408
1722
  if (!features.isEnabled('datawrapper_chart_embed_opt_in')) {
1409
1723
  return null;
1410
1724
  }
1411
-
1412
1725
  return /*#__PURE__*/React.createElement(ThirdPartyOptOutInfo, Object.assign({
1413
1726
  providerName: "datawrapper"
1414
1727
  }, props));
1415
1728
  }
1416
-
1417
1729
  function renderIframe(url, title) {
1418
1730
  if (!url) {
1419
1731
  return null;
1420
1732
  }
1421
-
1422
1733
  return /*#__PURE__*/React.createElement("iframe", {
1423
1734
  src: url,
1424
1735
  title: title,
@@ -1434,7 +1745,7 @@ frontend.contentElementTypes.register('dataWrapperChart', {
1434
1745
  lifecycle: true,
1435
1746
  consentVendors: function consentVendors(_ref) {
1436
1747
  var configuration = _ref.configuration,
1437
- t = _ref.t;
1748
+ t = _ref.t;
1438
1749
  var prefix = 'pageflow_scrolled.public.chart';
1439
1750
  return [{
1440
1751
  name: 'datawrapper',
@@ -1447,7 +1758,7 @@ frontend.contentElementTypes.register('dataWrapperChart', {
1447
1758
 
1448
1759
  function useAutoCruising(_ref) {
1449
1760
  var viewerRef = _ref.viewerRef,
1450
- onCancel = _ref.onCancel;
1761
+ onCancel = _ref.onCancel;
1451
1762
  var autoCruisingRef = useRef(false);
1452
1763
  var rafIdRef = useRef();
1453
1764
  var lastYawRef = useRef(null);
@@ -1457,22 +1768,18 @@ function useAutoCruising(_ref) {
1457
1768
  var pitch = viewer.getPitch();
1458
1769
  var yaw = viewer.getYaw();
1459
1770
  var delta = 0;
1460
-
1461
1771
  if (!autoCruisingRef.current) {
1462
1772
  rafIdRef.current = window.requestAnimationFrame(tick);
1463
1773
  autoCruisingRef.current = true;
1464
1774
  }
1465
-
1466
1775
  function tick() {
1467
1776
  delta = new Date().getTime() - start;
1468
-
1469
1777
  if (autoCruisingRef.current && lastYawRef.current !== null && (Math.abs(pitch - viewer.getPitch()) > 0.1 || Math.abs(lastYawRef.current - viewer.getYaw()) > 0.1)) {
1470
1778
  autoCruisingRef.current = false;
1471
1779
  lastYawRef.current = null;
1472
1780
  onCancel();
1473
1781
  return;
1474
1782
  }
1475
-
1476
1783
  lastYawRef.current = yaw - delta / 1000 % 360;
1477
1784
  viewer.lookAt({
1478
1785
  yaw: lastYawRef.current,
@@ -1492,37 +1799,63 @@ function useAutoCruising(_ref) {
1492
1799
  return [start, stop];
1493
1800
  }
1494
1801
 
1495
- function VrImage(_ref) {
1802
+ var aspectRatios$1 = {
1803
+ wide: 0.5625,
1804
+ narrow: 0.75,
1805
+ square: 1,
1806
+ portrait: 1.7777
1807
+ };
1808
+ function getAspectRatio(_ref) {
1496
1809
  var configuration = _ref.configuration,
1497
- contentElementWidth = _ref.contentElementWidth;
1810
+ contentElementWidth = _ref.contentElementWidth,
1811
+ portraitOrientation = _ref.portraitOrientation;
1812
+ var effectiveAspectRatio = portraitOrientation && configuration.portraitAspectRatio ? configuration.portraitAspectRatio : configuration.aspectRatio;
1813
+ if (!effectiveAspectRatio) {
1814
+ return getAutoAspectRatio(contentElementWidth);
1815
+ }
1816
+ return aspectRatios$1[effectiveAspectRatio] || 0.75;
1817
+ }
1818
+ function getAutoAspectRatio(contentElementWidth) {
1819
+ return contentElementWidth === contentElementWidths.full ? 0.5 : 0.75;
1820
+ }
1498
1821
 
1822
+ function VrImage(_ref) {
1823
+ var configuration = _ref.configuration,
1824
+ contentElementWidth = _ref.contentElementWidth;
1499
1825
  var _useContentElementLif = useContentElementLifecycle(),
1500
- shouldLoad = _useContentElementLif.shouldLoad;
1501
-
1826
+ shouldLoad = _useContentElementLif.shouldLoad;
1502
1827
  var _useContentElementEdi = useContentElementEditorState(),
1503
- isEditable = _useContentElementEdi.isEditable,
1504
- isSelected = _useContentElementEdi.isSelected;
1505
-
1828
+ isEditable = _useContentElementEdi.isEditable,
1829
+ isSelected = _useContentElementEdi.isSelected;
1830
+ var portraitOrientation = usePortraitOrientation();
1506
1831
  var imageFile = useFileWithInlineRights({
1507
1832
  configuration: configuration,
1508
1833
  collectionName: 'imageFiles',
1509
1834
  propertyName: 'image'
1510
1835
  });
1836
+ var aspectRatio = getAspectRatio({
1837
+ configuration: configuration,
1838
+ contentElementWidth: contentElementWidth,
1839
+ portraitOrientation: portraitOrientation
1840
+ });
1511
1841
  return /*#__PURE__*/React.createElement("div", {
1512
1842
  style: {
1513
1843
  pointerEvents: isEditable && !isSelected ? 'none' : undefined
1514
1844
  }
1515
1845
  }, /*#__PURE__*/React.createElement(FitViewport, {
1516
- aspectRatio: contentElementWidth === contentElementWidths.full ? 0.5 : 0.75
1846
+ aspectRatio: aspectRatio,
1847
+ fill: configuration.position === 'backdrop'
1517
1848
  }, /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(ContentElementFigure, {
1518
1849
  configuration: configuration
1519
- }, /*#__PURE__*/React.createElement(FitViewport.Content, null, renderLazyPanorama(configuration, imageFile, shouldLoad), /*#__PURE__*/React.createElement(InlineFileRights, {
1850
+ }, /*#__PURE__*/React.createElement(FitViewport.Content, null, renderLazyPanorama(configuration, imageFile, shouldLoad, aspectRatio), /*#__PURE__*/React.createElement(InlineFileRights, {
1851
+ configuration: configuration,
1520
1852
  context: "insideElement",
1521
1853
  items: [{
1522
1854
  file: imageFile,
1523
1855
  label: 'image'
1524
1856
  }]
1525
1857
  })))), /*#__PURE__*/React.createElement(InlineFileRights, {
1858
+ configuration: configuration,
1526
1859
  context: "afterElement",
1527
1860
  items: [{
1528
1861
  file: imageFile,
@@ -1530,38 +1863,34 @@ function VrImage(_ref) {
1530
1863
  }]
1531
1864
  })));
1532
1865
  }
1533
-
1534
- function renderLazyPanorama(configuration, imageFile, shouldLoad) {
1866
+ function renderLazyPanorama(configuration, imageFile, shouldLoad, aspectRatio) {
1535
1867
  if (shouldLoad && imageFile && imageFile.isReady) {
1536
1868
  return /*#__PURE__*/React.createElement(AutoCruisingPanorama, {
1537
1869
  imageFile: imageFile,
1870
+ key: aspectRatio,
1538
1871
  initialYaw: configuration.initialYaw,
1539
1872
  initialPitch: configuration.initialPitch
1540
1873
  });
1541
1874
  }
1542
1875
  }
1543
-
1544
1876
  function AutoCruisingPanorama(_ref2) {
1545
1877
  var imageFile = _ref2.imageFile,
1546
- initialYaw = _ref2.initialYaw,
1547
- initialPitch = _ref2.initialPitch;
1878
+ initialYaw = _ref2.initialYaw,
1879
+ initialPitch = _ref2.initialPitch;
1548
1880
  var viewerRef = useRef();
1549
-
1550
1881
  var _useState = useState(false),
1551
- _useState2 = _slicedToArray(_useState, 2),
1552
- hidePanoramaIndicator = _useState2[0],
1553
- setHidePanoramaIndicator = _useState2[1];
1554
-
1882
+ _useState2 = _slicedToArray(_useState, 2),
1883
+ hidePanoramaIndicator = _useState2[0],
1884
+ setHidePanoramaIndicator = _useState2[1];
1555
1885
  var _useAutoCruising = useAutoCruising({
1556
- viewerRef: viewerRef,
1557
- onCancel: function onCancel() {
1558
- return setHidePanoramaIndicator(true);
1559
- }
1560
- }),
1561
- _useAutoCruising2 = _slicedToArray(_useAutoCruising, 2),
1562
- startAutoCruising = _useAutoCruising2[0],
1563
- stopAutoCruising = _useAutoCruising2[1];
1564
-
1886
+ viewerRef: viewerRef,
1887
+ onCancel: function onCancel() {
1888
+ return setHidePanoramaIndicator(true);
1889
+ }
1890
+ }),
1891
+ _useAutoCruising2 = _slicedToArray(_useAutoCruising, 2),
1892
+ startAutoCruising = _useAutoCruising2[0],
1893
+ stopAutoCruising = _useAutoCruising2[1];
1565
1894
  useContentElementLifecycle({
1566
1895
  onActivate: function onActivate() {
1567
1896
  if (viewerRef.current) {
@@ -1585,9 +1914,41 @@ frontend.contentElementTypes.register('vrImage', {
1585
1914
  lifecycle: true
1586
1915
  });
1587
1916
 
1588
- var styles$9 = {"wrapper":"IframeEmbed-module_wrapper__3w_LN","iframe":"IframeEmbed-module_iframe__3QVCA","scale-p33":"IframeEmbed-module_scale-p33__MRjVy","scale-p50":"IframeEmbed-module_scale-p50__1EKxu","scale-p75":"IframeEmbed-module_scale-p75__1yT4D"};
1917
+ function useIframeHeight$1(_ref) {
1918
+ var src = _ref.src,
1919
+ active = _ref.active;
1920
+ var _useState = useState('400px'),
1921
+ _useState2 = _slicedToArray(_useState, 2),
1922
+ height = _useState2[0],
1923
+ setHeight = _useState2[1];
1924
+ useEffect(function () {
1925
+ if (!active) {
1926
+ return;
1927
+ }
1928
+ window.addEventListener('message', receive);
1929
+ function receive(event) {
1930
+ var data = parse(event.data);
1931
+ if (src && data.context === 'iframe.resize' && data.src === src) {
1932
+ setHeight(data.height + 'px');
1933
+ }
1934
+ }
1935
+ return function () {
1936
+ return window.removeEventListener('message', receive);
1937
+ };
1938
+ }, [active, src]);
1939
+ return height;
1940
+ }
1941
+ function parse(data) {
1942
+ try {
1943
+ return JSON.parse(data);
1944
+ } catch (e) {
1945
+ return {};
1946
+ }
1947
+ }
1589
1948
 
1590
- var aspectRatios$1 = {
1949
+ var styles$a = {"wrapper":"IframeEmbed-module_wrapper__3w_LN","iframe":"IframeEmbed-module_iframe__3QVCA","scale-p33":"IframeEmbed-module_scale-p33__MRjVy","scale-p50":"IframeEmbed-module_scale-p50__1EKxu","scale-p75":"IframeEmbed-module_scale-p75__1yT4D"};
1950
+
1951
+ var aspectRatios$2 = {
1591
1952
  wide: 0.5625,
1592
1953
  narrow: 0.75,
1593
1954
  square: 1,
@@ -1595,42 +1956,51 @@ var aspectRatios$1 = {
1595
1956
  };
1596
1957
  function IframeEmbed(_ref) {
1597
1958
  var configuration = _ref.configuration;
1598
-
1599
1959
  var _useContentElementLif = useContentElementLifecycle(),
1600
- shouldLoad = _useContentElementLif.shouldLoad;
1601
-
1960
+ shouldLoad = _useContentElementLif.shouldLoad;
1602
1961
  var _useContentElementEdi = useContentElementEditorState(),
1603
- isEditable = _useContentElementEdi.isEditable,
1604
- isSelected = _useContentElementEdi.isSelected;
1605
-
1962
+ isEditable = _useContentElementEdi.isEditable,
1963
+ isSelected = _useContentElementEdi.isSelected;
1606
1964
  var portraitOrientation = usePortraitOrientation();
1965
+ var height = useIframeHeight$1({
1966
+ src: configuration.source,
1967
+ active: configuration.autoResize
1968
+ });
1607
1969
  var aspectRatio = portraitOrientation && configuration.portraitAspectRatio ? configuration.portraitAspectRatio : configuration.aspectRatio;
1970
+ function renderSpanningWrapper(children) {
1971
+ if (configuration.autoResize) {
1972
+ return /*#__PURE__*/React.createElement("div", {
1973
+ style: {
1974
+ height: height
1975
+ }
1976
+ }, children);
1977
+ } else {
1978
+ return /*#__PURE__*/React.createElement(FitViewport.Content, null, children);
1979
+ }
1980
+ }
1608
1981
  return /*#__PURE__*/React.createElement("div", {
1609
- className: styles$9.wrapper,
1982
+ className: styles$a.wrapper,
1610
1983
  style: {
1611
1984
  pointerEvents: isEditable && !isSelected ? 'none' : undefined
1612
1985
  }
1613
1986
  }, /*#__PURE__*/React.createElement(FitViewport, {
1614
- aspectRatio: aspectRatios$1[aspectRatio || 'wide'],
1987
+ aspectRatio: aspectRatios$2[aspectRatio || 'wide'],
1615
1988
  opaque: utils.isBlank(configuration.source)
1616
1989
  }, /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(ContentElementFigure, {
1617
1990
  configuration: configuration
1618
- }, /*#__PURE__*/React.createElement(FitViewport.Content, null, /*#__PURE__*/React.createElement(ThirdPartyOptIn, null, shouldLoad && /*#__PURE__*/React.createElement("iframe", {
1619
- className: classNames(styles$9.iframe, styles$9["scale-".concat(configuration.scale)]),
1991
+ }, renderSpanningWrapper( /*#__PURE__*/React.createElement(ThirdPartyOptIn, null, shouldLoad && /*#__PURE__*/React.createElement("iframe", {
1992
+ className: classNames(styles$a.iframe, styles$a["scale-".concat(configuration.scale)]),
1620
1993
  title: configuration.title,
1621
1994
  src: configuration.source
1622
1995
  }))), /*#__PURE__*/React.createElement(OptOutInfo, {
1623
1996
  configuration: configuration
1624
1997
  })))));
1625
1998
  }
1626
-
1627
1999
  function OptOutInfo(_ref2) {
1628
2000
  var configuration = _ref2.configuration;
1629
-
1630
2001
  if (!configuration.requireConsent) {
1631
2002
  return null;
1632
2003
  }
1633
-
1634
2004
  return /*#__PURE__*/React.createElement(ThirdPartyOptOutInfo, null);
1635
2005
  }
1636
2006
 
@@ -1639,85 +2009,76 @@ frontend.contentElementTypes.register('iframeEmbed', {
1639
2009
  lifecycle: true
1640
2010
  });
1641
2011
 
1642
- var styles$a = {"wrapper":"Placeholder-module_wrapper__jRFYE","row":"Placeholder-module_row__1SBRB","item":"Placeholder-module_item__RozmQ","load":"Placeholder-module_load__uFpxr","avatar":"Placeholder-module_avatar__2VeHz Placeholder-module_item__RozmQ","info":"Placeholder-module_info__37csK","name":"Placeholder-module_name__2T6as Placeholder-module_item__RozmQ","handle":"Placeholder-module_handle__2WwoF Placeholder-module_item__RozmQ","text":"Placeholder-module_text__DWLME Placeholder-module_item__RozmQ"};
2012
+ var styles$b = {"wrapper":"Placeholder-module_wrapper__jRFYE","row":"Placeholder-module_row__1SBRB","item":"Placeholder-module_item__RozmQ","load":"Placeholder-module_load__uFpxr","avatar":"Placeholder-module_avatar__2VeHz Placeholder-module_item__RozmQ","info":"Placeholder-module_info__37csK","name":"Placeholder-module_name__2T6as Placeholder-module_item__RozmQ","handle":"Placeholder-module_handle__2WwoF Placeholder-module_item__RozmQ","text":"Placeholder-module_text__DWLME Placeholder-module_item__RozmQ"};
1643
2013
 
2014
+ var _excluded$4 = ["styles"];
1644
2015
  function _extends$2() {
1645
- _extends$2 = Object.assign || function (target) {
2016
+ _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
1646
2017
  for (var i = 1; i < arguments.length; i++) {
1647
2018
  var source = arguments[i];
1648
-
1649
2019
  for (var key in source) {
1650
2020
  if (Object.prototype.hasOwnProperty.call(source, key)) {
1651
2021
  target[key] = source[key];
1652
2022
  }
1653
2023
  }
1654
2024
  }
1655
-
1656
2025
  return target;
1657
2026
  };
1658
-
1659
2027
  return _extends$2.apply(this, arguments);
1660
2028
  }
1661
2029
  var Icon = (function (_ref) {
1662
2030
  var _ref$styles = _ref.styles,
1663
- styles = _ref$styles === void 0 ? {} : _ref$styles,
1664
- props = _objectWithoutProperties(_ref, ["styles"]);
1665
-
2031
+ props = _objectWithoutProperties(_ref, _excluded$4);
1666
2032
  return /*#__PURE__*/React.createElement("svg", _extends$2({
1667
- viewBox: "0 0 24 24",
1668
- "aria-hidden": "true",
1669
- className: (styles["r-1cvl2hr"] || "r-1cvl2hr") + " " + (styles["r-4qtqp9"] || "r-4qtqp9") + " " + (styles["r-yyyyoo"] || "r-yyyyoo") + " " + (styles["r-6zzn7w"] || "r-6zzn7w") + " " + (styles["r-19fsva8"] || "r-19fsva8") + " " + (styles["r-dnmrzs"] || "r-dnmrzs") + " " + (styles["r-bnwqim"] || "r-bnwqim") + " " + (styles["r-1plcrui"] || "r-1plcrui") + " " + (styles["r-lrvibr"] || "r-lrvibr") + " " + (styles["r-q1j0wu"] || "r-q1j0wu")
2033
+ viewBox: "0 0 512 512",
2034
+ "aria-hidden": "true"
1670
2035
  }, props), /*#__PURE__*/React.createElement("path", {
1671
- d: "M23.643 4.937c-.835.37-1.732.62-2.675.733a4.67 4.67 0 002.048-2.578 9.3 9.3 0 01-2.958 1.13 4.66 4.66 0 00-7.938 4.25 13.229 13.229 0 01-9.602-4.868c-.4.69-.63 1.49-.63 2.342A4.66 4.66 0 003.96 9.824a4.647 4.647 0 01-2.11-.583v.06a4.66 4.66 0 003.737 4.568 4.692 4.692 0 01-2.104.08 4.661 4.661 0 004.352 3.234 9.348 9.348 0 01-5.786 1.995 9.5 9.5 0 01-1.112-.065 13.175 13.175 0 007.14 2.093c8.57 0 13.255-7.098 13.255-13.254 0-.2-.005-.402-.014-.602a9.47 9.47 0 002.323-2.41z"
2036
+ d: "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9L389.2 48zm-24.8 373.8h39.1L151.1 88h-42l255.3 333.8z"
1672
2037
  }));
1673
2038
  });
1674
2039
 
1675
2040
  function Placeholder(_ref) {
1676
2041
  var children = _ref.children,
1677
- minHeight = _ref.minHeight;
2042
+ minHeight = _ref.minHeight;
1678
2043
  return /*#__PURE__*/React.createElement("div", {
1679
- className: styles$a.wrapper,
2044
+ className: styles$b.wrapper,
1680
2045
  style: {
1681
2046
  minHeight: minHeight
1682
2047
  }
1683
2048
  }, /*#__PURE__*/React.createElement("div", {
1684
- className: styles$a.row
2049
+ className: styles$b.row
1685
2050
  }, /*#__PURE__*/React.createElement("div", {
1686
- className: styles$a.avatar
2051
+ className: styles$b.avatar
1687
2052
  }), /*#__PURE__*/React.createElement("div", {
1688
- className: styles$a.info
2053
+ className: styles$b.info
1689
2054
  }, /*#__PURE__*/React.createElement("div", {
1690
- className: styles$a.name
2055
+ className: styles$b.name
1691
2056
  }), /*#__PURE__*/React.createElement("div", {
1692
- className: styles$a.handle
2057
+ className: styles$b.handle
1693
2058
  })), /*#__PURE__*/React.createElement(Icon, {
1694
2059
  width: 24,
1695
2060
  height: 24
1696
2061
  })), children || /*#__PURE__*/React.createElement("div", {
1697
- className: styles$a.text
2062
+ className: styles$b.text
1698
2063
  }));
1699
2064
  }
1700
2065
 
1701
- var styles$b = {"loadingContainer":"TwitterEmbed-module_loadingContainer__3Ozs_","container":"TwitterEmbed-module_container__380cX"};
2066
+ var styles$c = {"loadingContainer":"TwitterEmbed-module_loadingContainer__3Ozs_","container":"TwitterEmbed-module_container__380cX"};
1702
2067
 
1703
2068
  function TwitterEmbed(_ref) {
1704
2069
  var configuration = _ref.configuration;
1705
2070
  var url = configuration.url,
1706
- hideConversation = configuration.hideConversation,
1707
- hideMedia = configuration.hideMedia;
1708
-
2071
+ hideConversation = configuration.hideConversation,
2072
+ hideMedia = configuration.hideMedia;
1709
2073
  var _useContentElementEdi = useContentElementEditorState(),
1710
- isEditable = _useContentElementEdi.isEditable,
1711
- isSelected = _useContentElementEdi.isSelected;
1712
-
2074
+ isEditable = _useContentElementEdi.isEditable,
2075
+ isSelected = _useContentElementEdi.isSelected;
1713
2076
  var _useContentElementLif = useContentElementLifecycle(),
1714
- shouldLoad = _useContentElementLif.shouldLoad;
1715
-
2077
+ shouldLoad = _useContentElementLif.shouldLoad;
1716
2078
  var _useState = useState({}),
1717
- _useState2 = _slicedToArray(_useState, 2),
1718
- minHeight = _useState2[0],
1719
- setMinHeight = _useState2[1];
1720
-
2079
+ _useState2 = _slicedToArray(_useState, 2),
2080
+ minHeight = _useState2[0],
2081
+ setMinHeight = _useState2[1];
1721
2082
  var key = [url, hideConversation, hideMedia].join('-');
1722
2083
  var onLoad = useCallback(function (_ref2) {
1723
2084
  var height = _ref2.height;
@@ -1746,7 +2107,6 @@ function TwitterEmbed(_ref) {
1746
2107
  providerName: "twitter"
1747
2108
  })));
1748
2109
  }
1749
-
1750
2110
  function scriptLoaded() {
1751
2111
  var promise = new Promise(function (resolve) {
1752
2112
  var script = document.createElement("script");
@@ -1756,21 +2116,18 @@ function scriptLoaded() {
1756
2116
  });
1757
2117
  return promise;
1758
2118
  }
1759
-
1760
2119
  function Tweet(_ref3) {
1761
2120
  var url = _ref3.url,
1762
- hideConversation = _ref3.hideConversation,
1763
- hideMedia = _ref3.hideMedia,
1764
- minHeight = _ref3.minHeight,
1765
- onLoad = _ref3.onLoad;
2121
+ hideConversation = _ref3.hideConversation,
2122
+ hideMedia = _ref3.hideMedia,
2123
+ minHeight = _ref3.minHeight,
2124
+ onLoad = _ref3.onLoad;
1766
2125
  var ref = useRef(null);
1767
2126
  var tweetId = url ? url.split('/')[5] : undefined;
1768
-
1769
2127
  var _useState3 = useState(false),
1770
- _useState4 = _slicedToArray(_useState3, 2),
1771
- loaded = _useState4[0],
1772
- setLoaded = _useState4[1];
1773
-
2128
+ _useState4 = _slicedToArray(_useState3, 2),
2129
+ loaded = _useState4[0],
2130
+ setLoaded = _useState4[1];
1774
2131
  useEffect(function () {
1775
2132
  var isComponentMounted = true;
1776
2133
  var options = {
@@ -1783,7 +2140,6 @@ function Tweet(_ref3) {
1783
2140
  if (window.twttr.widgets['createTweetEmbed']) {
1784
2141
  window.twttr.widgets.createTweet(tweetId, ref.current, options).then(function () {
1785
2142
  var _ref$current;
1786
-
1787
2143
  setLoaded(true);
1788
2144
  onLoad({
1789
2145
  height: (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.clientHeight
@@ -1801,7 +2157,7 @@ function Tweet(_ref3) {
1801
2157
  minHeight: minHeight
1802
2158
  }), /*#__PURE__*/React.createElement("div", {
1803
2159
  ref: ref,
1804
- className: classNames(styles$b.container, _defineProperty({}, styles$b.loadingContainer, !loaded))
2160
+ className: classNames(styles$c.container, _defineProperty({}, styles$c.loadingContainer, !loaded))
1805
2161
  }));
1806
2162
  }
1807
2163
 
@@ -1820,34 +2176,36 @@ frontend.contentElementTypes.register('twitterEmbed', {
1820
2176
  }
1821
2177
  });
1822
2178
 
1823
- var styles$c = {"contentLinkColor":"var(--content-link-color)","details":"Question-module_details__3FxH-","answer":"Question-module_answer__2jMt6","layout-centerRagged":"Question-module_layout-centerRagged__1hovs"};
2179
+ var styles$d = {"details":"Question-module_details__3FxH-","answer":"Question-module_answer__2jMt6","layout-centerRagged":"Question-module_layout-centerRagged__1hovs"};
1824
2180
 
1825
2181
  function Question(_ref) {
1826
2182
  var configuration = _ref.configuration,
1827
- contentElementId = _ref.contentElementId,
1828
- sectionProps = _ref.sectionProps;
2183
+ contentElementId = _ref.contentElementId,
2184
+ sectionProps = _ref.sectionProps;
1829
2185
  var updateConfiguration = useContentElementConfigurationUpdate();
1830
-
1831
2186
  var _useI18n = useI18n({
1832
- locale: 'ui'
1833
- }),
1834
- t = _useI18n.t;
1835
-
2187
+ locale: 'ui'
2188
+ }),
2189
+ t = _useI18n.t;
1836
2190
  var _useContentElementEdi = useContentElementEditorState(),
1837
- isEditable = _useContentElementEdi.isEditable,
1838
- isSelected = _useContentElementEdi.isSelected;
1839
-
2191
+ isEditable = _useContentElementEdi.isEditable,
2192
+ isSelected = _useContentElementEdi.isSelected;
1840
2193
  return /*#__PURE__*/React.createElement("details", {
1841
2194
  open: configuration.expandByDefault || isEditable && isSelected,
1842
- className: classNames(styles$c.details, styles$c["layout-".concat(sectionProps.layout)])
2195
+ className: classNames(styles$d.details, styles$d["layout-".concat(sectionProps.layout)])
1843
2196
  }, /*#__PURE__*/React.createElement("summary", {
1844
2197
  onClick: isEditable ? function (event) {
1845
2198
  return event.preventDefault();
1846
- } : undefined
2199
+ } : undefined,
2200
+ style: {
2201
+ color: paletteColor(configuration.color)
2202
+ }
1847
2203
  }, /*#__PURE__*/React.createElement(ThemeIcon, {
1848
2204
  name: "expand"
1849
2205
  }), /*#__PURE__*/React.createElement(Text, {
1850
- scaleCategory: "question"
2206
+ scaleCategory: "question",
2207
+ typographyVariant: configuration.typographyVariant,
2208
+ typographySize: configuration.typographySize
1851
2209
  }, /*#__PURE__*/React.createElement(EditableInlineText, {
1852
2210
  value: configuration.question,
1853
2211
  onChange: function onChange(question) {
@@ -1857,10 +2215,17 @@ function Question(_ref) {
1857
2215
  },
1858
2216
  hyphens: "none",
1859
2217
  placeholder: t('pageflow_scrolled.inline_editing.type_question')
1860
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(EditableText, {
2218
+ }))), /*#__PURE__*/React.createElement("div", {
2219
+ style: {
2220
+ color: paletteColor(configuration.answerColor)
2221
+ }
2222
+ }, /*#__PURE__*/React.createElement(EditableText, {
1861
2223
  value: configuration.answer,
1862
2224
  contentElementId: contentElementId,
1863
- className: styles$c.answer,
2225
+ scaleCategory: "questionAnswer",
2226
+ typographyVariant: configuration.typographyVariant,
2227
+ typographySize: configuration.typographySize,
2228
+ className: styles$d.answer,
1864
2229
  onChange: function onChange(answer) {
1865
2230
  return updateConfiguration({
1866
2231
  answer: answer
@@ -1876,51 +2241,42 @@ frontend.contentElementTypes.register('question', {
1876
2241
  component: Question
1877
2242
  });
1878
2243
 
1879
- var styles$d = {"contentLinkColor":"var(--content-link-color)","wrapper":"Counter-module_wrapper__3XTil","number":"Counter-module_number__1Y4AV","centerRagged":"Counter-module_centerRagged__3Va0Y","center":"Counter-module_center__1SCJY","animation-fadeIn":"Counter-module_animation-fadeIn__3Hyky","animation-fadeIn-active":"Counter-module_animation-fadeIn-active__16DIk","animation-fadeInFromBelow":"Counter-module_animation-fadeInFromBelow__3l1qX","animation-fadeInFromAbove":"Counter-module_animation-fadeInFromAbove__3iGf-","animation-fadeInFromAbove-active":"Counter-module_animation-fadeInFromAbove-active__37UsW","animation-fadeInFromBelow-active":"Counter-module_animation-fadeInFromBelow-active__2CSjv","animation-fadeInScaleUp":"Counter-module_animation-fadeInScaleUp__1ngk5","animation-fadeInScaleDown":"Counter-module_animation-fadeInScaleDown__SpNGu","animation-fadeInScaleUp-active":"Counter-module_animation-fadeInScaleUp-active__1GEXn","animation-fadeInScaleDown-active":"Counter-module_animation-fadeInScaleDown-active__3gaYM"};
2244
+ var styles$e = {"wrapper":"Counter-module_wrapper__3XTil","number":"Counter-module_number__1Y4AV","centerRagged":"Counter-module_centerRagged__3Va0Y","center":"Counter-module_center__1SCJY","animation-fadeIn":"Counter-module_animation-fadeIn__3Hyky","animation-fadeIn-active":"Counter-module_animation-fadeIn-active__16DIk","animation-fadeInFromBelow":"Counter-module_animation-fadeInFromBelow__3l1qX","animation-fadeInFromAbove":"Counter-module_animation-fadeInFromAbove__3iGf-","animation-fadeInFromAbove-active":"Counter-module_animation-fadeInFromAbove-active__37UsW","animation-fadeInFromBelow-active":"Counter-module_animation-fadeInFromBelow-active__2CSjv","animation-fadeInScaleUp":"Counter-module_animation-fadeInScaleUp__1ngk5","animation-fadeInScaleDown":"Counter-module_animation-fadeInScaleDown__SpNGu","animation-fadeInScaleUp-active":"Counter-module_animation-fadeInScaleUp-active__1GEXn","animation-fadeInScaleDown-active":"Counter-module_animation-fadeInScaleDown-active__3gaYM"};
1880
2245
 
1881
2246
  function Counter(_ref) {
1882
2247
  var configuration = _ref.configuration,
1883
- contentElementId = _ref.contentElementId,
1884
- contentElementWidth = _ref.contentElementWidth,
1885
- sectionProps = _ref.sectionProps;
2248
+ contentElementId = _ref.contentElementId,
2249
+ contentElementWidth = _ref.contentElementWidth,
2250
+ sectionProps = _ref.sectionProps;
1886
2251
  var updateConfiguration = useContentElementConfigurationUpdate();
1887
2252
  var locale = useLocale();
1888
-
1889
2253
  var _useI18n = useI18n({
1890
- locale: 'ui'
1891
- }),
1892
- t = _useI18n.t;
1893
-
2254
+ locale: 'ui'
2255
+ }),
2256
+ t = _useI18n.t;
1894
2257
  var targetValue = configuration.targetValue || 0;
1895
2258
  var decimalPlaces = configuration.decimalPlaces || 0;
1896
2259
  var startValue = configuration.startValue || 0;
1897
2260
  var countingDuration = countingDurations[configuration.countingSpeed];
1898
-
1899
2261
  var _useState = useState(countingDuration > 0 ? startValue : targetValue),
1900
- _useState2 = _slicedToArray(_useState, 2),
1901
- currentValue = _useState2[0],
1902
- setCurrentValue = _useState2[1];
1903
-
2262
+ _useState2 = _slicedToArray(_useState, 2),
2263
+ currentValue = _useState2[0],
2264
+ setCurrentValue = _useState2[1];
1904
2265
  var _useState3 = useState(false),
1905
- _useState4 = _slicedToArray(_useState3, 2),
1906
- animated = _useState4[0],
1907
- setAnimated = _useState4[1];
1908
-
2266
+ _useState4 = _slicedToArray(_useState3, 2),
2267
+ animated = _useState4[0],
2268
+ setAnimated = _useState4[1];
1909
2269
  var intervalRef = useRef();
1910
2270
  var timeoutRef = useRef();
1911
-
1912
2271
  var _useContentElementEdi = useContentElementEditorState(),
1913
- isEditable = _useContentElementEdi.isEditable;
1914
-
2272
+ isEditable = _useContentElementEdi.isEditable;
1915
2273
  var animate = useCallback(function () {
1916
2274
  setAnimated(true);
1917
-
1918
2275
  if (!intervalRef.current && countingDuration > 0) {
1919
2276
  var startTime = new Date().getTime();
1920
2277
  var ease = configuration.entranceAnimation && configuration.entranceAnimation !== 'none' ? easeOut : easeInOut;
1921
2278
  intervalRef.current = setInterval(function () {
1922
2279
  var t = (new Date().getTime() - startTime) / countingDuration;
1923
-
1924
2280
  if (t < 1) {
1925
2281
  setCurrentValue(startValue + (targetValue - startValue) * ease(t));
1926
2282
  } else {
@@ -1953,24 +2309,23 @@ function Counter(_ref) {
1953
2309
  }
1954
2310
  }
1955
2311
  });
1956
-
1957
2312
  function format(value) {
1958
2313
  var localeString = value.toLocaleString(locale, {
2314
+ useGrouping: !configuration.hideThousandsSeparators,
1959
2315
  minimumFractionDigits: decimalPlaces,
1960
2316
  maximumFractionDigits: decimalPlaces
1961
2317
  });
1962
2318
  var unit = configuration.unit || '';
1963
2319
  return configuration.unitPlacement === 'leading' ? "".concat(unit).concat(localeString) : "".concat(localeString).concat(unit);
1964
2320
  }
1965
-
1966
2321
  return /*#__PURE__*/React.createElement("div", {
1967
- className: classNames(_defineProperty({}, styles$d.center, contentElementWidth > contentElementWidths.md))
2322
+ className: classNames(_defineProperty({}, styles$e.center, contentElementWidth > contentElementWidths.md))
1968
2323
  }, /*#__PURE__*/React.createElement("div", {
1969
- className: classNames(styles$d.wrapper, _defineProperty({}, styles$d.centerRagged, sectionProps.layout === 'centerRagged'))
2324
+ className: classNames(styles$e.wrapper, _defineProperty({}, styles$e.centerRagged, sectionProps.layout === 'centerRagged'))
1970
2325
  }, /*#__PURE__*/React.createElement(Text, {
1971
2326
  scaleCategory: numberScaleCategories[configuration.textSize || 'medium']
1972
2327
  }, /*#__PURE__*/React.createElement("div", {
1973
- className: classNames("typography-counter-".concat(configuration.typographyVariant), styles$d.number, styles$d["animation-".concat(configuration.entranceAnimation)], _defineProperty({}, styles$d["animation-".concat(configuration.entranceAnimation, "-active")], animated)),
2328
+ className: classNames("typography-counter-".concat(configuration.typographyVariant), styles$e.number, styles$e["animation-".concat(configuration.entranceAnimation)], _defineProperty({}, styles$e["animation-".concat(configuration.entranceAnimation, "-active")], animated)),
1974
2329
  style: {
1975
2330
  '--counting-duration': "".concat(countingDuration || 1000, "ms"),
1976
2331
  '--palette-color': paletteColor(configuration.numberColor)
@@ -1978,7 +2333,7 @@ function Counter(_ref) {
1978
2333
  }, format(currentValue))), /*#__PURE__*/React.createElement(EditableText, {
1979
2334
  value: configuration.description,
1980
2335
  contentElementId: contentElementId,
1981
- className: styles$d.description,
2336
+ className: styles$e.description,
1982
2337
  onChange: function onChange(description) {
1983
2338
  return updateConfiguration({
1984
2339
  description: description
@@ -2001,14 +2356,12 @@ var countingDurations = {
2001
2356
  medium: 2000,
2002
2357
  slow: 5000
2003
2358
  };
2004
-
2005
2359
  function easeInOut(t) {
2006
2360
  t = t * 2;
2007
2361
  if (t < 1) return Math.pow(t, 2) / 2;
2008
2362
  t = t - 1;
2009
2363
  return t - Math.pow(t, 2) / 2 + 1 / 2;
2010
2364
  }
2011
-
2012
2365
  function easeOut(t) {
2013
2366
  return (t - Math.pow(t, 2) / 2) * 2;
2014
2367
  }
@@ -2018,34 +2371,29 @@ frontend.contentElementTypes.register('counter', {
2018
2371
  lifecycle: true
2019
2372
  });
2020
2373
 
2021
- var styles$e = {"breakpoint-sm":"(min-width: 640px)","contentLinkColor":"var(--content-link-color)","figure":"Quote-module_figure__1Q3tJ","design-largeCentered":"Quote-module_design-largeCentered__2f6qW","text":"Quote-module_text__C0md2","design-largeHanging":"Quote-module_design-largeHanging__1TVQh","design-hanging":"Quote-module_design-hanging__4aDVU","centerRagged":"Quote-module_centerRagged__1CeFH","maskedMark":"Quote-module_maskedMark__2n08e","attribution":"Quote-module_attribution__3iXxu"};
2374
+ var styles$f = {"breakpoint-sm":"(min-width: 640px)","figure":"Quote-module_figure__1Q3tJ","design-largeCentered":"Quote-module_design-largeCentered__2f6qW","text":"Quote-module_text__C0md2","design-largeHanging":"Quote-module_design-largeHanging__1TVQh","design-hanging":"Quote-module_design-hanging__4aDVU","centerRagged":"Quote-module_centerRagged__1CeFH","maskedMark":"Quote-module_maskedMark__2n08e","attribution":"Quote-module_attribution__3iXxu"};
2022
2375
 
2023
2376
  function Quote(_ref) {
2024
2377
  var _theme$options$proper, _theme$options$proper2;
2025
-
2026
2378
  var configuration = _ref.configuration,
2027
- contentElementId = _ref.contentElementId,
2028
- sectionProps = _ref.sectionProps;
2379
+ contentElementId = _ref.contentElementId,
2380
+ sectionProps = _ref.sectionProps;
2029
2381
  var updateConfiguration = useContentElementConfigurationUpdate();
2030
-
2031
2382
  var _useContentElementEdi = useContentElementEditorState(),
2032
- isSelected = _useContentElementEdi.isSelected;
2033
-
2383
+ isSelected = _useContentElementEdi.isSelected;
2034
2384
  var theme = useTheme();
2035
-
2036
2385
  var _useI18n = useI18n({
2037
- locale: 'ui'
2038
- }),
2039
- t = _useI18n.t;
2040
-
2386
+ locale: 'ui'
2387
+ }),
2388
+ t = _useI18n.t;
2041
2389
  var design = configuration.variant ? configuration.variant.split('-')[0] : theme.options.quoteDesign;
2042
2390
  return /*#__PURE__*/React.createElement("figure", {
2043
- className: classNames(styles$e.figure, styles$e["design-".concat(design || 'largeHanging')], "scope-quote-".concat(configuration.variant), _defineProperty({}, styles$e.maskedMark, (_theme$options$proper = theme.options.properties) === null || _theme$options$proper === void 0 ? void 0 : (_theme$options$proper2 = _theme$options$proper.root) === null || _theme$options$proper2 === void 0 ? void 0 : _theme$options$proper2.quoteLeftMarkMaskImage), _defineProperty({}, styles$e.centerRagged, sectionProps.layout === 'centerRagged')),
2391
+ className: classNames(styles$f.figure, styles$f["design-".concat(design || 'largeHanging')], "scope-quote-".concat(configuration.variant), _defineProperty({}, styles$f.maskedMark, (_theme$options$proper = theme.options.properties) === null || _theme$options$proper === void 0 ? void 0 : (_theme$options$proper2 = _theme$options$proper.root) === null || _theme$options$proper2 === void 0 ? void 0 : _theme$options$proper2.quoteLeftMarkMaskImage), _defineProperty({}, styles$f.centerRagged, sectionProps.layout === 'centerRagged')),
2044
2392
  style: {
2045
2393
  '--palette-color': paletteColor(configuration.color)
2046
2394
  }
2047
2395
  }, /*#__PURE__*/React.createElement("blockquote", {
2048
- className: styles$e.text
2396
+ className: styles$f.text
2049
2397
  }, /*#__PURE__*/React.createElement(EditableText, {
2050
2398
  value: configuration.text,
2051
2399
  contentElementId: contentElementId,
@@ -2055,9 +2403,9 @@ function Quote(_ref) {
2055
2403
  });
2056
2404
  },
2057
2405
  onlyParagraphs: true,
2058
- scaleCategory: getTextScaleCategory(configuration)
2406
+ scaleCategory: getTextScaleCategory(configuration, 'Text')
2059
2407
  })), (isSelected || !utils.isBlankEditableTextValue(configuration.attribution || [])) && /*#__PURE__*/React.createElement("figcaption", {
2060
- className: styles$e.attribution
2408
+ className: styles$f.attribution
2061
2409
  }, /*#__PURE__*/React.createElement(EditableText, {
2062
2410
  value: configuration.attribution,
2063
2411
  contentElementId: contentElementId,
@@ -2067,24 +2415,21 @@ function Quote(_ref) {
2067
2415
  });
2068
2416
  },
2069
2417
  onlyParagraphs: true,
2070
- scaleCategory: "quoteAttribution",
2418
+ scaleCategory: getTextScaleCategory(configuration, 'Attribution'),
2071
2419
  placeholder: t('pageflow_scrolled.inline_editing.type_attribution')
2072
2420
  })));
2073
2421
  }
2074
-
2075
- function getTextScaleCategory(configuration) {
2422
+ function getTextScaleCategory(configuration, suffix) {
2423
+ var base = "quote".concat(suffix);
2076
2424
  switch (configuration.textSize) {
2077
2425
  case 'large':
2078
- return 'quoteText-lg';
2079
-
2426
+ return "".concat(base, "-lg");
2080
2427
  case 'small':
2081
- return 'quoteText-sm';
2082
-
2428
+ return "".concat(base, "-sm");
2083
2429
  case 'verySmall':
2084
- return 'quoteText-xs';
2085
-
2430
+ return "".concat(base, "-xs");
2086
2431
  default:
2087
- return 'quoteText-md';
2432
+ return "".concat(base, "-md");
2088
2433
  }
2089
2434
  }
2090
2435
 
@@ -2092,52 +2437,18 @@ frontend.contentElementTypes.register('quote', {
2092
2437
  component: Quote
2093
2438
  });
2094
2439
 
2095
- function ownKeys(object, enumerableOnly) {
2096
- var keys = Object.keys(object);
2097
-
2098
- if (Object.getOwnPropertySymbols) {
2099
- var symbols = Object.getOwnPropertySymbols(object);
2100
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
2101
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2102
- });
2103
- keys.push.apply(keys, symbols);
2104
- }
2105
-
2106
- return keys;
2107
- }
2108
-
2109
- function _objectSpread2(target) {
2110
- for (var i = 1; i < arguments.length; i++) {
2111
- var source = arguments[i] != null ? arguments[i] : {};
2112
-
2113
- if (i % 2) {
2114
- ownKeys(Object(source), true).forEach(function (key) {
2115
- _defineProperty(target, key, source[key]);
2116
- });
2117
- } else if (Object.getOwnPropertyDescriptors) {
2118
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2119
- } else {
2120
- ownKeys(Object(source)).forEach(function (key) {
2121
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2122
- });
2123
- }
2124
- }
2125
-
2126
- return target;
2127
- }
2128
-
2129
- var styles$f = {"button":"ScrollButton-module_button__3DeL7","left":"ScrollButton-module_left__3uACk","right":"ScrollButton-module_right__25CLO","disabled":"ScrollButton-module_disabled__3fQR1","icon":"ScrollButton-module_icon__35w1l"};
2440
+ var styles$g = {"button":"ScrollButton-module_button__3DeL7","left":"ScrollButton-module_left__3uACk","right":"ScrollButton-module_right__25CLO","disabled":"ScrollButton-module_disabled__3fQR1","icon":"ScrollButton-module_icon__35w1l"};
2130
2441
 
2131
2442
  var size = 40;
2132
2443
  function ScrollButton(_ref) {
2133
2444
  var direction = _ref.direction,
2134
- disabled = _ref.disabled,
2135
- onClick = _ref.onClick;
2445
+ disabled = _ref.disabled,
2446
+ onClick = _ref.onClick;
2136
2447
  return /*#__PURE__*/React.createElement("button", {
2137
- className: classNames(styles$f.button, styles$f[direction], _defineProperty({}, styles$f.disabled, disabled)),
2448
+ className: classNames(styles$g.button, styles$g[direction], _defineProperty({}, styles$g.disabled, disabled)),
2138
2449
  onClick: onClick
2139
2450
  }, /*#__PURE__*/React.createElement("div", {
2140
- className: styles$f.icon
2451
+ className: styles$g.icon
2141
2452
  }, /*#__PURE__*/React.createElement(ThemeIcon, {
2142
2453
  name: direction === 'left' ? 'arrowLeft' : 'arrowRight',
2143
2454
  width: size,
@@ -2147,7 +2458,7 @@ function ScrollButton(_ref) {
2147
2458
 
2148
2459
  function useIntersectionObserver(_ref) {
2149
2460
  var threshold = _ref.threshold,
2150
- onVisibleIndexChange = _ref.onVisibleIndexChange;
2461
+ onVisibleIndexChange = _ref.onVisibleIndexChange;
2151
2462
  var containerRef = useRef();
2152
2463
  var childRefs = useRef([]);
2153
2464
  var observerRef = useRef();
@@ -2158,8 +2469,7 @@ function useIntersectionObserver(_ref) {
2158
2469
  var entryIndex = Array.from(containerElement.children).findIndex(function (child) {
2159
2470
  return child === entry.target;
2160
2471
  });
2161
-
2162
- if (entry.isIntersecting) {
2472
+ if (entry.isIntersecting && entry.intersectionRatio >= threshold) {
2163
2473
  onVisibleIndexChange(entryIndex);
2164
2474
  }
2165
2475
  });
@@ -2176,7 +2486,6 @@ function useIntersectionObserver(_ref) {
2176
2486
  observer.disconnect();
2177
2487
  };
2178
2488
  }, [threshold, onVisibleIndexChange]);
2179
-
2180
2489
  var setChildRef = function setChildRef(index) {
2181
2490
  return function (ref) {
2182
2491
  if (observerRef.current) {
@@ -2186,37 +2495,34 @@ function useIntersectionObserver(_ref) {
2186
2495
  observerRef.current.unobserve(childRefs.current[index]);
2187
2496
  }
2188
2497
  }
2189
-
2190
2498
  childRefs.current[index] = ref;
2191
2499
  };
2192
2500
  };
2193
-
2194
2501
  return {
2195
2502
  containerRef: containerRef,
2196
2503
  setChildRef: setChildRef
2197
2504
  };
2198
2505
  }
2199
2506
 
2200
- var styles$g = {"lightContentTextColor":"var(--theme-light-content-text-color, #fff)","contentLinkColor":"var(--content-link-color)","wrapper":"ImageGallery-module_wrapper__2H9en","wide":"ImageGallery-module_wide__xGLuJ","customMargin":"ImageGallery-module_customMargin__1VxM6","button":"ImageGallery-module_button__35bDf","leftButton":"ImageGallery-module_leftButton__3V-J6 ImageGallery-module_button__35bDf","rightButton":"ImageGallery-module_rightButton__ba0q5 ImageGallery-module_button__35bDf","items":"ImageGallery-module_items__1q4QG","item":"ImageGallery-module_item__iqvfP","current":"ImageGallery-module_current__2Mm11","figure":"ImageGallery-module_figure__3zkJb","placeholder":"ImageGallery-module_placeholder__39Vq4"};
2507
+ var styles$h = {"lightContentTextColor":"var(--theme-light-content-text-color, #fff)","wrapper":"ImageGallery-module_wrapper__2H9en","wide":"ImageGallery-module_wide__xGLuJ","customMargin":"ImageGallery-module_customMargin__1VxM6","clip":"ImageGallery-module_clip__f_FU4","full":"ImageGallery-module_full__Qu2GB","button":"ImageGallery-module_button__35bDf","leftButton":"ImageGallery-module_leftButton__3V-J6 ImageGallery-module_button__35bDf","rightButton":"ImageGallery-module_rightButton__ba0q5 ImageGallery-module_button__35bDf","paginationIndicator":"ImageGallery-module_paginationIndicator__2F5Y0","items":"ImageGallery-module_items__1q4QG","item":"ImageGallery-module_item__iqvfP","current":"ImageGallery-module_current__2Mm11","figure":"ImageGallery-module_figure__3zkJb","placeholder":"ImageGallery-module_placeholder__39Vq4"};
2201
2508
 
2509
+ var _excluded$5 = ["imageFile", "portraitImageFile"];
2202
2510
  function ImageGallery(_ref) {
2203
2511
  var configuration = _ref.configuration,
2204
- contentElementId = _ref.contentElementId,
2205
- contentElementWidth = _ref.contentElementWidth,
2206
- customMargin = _ref.customMargin;
2207
-
2512
+ contentElementId = _ref.contentElementId,
2513
+ contentElementWidth = _ref.contentElementWidth,
2514
+ customMargin = _ref.customMargin;
2208
2515
  var _useState = useState(-1),
2209
- _useState2 = _slicedToArray(_useState, 2),
2210
- visibleIndex = _useState2[0],
2211
- setVisibleIndex = _useState2[1];
2212
-
2516
+ _useState2 = _slicedToArray(_useState, 2),
2517
+ visibleIndex = _useState2[0],
2518
+ setVisibleIndex = _useState2[1];
2213
2519
  var isPhonePlatform = usePhonePlatform();
2214
2520
  return /*#__PURE__*/React.createElement(FullscreenViewer, {
2215
2521
  contentElementId: contentElementId,
2216
2522
  renderChildren: function renderChildren(_ref2) {
2217
2523
  var enterFullscreen = _ref2.enterFullscreen,
2218
- isFullscreen = _ref2.isFullscreen;
2219
- return /*#__PURE__*/React.createElement(Scroller, {
2524
+ isFullscreen = _ref2.isFullscreen;
2525
+ return /*#__PURE__*/React.createElement(Scroller$1, {
2220
2526
  customMargin: customMargin,
2221
2527
  configuration: configuration,
2222
2528
  contentElementWidth: contentElementWidth,
@@ -2229,7 +2535,7 @@ function ImageGallery(_ref) {
2229
2535
  },
2230
2536
  renderFullscreenChildren: function renderFullscreenChildren(_ref3) {
2231
2537
  var exitFullscreen = _ref3.exitFullscreen;
2232
- return /*#__PURE__*/React.createElement(Scroller, {
2538
+ return /*#__PURE__*/React.createElement(Scroller$1, {
2233
2539
  configuration: configuration,
2234
2540
  contentElementWidth: contentElementWidth,
2235
2541
  visibleIndex: visibleIndex,
@@ -2241,47 +2547,40 @@ function ImageGallery(_ref) {
2241
2547
  }
2242
2548
  });
2243
2549
  }
2244
-
2245
- function Scroller(_ref4) {
2550
+ function Scroller$1(_ref4) {
2246
2551
  var visibleIndex = _ref4.visibleIndex,
2247
- setVisibleIndex = _ref4.setVisibleIndex,
2248
- displayFullscreenToggle = _ref4.displayFullscreenToggle,
2249
- customMargin = _ref4.customMargin,
2250
- onFullscreenEnter = _ref4.onFullscreenEnter,
2251
- onFullscreenExit = _ref4.onFullscreenExit,
2252
- onBump = _ref4.onBump,
2253
- configuration = _ref4.configuration,
2254
- contentElementWidth = _ref4.contentElementWidth,
2255
- controlled = _ref4.controlled;
2552
+ setVisibleIndex = _ref4.setVisibleIndex,
2553
+ displayFullscreenToggle = _ref4.displayFullscreenToggle,
2554
+ customMargin = _ref4.customMargin,
2555
+ onFullscreenEnter = _ref4.onFullscreenEnter,
2556
+ onFullscreenExit = _ref4.onFullscreenExit,
2557
+ onBump = _ref4.onBump,
2558
+ configuration = _ref4.configuration,
2559
+ contentElementWidth = _ref4.contentElementWidth,
2560
+ controlled = _ref4.controlled;
2256
2561
  var lastVisibleIndex = useRef(null);
2257
-
2258
2562
  var _useContentElementEdi = useContentElementEditorState(),
2259
- isSelected = _useContentElementEdi.isSelected,
2260
- isEditable = _useContentElementEdi.isEditable;
2261
-
2563
+ isSelected = _useContentElementEdi.isSelected,
2564
+ isEditable = _useContentElementEdi.isEditable;
2262
2565
  var items = configuration.items || [];
2263
-
2264
2566
  if (!items.length && isEditable) {
2265
2567
  items = [{
2266
2568
  id: 1,
2267
2569
  placeholder: true
2268
2570
  }];
2269
2571
  }
2270
-
2271
2572
  var onVisibleIndexChange = useCallback(function (index) {
2272
2573
  if (!controlled) {
2273
2574
  lastVisibleIndex.current = index;
2274
2575
  setVisibleIndex(index);
2275
2576
  }
2276
2577
  }, [controlled, setVisibleIndex]);
2277
-
2278
2578
  var _useIntersectionObser = useIntersectionObserver({
2279
- onVisibleIndexChange: onVisibleIndexChange,
2280
- threshold: 0.7
2281
- }),
2282
- scrollerRef = _useIntersectionObser.containerRef,
2283
- setChildRef = _useIntersectionObser.setChildRef;
2284
-
2579
+ onVisibleIndexChange: onVisibleIndexChange,
2580
+ threshold: 0.7
2581
+ }),
2582
+ scrollerRef = _useIntersectionObser.containerRef,
2583
+ setChildRef = _useIntersectionObser.setChildRef;
2285
2584
  useEffect(function () {
2286
2585
  if (lastVisibleIndex.current !== visibleIndex && visibleIndex >= 0 && (controlled || lastVisibleIndex.current === null)) {
2287
2586
  lastVisibleIndex.current = visibleIndex;
@@ -2292,23 +2591,21 @@ function Scroller(_ref4) {
2292
2591
  scroller.style.scrollBehavior = null;
2293
2592
  }
2294
2593
  }, [visibleIndex, scrollerRef, controlled]);
2295
-
2296
2594
  function scrollBy(delta) {
2595
+ scrollTo(visibleIndex + delta);
2596
+ }
2597
+ function scrollTo(index) {
2297
2598
  var scroller = scrollerRef.current;
2298
- var child = scroller.children[visibleIndex + delta];
2299
-
2599
+ var child = scroller.children[index];
2300
2600
  if (child) {
2301
2601
  scrollerRef.current.scrollTo(child.offsetLeft - scroller.offsetLeft, 0);
2302
2602
  }
2303
2603
  }
2304
-
2305
2604
  function handleClick(event) {
2306
2605
  if (isEditable && !isSelected) {
2307
2606
  return;
2308
2607
  }
2309
-
2310
2608
  var rect = scrollerRef.current.getBoundingClientRect();
2311
-
2312
2609
  if ((event.pageX - rect.x) / rect.width < 0.5) {
2313
2610
  if (visibleIndex > 0) {
2314
2611
  scrollBy(-1);
@@ -2323,11 +2620,10 @@ function Scroller(_ref4) {
2323
2620
  }
2324
2621
  }
2325
2622
  }
2326
-
2327
2623
  return /*#__PURE__*/React.createElement("div", {
2328
- className: classNames(styles$g.wrapper, _defineProperty({}, styles$g.wide, contentElementWidth === contentElementWidths.lg || contentElementWidth === contentElementWidths.xl), _defineProperty({}, styles$g.customMargin, customMargin))
2624
+ className: classNames(styles$h.wrapper, _defineProperty({}, styles$h.wide, contentElementWidth === contentElementWidths.lg || contentElementWidth === contentElementWidths.xl), _defineProperty({}, styles$h.full, contentElementWidth === contentElementWidths.full), _defineProperty({}, styles$h.clip, configuration.hidePeeks), _defineProperty({}, styles$h.customMargin, customMargin))
2329
2625
  }, /*#__PURE__*/React.createElement("div", {
2330
- className: styles$g.leftButton
2626
+ className: styles$h.leftButton
2331
2627
  }, /*#__PURE__*/React.createElement(ScrollButton, {
2332
2628
  direction: "left",
2333
2629
  disabled: visibleIndex <= 0,
@@ -2335,7 +2631,7 @@ function Scroller(_ref4) {
2335
2631
  return scrollBy(-1);
2336
2632
  }
2337
2633
  })), /*#__PURE__*/React.createElement("div", {
2338
- className: styles$g.rightButton
2634
+ className: styles$h.rightButton
2339
2635
  }, /*#__PURE__*/React.createElement(ScrollButton, {
2340
2636
  direction: "right",
2341
2637
  disabled: visibleIndex >= items.length - 1,
@@ -2343,7 +2639,7 @@ function Scroller(_ref4) {
2343
2639
  return scrollBy(1);
2344
2640
  }
2345
2641
  })), /*#__PURE__*/React.createElement("div", {
2346
- className: styles$g.items,
2642
+ className: styles$h.items,
2347
2643
  ref: scrollerRef
2348
2644
  }, items.map(function (item, index) {
2349
2645
  return /*#__PURE__*/React.createElement(Item, {
@@ -2351,53 +2647,92 @@ function Scroller(_ref4) {
2351
2647
  ref: setChildRef(index),
2352
2648
  item: item,
2353
2649
  current: index === visibleIndex,
2354
- captions: configuration.captions || {},
2650
+ configuration: configuration,
2355
2651
  onClick: handleClick
2356
2652
  }, displayFullscreenToggle && /*#__PURE__*/React.createElement(ToggleFullscreenCornerButton, {
2357
2653
  isFullscreen: false,
2358
2654
  onEnter: onFullscreenEnter
2359
2655
  }));
2656
+ })), configuration.displayPaginationIndicator && /*#__PURE__*/React.createElement("div", {
2657
+ className: styles$h.paginationIndicator
2658
+ }, /*#__PURE__*/React.createElement(PaginationIndicator, {
2659
+ itemCount: items.length,
2660
+ currentIndex: visibleIndex,
2661
+ scrollerRef: scrollerRef,
2662
+ navAriaLabelTranslationKey: "pageflow_scrolled.public.image_gallery_pagination",
2663
+ itemAriaLabelTranslationKey: "pageflow_scrolled.public.go_to_image_gallery_item",
2664
+ onItemClick: function onItemClick(index) {
2665
+ return scrollTo(index);
2666
+ }
2360
2667
  })));
2361
2668
  }
2362
-
2363
2669
  var Item = forwardRef(function (_ref5, ref) {
2364
- var _classNames3;
2365
-
2366
2670
  var item = _ref5.item,
2367
- captions = _ref5.captions,
2368
- current = _ref5.current,
2369
- onClick = _ref5.onClick,
2370
- children = _ref5.children;
2371
- var updateConfiguration = useContentElementConfigurationUpdate();
2372
-
2373
- var _useContentElementLif = useContentElementLifecycle(),
2374
- shouldLoad = _useContentElementLif.shouldLoad;
2375
-
2376
- var caption = captions[item.id];
2671
+ configuration = _ref5.configuration,
2672
+ current = _ref5.current,
2673
+ onClick = _ref5.onClick,
2674
+ children = _ref5.children;
2377
2675
  var imageFile = useFileWithInlineRights({
2378
2676
  configuration: item,
2379
2677
  collectionName: 'imageFiles',
2380
2678
  propertyName: 'image'
2381
2679
  });
2382
-
2680
+ var portraitImageFile = useFileWithInlineRights({
2681
+ configuration: item,
2682
+ collectionName: 'imageFiles',
2683
+ propertyName: 'portraitImage'
2684
+ });
2685
+ var ItemImageComponent = portraitImageFile ? OrientationAwareItemImage : ItemImageWithCaption;
2686
+ return /*#__PURE__*/React.createElement("div", {
2687
+ className: classNames(styles$h.item, _defineProperty(_defineProperty({}, styles$h.current, current), styles$h.placeholder, item.placeholder)),
2688
+ ref: ref
2689
+ }, /*#__PURE__*/React.createElement("div", {
2690
+ className: styles$h.figure
2691
+ }, /*#__PURE__*/React.createElement(ItemImageComponent, {
2692
+ item: item,
2693
+ imageFile: imageFile,
2694
+ portraitImageFile: portraitImageFile,
2695
+ configuration: configuration,
2696
+ current: current,
2697
+ onClick: onClick,
2698
+ children: children
2699
+ })));
2700
+ });
2701
+ function OrientationAwareItemImage(_ref6) {
2702
+ var imageFile = _ref6.imageFile,
2703
+ portraitImageFile = _ref6.portraitImageFile,
2704
+ props = _objectWithoutProperties(_ref6, _excluded$5);
2705
+ var portraitOrientation = usePortraitOrientation();
2706
+ imageFile = portraitOrientation && portraitImageFile ? portraitImageFile : imageFile;
2707
+ return /*#__PURE__*/React.createElement(ItemImageWithCaption, Object.assign({
2708
+ imageFile: imageFile
2709
+ }, props));
2710
+ }
2711
+ function ItemImageWithCaption(_ref7) {
2712
+ var item = _ref7.item,
2713
+ imageFile = _ref7.imageFile,
2714
+ configuration = _ref7.configuration,
2715
+ current = _ref7.current,
2716
+ onClick = _ref7.onClick,
2717
+ children = _ref7.children;
2718
+ var _useContentElementLif = useContentElementLifecycle(),
2719
+ shouldLoad = _useContentElementLif.shouldLoad;
2720
+ var updateConfiguration = useContentElementConfigurationUpdate();
2721
+ var captions = configuration.captions || {};
2722
+ var caption = captions[item.id];
2383
2723
  var handleCaptionChange = function handleCaptionChange(caption) {
2384
2724
  updateConfiguration({
2385
2725
  captions: _objectSpread2(_objectSpread2({}, captions), {}, _defineProperty({}, item.id, caption))
2386
2726
  });
2387
2727
  };
2388
-
2389
- return /*#__PURE__*/React.createElement("div", {
2390
- className: classNames(styles$g.item, (_classNames3 = {}, _defineProperty(_classNames3, styles$g.current, current), _defineProperty(_classNames3, styles$g.placeholder, item.placeholder), _classNames3)),
2391
- ref: ref
2392
- }, /*#__PURE__*/React.createElement("div", {
2393
- className: styles$g.figure
2394
- }, /*#__PURE__*/React.createElement(FitViewport, {
2728
+ return /*#__PURE__*/React.createElement(FitViewport, {
2395
2729
  file: imageFile,
2396
2730
  aspectRatio: imageFile ? undefined : 0.75,
2397
2731
  scale: 0.8,
2398
2732
  opaque: !imageFile
2399
2733
  }, /*#__PURE__*/React.createElement(ContentElementBox, null, /*#__PURE__*/React.createElement(Figure, {
2400
2734
  caption: caption,
2735
+ variant: configuration.captionVariant,
2401
2736
  onCaptionChange: handleCaptionChange,
2402
2737
  addCaptionButtonVisible: current && !item.placeholder,
2403
2738
  addCaptionButtonPosition: "inside"
@@ -2407,22 +2742,61 @@ var Item = forwardRef(function (_ref5, ref) {
2407
2742
  imageFile: imageFile,
2408
2743
  load: shouldLoad
2409
2744
  })), children, /*#__PURE__*/React.createElement(InlineFileRights, {
2745
+ configuration: configuration,
2410
2746
  context: "insideElement",
2411
2747
  items: [{
2412
2748
  file: imageFile,
2413
2749
  label: 'image'
2414
2750
  }]
2415
2751
  })))), /*#__PURE__*/React.createElement(InlineFileRights, {
2752
+ configuration: configuration,
2416
2753
  context: "afterElement",
2417
2754
  items: [{
2418
2755
  file: imageFile,
2419
2756
  label: 'image'
2420
2757
  }]
2421
- }))));
2422
- });
2758
+ }));
2759
+ }
2423
2760
 
2424
2761
  frontend.contentElementTypes.register('imageGallery', {
2425
2762
  component: ImageGallery,
2426
2763
  lifecycle: true,
2427
2764
  customMargin: true
2428
2765
  });
2766
+
2767
+ var styles$i = {"breakpoint-md":"(min-width: 768px)","table":"InfoTable-module_table__3_afx","center":"InfoTable-module_center__2qGe6","labelColumnAlign-left":"InfoTable-module_labelColumnAlign-left__1k-J2","valueColumnAlign-left":"InfoTable-module_valueColumnAlign-left__3beY0","singleColumnAlign-left":"InfoTable-module_singleColumnAlign-left__27P3d","labelColumnAlign-center":"InfoTable-module_labelColumnAlign-center__3XIqd","valueColumnAlign-center":"InfoTable-module_valueColumnAlign-center__UUf8M","singleColumnAlign-center":"InfoTable-module_singleColumnAlign-center__3b_77","labelColumnAlign-right":"InfoTable-module_labelColumnAlign-right__3bm_l","valueColumnAlign-right":"InfoTable-module_valueColumnAlign-right__2PrQt","singleColumnAlign-right":"InfoTable-module_singleColumnAlign-right__194EU","selected":"InfoTable-module_selected__unFZr"};
2768
+
2769
+ function InfoTable(_ref) {
2770
+ var configuration = _ref.configuration,
2771
+ sectionProps = _ref.sectionProps;
2772
+ var _useContentElementEdi = useContentElementEditorState(),
2773
+ isSelected = _useContentElementEdi.isSelected;
2774
+ var updateConfiguration = useContentElementConfigurationUpdate();
2775
+ var _useI18n = useI18n({
2776
+ locale: 'ui'
2777
+ }),
2778
+ t = _useI18n.t;
2779
+ return /*#__PURE__*/React.createElement("div", {
2780
+ style: {
2781
+ '--label-color': paletteColor(configuration.labelColor),
2782
+ '--value-color': paletteColor(configuration.valueColor)
2783
+ }
2784
+ }, /*#__PURE__*/React.createElement(EditableTable, {
2785
+ className: classNames(styles$i.table, styles$i["labelColumnAlign-".concat(configuration.labelColumnAlign)], styles$i["valueColumnAlign-".concat(configuration.valueColumnAlign)], styles$i["singleColumnAlign-".concat(configuration.singleColumnAlign)], _defineProperty(_defineProperty({}, styles$i.selected, isSelected), styles$i.center, sectionProps.layout === 'centerRagged')),
2786
+ labelScaleCategory: "infoTableLabel",
2787
+ valueScaleCategory: "infoTableValue",
2788
+ labelPlaceholder: t('pageflow_scrolled.inline_editing.type_text'),
2789
+ valuePlaceholder: t('pageflow_scrolled.inline_editing.type_text'),
2790
+ value: configuration.value,
2791
+ stackedInPhoneLayout: configuration.singleColumnInPhoneLayout,
2792
+ onChange: function onChange(value) {
2793
+ return updateConfiguration({
2794
+ value: value
2795
+ });
2796
+ }
2797
+ }));
2798
+ }
2799
+
2800
+ frontend.contentElementTypes.register('infoTable', {
2801
+ component: InfoTable
2802
+ });