pageflow 17.0.5 → 17.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +342 -41
- data/README.md +3 -5
- data/admins/pageflow/accounts.rb +22 -20
- data/admins/pageflow/entry.rb +76 -26
- data/admins/pageflow/entry_templates.rb +10 -9
- data/admins/pageflow/folder.rb +1 -1
- data/admins/pageflow/membership.rb +15 -15
- data/admins/pageflow/revisions.rb +5 -5
- data/admins/pageflow/site_root_entry.rb +64 -0
- data/admins/pageflow/sites.rb +12 -3
- data/admins/pageflow/translations.rb +75 -0
- data/admins/pageflow/user.rb +21 -35
- data/app/assets/images/pageflow/admin/icons/comment.svg +1 -0
- data/app/assets/javascripts/pageflow/admin/entries.js +30 -5
- data/app/assets/javascripts/pageflow/dist/ui.js +4228 -900
- data/app/assets/javascripts/pageflow/editor/vendor.js +0 -1
- data/app/assets/javascripts/pageflow/ui.js +0 -1
- data/app/assets/stylesheets/pageflow/admin/entries/index_table.scss +2 -1
- data/app/assets/stylesheets/pageflow/admin/entry_comments_indicator.scss +45 -0
- data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +8 -0
- data/app/assets/stylesheets/pageflow/admin.scss +1 -0
- data/app/assets/stylesheets/pageflow/animations/spin.scss +9 -0
- data/app/assets/stylesheets/pageflow/animations.scss +1 -0
- data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +27 -5
- data/app/assets/stylesheets/pageflow/editor/base.scss +11 -1
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +20 -2
- data/app/assets/stylesheets/pageflow/editor/edit_configuration_view.scss +5 -0
- data/app/assets/stylesheets/pageflow/editor/file_folders.scss +127 -0
- data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +5 -2
- data/app/assets/stylesheets/pageflow/editor/file_meta_data_overlay.scss +45 -0
- data/app/assets/stylesheets/pageflow/editor/file_preview.scss +138 -0
- data/app/assets/stylesheets/pageflow/editor/file_references.scss +68 -0
- data/app/assets/stylesheets/pageflow/editor/file_settings_dialog.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/file_stage_icons.scss +17 -0
- data/app/assets/stylesheets/pageflow/editor/file_stages.scss +25 -32
- data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +31 -48
- data/app/assets/stylesheets/pageflow/editor/file_type_pills.scss +73 -0
- data/app/assets/stylesheets/pageflow/editor/files.scss +242 -50
- data/app/assets/stylesheets/pageflow/editor/filtered_files.scss +161 -9
- data/app/assets/stylesheets/pageflow/editor/folder_breadcrumb.scss +40 -0
- data/app/assets/stylesheets/pageflow/editor/info_box.scss +23 -3
- data/app/assets/stylesheets/pageflow/editor/inputs/edit_defaults_button.scss +15 -0
- data/app/assets/stylesheets/pageflow/editor/inputs.scss +1 -0
- data/app/assets/stylesheets/pageflow/editor/list.scss +89 -37
- data/app/assets/stylesheets/pageflow/editor/list_search_field.scss +52 -0
- data/app/assets/stylesheets/pageflow/editor/manage_files.scss +9 -0
- data/app/assets/stylesheets/pageflow/editor/menu.scss +14 -0
- data/app/assets/stylesheets/pageflow/editor/move_to_folder_dialog.scss +83 -0
- data/app/assets/stylesheets/pageflow/editor/outline.scss +0 -13
- data/app/assets/stylesheets/pageflow/editor/sortable.scss +12 -0
- data/app/assets/stylesheets/pageflow/mixins/buttons.scss +4 -4
- data/app/assets/stylesheets/pageflow/mixins/pageflow.scss +9 -5
- data/app/assets/stylesheets/pageflow/ui/color_picker.scss +230 -0
- data/app/assets/stylesheets/pageflow/ui/forms.scss +38 -4
- data/app/assets/stylesheets/pageflow/ui/functions.scss +12 -2
- data/app/assets/stylesheets/pageflow/ui/input/color_input.scss +9 -8
- data/app/assets/stylesheets/pageflow/ui/input/file_name_input.scss +37 -0
- data/app/assets/stylesheets/pageflow/ui/input/text_area_input.scss +15 -0
- data/app/assets/stylesheets/pageflow/ui/overrides.scss +8 -0
- data/app/assets/stylesheets/pageflow/ui/properties.scss +34 -0
- data/app/assets/stylesheets/pageflow/ui/tabs_view.scss +8 -3
- data/app/assets/stylesheets/pageflow/ui.scss +4 -1
- data/app/controllers/concerns/pageflow/controller_delegation.rb +1 -1
- data/app/controllers/concerns/pageflow/edit_locking.rb +17 -10
- data/app/controllers/concerns/pageflow/entry_password_protection.rb +1 -0
- data/app/controllers/concerns/pageflow/public_https_mode.rb +2 -1
- data/app/controllers/concerns/pageflow/quota_verification.rb +5 -4
- data/app/controllers/pageflow/admin/initial_passwords_controller.rb +1 -0
- data/app/controllers/pageflow/application_controller.rb +19 -19
- data/app/controllers/pageflow/chapters_controller.rb +3 -2
- data/app/controllers/pageflow/edit_locks_controller.rb +3 -2
- data/app/controllers/pageflow/editor/encoding_confirmations_controller.rb +1 -0
- data/app/controllers/pageflow/editor/entries_controller.rb +3 -1
- data/app/controllers/pageflow/editor/entry_publications_controller.rb +1 -0
- data/app/controllers/pageflow/editor/file_folders_controller.rb +80 -0
- data/app/controllers/pageflow/editor/file_import_controller.rb +4 -3
- data/app/controllers/pageflow/editor/files_controller.rb +20 -10
- data/app/controllers/pageflow/editor/oembeds_controller.rb +21 -0
- data/app/controllers/pageflow/editor/widgets_controller.rb +1 -0
- data/app/controllers/pageflow/entries_controller.rb +85 -21
- data/app/controllers/pageflow/feeds_controller.rb +1 -1
- data/app/controllers/pageflow/files_controller.rb +1 -0
- data/app/controllers/pageflow/pages_controller.rb +4 -2
- data/app/controllers/pageflow/review/comment_thread_reads_controller.rb +30 -0
- data/app/controllers/pageflow/review/comment_threads_controller.rb +60 -0
- data/app/controllers/pageflow/review/comments_controller.rb +53 -0
- data/app/controllers/pageflow/revisions_controller.rb +5 -1
- data/app/controllers/pageflow/sitemaps_controller.rb +1 -1
- data/app/controllers/pageflow/storylines_controller.rb +1 -0
- data/app/helpers/pageflow/admin/cutoff_modes_helper.rb +12 -0
- data/app/helpers/pageflow/admin/entries_helper.rb +41 -1
- data/app/helpers/pageflow/admin/entry_translations_helper.rb +18 -0
- data/app/helpers/pageflow/admin/features_helper.rb +1 -1
- data/app/helpers/pageflow/admin/form_helper.rb +3 -3
- data/app/helpers/pageflow/admin/locales_helper.rb +10 -2
- data/app/helpers/pageflow/admin/memberships_helper.rb +32 -32
- data/app/helpers/pageflow/admin/revisions_helper.rb +1 -1
- data/app/helpers/pageflow/admin/sites_helper.rb +22 -0
- data/app/helpers/pageflow/admin/users_helper.rb +7 -5
- data/app/helpers/pageflow/admin/widgets_helper.rb +5 -5
- data/app/helpers/pageflow/asset_urls_helper.rb +1 -1
- data/app/helpers/pageflow/audio_files_helper.rb +5 -2
- data/app/helpers/pageflow/background_image_helper.rb +7 -6
- data/app/helpers/pageflow/common_entry_seed_helper.rb +7 -7
- data/app/helpers/pageflow/editor/config_helper.rb +3 -1
- data/app/helpers/pageflow/editor/files_helper.rb +1 -1
- data/app/helpers/pageflow/embed_code_helper.rb +3 -3
- data/app/helpers/pageflow/entries_helper.rb +52 -46
- data/app/helpers/pageflow/entry_json_seed_helper.rb +7 -6
- data/app/helpers/pageflow/feeds_helper.rb +2 -2
- data/app/helpers/pageflow/file_background_images_helper.rb +2 -2
- data/app/helpers/pageflow/file_thumbnails_helper.rb +4 -3
- data/app/helpers/pageflow/files_helper.rb +5 -4
- data/app/helpers/pageflow/folders_helper.rb +8 -5
- data/app/helpers/pageflow/help_entries_helper.rb +2 -2
- data/app/helpers/pageflow/hreflang_links_helper.rb +37 -0
- data/app/helpers/pageflow/info_box_helper.rb +7 -11
- data/app/helpers/pageflow/media_query_helper.rb +3 -3
- data/app/helpers/pageflow/navigation_bar_helper.rb +1 -1
- data/app/helpers/pageflow/overview_helper.rb +1 -1
- data/app/helpers/pageflow/page_types_helper.rb +5 -5
- data/app/helpers/pageflow/pages_helper.rb +29 -15
- data/app/helpers/pageflow/public_i18n_helper.rb +10 -9
- data/app/helpers/pageflow/quota_helper.rb +4 -4
- data/app/helpers/pageflow/render_json_helper.rb +6 -3
- data/app/helpers/pageflow/revision_file_helper.rb +2 -1
- data/app/helpers/pageflow/sites_helper.rb +3 -3
- data/app/helpers/pageflow/social_share_helper.rb +24 -10
- data/app/helpers/pageflow/social_share_links_helper.rb +12 -9
- data/app/helpers/pageflow/structured_data_helper.rb +5 -2
- data/app/helpers/pageflow/stub_page_configuration.rb +7 -3
- data/app/helpers/pageflow/text_direction_helper.rb +1 -1
- data/app/helpers/pageflow/themes_helper.rb +2 -4
- data/app/helpers/pageflow/video_files_helper.rb +29 -13
- data/app/helpers/pageflow/widgets_helper.rb +8 -6
- data/app/inputs/pageflow_permalink_input.rb +8 -3
- data/app/jobs/pageflow/application_job.rb +1 -0
- data/app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb +1 -1
- data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +1 -0
- data/app/jobs/pageflow/poll_zencoder_job.rb +3 -2
- data/app/jobs/pageflow/process_image_or_text_track_job.rb +1 -0
- data/app/jobs/pageflow/prune_auto_snapshots_job.rb +1 -0
- data/app/jobs/pageflow/request_meta_data_from_zencoder_job.rb +1 -0
- data/app/jobs/pageflow/submit_file_to_zencoder_job.rb +1 -0
- data/app/mailers/pageflow/user_mailer.rb +1 -0
- data/app/models/concerns/pageflow/auto_generated_perma_id.rb +20 -1
- data/app/models/concerns/pageflow/entry_publication_states.rb +7 -3
- data/app/models/concerns/pageflow/feature_target.rb +8 -4
- data/app/models/concerns/pageflow/output_source.rb +3 -3
- data/app/models/concerns/pageflow/permalinkable.rb +2 -1
- data/app/models/concerns/pageflow/reusable_file.rb +24 -24
- data/app/models/concerns/pageflow/serialization_blacklist.rb +3 -5
- data/app/models/concerns/pageflow/suspendable.rb +5 -3
- data/app/models/concerns/pageflow/theme_referencer.rb +1 -1
- data/app/models/concerns/pageflow/translatable.rb +62 -0
- data/app/models/concerns/pageflow/translated_attributes.rb +101 -0
- data/app/models/concerns/pageflow/uploadable_file.rb +6 -6
- data/app/models/pageflow/account.rb +6 -5
- data/app/models/pageflow/account_member_query.rb +1 -1
- data/app/models/pageflow/account_role_query.rb +1 -1
- data/app/models/pageflow/application_query.rb +1 -1
- data/app/models/pageflow/application_record.rb +1 -1
- data/app/models/pageflow/audio_file.rb +4 -4
- data/app/models/pageflow/audio_file_url_templates.rb +1 -1
- data/app/models/pageflow/authentication_token.rb +2 -2
- data/app/models/pageflow/chapter.rb +6 -1
- data/app/models/pageflow/chapter_scaffold.rb +2 -4
- data/app/models/pageflow/cname_site_request_scope.rb +1 -1
- data/app/models/pageflow/comment.rb +30 -0
- data/app/models/pageflow/comment_thread.rb +65 -0
- data/app/models/pageflow/comment_thread_read.rb +22 -0
- data/app/models/pageflow/customized_theme.rb +9 -8
- data/app/models/pageflow/draft_entry.rb +49 -9
- data/app/models/pageflow/edit_lock.rb +19 -21
- data/app/models/pageflow/encoding_confirmation.rb +2 -2
- data/app/models/pageflow/entries_feed.rb +2 -2
- data/app/models/pageflow/entry.rb +46 -30
- data/app/models/pageflow/entry_at_revision.rb +14 -2
- data/app/models/pageflow/entry_comment_summary.rb +114 -0
- data/app/models/pageflow/entry_duplicate.rb +8 -5
- data/app/models/pageflow/entry_publication.rb +2 -2
- data/app/models/pageflow/entry_role_query.rb +4 -4
- data/app/models/pageflow/entry_template.rb +4 -4
- data/app/models/pageflow/entry_title_or_account_name_query.rb +2 -2
- data/app/models/pageflow/entry_translation_group.rb +42 -0
- data/app/models/pageflow/file_folder.rb +74 -0
- data/app/models/pageflow/file_reuse.rb +5 -4
- data/app/models/pageflow/file_usage.rb +18 -3
- data/app/models/pageflow/folder.rb +2 -2
- data/app/models/pageflow/home_button.rb +7 -7
- data/app/models/pageflow/image_file.rb +44 -25
- data/app/models/pageflow/image_file_url_templates.rb +4 -4
- data/app/models/pageflow/invitation_form.rb +2 -1
- data/app/models/pageflow/legal_info.rb +38 -0
- data/app/models/pageflow/managed_user_query.rb +1 -1
- data/app/models/pageflow/membership.rb +5 -5
- data/app/models/pageflow/nested_revision_component_copy.rb +263 -0
- data/app/models/pageflow/null_user.rb +1 -1
- data/app/models/pageflow/overview_button.rb +1 -1
- data/app/models/pageflow/page.rb +7 -3
- data/app/models/pageflow/permalink.rb +24 -2
- data/app/models/pageflow/permalink_directory.rb +7 -0
- data/app/models/pageflow/permalink_redirect.rb +7 -0
- data/app/models/pageflow/positioned_file.rb +5 -5
- data/app/models/pageflow/potential_entry_translations.rb +55 -0
- data/app/models/pageflow/potential_memberships.rb +5 -4
- data/app/models/pageflow/published_entry.rb +62 -11
- data/app/models/pageflow/revision.rb +29 -16
- data/app/models/pageflow/roles.rb +14 -18
- data/app/models/pageflow/site.rb +46 -3
- data/app/models/pageflow/site_root_entry_form.rb +27 -0
- data/app/models/pageflow/sitemaps.rb +10 -1
- data/app/models/pageflow/storyline.rb +5 -2
- data/app/models/pageflow/storyline_scaffold.rb +1 -1
- data/app/models/pageflow/text_track_file.rb +1 -1
- data/app/models/pageflow/text_track_file_url_templates.rb +1 -1
- data/app/models/pageflow/theme_customization_file.rb +3 -2
- data/app/models/pageflow/thumbnail_file_resolver.rb +1 -1
- data/app/models/pageflow/url_template.rb +1 -1
- data/app/models/pageflow/used_file.rb +13 -3
- data/app/models/pageflow/user_name_query.rb +2 -2
- data/app/models/pageflow/video_file.rb +22 -15
- data/app/models/pageflow/video_file_url_templates.rb +6 -4
- data/app/models/pageflow/widget.rb +5 -4
- data/app/models/pageflow/with_file_usage_extension.rb +1 -1
- data/app/models/pageflow/zencoder_attachment.rb +8 -8
- data/app/policies/pageflow/account_policy.rb +3 -1
- data/app/policies/pageflow/admin/admin_only_tab_policy.rb +1 -0
- data/app/policies/pageflow/admin/entry_tab_policy.rb +1 -0
- data/app/policies/pageflow/application_policy.rb +2 -0
- data/app/policies/pageflow/entry_policy.rb +7 -1
- data/app/policies/pageflow/entry_template_policy.rb +2 -1
- data/app/policies/pageflow/file_policy.rb +4 -7
- data/app/policies/pageflow/folder_policy.rb +18 -8
- data/app/policies/pageflow/membership_policy.rb +6 -4
- data/app/policies/pageflow/site_policy.rb +10 -3
- data/app/policies/pageflow/user_policy.rb +6 -4
- data/app/state_machines/pageflow/image_and_text_track_processing_state_machine.rb +3 -2
- data/app/state_machines/pageflow/media_encoding_state_machine.rb +5 -4
- data/app/views/admin/accounts/_entry_template_details.html.arb +2 -2
- data/app/views/admin/entries/_attributes_table.html.arb +6 -5
- data/app/views/admin/entries/_form.html.erb +2 -1
- data/app/views/admin/entries/_permalink_inputs.html.erb +9 -2
- data/app/views/admin/entry_templates/_form.html.erb +1 -3
- data/app/views/admin/site_root_entry/choose.html.erb +19 -0
- data/app/views/admin/sites/_fields.html.erb +14 -1
- data/app/views/admin/translations/_form.html.erb +31 -0
- data/app/views/admin/users/_attributes_table.html.arb +13 -0
- data/app/views/components/pageflow/admin/add_membership_button.rb +13 -12
- data/app/views/components/pageflow/admin/custom_scopes_renderer.rb +1 -0
- data/app/views/components/pageflow/admin/embed_code_field.rb +1 -0
- data/app/views/components/pageflow/admin/embedded_index_table.rb +9 -10
- data/app/views/components/pageflow/admin/entries_tab.rb +1 -0
- data/app/views/components/pageflow/admin/entry_publication_state_indicator.rb +6 -5
- data/app/views/components/pageflow/admin/entry_templates_tab.rb +2 -1
- data/app/views/components/pageflow/admin/entry_translations_tab.rb +102 -0
- data/app/views/components/pageflow/admin/entry_user_badge_list.rb +1 -0
- data/app/views/components/pageflow/admin/extensible_attributes_table.rb +9 -8
- data/app/views/components/pageflow/admin/features_tab.rb +1 -0
- data/app/views/components/pageflow/admin/grouped_folder_list.rb +1 -0
- data/app/views/components/pageflow/admin/icon_link_to.rb +1 -0
- data/app/views/components/pageflow/admin/members_tab.rb +4 -3
- data/app/views/components/pageflow/admin/membership_role_with_tooltip.rb +3 -2
- data/app/views/components/pageflow/admin/revisions_tab.rb +14 -10
- data/app/views/components/pageflow/admin/sites_tab.rb +1 -0
- data/app/views/components/pageflow/admin/tabs_view.rb +1 -0
- data/app/views/components/pageflow/admin/timestamp.rb +6 -5
- data/app/views/components/pageflow/admin/user_account_badge_list.rb +2 -3
- data/app/views/components/pageflow/admin/user_accounts_tab.rb +1 -0
- data/app/views/components/pageflow/admin/user_entries_tab.rb +1 -0
- data/app/views/components/pageflow/admin/users_tab.rb +1 -0
- data/app/views/pageflow/audio_files/_audio_file.json.jbuilder +0 -1
- data/app/views/pageflow/editor/config/_seeds.json.jbuilder +5 -3
- data/app/views/pageflow/editor/entries/_entry.json.jbuilder +2 -1
- data/app/views/pageflow/editor/entries/index.json.jbuilder +1 -1
- data/app/views/pageflow/editor/entries/seed.json.erb +1 -0
- data/app/views/pageflow/editor/entries/show.json.jbuilder +1 -1
- data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +2 -2
- data/app/views/pageflow/editor/file_folders/_file_folder.json.jbuilder +5 -0
- data/app/views/pageflow/editor/file_folders/create.json.jbuilder +1 -0
- data/app/views/pageflow/editor/file_folders/index.json.jbuilder +3 -0
- data/app/views/pageflow/editor/files/_file.json.jbuilder +7 -14
- data/app/views/pageflow/editor/files/create.json.jbuilder +1 -1
- data/app/views/pageflow/editor/files/index.json.jbuilder +1 -1
- data/app/views/pageflow/editor/image_files/_image_file.json.jbuilder +3 -0
- data/app/views/pageflow/editor/sites/_site.json.jbuilder +1 -0
- data/app/views/pageflow/editor/video_files/_video_file.json.jbuilder +4 -3
- data/app/views/pageflow/entries/share_menu/_bluesky_link.html.erb +8 -0
- data/app/views/pageflow/entries/share_menu/_threads_link.html.erb +8 -0
- data/app/views/pageflow/files/_file.json.jbuilder +5 -3
- data/app/views/pageflow/image_files/_image_file.json.jbuilder +0 -1
- data/app/views/pageflow/review/comment_threads/_comment_thread.json.jbuilder +20 -0
- data/app/views/pageflow/review/comment_threads/create.json.jbuilder +2 -0
- data/app/views/pageflow/review/comment_threads/index.json.jbuilder +13 -0
- data/app/views/pageflow/review/comments/_comment.json.jbuilder +13 -0
- data/app/views/pageflow/review/comments/create.json.jbuilder +1 -0
- data/app/views/pageflow/sitemaps/index.xml.builder +9 -1
- data/app/views/pageflow/social_share/_entry_meta_tags.html.erb +1 -1
- data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
- data/app/views/pageflow/structured_data/_entry.json.jbuilder +2 -3
- data/app/views/pageflow/video_files/_video_file.json.jbuilder +0 -1
- data/config/initializers/active_admin_patches.rb +3 -6
- data/config/initializers/admin_resource_tabs.rb +3 -0
- data/config/initializers/paperclip.rb +1 -0
- data/config/initializers/symmetric_encryption.rb +1 -1
- data/config/initializers/zencoder.rb +24 -13
- data/config/locales/de.yml +256 -12
- data/config/locales/en.yml +253 -15
- data/config/routes.rb +29 -13
- data/config/spring.rb +2 -1
- data/db/migrate/20140418225525_setup_schema.rb +2 -2
- data/db/migrate/20190306161431_copy_file_attributes_of_failed_uploads.rb +2 -2
- data/db/migrate/20190820152900_drop_accounts_themes.rb +2 -1
- data/db/migrate/20191202145757_create_pageflow_scrolled_sections.rb +11 -11
- data/db/migrate/20191202150657_create_pageflow_scrolled_chapters.rb +1 -1
- data/db/migrate/20191202154723_create_pageflow_scrolled_content_elements.rb +9 -9
- data/db/migrate/20191219143450_add_position_to_content_elements.rb +2 -1
- data/db/migrate/20200117133200_change_revision_appearance_option_default_and_null.rb +2 -1
- data/db/migrate/20200122115400_create_pageflow_entry_templates.rb +25 -25
- data/db/migrate/20200206134400_convert_legacy_scrolled_content_element_types.rb +3 -3
- data/db/migrate/20221215120856_associate_entry_templates_with_sites.rb +2 -2
- data/db/migrate/20230120092923_create_other_files.rb +2 -1
- data/db/migrate/20230419083307_create_pageflow_entry_translation_group.rb +9 -0
- data/db/migrate/20240612110434_add_cutoff_mode_name_to_sites.rb +5 -0
- data/db/migrate/20240918084059_create_pageflow_permalink_redirects.rb +14 -0
- data/db/migrate/20250508172234_ensure_scrolled_entries_have_main_storyline.rb +14 -0
- data/db/migrate/20250617090048_add_custom404_entry_to_sites.rb +5 -0
- data/db/migrate/20250617100000_add_perma_id_counter_to_entries.rb +28 -0
- data/db/migrate/20250722174123_add_perma_id_to_chapters.rb +10 -0
- data/db/migrate/20250725080603_add_perma_id_indexes_to_revision_components.rb +13 -0
- data/db/migrate/20250726000000_add_display_name_to_file_usages.rb +5 -0
- data/db/migrate/20251015000000_add_structured_data_type_name_to_revisions.rb +5 -0
- data/db/migrate/20251029142849_convert_legacy_social_embeds_to_unified_social_embed.rb +38 -0
- data/db/migrate/20251119083347_fix_main_storyline_positions.rb +16 -0
- data/db/migrate/20251119083348_ensure_scrolled_entries_have_excursion_storyline.rb +15 -0
- data/db/migrate/20260303000000_add_layout_version_to_revisions.rb +6 -0
- data/db/migrate/20260323000000_create_comment_threads_and_comments.rb +30 -0
- data/db/migrate/20260414000000_add_subject_range_to_comment_threads.rb +5 -0
- data/db/migrate/20260415000000_add_section_perma_id_to_comment_threads.rb +5 -0
- data/db/migrate/20260727000000_add_quote_to_comments.rb +5 -0
- data/db/migrate/20260728000000_create_file_folders.rb +17 -0
- data/db/migrate/20260805000000_add_attribute_translations_to_sites.rb +5 -0
- data/db/migrate/20260806000000_add_edited_at_to_comments.rb +5 -0
- data/db/migrate/20260810000000_create_pageflow_scrolled_lottie_files.rb +24 -0
- data/db/migrate/20260817000000_create_comment_thread_reads.rb +16 -0
- data/db/migrate/20260819000000_add_unread_comments_since_at_to_users.rb +18 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +12599 -5398
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +1275 -4560
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +20204 -22
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +18657 -19
- data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -0
- data/entry_types/paged/app/helpers/pageflow_paged/page_background_asset_helper.rb +1 -1
- data/entry_types/paged/app/helpers/pageflow_paged/third_party_embed_consent_helper.rb +7 -7
- data/entry_types/paged/app/views/pageflow_paged/editor/entries/_seed.json.jbuilder +1 -0
- data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
- data/entry_types/paged/lib/pageflow_paged/plugin.rb +4 -0
- data/entry_types/paged/lib/pageflow_paged/react/page_type.rb +1 -1
- data/entry_types/paged/lib/pageflow_paged/react/widget_type.rb +3 -3
- data/entry_types/paged/lib/pageflow_paged.rb +1 -1
- data/entry_types/scrolled/app/assets/stylesheets/pageflow_scrolled/ui.scss +2 -0
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +5 -3
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +35 -5
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +4 -5
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +23 -2
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +3 -3
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +8 -5
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +7 -3
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +72 -10
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/i18n_helper.rb +28 -13
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +41 -12
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +23 -25
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/sprockets_helper.rb +16 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +189 -3
- data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +15 -14
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +61 -7
- data/entry_types/scrolled/app/models/pageflow_scrolled/lottie_file.rb +6 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/lottie_file_url_templates.rb +16 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +12 -1
- data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +20 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +2 -2
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +15 -12
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +45 -17
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry_translations.json.jbuilder +14 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +34 -5
- data/entry_types/scrolled/app/views/pageflow_scrolled/favicons/_entry.html.erb +1 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/storylines/_storyline.json.jbuilder +7 -0
- data/entry_types/scrolled/config/configuration_schemas/pageflow-scrolled.json +414 -0
- data/entry_types/scrolled/config/locales/de.yml +1094 -78
- data/entry_types/scrolled/config/locales/en.yml +1083 -78
- data/entry_types/scrolled/config/routes.rb +18 -8
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +11 -11
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDarkVariantDesktop.svg +56 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDarkVariantMobile.svg +22 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -11
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +27 -8
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +2 -2
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_theme_assets.rb +27 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +67 -10
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration_schemas.rb +91 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +1 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +2 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/entry_file_reference_locations.rb +71 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/entry_structured_data_types/faq_page.rb +58 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/file_reference_locations.rb +69 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +222 -19
- data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +2 -4
- data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +76 -54
- data/entry_types/scrolled/lib/pageflow_scrolled/theme_options_default_scale.rb +35 -0
- data/entry_types/scrolled/lib/pageflow_scrolled.rb +14 -1
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +24 -5
- data/entry_types/scrolled/package/config/configurationSchemas.js +70 -0
- data/entry_types/scrolled/package/config/rollup/configurationSchemas.js +19 -0
- data/entry_types/scrolled/package/config/webpack.js +94 -0
- data/entry_types/scrolled/package/contentElements/hotspots-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/hotspots-frontend.js +1795 -0
- data/entry_types/scrolled/package/contentElements/inlineBeforeAfter-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/inlineBeforeAfter-frontend.js +219 -0
- data/entry_types/scrolled/package/contentElements/lottieAnimation-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/lottieAnimation-frontend.js +244 -0
- data/entry_types/scrolled/package/contentElements/socialEmbed-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/socialEmbed-frontend.js +823 -0
- data/entry_types/scrolled/package/contentElements/tikTokEmbed-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/tikTokEmbed-frontend.js +109 -0
- data/entry_types/scrolled/package/contentElements/twitterEmbed-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/twitterEmbed-frontend.js +277 -0
- data/entry_types/scrolled/package/contentElements/videoEmbed-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/videoEmbed-frontend.js +244 -0
- data/entry_types/scrolled/package/contentElements-editor.js +3155 -583
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +3375 -1585
- data/entry_types/scrolled/package/editor.css +1 -0
- data/entry_types/scrolled/package/editor.js +8452 -2867
- data/entry_types/scrolled/package/entryState.js +1600 -0
- data/entry_types/scrolled/package/frontend/FloatingPortalRootProvider-20c600de.js +1979 -0
- data/entry_types/scrolled/package/frontend/FloatingPortalRootProvider-58189220.js +2538 -0
- data/entry_types/scrolled/package/frontend/{PhonePlatformContext-4ec6b2de.js → PhonePlatformContext-035a99fa.js} +9 -15
- data/entry_types/scrolled/package/frontend/PhonePlatformContext-9da43797.js +33 -0
- data/entry_types/scrolled/package/frontend/Placeholder.module-bf0966b4.js +5267 -0
- data/entry_types/scrolled/package/frontend/Placeholder.module-d22a9335.js +4180 -0
- data/entry_types/scrolled/package/frontend/ThemeIcon-ab834849.js +754 -0
- data/entry_types/scrolled/package/frontend/ThemeIcon-f6cb3a8f.js +773 -0
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-30fd1124.js +39 -0
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-61c25224.js +72 -0
- data/entry_types/scrolled/package/frontend/Viewer-1074fd59.js +147 -0
- data/entry_types/scrolled/package/frontend/Viewer-1482ca34.js +480 -0
- data/entry_types/scrolled/package/frontend/Viewer-70504231.js +210 -0
- data/entry_types/scrolled/package/frontend/{Viewer-1bb5597c.js → Viewer-cc8d4072.js} +100 -135
- data/entry_types/scrolled/package/frontend/Wavesurfer-656e3c36.js +302 -0
- data/entry_types/scrolled/package/frontend/Wavesurfer-b753b838.js +385 -0
- data/entry_types/scrolled/package/frontend/commenting.css +1 -0
- data/entry_types/scrolled/package/frontend/extensions-167ae143.js +1455 -0
- data/entry_types/scrolled/package/frontend/extensions-2318f92b.js +5918 -0
- data/entry_types/scrolled/package/frontend/extensions-a461fd13.js +4890 -0
- data/entry_types/scrolled/package/frontend/extensions-c98269fd.js +1982 -0
- data/entry_types/scrolled/package/frontend/i18n-493cd2a6.js +93 -0
- data/entry_types/scrolled/package/frontend/i18n-e06cac14.js +100 -0
- data/entry_types/scrolled/package/frontend/{index-11f32f10.js → index-2e5546f7.js} +39 -54
- data/entry_types/scrolled/package/frontend/index-de2b418d.js +130 -0
- data/entry_types/scrolled/package/frontend/index.css +1 -1
- data/entry_types/scrolled/package/frontend/index.js +1976 -1367
- data/entry_types/scrolled/package/frontend/inlineEditing.css +1 -0
- data/entry_types/scrolled/package/frontend/useContentElementEditorState-a084912e.js +25 -0
- data/entry_types/scrolled/package/frontend/useDelayedBoolean-a387d85b.js +24 -0
- data/entry_types/scrolled/package/frontend/usePhonePlatform-4ecb96d4.js +8 -0
- data/entry_types/scrolled/package/frontend/usePhonePlatform-ce9ff08d.js +8 -0
- data/entry_types/scrolled/package/frontend-server.js +20 -210
- data/entry_types/scrolled/package/package.json +22 -12
- data/entry_types/scrolled/package/review.css +1 -0
- data/entry_types/scrolled/package/review.js +3306 -0
- data/entry_types/scrolled/package/testHelpers.js +952 -239
- data/entry_types/scrolled/package/values/widgets.module.css +18 -0
- data/entry_types/scrolled/package/widgets/consentBar.css +1 -1
- data/entry_types/scrolled/package/widgets/consentBar.js +275 -315
- data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
- data/entry_types/scrolled/package/widgets/defaultNavigation.js +961 -432
- data/entry_types/scrolled/package/widgets/excursionSheet.css +1 -0
- data/entry_types/scrolled/package/widgets/excursionSheet.js +225 -0
- data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -1
- data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +62 -32
- data/entry_types/scrolled/package/widgets/iconScrollIndicator.css +1 -0
- data/entry_types/scrolled/package/widgets/iconScrollIndicator.js +67 -0
- data/entry_types/scrolled/package/widgets/mainStorylineSheet.css +1 -0
- data/entry_types/scrolled/package/widgets/mainStorylineSheet.js +100 -0
- data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -1
- data/entry_types/scrolled/package/widgets/textInlineFileRights.js +48 -26
- data/entry_types/scrolled/package/widgets-server.js +2 -0
- data/entry_types/scrolled/spec/factories/chapters.rb +14 -1
- data/entry_types/scrolled/spec/factories/content_elements.rb +1 -1
- data/entry_types/scrolled/spec/factories/lottie_files.rb +29 -0
- data/entry_types/scrolled/spec/fixtures/animation.lottie +0 -0
- data/entry_types/scrolled/spec/fixtures/font.woff +0 -0
- data/entry_types/scrolled/spec/fixtures/font.woff2 +0 -0
- data/lib/generators/pageflow/active_admin_initializer/active_admin_initializer_generator.rb +5 -3
- data/lib/generators/pageflow/assets/assets_generator.rb +7 -5
- data/lib/generators/pageflow/cancan/cancan_generator.rb +2 -1
- data/lib/generators/pageflow/cancan/templates/ability.rb +1 -1
- data/lib/generators/pageflow/error_pages/error_pages_generator.rb +2 -1
- data/lib/generators/pageflow/initializer/initializer_generator.rb +3 -2
- data/lib/generators/pageflow/install/install_generator.rb +2 -2
- data/lib/generators/pageflow/procfile/procfile_generator.rb +2 -1
- data/lib/generators/pageflow/resque/resque_generator.rb +4 -4
- data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
- data/lib/generators/pageflow/routes/routes_generator.rb +4 -2
- data/lib/generators/pageflow/seeds/seeds_generator.rb +3 -2
- data/lib/generators/pageflow/seeds/templates/seeds.rb +6 -6
- data/lib/generators/pageflow/theme/theme_generator.rb +2 -1
- data/lib/generators/pageflow/user/user_generator.rb +2 -1
- data/lib/pageflow/ability_mixin.rb +25 -15
- data/lib/pageflow/active_admin_patches/views/attributes_table.rb +1 -0
- data/lib/pageflow/active_admin_patches/views/pages/base.rb +3 -2
- data/lib/pageflow/active_admin_patches/views/table_for.rb +1 -0
- data/lib/pageflow/additional_headers.rb +27 -0
- data/lib/pageflow/admin/attributes_table_rows.rb +3 -3
- data/lib/pageflow/admin/tabs.rb +1 -1
- data/lib/pageflow/built_in_file_type.rb +1 -1
- data/lib/pageflow/built_in_page_types_plugin.rb +1 -1
- data/lib/pageflow/built_in_widget_type.rb +2 -2
- data/lib/pageflow/built_in_widget_types_plugin.rb +2 -1
- data/lib/pageflow/configuration.rb +183 -18
- data/lib/pageflow/cutoff_modes.rb +39 -0
- data/lib/pageflow/deprecation.rb +19 -0
- data/lib/pageflow/editor_controller.rb +6 -10
- data/lib/pageflow/engine.rb +5 -6
- data/lib/pageflow/entries_controller_env_helper.rb +32 -2
- data/lib/pageflow/entry_export_import/attachment_files.rb +1 -1
- data/lib/pageflow/entry_export_import/entry_serialization.rb +9 -8
- data/lib/pageflow/entry_export_import/file_mappings.rb +1 -0
- data/lib/pageflow/entry_export_import/page_type_versions.rb +2 -2
- data/lib/pageflow/entry_export_import/revision_serialization/import.rb +11 -1
- data/lib/pageflow/entry_export_import/revision_serialization.rb +3 -0
- data/lib/pageflow/entry_export_import.rb +3 -3
- data/lib/pageflow/entry_structured_data_types.rb +43 -0
- data/lib/pageflow/entry_type_configuration.rb +1 -0
- data/lib/pageflow/entry_types.rb +2 -2
- data/lib/pageflow/feature.rb +1 -1
- data/lib/pageflow/features.rb +4 -6
- data/lib/pageflow/file_importers.rb +4 -4
- data/lib/pageflow/file_type.rb +5 -5
- data/lib/pageflow/file_types.rb +4 -4
- data/lib/pageflow/global_config_api.rb +5 -6
- data/lib/pageflow/help_entries.rb +7 -7
- data/lib/pageflow/help_entry.rb +1 -1
- data/lib/pageflow/hooks.rb +1 -1
- data/lib/pageflow/nested_revision_component.rb +9 -27
- data/lib/pageflow/news_item_api.rb +1 -1
- data/lib/pageflow/oembed_providers.rb +42 -0
- data/lib/pageflow/page_type.rb +2 -3
- data/lib/pageflow/page_types.rb +3 -3
- data/lib/pageflow/paperclip_interpolations/support.rb +1 -1
- data/lib/pageflow/paperclip_processors/vtt.rb +1 -0
- data/lib/pageflow/paperclip_processors/webp.rb +2 -2
- data/lib/pageflow/partial_editor_fragment_renderer.rb +2 -2
- data/lib/pageflow/plugin.rb +1 -2
- data/lib/pageflow/primary_domain_entry_redirect.rb +6 -0
- data/lib/pageflow/quota.rb +9 -5
- data/lib/pageflow/quotas.rb +1 -1
- data/lib/pageflow/rails_version.rb +14 -2
- data/lib/pageflow/react.rb +1 -1
- data/lib/pageflow/revision_component.rb +8 -40
- data/lib/pageflow/revision_components.rb +16 -6
- data/lib/pageflow/seeds.rb +12 -16
- data/lib/pageflow/theme.rb +1 -1
- data/lib/pageflow/theme_customizations.rb +10 -10
- data/lib/pageflow/themes.rb +44 -3
- data/lib/pageflow/user_mixin.rb +18 -6
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow/widget_type.rb +4 -4
- data/lib/pageflow/widget_types.rb +9 -9
- data/lib/pageflow/zencoder_api.rb +32 -42
- data/lib/pageflow/zencoder_audio_output_definition.rb +14 -13
- data/lib/pageflow/zencoder_meta_data_output_definition.rb +3 -2
- data/lib/pageflow/zencoder_output_definition.rb +16 -14
- data/lib/pageflow/zencoder_video_output_definition.rb +140 -88
- data/lib/pageflow.rb +8 -2
- data/lib/tasks/pageflow_tasks.rake +1 -1
- data/package/config/eslint-rules/documented-in-toc.js +125 -0
- data/package/config/jest/index.js +0 -1
- data/package/config/webpack.js +0 -1
- data/package/config/webpack5.js +0 -1
- data/package/editor.js +4880 -2313
- data/package/frontend.js +710 -1223
- data/package/package.json +3 -1
- data/package/review.js +384 -0
- data/package/testHelpers.js +257 -243
- data/package/ui.js +1487 -813
- data/package/vendor/stubs/wysihtml5.js +2 -0
- data/spec/factories/accounts.rb +37 -22
- data/spec/factories/audio_files.rb +2 -2
- data/spec/factories/authentication_tokens.rb +4 -4
- data/spec/factories/chapters.rb +4 -4
- data/spec/factories/comment_thread_reads.rb +10 -0
- data/spec/factories/comment_threads.rb +10 -0
- data/spec/factories/comments.rb +9 -0
- data/spec/factories/draft_entries.rb +14 -6
- data/spec/factories/edit_locks.rb +1 -1
- data/spec/factories/entries.rb +28 -19
- data/spec/factories/entry_translation_groups.rb +6 -0
- data/spec/factories/file_folders.rb +8 -0
- data/spec/factories/file_usages.rb +2 -1
- data/spec/factories/folders.rb +1 -1
- data/spec/factories/image_files.rb +2 -2
- data/spec/factories/pages.rb +3 -3
- data/spec/factories/published_entries.rb +28 -8
- data/spec/factories/revisions.rb +1 -1
- data/spec/factories/sites.rb +6 -0
- data/spec/factories/test_multi_attachment_files.rb +1 -1
- data/spec/factories/text_track_files.rb +1 -1
- data/spec/factories/uploadable_files.rb +1 -1
- data/spec/factories/users.rb +6 -6
- data/spec/factories/video_files.rb +2 -2
- data/spec/factories/widgets.rb +1 -1
- data/spec/fixtures/7x15_rotated.jpg +0 -0
- data/vendor/assets/javascripts/wysihtml-toolbar.js +19288 -0
- metadata +266 -92
- data/app/assets/stylesheets/pageflow/editor/select_button.scss +0 -51
- data/config/initializers/revision_components.rb +0 -5
- data/config/locales/twitter_to_x.de.yml +0 -6
- data/config/locales/twitter_to_x.en.yml +0 -6
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/generated_media_queries_helper.rb +0 -55
- data/entry_types/scrolled/config/locales/twitter_to_x.de.yml +0 -12
- data/entry_types/scrolled/config/locales/twitter_to_x.en.yml +0 -12
- data/entry_types/scrolled/config/locales/vr_image_projection.de.yml +0 -24
- data/entry_types/scrolled/config/locales/vr_image_projection.en.yml +0 -24
- data/entry_types/scrolled/package/frontend/EditableInlineText.module-ebd22921.js +0 -5497
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-b79159cc.js +0 -107
- data/entry_types/scrolled/package/frontend/Viewer-1ecf3375.js +0 -154
- data/entry_types/scrolled/package/frontend/Wavesurfer-7d9cf1b7.js +0 -333
- data/entry_types/scrolled/package/frontend/arrowRight-62998af9.js +0 -77
- data/entry_types/scrolled/package/frontend/components-024a9893.js +0 -2853
- data/entry_types/scrolled/package/frontend/createSuper-d0f30da3.js +0 -115
- data/entry_types/scrolled/package/frontend/i18n-ce13a8bf.js +0 -1129
- data/entry_types/scrolled/package/frontend/useContentElementEditorState-4f4c3cf6.js +0 -52
- data/lib/generators/pageflow/resque/templates/resque_enqueue_after_commit_patch.rb +0 -25
- data/package/vendor/jquery.minicolors.js +0 -1108
|
@@ -1,100 +1,31 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { E as EventContextDataProvider, C as ConnectedSection, u as usePrevious, g as getEventObject, w as withInlineEditingDecorator, a as useCurrentSectionIndexState, b as usePostMessageListener, c as contentStyles, A as AtmoProvider, S as ScrollToSectionContext, W as Widget, _ as _asyncToGenerator, d as _regeneratorRuntime, e as withInlineEditingAlternative, f as useDarkBackground, i as isBlankEditableTextValue, h as EditableText, j as useContentElementConfigurationUpdate, k as useContentElementAttributes, l as widths, I as InlineFileRights, m as useTextTracks, n as useMediaMuted, o as useFocusOutlineVisible, p as useVideoQualitySetting, q as useIsomorphicLayoutEffect, r as frontendStyles, s as useFullscreenDimensions, t as information, v as camelize, x as isBlank, y as presence, z as styles$a, R as RootProviders, B as registerVendors, D as api, F as loadInlineEditingComponents } from './EditableInlineText.module-ebd22921.js';
|
|
3
|
-
export { a8 as Atmo, a9 as AtmoContext, A as AtmoProvider, a6 as AudioPlayer, h as EditableText, $ as Image, I as InlineFileRights, a1 as MediaPlayer, O as PhonePlatformProvider, P as PlayerEventContextDataProvider, R as RootProviders, ad as SectionThumbnail, ac as StandaloneSectionThumbnail, a0 as Text, Q as ThirdPartyOptIn, T as ThirdPartyOptOutInfo, a5 as VideoPlayer, W as Widget, Z as contentElementWidthName, l as contentElementWidths, D as frontend, X as getAvailableTransitionNames, a2 as getInitialPlayerState, V as getTransitionNames, Y as paletteColor, a3 as playerStateReducer, a7 as processSources, B as registerConsentVendors, aa as useAtmo, G as useAudioFocus, U as useConsentRequested, j as useContentElementConfigurationUpdate, H as useContentElementEditorCommandSubscription, J as useContentElementLifecycle, K as useCurrentChapter, f as useDarkBackground, L as useIsStaticPreview, n as useMediaMuted, ab as useOnScreen, M as useOnUnmuteMedia, a4 as usePlayerState, N as usePortraitOrientation } from './EditableInlineText.module-ebd22921.js';
|
|
4
|
-
import 'core-js/modules/es.symbol';
|
|
5
|
-
import 'core-js/modules/es.symbol.description';
|
|
6
|
-
import 'core-js/modules/es.symbol.async-iterator';
|
|
7
|
-
import 'core-js/modules/es.symbol.has-instance';
|
|
8
|
-
import 'core-js/modules/es.symbol.is-concat-spreadable';
|
|
9
|
-
import 'core-js/modules/es.symbol.iterator';
|
|
10
|
-
import 'core-js/modules/es.symbol.match';
|
|
11
|
-
import 'core-js/modules/es.symbol.replace';
|
|
12
|
-
import 'core-js/modules/es.symbol.search';
|
|
13
|
-
import 'core-js/modules/es.symbol.species';
|
|
14
|
-
import 'core-js/modules/es.symbol.split';
|
|
15
|
-
import 'core-js/modules/es.symbol.to-primitive';
|
|
16
|
-
import 'core-js/modules/es.symbol.to-string-tag';
|
|
17
|
-
import 'core-js/modules/es.symbol.unscopables';
|
|
18
|
-
import 'core-js/modules/es.array.concat';
|
|
19
|
-
import 'core-js/modules/es.array.fill';
|
|
20
|
-
import 'core-js/modules/es.array.find';
|
|
21
|
-
import 'core-js/modules/es.array.from';
|
|
22
|
-
import 'core-js/modules/es.json.to-string-tag';
|
|
23
|
-
import 'core-js/modules/es.map';
|
|
24
|
-
import 'core-js/modules/es.math.to-string-tag';
|
|
25
|
-
import 'core-js/modules/es.object.assign';
|
|
26
|
-
import 'core-js/modules/es.object.to-string';
|
|
27
|
-
import 'core-js/modules/es.promise';
|
|
28
|
-
import 'core-js/modules/es.promise.finally';
|
|
29
|
-
import 'core-js/modules/es.set';
|
|
30
|
-
import 'core-js/modules/es.string.iterator';
|
|
31
|
-
import 'core-js/modules/es.string.starts-with';
|
|
32
|
-
import 'core-js/modules/esnext.aggregate-error';
|
|
33
|
-
import 'core-js/modules/esnext.map.delete-all';
|
|
34
|
-
import 'core-js/modules/esnext.map.every';
|
|
35
|
-
import 'core-js/modules/esnext.map.filter';
|
|
36
|
-
import 'core-js/modules/esnext.map.find';
|
|
37
|
-
import 'core-js/modules/esnext.map.find-key';
|
|
38
|
-
import 'core-js/modules/esnext.map.from';
|
|
39
|
-
import 'core-js/modules/esnext.map.group-by';
|
|
40
|
-
import 'core-js/modules/esnext.map.includes';
|
|
41
|
-
import 'core-js/modules/esnext.map.key-by';
|
|
42
|
-
import 'core-js/modules/esnext.map.key-of';
|
|
43
|
-
import 'core-js/modules/esnext.map.map-keys';
|
|
44
|
-
import 'core-js/modules/esnext.map.map-values';
|
|
45
|
-
import 'core-js/modules/esnext.map.merge';
|
|
46
|
-
import 'core-js/modules/esnext.map.of';
|
|
47
|
-
import 'core-js/modules/esnext.map.reduce';
|
|
48
|
-
import 'core-js/modules/esnext.map.some';
|
|
49
|
-
import 'core-js/modules/esnext.map.update';
|
|
50
|
-
import 'core-js/modules/esnext.promise.all-settled';
|
|
51
|
-
import 'core-js/modules/esnext.promise.any';
|
|
52
|
-
import 'core-js/modules/esnext.promise.try';
|
|
53
|
-
import 'core-js/modules/esnext.set.add-all';
|
|
54
|
-
import 'core-js/modules/esnext.set.delete-all';
|
|
55
|
-
import 'core-js/modules/esnext.set.difference';
|
|
56
|
-
import 'core-js/modules/esnext.set.every';
|
|
57
|
-
import 'core-js/modules/esnext.set.filter';
|
|
58
|
-
import 'core-js/modules/esnext.set.find';
|
|
59
|
-
import 'core-js/modules/esnext.set.from';
|
|
60
|
-
import 'core-js/modules/esnext.set.intersection';
|
|
61
|
-
import 'core-js/modules/esnext.set.is-disjoint-from';
|
|
62
|
-
import 'core-js/modules/esnext.set.is-subset-of';
|
|
63
|
-
import 'core-js/modules/esnext.set.is-superset-of';
|
|
64
|
-
import 'core-js/modules/esnext.set.join';
|
|
65
|
-
import 'core-js/modules/esnext.set.map';
|
|
66
|
-
import 'core-js/modules/esnext.set.of';
|
|
67
|
-
import 'core-js/modules/esnext.set.reduce';
|
|
68
|
-
import 'core-js/modules/esnext.set.some';
|
|
69
|
-
import 'core-js/modules/esnext.set.symmetric-difference';
|
|
70
|
-
import 'core-js/modules/esnext.set.union';
|
|
71
|
-
import 'core-js/modules/esnext.symbol.dispose';
|
|
72
|
-
import 'core-js/modules/esnext.symbol.observable';
|
|
73
|
-
import 'core-js/modules/esnext.symbol.pattern-match';
|
|
74
|
-
import 'core-js/modules/web.dom-collections.iterator';
|
|
75
|
-
import 'regenerator-runtime/runtime.js';
|
|
76
|
-
import { browser, events, consent, features } from 'pageflow/frontend';
|
|
1
|
+
import { browser, events, features, consent } from 'pageflow/frontend';
|
|
77
2
|
import React, { useRef, useState, useEffect, useCallback, useMemo, Suspense, useContext } from 'react';
|
|
78
3
|
import ReactDOM from 'react-dom';
|
|
79
|
-
import { _ as _slicedToArray, l as useSectionsWithChapter, r as useEntryStructure, s as getFileUrlTemplateHost, u as useI18n, b as _defineProperty, a as _objectSpread2, e as _objectWithoutProperties, g as useTheme, n as _toConsumableArray, t as useAvailableQualities, v as setupI18n } from './i18n-ce13a8bf.js';
|
|
80
|
-
export { L as LocaleProvider, v as setupI18n, k as useAdditionalSeedData, w as useChapters, x as useCredits, p as useEntryStateDispatch, i as useFile, y as useFileRights, h as useFileWithInlineRights, u as useI18n, z as useLegalInfo, C as useLocale, A as useShareProviders, B as useShareUrl, g as useTheme } from './i18n-ce13a8bf.js';
|
|
81
4
|
import classNames from 'classnames';
|
|
82
|
-
import { a as
|
|
83
|
-
export {
|
|
84
|
-
|
|
5
|
+
import { e as extensible, u as useScrollToTarget, a as useActiveExcursion, M as MainStorylineCoverageProvider, b as MainStorylineActivity, c as useMainStorylineCoverage, d as api, p as provideExtensions, f as useDarkBackground, E as EditableText, g as useContentElementAttributes, w as widths, L as Link, T as Text } from './FloatingPortalRootProvider-58189220.js';
|
|
6
|
+
export { C as ContentElementAttributesProvider, i as ContentElementLifecycleContext, k as ContentElementViewTimelineContext, E as EditableText, F as FloatingPortalRootProvider, L as Link, b as MainStorylineActivity, O as OnScreenObserverRootProvider, T as Text, r as contentElementWidthName, w as contentElementWidths, d as frontend, l as getViewTimelineProgress, q as paletteColor, h as useContentElementLifecycle, j as useContentElementViewTimelineProgress, f as useDarkBackground, o as useFloatingPortalRoot, m as useIsStaticPreview, s as useOnScreen, n as useStorylineActivity } from './FloatingPortalRootProvider-58189220.js';
|
|
7
|
+
export { u as useDelayedBoolean } from './useDelayedBoolean-a387d85b.js';
|
|
8
|
+
import { E as EventContextDataProvider, C as ConnectedSection, g as getEventObject, u as useCurrentSectionIndexState, a as usePostMessageListener, c as contentStyles, A as AtmoProvider, W as Widget, S as SelectableWidget, i as isBlankEditableTextValue, b as useContentElementConfigurationUpdate, d as usePrevious, I as InlineFileRights, e as useFocusOutlineVisible, f as useTextTracks, h as useMediaMuted, j as useVideoQualitySetting, k as useIsomorphicLayoutEffect, l as frontendStyles, s as styles$e, F as Fullscreen, m as utils, n as styles$f, r as registerVendors, R as RootProviders } from './Placeholder.module-bf0966b4.js';
|
|
9
|
+
export { G as AiIndicatorIcon, $ as Atmo, a0 as AtmoContext, A as AtmoProvider, Z as AudioPlayer, v as ContentElementEditorCommandEmitterContext, z as EditableTable, Q as Image, I as InlineFileRights, T as MediaPlayer, P as PlayerEventContextDataProvider, R as RootProviders, J as SectionIntersectionObserver, a3 as SectionThumbnail, S as SelectableWidget, a2 as StandaloneSectionThumbnail, O as ThirdPartyOptIn, B as ThirdPartyOptOutInfo, Y as VideoPlayer, W as Widget, N as getAppearanceSectionScopeName, M as getAvailableTransitionNames, U as getInitialPlayerState, L as getTransitionNames, V as playerStateReducer, _ as processSources, r as registerConsentVendors, H as useAiIndicatorLabel, a1 as useAtmo, o as useAudioFocus, p as useBackgroundFile, D as useConsentRequested, b as useContentElementConfigurationUpdate, t as useContentElementEditorCommandSubscription, w as useCurrentChapter, k as useIsomorphicLayoutEffect, h as useMediaMuted, x as useOnUnmuteMedia, X as usePlayerState, y as usePortraitOrientation, K as usePrivacyLink, q as useWidgetConfigurationUpdate, m as utils } from './Placeholder.module-bf0966b4.js';
|
|
85
10
|
import 'backbone-events-standalone';
|
|
86
|
-
import '
|
|
87
|
-
|
|
88
|
-
import 'slugify';
|
|
11
|
+
import { useEntryStructure, useActiveWidgets, getFileUrlTemplateHost, useTheme, useAvailableQualities } from 'pageflow-scrolled/entryState';
|
|
12
|
+
export { useAdditionalSeedData, useChapters, useCredits, useCutOff, useDarkWidgets, useEntryMetadata, useEntryStateDispatch, useEntryTranslations, useFile, useFileRights, useFileWithInlineRights, useLegalInfo, useMainChapters, useShareProviders, useShareUrl, useTheme } from 'pageflow-scrolled/entryState';
|
|
89
13
|
import 'i18n-js';
|
|
14
|
+
import { u as useI18n, s as setupI18n } from './i18n-e06cac14.js';
|
|
15
|
+
export { L as LocaleProvider, s as setupI18n, u as useI18n, a as useLocale } from './i18n-e06cac14.js';
|
|
90
16
|
import 'striptags';
|
|
91
17
|
import Measure from 'react-measure';
|
|
92
|
-
|
|
18
|
+
export { P as PhonePlatformContext } from './PhonePlatformContext-9da43797.js';
|
|
19
|
+
import { u as useContentElementEditorState } from './useContentElementEditorState-a084912e.js';
|
|
20
|
+
export { C as ContentElementEditorStateContext, u as useContentElementEditorState } from './useContentElementEditorState-a084912e.js';
|
|
21
|
+
import { T as ThemeIcon } from './ThemeIcon-f6cb3a8f.js';
|
|
22
|
+
export { T as ThemeIcon } from './ThemeIcon-f6cb3a8f.js';
|
|
23
|
+
import PropTypes from 'prop-types';
|
|
93
24
|
import { DraggableCore } from 'react-draggable';
|
|
94
|
-
export { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-
|
|
95
|
-
export { F as FullscreenViewer } from './index-
|
|
96
|
-
import {
|
|
97
|
-
export { u as usePhonePlatform } from './
|
|
25
|
+
export { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-61c25224.js';
|
|
26
|
+
export { F as FullscreenViewer } from './index-de2b418d.js';
|
|
27
|
+
import { useI18n as useI18n$1, useTheme as useTheme$1 } from 'pageflow-scrolled/frontend';
|
|
28
|
+
export { u as usePhonePlatform } from './usePhonePlatform-4ecb96d4.js';
|
|
98
29
|
import invert from 'invert-color';
|
|
99
30
|
|
|
100
31
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -104,53 +35,71 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
|
|
|
104
35
|
// See https://v4.webpack.js.org/guides/public-path/#on-the-fly
|
|
105
36
|
// PageflowScrolled::WebpackPublicPathHelper generates js snippet
|
|
106
37
|
// that defines the global. For Storybook, we set it to an empty default.
|
|
38
|
+
|
|
107
39
|
// eslint-disable-next-line no-undef
|
|
108
40
|
__webpack_public_path__ = commonjsGlobal.__webpack_public_path__ || '';
|
|
109
41
|
|
|
42
|
+
// Safari does not handle positive root margin correctly inside
|
|
110
43
|
// iframes. Use polyfill instead.
|
|
111
|
-
|
|
112
44
|
if (browser.agent.matchesSafari() && window.parent !== window) {
|
|
113
45
|
delete window.IntersectionObserver;
|
|
114
46
|
}
|
|
47
|
+
require('intersection-observer');
|
|
115
48
|
|
|
116
|
-
|
|
117
|
-
// This prevents
|
|
118
|
-
|
|
119
|
-
|
|
49
|
+
// Make sure we're in a Browser-like environment before importing the
|
|
50
|
+
// polyfill. This prevents it from being imported in a Node test
|
|
51
|
+
// environment.
|
|
120
52
|
if (typeof window !== 'undefined') {
|
|
121
|
-
require('whatwg-fetch');
|
|
122
|
-
|
|
123
53
|
require('scroll-timeline');
|
|
124
54
|
}
|
|
125
55
|
|
|
56
|
+
var styles = {"wrapper":"Chapter-module_wrapper__3Pdly"};
|
|
57
|
+
|
|
58
|
+
var _jsxFileName = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Chapter.js";
|
|
126
59
|
function Chapter(props) {
|
|
127
60
|
return /*#__PURE__*/React.createElement("div", {
|
|
128
|
-
id: props.chapterSlug
|
|
129
|
-
|
|
61
|
+
id: props.chapterSlug,
|
|
62
|
+
className: styles.wrapper,
|
|
63
|
+
__self: this,
|
|
64
|
+
__source: {
|
|
65
|
+
fileName: _jsxFileName,
|
|
66
|
+
lineNumber: 10,
|
|
67
|
+
columnNumber: 5
|
|
68
|
+
}
|
|
69
|
+
}, renderSections(props.sections, props.currentSectionIndex, props.setCurrentSection));
|
|
130
70
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
133
|
-
function _onActivate(section) {
|
|
71
|
+
function renderSections(sections, currentSectionIndex, setCurrentSection) {
|
|
72
|
+
function onActivate(section) {
|
|
134
73
|
setCurrentSection(section);
|
|
135
|
-
setScrollTargetSectionIndex(null);
|
|
136
74
|
}
|
|
137
|
-
|
|
138
|
-
return sections.map(function (section) {
|
|
75
|
+
return sections.map(section => {
|
|
139
76
|
return /*#__PURE__*/React.createElement(EventContextDataProvider, {
|
|
140
77
|
key: section.permaId,
|
|
141
78
|
section: section,
|
|
142
|
-
sectionsCount: sections.length
|
|
79
|
+
sectionsCount: sections.length,
|
|
80
|
+
__self: this,
|
|
81
|
+
__source: {
|
|
82
|
+
fileName: _jsxFileName,
|
|
83
|
+
lineNumber: 27,
|
|
84
|
+
columnNumber: 7
|
|
85
|
+
}
|
|
143
86
|
}, /*#__PURE__*/React.createElement(ConnectedSection, {
|
|
144
87
|
state: section.sectionIndex > currentSectionIndex ? 'below' : section.sectionIndex < currentSectionIndex ? 'above' : 'active',
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
88
|
+
onActivate: () => onActivate(section),
|
|
89
|
+
section: section,
|
|
90
|
+
__self: this,
|
|
91
|
+
__source: {
|
|
92
|
+
fileName: _jsxFileName,
|
|
93
|
+
lineNumber: 28,
|
|
94
|
+
columnNumber: 9
|
|
95
|
+
}
|
|
150
96
|
}));
|
|
151
97
|
});
|
|
152
98
|
}
|
|
153
99
|
|
|
100
|
+
var _jsxFileName$1 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/VhFix.js";
|
|
101
|
+
|
|
102
|
+
// InApp browsers on iOS (e.g. Twitter) report the height of the
|
|
154
103
|
// initial viewport as 100vh. Once the page is scrolled, browser
|
|
155
104
|
// toolbars are hidden, the viewport becomes larger and elements with
|
|
156
105
|
// height 100vh no longer cover the viewport.
|
|
@@ -168,53 +117,54 @@ function renderSections(sections, currentSectionIndex, setCurrentSection, scroll
|
|
|
168
117
|
// On orientation change, we do want to update `--vh`, though. We
|
|
169
118
|
// therefore do update it when the inner height of the window
|
|
170
119
|
// decreases by more than 30%.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
178
|
-
height = _useState2[0],
|
|
179
|
-
setHeight = _useState2[1];
|
|
180
|
-
|
|
181
|
-
useEffect(function () {
|
|
120
|
+
function VhFix({
|
|
121
|
+
children
|
|
122
|
+
}) {
|
|
123
|
+
const probeRef = useRef();
|
|
124
|
+
const [height, setHeight] = useState();
|
|
125
|
+
useEffect(() => {
|
|
182
126
|
if (!browser.has('ios platform')) {
|
|
183
127
|
return;
|
|
184
128
|
}
|
|
185
|
-
|
|
186
129
|
window.addEventListener('resize', update);
|
|
187
|
-
return
|
|
188
|
-
return window.removeEventListener('resize', update);
|
|
189
|
-
};
|
|
190
|
-
|
|
130
|
+
return () => window.removeEventListener('resize', update);
|
|
191
131
|
function update() {
|
|
192
|
-
setHeight(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
});
|
|
198
|
-
});
|
|
132
|
+
setHeight(previousHeight => getHeight({
|
|
133
|
+
windowHeight: window.innerHeight,
|
|
134
|
+
probeHeight: probeRef.current.clientHeight,
|
|
135
|
+
previousHeight
|
|
136
|
+
}));
|
|
199
137
|
}
|
|
200
138
|
}, []);
|
|
201
139
|
return /*#__PURE__*/React.createElement("div", {
|
|
202
140
|
style: height && {
|
|
203
|
-
'--vh':
|
|
141
|
+
'--vh': `${height / 100}px`
|
|
142
|
+
},
|
|
143
|
+
__self: this,
|
|
144
|
+
__source: {
|
|
145
|
+
fileName: _jsxFileName$1,
|
|
146
|
+
lineNumber: 44,
|
|
147
|
+
columnNumber: 5
|
|
204
148
|
}
|
|
205
149
|
}, /*#__PURE__*/React.createElement("div", {
|
|
206
150
|
style: {
|
|
207
151
|
height: '100vh',
|
|
208
152
|
position: 'absolute'
|
|
209
153
|
},
|
|
210
|
-
ref: probeRef
|
|
154
|
+
ref: probeRef,
|
|
155
|
+
__self: this,
|
|
156
|
+
__source: {
|
|
157
|
+
fileName: _jsxFileName$1,
|
|
158
|
+
lineNumber: 45,
|
|
159
|
+
columnNumber: 7
|
|
160
|
+
}
|
|
211
161
|
}), children);
|
|
212
162
|
}
|
|
213
|
-
function getHeight(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
163
|
+
function getHeight({
|
|
164
|
+
windowHeight,
|
|
165
|
+
probeHeight,
|
|
166
|
+
previousHeight
|
|
167
|
+
}) {
|
|
218
168
|
if (probeHeight < windowHeight || previousHeight) {
|
|
219
169
|
if (!previousHeight || windowHeight > previousHeight || windowHeight < previousHeight * 0.7) {
|
|
220
170
|
return windowHeight;
|
|
@@ -224,84 +174,222 @@ function getHeight(_ref2) {
|
|
|
224
174
|
}
|
|
225
175
|
}
|
|
226
176
|
|
|
227
|
-
function useSectionChangeEvents(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (previousSectionIndex !== currentSectionIndex) {
|
|
177
|
+
function useSectionChangeEvents(events) {
|
|
178
|
+
const previousSectionPermaIdRef = useRef();
|
|
179
|
+
return useCallback((section, sectionsCount) => {
|
|
180
|
+
if (previousSectionPermaIdRef.current !== (section === null || section === void 0 ? void 0 : section.permaId)) {
|
|
232
181
|
events.trigger('page:change', getEventObject({
|
|
233
|
-
section
|
|
234
|
-
sectionsCount
|
|
182
|
+
section,
|
|
183
|
+
sectionsCount
|
|
235
184
|
}));
|
|
185
|
+
previousSectionPermaIdRef.current = section === null || section === void 0 ? void 0 : section.permaId;
|
|
236
186
|
}
|
|
237
|
-
});
|
|
187
|
+
}, [events]);
|
|
238
188
|
}
|
|
239
189
|
|
|
240
|
-
|
|
190
|
+
const sectionChangeMessagePoster = (sectionIndex, excursionId) => {
|
|
241
191
|
if (window.parent !== window) {
|
|
242
192
|
window.parent.postMessage({
|
|
243
193
|
type: 'CHANGE_SECTION',
|
|
244
194
|
payload: {
|
|
245
|
-
|
|
195
|
+
sectionIndex,
|
|
196
|
+
excursionId
|
|
246
197
|
}
|
|
247
198
|
}, window.location.origin);
|
|
248
199
|
}
|
|
249
200
|
};
|
|
250
201
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var _useState = useState(null),
|
|
258
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
259
|
-
scrollTargetSectionIndex = _useState2[0],
|
|
260
|
-
setScrollTargetSectionIndex = _useState2[1];
|
|
261
|
-
|
|
262
|
-
var entryStructure = useEntryStructure();
|
|
263
|
-
useSectionChangeEvents(currentSectionIndex);
|
|
264
|
-
|
|
265
|
-
var updateChapterSlug = function updateChapterSlug(section) {
|
|
266
|
-
if (window.history && window.history.replaceState) {
|
|
267
|
-
if (section.sectionIndex > 0) {
|
|
268
|
-
window.history.replaceState(null, null, '#' + section.chapter.chapterSlug);
|
|
269
|
-
} else {
|
|
270
|
-
window.history.replaceState(null, null, window.location.href.split('#')[0]);
|
|
271
|
-
}
|
|
202
|
+
function useChapterSlugUpdater() {
|
|
203
|
+
const windowLoadedRef = useRef(false);
|
|
204
|
+
useWindowLoadTracking(windowLoadedRef);
|
|
205
|
+
const updateChapterSlug = useCallback(section => {
|
|
206
|
+
if (!windowLoadedRef.current) {
|
|
207
|
+
return;
|
|
272
208
|
}
|
|
209
|
+
if (section.sectionIndex > 0) {
|
|
210
|
+
window.history.replaceState(null, null, '#' + section.chapter.chapterSlug);
|
|
211
|
+
} else {
|
|
212
|
+
window.history.replaceState(null, null, window.location.href.split('#')[0]);
|
|
213
|
+
}
|
|
214
|
+
}, []);
|
|
215
|
+
const updateExcursionChapterSlug = useCallback(section => {
|
|
216
|
+
if (!windowLoadedRef.current) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
window.history.replaceState(null, null, '#' + section.chapter.chapterSlug);
|
|
220
|
+
}, []);
|
|
221
|
+
return {
|
|
222
|
+
updateChapterSlug,
|
|
223
|
+
updateExcursionChapterSlug
|
|
273
224
|
};
|
|
274
|
-
|
|
275
|
-
|
|
225
|
+
}
|
|
226
|
+
function useWindowLoadTracking(windowLoadedRef) {
|
|
227
|
+
useEffect(() => {
|
|
228
|
+
if (document.readyState === 'complete') {
|
|
229
|
+
windowLoadedRef.current = true;
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
const handleLoad = () => {
|
|
233
|
+
windowLoadedRef.current = true;
|
|
234
|
+
};
|
|
235
|
+
window.addEventListener('load', handleLoad);
|
|
236
|
+
return () => window.removeEventListener('load', handleLoad);
|
|
237
|
+
}, [windowLoadedRef]);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
var _jsxFileName$2 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Content.js";
|
|
241
|
+
const Content = extensible('Content', function Content(props) {
|
|
242
|
+
const entryStructure = useEntryStructure();
|
|
243
|
+
const scrollToTarget = useScrollToTarget();
|
|
244
|
+
const {
|
|
245
|
+
activeExcursion,
|
|
246
|
+
activateExcursionOfSection,
|
|
247
|
+
returnFromExcursion
|
|
248
|
+
} = useActiveExcursion();
|
|
249
|
+
const [currentSectionIndex, setCurrentSectionIndexState] = useCurrentSectionIndexState();
|
|
250
|
+
const [currentExcursionSectionIndex, setCurrentExcursionSectionIndex] = useState(0);
|
|
251
|
+
const {
|
|
252
|
+
updateChapterSlug,
|
|
253
|
+
updateExcursionChapterSlug
|
|
254
|
+
} = useChapterSlugUpdater();
|
|
255
|
+
const triggerSectionChange = useSectionChangeEvents(events);
|
|
256
|
+
const setCurrentSection = useCallback(section => {
|
|
276
257
|
sectionChangeMessagePoster(section.sectionIndex);
|
|
277
258
|
setCurrentSectionIndexState(section.sectionIndex);
|
|
278
259
|
updateChapterSlug(section);
|
|
279
|
-
|
|
280
|
-
|
|
260
|
+
triggerSectionChange(section, entryStructure.mainSectionsCount);
|
|
261
|
+
}, [setCurrentSectionIndexState, updateChapterSlug, triggerSectionChange, entryStructure.mainSectionsCount]);
|
|
262
|
+
const setCurrentExcursionSection = useCallback(section => {
|
|
263
|
+
sectionChangeMessagePoster(section.sectionIndex, section.chapter.id);
|
|
264
|
+
setCurrentExcursionSectionIndex(section.sectionIndex);
|
|
265
|
+
updateExcursionChapterSlug(section);
|
|
266
|
+
triggerSectionChange(section, activeExcursion.sections.length);
|
|
267
|
+
}, [updateExcursionChapterSlug, triggerSectionChange, activeExcursion]);
|
|
268
|
+
const receiveMessage = useCallback(data => {
|
|
281
269
|
if (data.type === 'SCROLL_TO_SECTION') {
|
|
282
|
-
|
|
270
|
+
activateExcursionOfSection({
|
|
271
|
+
id: data.payload.id
|
|
272
|
+
});
|
|
273
|
+
scrollToTarget({
|
|
274
|
+
id: data.payload.id,
|
|
275
|
+
align: data.payload.align,
|
|
276
|
+
ifNeeded: data.payload.ifNeeded,
|
|
277
|
+
behavior: data.payload.behavior
|
|
278
|
+
});
|
|
283
279
|
}
|
|
284
|
-
}, []);
|
|
280
|
+
}, [scrollToTarget, activateExcursionOfSection]);
|
|
285
281
|
usePostMessageListener(receiveMessage);
|
|
286
|
-
|
|
287
|
-
function scrollToSection(index) {
|
|
288
|
-
if (index === 'next') {
|
|
289
|
-
index = currentSectionIndex + 1;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
setScrollTargetSectionIndex(index);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
282
|
return /*#__PURE__*/React.createElement("div", {
|
|
296
283
|
className: contentStyles.Content,
|
|
297
|
-
id: "goToContent"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
284
|
+
id: "goToContent",
|
|
285
|
+
__self: this,
|
|
286
|
+
__source: {
|
|
287
|
+
fileName: _jsxFileName$2,
|
|
288
|
+
lineNumber: 67,
|
|
289
|
+
columnNumber: 5
|
|
290
|
+
}
|
|
291
|
+
}, /*#__PURE__*/React.createElement(VhFix, {
|
|
292
|
+
__self: this,
|
|
293
|
+
__source: {
|
|
294
|
+
fileName: _jsxFileName$2,
|
|
295
|
+
lineNumber: 68,
|
|
296
|
+
columnNumber: 7
|
|
297
|
+
}
|
|
298
|
+
}, /*#__PURE__*/React.createElement(MainStorylineCoverageProvider, {
|
|
299
|
+
__self: this,
|
|
300
|
+
__source: {
|
|
301
|
+
fileName: _jsxFileName$2,
|
|
302
|
+
lineNumber: 69,
|
|
303
|
+
columnNumber: 9
|
|
304
|
+
}
|
|
305
|
+
}, /*#__PURE__*/React.createElement(AtmoProvider, {
|
|
306
|
+
__self: this,
|
|
307
|
+
__source: {
|
|
308
|
+
fileName: _jsxFileName$2,
|
|
309
|
+
lineNumber: 70,
|
|
310
|
+
columnNumber: 11
|
|
311
|
+
}
|
|
312
|
+
}, renderMainStoryline(entryStructure.main, activeExcursion, currentSectionIndex, setCurrentSection), /*#__PURE__*/React.createElement(ActiveExcursion, {
|
|
313
|
+
excursion: activeExcursion,
|
|
314
|
+
currentExcursionSectionIndex: currentExcursionSectionIndex,
|
|
315
|
+
setCurrentExcursionSection: setCurrentExcursionSection,
|
|
316
|
+
onClose: () => {
|
|
317
|
+
returnFromExcursion();
|
|
318
|
+
sectionChangeMessagePoster(currentSectionIndex);
|
|
319
|
+
},
|
|
320
|
+
__self: this,
|
|
321
|
+
__source: {
|
|
322
|
+
fileName: _jsxFileName$2,
|
|
323
|
+
lineNumber: 75,
|
|
324
|
+
columnNumber: 13
|
|
325
|
+
}
|
|
326
|
+
})))));
|
|
301
327
|
});
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
328
|
+
function renderMainStoryline(chapters, activeExcursion, currentSectionIndex, setCurrentSection) {
|
|
329
|
+
return /*#__PURE__*/React.createElement(Widget, {
|
|
330
|
+
role: "mainStoryline",
|
|
331
|
+
props: {
|
|
332
|
+
activeExcursion
|
|
333
|
+
},
|
|
334
|
+
renderFallback: ({
|
|
335
|
+
children
|
|
336
|
+
}) => children,
|
|
337
|
+
__self: this,
|
|
338
|
+
__source: {
|
|
339
|
+
fileName: _jsxFileName$2,
|
|
340
|
+
lineNumber: 93,
|
|
341
|
+
columnNumber: 5
|
|
342
|
+
}
|
|
343
|
+
}, /*#__PURE__*/React.createElement(MainStorylineActivity, {
|
|
344
|
+
activeExcursion: activeExcursion,
|
|
345
|
+
__self: this,
|
|
346
|
+
__source: {
|
|
347
|
+
fileName: _jsxFileName$2,
|
|
348
|
+
lineNumber: 96,
|
|
349
|
+
columnNumber: 7
|
|
350
|
+
}
|
|
351
|
+
}, renderChapters(chapters, currentSectionIndex, setCurrentSection)), /*#__PURE__*/React.createElement(Widget, {
|
|
352
|
+
role: "footer",
|
|
353
|
+
__self: this,
|
|
354
|
+
__source: {
|
|
355
|
+
fileName: _jsxFileName$2,
|
|
356
|
+
lineNumber: 99,
|
|
357
|
+
columnNumber: 7
|
|
358
|
+
}
|
|
359
|
+
}));
|
|
360
|
+
}
|
|
361
|
+
function ActiveExcursion({
|
|
362
|
+
excursion,
|
|
363
|
+
currentExcursionSectionIndex,
|
|
364
|
+
setCurrentExcursionSection,
|
|
365
|
+
onClose
|
|
366
|
+
}) {
|
|
367
|
+
const {
|
|
368
|
+
setMainStorylineCovered
|
|
369
|
+
} = useMainStorylineCoverage();
|
|
370
|
+
if (!excursion) {
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
return /*#__PURE__*/React.createElement(Widget, {
|
|
374
|
+
role: "excursion",
|
|
375
|
+
props: {
|
|
376
|
+
excursion,
|
|
377
|
+
onClose: () => {
|
|
378
|
+
onClose();
|
|
379
|
+
setMainStorylineCovered(false);
|
|
380
|
+
},
|
|
381
|
+
setIsCoveringBackground: setMainStorylineCovered
|
|
382
|
+
},
|
|
383
|
+
__self: this,
|
|
384
|
+
__source: {
|
|
385
|
+
fileName: _jsxFileName$2,
|
|
386
|
+
lineNumber: 117,
|
|
387
|
+
columnNumber: 5
|
|
388
|
+
}
|
|
389
|
+
}, renderChapters([excursion], currentExcursionSectionIndex, setCurrentExcursionSection));
|
|
390
|
+
}
|
|
391
|
+
function renderChapters(chapters, currentSectionIndex, setCurrentSection) {
|
|
392
|
+
return chapters.map((chapter, index) => {
|
|
305
393
|
return /*#__PURE__*/React.createElement(Chapter, {
|
|
306
394
|
key: index,
|
|
307
395
|
chapterSlug: chapter.chapterSlug,
|
|
@@ -309,68 +397,146 @@ function renderChapters(entryStructure, currentSectionIndex, setCurrentSection,
|
|
|
309
397
|
sections: chapter.sections,
|
|
310
398
|
currentSectionIndex: currentSectionIndex,
|
|
311
399
|
setCurrentSection: setCurrentSection,
|
|
312
|
-
|
|
313
|
-
|
|
400
|
+
__self: this,
|
|
401
|
+
__source: {
|
|
402
|
+
fileName: _jsxFileName$2,
|
|
403
|
+
lineNumber: 138,
|
|
404
|
+
columnNumber: 7
|
|
405
|
+
}
|
|
314
406
|
});
|
|
315
407
|
});
|
|
316
408
|
}
|
|
317
409
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
410
|
+
var _jsxFileName$3 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/WidgetPresenceWrapper.js";
|
|
411
|
+
function WidgetPresenceWrapper({
|
|
412
|
+
children
|
|
413
|
+
}) {
|
|
414
|
+
const widgets = useActiveWidgets();
|
|
415
|
+
return /*#__PURE__*/React.createElement(PresenceProviders, {
|
|
416
|
+
widgets: widgets,
|
|
417
|
+
__self: this,
|
|
418
|
+
__source: {
|
|
419
|
+
fileName: _jsxFileName$3,
|
|
420
|
+
lineNumber: 9,
|
|
421
|
+
columnNumber: 5
|
|
422
|
+
}
|
|
423
|
+
}, children);
|
|
326
424
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
425
|
+
function PresenceProviders({
|
|
426
|
+
widgets,
|
|
427
|
+
children
|
|
428
|
+
}) {
|
|
429
|
+
if (widgets.length === 0) {
|
|
430
|
+
return children;
|
|
431
|
+
}
|
|
432
|
+
const [first, ...rest] = widgets;
|
|
433
|
+
const Provider = api.widgetTypes.getPresenceProvider(first.typeName);
|
|
434
|
+
if (Provider) {
|
|
435
|
+
return /*#__PURE__*/React.createElement(Provider, {
|
|
436
|
+
configuration: first.configuration,
|
|
437
|
+
__self: this,
|
|
438
|
+
__source: {
|
|
439
|
+
fileName: _jsxFileName$3,
|
|
440
|
+
lineNumber: 25,
|
|
441
|
+
columnNumber: 7
|
|
442
|
+
}
|
|
443
|
+
}, /*#__PURE__*/React.createElement(PresenceProviders, {
|
|
444
|
+
widgets: rest,
|
|
445
|
+
__self: this,
|
|
446
|
+
__source: {
|
|
447
|
+
fileName: _jsxFileName$3,
|
|
448
|
+
lineNumber: 26,
|
|
449
|
+
columnNumber: 9
|
|
450
|
+
}
|
|
451
|
+
}, children));
|
|
452
|
+
}
|
|
453
|
+
return /*#__PURE__*/React.createElement(PresenceProviders, {
|
|
454
|
+
widgets: rest,
|
|
455
|
+
__self: this,
|
|
456
|
+
__source: {
|
|
457
|
+
fileName: _jsxFileName$3,
|
|
458
|
+
lineNumber: 34,
|
|
459
|
+
columnNumber: 5
|
|
460
|
+
}
|
|
461
|
+
}, children);
|
|
330
462
|
}
|
|
331
463
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
464
|
+
var _jsxFileName$4 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Entry.js";
|
|
465
|
+
const Entry = extensible('Entry', function Entry() {
|
|
466
|
+
return /*#__PURE__*/React.createElement(WidgetPresenceWrapper, {
|
|
467
|
+
__self: this,
|
|
468
|
+
__source: {
|
|
469
|
+
fileName: _jsxFileName$4,
|
|
470
|
+
lineNumber: 12,
|
|
471
|
+
columnNumber: 5
|
|
472
|
+
}
|
|
473
|
+
}, /*#__PURE__*/React.createElement(Widget, {
|
|
474
|
+
role: "consent",
|
|
475
|
+
__self: this,
|
|
476
|
+
__source: {
|
|
477
|
+
fileName: _jsxFileName$4,
|
|
478
|
+
lineNumber: 13,
|
|
479
|
+
columnNumber: 7
|
|
480
|
+
}
|
|
481
|
+
}), /*#__PURE__*/React.createElement(SelectableWidget, {
|
|
482
|
+
role: "header",
|
|
483
|
+
__self: this,
|
|
484
|
+
__source: {
|
|
485
|
+
fileName: _jsxFileName$4,
|
|
486
|
+
lineNumber: 14,
|
|
487
|
+
columnNumber: 7
|
|
488
|
+
}
|
|
489
|
+
}), /*#__PURE__*/React.createElement(Content, {
|
|
490
|
+
__self: this,
|
|
491
|
+
__source: {
|
|
492
|
+
fileName: _jsxFileName$4,
|
|
493
|
+
lineNumber: 15,
|
|
494
|
+
columnNumber: 7
|
|
495
|
+
}
|
|
496
|
+
}));
|
|
497
|
+
});
|
|
345
498
|
|
|
346
|
-
|
|
347
|
-
|
|
499
|
+
function loadInlineEditingExtensions() {
|
|
500
|
+
return import('./extensions-2318f92b.js').then(({
|
|
501
|
+
extensions
|
|
502
|
+
}) => {
|
|
503
|
+
provideExtensions(extensions);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
348
506
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}));
|
|
356
|
-
return _loadDashUnlessHlsSupported.apply(this, arguments);
|
|
507
|
+
function loadCommentingExtensions() {
|
|
508
|
+
return import( /* webpackPreload: true */'./extensions-c98269fd.js').then(({
|
|
509
|
+
extensions
|
|
510
|
+
}) => {
|
|
511
|
+
provideExtensions(extensions);
|
|
512
|
+
});
|
|
357
513
|
}
|
|
358
514
|
|
|
359
|
-
function
|
|
360
|
-
|
|
361
|
-
|
|
515
|
+
async function loadDashUnlessHlsSupported(seed) {
|
|
516
|
+
if (!hasHlsSupport({
|
|
517
|
+
seed,
|
|
518
|
+
agent: browser.agent
|
|
519
|
+
})) {
|
|
520
|
+
await import('@videojs/http-streaming');
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function hasHlsSupport({
|
|
524
|
+
agent,
|
|
525
|
+
seed
|
|
526
|
+
}) {
|
|
362
527
|
return agent.matchesSafari() || agent.matchesMobilePlatform() && (!agent.matchesAndroid() || hlsHostSupportedByAndroid(seed));
|
|
363
528
|
}
|
|
364
|
-
|
|
365
529
|
function hlsHostSupportedByAndroid(seed) {
|
|
366
530
|
return getFileUrlTemplateHost(seed, 'videoFiles', 'hls-playlist').indexOf('_') < 0;
|
|
367
531
|
}
|
|
368
532
|
|
|
369
|
-
|
|
533
|
+
const ActionButton = extensible('ActionButton', function ActionButton() {
|
|
370
534
|
return null;
|
|
371
535
|
});
|
|
372
536
|
|
|
373
|
-
var styles = {"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)","contentColorScope":"colors-module_contentColorScope__2Zizr","
|
|
537
|
+
var styles$1 = {"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)","contentColorScope":"colors-module_contentColorScope__2Zizr","root":"Figure-module_root__3FC-x colors-module_contentColorScope__2Zizr","invert":"Figure-module_invert___0BJP"};
|
|
538
|
+
|
|
539
|
+
var _jsxFileName$5 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Figure.js";
|
|
374
540
|
|
|
375
541
|
/**
|
|
376
542
|
* Render a figure with a caption text attached.
|
|
@@ -378,74 +544,112 @@ var styles = {"darkContentSurfaceColor":"var(--theme-dark-content-surface-color,
|
|
|
378
544
|
* @param {Object} props
|
|
379
545
|
* @param {string} props.children - Content of figure.
|
|
380
546
|
* @param {Object[]|string} props.caption - Formatted text data as provided by onCaptionChange.
|
|
547
|
+
* @param {string} [props.variant] - Name of figureCaption property scope to apply.
|
|
381
548
|
* @param {Function} props.onCaptionChange - Receives updated value when it changes.
|
|
382
549
|
* @param {boolean} [props.addCaptionButtonVisible=true] - Control visiblility of action button.
|
|
383
550
|
* @param {string} [props.captionButtonPosition='outside'] - Position of action button.
|
|
384
551
|
*/
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
setIsEditingCaption = _useState2[1];
|
|
404
|
-
|
|
405
|
-
var _useI18n = useI18n({
|
|
552
|
+
function Figure({
|
|
553
|
+
children,
|
|
554
|
+
variant,
|
|
555
|
+
caption,
|
|
556
|
+
onCaptionChange,
|
|
557
|
+
addCaptionButtonVisible = true,
|
|
558
|
+
addCaptionButtonPosition = 'outside',
|
|
559
|
+
renderInsideCaption
|
|
560
|
+
}) {
|
|
561
|
+
const darkBackground = useDarkBackground();
|
|
562
|
+
const {
|
|
563
|
+
isSelected,
|
|
564
|
+
isEditable
|
|
565
|
+
} = useContentElementEditorState();
|
|
566
|
+
const [isEditingCaption, setIsEditingCaption] = useState(false);
|
|
567
|
+
const {
|
|
568
|
+
t
|
|
569
|
+
} = useI18n({
|
|
406
570
|
locale: 'ui'
|
|
407
|
-
})
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
caption = useMemo(
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}] : caption;
|
|
417
|
-
}, [caption]);
|
|
418
|
-
|
|
571
|
+
});
|
|
572
|
+
const theme = useTheme();
|
|
573
|
+
const captionAbove = theme.options.figureCaptionPosition === 'above';
|
|
574
|
+
caption = useMemo(() => typeof caption === 'string' ? [{
|
|
575
|
+
type: 'paragraph',
|
|
576
|
+
children: [{
|
|
577
|
+
text: caption
|
|
578
|
+
}]
|
|
579
|
+
}] : caption, [caption]);
|
|
419
580
|
if (!isBlankEditableTextValue(caption) || isEditable) {
|
|
420
581
|
return /*#__PURE__*/React.createElement("figure", {
|
|
421
|
-
className: classNames(styles.root,
|
|
422
|
-
|
|
582
|
+
className: classNames(styles$1.root, {
|
|
583
|
+
[styles$1.invert]: !darkBackground
|
|
584
|
+
}),
|
|
585
|
+
__self: this,
|
|
586
|
+
__source: {
|
|
587
|
+
fileName: _jsxFileName$5,
|
|
588
|
+
lineNumber: 49,
|
|
589
|
+
columnNumber: 7
|
|
590
|
+
}
|
|
591
|
+
}, !captionAbove && children, isBlankEditableTextValue(caption) && isSelected && !isEditingCaption && addCaptionButtonVisible && /*#__PURE__*/React.createElement(ActionButton, {
|
|
423
592
|
position: addCaptionButtonPosition,
|
|
424
593
|
icon: "pencil",
|
|
425
594
|
text: t('pageflow_scrolled.inline_editing.add_caption'),
|
|
426
|
-
onClick:
|
|
427
|
-
|
|
595
|
+
onClick: () => setIsEditingCaption(true),
|
|
596
|
+
__self: this,
|
|
597
|
+
__source: {
|
|
598
|
+
fileName: _jsxFileName$5,
|
|
599
|
+
lineNumber: 53,
|
|
600
|
+
columnNumber: 10
|
|
428
601
|
}
|
|
429
602
|
}), (!isBlankEditableTextValue(caption) || isEditingCaption) && /*#__PURE__*/React.createElement("figcaption", {
|
|
430
|
-
|
|
431
|
-
|
|
603
|
+
className: classNames(variant && `scope-figureCaption-${variant}`),
|
|
604
|
+
onBlur: () => setIsEditingCaption(false),
|
|
605
|
+
__self: this,
|
|
606
|
+
__source: {
|
|
607
|
+
fileName: _jsxFileName$5,
|
|
608
|
+
lineNumber: 59,
|
|
609
|
+
columnNumber: 10
|
|
432
610
|
}
|
|
433
|
-
}, /*#__PURE__*/React.createElement(EditableText, {
|
|
611
|
+
}, renderInsideCaption === null || renderInsideCaption === void 0 ? void 0 : renderInsideCaption(), /*#__PURE__*/React.createElement(EditableText, {
|
|
434
612
|
autoFocus: isEditingCaption,
|
|
435
613
|
value: caption,
|
|
436
614
|
scaleCategory: "caption",
|
|
437
615
|
onChange: onCaptionChange,
|
|
438
616
|
onlyParagraphs: true,
|
|
439
617
|
hyphens: "none",
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
618
|
+
placeholder: t('pageflow_scrolled.inline_editing.type_text'),
|
|
619
|
+
__self: this,
|
|
620
|
+
__source: {
|
|
621
|
+
fileName: _jsxFileName$5,
|
|
622
|
+
lineNumber: 62,
|
|
623
|
+
columnNumber: 12
|
|
624
|
+
}
|
|
625
|
+
})), captionAbove && children);
|
|
443
626
|
} else {
|
|
444
627
|
return children;
|
|
445
628
|
}
|
|
446
629
|
}
|
|
447
630
|
|
|
448
|
-
var styles$
|
|
631
|
+
var styles$2 = {"properties":"ContentElementBox-module_properties__1ljc9","wrapper":"ContentElementBox-module_wrapper__3wZgP","full":"ContentElementBox-module_full__AfWPr","positioned":"ContentElementBox-module_positioned__3R1dq"};
|
|
632
|
+
|
|
633
|
+
function contentElementBoxProps(configuration, {
|
|
634
|
+
borderRadius
|
|
635
|
+
} = {}) {
|
|
636
|
+
return {
|
|
637
|
+
className: styles$2.properties,
|
|
638
|
+
style: {
|
|
639
|
+
...(borderRadius && borderRadius !== 'none' && {
|
|
640
|
+
'--content-element-box-border-radius': `var(--theme-content-element-box-border-radius-${borderRadius})`
|
|
641
|
+
}),
|
|
642
|
+
...((configuration === null || configuration === void 0 ? void 0 : configuration.boxShadow) && {
|
|
643
|
+
'--content-element-box-shadow': `var(--theme-content-element-box-shadow-${configuration.boxShadow})`
|
|
644
|
+
}),
|
|
645
|
+
...((configuration === null || configuration === void 0 ? void 0 : configuration.outlineColor) && {
|
|
646
|
+
'--content-element-box-outline-color': configuration.outlineColor
|
|
647
|
+
})
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
var _jsxFileName$6 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/ContentElementBox.js";
|
|
449
653
|
|
|
450
654
|
/**
|
|
451
655
|
* Wrap content element that render a visible box in this component to
|
|
@@ -453,105 +657,188 @@ var styles$1 = {"wrapper":"ContentElementBox-module_wrapper__3wZgP"};
|
|
|
453
657
|
*
|
|
454
658
|
* @param {Object} props
|
|
455
659
|
* @param {string} props.children - Content of box.
|
|
660
|
+
* @param {Object} [props.configuration] - Content element configuration. Used to read box shadow and outline styles.
|
|
661
|
+
* @param {string} [props.borderRadius] - Border radius value from theme scale, or "none" to render no wrapper.
|
|
456
662
|
*/
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
663
|
+
function ContentElementBox({
|
|
664
|
+
children,
|
|
665
|
+
configuration,
|
|
666
|
+
borderRadius,
|
|
667
|
+
positioned
|
|
668
|
+
}) {
|
|
669
|
+
const {
|
|
670
|
+
position,
|
|
671
|
+
width
|
|
672
|
+
} = useContentElementAttributes();
|
|
673
|
+
const {
|
|
674
|
+
style
|
|
675
|
+
} = contentElementBoxProps(configuration, {
|
|
676
|
+
borderRadius
|
|
677
|
+
});
|
|
678
|
+
if (position === 'backdrop') {
|
|
679
|
+
return children;
|
|
680
|
+
}
|
|
681
|
+
if (borderRadius === 'none' && !Object.keys(style).length) {
|
|
682
|
+
return children;
|
|
683
|
+
}
|
|
460
684
|
return /*#__PURE__*/React.createElement("div", {
|
|
461
|
-
className: styles$
|
|
685
|
+
className: classNames(styles$2.properties, styles$2.wrapper, {
|
|
686
|
+
[styles$2.full]: width === widths.full,
|
|
687
|
+
[styles$2.positioned]: positioned
|
|
688
|
+
}),
|
|
689
|
+
style: style,
|
|
690
|
+
__self: this,
|
|
691
|
+
__source: {
|
|
692
|
+
fileName: _jsxFileName$6,
|
|
693
|
+
lineNumber: 33,
|
|
694
|
+
columnNumber: 5
|
|
695
|
+
}
|
|
462
696
|
}, children);
|
|
463
697
|
}
|
|
464
698
|
|
|
699
|
+
var _jsxFileName$7 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/ContentElementFigure.js";
|
|
700
|
+
|
|
465
701
|
/**
|
|
466
702
|
* @param {Object} props
|
|
467
703
|
* @param {Object} props.configuration - Configuration of the content element.
|
|
468
704
|
* @param {string} props.children - Content of box.
|
|
469
705
|
*/
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
706
|
+
function ContentElementFigure({
|
|
707
|
+
configuration,
|
|
708
|
+
children
|
|
709
|
+
}) {
|
|
710
|
+
const updateConfiguration = useContentElementConfigurationUpdate();
|
|
711
|
+
const {
|
|
712
|
+
width,
|
|
713
|
+
position
|
|
714
|
+
} = useContentElementAttributes();
|
|
715
|
+
const {
|
|
716
|
+
isEditable
|
|
717
|
+
} = useContentElementEditorState();
|
|
718
|
+
if (position === 'backdrop') {
|
|
719
|
+
return children;
|
|
720
|
+
}
|
|
479
721
|
return /*#__PURE__*/React.createElement(Figure, {
|
|
480
722
|
caption: configuration.caption,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
723
|
+
variant: configuration.captionVariant,
|
|
724
|
+
renderInsideCaption: () => isEditable && /*#__PURE__*/React.createElement(HasCaptionTransientState, {
|
|
725
|
+
__self: this,
|
|
726
|
+
__source: {
|
|
727
|
+
fileName: _jsxFileName$7,
|
|
728
|
+
lineNumber: 26,
|
|
729
|
+
columnNumber: 54
|
|
730
|
+
}
|
|
731
|
+
}),
|
|
732
|
+
onCaptionChange: caption => updateConfiguration({
|
|
733
|
+
caption
|
|
734
|
+
}),
|
|
735
|
+
addCaptionButtonPosition: width === widths.full ? 'outsideIndented' : 'outside',
|
|
736
|
+
__self: this,
|
|
737
|
+
__source: {
|
|
738
|
+
fileName: _jsxFileName$7,
|
|
739
|
+
lineNumber: 24,
|
|
740
|
+
columnNumber: 5
|
|
741
|
+
}
|
|
487
742
|
}, children);
|
|
488
743
|
}
|
|
744
|
+
function HasCaptionTransientState() {
|
|
745
|
+
const {
|
|
746
|
+
setTransientState
|
|
747
|
+
} = useContentElementEditorState();
|
|
748
|
+
useEffect(() => {
|
|
749
|
+
setTransientState({
|
|
750
|
+
hasCaption: true
|
|
751
|
+
});
|
|
752
|
+
return () => setTransientState({
|
|
753
|
+
hasCaption: false
|
|
754
|
+
});
|
|
755
|
+
}, [setTransientState]);
|
|
756
|
+
return null;
|
|
757
|
+
}
|
|
489
758
|
|
|
490
|
-
function
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
759
|
+
function processImageModifiers(imageModifiers) {
|
|
760
|
+
const cropValue = getModifierValue(imageModifiers, 'crop');
|
|
761
|
+
const isCircleCrop = cropValue === 'circle';
|
|
762
|
+
return {
|
|
763
|
+
aspectRatio: isCircleCrop ? 'square' : cropValue,
|
|
764
|
+
rounded: isCircleCrop ? 'circle' : getModifierValue(imageModifiers, 'rounded')
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
function getModifierValue(imageModifiers, name) {
|
|
768
|
+
var _find;
|
|
769
|
+
return (_find = (imageModifiers || []).find(imageModifier => imageModifier.name === name)) === null || _find === void 0 ? void 0 : _find.value;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
function useFileWithCropPosition(file, cropPosition) {
|
|
773
|
+
return file && {
|
|
774
|
+
...file,
|
|
775
|
+
cropPosition
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
var _jsxFileName$8 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/MediaInteractionTracking.js";
|
|
780
|
+
function MediaInteractionTracking({
|
|
781
|
+
playerState,
|
|
782
|
+
playerActions,
|
|
783
|
+
idleDelay,
|
|
784
|
+
children
|
|
785
|
+
}) {
|
|
786
|
+
const hideControlsTimeout = useRef();
|
|
787
|
+
const wasPlaying = usePrevious(playerState.isPlaying);
|
|
788
|
+
const focusWasInside = usePrevious(playerState.focusInsideControls);
|
|
789
|
+
const setHideControlsTimeout = useCallback(() => {
|
|
499
790
|
clearTimeout(hideControlsTimeout.current);
|
|
500
791
|
hideControlsTimeout.current = setTimeout(playerActions.userIdle, idleDelay);
|
|
501
792
|
}, [playerActions.userIdle, idleDelay]);
|
|
502
|
-
useEffect(
|
|
793
|
+
useEffect(() => {
|
|
503
794
|
if (!wasPlaying && playerState.isPlaying || focusWasInside !== playerState.focusInsideControls) {
|
|
504
795
|
setHideControlsTimeout();
|
|
505
796
|
}
|
|
506
797
|
}, [wasPlaying, playerState.isPlaying, setHideControlsTimeout, playerState.focusInsideControls, focusWasInside]);
|
|
507
|
-
useEffect(
|
|
508
|
-
return
|
|
509
|
-
return clearTimeout(hideControlsTimeout.current);
|
|
510
|
-
};
|
|
798
|
+
useEffect(() => {
|
|
799
|
+
return () => clearTimeout(hideControlsTimeout.current);
|
|
511
800
|
}, []);
|
|
512
|
-
|
|
513
|
-
var handleInteraction = function handleInteraction() {
|
|
801
|
+
const handleInteraction = function () {
|
|
514
802
|
playerActions.userInteraction();
|
|
515
803
|
setHideControlsTimeout();
|
|
516
804
|
};
|
|
517
|
-
|
|
518
805
|
return /*#__PURE__*/React.createElement("div", {
|
|
519
806
|
onClick: handleInteraction,
|
|
520
807
|
onMouseMove: handleInteraction,
|
|
521
808
|
onMouseEnter: playerActions.mouseEntered,
|
|
522
|
-
onMouseLeave: playerActions.mouseLeft
|
|
809
|
+
onMouseLeave: playerActions.mouseLeft,
|
|
810
|
+
__self: this,
|
|
811
|
+
__source: {
|
|
812
|
+
fileName: _jsxFileName$8,
|
|
813
|
+
lineNumber: 32,
|
|
814
|
+
columnNumber: 5
|
|
815
|
+
}
|
|
523
816
|
}, children);
|
|
524
817
|
}
|
|
525
818
|
MediaInteractionTracking.defaultProps = {
|
|
526
819
|
idleDelay: 2000
|
|
527
820
|
};
|
|
528
821
|
|
|
529
|
-
function RemotePeakData(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
peakData = _useState2[0],
|
|
537
|
-
setPeakData = _useState2[1];
|
|
538
|
-
|
|
539
|
-
useEffect(function () {
|
|
822
|
+
function RemotePeakData({
|
|
823
|
+
audioFile,
|
|
824
|
+
children
|
|
825
|
+
}) {
|
|
826
|
+
const peakDataUrl = audioFile === null || audioFile === void 0 ? void 0 : audioFile.urls.peakData;
|
|
827
|
+
const [peakData, setPeakData] = useState('pending');
|
|
828
|
+
useEffect(() => {
|
|
540
829
|
if (peakDataUrl) {
|
|
541
|
-
fetch(peakDataUrl).then(
|
|
830
|
+
fetch(peakDataUrl).then(response => {
|
|
542
831
|
if (!response.ok) {
|
|
543
|
-
throw new Error(
|
|
832
|
+
throw new Error(`HTTP error ${response.status} while loading peaks.`);
|
|
544
833
|
}
|
|
545
|
-
|
|
546
834
|
return response.json();
|
|
547
|
-
}).then(
|
|
835
|
+
}).then(peaks => {
|
|
548
836
|
setPeakData(peaks.data);
|
|
549
837
|
});
|
|
550
838
|
} else {
|
|
551
839
|
setPeakData(null);
|
|
552
840
|
}
|
|
553
841
|
}, [peakDataUrl]);
|
|
554
|
-
|
|
555
842
|
if (peakData === 'pending') {
|
|
556
843
|
return null;
|
|
557
844
|
} else {
|
|
@@ -559,16 +846,16 @@ function RemotePeakData(_ref) {
|
|
|
559
846
|
}
|
|
560
847
|
}
|
|
561
848
|
|
|
562
|
-
|
|
849
|
+
const defaultRemainingWaveformColor = '#828282ed';
|
|
850
|
+
const defaultRemainingWaveformColorInverted = 'rgba(0, 0, 0, 0.5)';
|
|
851
|
+
const defaultWaveformCursorColor = '#fff';
|
|
852
|
+
const defaultWaveformCursorColorInverted = '#888';
|
|
563
853
|
|
|
564
|
-
var
|
|
565
|
-
|
|
566
|
-
var
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
return import('./Wavesurfer-7d9cf1b7.js');
|
|
570
|
-
});
|
|
571
|
-
var waveformStyles = {
|
|
854
|
+
var styles$3 = {"container":"Waveform-module_container__1Dxdv","clickMask":"Waveform-module_clickMask__3LYAT","menuBar":"Waveform-module_menuBar__342n-","menuBarInner":"Waveform-module_menuBarInner__3wjQs","timeDisplay":"Waveform-module_timeDisplay__1v4Tl","playControl":"Waveform-module_playControl__QWTsJ","invertPlayButton":"Waveform-module_invertPlayButton__kfCbL","waveWrapper":"Waveform-module_waveWrapper__3gamc"};
|
|
855
|
+
|
|
856
|
+
var _jsxFileName$9 = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/WaveformPlayerControls/Waveform.js";
|
|
857
|
+
const Wavesurfer = React.lazy(() => import('./Wavesurfer-b753b838.js'));
|
|
858
|
+
const waveformStyles = {
|
|
572
859
|
waveformLines: {
|
|
573
860
|
barWidth: 1,
|
|
574
861
|
barGap: 2
|
|
@@ -580,672 +867,976 @@ var waveformStyles = {
|
|
|
580
867
|
}
|
|
581
868
|
};
|
|
582
869
|
function Waveform(props) {
|
|
583
|
-
|
|
584
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
585
|
-
height = _useState2[0],
|
|
586
|
-
setHeight = _useState2[1];
|
|
587
|
-
|
|
870
|
+
const [height, setHeight] = useState(90);
|
|
588
871
|
if (props.mediaElementId) {
|
|
589
872
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
590
|
-
fallback: /*#__PURE__*/React.createElement("div",
|
|
873
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
874
|
+
__self: this,
|
|
875
|
+
__source: {
|
|
876
|
+
fileName: _jsxFileName$9,
|
|
877
|
+
lineNumber: 34,
|
|
878
|
+
columnNumber: 27
|
|
879
|
+
}
|
|
880
|
+
}),
|
|
881
|
+
__self: this,
|
|
882
|
+
__source: {
|
|
883
|
+
fileName: _jsxFileName$9,
|
|
884
|
+
lineNumber: 34,
|
|
885
|
+
columnNumber: 7
|
|
886
|
+
}
|
|
591
887
|
}, /*#__PURE__*/React.createElement(Measure, {
|
|
592
888
|
client: true,
|
|
593
|
-
onResize:
|
|
594
|
-
|
|
889
|
+
onResize: contentRect => setHeight(contentRect.client.height),
|
|
890
|
+
__self: this,
|
|
891
|
+
__source: {
|
|
892
|
+
fileName: _jsxFileName$9,
|
|
893
|
+
lineNumber: 35,
|
|
894
|
+
columnNumber: 9
|
|
595
895
|
}
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
896
|
+
}, ({
|
|
897
|
+
measureRef
|
|
898
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
899
|
+
ref: measureRef,
|
|
900
|
+
className: styles$3.waveWrapper,
|
|
901
|
+
__self: this,
|
|
902
|
+
__source: {
|
|
903
|
+
fileName: _jsxFileName$9,
|
|
904
|
+
lineNumber: 37,
|
|
905
|
+
columnNumber: 13
|
|
906
|
+
}
|
|
907
|
+
}, /*#__PURE__*/React.createElement(RemotePeakData, {
|
|
908
|
+
audioFile: props.audioFile,
|
|
909
|
+
__self: this,
|
|
910
|
+
__source: {
|
|
911
|
+
fileName: _jsxFileName$9,
|
|
912
|
+
lineNumber: 38,
|
|
913
|
+
columnNumber: 15
|
|
914
|
+
}
|
|
915
|
+
}, peakData => /*#__PURE__*/React.createElement(Wavesurfer, {
|
|
916
|
+
key: props.variant,
|
|
917
|
+
mediaElt: `#${props.mediaElementId}`,
|
|
918
|
+
audioPeaks: peakData,
|
|
919
|
+
options: {
|
|
920
|
+
...waveformStyles[props.variant],
|
|
921
|
+
normalize: true,
|
|
922
|
+
removeMediaElementOnDestroy: false,
|
|
923
|
+
hideScrollbar: true,
|
|
924
|
+
progressColor: props.progressWaveformColor || props.mainColor,
|
|
925
|
+
waveColor: props.remainingWaveformColor || (props.inverted ? defaultRemainingWaveformColorInverted : defaultRemainingWaveformColor),
|
|
926
|
+
cursorColor: props.waveformCursorColor || (props.inverted ? defaultWaveformCursorColorInverted : defaultWaveformCursorColor),
|
|
927
|
+
height
|
|
928
|
+
},
|
|
929
|
+
__self: this,
|
|
930
|
+
__source: {
|
|
931
|
+
fileName: _jsxFileName$9,
|
|
932
|
+
lineNumber: 40,
|
|
933
|
+
columnNumber: 19
|
|
934
|
+
}
|
|
935
|
+
})))));
|
|
620
936
|
} else {
|
|
621
937
|
return null;
|
|
622
938
|
}
|
|
623
939
|
}
|
|
624
940
|
|
|
625
|
-
var styles$
|
|
941
|
+
var styles$4 = {"timeDisplay":"TimeDisplay-module_timeDisplay__2UwqM","time":"TimeDisplay-module_time__li1ZU"};
|
|
626
942
|
|
|
627
|
-
|
|
943
|
+
const unknownTimePlaceholder = '-:--';
|
|
628
944
|
function formatTime(value) {
|
|
629
945
|
if (isNaN(value)) {
|
|
630
946
|
return unknownTimePlaceholder;
|
|
631
947
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
var hours = Math.floor(value / 60 / 60);
|
|
636
|
-
|
|
948
|
+
const seconds = Math.floor(value) % 60;
|
|
949
|
+
const minutes = Math.floor(value / 60) % 60;
|
|
950
|
+
const hours = Math.floor(value / 60 / 60);
|
|
637
951
|
if (hours > 0) {
|
|
638
|
-
return
|
|
952
|
+
return `${hours}:${pad(minutes)}:${pad(seconds)}`;
|
|
639
953
|
} else {
|
|
640
|
-
return
|
|
954
|
+
return `${minutes}:${pad(seconds)}`;
|
|
641
955
|
}
|
|
642
956
|
}
|
|
643
|
-
|
|
644
957
|
function pad(value) {
|
|
645
958
|
return value < 10 ? '0' + value : value;
|
|
646
959
|
}
|
|
647
960
|
|
|
961
|
+
var _jsxFileName$a = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/TimeDisplay.js";
|
|
648
962
|
function TimeDisplay(props) {
|
|
649
963
|
return /*#__PURE__*/React.createElement("div", {
|
|
650
964
|
"data-testid": 'time-display',
|
|
651
|
-
className: styles$
|
|
965
|
+
className: styles$4.timeDisplay,
|
|
966
|
+
__self: this,
|
|
967
|
+
__source: {
|
|
968
|
+
fileName: _jsxFileName$a,
|
|
969
|
+
lineNumber: 8,
|
|
970
|
+
columnNumber: 5
|
|
971
|
+
}
|
|
652
972
|
}, /*#__PURE__*/React.createElement("span", {
|
|
653
|
-
className: styles$
|
|
973
|
+
className: styles$4.time,
|
|
974
|
+
__self: this,
|
|
975
|
+
__source: {
|
|
976
|
+
fileName: _jsxFileName$a,
|
|
977
|
+
lineNumber: 9,
|
|
978
|
+
columnNumber: 7
|
|
979
|
+
}
|
|
654
980
|
}, formatTime(props.currentTime)), "/", /*#__PURE__*/React.createElement("span", {
|
|
655
|
-
className: styles$
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
function _extends() {
|
|
662
|
-
_extends = Object.assign || function (target) {
|
|
663
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
664
|
-
var source = arguments[i];
|
|
665
|
-
|
|
666
|
-
for (var key in source) {
|
|
667
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
668
|
-
target[key] = source[key];
|
|
669
|
-
}
|
|
670
|
-
}
|
|
981
|
+
className: styles$4.time,
|
|
982
|
+
__self: this,
|
|
983
|
+
__source: {
|
|
984
|
+
fileName: _jsxFileName$a,
|
|
985
|
+
lineNumber: 11,
|
|
986
|
+
columnNumber: 7
|
|
671
987
|
}
|
|
672
|
-
|
|
673
|
-
return target;
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
return _extends.apply(this, arguments);
|
|
988
|
+
}, formatTime(props.duration)));
|
|
677
989
|
}
|
|
678
|
-
var CheckIcon = (function (_ref) {
|
|
679
|
-
var _ref$styles = _ref.styles,
|
|
680
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
681
990
|
|
|
682
|
-
|
|
683
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
684
|
-
width: "24",
|
|
685
|
-
height: "24",
|
|
686
|
-
viewBox: "0 0 512 512"
|
|
687
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
688
|
-
d: "M434.442 58.997L195.559 297.881 77.554 179.88 0 257.438l195.559 195.565L512 136.551z"
|
|
689
|
-
}));
|
|
690
|
-
});
|
|
991
|
+
var styles$5 = {"wrapper":"MenuBarButton-module_wrapper__2lFoI","button":"MenuBarButton-module_button__2sY0F ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne","subMenuItemAnnotation":"MenuBarButton-module_subMenuItemAnnotation__32Quc","subMenu":"MenuBarButton-module_subMenu__f-E-X","subMenuExpanded":"MenuBarButton-module_subMenuExpanded__2UvkJ","subMenuItem":"MenuBarButton-module_subMenuItem__1pyn_","subMenuItemButton":"MenuBarButton-module_subMenuItemButton__2QnUz utils-module_unstyledButton__3rgne"};
|
|
691
992
|
|
|
993
|
+
var _jsxFileName$b = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/MenuBarButton.js";
|
|
692
994
|
function MenuBarButton(props) {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
var closeMenuTimeout = useRef();
|
|
702
|
-
var openMenu = useCallback(function () {
|
|
995
|
+
const {
|
|
996
|
+
subMenuItems,
|
|
997
|
+
onClick
|
|
998
|
+
} = props;
|
|
999
|
+
const [subMenuExpanded, setSubMenuExpanded] = useState(props.subMenuExpanded);
|
|
1000
|
+
const closeMenuTimeout = useRef();
|
|
1001
|
+
const openMenu = useCallback(() => {
|
|
703
1002
|
if (subMenuItems.length > 0) {
|
|
704
1003
|
setSubMenuExpanded(true);
|
|
705
1004
|
}
|
|
706
1005
|
}, [subMenuItems.length]);
|
|
707
|
-
|
|
1006
|
+
const closeMenu = useCallback(() => {
|
|
708
1007
|
setSubMenuExpanded(false);
|
|
709
1008
|
}, []);
|
|
710
|
-
|
|
1009
|
+
const onButtonClick = useCallback(event => {
|
|
711
1010
|
openMenu();
|
|
712
|
-
|
|
713
1011
|
if (onClick) {
|
|
714
1012
|
onClick();
|
|
715
1013
|
}
|
|
716
1014
|
}, [onClick, openMenu]);
|
|
717
|
-
|
|
1015
|
+
const onFocus = useCallback(() => {
|
|
718
1016
|
clearTimeout(closeMenuTimeout.current);
|
|
719
1017
|
}, []);
|
|
720
|
-
|
|
1018
|
+
const onBlur = useCallback(() => {
|
|
721
1019
|
clearTimeout(closeMenuTimeout.current);
|
|
722
|
-
closeMenuTimeout.current = setTimeout(
|
|
1020
|
+
closeMenuTimeout.current = setTimeout(() => {
|
|
723
1021
|
setSubMenuExpanded(false);
|
|
724
1022
|
}, 100);
|
|
725
1023
|
}, []);
|
|
726
|
-
|
|
1024
|
+
const onKeyDown = useCallback(event => {
|
|
727
1025
|
if (event.key === 'Escape') {
|
|
728
1026
|
setSubMenuExpanded(false);
|
|
729
1027
|
}
|
|
730
1028
|
}, []);
|
|
731
1029
|
return /*#__PURE__*/React.createElement("div", {
|
|
732
|
-
className: classNames(
|
|
1030
|
+
className: classNames({
|
|
1031
|
+
[styles$5.subMenuExpanded]: subMenuExpanded
|
|
1032
|
+
}, styles$5.wrapper),
|
|
733
1033
|
onMouseEnter: openMenu,
|
|
734
1034
|
onMouseLeave: closeMenu,
|
|
735
1035
|
onFocus: onFocus,
|
|
736
1036
|
onBlur: onBlur,
|
|
737
|
-
onKeyDown: onKeyDown
|
|
1037
|
+
onKeyDown: onKeyDown,
|
|
1038
|
+
__self: this,
|
|
1039
|
+
__source: {
|
|
1040
|
+
fileName: _jsxFileName$b,
|
|
1041
|
+
lineNumber: 53,
|
|
1042
|
+
columnNumber: 5
|
|
1043
|
+
}
|
|
738
1044
|
}, /*#__PURE__*/React.createElement("button", {
|
|
739
|
-
className: styles$
|
|
1045
|
+
className: styles$5.button,
|
|
740
1046
|
title: props.title,
|
|
741
|
-
onClick: onButtonClick
|
|
742
|
-
|
|
743
|
-
|
|
1047
|
+
onClick: onButtonClick,
|
|
1048
|
+
__self: this,
|
|
1049
|
+
__source: {
|
|
1050
|
+
fileName: _jsxFileName$b,
|
|
1051
|
+
lineNumber: 59,
|
|
1052
|
+
columnNumber: 7
|
|
1053
|
+
}
|
|
1054
|
+
}, /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
1055
|
+
name: props.icon,
|
|
1056
|
+
__self: this,
|
|
1057
|
+
__source: {
|
|
1058
|
+
fileName: _jsxFileName$b,
|
|
1059
|
+
lineNumber: 62,
|
|
1060
|
+
columnNumber: 9
|
|
1061
|
+
}
|
|
744
1062
|
})), renderSubMenu(props, closeMenu));
|
|
745
1063
|
}
|
|
1064
|
+
MenuBarButton.propTypes = {
|
|
1065
|
+
title: PropTypes.string,
|
|
1066
|
+
icon: PropTypes.string,
|
|
1067
|
+
subMenuItems: PropTypes.arrayOf(PropTypes.shape({
|
|
1068
|
+
label: PropTypes.string.isRequired,
|
|
1069
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
1070
|
+
annotation: PropTypes.string,
|
|
1071
|
+
active: PropTypes.bool
|
|
1072
|
+
})),
|
|
1073
|
+
onClick: PropTypes.func,
|
|
1074
|
+
onSubMenuItemClick: PropTypes.func
|
|
1075
|
+
};
|
|
746
1076
|
MenuBarButton.defaultProps = {
|
|
747
1077
|
subMenuItems: []
|
|
748
1078
|
};
|
|
749
|
-
|
|
750
1079
|
function renderSubMenu(props, closeMenu) {
|
|
751
1080
|
if (props.subMenuItems.length > 0) {
|
|
752
1081
|
return /*#__PURE__*/React.createElement("ul", {
|
|
753
|
-
className: styles$
|
|
754
|
-
role: "menu"
|
|
1082
|
+
className: styles$5.subMenu,
|
|
1083
|
+
role: "menu",
|
|
1084
|
+
__self: this,
|
|
1085
|
+
__source: {
|
|
1086
|
+
fileName: _jsxFileName$b,
|
|
1087
|
+
lineNumber: 94,
|
|
1088
|
+
columnNumber: 7
|
|
1089
|
+
}
|
|
755
1090
|
}, renderSubMenuItems(props, closeMenu));
|
|
756
1091
|
}
|
|
757
1092
|
}
|
|
758
|
-
|
|
759
1093
|
function renderSubMenuItems(props, closeMenu) {
|
|
760
|
-
return props.subMenuItems.map(
|
|
1094
|
+
return props.subMenuItems.map(item => {
|
|
761
1095
|
return /*#__PURE__*/React.createElement("li", {
|
|
762
|
-
className: styles$
|
|
763
|
-
key: item.value
|
|
1096
|
+
className: styles$5.subMenuItem,
|
|
1097
|
+
key: item.value,
|
|
1098
|
+
__self: this,
|
|
1099
|
+
__source: {
|
|
1100
|
+
fileName: _jsxFileName$b,
|
|
1101
|
+
lineNumber: 104,
|
|
1102
|
+
columnNumber: 7
|
|
1103
|
+
}
|
|
764
1104
|
}, /*#__PURE__*/React.createElement("button", {
|
|
765
|
-
className: styles$
|
|
1105
|
+
className: styles$5.subMenuItemButton,
|
|
766
1106
|
role: "menuitemradio",
|
|
767
1107
|
"aria-checked": item.active,
|
|
768
|
-
onClick: subMenuItemClickHandler(props, item.value, closeMenu)
|
|
1108
|
+
onClick: subMenuItemClickHandler(props, item.value, closeMenu),
|
|
1109
|
+
__self: this,
|
|
1110
|
+
__source: {
|
|
1111
|
+
fileName: _jsxFileName$b,
|
|
1112
|
+
lineNumber: 105,
|
|
1113
|
+
columnNumber: 9
|
|
1114
|
+
}
|
|
769
1115
|
}, renderSubMenuItemIcon(item), item.label, renderSubMenuItemAnnotation(props, item)));
|
|
770
1116
|
});
|
|
771
1117
|
}
|
|
772
|
-
|
|
773
1118
|
function renderSubMenuItemIcon(item) {
|
|
774
1119
|
if (item.active) {
|
|
775
|
-
return /*#__PURE__*/React.createElement(
|
|
776
|
-
|
|
1120
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
1121
|
+
name: "checked",
|
|
1122
|
+
__self: this,
|
|
1123
|
+
__source: {
|
|
1124
|
+
fileName: _jsxFileName$b,
|
|
1125
|
+
lineNumber: 122,
|
|
1126
|
+
columnNumber: 7
|
|
1127
|
+
}
|
|
777
1128
|
});
|
|
778
1129
|
}
|
|
779
1130
|
}
|
|
780
|
-
|
|
781
1131
|
function renderSubMenuItemAnnotation(props, item) {
|
|
782
1132
|
if (item.annotation) {
|
|
783
1133
|
return /*#__PURE__*/React.createElement("span", {
|
|
784
|
-
className: styles$
|
|
1134
|
+
className: styles$5.subMenuItemAnnotation,
|
|
1135
|
+
__self: this,
|
|
1136
|
+
__source: {
|
|
1137
|
+
fileName: _jsxFileName$b,
|
|
1138
|
+
lineNumber: 130,
|
|
1139
|
+
columnNumber: 7
|
|
1140
|
+
}
|
|
785
1141
|
}, item.annotation);
|
|
786
1142
|
}
|
|
787
1143
|
}
|
|
788
|
-
|
|
789
1144
|
function subMenuItemClickHandler(props, value, closeMenu) {
|
|
790
|
-
return
|
|
1145
|
+
return event => {
|
|
791
1146
|
event.preventDefault();
|
|
792
1147
|
closeMenu();
|
|
793
|
-
|
|
794
1148
|
if (props.onSubMenuItemClick) {
|
|
795
1149
|
props.onSubMenuItemClick(value);
|
|
796
1150
|
}
|
|
797
1151
|
};
|
|
798
1152
|
}
|
|
799
1153
|
|
|
800
|
-
|
|
801
|
-
_extends$1 = Object.assign || function (target) {
|
|
802
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
803
|
-
var source = arguments[i];
|
|
804
|
-
|
|
805
|
-
for (var key in source) {
|
|
806
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
807
|
-
target[key] = source[key];
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
return target;
|
|
813
|
-
};
|
|
814
|
-
|
|
815
|
-
return _extends$1.apply(this, arguments);
|
|
816
|
-
}
|
|
817
|
-
var TextTracksIcon = (function (_ref) {
|
|
818
|
-
var _ref$styles = _ref.styles,
|
|
819
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
820
|
-
|
|
821
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
822
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
823
|
-
viewBox: "-3 -3 30 30"
|
|
824
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
825
|
-
d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"
|
|
826
|
-
}));
|
|
827
|
-
});
|
|
828
|
-
|
|
1154
|
+
var _jsxFileName$c = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/TextTracksMenu.js";
|
|
829
1155
|
function TextTracksMenu(props) {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
1156
|
+
const {
|
|
1157
|
+
t
|
|
1158
|
+
} = useI18n();
|
|
833
1159
|
if (props.items.length < 2) {
|
|
834
1160
|
return null;
|
|
835
1161
|
}
|
|
836
|
-
|
|
837
1162
|
return /*#__PURE__*/React.createElement(MenuBarButton, {
|
|
838
1163
|
title: t('pageflow_scrolled.public.player_controls.text_tracks'),
|
|
839
|
-
icon:
|
|
1164
|
+
icon: "textTracks",
|
|
840
1165
|
subMenuItems: props.items,
|
|
841
|
-
onSubMenuItemClick: props.onItemClick
|
|
1166
|
+
onSubMenuItemClick: props.onItemClick,
|
|
1167
|
+
__self: this,
|
|
1168
|
+
__source: {
|
|
1169
|
+
fileName: _jsxFileName$c,
|
|
1170
|
+
lineNumber: 15,
|
|
1171
|
+
columnNumber: 5
|
|
1172
|
+
}
|
|
842
1173
|
});
|
|
843
1174
|
}
|
|
1175
|
+
TextTracksMenu.propTypes = {
|
|
1176
|
+
items: MenuBarButton.propTypes.subMenuItems,
|
|
1177
|
+
onMenuItemClick: PropTypes.func
|
|
1178
|
+
};
|
|
844
1179
|
TextTracksMenu.defaultProps = {
|
|
845
1180
|
items: []
|
|
846
1181
|
};
|
|
847
1182
|
|
|
848
|
-
var styles$
|
|
849
|
-
|
|
850
|
-
function _extends$2() {
|
|
851
|
-
_extends$2 = Object.assign || function (target) {
|
|
852
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
853
|
-
var source = arguments[i];
|
|
854
|
-
|
|
855
|
-
for (var key in source) {
|
|
856
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
857
|
-
target[key] = source[key];
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
return target;
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
return _extends$2.apply(this, arguments);
|
|
866
|
-
}
|
|
867
|
-
var PlayIcon = (function (_ref) {
|
|
868
|
-
var _ref$styles = _ref.styles,
|
|
869
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
870
|
-
|
|
871
|
-
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
872
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
873
|
-
viewBox: "0 0 24 24"
|
|
874
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
875
|
-
d: "M8 5v14l11-7z"
|
|
876
|
-
}));
|
|
877
|
-
});
|
|
878
|
-
|
|
879
|
-
function _extends$3() {
|
|
880
|
-
_extends$3 = Object.assign || function (target) {
|
|
881
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
882
|
-
var source = arguments[i];
|
|
883
|
-
|
|
884
|
-
for (var key in source) {
|
|
885
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
886
|
-
target[key] = source[key];
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
return target;
|
|
892
|
-
};
|
|
893
|
-
|
|
894
|
-
return _extends$3.apply(this, arguments);
|
|
895
|
-
}
|
|
896
|
-
var PauseIcon = (function (_ref) {
|
|
897
|
-
var _ref$styles = _ref.styles,
|
|
898
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
899
|
-
|
|
900
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
901
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
902
|
-
viewBox: "0 0 24 24"
|
|
903
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
904
|
-
d: "M6 19h4V5H6v14zm8-14v14h4V5h-4z"
|
|
905
|
-
}));
|
|
906
|
-
});
|
|
1183
|
+
var styles$6 = {"container":"ControlBar-module_container__1GH64","sticky":"ControlBar-module_sticky__6qVoI","lightBackground":"ControlBar-module_lightBackground__3-tGf","darkBackground":"ControlBar-module_darkBackground__31Wv7","controlBarContainer":"ControlBar-module_controlBarContainer__1cxRO","inset":"ControlBar-module_inset__JvBh9","controlBarInner":"ControlBar-module_controlBarInner__39fE9","fadedOut":"ControlBar-module_fadedOut__2sP_3","button":"ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne","playControl":"ControlBar-module_playControl__Vg5et ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne"};
|
|
907
1184
|
|
|
1185
|
+
var _jsxFileName$d = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/PlayPauseButton.js";
|
|
908
1186
|
function PlayPauseButton(props) {
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
1187
|
+
const {
|
|
1188
|
+
t
|
|
1189
|
+
} = useI18n();
|
|
912
1190
|
return /*#__PURE__*/React.createElement("button", {
|
|
913
|
-
className: styles$
|
|
1191
|
+
className: styles$6.playControl,
|
|
914
1192
|
"aria-label": t(props.isPlaying ? 'pause' : 'play', {
|
|
915
1193
|
scope: 'pageflow_scrolled.public.player_controls'
|
|
916
1194
|
}),
|
|
917
|
-
onClick:
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1195
|
+
onClick: () => props.isPlaying ? props.pause({
|
|
1196
|
+
via: 'playPauseButton'
|
|
1197
|
+
}) : props.play({
|
|
1198
|
+
via: 'playPauseButton'
|
|
1199
|
+
}),
|
|
1200
|
+
__self: this,
|
|
1201
|
+
__source: {
|
|
1202
|
+
fileName: _jsxFileName$d,
|
|
1203
|
+
lineNumber: 10,
|
|
1204
|
+
columnNumber: 5
|
|
923
1205
|
}
|
|
924
1206
|
}, pausePlayIcon(props));
|
|
925
1207
|
}
|
|
926
|
-
|
|
927
1208
|
function pausePlayIcon(props) {
|
|
928
1209
|
if (props.isPlaying) {
|
|
929
|
-
return /*#__PURE__*/React.createElement(
|
|
930
|
-
|
|
1210
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
1211
|
+
name: "pause",
|
|
1212
|
+
__self: this,
|
|
1213
|
+
__source: {
|
|
1214
|
+
fileName: _jsxFileName$d,
|
|
1215
|
+
lineNumber: 23,
|
|
1216
|
+
columnNumber: 12
|
|
1217
|
+
}
|
|
931
1218
|
});
|
|
932
1219
|
} else {
|
|
933
|
-
return /*#__PURE__*/React.createElement(
|
|
934
|
-
|
|
1220
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
1221
|
+
name: "play",
|
|
1222
|
+
__self: this,
|
|
1223
|
+
__source: {
|
|
1224
|
+
fileName: _jsxFileName$d,
|
|
1225
|
+
lineNumber: 25,
|
|
1226
|
+
columnNumber: 12
|
|
1227
|
+
}
|
|
935
1228
|
});
|
|
936
1229
|
}
|
|
937
1230
|
}
|
|
938
1231
|
|
|
1232
|
+
var _jsxFileName$e = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/WaveformPlayerControls/index.js";
|
|
939
1233
|
function WaveformPlayerControls(props) {
|
|
940
|
-
var
|
|
941
|
-
|
|
1234
|
+
var _theme$options$proper, _theme$options$proper2, _theme$options$colors;
|
|
1235
|
+
const darkBackground = useDarkBackground();
|
|
1236
|
+
const theme = useTheme();
|
|
942
1237
|
return /*#__PURE__*/React.createElement("div", {
|
|
943
1238
|
onFocus: props.onFocus,
|
|
944
1239
|
onBlur: props.onBlur,
|
|
945
1240
|
onMouseEnter: props.onMouseEnter,
|
|
946
1241
|
onMouseLeave: props.onMouseLeave,
|
|
947
1242
|
"data-testid": "waveform-controls",
|
|
948
|
-
className: classNames(styles$
|
|
1243
|
+
className: classNames(styles$3.container),
|
|
1244
|
+
__self: this,
|
|
1245
|
+
__source: {
|
|
1246
|
+
fileName: _jsxFileName$e,
|
|
1247
|
+
lineNumber: 20,
|
|
1248
|
+
columnNumber: 5
|
|
1249
|
+
}
|
|
949
1250
|
}, props.children, /*#__PURE__*/React.createElement("div", {
|
|
950
|
-
className: styles$
|
|
951
|
-
onClick: props.onPlayerClick
|
|
1251
|
+
className: styles$3.clickMask,
|
|
1252
|
+
onClick: props.onPlayerClick,
|
|
1253
|
+
__self: this,
|
|
1254
|
+
__source: {
|
|
1255
|
+
fileName: _jsxFileName$e,
|
|
1256
|
+
lineNumber: 27,
|
|
1257
|
+
columnNumber: 7
|
|
1258
|
+
}
|
|
952
1259
|
}), /*#__PURE__*/React.createElement(Waveform, {
|
|
953
1260
|
audioFile: props.file,
|
|
954
1261
|
isPlaying: props.isPlaying,
|
|
955
1262
|
inverted: !darkBackground,
|
|
956
1263
|
variant: props.variant,
|
|
957
|
-
|
|
958
|
-
|
|
1264
|
+
progressWaveformColor: props.waveformColor,
|
|
1265
|
+
remainingWaveformColor: props.remainingWaveformColor,
|
|
1266
|
+
waveformCursorColor: props.waveformCursorColor,
|
|
1267
|
+
mainColor: ((_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.accentColor) || ((_theme$options$colors = theme.options.colors) === null || _theme$options$colors === void 0 ? void 0 : _theme$options$colors.accent),
|
|
959
1268
|
play: props.play,
|
|
960
1269
|
pause: props.pause,
|
|
961
|
-
mediaElementId: props.mediaElementId
|
|
1270
|
+
mediaElementId: props.mediaElementId,
|
|
1271
|
+
__self: this,
|
|
1272
|
+
__source: {
|
|
1273
|
+
fileName: _jsxFileName$e,
|
|
1274
|
+
lineNumber: 28,
|
|
1275
|
+
columnNumber: 7
|
|
1276
|
+
}
|
|
962
1277
|
}), /*#__PURE__*/React.createElement("div", {
|
|
963
|
-
className: styles$
|
|
1278
|
+
className: classNames(styles$3.playControl, {
|
|
1279
|
+
[styles$3.invertPlayButton]: props.invertPlayButton
|
|
1280
|
+
}),
|
|
1281
|
+
__self: this,
|
|
1282
|
+
__source: {
|
|
1283
|
+
fileName: _jsxFileName$e,
|
|
1284
|
+
lineNumber: 40,
|
|
1285
|
+
columnNumber: 7
|
|
1286
|
+
}
|
|
964
1287
|
}, /*#__PURE__*/React.createElement(PlayPauseButton, {
|
|
965
1288
|
isPlaying: props.isPlaying,
|
|
966
1289
|
play: props.play,
|
|
967
|
-
pause: props.pause
|
|
1290
|
+
pause: props.pause,
|
|
1291
|
+
__self: this,
|
|
1292
|
+
__source: {
|
|
1293
|
+
fileName: _jsxFileName$e,
|
|
1294
|
+
lineNumber: 42,
|
|
1295
|
+
columnNumber: 9
|
|
1296
|
+
}
|
|
968
1297
|
})), /*#__PURE__*/React.createElement("div", {
|
|
969
|
-
className: classNames(styles$
|
|
1298
|
+
className: classNames(styles$3.menuBar, darkBackground ? styles$6.darkBackground : styles$6.lightBackground, {
|
|
1299
|
+
[styles$6.inset]: !props.standAlone
|
|
1300
|
+
}),
|
|
1301
|
+
__self: this,
|
|
1302
|
+
__source: {
|
|
1303
|
+
fileName: _jsxFileName$e,
|
|
1304
|
+
lineNumber: 46,
|
|
1305
|
+
columnNumber: 7
|
|
1306
|
+
}
|
|
970
1307
|
}, /*#__PURE__*/React.createElement("div", {
|
|
971
|
-
className: styles$
|
|
1308
|
+
className: styles$3.menuBarInner,
|
|
1309
|
+
__self: this,
|
|
1310
|
+
__source: {
|
|
1311
|
+
fileName: _jsxFileName$e,
|
|
1312
|
+
lineNumber: 49,
|
|
1313
|
+
columnNumber: 9
|
|
1314
|
+
}
|
|
972
1315
|
}, /*#__PURE__*/React.createElement(TimeDisplay, {
|
|
973
1316
|
currentTime: props.currentTime,
|
|
974
|
-
duration: props.duration
|
|
1317
|
+
duration: props.duration,
|
|
1318
|
+
__self: this,
|
|
1319
|
+
__source: {
|
|
1320
|
+
fileName: _jsxFileName$e,
|
|
1321
|
+
lineNumber: 50,
|
|
1322
|
+
columnNumber: 11
|
|
1323
|
+
}
|
|
975
1324
|
}), /*#__PURE__*/React.createElement(TextTracksMenu, {
|
|
976
1325
|
items: props.textTracksMenuItems,
|
|
977
|
-
onItemClick: props.onTextTracksMenuItemClick
|
|
1326
|
+
onItemClick: props.onTextTracksMenuItemClick,
|
|
1327
|
+
__self: this,
|
|
1328
|
+
__source: {
|
|
1329
|
+
fileName: _jsxFileName$e,
|
|
1330
|
+
lineNumber: 52,
|
|
1331
|
+
columnNumber: 11
|
|
1332
|
+
}
|
|
978
1333
|
})), /*#__PURE__*/React.createElement(InlineFileRights, {
|
|
979
1334
|
items: props.inlineFileRightsItems,
|
|
980
1335
|
context: "playerControls",
|
|
981
|
-
|
|
982
|
-
playerControlsStandAlone: props.standAlone
|
|
1336
|
+
playerControlsFadedOut: false,
|
|
1337
|
+
playerControlsStandAlone: props.standAlone,
|
|
1338
|
+
__self: this,
|
|
1339
|
+
__source: {
|
|
1340
|
+
fileName: _jsxFileName$e,
|
|
1341
|
+
lineNumber: 55,
|
|
1342
|
+
columnNumber: 9
|
|
1343
|
+
}
|
|
983
1344
|
})));
|
|
984
1345
|
}
|
|
985
1346
|
|
|
986
|
-
var styles$
|
|
1347
|
+
var styles$7 = {"container":"BigPlayPauseButton-module_container__19sKj","fadeOutDelay":"BigPlayPauseButton-module_fadeOutDelay__yoaW6","pointerCursor":"BigPlayPauseButton-module_pointerCursor__2A55P","hideCursor":"BigPlayPauseButton-module_hideCursor__2Hyys","button":"BigPlayPauseButton-module_button__10g4Q utils-module_unstyledButton__3rgne","hidden":"BigPlayPauseButton-module_hidden__1KUzr","animated":"BigPlayPauseButton-module_animated__1MMNq","fadeOut":"BigPlayPauseButton-module_fadeOut__2vcA_","fadeIn":"BigPlayPauseButton-module_fadeIn__1Ge1-"};
|
|
987
1348
|
|
|
988
|
-
function
|
|
989
|
-
|
|
1349
|
+
function useFocusHandoff() {
|
|
1350
|
+
const ref1 = useRef();
|
|
1351
|
+
const ref2 = useRef();
|
|
1352
|
+
return [{
|
|
1353
|
+
sourceRef: ref1,
|
|
1354
|
+
targetRef: ref2,
|
|
1355
|
+
name: 'A'
|
|
1356
|
+
}, {
|
|
1357
|
+
sourceRef: ref2,
|
|
1358
|
+
targetRef: ref1,
|
|
1359
|
+
name: 'B'
|
|
1360
|
+
}];
|
|
1361
|
+
}
|
|
1362
|
+
function usePassFocus(inert, {
|
|
1363
|
+
name,
|
|
1364
|
+
sourceRef,
|
|
1365
|
+
targetRef
|
|
1366
|
+
}) {
|
|
1367
|
+
const hasFocusRef = useRef();
|
|
1368
|
+
const passFocusRef = useRef();
|
|
1369
|
+
const setSourceRef = useCallback(source => {
|
|
1370
|
+
if (sourceRef.current) {
|
|
1371
|
+
sourceRef.current.removeEventListener('focusin', updateHasFocus);
|
|
1372
|
+
sourceRef.current.removeEventListener('focusout', updateHasFocus);
|
|
1373
|
+
}
|
|
1374
|
+
sourceRef.current = source;
|
|
1375
|
+
if (sourceRef.current) {
|
|
1376
|
+
sourceRef.current.addEventListener('focusin', updateHasFocus);
|
|
1377
|
+
sourceRef.current.addEventListener('focusout', updateHasFocus);
|
|
1378
|
+
}
|
|
1379
|
+
function updateHasFocus(event) {
|
|
1380
|
+
hasFocusRef.current = event.type === 'focusin';
|
|
1381
|
+
}
|
|
1382
|
+
}, [sourceRef]);
|
|
1383
|
+
if (inert && hasFocusRef.current && !passFocusRef.current) {
|
|
1384
|
+
passFocusRef.current = true;
|
|
1385
|
+
}
|
|
1386
|
+
useEffect(() => {
|
|
1387
|
+
if (inert && passFocusRef.current && targetRef.current) {
|
|
1388
|
+
passFocusRef.current = false;
|
|
1389
|
+
if (targetRef.current.tagName === 'BUTTON') {
|
|
1390
|
+
targetRef.current.focus();
|
|
1391
|
+
} else {
|
|
1392
|
+
targetRef.current.querySelector('button').focus();
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}, [inert, targetRef, name]);
|
|
1396
|
+
return setSourceRef;
|
|
1397
|
+
}
|
|
990
1398
|
|
|
991
|
-
|
|
1399
|
+
var _jsxFileName$f = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/ClassicPlayerControls/BigPlayPauseButton.js";
|
|
1400
|
+
function BigPlayPauseButton(props) {
|
|
1401
|
+
const {
|
|
1402
|
+
t
|
|
1403
|
+
} = useI18n();
|
|
1404
|
+
const c = classNames(styles$7.button, {
|
|
1405
|
+
[styles$7.hidden]: props.hidden || props.lastControlledVia === 'playPauseButton',
|
|
1406
|
+
[styles$7.fadeIn]: props.unplayed,
|
|
1407
|
+
[styles$7.animated]: !props.unplayed
|
|
1408
|
+
});
|
|
1409
|
+
const inert = props.hidden || !props.unplayed;
|
|
1410
|
+
const ref = usePassFocus(inert, props.focusHandoff);
|
|
992
1411
|
return /*#__PURE__*/React.createElement("div", {
|
|
993
|
-
className: classNames(styles$
|
|
994
|
-
|
|
995
|
-
|
|
1412
|
+
className: classNames(styles$7.container, {
|
|
1413
|
+
[styles$7.hideCursor]: props.hideCursor,
|
|
1414
|
+
[styles$7.hidden]: props.fadedOut,
|
|
1415
|
+
[styles$7.fadeOutDelay]: props.isPlaying,
|
|
1416
|
+
[styles$7.pointerCursor]: !!props.onClick
|
|
1417
|
+
}),
|
|
1418
|
+
onClick: props.onClick,
|
|
1419
|
+
__self: this,
|
|
1420
|
+
__source: {
|
|
1421
|
+
fileName: _jsxFileName$f,
|
|
1422
|
+
lineNumber: 23,
|
|
1423
|
+
columnNumber: 5
|
|
1424
|
+
}
|
|
1425
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
996
1426
|
key: props.isPlaying,
|
|
997
|
-
|
|
1427
|
+
ref: ref,
|
|
1428
|
+
className: c,
|
|
1429
|
+
"aria-label": t('pageflow_scrolled.public.player_controls.play'),
|
|
1430
|
+
inert: inert ? 'true' : undefined,
|
|
1431
|
+
__self: this,
|
|
1432
|
+
__source: {
|
|
1433
|
+
fileName: _jsxFileName$f,
|
|
1434
|
+
lineNumber: 29,
|
|
1435
|
+
columnNumber: 7
|
|
1436
|
+
}
|
|
998
1437
|
}, pausePlayIcon$1(props)));
|
|
999
1438
|
}
|
|
1000
|
-
|
|
1001
1439
|
function pausePlayIcon$1(props) {
|
|
1002
1440
|
if (props.unplayed || props.isPlaying) {
|
|
1003
|
-
return /*#__PURE__*/React.createElement(
|
|
1441
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
1442
|
+
name: "play",
|
|
1443
|
+
__self: this,
|
|
1444
|
+
__source: {
|
|
1445
|
+
fileName: _jsxFileName$f,
|
|
1446
|
+
lineNumber: 42,
|
|
1447
|
+
columnNumber: 12
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1004
1450
|
} else {
|
|
1005
|
-
return /*#__PURE__*/React.createElement(
|
|
1451
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
1452
|
+
name: "pause",
|
|
1453
|
+
__self: this,
|
|
1454
|
+
__source: {
|
|
1455
|
+
fileName: _jsxFileName$f,
|
|
1456
|
+
lineNumber: 45,
|
|
1457
|
+
columnNumber: 12
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1006
1460
|
}
|
|
1007
1461
|
}
|
|
1008
1462
|
|
|
1009
|
-
var styles$
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
var progressBarsContainerWidth = useRef();
|
|
1027
|
-
var positionToTime = useCallback(function (x) {
|
|
1463
|
+
var styles$8 = {"container":"ProgressIndicators-module_container__1QiQJ","wrapper":"ProgressIndicators-module_wrapper__2PCVv","draggable":"ProgressIndicators-module_draggable__1iAE8","bars":"ProgressIndicators-module_bars__2-ddd","progressBar":"ProgressIndicators-module_progressBar__2PYn-","background":"ProgressIndicators-module_background__-x5f_ ProgressIndicators-module_progressBar__2PYn-","loadingProgressBar":"ProgressIndicators-module_loadingProgressBar__YD2GH ProgressIndicators-module_progressBar__2PYn-","playProgressBar":"ProgressIndicators-module_playProgressBar__3mCSX ProgressIndicators-module_progressBar__2PYn-","sliderHandle":"ProgressIndicators-module_sliderHandle__3ArIf","dragging":"ProgressIndicators-module_dragging__3yY3t"};
|
|
1464
|
+
|
|
1465
|
+
var _jsxFileName$g = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/ClassicPlayerControls/ProgressIndicators.js";
|
|
1466
|
+
function ProgressIndicators({
|
|
1467
|
+
currentTime,
|
|
1468
|
+
duration,
|
|
1469
|
+
bufferedEnd,
|
|
1470
|
+
scrubTo,
|
|
1471
|
+
seekTo
|
|
1472
|
+
}) {
|
|
1473
|
+
const {
|
|
1474
|
+
t
|
|
1475
|
+
} = useI18n();
|
|
1476
|
+
const [dragging, setDragging] = useState();
|
|
1477
|
+
const progressBarsContainerWidth = useRef();
|
|
1478
|
+
const positionToTime = useCallback(x => {
|
|
1028
1479
|
if (duration && progressBarsContainerWidth.current) {
|
|
1029
|
-
|
|
1480
|
+
const fraction = Math.max(0, Math.min(1, x / progressBarsContainerWidth.current));
|
|
1030
1481
|
return fraction * duration;
|
|
1031
1482
|
} else {
|
|
1032
1483
|
return 0;
|
|
1033
1484
|
}
|
|
1034
1485
|
}, [duration]);
|
|
1035
|
-
|
|
1486
|
+
const handleStop = useCallback((mouseEvent, dragEvent) => {
|
|
1036
1487
|
setDragging(false);
|
|
1037
1488
|
seekTo(positionToTime(dragEvent.x));
|
|
1038
1489
|
}, [seekTo, positionToTime]);
|
|
1039
|
-
|
|
1490
|
+
const handleDrag = useCallback((mouseEvent, dragEvent) => {
|
|
1040
1491
|
setDragging(true);
|
|
1041
1492
|
scrubTo(positionToTime(dragEvent.x));
|
|
1042
1493
|
}, [scrubTo, positionToTime]);
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1494
|
+
const handleKeyDown = useCallback(event => {
|
|
1495
|
+
let destination;
|
|
1046
1496
|
if (event.key === 'ArrowLeft') {
|
|
1047
1497
|
destination = Math.max(0, currentTime - 1);
|
|
1048
1498
|
} else if (event.key === 'ArrowRight') {
|
|
1049
1499
|
destination = Math.min(currentTime + 1, duration || Infinity);
|
|
1050
1500
|
}
|
|
1051
|
-
|
|
1052
1501
|
seekTo(destination);
|
|
1053
1502
|
}, [seekTo, currentTime, duration]);
|
|
1054
|
-
|
|
1055
|
-
|
|
1503
|
+
const loadProgress = duration > 0 ? Math.min(1, bufferedEnd / duration) : 0;
|
|
1504
|
+
const playProgress = duration > 0 ? Math.min(1, currentTime / duration) : 0;
|
|
1056
1505
|
return /*#__PURE__*/React.createElement("div", {
|
|
1057
|
-
className: classNames(styles$
|
|
1506
|
+
className: classNames(styles$8.container, {
|
|
1507
|
+
[styles$8.dragging]: dragging
|
|
1508
|
+
}),
|
|
1058
1509
|
"aria-label": t('pageflow_scrolled.public.player_controls.progress', {
|
|
1059
1510
|
currentTime: formatTime(currentTime),
|
|
1060
1511
|
duration: formatTime(duration)
|
|
1061
1512
|
}),
|
|
1062
1513
|
onKeyDown: handleKeyDown,
|
|
1063
|
-
tabIndex: "0"
|
|
1514
|
+
tabIndex: "0",
|
|
1515
|
+
__self: this,
|
|
1516
|
+
__source: {
|
|
1517
|
+
fileName: _jsxFileName$g,
|
|
1518
|
+
lineNumber: 52,
|
|
1519
|
+
columnNumber: 5
|
|
1520
|
+
}
|
|
1064
1521
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1065
|
-
className: styles$
|
|
1522
|
+
className: styles$8.wrapper,
|
|
1523
|
+
__self: this,
|
|
1524
|
+
__source: {
|
|
1525
|
+
fileName: _jsxFileName$g,
|
|
1526
|
+
lineNumber: 59,
|
|
1527
|
+
columnNumber: 7
|
|
1528
|
+
}
|
|
1066
1529
|
}, /*#__PURE__*/React.createElement(Measure, {
|
|
1067
1530
|
client: true,
|
|
1068
|
-
onResize:
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1531
|
+
onResize: contentRect => progressBarsContainerWidth.current = contentRect.client.width,
|
|
1532
|
+
__self: this,
|
|
1533
|
+
__source: {
|
|
1534
|
+
fileName: _jsxFileName$g,
|
|
1535
|
+
lineNumber: 60,
|
|
1536
|
+
columnNumber: 9
|
|
1537
|
+
}
|
|
1538
|
+
}, ({
|
|
1539
|
+
measureRef
|
|
1540
|
+
}) => /*#__PURE__*/React.createElement(DraggableCore, {
|
|
1541
|
+
onStart: handleDrag,
|
|
1542
|
+
onDrag: handleDrag,
|
|
1543
|
+
onStop: handleStop,
|
|
1544
|
+
__self: this,
|
|
1545
|
+
__source: {
|
|
1546
|
+
fileName: _jsxFileName$g,
|
|
1547
|
+
lineNumber: 63,
|
|
1548
|
+
columnNumber: 13
|
|
1549
|
+
}
|
|
1550
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1551
|
+
className: classNames(styles$8.draggable),
|
|
1552
|
+
__self: this,
|
|
1553
|
+
__source: {
|
|
1554
|
+
fileName: _jsxFileName$g,
|
|
1555
|
+
lineNumber: 66,
|
|
1556
|
+
columnNumber: 15
|
|
1557
|
+
}
|
|
1558
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1559
|
+
ref: measureRef,
|
|
1560
|
+
className: styles$8.bars,
|
|
1561
|
+
__self: this,
|
|
1562
|
+
__source: {
|
|
1563
|
+
fileName: _jsxFileName$g,
|
|
1564
|
+
lineNumber: 67,
|
|
1565
|
+
columnNumber: 17
|
|
1566
|
+
}
|
|
1567
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1568
|
+
className: styles$8.background,
|
|
1569
|
+
__self: this,
|
|
1570
|
+
__source: {
|
|
1571
|
+
fileName: _jsxFileName$g,
|
|
1572
|
+
lineNumber: 68,
|
|
1573
|
+
columnNumber: 19
|
|
1574
|
+
}
|
|
1575
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1576
|
+
className: styles$8.loadingProgressBar,
|
|
1577
|
+
style: {
|
|
1578
|
+
width: toPercent(loadProgress)
|
|
1579
|
+
},
|
|
1580
|
+
"data-testid": "loading-progress-bar",
|
|
1581
|
+
__self: this,
|
|
1582
|
+
__source: {
|
|
1583
|
+
fileName: _jsxFileName$g,
|
|
1584
|
+
lineNumber: 69,
|
|
1585
|
+
columnNumber: 19
|
|
1586
|
+
}
|
|
1587
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1588
|
+
className: styles$8.playProgressBar,
|
|
1589
|
+
style: {
|
|
1590
|
+
width: toPercent(playProgress)
|
|
1591
|
+
},
|
|
1592
|
+
"data-testid": "play-progress-bar",
|
|
1593
|
+
__self: this,
|
|
1594
|
+
__source: {
|
|
1595
|
+
fileName: _jsxFileName$g,
|
|
1596
|
+
lineNumber: 72,
|
|
1597
|
+
columnNumber: 19
|
|
1598
|
+
}
|
|
1599
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1600
|
+
className: styles$8.sliderHandle,
|
|
1601
|
+
style: {
|
|
1602
|
+
left: toPercent(playProgress)
|
|
1603
|
+
},
|
|
1604
|
+
"data-testid": "slider-handle",
|
|
1605
|
+
__self: this,
|
|
1606
|
+
__source: {
|
|
1607
|
+
fileName: _jsxFileName$g,
|
|
1608
|
+
lineNumber: 75,
|
|
1609
|
+
columnNumber: 19
|
|
1610
|
+
}
|
|
1611
|
+
})))))));
|
|
1104
1612
|
}
|
|
1105
|
-
|
|
1106
1613
|
function toPercent(value) {
|
|
1107
1614
|
return value > 0 ? value * 100 + '%' : 0;
|
|
1108
1615
|
}
|
|
1109
1616
|
|
|
1110
|
-
|
|
1111
|
-
_extends$4 = Object.assign || function (target) {
|
|
1112
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1113
|
-
var source = arguments[i];
|
|
1114
|
-
|
|
1115
|
-
for (var key in source) {
|
|
1116
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1117
|
-
target[key] = source[key];
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
return target;
|
|
1123
|
-
};
|
|
1124
|
-
|
|
1125
|
-
return _extends$4.apply(this, arguments);
|
|
1126
|
-
}
|
|
1127
|
-
var QualityIcon = (function (_ref) {
|
|
1128
|
-
var _ref$styles = _ref.styles,
|
|
1129
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1130
|
-
|
|
1131
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
1132
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1133
|
-
viewBox: "-3 -3 30 30"
|
|
1134
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1135
|
-
d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"
|
|
1136
|
-
}));
|
|
1137
|
-
});
|
|
1138
|
-
|
|
1617
|
+
var _jsxFileName$h = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/ClassicPlayerControls/QualityMenu.js";
|
|
1139
1618
|
function QualityMenu(props) {
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1619
|
+
const {
|
|
1620
|
+
t
|
|
1621
|
+
} = useI18n();
|
|
1143
1622
|
if (props.items.length < 2) {
|
|
1144
1623
|
return null;
|
|
1145
1624
|
}
|
|
1146
|
-
|
|
1147
1625
|
return /*#__PURE__*/React.createElement(MenuBarButton, {
|
|
1148
1626
|
title: t('pageflow_scrolled.public.player_controls.quality'),
|
|
1149
|
-
icon:
|
|
1627
|
+
icon: "gear",
|
|
1150
1628
|
subMenuItems: props.items,
|
|
1151
1629
|
subMenuExpanded: props.subMenuExpanded,
|
|
1152
1630
|
onSubMenuItemClick: props.onItemClick,
|
|
1153
|
-
x: true
|
|
1631
|
+
x: true,
|
|
1632
|
+
__self: this,
|
|
1633
|
+
__source: {
|
|
1634
|
+
fileName: _jsxFileName$h,
|
|
1635
|
+
lineNumber: 15,
|
|
1636
|
+
columnNumber: 5
|
|
1637
|
+
}
|
|
1154
1638
|
});
|
|
1155
1639
|
}
|
|
1640
|
+
QualityMenu.propTypes = {
|
|
1641
|
+
items: MenuBarButton.propTypes.subMenuItems,
|
|
1642
|
+
onMenuItemClick: PropTypes.func
|
|
1643
|
+
};
|
|
1156
1644
|
QualityMenu.defaultProps = {
|
|
1157
1645
|
items: []
|
|
1158
1646
|
};
|
|
1159
1647
|
|
|
1648
|
+
var _jsxFileName$i = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/ClassicPlayerControls/index.js";
|
|
1160
1649
|
function ClassicPlayerControls(props) {
|
|
1161
|
-
|
|
1162
|
-
|
|
1650
|
+
const darkBackground = useDarkBackground();
|
|
1651
|
+
const [bigPlayButtonFocusHandoff, controlBarFocusHandoff] = useFocusHandoff();
|
|
1163
1652
|
return /*#__PURE__*/React.createElement("div", {
|
|
1164
|
-
className: styles$
|
|
1653
|
+
className: classNames(styles$6.container, {
|
|
1654
|
+
[styles$6.sticky]: props.sticky
|
|
1655
|
+
}),
|
|
1656
|
+
__self: this,
|
|
1657
|
+
__source: {
|
|
1658
|
+
fileName: _jsxFileName$i,
|
|
1659
|
+
lineNumber: 21,
|
|
1660
|
+
columnNumber: 5
|
|
1661
|
+
}
|
|
1165
1662
|
}, props.children, !props.standAlone && /*#__PURE__*/React.createElement(BigPlayPauseButton, {
|
|
1663
|
+
focusHandoff: bigPlayButtonFocusHandoff,
|
|
1166
1664
|
unplayed: props.unplayed,
|
|
1167
1665
|
isPlaying: props.isPlaying,
|
|
1168
1666
|
lastControlledVia: props.lastControlledVia,
|
|
1169
1667
|
hidden: props.hideBigPlayButton,
|
|
1668
|
+
fadedOut: props.fadedOut,
|
|
1170
1669
|
hideCursor: props.isPlaying && props.inactive,
|
|
1171
|
-
onClick: props.onPlayerClick
|
|
1172
|
-
|
|
1670
|
+
onClick: props.onPlayerClick,
|
|
1671
|
+
__self: this,
|
|
1672
|
+
__source: {
|
|
1673
|
+
fileName: _jsxFileName$i,
|
|
1674
|
+
lineNumber: 25,
|
|
1675
|
+
columnNumber: 8
|
|
1676
|
+
}
|
|
1677
|
+
}), !props.hideControlBar && /*#__PURE__*/React.createElement(ControlBar, Object.assign({}, props, {
|
|
1678
|
+
darkBackground: darkBackground,
|
|
1679
|
+
focusHandoff: controlBarFocusHandoff,
|
|
1680
|
+
__self: this,
|
|
1681
|
+
__source: {
|
|
1682
|
+
fileName: _jsxFileName$i,
|
|
1683
|
+
lineNumber: 34,
|
|
1684
|
+
columnNumber: 8
|
|
1685
|
+
}
|
|
1686
|
+
})));
|
|
1173
1687
|
}
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1688
|
+
function ControlBar({
|
|
1689
|
+
darkBackground,
|
|
1690
|
+
focusHandoff,
|
|
1691
|
+
...props
|
|
1692
|
+
}) {
|
|
1693
|
+
const hidden = !props.standAlone && props.unplayed || props.fadedOut;
|
|
1694
|
+
const inactive = props.isPlaying && props.inactive;
|
|
1695
|
+
const fadedOut = hidden || inactive;
|
|
1696
|
+
const focusHandoffRef = usePassFocus(hidden, focusHandoff);
|
|
1178
1697
|
return /*#__PURE__*/React.createElement("div", {
|
|
1179
1698
|
onFocus: props.onFocus,
|
|
1180
1699
|
onBlur: props.onBlur,
|
|
1181
1700
|
onMouseEnter: props.onMouseEnter,
|
|
1182
1701
|
onMouseLeave: props.onMouseLeave,
|
|
1183
|
-
className: classNames(styles$
|
|
1702
|
+
className: classNames(styles$6.controlBarContainer, darkBackground ? styles$6.darkBackground : styles$6.lightBackground, {
|
|
1703
|
+
[styles$6.inset]: !props.standAlone,
|
|
1704
|
+
[styles$6.fadedOut]: fadedOut
|
|
1705
|
+
}),
|
|
1706
|
+
__self: this,
|
|
1707
|
+
__source: {
|
|
1708
|
+
fileName: _jsxFileName$i,
|
|
1709
|
+
lineNumber: 49,
|
|
1710
|
+
columnNumber: 5
|
|
1711
|
+
}
|
|
1184
1712
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1185
|
-
|
|
1713
|
+
ref: focusHandoffRef,
|
|
1714
|
+
inert: hidden ? 'true' : undefined,
|
|
1715
|
+
className: styles$6.controlBarInner,
|
|
1716
|
+
__self: this,
|
|
1717
|
+
__source: {
|
|
1718
|
+
fileName: _jsxFileName$i,
|
|
1719
|
+
lineNumber: 59,
|
|
1720
|
+
columnNumber: 7
|
|
1721
|
+
}
|
|
1186
1722
|
}, /*#__PURE__*/React.createElement(PlayPauseButton, {
|
|
1187
1723
|
isPlaying: props.isPlaying,
|
|
1188
1724
|
play: props.play,
|
|
1189
|
-
pause: props.pause
|
|
1725
|
+
pause: props.pause,
|
|
1726
|
+
__self: this,
|
|
1727
|
+
__source: {
|
|
1728
|
+
fileName: _jsxFileName$i,
|
|
1729
|
+
lineNumber: 62,
|
|
1730
|
+
columnNumber: 9
|
|
1731
|
+
}
|
|
1190
1732
|
}), /*#__PURE__*/React.createElement(ProgressIndicators, {
|
|
1191
1733
|
currentTime: props.currentTime,
|
|
1192
1734
|
duration: props.duration,
|
|
1193
1735
|
bufferedEnd: props.bufferedEnd,
|
|
1194
1736
|
scrubTo: props.scrubTo,
|
|
1195
|
-
seekTo: props.seekTo
|
|
1737
|
+
seekTo: props.seekTo,
|
|
1738
|
+
__self: this,
|
|
1739
|
+
__source: {
|
|
1740
|
+
fileName: _jsxFileName$i,
|
|
1741
|
+
lineNumber: 65,
|
|
1742
|
+
columnNumber: 9
|
|
1743
|
+
}
|
|
1196
1744
|
}), /*#__PURE__*/React.createElement(TimeDisplay, {
|
|
1197
1745
|
currentTime: props.currentTime,
|
|
1198
|
-
duration: props.duration
|
|
1746
|
+
duration: props.duration,
|
|
1747
|
+
__self: this,
|
|
1748
|
+
__source: {
|
|
1749
|
+
fileName: _jsxFileName$i,
|
|
1750
|
+
lineNumber: 70,
|
|
1751
|
+
columnNumber: 9
|
|
1752
|
+
}
|
|
1199
1753
|
}), /*#__PURE__*/React.createElement(TextTracksMenu, {
|
|
1200
1754
|
items: props.textTracksMenuItems,
|
|
1201
|
-
onItemClick: props.onTextTracksMenuItemClick
|
|
1755
|
+
onItemClick: props.onTextTracksMenuItemClick,
|
|
1756
|
+
__self: this,
|
|
1757
|
+
__source: {
|
|
1758
|
+
fileName: _jsxFileName$i,
|
|
1759
|
+
lineNumber: 72,
|
|
1760
|
+
columnNumber: 9
|
|
1761
|
+
}
|
|
1202
1762
|
}), /*#__PURE__*/React.createElement(QualityMenu, {
|
|
1203
1763
|
items: props.qualityMenuItems,
|
|
1204
1764
|
onItemClick: props.onQualityMenuItemClick,
|
|
1205
|
-
subMenuExpanded: props.qualityMenuExpanded
|
|
1765
|
+
subMenuExpanded: props.qualityMenuExpanded,
|
|
1766
|
+
__self: this,
|
|
1767
|
+
__source: {
|
|
1768
|
+
fileName: _jsxFileName$i,
|
|
1769
|
+
lineNumber: 74,
|
|
1770
|
+
columnNumber: 9
|
|
1771
|
+
}
|
|
1206
1772
|
})), /*#__PURE__*/React.createElement(InlineFileRights, {
|
|
1207
1773
|
items: props.inlineFileRightsItems,
|
|
1208
1774
|
context: "playerControls",
|
|
1209
|
-
|
|
1210
|
-
playerControlsStandAlone: props.standAlone
|
|
1775
|
+
playerControlsFadedOut: fadedOut,
|
|
1776
|
+
playerControlsStandAlone: props.standAlone,
|
|
1777
|
+
__self: this,
|
|
1778
|
+
__source: {
|
|
1779
|
+
fileName: _jsxFileName$i,
|
|
1780
|
+
lineNumber: 78,
|
|
1781
|
+
columnNumber: 7
|
|
1782
|
+
}
|
|
1211
1783
|
}));
|
|
1212
1784
|
}
|
|
1213
1785
|
|
|
1786
|
+
var _jsxFileName$j = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PlayerControls/index.js";
|
|
1214
1787
|
function PlayerControls(props) {
|
|
1215
1788
|
var _props$variant;
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1789
|
+
const ControlComponent = ((_props$variant = props.variant) === null || _props$variant === void 0 ? void 0 : _props$variant.startsWith('waveform')) ? WaveformPlayerControls : ClassicPlayerControls;
|
|
1790
|
+
return /*#__PURE__*/React.createElement(ControlComponent, Object.assign({}, props, {
|
|
1791
|
+
__self: this,
|
|
1792
|
+
__source: {
|
|
1793
|
+
fileName: _jsxFileName$j,
|
|
1794
|
+
lineNumber: 13,
|
|
1795
|
+
columnNumber: 5
|
|
1796
|
+
}
|
|
1797
|
+
}));
|
|
1219
1798
|
}
|
|
1220
1799
|
PlayerControls.defaultProps = {
|
|
1221
1800
|
currentTime: 200,
|
|
1222
1801
|
duration: 600,
|
|
1223
1802
|
bufferedEnd: 400,
|
|
1224
1803
|
isPlaying: false,
|
|
1225
|
-
play:
|
|
1226
|
-
pause:
|
|
1227
|
-
scrubTo:
|
|
1228
|
-
seekTo:
|
|
1804
|
+
play: () => {},
|
|
1805
|
+
pause: () => {},
|
|
1806
|
+
scrubTo: () => {},
|
|
1807
|
+
seekTo: () => {},
|
|
1229
1808
|
inset: false
|
|
1230
1809
|
};
|
|
1231
1810
|
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1811
|
+
// Whether the player controls should auto-hide because the user is
|
|
1812
|
+
// idle and not interacting with them. Shared by the control bar and by
|
|
1813
|
+
// chrome rendered alongside it (e.g. the fullscreen button) so they
|
|
1814
|
+
// fade in sync.
|
|
1815
|
+
function usePlayerControlsInactive(playerState) {
|
|
1816
|
+
const focusOutlineVisible = useFocusOutlineVisible();
|
|
1817
|
+
return (playerState.userIdle || !playerState.userHovering) && (!focusOutlineVisible || !playerState.focusInsideControls) && !playerState.userHoveringControls;
|
|
1818
|
+
}
|
|
1238
1819
|
|
|
1239
|
-
|
|
1820
|
+
var _jsxFileName$k = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/MediaPlayerControls.js";
|
|
1821
|
+
function MediaPlayerControls(props) {
|
|
1822
|
+
const playerState = props.playerState;
|
|
1823
|
+
const playerActions = props.playerActions;
|
|
1824
|
+
const {
|
|
1825
|
+
t
|
|
1826
|
+
} = useI18n();
|
|
1827
|
+
const textTracks = useTextTracks({
|
|
1240
1828
|
file: props.file,
|
|
1241
1829
|
defaultTextTrackFilePermaId: props.defaultTextTrackFilePermaId,
|
|
1242
1830
|
captionsByDefault: useMediaMuted()
|
|
1243
1831
|
});
|
|
1244
|
-
|
|
1832
|
+
const controlsInactive = usePlayerControlsInactive(playerState);
|
|
1245
1833
|
return /*#__PURE__*/React.createElement(PlayerControls, Object.assign({
|
|
1246
1834
|
type: props.type,
|
|
1247
1835
|
variant: props.configuration.playerControlVariant,
|
|
1248
1836
|
waveformColor: props.configuration.waveformColor,
|
|
1837
|
+
remainingWaveformColor: props.configuration.remainingWaveformColor,
|
|
1838
|
+
waveformCursorColor: props.configuration.waveformCursorColor,
|
|
1839
|
+
invertPlayButton: props.configuration.invertPlayButton,
|
|
1249
1840
|
mediaElementId: playerState.mediaElementId,
|
|
1250
1841
|
currentTime: playerState.scrubbingAt !== undefined ? playerState.scrubbingAt : playerState.currentTime,
|
|
1251
1842
|
bufferedEnd: playerState.bufferedEnd,
|
|
@@ -1253,7 +1844,7 @@ function MediaPlayerControls(props) {
|
|
|
1253
1844
|
isPlaying: playerState.shouldPlay,
|
|
1254
1845
|
unplayed: playerState.unplayed,
|
|
1255
1846
|
lastControlledVia: playerState.lastControlledVia,
|
|
1256
|
-
inactive: props.autoHide &&
|
|
1847
|
+
inactive: props.autoHide && controlsInactive,
|
|
1257
1848
|
onFocus: playerActions.focusEnteredControls,
|
|
1258
1849
|
onBlur: playerActions.focusLeftControls,
|
|
1259
1850
|
onMouseEnter: playerActions.mouseEnteredControls,
|
|
@@ -1266,17 +1857,22 @@ function MediaPlayerControls(props) {
|
|
|
1266
1857
|
onTextTracksMenuItemClick: textTracks.select,
|
|
1267
1858
|
qualityMenuItems: props.qualityMenuItems,
|
|
1268
1859
|
onQualityMenuItemClick: props.onQualityMenuItemClick
|
|
1269
|
-
}, props
|
|
1860
|
+
}, props, {
|
|
1861
|
+
__self: this,
|
|
1862
|
+
__source: {
|
|
1863
|
+
fileName: _jsxFileName$k,
|
|
1864
|
+
lineNumber: 22,
|
|
1865
|
+
columnNumber: 5
|
|
1866
|
+
}
|
|
1867
|
+
}));
|
|
1270
1868
|
}
|
|
1271
1869
|
MediaPlayerControls.defaultProps = {
|
|
1272
1870
|
configuration: {}
|
|
1273
1871
|
};
|
|
1274
|
-
|
|
1275
1872
|
function getTextTracksMenuItems(textTracks, t) {
|
|
1276
1873
|
if (!textTracks.files.length) {
|
|
1277
1874
|
return [];
|
|
1278
1875
|
}
|
|
1279
|
-
|
|
1280
1876
|
return [{
|
|
1281
1877
|
value: 'off',
|
|
1282
1878
|
label: t('pageflow_scrolled.public.text_track_modes.none'),
|
|
@@ -1285,96 +1881,212 @@ function getTextTracksMenuItems(textTracks, t) {
|
|
|
1285
1881
|
value: 'auto',
|
|
1286
1882
|
label: textTracks.autoDisplayLabel,
|
|
1287
1883
|
active: textTracks.mode === 'auto'
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
var availableQualities = useAvailableQualities(videoFile);
|
|
1307
|
-
|
|
1308
|
-
var _useI18n = useI18n(),
|
|
1309
|
-
t = _useI18n.t;
|
|
1310
|
-
|
|
1884
|
+
}, ...textTracks.files.map(textTrackFile => ({
|
|
1885
|
+
value: textTrackFile.id,
|
|
1886
|
+
label: textTrackFile.displayLabel,
|
|
1887
|
+
active: textTracks.mode === 'user' && textTrackFile.id === textTracks.activeFileId
|
|
1888
|
+
}))];
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
var _jsxFileName$l = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/VideoPlayerControls.js";
|
|
1892
|
+
function VideoPlayerControls({
|
|
1893
|
+
videoFile,
|
|
1894
|
+
...props
|
|
1895
|
+
}) {
|
|
1896
|
+
const [activeQuality, setActiveQuality] = useVideoQualitySetting();
|
|
1897
|
+
const availableQualities = useAvailableQualities(videoFile);
|
|
1898
|
+
const {
|
|
1899
|
+
t
|
|
1900
|
+
} = useI18n();
|
|
1311
1901
|
return /*#__PURE__*/React.createElement(MediaPlayerControls, Object.assign({}, props, {
|
|
1312
1902
|
file: videoFile,
|
|
1313
1903
|
autoHide: true,
|
|
1314
1904
|
qualityMenuItems: getQualityMenuItems(availableQualities, activeQuality, t),
|
|
1315
|
-
onQualityMenuItemClick: setActiveQuality
|
|
1905
|
+
onQualityMenuItemClick: setActiveQuality,
|
|
1906
|
+
__self: this,
|
|
1907
|
+
__source: {
|
|
1908
|
+
fileName: _jsxFileName$l,
|
|
1909
|
+
lineNumber: 14,
|
|
1910
|
+
columnNumber: 5
|
|
1911
|
+
}
|
|
1316
1912
|
}));
|
|
1317
1913
|
}
|
|
1318
|
-
|
|
1319
1914
|
function getQualityMenuItems(availableQualities, activeQuality, t) {
|
|
1320
|
-
return availableQualities.map(
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
};
|
|
1329
|
-
});
|
|
1915
|
+
return availableQualities.map(quality => ({
|
|
1916
|
+
value: quality,
|
|
1917
|
+
label: t(`pageflow_scrolled.public.video_qualities.labels.${quality}`),
|
|
1918
|
+
annotation: t(`pageflow_scrolled.public.video_qualities.annotations.${quality}`, {
|
|
1919
|
+
defaultValue: ''
|
|
1920
|
+
}),
|
|
1921
|
+
active: activeQuality === quality
|
|
1922
|
+
}));
|
|
1330
1923
|
}
|
|
1331
1924
|
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1925
|
+
var _jsxFileName$m = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/AudioPlayerControls.js";
|
|
1926
|
+
function AudioPlayerControls({
|
|
1927
|
+
audioFile,
|
|
1928
|
+
...props
|
|
1929
|
+
}) {
|
|
1336
1930
|
return /*#__PURE__*/React.createElement(MediaPlayerControls, Object.assign({}, props, {
|
|
1337
|
-
file: audioFile
|
|
1931
|
+
file: audioFile,
|
|
1932
|
+
__self: this,
|
|
1933
|
+
__source: {
|
|
1934
|
+
fileName: _jsxFileName$m,
|
|
1935
|
+
lineNumber: 7,
|
|
1936
|
+
columnNumber: 5
|
|
1937
|
+
}
|
|
1338
1938
|
}));
|
|
1339
1939
|
}
|
|
1340
1940
|
|
|
1341
|
-
var
|
|
1342
|
-
|
|
1343
|
-
});
|
|
1941
|
+
var _jsxFileName$n = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Panorama/index.js";
|
|
1942
|
+
const Viewer = React.lazy(() => import('./Viewer-1482ca34.js'));
|
|
1344
1943
|
function Panorama(props) {
|
|
1345
1944
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
1346
|
-
fallback: /*#__PURE__*/React.createElement("div",
|
|
1347
|
-
|
|
1945
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
1946
|
+
__self: this,
|
|
1947
|
+
__source: {
|
|
1948
|
+
fileName: _jsxFileName$n,
|
|
1949
|
+
lineNumber: 7,
|
|
1950
|
+
columnNumber: 25
|
|
1951
|
+
}
|
|
1952
|
+
}),
|
|
1953
|
+
__self: this,
|
|
1954
|
+
__source: {
|
|
1955
|
+
fileName: _jsxFileName$n,
|
|
1956
|
+
lineNumber: 7,
|
|
1957
|
+
columnNumber: 5
|
|
1958
|
+
}
|
|
1959
|
+
}, /*#__PURE__*/React.createElement(Viewer, Object.assign({}, props, {
|
|
1960
|
+
__self: this,
|
|
1961
|
+
__source: {
|
|
1962
|
+
fileName: _jsxFileName$n,
|
|
1963
|
+
lineNumber: 8,
|
|
1964
|
+
columnNumber: 7
|
|
1965
|
+
}
|
|
1966
|
+
})));
|
|
1348
1967
|
}
|
|
1349
1968
|
|
|
1350
|
-
var
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1969
|
+
var _jsxFileName$o = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/ExpandableImage/index.js";
|
|
1970
|
+
const Viewer$1 = React.lazy(() => import('./Viewer-70504231.js'));
|
|
1971
|
+
function ExpandableImage({
|
|
1972
|
+
enabled,
|
|
1973
|
+
...props
|
|
1974
|
+
}) {
|
|
1357
1975
|
if (!enabled) {
|
|
1358
1976
|
return props.children;
|
|
1359
1977
|
}
|
|
1360
|
-
|
|
1361
1978
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
1362
|
-
fallback: /*#__PURE__*/React.createElement("div",
|
|
1363
|
-
|
|
1979
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
1980
|
+
__self: this,
|
|
1981
|
+
__source: {
|
|
1982
|
+
fileName: _jsxFileName$o,
|
|
1983
|
+
lineNumber: 11,
|
|
1984
|
+
columnNumber: 25
|
|
1985
|
+
}
|
|
1986
|
+
}),
|
|
1987
|
+
__self: this,
|
|
1988
|
+
__source: {
|
|
1989
|
+
fileName: _jsxFileName$o,
|
|
1990
|
+
lineNumber: 11,
|
|
1991
|
+
columnNumber: 5
|
|
1992
|
+
}
|
|
1993
|
+
}, /*#__PURE__*/React.createElement(Viewer$1, Object.assign({}, props, {
|
|
1994
|
+
__self: this,
|
|
1995
|
+
__source: {
|
|
1996
|
+
fileName: _jsxFileName$o,
|
|
1997
|
+
lineNumber: 12,
|
|
1998
|
+
columnNumber: 7
|
|
1999
|
+
}
|
|
2000
|
+
})));
|
|
1364
2001
|
}
|
|
1365
2002
|
|
|
1366
|
-
|
|
1367
|
-
|
|
2003
|
+
var styles$9 = {"nav":"PaginationIndicator-module_nav__cY6JE","item":"PaginationIndicator-module_item__O7cZ-","current":"PaginationIndicator-module_current__1wxHj"};
|
|
2004
|
+
|
|
2005
|
+
var _jsxFileName$p = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/PaginationIndicator.js";
|
|
2006
|
+
function PaginationIndicator({
|
|
2007
|
+
itemCount,
|
|
2008
|
+
currentIndex,
|
|
2009
|
+
scrollerRef,
|
|
2010
|
+
navAriaLabelTranslationKey,
|
|
2011
|
+
itemAriaLabelTranslationKey,
|
|
2012
|
+
onItemClick
|
|
2013
|
+
}) {
|
|
2014
|
+
const {
|
|
2015
|
+
t
|
|
2016
|
+
} = useI18n$1();
|
|
2017
|
+
const navRef = useRef();
|
|
2018
|
+
const theme = useTheme$1();
|
|
2019
|
+
const currentItemFlex = theme.options.properties.root.paginationIndicatorCurrentItemFlex || 3;
|
|
2020
|
+
useEffect(() => {
|
|
2021
|
+
if (!(currentItemFlex > 1)) {
|
|
2022
|
+
return;
|
|
2023
|
+
}
|
|
2024
|
+
const timeline = new window.ScrollTimeline({
|
|
2025
|
+
source: scrollerRef.current,
|
|
2026
|
+
axis: 'inline'
|
|
2027
|
+
});
|
|
2028
|
+
const animations = [...navRef.current.children].map((element, index) => {
|
|
2029
|
+
const start = 1 / Math.max(itemCount - 1, 1) * (index - 1);
|
|
2030
|
+
const end = 1 / Math.max(itemCount - 1, 1) * (index + 1);
|
|
2031
|
+
return element.animate([start >= 0 && {
|
|
2032
|
+
flex: 1,
|
|
2033
|
+
offset: start
|
|
2034
|
+
}, {
|
|
2035
|
+
flex: currentItemFlex
|
|
2036
|
+
}, end <= 1 && {
|
|
2037
|
+
flex: 1,
|
|
2038
|
+
offset: end
|
|
2039
|
+
}].filter(Boolean), {
|
|
2040
|
+
easing: 'linear',
|
|
2041
|
+
timeline
|
|
2042
|
+
});
|
|
2043
|
+
});
|
|
2044
|
+
return () => animations.forEach(animation => animation.cancel());
|
|
2045
|
+
}, [currentItemFlex, scrollerRef, itemCount]);
|
|
2046
|
+
return /*#__PURE__*/React.createElement("nav", {
|
|
2047
|
+
ref: navRef,
|
|
2048
|
+
className: styles$9.nav,
|
|
2049
|
+
"aria-label": t(navAriaLabelTranslationKey),
|
|
2050
|
+
style: {
|
|
2051
|
+
aspectRatio: `${itemCount + 2} / 1`
|
|
2052
|
+
},
|
|
2053
|
+
__self: this,
|
|
2054
|
+
__source: {
|
|
2055
|
+
fileName: _jsxFileName$p,
|
|
2056
|
+
lineNumber: 54,
|
|
2057
|
+
columnNumber: 5
|
|
2058
|
+
}
|
|
2059
|
+
}, Array(itemCount).fill().map((_, index) => /*#__PURE__*/React.createElement("button", {
|
|
2060
|
+
key: index,
|
|
2061
|
+
className: classNames(styles$9.item, {
|
|
2062
|
+
[styles$9.current]: index === currentIndex
|
|
2063
|
+
}),
|
|
2064
|
+
"aria-label": t(itemAriaLabelTranslationKey, {
|
|
2065
|
+
index
|
|
2066
|
+
}),
|
|
2067
|
+
"aria-current": index === currentIndex,
|
|
2068
|
+
onClick: () => onItemClick(index),
|
|
2069
|
+
__self: this,
|
|
2070
|
+
__source: {
|
|
2071
|
+
fileName: _jsxFileName$p,
|
|
2072
|
+
lineNumber: 59,
|
|
2073
|
+
columnNumber: 9
|
|
2074
|
+
}
|
|
2075
|
+
})));
|
|
2076
|
+
}
|
|
1368
2077
|
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
2078
|
+
// from https://github.com/n8tb1t/use-scroll-position
|
|
2079
|
+
const isBrowser = typeof window !== `undefined`;
|
|
2080
|
+
function getScrollPosition({
|
|
2081
|
+
element,
|
|
2082
|
+
useWindow
|
|
2083
|
+
}) {
|
|
1372
2084
|
if (!isBrowser) return {
|
|
1373
2085
|
x: 0,
|
|
1374
2086
|
y: 0
|
|
1375
2087
|
};
|
|
1376
|
-
|
|
1377
|
-
|
|
2088
|
+
const target = element ? element.current : document.body;
|
|
2089
|
+
const position = target.getBoundingClientRect();
|
|
1378
2090
|
return useWindow ? {
|
|
1379
2091
|
x: window.scrollX,
|
|
1380
2092
|
y: window.scrollY
|
|
@@ -1383,32 +2095,28 @@ function getScrollPosition(_ref) {
|
|
|
1383
2095
|
y: position.top
|
|
1384
2096
|
};
|
|
1385
2097
|
}
|
|
1386
|
-
|
|
1387
2098
|
function useScrollPosition(effect, deps, element, useWindow, wait) {
|
|
1388
|
-
|
|
1389
|
-
useWindow
|
|
2099
|
+
const position = useRef(getScrollPosition({
|
|
2100
|
+
useWindow
|
|
1390
2101
|
}));
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
useWindow: useWindow
|
|
2102
|
+
let throttleTimeout = null;
|
|
2103
|
+
const callBack = () => {
|
|
2104
|
+
const currPos = getScrollPosition({
|
|
2105
|
+
element,
|
|
2106
|
+
useWindow
|
|
1397
2107
|
});
|
|
1398
2108
|
effect({
|
|
1399
2109
|
prevPos: position.current,
|
|
1400
|
-
currPos
|
|
2110
|
+
currPos
|
|
1401
2111
|
});
|
|
1402
2112
|
position.current = currPos;
|
|
1403
2113
|
throttleTimeout = null;
|
|
1404
2114
|
};
|
|
1405
|
-
|
|
1406
|
-
useIsomorphicLayoutEffect(function () {
|
|
2115
|
+
useIsomorphicLayoutEffect(() => {
|
|
1407
2116
|
if (!isBrowser) {
|
|
1408
2117
|
return;
|
|
1409
2118
|
}
|
|
1410
|
-
|
|
1411
|
-
var handleScroll = function handleScroll() {
|
|
2119
|
+
const handleScroll = () => {
|
|
1412
2120
|
if (wait) {
|
|
1413
2121
|
if (throttleTimeout === null) {
|
|
1414
2122
|
// Todo: store in useRef hook?
|
|
@@ -1418,11 +2126,8 @@ function useScrollPosition(effect, deps, element, useWindow, wait) {
|
|
|
1418
2126
|
callBack();
|
|
1419
2127
|
}
|
|
1420
2128
|
};
|
|
1421
|
-
|
|
1422
2129
|
window.addEventListener('scroll', handleScroll);
|
|
1423
|
-
return
|
|
1424
|
-
return window.removeEventListener('scroll', handleScroll);
|
|
1425
|
-
};
|
|
2130
|
+
return () => window.removeEventListener('scroll', handleScroll);
|
|
1426
2131
|
}, deps);
|
|
1427
2132
|
}
|
|
1428
2133
|
useScrollPosition.defaultProps = {
|
|
@@ -1432,21 +2137,98 @@ useScrollPosition.defaultProps = {
|
|
|
1432
2137
|
wait: null
|
|
1433
2138
|
};
|
|
1434
2139
|
|
|
1435
|
-
var
|
|
2140
|
+
var _jsxFileName$q = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/EditableInlineText.js";
|
|
2141
|
+
const EditableInlineText = extensible('EditableInlineText', function EditableInlineText({
|
|
2142
|
+
value,
|
|
2143
|
+
hyphens,
|
|
2144
|
+
defaultValue = ''
|
|
2145
|
+
}) {
|
|
1436
2146
|
var _value$, _value$$children$;
|
|
1437
|
-
|
|
1438
|
-
var value = _ref.value,
|
|
1439
|
-
hyphens = _ref.hyphens,
|
|
1440
|
-
_ref$defaultValue = _ref.defaultValue,
|
|
1441
|
-
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue;
|
|
2147
|
+
const text = value ? (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : (_value$$children$ = _value$.children[0]) === null || _value$$children$ === void 0 ? void 0 : _value$$children$.text : defaultValue;
|
|
1442
2148
|
return /*#__PURE__*/React.createElement("span", {
|
|
1443
|
-
className: classNames(frontendStyles.root, frontendStyles[
|
|
1444
|
-
|
|
2149
|
+
className: classNames(frontendStyles.root, frontendStyles.textEffects, frontendStyles[`hyphens-${hyphens}`]),
|
|
2150
|
+
__self: this,
|
|
2151
|
+
__source: {
|
|
2152
|
+
fileName: _jsxFileName$q,
|
|
2153
|
+
lineNumber: 14,
|
|
2154
|
+
columnNumber: 7
|
|
2155
|
+
}
|
|
2156
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2157
|
+
__self: this,
|
|
2158
|
+
__source: {
|
|
2159
|
+
fileName: _jsxFileName$q,
|
|
2160
|
+
lineNumber: 17,
|
|
2161
|
+
columnNumber: 9
|
|
2162
|
+
}
|
|
2163
|
+
}, text));
|
|
1445
2164
|
});
|
|
1446
2165
|
|
|
1447
|
-
var
|
|
2166
|
+
var _jsxFileName$r = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/EditableLink.js";
|
|
2167
|
+
const EditableLink = extensible('EditableLink', function EditableLink({
|
|
2168
|
+
className,
|
|
2169
|
+
href,
|
|
2170
|
+
openInNewTab,
|
|
2171
|
+
onClick,
|
|
2172
|
+
children
|
|
2173
|
+
}) {
|
|
2174
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
2175
|
+
href: href,
|
|
2176
|
+
openInNewTab: openInNewTab,
|
|
2177
|
+
attributes: {
|
|
2178
|
+
className,
|
|
2179
|
+
onClick
|
|
2180
|
+
},
|
|
2181
|
+
children: children,
|
|
2182
|
+
__self: this,
|
|
2183
|
+
__source: {
|
|
2184
|
+
fileName: _jsxFileName$r,
|
|
2185
|
+
lineNumber: 10,
|
|
2186
|
+
columnNumber: 7
|
|
2187
|
+
}
|
|
2188
|
+
});
|
|
2189
|
+
});
|
|
2190
|
+
|
|
2191
|
+
var _jsxFileName$s = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Placeholder.js";
|
|
2192
|
+
const Placeholder = extensible('Placeholder', function Placeholder() {
|
|
2193
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2194
|
+
className: styles$e.placeholder,
|
|
2195
|
+
__self: this,
|
|
2196
|
+
__source: {
|
|
2197
|
+
fileName: _jsxFileName$s,
|
|
2198
|
+
lineNumber: 6,
|
|
2199
|
+
columnNumber: 10
|
|
2200
|
+
}
|
|
2201
|
+
});
|
|
2202
|
+
});
|
|
2203
|
+
|
|
2204
|
+
var _jsxFileName$t = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/FilePlaceholderDecorator.js";
|
|
2205
|
+
function FilePlaceholder({
|
|
2206
|
+
file
|
|
2207
|
+
}) {
|
|
2208
|
+
if (file === null || file === void 0 ? void 0 : file.isReady) {
|
|
2209
|
+
return null;
|
|
2210
|
+
}
|
|
2211
|
+
return /*#__PURE__*/React.createElement(Placeholder, {
|
|
2212
|
+
__self: this,
|
|
2213
|
+
__source: {
|
|
2214
|
+
fileName: _jsxFileName$t,
|
|
2215
|
+
lineNumber: 9,
|
|
2216
|
+
columnNumber: 10
|
|
2217
|
+
}
|
|
2218
|
+
});
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
const LinkTooltipProvider = extensible('LinkTooltipProvider', function LinkTooltipProvider({
|
|
2222
|
+
children
|
|
2223
|
+
}) {
|
|
2224
|
+
return children;
|
|
2225
|
+
});
|
|
2226
|
+
|
|
2227
|
+
var styles$a = {"container":"FitViewport-module_container__-awVj","content":"FitViewport-module_content__1_K5a","inner":"FitViewport-module_inner__3psd1"};
|
|
2228
|
+
|
|
2229
|
+
var _jsxFileName$u = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/FitViewport.js";
|
|
2230
|
+
const AspectRatioContext = React.createContext();
|
|
1448
2231
|
|
|
1449
|
-
var AspectRatioContext = React.createContext();
|
|
1450
2232
|
/**
|
|
1451
2233
|
* Render a div with the given aspect ratio which does not
|
|
1452
2234
|
* exceed the heigth of the viewport by setting an appropriate
|
|
@@ -1470,131 +2252,225 @@ var AspectRatioContext = React.createContext();
|
|
|
1470
2252
|
* @param {number} [props.aspectRatio] - Aspect ratio of div.
|
|
1471
2253
|
* @param {Object} [props.file] - Use width/height of file to calculate aspect ratio.
|
|
1472
2254
|
* @param {number} [props.scale] - Only take up fraction of the viewport height supplied as value between 0 and 1.
|
|
1473
|
-
* @param {
|
|
2255
|
+
* @param {string} [props.fill] - Ignore aspect ration and fill viewport vertically.
|
|
1474
2256
|
*/
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
if (!file && !aspectRatio) return children;
|
|
1488
|
-
aspectRatio = aspectRatio || file.height / file.width;
|
|
1489
|
-
var maxWidthCSS;
|
|
1490
|
-
|
|
1491
|
-
if (height) {
|
|
1492
|
-
// thumbnail view/fixed size: calculate absolute width in px
|
|
1493
|
-
maxWidthCSS = height / aspectRatio * scale + 'px';
|
|
1494
|
-
} else {
|
|
1495
|
-
// published view: set max width to specific aspect ratio depending on viewport height
|
|
1496
|
-
maxWidthCSS = 100 / aspectRatio * scale + 'vh';
|
|
2257
|
+
function FitViewport({
|
|
2258
|
+
file,
|
|
2259
|
+
aspectRatio,
|
|
2260
|
+
fallbackAspectRatio,
|
|
2261
|
+
children,
|
|
2262
|
+
fill,
|
|
2263
|
+
scale
|
|
2264
|
+
}) {
|
|
2265
|
+
if (!file && !aspectRatio && !fallbackAspectRatio) return children;
|
|
2266
|
+
if (typeof aspectRatio === 'string') {
|
|
2267
|
+
aspectRatio = `var(--theme-aspect-ratio-${aspectRatio})`;
|
|
1497
2268
|
}
|
|
1498
|
-
|
|
2269
|
+
aspectRatio = fill ? 'fill' : aspectRatio || ((file === null || file === void 0 ? void 0 : file.width) ? file.height / file.width : fallbackAspectRatio);
|
|
1499
2270
|
return /*#__PURE__*/React.createElement("div", {
|
|
1500
|
-
className:
|
|
2271
|
+
className: styles$a.container,
|
|
1501
2272
|
style: {
|
|
1502
|
-
|
|
2273
|
+
'--fit-viewport-aspect-ratio': fill ? undefined : aspectRatio,
|
|
2274
|
+
'--fit-viewport-scale': scale
|
|
2275
|
+
},
|
|
2276
|
+
__self: this,
|
|
2277
|
+
__source: {
|
|
2278
|
+
fileName: _jsxFileName$u,
|
|
2279
|
+
lineNumber: 45,
|
|
2280
|
+
columnNumber: 5
|
|
1503
2281
|
}
|
|
1504
2282
|
}, /*#__PURE__*/React.createElement(AspectRatioContext.Provider, {
|
|
1505
|
-
value: aspectRatio
|
|
2283
|
+
value: aspectRatio,
|
|
2284
|
+
__self: this,
|
|
2285
|
+
__source: {
|
|
2286
|
+
fileName: _jsxFileName$u,
|
|
2287
|
+
lineNumber: 48,
|
|
2288
|
+
columnNumber: 7
|
|
2289
|
+
}
|
|
1506
2290
|
}, children));
|
|
1507
2291
|
}
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
2292
|
+
FitViewport.Content = function FitViewportContent({
|
|
2293
|
+
children
|
|
2294
|
+
}) {
|
|
2295
|
+
let aspectRatio = useContext(AspectRatioContext);
|
|
2296
|
+
if (aspectRatio === 'fill') {
|
|
2297
|
+
return /*#__PURE__*/React.createElement(Fullscreen, {
|
|
2298
|
+
children: children,
|
|
2299
|
+
__self: this,
|
|
2300
|
+
__source: {
|
|
2301
|
+
fileName: _jsxFileName$u,
|
|
2302
|
+
lineNumber: 61,
|
|
2303
|
+
columnNumber: 9
|
|
2304
|
+
}
|
|
2305
|
+
});
|
|
2306
|
+
} else if (!aspectRatio) {
|
|
1514
2307
|
return children;
|
|
1515
2308
|
}
|
|
1516
|
-
|
|
1517
2309
|
return /*#__PURE__*/React.createElement("div", {
|
|
1518
|
-
className: styles$
|
|
2310
|
+
className: styles$a.content,
|
|
2311
|
+
__self: this,
|
|
2312
|
+
__source: {
|
|
2313
|
+
fileName: _jsxFileName$u,
|
|
2314
|
+
lineNumber: 69,
|
|
2315
|
+
columnNumber: 7
|
|
2316
|
+
}
|
|
1519
2317
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1520
|
-
|
|
1521
|
-
|
|
2318
|
+
__self: this,
|
|
2319
|
+
__source: {
|
|
2320
|
+
fileName: _jsxFileName$u,
|
|
2321
|
+
lineNumber: 70,
|
|
2322
|
+
columnNumber: 9
|
|
1522
2323
|
}
|
|
1523
2324
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1524
|
-
className: styles$
|
|
2325
|
+
className: styles$a.inner,
|
|
2326
|
+
__self: this,
|
|
2327
|
+
__source: {
|
|
2328
|
+
fileName: _jsxFileName$u,
|
|
2329
|
+
lineNumber: 71,
|
|
2330
|
+
columnNumber: 9
|
|
2331
|
+
}
|
|
1525
2332
|
}, children));
|
|
1526
2333
|
};
|
|
1527
2334
|
|
|
1528
|
-
var styles$
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
2335
|
+
var styles$b = {"container":"Tooltip-module_container__3V63U","bubble":"Tooltip-module_bubble__FIL1C scope-tooltip","open":"Tooltip-module_open__1avQa","fixed":"Tooltip-module_fixed__3NGyG","openOnHover":"Tooltip-module_openOnHover__1EeI5","fadeIn":"Tooltip-module_fadeIn__3g9QH","inner":"Tooltip-module_inner__E2hsp","highlight":"Tooltip-module_highlight__2NpuQ","arrow":"Tooltip-module_arrow__3LxXo"};
|
|
2336
|
+
|
|
2337
|
+
var _jsxFileName$v = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/Tooltip.js";
|
|
2338
|
+
function Tooltip({
|
|
2339
|
+
bubbleClassName,
|
|
2340
|
+
arrowPos,
|
|
2341
|
+
children,
|
|
2342
|
+
content,
|
|
2343
|
+
fixed,
|
|
2344
|
+
highlight,
|
|
2345
|
+
name,
|
|
2346
|
+
openOnHover,
|
|
2347
|
+
verticalOffset,
|
|
2348
|
+
horizontalOffset
|
|
2349
|
+
}) {
|
|
2350
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
2351
|
+
const buttonRef = useRef(null);
|
|
2352
|
+
const containerRef = useRef(null);
|
|
2353
|
+
const tooltipId = `tooltip-${name}`;
|
|
2354
|
+
const handleClick = () => {
|
|
2355
|
+
setIsOpen(prev => !prev);
|
|
2356
|
+
};
|
|
2357
|
+
const handleKeyDown = event => {
|
|
2358
|
+
if (event.key === 'Escape' && isOpen) {
|
|
2359
|
+
setIsOpen(false);
|
|
2360
|
+
setTimeout(() => {
|
|
2361
|
+
var _buttonRef$current;
|
|
2362
|
+
return (_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
|
|
2363
|
+
}, 0);
|
|
2364
|
+
}
|
|
2365
|
+
};
|
|
2366
|
+
const handleBlur = event => {
|
|
2367
|
+
var _containerRef$current;
|
|
2368
|
+
if (isOpen && event.relatedTarget && !((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.contains(event.relatedTarget))) {
|
|
2369
|
+
setIsOpen(false);
|
|
2370
|
+
}
|
|
2371
|
+
};
|
|
2372
|
+
const isControlled = !openOnHover && !fixed;
|
|
2373
|
+
useEffect(() => {
|
|
2374
|
+
if (!isControlled || !isOpen) {
|
|
2375
|
+
return;
|
|
2376
|
+
}
|
|
2377
|
+
const handleDocumentClick = event => {
|
|
2378
|
+
var _containerRef$current2;
|
|
2379
|
+
if (!((_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.contains(event.target))) {
|
|
2380
|
+
setIsOpen(false);
|
|
2381
|
+
}
|
|
2382
|
+
};
|
|
2383
|
+
document.addEventListener('click', handleDocumentClick);
|
|
2384
|
+
return () => {
|
|
2385
|
+
document.removeEventListener('click', handleDocumentClick);
|
|
2386
|
+
};
|
|
2387
|
+
}, [isControlled, isOpen]);
|
|
2388
|
+
const triggerProps = isControlled ? {
|
|
2389
|
+
onClick: handleClick,
|
|
2390
|
+
ref: buttonRef,
|
|
2391
|
+
'aria-expanded': isOpen,
|
|
2392
|
+
'aria-controls': tooltipId
|
|
2393
|
+
} : openOnHover ? {
|
|
2394
|
+
'aria-describedby': tooltipId
|
|
2395
|
+
} : {};
|
|
1542
2396
|
return /*#__PURE__*/React.createElement("div", {
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
2397
|
+
ref: containerRef,
|
|
2398
|
+
className: classNames(styles$b.container, {
|
|
2399
|
+
[styles$b.openOnHover]: openOnHover,
|
|
2400
|
+
[styles$b.fixed]: fixed
|
|
2401
|
+
}),
|
|
2402
|
+
onKeyDown: isControlled ? handleKeyDown : undefined,
|
|
2403
|
+
onBlur: isControlled ? handleBlur : undefined,
|
|
2404
|
+
__self: this,
|
|
2405
|
+
__source: {
|
|
2406
|
+
fileName: _jsxFileName$v,
|
|
2407
|
+
lineNumber: 73,
|
|
2408
|
+
columnNumber: 5
|
|
2409
|
+
}
|
|
2410
|
+
}, typeof children === 'function' ? children(triggerProps) : children, /*#__PURE__*/React.createElement(Bubble, {
|
|
1546
2411
|
className: bubbleClassName,
|
|
1547
2412
|
highlight: highlight,
|
|
1548
2413
|
arrowPos: arrowPos,
|
|
1549
2414
|
verticalOffset: verticalOffset,
|
|
1550
|
-
horizontalOffset: horizontalOffset
|
|
2415
|
+
horizontalOffset: horizontalOffset,
|
|
2416
|
+
isOpen: isOpen,
|
|
2417
|
+
id: tooltipId,
|
|
2418
|
+
__self: this,
|
|
2419
|
+
__source: {
|
|
2420
|
+
fileName: _jsxFileName$v,
|
|
2421
|
+
lineNumber: 81,
|
|
2422
|
+
columnNumber: 7
|
|
2423
|
+
}
|
|
1551
2424
|
}, content));
|
|
1552
2425
|
}
|
|
1553
|
-
function Bubble(
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
2426
|
+
function Bubble({
|
|
2427
|
+
className,
|
|
2428
|
+
arrowPos,
|
|
2429
|
+
children,
|
|
2430
|
+
highlight,
|
|
2431
|
+
horizontalOffset,
|
|
2432
|
+
verticalOffset,
|
|
2433
|
+
isOpen,
|
|
2434
|
+
id
|
|
2435
|
+
}) {
|
|
2436
|
+
let inlineStyle = {
|
|
1561
2437
|
marginLeft: horizontalOffset,
|
|
1562
2438
|
marginTop: verticalOffset
|
|
1563
|
-
};
|
|
1564
|
-
// come up in tab order. This ensures the tooltip stays expanded
|
|
1565
|
-
// when text in the legal info menu is selected.
|
|
1566
|
-
|
|
2439
|
+
};
|
|
1567
2440
|
return /*#__PURE__*/React.createElement("div", {
|
|
1568
2441
|
style: inlineStyle,
|
|
1569
|
-
|
|
1570
|
-
className: classNames(className, styles$
|
|
2442
|
+
id: id,
|
|
2443
|
+
className: classNames(className, styles$b.bubble, {
|
|
2444
|
+
[styles$b.highlight]: highlight,
|
|
2445
|
+
[styles$b.open]: isOpen
|
|
2446
|
+
}),
|
|
2447
|
+
__self: this,
|
|
2448
|
+
__source: {
|
|
2449
|
+
fileName: _jsxFileName$v,
|
|
2450
|
+
lineNumber: 101,
|
|
2451
|
+
columnNumber: 5
|
|
2452
|
+
}
|
|
1571
2453
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1572
2454
|
style: {
|
|
1573
2455
|
left: arrowPos
|
|
1574
2456
|
},
|
|
1575
|
-
className: styles$
|
|
2457
|
+
className: styles$b.arrow,
|
|
2458
|
+
__self: this,
|
|
2459
|
+
__source: {
|
|
2460
|
+
fileName: _jsxFileName$v,
|
|
2461
|
+
lineNumber: 106,
|
|
2462
|
+
columnNumber: 7
|
|
2463
|
+
}
|
|
1576
2464
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1577
|
-
className: styles$
|
|
2465
|
+
className: styles$b.inner,
|
|
2466
|
+
__self: this,
|
|
2467
|
+
__source: {
|
|
2468
|
+
fileName: _jsxFileName$v,
|
|
2469
|
+
lineNumber: 107,
|
|
2470
|
+
columnNumber: 7
|
|
2471
|
+
}
|
|
1578
2472
|
}, children));
|
|
1579
|
-
} // Safari does not focus buttons after they are clicked [1]. Focus
|
|
1580
|
-
// manually to ensure `focus-within` selector that opens the tooltip
|
|
1581
|
-
// applies.
|
|
1582
|
-
//
|
|
1583
|
-
// [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
|
1584
|
-
|
|
1585
|
-
function fixFocusHandlingSafari(event) {
|
|
1586
|
-
if (!event.target.closest) {
|
|
1587
|
-
// IE does not support closest, but also does not need this fix.
|
|
1588
|
-
return;
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
var button = event.target.closest('button');
|
|
1592
|
-
|
|
1593
|
-
if (button) {
|
|
1594
|
-
button.focus();
|
|
1595
|
-
}
|
|
1596
2473
|
}
|
|
1597
|
-
|
|
1598
2474
|
Tooltip.defaultProps = {
|
|
1599
2475
|
arrowPos: '50%',
|
|
1600
2476
|
fixed: false,
|
|
@@ -1603,473 +2479,164 @@ Tooltip.defaultProps = {
|
|
|
1603
2479
|
horizontalOffset: 0
|
|
1604
2480
|
};
|
|
1605
2481
|
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
"aria-hidden": "true",
|
|
1630
|
-
"data-prefix": "fas",
|
|
1631
|
-
"data-icon": "volume-mute",
|
|
1632
|
-
className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-volume-mute"] || "fa-volume-mute") + " " + (styles["fa-w-16"] || "fa-w-16"),
|
|
1633
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1634
|
-
viewBox: "0 0 512 512"
|
|
1635
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1636
|
-
d: "M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"
|
|
1637
|
-
}));
|
|
1638
|
-
});
|
|
1639
|
-
|
|
1640
|
-
function _extends$6() {
|
|
1641
|
-
_extends$6 = Object.assign || function (target) {
|
|
1642
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1643
|
-
var source = arguments[i];
|
|
1644
|
-
|
|
1645
|
-
for (var key in source) {
|
|
1646
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1647
|
-
target[key] = source[key];
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
return target;
|
|
1653
|
-
};
|
|
1654
|
-
|
|
1655
|
-
return _extends$6.apply(this, arguments);
|
|
1656
|
-
}
|
|
1657
|
-
var share = (function (_ref) {
|
|
1658
|
-
var _ref$styles = _ref.styles,
|
|
1659
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1660
|
-
|
|
1661
|
-
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
1662
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1663
|
-
viewBox: "5 5 84 84"
|
|
1664
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1665
|
-
d: "M67.5 18c-5.1 0-9.3 4.2-9.3 9.3 0 .5.1 1.1.2 1.6l-23 12.9c-1.7-1.8-4.1-3-6.8-3-5.1 0-9.3 4.1-9.3 9.3 0 5.1 4.1 9.3 9.3 9.3 2.7 0 5.2-1.2 6.9-3.1l22.8 13.4c0 .4-.1.7-.1 1.1 0 5.1 4.1 9.3 9.3 9.3 5.1 0 9.3-4.1 9.3-9.3 0-5.1-4.1-9.3-9.3-9.3-2.8 0-5.4 1.3-7.1 3.3L37.7 49.4c.1-.4.1-.9.1-1.3 0-.5 0-1-.1-1.5l23.1-13c1.7 1.8 4.1 3 6.8 3 5.1 0 9.3-4.1 9.3-9.3-.1-5.1-4.3-9.3-9.4-9.3z"
|
|
1666
|
-
}));
|
|
1667
|
-
});
|
|
1668
|
-
|
|
1669
|
-
function _extends$7() {
|
|
1670
|
-
_extends$7 = Object.assign || function (target) {
|
|
1671
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1672
|
-
var source = arguments[i];
|
|
1673
|
-
|
|
1674
|
-
for (var key in source) {
|
|
1675
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1676
|
-
target[key] = source[key];
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
2482
|
+
var styles$c = {"button":"ScrollButton-module_button__3rrDc","icon":"ScrollButton-module_icon__128_J","disabled":"ScrollButton-module_disabled__35fFF","visuallyHidden":"ScrollButton-module_visuallyHidden__36chO"};
|
|
2483
|
+
|
|
2484
|
+
var _jsxFileName$w = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/ScrollButton.js";
|
|
2485
|
+
const size = 40;
|
|
2486
|
+
function ScrollButton({
|
|
2487
|
+
direction,
|
|
2488
|
+
disabled,
|
|
2489
|
+
onClick
|
|
2490
|
+
}) {
|
|
2491
|
+
const {
|
|
2492
|
+
t
|
|
2493
|
+
} = useI18n();
|
|
2494
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
2495
|
+
className: classNames(styles$c.button, {
|
|
2496
|
+
[styles$c.disabled]: disabled
|
|
2497
|
+
}),
|
|
2498
|
+
tabIndex: "-1",
|
|
2499
|
+
onClick: onClick,
|
|
2500
|
+
__self: this,
|
|
2501
|
+
__source: {
|
|
2502
|
+
fileName: _jsxFileName$w,
|
|
2503
|
+
lineNumber: 14,
|
|
2504
|
+
columnNumber: 5
|
|
1679
2505
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
var _ref$styles = _ref.styles,
|
|
1688
|
-
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
1689
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1690
|
-
|
|
1691
|
-
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
1692
|
-
"aria-hidden": "true",
|
|
1693
|
-
"data-prefix": "fas",
|
|
1694
|
-
"data-icon": "volume-mute",
|
|
1695
|
-
className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-volume-mute"] || "fa-volume-mute") + " " + (styles["fa-w-16"] || "fa-w-16"),
|
|
1696
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1697
|
-
viewBox: "0 0 512 512"
|
|
1698
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1699
|
-
d: "M232.36 64.01a24.007 24.007 0 00-1.176.002c-5.703.15-11.464 2.348-16.155 7.039L126.061 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-14.293-11.514-23.733-23.64-24.01zm149.5 31.994c-8.107-.16-16.098 3.814-20.75 11.217-7.09 11.28-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256c0-63.53-32.06-121.94-85.77-156.24a23.808 23.808 0 00-12.37-3.756zm-55.032 80.174c-8.51-.046-16.795 4.42-21.209 12.402-6.39 11.61-2.159 26.2 9.451 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88 0-31.88-17.54-61.32-45.78-76.86a23.987 23.987 0 00-11.402-2.952z"
|
|
1700
|
-
}));
|
|
1701
|
-
});
|
|
1702
|
-
|
|
1703
|
-
function _extends$8() {
|
|
1704
|
-
_extends$8 = Object.assign || function (target) {
|
|
1705
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1706
|
-
var source = arguments[i];
|
|
1707
|
-
|
|
1708
|
-
for (var key in source) {
|
|
1709
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1710
|
-
target[key] = source[key];
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
2506
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2507
|
+
className: styles$c.icon,
|
|
2508
|
+
__self: this,
|
|
2509
|
+
__source: {
|
|
2510
|
+
fileName: _jsxFileName$w,
|
|
2511
|
+
lineNumber: 18,
|
|
2512
|
+
columnNumber: 7
|
|
1713
2513
|
}
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
1725
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1726
|
-
viewBox: "-3 -3 30 30"
|
|
1727
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1728
|
-
d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"
|
|
1729
|
-
}));
|
|
1730
|
-
});
|
|
1731
|
-
|
|
1732
|
-
function _extends$9() {
|
|
1733
|
-
_extends$9 = Object.assign || function (target) {
|
|
1734
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1735
|
-
var source = arguments[i];
|
|
1736
|
-
|
|
1737
|
-
for (var key in source) {
|
|
1738
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1739
|
-
target[key] = source[key];
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
2514
|
+
}, /*#__PURE__*/React.createElement(ThemeIcon, {
|
|
2515
|
+
name: direction === 'left' ? 'arrowLeft' : 'arrowRight',
|
|
2516
|
+
width: size,
|
|
2517
|
+
height: size,
|
|
2518
|
+
__self: this,
|
|
2519
|
+
__source: {
|
|
2520
|
+
fileName: _jsxFileName$w,
|
|
2521
|
+
lineNumber: 19,
|
|
2522
|
+
columnNumber: 9
|
|
1742
2523
|
}
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
var _ref$styles = _ref.styles,
|
|
1751
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1752
|
-
|
|
1753
|
-
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
1754
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1755
|
-
width: "800",
|
|
1756
|
-
height: "800",
|
|
1757
|
-
viewBox: "0 0 24 24",
|
|
1758
|
-
fill: "none"
|
|
1759
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1760
|
-
d: "M14 9c-.48-.6-1.07-1-2-1-1.923 0-3 1.143-3 4s1.077 4 3 4c.93 0 1.52-.4 2-1m-2 6a9 9 0 100-18 9 9 0 000 18z",
|
|
1761
|
-
stroke: "currentColor",
|
|
1762
|
-
strokeWidth: "2",
|
|
1763
|
-
strokeLinecap: "round",
|
|
1764
|
-
strokeLinejoin: "round"
|
|
1765
|
-
}));
|
|
1766
|
-
});
|
|
1767
|
-
|
|
1768
|
-
function _extends$a() {
|
|
1769
|
-
_extends$a = Object.assign || function (target) {
|
|
1770
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1771
|
-
var source = arguments[i];
|
|
1772
|
-
|
|
1773
|
-
for (var key in source) {
|
|
1774
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1775
|
-
target[key] = source[key];
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
2524
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2525
|
+
className: styles$c.visuallyHidden,
|
|
2526
|
+
__self: this,
|
|
2527
|
+
__source: {
|
|
2528
|
+
fileName: _jsxFileName$w,
|
|
2529
|
+
lineNumber: 22,
|
|
2530
|
+
columnNumber: 9
|
|
1778
2531
|
}
|
|
1779
|
-
|
|
1780
|
-
return target;
|
|
1781
|
-
};
|
|
1782
|
-
|
|
1783
|
-
return _extends$a.apply(this, arguments);
|
|
2532
|
+
}, t(direction === 'left' ? 'pageflow_scrolled.public.previous' : 'pageflow_scrolled.public.next'))));
|
|
1784
2533
|
}
|
|
1785
|
-
var email = (function (_ref) {
|
|
1786
|
-
var _ref$styles = _ref.styles,
|
|
1787
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1788
|
-
|
|
1789
|
-
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
1790
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1791
|
-
viewBox: "0 0 612 612"
|
|
1792
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1793
|
-
d: "M573.75 57.375H38.25C17.136 57.375 0 74.511 0 95.625v420.75c0 21.133 17.136 38.25 38.25 38.25h535.5c21.133 0 38.25-17.117 38.25-38.25V95.625c0-21.114-17.117-38.25-38.25-38.25zM554.625 497.25H57.375V204.657l224.03 187.999c7.134 5.967 15.874 8.97 24.595 8.97 8.74 0 17.461-3.003 24.595-8.97l224.03-187.999V497.25zm0-367.487L306 338.379 57.375 129.763V114.75h497.25v15.013z"
|
|
1794
|
-
}));
|
|
1795
|
-
});
|
|
1796
|
-
|
|
1797
|
-
function _extends$b() {
|
|
1798
|
-
_extends$b = Object.assign || function (target) {
|
|
1799
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1800
|
-
var source = arguments[i];
|
|
1801
2534
|
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
target[key] = source[key];
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
return target;
|
|
1810
|
-
};
|
|
1811
|
-
|
|
1812
|
-
return _extends$b.apply(this, arguments);
|
|
2535
|
+
function textColorForBackgroundColor(hex) {
|
|
2536
|
+
return invert(hex, true);
|
|
1813
2537
|
}
|
|
1814
|
-
var facebook = (function (_ref) {
|
|
1815
|
-
var _ref$styles = _ref.styles,
|
|
1816
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1817
2538
|
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1822
|
-
d: "M158.081 83.3v59.218h-43.385v72.412h43.385v215.183h89.122V214.936h59.805s5.601-34.721 8.316-72.685H247.54V92.74c0-7.4 9.717-17.354 19.321-17.354h48.557V.001h-66.021C155.878-.004 158.081 72.48 158.081 83.3z"
|
|
1823
|
-
}));
|
|
1824
|
-
});
|
|
1825
|
-
|
|
1826
|
-
function _extends$c() {
|
|
1827
|
-
_extends$c = Object.assign || function (target) {
|
|
1828
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1829
|
-
var source = arguments[i];
|
|
1830
|
-
|
|
1831
|
-
for (var key in source) {
|
|
1832
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1833
|
-
target[key] = source[key];
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
return target;
|
|
1839
|
-
};
|
|
1840
|
-
|
|
1841
|
-
return _extends$c.apply(this, arguments);
|
|
2539
|
+
function registerTemplateWidgetType (typeName, callback) {
|
|
2540
|
+
let element = document.getElementById('template-widget-container');
|
|
2541
|
+
callback(element);
|
|
1842
2542
|
}
|
|
1843
|
-
var linkedIn = (function (_ref) {
|
|
1844
|
-
var _ref$styles = _ref.styles,
|
|
1845
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
|
1846
2543
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
d: "M430.117 261.543V420.56h-92.188V272.193c0-37.271-13.334-62.707-46.703-62.707-25.473 0-40.632 17.142-47.301 33.724-2.432 5.928-3.058 14.179-3.058 22.477V420.56h-92.219s1.242-251.285 0-277.32h92.21v39.309c-.187.294-.43.611-.606.896h.606v-.896c12.251-18.869 34.13-45.824 83.102-45.824 60.673-.001 106.157 39.636 106.157 124.818zM52.183 9.558C20.635 9.558 0 30.251 0 57.463c0 26.619 20.038 47.94 50.959 47.94h.616c32.159 0 52.159-21.317 52.159-47.94-.606-27.212-20-47.905-51.551-47.905zM5.477 420.56h92.184V143.24H5.477v277.32z"
|
|
1852
|
-
}));
|
|
2544
|
+
const WidgetSelectionRect = extensible('WidgetSelectionRect', function WidgetSelectionRect({
|
|
2545
|
+
children
|
|
2546
|
+
}) {
|
|
2547
|
+
return children;
|
|
1853
2548
|
});
|
|
1854
2549
|
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
2550
|
+
var styles$d = {"button":"LinkButton-module_button__33q1F scope-linkButton","editable":"LinkButton-module_editable__FzuA4"};
|
|
2551
|
+
|
|
2552
|
+
var _jsxFileName$x = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/LinkButton.js";
|
|
2553
|
+
function LinkButton({
|
|
2554
|
+
href,
|
|
2555
|
+
openInNewTab,
|
|
2556
|
+
value,
|
|
2557
|
+
onTextChange,
|
|
2558
|
+
onLinkChange,
|
|
2559
|
+
scaleCategory,
|
|
2560
|
+
className,
|
|
2561
|
+
actionButtonVisible,
|
|
2562
|
+
linkPreviewPosition,
|
|
2563
|
+
linkPreviewDisabled,
|
|
2564
|
+
children,
|
|
2565
|
+
...props
|
|
2566
|
+
}) {
|
|
2567
|
+
const {
|
|
2568
|
+
t
|
|
2569
|
+
} = useI18n({
|
|
2570
|
+
locale: 'ui'
|
|
2571
|
+
});
|
|
2572
|
+
const {
|
|
2573
|
+
isEditable
|
|
2574
|
+
} = useContentElementEditorState();
|
|
2575
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
2576
|
+
inline: true,
|
|
2577
|
+
scaleCategory: scaleCategory,
|
|
2578
|
+
__self: this,
|
|
2579
|
+
__source: {
|
|
2580
|
+
fileName: _jsxFileName$x,
|
|
2581
|
+
lineNumber: 29,
|
|
2582
|
+
columnNumber: 5
|
|
1865
2583
|
}
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
});
|
|
1883
|
-
|
|
1884
|
-
function _extends$e() {
|
|
1885
|
-
_extends$e = Object.assign || function (target) {
|
|
1886
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1887
|
-
var source = arguments[i];
|
|
1888
|
-
|
|
1889
|
-
for (var key in source) {
|
|
1890
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1891
|
-
target[key] = source[key];
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
2584
|
+
}, /*#__PURE__*/React.createElement(EditableLink, Object.assign({
|
|
2585
|
+
href: href,
|
|
2586
|
+
openInNewTab: openInNewTab,
|
|
2587
|
+
linkPreviewPosition: linkPreviewPosition,
|
|
2588
|
+
linkPreviewDisabled: utils.isBlankEditableTextValue(value) || linkPreviewDisabled,
|
|
2589
|
+
actionButtonVisible: actionButtonVisible,
|
|
2590
|
+
className: classNames(styles$d.button, className, {
|
|
2591
|
+
[styles$d.editable]: isEditable
|
|
2592
|
+
}),
|
|
2593
|
+
onChange: onLinkChange
|
|
2594
|
+
}, props, {
|
|
2595
|
+
__self: this,
|
|
2596
|
+
__source: {
|
|
2597
|
+
fileName: _jsxFileName$x,
|
|
2598
|
+
lineNumber: 30,
|
|
2599
|
+
columnNumber: 7
|
|
1894
2600
|
}
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
1906
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1907
|
-
viewBox: "0 0 512 512"
|
|
1908
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1909
|
-
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"
|
|
1910
|
-
}));
|
|
1911
|
-
});
|
|
1912
|
-
|
|
1913
|
-
function _extends$f() {
|
|
1914
|
-
_extends$f = Object.assign || function (target) {
|
|
1915
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1916
|
-
var source = arguments[i];
|
|
1917
|
-
|
|
1918
|
-
for (var key in source) {
|
|
1919
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1920
|
-
target[key] = source[key];
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
2601
|
+
}), /*#__PURE__*/React.createElement(EditableInlineText, {
|
|
2602
|
+
value: value,
|
|
2603
|
+
onChange: onTextChange,
|
|
2604
|
+
placeholder: t('pageflow_scrolled.inline_editing.type_text'),
|
|
2605
|
+
__self: this,
|
|
2606
|
+
__source: {
|
|
2607
|
+
fileName: _jsxFileName$x,
|
|
2608
|
+
lineNumber: 38,
|
|
2609
|
+
columnNumber: 9
|
|
1923
2610
|
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1938
|
-
d: "M90 43.841c0 24.213-19.779 43.841-44.182 43.841a44.256 44.256 0 01-21.357-5.455L0 90l7.975-23.522a43.38 43.38 0 01-6.34-22.637C1.635 19.628 21.416 0 45.818 0 70.223 0 90 19.628 90 43.841zM45.818 6.982c-20.484 0-37.146 16.535-37.146 36.859 0 8.065 2.629 15.534 7.076 21.61L11.107 79.14l14.275-4.537A37.122 37.122 0 0045.819 80.7c20.481 0 37.146-16.533 37.146-36.857S66.301 6.982 45.818 6.982zm22.311 46.956c-.273-.447-.994-.717-2.076-1.254-1.084-.537-6.41-3.138-7.4-3.495-.993-.358-1.717-.538-2.438.537-.721 1.076-2.797 3.495-3.43 4.212-.632.719-1.263.809-2.347.271-1.082-.537-4.571-1.673-8.708-5.333-3.219-2.848-5.393-6.364-6.025-7.441-.631-1.075-.066-1.656.475-2.191.488-.482 1.084-1.255 1.625-1.882.543-.628.723-1.075 1.082-1.793.363-.717.182-1.344-.09-1.883-.27-.537-2.438-5.825-3.34-7.977-.902-2.15-1.803-1.792-2.436-1.792-.631 0-1.354-.09-2.076-.09s-1.896.269-2.889 1.344c-.992 1.076-3.789 3.676-3.789 8.963 0 5.288 3.879 10.397 4.422 11.113.541.716 7.49 11.92 18.5 16.223C58.2 65.771 58.2 64.336 60.186 64.156c1.984-.179 6.406-2.599 7.312-5.107.9-2.512.9-4.663.631-5.111z"
|
|
1939
|
-
}));
|
|
1940
|
-
});
|
|
1941
|
-
|
|
1942
|
-
var icons = {
|
|
1943
|
-
expand: ArrowRightIcon,
|
|
1944
|
-
information: information,
|
|
1945
|
-
muted: muted,
|
|
1946
|
-
share: share,
|
|
1947
|
-
unmuted: unmuted,
|
|
1948
|
-
gear: gear,
|
|
1949
|
-
copyright: copyright,
|
|
1950
|
-
email: email,
|
|
1951
|
-
facebook: facebook,
|
|
1952
|
-
linkedIn: linkedIn,
|
|
1953
|
-
telegram: telegram,
|
|
1954
|
-
twitter: twitter,
|
|
1955
|
-
whatsApp: whatsApp,
|
|
1956
|
-
arrowLeft: ArrowLeftIcon,
|
|
1957
|
-
arrowRight: ArrowRightIcon
|
|
1958
|
-
};
|
|
1959
|
-
/**
|
|
1960
|
-
* Render an SVG icon that can be customized in themes.
|
|
1961
|
-
*
|
|
1962
|
-
* @param {Object} props
|
|
1963
|
-
* @param {string} props.name -
|
|
1964
|
-
* Either: copyright, expand, gear, information, muted, share, unmuted,
|
|
1965
|
-
* email, facebook, linkedIn, telegram, twitter, whatsApp,
|
|
1966
|
-
* arrowLeft, arrowRight,
|
|
1967
|
-
* @params {number} [props.width] - Image width.
|
|
1968
|
-
* @params {number} [props.height] - Image height.
|
|
1969
|
-
*/
|
|
1970
|
-
|
|
1971
|
-
function ThemeIcon(_ref) {
|
|
1972
|
-
var name = _ref.name,
|
|
1973
|
-
width = _ref.width,
|
|
1974
|
-
height = _ref.height;
|
|
1975
|
-
var theme = useTheme();
|
|
1976
|
-
var FallbackIcon = icons[name];
|
|
1977
|
-
var themeAsset = theme.assets.icons[name];
|
|
1978
|
-
|
|
1979
|
-
if (!FallbackIcon) {
|
|
1980
|
-
throw new Error("Unknown icon '".concat(name, "'. Available options: ").concat(Object.keys(icons).join(', '), "."));
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
if (themeAsset) {
|
|
1984
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
1985
|
-
width: width,
|
|
1986
|
-
height: height
|
|
1987
|
-
}, /*#__PURE__*/React.createElement("use", {
|
|
1988
|
-
xlinkHref: "".concat(themeAsset, "#icon")
|
|
1989
|
-
}));
|
|
2611
|
+
}), children));
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
var _jsxFileName$y = "/home/tfischbach/code/pageflow/entry_types/scrolled/package/src/frontend/index.js";
|
|
2615
|
+
const editMode = typeof window !== 'undefined' && window.location.pathname.indexOf('/editor/entries') === 0;
|
|
2616
|
+
const withShadowClassName = styles$f.withShadow;
|
|
2617
|
+
global.pageflowScrolledRender = async function (seed) {
|
|
2618
|
+
setupI18n(seed.i18n);
|
|
2619
|
+
features.enable('frontend', seed.config.enabledFeatureNames);
|
|
2620
|
+
await browser.detectFeatures();
|
|
2621
|
+
await loadDashUnlessHlsSupported(seed);
|
|
2622
|
+
if (seed.config.loadInlineEditing) {
|
|
2623
|
+
await loadInlineEditingExtensions();
|
|
1990
2624
|
} else {
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
2625
|
+
registerVendors({
|
|
2626
|
+
contentElementTypes: api.contentElementTypes,
|
|
2627
|
+
consent,
|
|
2628
|
+
seed
|
|
1994
2629
|
});
|
|
1995
2630
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
function registerTemplateWidgetType (typeName, callback) {
|
|
2003
|
-
var element = document.getElementById('template-widget-container');
|
|
2004
|
-
callback(element);
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
var utils = {
|
|
2008
|
-
camelize: camelize,
|
|
2009
|
-
isBlank: isBlank,
|
|
2010
|
-
isBlankEditableTextValue: isBlankEditableTextValue,
|
|
2011
|
-
presence: presence
|
|
2631
|
+
render(seed);
|
|
2632
|
+
if (seed.config.loadCommenting) {
|
|
2633
|
+
loadCommentingExtensions();
|
|
2634
|
+
}
|
|
2012
2635
|
};
|
|
2013
|
-
|
|
2014
|
-
var editMode = typeof window !== 'undefined' && window.location.pathname.indexOf('/editor/entries') === 0;
|
|
2015
|
-
var withShadowClassName = styles$a.withShadow;
|
|
2016
|
-
|
|
2017
|
-
global.pageflowScrolledRender = /*#__PURE__*/function () {
|
|
2018
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(seed) {
|
|
2019
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2020
|
-
while (1) {
|
|
2021
|
-
switch (_context.prev = _context.next) {
|
|
2022
|
-
case 0:
|
|
2023
|
-
setupI18n(seed.i18n);
|
|
2024
|
-
features.enable('frontend', seed.config.enabledFeatureNames);
|
|
2025
|
-
_context.next = 4;
|
|
2026
|
-
return browser.detectFeatures();
|
|
2027
|
-
|
|
2028
|
-
case 4:
|
|
2029
|
-
_context.next = 6;
|
|
2030
|
-
return loadDashUnlessHlsSupported(seed);
|
|
2031
|
-
|
|
2032
|
-
case 6:
|
|
2033
|
-
if (!editMode) {
|
|
2034
|
-
_context.next = 11;
|
|
2035
|
-
break;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
_context.next = 9;
|
|
2039
|
-
return loadInlineEditingComponents();
|
|
2040
|
-
|
|
2041
|
-
case 9:
|
|
2042
|
-
_context.next = 12;
|
|
2043
|
-
break;
|
|
2044
|
-
|
|
2045
|
-
case 11:
|
|
2046
|
-
registerVendors({
|
|
2047
|
-
contentElementTypes: api.contentElementTypes,
|
|
2048
|
-
consent: consent,
|
|
2049
|
-
seed: seed
|
|
2050
|
-
});
|
|
2051
|
-
|
|
2052
|
-
case 12:
|
|
2053
|
-
render(seed);
|
|
2054
|
-
|
|
2055
|
-
case 13:
|
|
2056
|
-
case "end":
|
|
2057
|
-
return _context.stop();
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
}, _callee);
|
|
2061
|
-
}));
|
|
2062
|
-
|
|
2063
|
-
return function (_x) {
|
|
2064
|
-
return _ref.apply(this, arguments);
|
|
2065
|
-
};
|
|
2066
|
-
}();
|
|
2067
|
-
|
|
2068
2636
|
global.pageflowScrolledRegisterUpdateSeedHandler = function () {
|
|
2069
2637
|
if (window.parent !== window) {
|
|
2070
2638
|
window.addEventListener('message', receive);
|
|
2071
2639
|
}
|
|
2072
|
-
|
|
2073
2640
|
function receive(message) {
|
|
2074
2641
|
if (window.location.href.indexOf(message.origin) === 0) {
|
|
2075
2642
|
if (message.data.type === 'UPDATE_SEED') {
|
|
@@ -2078,24 +2645,66 @@ global.pageflowScrolledRegisterUpdateSeedHandler = function () {
|
|
|
2078
2645
|
}
|
|
2079
2646
|
}
|
|
2080
2647
|
};
|
|
2081
|
-
|
|
2648
|
+
function bootFromSeedElement() {
|
|
2649
|
+
const element = document.querySelector('script[type="application/json"][data-pageflow-scrolled-seed]');
|
|
2650
|
+
if (element) {
|
|
2651
|
+
global.pageflowScrolledRender(JSON.parse(element.textContent));
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
if (typeof document !== 'undefined') {
|
|
2655
|
+
// Widget packs (defaultNavigation, consentBar, mainStorylineSheet, ...) are
|
|
2656
|
+
// separate scripts that load after this entry bundle and register their widget
|
|
2657
|
+
// types on execution. All deferred pack scripts run before DOMContentLoaded, so
|
|
2658
|
+
// waiting for that event is what guarantees every widget type - and the seed
|
|
2659
|
+
// element that follows the scripts - is present before we render.
|
|
2660
|
+
if (document.readyState === 'complete') {
|
|
2661
|
+
bootFromSeedElement();
|
|
2662
|
+
} else {
|
|
2663
|
+
document.addEventListener('DOMContentLoaded', bootFromSeedElement);
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2082
2666
|
function render(seed) {
|
|
2083
2667
|
if (editMode) {
|
|
2084
2668
|
ReactDOM.render( /*#__PURE__*/React.createElement(Root, {
|
|
2085
|
-
seed: seed
|
|
2669
|
+
seed: seed,
|
|
2670
|
+
__self: this,
|
|
2671
|
+
__source: {
|
|
2672
|
+
fileName: _jsxFileName$y,
|
|
2673
|
+
lineNumber: 226,
|
|
2674
|
+
columnNumber: 21
|
|
2675
|
+
}
|
|
2086
2676
|
}), document.getElementById('root'));
|
|
2087
2677
|
} else {
|
|
2088
2678
|
ReactDOM.hydrate( /*#__PURE__*/React.createElement(Root, {
|
|
2089
|
-
seed: seed
|
|
2679
|
+
seed: seed,
|
|
2680
|
+
__self: this,
|
|
2681
|
+
__source: {
|
|
2682
|
+
fileName: _jsxFileName$y,
|
|
2683
|
+
lineNumber: 229,
|
|
2684
|
+
columnNumber: 22
|
|
2685
|
+
}
|
|
2090
2686
|
}), document.getElementById('root'));
|
|
2091
2687
|
}
|
|
2092
2688
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2689
|
+
function Root({
|
|
2690
|
+
seed
|
|
2691
|
+
}) {
|
|
2096
2692
|
return /*#__PURE__*/React.createElement(RootProviders, {
|
|
2097
|
-
seed: seed
|
|
2098
|
-
|
|
2693
|
+
seed: seed,
|
|
2694
|
+
__self: this,
|
|
2695
|
+
__source: {
|
|
2696
|
+
fileName: _jsxFileName$y,
|
|
2697
|
+
lineNumber: 235,
|
|
2698
|
+
columnNumber: 5
|
|
2699
|
+
}
|
|
2700
|
+
}, /*#__PURE__*/React.createElement(Entry, {
|
|
2701
|
+
__self: this,
|
|
2702
|
+
__source: {
|
|
2703
|
+
fileName: _jsxFileName$y,
|
|
2704
|
+
lineNumber: 236,
|
|
2705
|
+
columnNumber: 7
|
|
2706
|
+
}
|
|
2707
|
+
}));
|
|
2099
2708
|
}
|
|
2100
2709
|
|
|
2101
|
-
export { AudioPlayerControls, ClassicPlayerControls, ContentElementBox, ContentElementFigure, EditableInlineText, Entry, ExpandableImage, Figure, FitViewport, MediaInteractionTracking, MediaPlayerControls, Panorama, PlayerControls, Root,
|
|
2710
|
+
export { ActionButton, AudioPlayerControls, ClassicPlayerControls, ContentElementBox, ContentElementFigure, EditableInlineText, EditableLink, Entry, ExpandableImage, Figure, FilePlaceholder, FitViewport, LinkButton, LinkTooltipProvider, MediaInteractionTracking, MediaPlayerControls, PaginationIndicator, Panorama, Placeholder, PlayerControls, Root, ScrollButton, Tooltip, VideoPlayerControls, WaveformPlayerControls, WidgetSelectionRect, contentElementBoxProps, processImageModifiers, registerTemplateWidgetType, textColorForBackgroundColor, useFileWithCropPosition, usePlayerControlsInactive, useScrollPosition, withShadowClassName };
|