pageflow 15.6.1 → 15.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +253 -11
- data/README.md +1 -2
- data/admins/pageflow/entry.rb +28 -57
- data/admins/pageflow/membership.rb +5 -1
- data/admins/pageflow/user.rb +1 -3
- data/app/assets/images/pageflow/admin/icons/buttons/editor.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/buttons/preview.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/buttons/show_public.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/delete.svg +9 -0
- data/app/assets/images/pageflow/admin/icons/done.svg +6 -0
- data/app/assets/images/pageflow/admin/icons/edit.svg +7 -0
- data/app/assets/images/pageflow/admin/icons/editor.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/folder.svg +8 -0
- data/app/assets/images/pageflow/admin/icons/folder_active.svg +8 -0
- data/app/assets/images/pageflow/admin/icons/info.svg +3 -0
- data/app/assets/images/pageflow/admin/icons/new.svg +5 -0
- data/app/assets/images/pageflow/admin/icons/preview.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/published.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/published_with_password.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/show_public.svg +2 -0
- data/app/assets/images/pageflow/editor/blank_entry/logo.png +0 -0
- data/app/assets/images/pageflow/themes/default/embed_opt_in.svg +3 -0
- data/app/assets/images/pageflow/themes/default/embed_opt_out_info.svg +16 -0
- data/app/assets/javascripts/pageflow/admin/entries.js +9 -57
- data/app/assets/javascripts/pageflow/dist/editor.js +11890 -0
- data/app/assets/javascripts/pageflow/dist/frontend.js +5800 -0
- data/app/assets/javascripts/pageflow/dist/react-client.js +22 -0
- data/app/assets/javascripts/pageflow/dist/react-server.js +19 -0
- data/app/assets/javascripts/pageflow/dist/ui.js +127 -10
- data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +18 -16
- data/app/assets/stylesheets/pageflow/admin/badge_list.scss +25 -35
- data/app/assets/stylesheets/pageflow/admin/columns.scss +13 -11
- data/app/assets/stylesheets/pageflow/admin/embed_code.scss +1 -4
- data/app/assets/stylesheets/pageflow/admin/entries/folders.scss +44 -19
- data/app/assets/stylesheets/pageflow/admin/entries.scss +15 -31
- data/app/assets/stylesheets/pageflow/admin/features.scss +3 -1
- data/app/assets/stylesheets/pageflow/admin/forms.scss +14 -12
- data/app/assets/stylesheets/pageflow/admin/hint.scss +8 -14
- data/app/assets/stylesheets/pageflow/admin/icon_button.scss +25 -14
- data/app/assets/stylesheets/pageflow/admin/icon_link.scss +31 -15
- data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +14 -7
- data/app/assets/stylesheets/pageflow/admin/status_tags.scss +5 -4
- data/app/assets/stylesheets/pageflow/admin/tabs_view.scss +36 -34
- data/app/assets/stylesheets/pageflow/admin/tooltip_bubble.scss +15 -11
- data/app/assets/stylesheets/pageflow/admin.scss +12 -0
- data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +15 -61
- data/app/assets/stylesheets/pageflow/editor/base.scss +28 -13
- data/app/assets/stylesheets/pageflow/editor/blank_entry.scss +6 -6
- data/app/assets/stylesheets/pageflow/editor/change_theme.scss +28 -71
- data/app/assets/stylesheets/pageflow/editor/composables.scss +2 -2
- data/app/assets/stylesheets/pageflow/editor/confirm_encoding.scss +18 -36
- data/app/assets/stylesheets/pageflow/editor/confirm_upload.scss +12 -39
- data/app/assets/stylesheets/pageflow/editor/dialogs.scss +39 -12
- data/app/assets/stylesheets/pageflow/editor/disabled_atmo_indicator.scss +3 -3
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +7 -10
- data/app/assets/stylesheets/pageflow/editor/emulation_mode_button.scss +3 -8
- data/app/assets/stylesheets/pageflow/editor/failures.scss +3 -3
- data/app/assets/stylesheets/pageflow/editor/file_import.scss +22 -38
- data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +3 -7
- data/app/assets/stylesheets/pageflow/editor/file_settings_dialog.scss +4 -24
- data/app/assets/stylesheets/pageflow/editor/file_stages.scss +10 -11
- data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -8
- data/app/assets/stylesheets/pageflow/editor/files.scss +7 -6
- data/app/assets/stylesheets/pageflow/editor/files_explorer.scss +13 -30
- data/app/assets/stylesheets/pageflow/editor/files_gallery.scss +15 -11
- data/app/assets/stylesheets/pageflow/editor/filtered_files.scss +6 -7
- data/app/assets/stylesheets/pageflow/editor/help.scss +19 -14
- data/app/assets/stylesheets/pageflow/editor/help_image.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/info_box.scss +19 -0
- data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +7 -11
- data/app/assets/stylesheets/pageflow/editor/inputs/file_processing_state_display.scss +0 -2
- data/app/assets/stylesheets/pageflow/editor/inputs/reference.scss +7 -11
- data/app/assets/stylesheets/pageflow/editor/list.scss +13 -10
- data/app/assets/stylesheets/pageflow/editor/loading.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/locked.scss +9 -5
- data/app/assets/stylesheets/pageflow/editor/menu.scss +5 -5
- data/app/assets/stylesheets/pageflow/editor/notifications.scss +15 -14
- data/app/assets/stylesheets/pageflow/editor/other_entry_item.scss +7 -3
- data/app/assets/stylesheets/pageflow/editor/outline.scss +57 -19
- data/app/assets/stylesheets/pageflow/editor/page_links.scss +10 -8
- data/app/assets/stylesheets/pageflow/editor/page_selection.scss +2 -29
- data/app/assets/stylesheets/pageflow/editor/publish_entry.scss +5 -6
- data/app/assets/stylesheets/pageflow/editor/quotas.scss +2 -3
- data/app/assets/stylesheets/pageflow/editor/select_button.scss +12 -6
- data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -5
- data/app/assets/stylesheets/pageflow/editor/storyline_picker.scss +6 -2
- data/app/assets/stylesheets/pageflow/editor/text_tracks.scss +6 -22
- data/app/assets/stylesheets/pageflow/editor/widgets.scss +2 -2
- data/app/assets/stylesheets/pageflow/editor/wysihtml5.scss +35 -29
- data/app/assets/stylesheets/pageflow/mixins/background_icons.scss +3 -3
- data/app/assets/stylesheets/pageflow/mixins/buttons.scss +50 -68
- data/app/assets/stylesheets/pageflow/themes/default/base.scss +2 -0
- data/app/assets/stylesheets/pageflow/themes/default/consent/bar.scss +156 -0
- data/app/assets/stylesheets/pageflow/themes/default/consent/vendor_list.scss +62 -0
- data/app/assets/stylesheets/pageflow/themes/default/consent.scss +2 -0
- data/app/assets/stylesheets/pageflow/themes/default/logo/alignment.scss +7 -0
- data/app/assets/stylesheets/pageflow/themes/default/page/shadow.scss +44 -0
- data/app/assets/stylesheets/pageflow/themes/default/third_party_embed_consent.scss +103 -0
- data/app/assets/stylesheets/pageflow/ui/forms.scss +79 -84
- data/app/assets/stylesheets/pageflow/ui/functions.scss +56 -0
- data/app/assets/stylesheets/pageflow/ui/input/check_box_group_input.scss +2 -3
- data/app/assets/stylesheets/pageflow/ui/input/color_input.scss +6 -6
- data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +63 -50
- data/app/assets/stylesheets/pageflow/ui/normalize/forms.scss +153 -0
- data/app/assets/stylesheets/pageflow/ui/normalize.scss +278 -0
- data/app/assets/stylesheets/pageflow/ui/properties.scss +44 -0
- data/app/assets/stylesheets/pageflow/ui/table_cells/delete_row_table_cell.scss +1 -1
- data/app/assets/stylesheets/pageflow/ui/table_view.scss +14 -18
- data/app/assets/stylesheets/pageflow/ui/tabs_view.scss +8 -11
- data/app/assets/stylesheets/pageflow/ui/tooltip.scss +6 -8
- data/app/assets/stylesheets/pageflow/ui/validation_error_messages.scss +6 -0
- data/app/assets/stylesheets/pageflow/ui.scss +4 -0
- data/app/controllers/pageflow/edit_locks_controller.rb +3 -1
- data/app/helpers/pageflow/admin/entries_helper.rb +2 -12
- data/app/helpers/pageflow/embed_code_helper.rb +1 -1
- data/app/helpers/pageflow/entries_helper.rb +41 -2
- data/app/helpers/pageflow/file_background_images_helper.rb +1 -1
- data/app/helpers/pageflow/page_types_helper.rb +1 -1
- data/app/helpers/pageflow/themes_helper.rb +1 -1
- data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +1 -1
- data/app/jobs/pageflow/poll_zencoder_job.rb +1 -9
- data/app/models/pageflow/audio_file.rb +17 -0
- data/app/models/pageflow/audio_file_url_templates.rb +4 -1
- data/app/models/pageflow/customized_theme.rb +37 -0
- data/app/models/pageflow/draft_entry.rb +6 -59
- data/app/models/pageflow/entry.rb +8 -0
- data/app/models/pageflow/entry_at_revision.rb +68 -0
- data/app/models/pageflow/entry_role_query.rb +44 -24
- data/app/models/pageflow/image_file_css_background_image_urls.rb +8 -2
- data/app/models/pageflow/published_entry.rb +9 -56
- data/app/models/pageflow/theme_customization.rb +46 -0
- data/app/models/pageflow/theme_customization_file.rb +58 -0
- data/app/models/pageflow/video_file.rb +11 -1
- data/app/models/pageflow/video_file_url_templates.rb +1 -0
- data/app/policies/pageflow/entry_policy.rb +4 -0
- data/app/state_machines/pageflow/media_encoding_state_machine.rb +23 -4
- data/app/views/admin/entries/_form.html.erb +50 -0
- data/app/views/admin/entries/entry_type_name_input.html.erb +5 -0
- data/app/views/admin/features/_form.html.erb +1 -1
- data/app/views/admin/memberships/_form.html.erb +2 -3
- data/app/views/admin/users/_form.html.erb +1 -1
- data/app/views/admin/users/invitation.html.erb +2 -2
- data/app/views/components/pageflow/admin/entry_user_badge_list.rb +10 -9
- data/app/views/components/pageflow/admin/members_tab.rb +5 -1
- data/app/views/components/pageflow/admin/revisions_tab.rb +13 -3
- data/app/views/components/pageflow/admin/timestamp.rb +20 -0
- data/app/views/components/pageflow/admin/user_account_badge_list.rb +5 -6
- data/app/views/pageflow/admin/entries/_cannot_add_user.html.erb +9 -5
- data/app/views/pageflow/admin/entries/_entry_type_name_input.html.erb +7 -0
- data/app/views/pageflow/audio_files/_audio_file.json.jbuilder +13 -0
- data/app/views/pageflow/editor/encoding_confirmations/_intro.html.erb +0 -0
- data/app/views/pageflow/editor/encoding_confirmations/check.json.jbuilder +14 -2
- data/config/initializers/paperclip.rb +16 -1
- data/config/locales/de.yml +24 -28
- data/config/locales/en.yml +19 -10
- data/db/migrate/20210528073122_create_pageflow_theme_customizations.rb +11 -0
- data/db/migrate/20210531090654_create_pageflow_theme_customization_files.rb +15 -0
- data/db/migrate/20210531102228_add_selected_file_ids_to_theme_customizations.rb +5 -0
- data/db/migrate/20211020085902_add_canonical_entry_url_prefix_to_themings.rb +5 -0
- data/db/migrate/20220503150010_add_peak_data_to_audio_files.rb +5 -0
- data/db/migrate/20220705084830_add_trailing_slash_in_canonical_urls_to_themings.rb +5 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +256 -124
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +566 -167
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +5 -5
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +4 -4
- data/entry_types/paged/app/helpers/pageflow_paged/third_party_embed_consent_helper.rb +38 -0
- data/entry_types/paged/app/views/pageflow_paged/third_party_embed_consent/_opt_in.html.erb +12 -0
- data/entry_types/paged/app/views/pageflow_paged/third_party_embed_consent/_opt_out_info.html.erb +10 -0
- data/entry_types/paged/config/initializers/features.rb +2 -0
- data/entry_types/paged/config/locales/new/video_contain.de.yml +7 -0
- data/entry_types/paged/config/locales/new/video_contain.en.yml +7 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +3 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +1 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +58 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +37 -3
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +92 -6
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/webpack_public_path_helper.rb +20 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +7 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +5 -2
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +5 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +5 -4
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +16 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +13 -2
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_widget.json.jbuilder +2 -0
- data/entry_types/scrolled/config/locales/de.yml +1 -8
- data/entry_types/scrolled/config/locales/en.yml +1 -9
- data/entry_types/scrolled/config/locales/new/before_after_slider.de.yml +8 -0
- data/entry_types/scrolled/config/locales/new/before_after_slider.en.yml +8 -0
- data/entry_types/scrolled/config/locales/new/center_ragged.de.yml +8 -0
- data/entry_types/scrolled/config/locales/new/center_ragged.en.yml +9 -0
- data/entry_types/scrolled/config/locales/new/consent.de.yml +25 -0
- data/entry_types/scrolled/config/locales/new/consent.en.yml +24 -0
- data/entry_types/scrolled/config/locales/new/content_element_categories.de.yml +39 -0
- data/entry_types/scrolled/config/locales/new/content_element_categories.en.yml +39 -0
- data/entry_types/scrolled/config/locales/new/default_transition.de.yml +14 -0
- data/entry_types/scrolled/config/locales/new/default_transition.en.yml +14 -0
- data/entry_types/scrolled/config/locales/new/header_line_breaks.de.yml +28 -0
- data/entry_types/scrolled/config/locales/new/header_line_breaks.en.yml +27 -0
- data/entry_types/scrolled/config/locales/new/header_size.de.yml +17 -0
- data/entry_types/scrolled/config/locales/new/header_size.en.yml +17 -0
- data/entry_types/scrolled/config/locales/new/iframe_embed.de.yml +39 -0
- data/entry_types/scrolled/config/locales/new/iframe_embed.en.yml +39 -0
- data/entry_types/scrolled/config/locales/new/inline_loops.de.yml +26 -0
- data/entry_types/scrolled/config/locales/new/inline_loops.en.yml +26 -0
- data/entry_types/scrolled/config/locales/new/portrait_inline_image.de.yml +9 -0
- data/entry_types/scrolled/config/locales/new/portrait_inline_image.en.yml +9 -0
- data/entry_types/scrolled/config/locales/new/section_width.de.yml +10 -0
- data/entry_types/scrolled/config/locales/new/section_width.en.yml +10 -0
- data/entry_types/scrolled/config/locales/new/typography_variants.de.yml +7 -0
- data/entry_types/scrolled/config/locales/new/typography_variants.en.yml +7 -0
- data/entry_types/scrolled/config/locales/new/video_embed_poster.de.yml +8 -0
- data/entry_types/scrolled/config/locales/new/video_embed_poster.en.yml +8 -0
- data/entry_types/scrolled/config/locales/new/waveform_styles.de.yml +11 -0
- data/entry_types/scrolled/config/locales/new/waveform_styles.en.yml +12 -0
- data/entry_types/scrolled/config/locales/new/widgets.de.yml +6 -0
- data/entry_types/scrolled/config/locales/new/widgets.en.yml +6 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +29 -5
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +8 -6
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +37 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +57 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +49 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +8 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +42 -0
- data/entry_types/scrolled/lib/pageflow_scrolled.rb +17 -1
- data/entry_types/scrolled/package/contentElements-editor.js +323 -89
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +719 -529
- data/entry_types/scrolled/package/editor.js +459 -261
- data/entry_types/scrolled/package/frontend/{EditableText-7093fd0e.js → EditableInlineText.module-b9923660.js} +284 -362
- data/entry_types/scrolled/package/frontend/{i18n-4dc6c377.js → PhonePlatformContext-9fb97827.js} +199 -106
- data/entry_types/scrolled/package/frontend/{Viewer-e49e7807.js → Viewer-e2290ea0.js} +196 -79
- data/entry_types/scrolled/package/frontend/{Wavesurfer-0adf5667.js → Wavesurfer-7d9cf1b7.js} +16 -58
- data/entry_types/scrolled/package/frontend/{components-6a6793ca.js → components-6ab26015.js} +664 -671
- data/entry_types/scrolled/package/frontend/{getPrototypeOf-63c7c8e8.js → createSuper-d0f30da3.js} +34 -5
- data/entry_types/scrolled/package/frontend/index.css +1 -9
- data/entry_types/scrolled/package/frontend/index.js +1919 -2386
- data/entry_types/scrolled/package/frontend/{useBrowserFeature-91a4c29d.js → usePhonePlatform-2857c22b.js} +9 -8
- data/entry_types/scrolled/package/frontend-server.js +3 -6
- data/entry_types/scrolled/package/package.json +16 -8
- data/entry_types/scrolled/package/testHelpers.js +456 -0
- data/entry_types/scrolled/package/values/breakpoints.module.css +9 -0
- data/entry_types/scrolled/package/values/colors.module.css +5 -0
- data/entry_types/scrolled/package/widgets/defaultNavigation.css +9 -0
- data/entry_types/scrolled/package/widgets/defaultNavigation.js +612 -0
- data/entry_types/scrolled/spec/fixtures/image.svg +1 -0
- data/lib/pageflow/ability_mixin.rb +4 -0
- data/lib/pageflow/built_in_widget_type.rb +4 -0
- data/lib/pageflow/built_in_widget_types_plugin.rb +7 -0
- data/lib/pageflow/configuration.rb +34 -1
- data/lib/pageflow/entry_type.rb +11 -2
- data/lib/pageflow/entry_type_configuration.rb +2 -0
- data/lib/pageflow/file_type.rb +24 -0
- data/lib/pageflow/paperclip_processors/audio_waveform.rb +42 -0
- data/lib/pageflow/paperclip_processors/noop.rb +10 -0
- data/lib/pageflow/theme_customizations.rb +61 -0
- data/lib/pageflow/user_mixin.rb +6 -0
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow.rb +9 -0
- data/package/config/jest/index.js +2 -1
- data/package/config/postcss/scaleFunctions.js +71 -0
- data/package/editor.js +95 -85
- data/package/frontend.js +521 -161
- data/package/package.json +5 -3
- data/package/testHelpers.js +26 -5
- data/package/ui.js +124 -11
- data/spec/factories/draft_entries.rb +19 -1
- data/spec/factories/entries.rb +4 -0
- data/spec/factories/published_entries.rb +6 -0
- data/spec/fixtures/audio.ogg +0 -0
- metadata +123 -15
- data/app/views/admin/entries/_not_allowed_to_see_entry_types.json.jbuilder +0 -2
- data/app/views/admin/entries/entry_types.json.jbuilder +0 -4
- data/package/config/jest/transformers/upwardBabel.js +0 -5
@@ -1,13 +1,13 @@
|
|
1
1
|
import 'pageflow/frontend';
|
2
2
|
import React, { useMemo, useEffect, useRef, useState } from 'react';
|
3
3
|
import ReactDOM from 'react-dom';
|
4
|
-
import {
|
5
|
-
import
|
4
|
+
import { _ as _objectWithoutProperties, u as useI18n, b as _defineProperty, c as _slicedToArray } from './PhonePlatformContext-9fb97827.js';
|
5
|
+
import 'i18n-js';
|
6
6
|
import 'use-context-selector';
|
7
7
|
import 'reselect';
|
8
|
-
import 'i18n-js';
|
9
8
|
import 'slugify';
|
10
|
-
import
|
9
|
+
import classNames from 'classnames';
|
10
|
+
import { u as useBrowserFeature, a as usePhonePlatform } from './usePhonePlatform-2857c22b.js';
|
11
11
|
import { PanoViewer } from '@egjs/view360';
|
12
12
|
import screenfull from 'screenfull';
|
13
13
|
|
@@ -33,14 +33,14 @@ var EnterFullscreenIcon = (function (_ref) {
|
|
33
33
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
34
34
|
props = _objectWithoutProperties(_ref, ["styles"]);
|
35
35
|
|
36
|
-
return React.createElement("svg", _extends({
|
36
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
37
37
|
"aria-hidden": "true",
|
38
38
|
"data-prefix": "fas",
|
39
39
|
"data-icon": "expand",
|
40
40
|
className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-expand"] || "fa-expand") + " " + (styles["fa-w-14"] || "fa-w-14"),
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
42
42
|
viewBox: "0 0 448 512"
|
43
|
-
}, props), React.createElement("path", {
|
43
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
44
44
|
fill: "currentColor",
|
45
45
|
d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"
|
46
46
|
}));
|
@@ -68,14 +68,14 @@ var ExitFullscreenIcon = (function (_ref) {
|
|
68
68
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
69
69
|
props = _objectWithoutProperties(_ref, ["styles"]);
|
70
70
|
|
71
|
-
return React.createElement("svg", _extends$1({
|
71
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
72
72
|
"aria-hidden": "true",
|
73
73
|
"data-prefix": "fas",
|
74
74
|
"data-icon": "compress",
|
75
75
|
className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-compress"] || "fa-compress") + " " + (styles["fa-w-14"] || "fa-w-14"),
|
76
76
|
xmlns: "http://www.w3.org/2000/svg",
|
77
77
|
viewBox: "0 0 448 512"
|
78
|
-
}, props), React.createElement("path", {
|
78
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
79
79
|
fill: "currentColor",
|
80
80
|
d: "M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"
|
81
81
|
}));
|
@@ -87,31 +87,22 @@ function ToggleFullscreenButton(props) {
|
|
87
87
|
var _useI18n = useI18n(),
|
88
88
|
t = _useI18n.t;
|
89
89
|
|
90
|
-
return (
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
}
|
100
|
-
}, icon(props))
|
101
|
-
);
|
90
|
+
return /*#__PURE__*/React.createElement("button", {
|
91
|
+
className: styles.button,
|
92
|
+
title: t(props.isFullscreen ? 'exit_fullscreen' : 'enter_fullscreen', {
|
93
|
+
scope: 'pageflow_scrolled.public'
|
94
|
+
}),
|
95
|
+
onClick: function onClick() {
|
96
|
+
return props.isFullscreen ? props.onExit() : props.onEnter();
|
97
|
+
}
|
98
|
+
}, icon(props));
|
102
99
|
}
|
103
100
|
|
104
101
|
function icon(props) {
|
105
102
|
if (props.isFullscreen) {
|
106
|
-
return (
|
107
|
-
/*#__PURE__*/
|
108
|
-
React.createElement(ExitFullscreenIcon, null)
|
109
|
-
);
|
103
|
+
return /*#__PURE__*/React.createElement(ExitFullscreenIcon, null);
|
110
104
|
} else {
|
111
|
-
return (
|
112
|
-
/*#__PURE__*/
|
113
|
-
React.createElement(EnterFullscreenIcon, null)
|
114
|
-
);
|
105
|
+
return /*#__PURE__*/React.createElement(EnterFullscreenIcon, null);
|
115
106
|
}
|
116
107
|
}
|
117
108
|
|
@@ -132,9 +123,7 @@ function Fullscreen(_ref) {
|
|
132
123
|
}, [isFullscreen]);
|
133
124
|
|
134
125
|
if (isFullscreen) {
|
135
|
-
return ReactDOM.createPortal(
|
136
|
-
/*#__PURE__*/
|
137
|
-
React.createElement("div", {
|
126
|
+
return ReactDOM.createPortal( /*#__PURE__*/React.createElement("div", {
|
138
127
|
className: styles$1.wrapper
|
139
128
|
}, children), root);
|
140
129
|
} else {
|
@@ -142,8 +131,6 @@ function Fullscreen(_ref) {
|
|
142
131
|
}
|
143
132
|
}
|
144
133
|
|
145
|
-
var styles$2 = {"full":"Viewer-module_full__1q18y","container":"Viewer-module_container__3eJ34 Viewer-module_full__1q18y","controls":"Viewer-module_controls__3BTof","spinner":"Viewer-module_spinner__2oRve","spin":"Viewer-module_spin__3jBR2","isLoading":"Viewer-module_isLoading__sQuGw"};
|
146
|
-
|
147
134
|
function _extends$2() {
|
148
135
|
_extends$2 = Object.assign || function (target) {
|
149
136
|
for (var i = 1; i < arguments.length; i++) {
|
@@ -161,22 +148,149 @@ function _extends$2() {
|
|
161
148
|
|
162
149
|
return _extends$2.apply(this, arguments);
|
163
150
|
}
|
151
|
+
var ArrowLeftIcon = (function (_ref) {
|
152
|
+
var _ref$styles = _ref.styles,
|
153
|
+
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
154
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
155
|
+
|
156
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
157
|
+
xmlns: "http://www.w3.org/2000/svg",
|
158
|
+
className: (styles["h-5"] || "h-5") + " " + (styles["w-5"] || "w-5"),
|
159
|
+
viewBox: "0 0 20 20",
|
160
|
+
fill: "currentColor"
|
161
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
162
|
+
fillRule: "evenodd",
|
163
|
+
d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",
|
164
|
+
clipRule: "evenodd"
|
165
|
+
}));
|
166
|
+
});
|
167
|
+
|
168
|
+
function _extends$3() {
|
169
|
+
_extends$3 = Object.assign || function (target) {
|
170
|
+
for (var i = 1; i < arguments.length; i++) {
|
171
|
+
var source = arguments[i];
|
172
|
+
|
173
|
+
for (var key in source) {
|
174
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
175
|
+
target[key] = source[key];
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
return target;
|
181
|
+
};
|
182
|
+
|
183
|
+
return _extends$3.apply(this, arguments);
|
184
|
+
}
|
185
|
+
var ArrowRightIcon = (function (_ref) {
|
186
|
+
var _ref$styles = _ref.styles,
|
187
|
+
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
188
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
189
|
+
|
190
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
191
|
+
xmlns: "http://www.w3.org/2000/svg",
|
192
|
+
className: (styles["h-5"] || "h-5") + " " + (styles["w-5"] || "w-5"),
|
193
|
+
viewBox: "0 0 20 20",
|
194
|
+
fill: "currentColor"
|
195
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
196
|
+
fillRule: "evenodd",
|
197
|
+
d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
|
198
|
+
clipRule: "evenodd"
|
199
|
+
}));
|
200
|
+
});
|
201
|
+
|
202
|
+
var styles$2 = {"indicator":"PanoramaIndicator-module_indicator__3A90v","visible":"PanoramaIndicator-module_visible__3LOgm","arrow":"PanoramaIndicator-module_arrow__QV1Pd","arrowLeft":"PanoramaIndicator-module_arrowLeft__Jh7GC PanoramaIndicator-module_arrow__QV1Pd","arrowRight":"PanoramaIndicator-module_arrowRight__ZZBtO PanoramaIndicator-module_arrow__QV1Pd","nudgeLeft":"PanoramaIndicator-module_nudgeLeft__IU_Iy","nudgeRight":"PanoramaIndicator-module_nudgeRight__3XzNu","text":"PanoramaIndicator-module_text__2FzUy"};
|
203
|
+
|
204
|
+
function PanoramaIndicator(_ref) {
|
205
|
+
var visible = _ref.visible;
|
206
|
+
var size = 40;
|
207
|
+
return /*#__PURE__*/React.createElement("div", {
|
208
|
+
className: classNames(styles$2.indicator, _defineProperty({}, styles$2.visible, visible))
|
209
|
+
}, /*#__PURE__*/React.createElement("div", {
|
210
|
+
className: styles$2.arrowLeft
|
211
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
|
212
|
+
width: size,
|
213
|
+
height: size
|
214
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
215
|
+
className: styles$2.arrowRight
|
216
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ArrowRightIcon, {
|
217
|
+
width: size,
|
218
|
+
height: size
|
219
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
220
|
+
className: styles$2.text
|
221
|
+
}, "360\xB0"));
|
222
|
+
}
|
223
|
+
|
224
|
+
var styles$3 = {"indicator":"FullscreenIndicator-module_indicator__2Jl_-","visible":"FullscreenIndicator-module_visible__2ywsZ","icon":"FullscreenIndicator-module_icon__2Ddof","icons":"FullscreenIndicator-module_icons__3-Xm6","text":"FullscreenIndicator-module_text__3wCW3","pulse":"FullscreenIndicator-module_pulse__1qujU","iconTopLeft":"FullscreenIndicator-module_iconTopLeft__2u7-j FullscreenIndicator-module_icon__2Ddof","iconTopRight":"FullscreenIndicator-module_iconTopRight__14nUk FullscreenIndicator-module_icon__2Ddof","iconBottomRight":"FullscreenIndicator-module_iconBottomRight__lEtN6 FullscreenIndicator-module_icon__2Ddof","iconBottomLeft":"FullscreenIndicator-module_iconBottomLeft__voLm_ FullscreenIndicator-module_icon__2Ddof"};
|
225
|
+
|
226
|
+
function FullscreenIndicator(_ref) {
|
227
|
+
var visible = _ref.visible,
|
228
|
+
onClick = _ref.onClick;
|
229
|
+
var size = 50;
|
230
|
+
return /*#__PURE__*/React.createElement("div", {
|
231
|
+
className: classNames(styles$3.indicator, _defineProperty({}, styles$3.visible, visible))
|
232
|
+
}, /*#__PURE__*/React.createElement("div", {
|
233
|
+
className: styles$3.icons
|
234
|
+
}, /*#__PURE__*/React.createElement("div", {
|
235
|
+
className: styles$3.iconTopLeft
|
236
|
+
}, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
|
237
|
+
width: size,
|
238
|
+
height: size
|
239
|
+
})), /*#__PURE__*/React.createElement("div", {
|
240
|
+
className: styles$3.iconTopRight
|
241
|
+
}, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
|
242
|
+
width: size,
|
243
|
+
height: size
|
244
|
+
})), /*#__PURE__*/React.createElement("div", {
|
245
|
+
className: styles$3.iconBottomRight
|
246
|
+
}, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
|
247
|
+
width: size,
|
248
|
+
height: size
|
249
|
+
})), /*#__PURE__*/React.createElement("div", {
|
250
|
+
className: styles$3.iconBottomLeft
|
251
|
+
}, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
|
252
|
+
width: size,
|
253
|
+
height: size
|
254
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
255
|
+
className: styles$3.text
|
256
|
+
}, "360\xB0"));
|
257
|
+
}
|
258
|
+
|
259
|
+
var styles$4 = {"full":"Viewer-module_full__1q18y","container":"Viewer-module_container__3eJ34 Viewer-module_full__1q18y","controls":"Viewer-module_controls__3BTof","spinner":"Viewer-module_spinner__2oRve","spin":"Viewer-module_spin__3jBR2","isLoading":"Viewer-module_isLoading__sQuGw"};
|
260
|
+
|
261
|
+
function _extends$4() {
|
262
|
+
_extends$4 = Object.assign || function (target) {
|
263
|
+
for (var i = 1; i < arguments.length; i++) {
|
264
|
+
var source = arguments[i];
|
265
|
+
|
266
|
+
for (var key in source) {
|
267
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
268
|
+
target[key] = source[key];
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
return target;
|
274
|
+
};
|
275
|
+
|
276
|
+
return _extends$4.apply(this, arguments);
|
277
|
+
}
|
164
278
|
var SpinnerIcon = (function (_ref) {
|
165
279
|
var _ref$styles = _ref.styles,
|
166
280
|
props = _objectWithoutProperties(_ref, ["styles"]);
|
167
281
|
|
168
|
-
return React.createElement("svg", _extends$
|
282
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
169
283
|
xmlns: "http://www.w3.org/2000/svg",
|
170
284
|
fill: "none",
|
171
285
|
viewBox: "0 0 24 24"
|
172
|
-
}, props), React.createElement("circle", {
|
286
|
+
}, props), /*#__PURE__*/React.createElement("circle", {
|
173
287
|
cx: "12",
|
174
288
|
cy: "12",
|
175
289
|
r: "10",
|
176
290
|
stroke: "currentColor",
|
177
291
|
strokeWidth: "4",
|
178
292
|
opacity: ".23"
|
179
|
-
}), React.createElement("path", {
|
293
|
+
}), /*#__PURE__*/React.createElement("path", {
|
180
294
|
fill: "currentColor",
|
181
295
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",
|
182
296
|
opacity: ".75"
|
@@ -187,7 +301,10 @@ function Viewer(_ref) {
|
|
187
301
|
var imageFile = _ref.imageFile,
|
188
302
|
viewerRef = _ref.viewerRef,
|
189
303
|
initialYaw = _ref.initialYaw,
|
190
|
-
initialPitch = _ref.initialPitch
|
304
|
+
initialPitch = _ref.initialPitch,
|
305
|
+
hidePanoramaIndicator = _ref.hidePanoramaIndicator,
|
306
|
+
onReady = _ref.onReady,
|
307
|
+
onFullscreen = _ref.onFullscreen;
|
191
308
|
var elRef = useRef();
|
192
309
|
var initialYawRef = useRef(initialYaw);
|
193
310
|
var initialPitchRef = useRef(initialPitch);
|
@@ -201,7 +318,9 @@ function Viewer(_ref) {
|
|
201
318
|
var _useState3 = useState(false),
|
202
319
|
_useState4 = _slicedToArray(_useState3, 2),
|
203
320
|
isFullscreen = _useState4[0],
|
204
|
-
setIsFullscreen = _useState4[1];
|
321
|
+
setIsFullscreen = _useState4[1];
|
322
|
+
|
323
|
+
var isPhonePlatform = usePhonePlatform(); // When toggling to fullscreen mode, this component renders to a
|
205
324
|
// portal div in the body of the document. We do not want to recreate
|
206
325
|
// the PanoViewer instead to keep its current state (pitch, yaw etc.).
|
207
326
|
// We therefore initialize the PanoViewer on a detached DOM element
|
@@ -211,11 +330,10 @@ function Viewer(_ref) {
|
|
211
330
|
// - the parent Viewer component is mounted
|
212
331
|
// - Fullscreen component switches between using the portal or not
|
213
332
|
|
214
|
-
|
215
333
|
function appendViewerTo(parentNode) {
|
216
334
|
if (!elRef.current) {
|
217
335
|
elRef.current = document.createElement('div');
|
218
|
-
elRef.current.className = styles$
|
336
|
+
elRef.current.className = styles$4.full;
|
219
337
|
viewerRef.current = new PanoViewer(elRef.current, {
|
220
338
|
image: imageFile.urls.ultra,
|
221
339
|
projectionType: imageFile.configuration.projection === 'equirectangular_stereo' ? PanoViewer.PROJECTION_TYPE.STEREOSCOPIC_EQUI : PanoViewer.PROJECTION_TYPE.EQUIRECTANGULAR,
|
@@ -227,6 +345,10 @@ function Viewer(_ref) {
|
|
227
345
|
viewerRef.current.on(PanoViewer.EVENTS.READY, function () {
|
228
346
|
viewerRef.current.updateViewportDimensions();
|
229
347
|
setIsLoading(false);
|
348
|
+
|
349
|
+
if (onReady) {
|
350
|
+
onReady();
|
351
|
+
}
|
230
352
|
});
|
231
353
|
}
|
232
354
|
|
@@ -313,6 +435,10 @@ function Viewer(_ref) {
|
|
313
435
|
}
|
314
436
|
|
315
437
|
function enterFullscreen() {
|
438
|
+
if (onFullscreen) {
|
439
|
+
onFullscreen();
|
440
|
+
}
|
441
|
+
|
316
442
|
if (screenfull.isEnabled) {
|
317
443
|
screenfull.request();
|
318
444
|
}
|
@@ -329,38 +455,32 @@ function Viewer(_ref) {
|
|
329
455
|
setIsFullscreen(false);
|
330
456
|
}
|
331
457
|
|
332
|
-
return (
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
React.createElement(ToggleFullscreenButton, {
|
359
|
-
isFullscreen: isFullscreen,
|
360
|
-
onEnter: enterFullscreen,
|
361
|
-
onExit: exitFullscreen
|
362
|
-
})))
|
363
|
-
);
|
458
|
+
return /*#__PURE__*/React.createElement(Fullscreen, {
|
459
|
+
isFullscreen: isFullscreen
|
460
|
+
}, /*#__PURE__*/React.createElement("div", {
|
461
|
+
className: styles$4.container,
|
462
|
+
onKeyDown: preventDefaultForArrowUpDown,
|
463
|
+
onClick: function onClick() {
|
464
|
+
isPhonePlatform && enterFullscreen();
|
465
|
+
}
|
466
|
+
}, /*#__PURE__*/React.createElement(DOMNodeContainer, {
|
467
|
+
className: styles$4.full,
|
468
|
+
onUpdate: function onUpdate(el) {
|
469
|
+
return appendViewerTo(el);
|
470
|
+
}
|
471
|
+
})), /*#__PURE__*/React.createElement(SpinnerIcon, {
|
472
|
+
className: classNames(styles$4.spinner, _defineProperty({}, styles$4.isLoading, isLoading))
|
473
|
+
}), (!isPhonePlatform || isFullscreen) && /*#__PURE__*/React.createElement("div", {
|
474
|
+
className: styles$4.controls
|
475
|
+
}, /*#__PURE__*/React.createElement(ToggleFullscreenButton, {
|
476
|
+
isFullscreen: isFullscreen,
|
477
|
+
onEnter: enterFullscreen,
|
478
|
+
onExit: exitFullscreen
|
479
|
+
})), /*#__PURE__*/React.createElement(PanoramaIndicator, {
|
480
|
+
visible: !isLoading && !isPhonePlatform && !isFullscreen && !hidePanoramaIndicator
|
481
|
+
}), /*#__PURE__*/React.createElement(FullscreenIndicator, {
|
482
|
+
visible: !isLoading && isPhonePlatform && !isFullscreen
|
483
|
+
}));
|
364
484
|
}
|
365
485
|
var DOMNodeContainer = React.memo(function (_ref2) {
|
366
486
|
var className = _ref2.className,
|
@@ -373,13 +493,10 @@ var DOMNodeContainer = React.memo(function (_ref2) {
|
|
373
493
|
current.removeChild(current.firstChild);
|
374
494
|
};
|
375
495
|
});
|
376
|
-
return (
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
className: className
|
381
|
-
})
|
382
|
-
);
|
496
|
+
return /*#__PURE__*/React.createElement("div", {
|
497
|
+
ref: ref,
|
498
|
+
className: className
|
499
|
+
});
|
383
500
|
}, function () {
|
384
501
|
return true;
|
385
502
|
});
|
data/entry_types/scrolled/package/frontend/{Wavesurfer-0adf5667.js → Wavesurfer-7d9cf1b7.js}
RENAMED
@@ -1,38 +1,9 @@
|
|
1
1
|
import React, { Component } from 'react';
|
2
|
+
import { b as _inherits, a as _classCallCheck, d as _assertThisInitialized, _ as _createClass, c as _createSuper } from './createSuper-d0f30da3.js';
|
2
3
|
import Measure from 'react-measure';
|
3
|
-
import { b as _inherits, a as _classCallCheck, e as _assertThisInitialized, _ as _createClass, c as _getPrototypeOf, d as _possibleConstructorReturn } from './getPrototypeOf-63c7c8e8.js';
|
4
4
|
import assign from 'deep-assign';
|
5
5
|
import WaveSurfer from 'wavesurfer.js';
|
6
6
|
|
7
|
-
function _createSuper(Derived) {
|
8
|
-
function isNativeReflectConstruct() {
|
9
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
10
|
-
if (Reflect.construct.sham) return false;
|
11
|
-
if (typeof Proxy === "function") return true;
|
12
|
-
|
13
|
-
try {
|
14
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
15
|
-
return true;
|
16
|
-
} catch (e) {
|
17
|
-
return false;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
return function () {
|
22
|
-
var Super = _getPrototypeOf(Derived),
|
23
|
-
result;
|
24
|
-
|
25
|
-
if (isNativeReflectConstruct()) {
|
26
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
27
|
-
|
28
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
29
|
-
} else {
|
30
|
-
result = Super.apply(this, arguments);
|
31
|
-
}
|
32
|
-
|
33
|
-
return _possibleConstructorReturn(this, result);
|
34
|
-
};
|
35
|
-
}
|
36
7
|
var EVENTS = ['audioprocess', 'error', 'finish', 'loading', 'mouseup', 'pause', 'play', 'ready', 'scroll', 'seek', 'zoom'];
|
37
8
|
|
38
9
|
function capitaliseFirstLetter(string) {
|
@@ -41,9 +12,7 @@ function capitaliseFirstLetter(string) {
|
|
41
12
|
}).join('');
|
42
13
|
}
|
43
14
|
|
44
|
-
var Wavesurfer =
|
45
|
-
/*#__PURE__*/
|
46
|
-
function (_Component) {
|
15
|
+
var Wavesurfer = /*#__PURE__*/function (_Component) {
|
47
16
|
_inherits(Wavesurfer, _Component);
|
48
17
|
|
49
18
|
var _super = _createSuper(Wavesurfer);
|
@@ -62,14 +31,14 @@ function (_Component) {
|
|
62
31
|
throw new Error('WaveSurfer is undefined!');
|
63
32
|
}
|
64
33
|
|
65
|
-
_this._wavesurfer = Object.create(WaveSurfer);
|
66
34
|
_this._loadMediaElt = _this._loadMediaElt.bind(_assertThisInitialized(_this));
|
67
35
|
_this._loadAudio = _this._loadAudio.bind(_assertThisInitialized(_this));
|
68
36
|
_this._seekTo = _this._seekTo.bind(_assertThisInitialized(_this));
|
69
37
|
|
70
38
|
_this._handleResize = function () {
|
71
39
|
if (_this.state.isReady) {
|
72
|
-
|
40
|
+
// Force redraw
|
41
|
+
_this._wavesurfer.zoom(false);
|
73
42
|
}
|
74
43
|
};
|
75
44
|
|
@@ -89,8 +58,7 @@ function (_Component) {
|
|
89
58
|
options.backend = 'MediaElement';
|
90
59
|
}
|
91
60
|
|
92
|
-
this._wavesurfer.
|
93
|
-
|
61
|
+
this._wavesurfer = WaveSurfer.create(options); // file was loaded, wave was drawn
|
94
62
|
|
95
63
|
this._wavesurfer.on('ready', function () {
|
96
64
|
_this2.setState({
|
@@ -110,7 +78,7 @@ function (_Component) {
|
|
110
78
|
|
111
79
|
|
112
80
|
if (_this2.props.playing) {
|
113
|
-
_this2.
|
81
|
+
_this2._wavesurfer.play();
|
114
82
|
} // set initial zoom
|
115
83
|
|
116
84
|
|
@@ -319,21 +287,15 @@ function (_Component) {
|
|
319
287
|
key: "_measureIfResponsive",
|
320
288
|
value: function _measureIfResponsive(children) {
|
321
289
|
if (this.props.responsive) {
|
322
|
-
return (
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
React.createElement("div", {
|
332
|
-
ref: measureRef
|
333
|
-
}, children)
|
334
|
-
);
|
335
|
-
})
|
336
|
-
);
|
290
|
+
return /*#__PURE__*/React.createElement(Measure, {
|
291
|
+
client: true,
|
292
|
+
onResize: this._handleResize
|
293
|
+
}, function (_ref) {
|
294
|
+
var measureRef = _ref.measureRef;
|
295
|
+
return /*#__PURE__*/React.createElement("div", {
|
296
|
+
ref: measureRef
|
297
|
+
}, children);
|
298
|
+
});
|
337
299
|
}
|
338
300
|
|
339
301
|
return children;
|
@@ -349,11 +311,7 @@ function (_Component) {
|
|
349
311
|
isReady: _this4.state.isReady
|
350
312
|
});
|
351
313
|
}) : false;
|
352
|
-
return this._measureIfResponsive(
|
353
|
-
/*#__PURE__*/
|
354
|
-
React.createElement("div", null,
|
355
|
-
/*#__PURE__*/
|
356
|
-
React.createElement("div", {
|
314
|
+
return this._measureIfResponsive( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
357
315
|
ref: function ref(c) {
|
358
316
|
_this4.wavesurferEl = c;
|
359
317
|
}
|