pageflow 15.8.0 → 16.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +183 -103
- data/README.md +0 -1
- data/Rakefile +1 -1
- data/admins/pageflow/accounts.rb +12 -16
- data/admins/pageflow/entry.rb +28 -26
- data/admins/pageflow/entry_templates.rb +5 -7
- data/admins/pageflow/sites.rb +53 -0
- data/app/assets/javascripts/pageflow/admin/entries.js +16 -7
- data/app/assets/javascripts/pageflow/dist/ui.js +298 -72
- data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +10 -0
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +6 -1
- data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -0
- data/app/assets/stylesheets/pageflow/editor/help.scss +3 -3
- data/app/assets/stylesheets/pageflow/editor/info_box.scss +7 -0
- data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +0 -5
- data/app/assets/stylesheets/pageflow/ui/forms.scss +1 -1
- data/app/controllers/pageflow/chapters_controller.rb +2 -2
- data/app/controllers/pageflow/editor/files_controller.rb +1 -1
- data/app/controllers/pageflow/entries_controller.rb +12 -2
- data/app/controllers/pageflow/feeds_controller.rb +18 -0
- data/app/controllers/pageflow/pages_controller.rb +2 -2
- data/app/controllers/pageflow/sitemaps_controller.rb +15 -0
- data/app/controllers/pageflow/storylines_controller.rb +2 -2
- data/app/helpers/pageflow/common_entry_seed_helper.rb +1 -1
- data/app/helpers/pageflow/embed_code_helper.rb +1 -1
- data/app/helpers/pageflow/entries_helper.rb +16 -15
- data/app/helpers/pageflow/feeds_helper.rb +66 -0
- data/app/helpers/pageflow/page_types_helper.rb +9 -9
- data/app/helpers/pageflow/sites_helper.rb +11 -0
- data/app/helpers/pageflow/social_share_helper.rb +2 -2
- data/app/inputs/pageflow_permalink_input.rb +15 -3
- data/app/models/concerns/pageflow/reusable_file.rb +3 -3
- data/app/models/pageflow/account.rb +13 -31
- data/app/models/pageflow/audio_file_url_templates.rb +2 -1
- data/app/models/pageflow/{cname_theming_request_scope.rb → cname_site_request_scope.rb} +3 -3
- data/app/models/pageflow/customized_theme.rb +1 -1
- data/app/models/pageflow/draft_entry.rb +1 -1
- data/app/models/pageflow/entries_feed.rb +32 -0
- data/app/models/pageflow/entry.rb +3 -4
- data/app/models/pageflow/entry_at_revision.rb +2 -2
- data/app/models/pageflow/entry_duplicate.rb +1 -1
- data/app/models/pageflow/entry_template.rb +4 -4
- data/app/models/pageflow/home_button.rb +7 -7
- data/app/models/pageflow/image_file.rb +14 -3
- data/app/models/pageflow/membership.rb +3 -2
- data/app/models/pageflow/other_file.rb +5 -0
- data/app/models/pageflow/other_file_url_templates.rb +16 -0
- data/app/models/pageflow/permalink.rb +3 -3
- data/app/models/pageflow/permalink_directory.rb +2 -2
- data/app/models/pageflow/published_entry.rb +8 -2
- data/app/models/pageflow/revision.rb +4 -0
- data/app/models/pageflow/site.rb +67 -0
- data/app/models/pageflow/sitemaps.rb +13 -0
- data/app/models/pageflow/theme_customization.rb +1 -1
- data/app/models/pageflow/used_file.rb +2 -2
- data/app/models/pageflow/video_file_url_templates.rb +3 -1
- data/app/models/pageflow/widget.rb +9 -1
- data/app/policies/pageflow/account_policy.rb +2 -2
- data/app/policies/pageflow/entry_policy.rb +2 -2
- data/app/policies/pageflow/entry_template_policy.rb +1 -1
- data/app/policies/pageflow/{theming_policy.rb → site_policy.rb} +13 -11
- data/app/views/admin/accounts/_entry_template_details.html.arb +1 -1
- data/app/views/admin/accounts/_form.html.erb +4 -22
- data/app/views/admin/accounts/_site_defaults_inline_help.html.erb +5 -0
- data/app/views/admin/entries/_form.html.erb +4 -13
- data/app/views/admin/entries/_permalink_inputs.html.erb +2 -3
- data/app/views/admin/entries/_site_input.html.erb +15 -0
- data/app/views/admin/entries/{entry_type_name_input.html.erb → entry_site_and_type_name_input.html.erb} +3 -0
- data/app/views/admin/entry_templates/_form.html.erb +5 -5
- data/app/views/admin/sites/_attributes_table.html.arb +12 -0
- data/app/views/admin/sites/_fields.html.erb +23 -0
- data/app/views/admin/sites/_form.html.erb +5 -0
- data/app/views/components/pageflow/admin/entries_tab.rb +1 -2
- data/app/views/components/pageflow/admin/entry_templates_tab.rb +10 -11
- data/app/views/components/pageflow/admin/extensible_attributes_table.rb +8 -2
- data/app/views/components/pageflow/admin/features_tab.rb +1 -1
- data/app/views/components/pageflow/admin/sites_tab.rb +35 -0
- data/app/views/components/pageflow/admin/users_tab.rb +1 -2
- data/app/views/pageflow/editor/config/_seeds.json.jbuilder +1 -0
- data/app/views/pageflow/editor/entries/seed.json.erb +1 -1
- data/app/views/pageflow/editor/sites/_site.json.jbuilder +1 -0
- data/app/views/pageflow/entries/stylesheet.css.erb +1 -1
- data/app/views/pageflow/feeds/index.atom.builder +20 -0
- data/app/views/pageflow/sitemaps/index.xml.builder +9 -0
- 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/config/initializers/admin_resource_tabs.rb +29 -12
- data/config/initializers/features.rb +1 -0
- data/config/initializers/paperclip.rb +4 -0
- data/config/locales/de.yml +42 -19
- data/config/locales/en.yml +45 -17
- data/config/routes.rb +3 -0
- data/config/spring.rb +1 -1
- data/db/migrate/20221215101134_rename_theming_to_site.rb +9 -0
- data/db/migrate/20221215120856_associate_entry_templates_with_sites.rb +34 -0
- data/db/migrate/20221219203023_add_name_to_sites.rb +5 -0
- data/db/migrate/20230103155934_associate_theme_customizations_with_sites.rb +27 -0
- data/db/migrate/20230120092923_create_other_files.rb +23 -0
- data/db/migrate/20230323115745_add_feeds_enabled_to_sites.rb +5 -0
- data/db/migrate/20230323154323_add_sitemap_enabled_to_sites.rb +5 -0
- data/db/migrate/20230331103823_add_title_to_sites.rb +5 -0
- data/db/migrate/20230405103612_add_custom_feed_url_to_sites.rb +5 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +455 -119
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +31 -8
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
- data/entry_types/paged/app/controllers/pageflow_paged/editor/entries_controller.rb +0 -2
- data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -0
- data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
- data/entry_types/paged/config/initializers/features.rb +0 -1
- data/entry_types/paged/lib/pageflow_paged/engine.rb +17 -1
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +3 -4
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +13 -6
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +2 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +11 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +42 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +3 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +31 -10
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +9 -1
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +3 -1
- data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +23 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +6 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +1 -5
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +10 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +44 -41
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_consent_vendors.json.jbuilder +16 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +8 -5
- data/entry_types/scrolled/config/initializers/features.rb +5 -0
- data/entry_types/scrolled/config/locales/consent_widget.de.yml +4 -0
- data/entry_types/scrolled/config/locales/consent_widget.en.yml +4 -0
- data/entry_types/scrolled/config/locales/de.yml +189 -8
- data/entry_types/scrolled/config/locales/en.yml +207 -2
- data/entry_types/scrolled/config/routes.rb +4 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +97 -5
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +96 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +38 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +17 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +24 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +6 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +1 -1
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +1 -2
- data/entry_types/scrolled/package/contentElements-editor.js +307 -22
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +690 -71
- data/entry_types/scrolled/package/editor.js +616 -220
- data/entry_types/scrolled/package/frontend/{EditableInlineText.module-c6672f27.js → EditableInlineText.module-fa9e3aff.js} +1669 -1674
- data/entry_types/scrolled/package/frontend/PhonePlatformContext-10a1d600.js +32 -0
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-727cce0d.js +107 -0
- data/entry_types/scrolled/package/frontend/Viewer-169e14ca.js +154 -0
- data/entry_types/scrolled/package/frontend/{Viewer-6b05522f.js → Viewer-ee1aa590.js} +32 -161
- data/entry_types/scrolled/package/frontend/arrowRight-92a34ccc.js +77 -0
- data/entry_types/scrolled/package/frontend/{components-487daafa.js → components-4a09bfa3.js} +185 -45
- data/entry_types/scrolled/package/frontend/{PhonePlatformContext-22e65f92.js → i18n-ddd92820.js} +162 -292
- data/entry_types/scrolled/package/frontend/index-02378634.js +118 -0
- data/entry_types/scrolled/package/frontend/index.css +1 -1
- data/entry_types/scrolled/package/frontend/index.js +375 -40
- data/entry_types/scrolled/package/frontend/useContentElementEditorState-63045393.js +52 -0
- data/entry_types/scrolled/package/package.json +2 -1
- data/entry_types/scrolled/package/testHelpers.js +9 -2
- data/entry_types/scrolled/package/values/colors.module.css +15 -0
- data/entry_types/scrolled/package/widgets/consentBar.css +1 -0
- data/entry_types/scrolled/package/widgets/consentBar.js +426 -0
- data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
- data/entry_types/scrolled/package/widgets/defaultNavigation.js +16 -9
- data/lib/generators/pageflow/resque/resque_generator.rb +1 -1
- data/lib/pageflow/ability_mixin.rb +21 -13
- data/lib/pageflow/active_admin_can_can_fix.rb +2 -2
- data/lib/pageflow/admin/attributes_table_rows.rb +1 -1
- data/lib/pageflow/admin/form_inputs.rb +1 -1
- data/lib/pageflow/admin/tabs.rb +1 -1
- data/lib/pageflow/built_in_file_type.rb +7 -0
- data/lib/pageflow/configuration/permissions.rb +3 -3
- data/lib/pageflow/configuration.rb +38 -17
- data/lib/pageflow/engine.rb +60 -39
- data/lib/pageflow/entry_export_import/entry_serialization.rb +1 -1
- data/lib/pageflow/entry_export_import/revision_serialization.rb +1 -1
- data/lib/pageflow/file_type.rb +2 -2
- data/lib/pageflow/global_config_api.rb +2 -2
- data/lib/pageflow/nested_revision_component.rb +23 -5
- data/lib/pageflow/primary_domain_entry_redirect.rb +7 -7
- data/lib/pageflow/rails_version.rb +19 -0
- data/lib/pageflow/seeds.rb +20 -17
- data/lib/pageflow/theme_customizations.rb +10 -10
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow/widget_types.rb +4 -0
- data/package/config/webpack5.js +14 -0
- data/package/editor.js +148 -37
- data/package/frontend.js +26 -2
- data/package/testHelpers.js +1 -1
- data/package/ui.js +296 -71
- data/spec/factories/accounts.rb +5 -2
- data/spec/factories/draft_entries.rb +2 -2
- data/spec/factories/entries.rb +19 -5
- data/spec/factories/entry_templates.rb +1 -1
- data/spec/factories/permalink_directory.rb +1 -1
- data/spec/factories/published_entries.rb +2 -2
- data/spec/factories/sites.rb +12 -0
- data/vendor/assets/javascripts/iscroll.js +4 -7
- metadata +84 -59
- data/app/helpers/pageflow/admin/permalinks_helper.rb +0 -15
- data/app/helpers/pageflow/themings_helper.rb +0 -11
- data/app/models/pageflow/theming.rb +0 -30
- data/app/views/admin/accounts/_theming_defaults_inline_help.html.erb +0 -5
- data/app/views/admin/accounts/_theming_details.html.arb +0 -5
- data/app/views/pageflow/editor/themings/_theming.json.jbuilder +0 -1
- data/entry_types/scrolled/package/frontend/arrowRight-7e3d9dd5.js +0 -42
- data/spec/factories/themings.rb +0 -7
- /data/app/views/pageflow/entries/{_theming.css.erb → _site.css.erb} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import 'regenerator-runtime';
|
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, d as api,
|
3
|
-
export {
|
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, d as api, _ as _asyncToGenerator, e as _regeneratorRuntime, f as withInlineEditingAlternative, h as useDarkBackground, i as EditableText, j as useContentElementConfigurationUpdate, k as useContentElementAttributes, l as widths, 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 styles$a, R as RootProviders, y as registerVendors, z as loadInlineEditingComponents } from './EditableInlineText.module-fa9e3aff.js';
|
3
|
+
export { a3 as Atmo, a4 as AtmoContext, A as AtmoProvider, a1 as AudioPlayer, i as EditableText, V as Image, X as MediaPlayer, K as PhonePlatformProvider, P as PlayerEventContextDataProvider, R as RootProviders, a8 as SectionThumbnail, a7 as StandaloneSectionThumbnail, W as Text, O as ThirdPartyOptIn, L as ThirdPartyOptOutInfo, a0 as VideoPlayer, U as contentElementWidthName, l as contentElementWidths, d as frontend, Q as getAvailableTransitionNames, Y as getInitialPlayerState, N as getTransitionNames, T as paletteColor, Z as playerStateReducer, a2 as processSources, y as registerConsentVendors, a5 as useAtmo, B as useAudioFocus, M as useConsentRequested, j as useContentElementConfigurationUpdate, D as useContentElementEditorCommandSubscription, F as useContentElementLifecycle, G as useCurrentChapter, h as useDarkBackground, H as useIsStaticPreview, n as useMediaMuted, a6 as useOnScreen, I as useOnUnmuteMedia, $ as usePlayerState, J as usePortraitOrientation } from './EditableInlineText.module-fa9e3aff.js';
|
4
4
|
import 'core-js/modules/es.symbol';
|
5
5
|
import 'core-js/modules/es.symbol.description';
|
6
6
|
import 'core-js/modules/es.symbol.async-iterator';
|
@@ -74,23 +74,28 @@ import 'core-js/modules/esnext.symbol.pattern-match';
|
|
74
74
|
import 'core-js/modules/web.dom-collections.iterator';
|
75
75
|
import 'regenerator-runtime/runtime.js';
|
76
76
|
import { browser, events, consent, features } from 'pageflow/frontend';
|
77
|
-
import React, { useRef, useState, useEffect, useCallback, Suspense, useContext } from 'react';
|
77
|
+
import React, { useRef, useState, useEffect, useCallback, useMemo, Suspense, useContext } from 'react';
|
78
78
|
import ReactDOM from 'react-dom';
|
79
|
-
import {
|
80
|
-
export { L as LocaleProvider,
|
81
|
-
import '
|
79
|
+
import { _ as _slicedToArray, j as useSectionsWithChapter, p as useEntryStructure, q as useWidget, r as getFileUrlTemplateHost, u as useI18n, b as _defineProperty, a as _objectSpread2, e as _objectWithoutProperties, g as useTheme, l as _toConsumableArray, s as useAvailableQualities, t as setupI18n } from './i18n-ddd92820.js';
|
80
|
+
export { L as LocaleProvider, t as setupI18n, i as useAdditionalSeedData, v as useChapters, w as useCredits, n as useEntryStateDispatch, f as useFile, x as useFileRights, u as useI18n, y as useLegalInfo, B as useLocale, z as useShareProviders, A as useShareUrl, g as useTheme } from './i18n-ddd92820.js';
|
81
|
+
import classNames from 'classnames';
|
82
|
+
import { a as useContentElementEditorState } from './useContentElementEditorState-63045393.js';
|
83
|
+
export { a as useContentElementEditorState } from './useContentElementEditorState-63045393.js';
|
82
84
|
import 'use-context-selector';
|
83
85
|
import 'reselect';
|
84
86
|
import 'slugify';
|
85
|
-
import classNames from 'classnames';
|
86
87
|
import './createSuper-d0f30da3.js';
|
87
88
|
import 'backbone-events-standalone';
|
89
|
+
import 'i18n-js';
|
90
|
+
import './PhonePlatformContext-10a1d600.js';
|
91
|
+
import stripTags from 'striptags';
|
88
92
|
import Measure from 'react-measure';
|
89
93
|
import { DraggableCore } from 'react-draggable';
|
90
|
-
|
91
|
-
export {
|
94
|
+
export { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-727cce0d.js';
|
95
|
+
export { F as FullscreenViewer } from './index-02378634.js';
|
96
|
+
import { A as ArrowRightIcon, a as ArrowLeftIcon } from './arrowRight-92a34ccc.js';
|
97
|
+
export { u as usePhonePlatform } from './arrowRight-92a34ccc.js';
|
92
98
|
import invert from 'invert-color';
|
93
|
-
import stripTags from 'striptags';
|
94
99
|
|
95
100
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
96
101
|
|
@@ -309,7 +314,8 @@ function renderChapters(entryStructure, currentSectionIndex, setCurrentSection,
|
|
309
314
|
}
|
310
315
|
|
311
316
|
function Widget(_ref) {
|
312
|
-
var role = _ref.role
|
317
|
+
var role = _ref.role,
|
318
|
+
props = _ref.props;
|
313
319
|
var widget = useWidget({
|
314
320
|
role: role
|
315
321
|
});
|
@@ -319,13 +325,15 @@ function Widget(_ref) {
|
|
319
325
|
}
|
320
326
|
|
321
327
|
var Component = api.widgetTypes.getComponent(widget.typeName);
|
322
|
-
return /*#__PURE__*/React.createElement(Component, {
|
328
|
+
return /*#__PURE__*/React.createElement(Component, Object.assign({
|
323
329
|
configuration: widget.configuration
|
324
|
-
});
|
330
|
+
}, props));
|
325
331
|
}
|
326
332
|
|
327
333
|
function Entry() {
|
328
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
334
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Widget, {
|
335
|
+
role: "consent"
|
336
|
+
}), /*#__PURE__*/React.createElement(Widget, {
|
329
337
|
role: "header"
|
330
338
|
}), /*#__PURE__*/React.createElement(Content, null), /*#__PURE__*/React.createElement(Widget, {
|
331
339
|
role: "footer"
|
@@ -373,27 +381,92 @@ function hlsHostSupportedByAndroid(seed) {
|
|
373
381
|
return getFileUrlTemplateHost(seed, 'videoFiles', 'hls-playlist').indexOf('_') < 0;
|
374
382
|
}
|
375
383
|
|
376
|
-
var
|
384
|
+
var ActionButton = withInlineEditingAlternative('ActionButton', function ActionButton() {
|
385
|
+
return null;
|
386
|
+
});
|
387
|
+
|
388
|
+
function isBlank(html) {
|
389
|
+
return !!stripTags(html).match(/^\s*$/);
|
390
|
+
}
|
391
|
+
function presence(html) {
|
392
|
+
return isBlank(html) ? null : html;
|
393
|
+
}
|
394
|
+
function isBlankEditableTextValue(value) {
|
395
|
+
var _value$0$children$;
|
396
|
+
|
397
|
+
return !value || value.length === 0 || value.length === 1 && value[0].children.length <= 1 && !((_value$0$children$ = value[0].children[0]) === null || _value$0$children$ === void 0 ? void 0 : _value$0$children$.text);
|
398
|
+
}
|
399
|
+
|
400
|
+
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","contentLinkColor":"var(--content-link-color)","root":"Figure-module_root__3FC-x colors-module_contentColorScope__2Zizr","invert":"Figure-module_invert___0BJP"};
|
377
401
|
|
378
402
|
/**
|
379
403
|
* Render a figure with a caption text attached.
|
380
404
|
*
|
381
405
|
* @param {Object} props
|
382
406
|
* @param {string} props.children - Content of figure.
|
383
|
-
* @param {string} props.
|
407
|
+
* @param {Object[]|string} props.caption - Formatted text data as provided by onCaptionChange.
|
408
|
+
* @param {Function} props.onCaptionChange - Receives updated value when it changes.
|
409
|
+
* @param {boolean} [props.addCaptionButtonVisible=true] - Control visiblility of action button.
|
410
|
+
* @param {string} [props.captionButtonPosition='outside'] - Position of action button.
|
384
411
|
*/
|
385
412
|
|
386
413
|
function Figure(_ref) {
|
387
414
|
var children = _ref.children,
|
388
|
-
caption = _ref.caption
|
415
|
+
caption = _ref.caption,
|
416
|
+
onCaptionChange = _ref.onCaptionChange,
|
417
|
+
_ref$addCaptionButton = _ref.addCaptionButtonVisible,
|
418
|
+
addCaptionButtonVisible = _ref$addCaptionButton === void 0 ? true : _ref$addCaptionButton,
|
419
|
+
_ref$addCaptionButton2 = _ref.addCaptionButtonPosition,
|
420
|
+
addCaptionButtonPosition = _ref$addCaptionButton2 === void 0 ? 'outside' : _ref$addCaptionButton2;
|
389
421
|
var darkBackground = useDarkBackground();
|
390
422
|
|
391
|
-
|
423
|
+
var _useContentElementEdi = useContentElementEditorState(),
|
424
|
+
isSelected = _useContentElementEdi.isSelected,
|
425
|
+
isEditable = _useContentElementEdi.isEditable;
|
426
|
+
|
427
|
+
var _useState = useState(false),
|
428
|
+
_useState2 = _slicedToArray(_useState, 2),
|
429
|
+
isEditingCaption = _useState2[0],
|
430
|
+
setIsEditingCaption = _useState2[1];
|
431
|
+
|
432
|
+
var _useI18n = useI18n({
|
433
|
+
locale: 'ui'
|
434
|
+
}),
|
435
|
+
t = _useI18n.t;
|
436
|
+
|
437
|
+
caption = useMemo(function () {
|
438
|
+
return typeof caption === 'string' ? [{
|
439
|
+
type: 'paragraph',
|
440
|
+
children: [{
|
441
|
+
text: caption
|
442
|
+
}]
|
443
|
+
}] : caption;
|
444
|
+
}, [caption]);
|
445
|
+
|
446
|
+
if (!isBlankEditableTextValue(caption) || isEditable) {
|
392
447
|
return /*#__PURE__*/React.createElement("figure", {
|
393
448
|
className: classNames(styles.root, _defineProperty({}, styles.invert, !darkBackground))
|
394
|
-
}, children,
|
395
|
-
|
396
|
-
|
449
|
+
}, children, isBlankEditableTextValue(caption) && isSelected && !isEditingCaption && addCaptionButtonVisible && /*#__PURE__*/React.createElement(ActionButton, {
|
450
|
+
position: addCaptionButtonPosition,
|
451
|
+
icon: "pencil",
|
452
|
+
text: t('pageflow_scrolled.inline_editing.add_caption'),
|
453
|
+
onClick: function onClick() {
|
454
|
+
return setIsEditingCaption(true);
|
455
|
+
}
|
456
|
+
}), (!isBlankEditableTextValue(caption) || isEditingCaption) && /*#__PURE__*/React.createElement("figcaption", {
|
457
|
+
onBlur: function onBlur() {
|
458
|
+
return setIsEditingCaption(false);
|
459
|
+
}
|
460
|
+
}, /*#__PURE__*/React.createElement(EditableText, {
|
461
|
+
autoFocus: isEditingCaption,
|
462
|
+
value: caption,
|
463
|
+
scaleCategory: "caption",
|
464
|
+
onChange: onCaptionChange,
|
465
|
+
onlyParagraphs: true,
|
466
|
+
hyphens: "none",
|
467
|
+
floatingControlsPosition: "above",
|
468
|
+
placeholder: t('pageflow_scrolled.inline_editing.type_text')
|
469
|
+
})));
|
397
470
|
} else {
|
398
471
|
return children;
|
399
472
|
}
|
@@ -416,6 +489,31 @@ function ContentElementBox(_ref) {
|
|
416
489
|
}, children);
|
417
490
|
}
|
418
491
|
|
492
|
+
/**
|
493
|
+
* @param {Object} props
|
494
|
+
* @param {Object} props.configuration - Configuration of the content element.
|
495
|
+
* @param {string} props.children - Content of box.
|
496
|
+
*/
|
497
|
+
|
498
|
+
function ContentElementFigure(_ref) {
|
499
|
+
var configuration = _ref.configuration,
|
500
|
+
children = _ref.children;
|
501
|
+
var updateConfiguration = useContentElementConfigurationUpdate();
|
502
|
+
|
503
|
+
var _useContentElementAtt = useContentElementAttributes(),
|
504
|
+
width = _useContentElementAtt.width;
|
505
|
+
|
506
|
+
return /*#__PURE__*/React.createElement(Figure, {
|
507
|
+
caption: configuration.caption,
|
508
|
+
onCaptionChange: function onCaptionChange(caption) {
|
509
|
+
return updateConfiguration({
|
510
|
+
caption: caption
|
511
|
+
});
|
512
|
+
},
|
513
|
+
addCaptionButtonPosition: width === widths.full ? 'outsideIndented' : 'outside'
|
514
|
+
}, children);
|
515
|
+
}
|
516
|
+
|
419
517
|
function MediaInteractionTracking(_ref) {
|
420
518
|
var playerState = _ref.playerState,
|
421
519
|
playerActions = _ref.playerActions,
|
@@ -1184,8 +1282,7 @@ function MediaPlayerControls(props) {
|
|
1184
1282
|
}, props));
|
1185
1283
|
}
|
1186
1284
|
MediaPlayerControls.defaultProps = {
|
1187
|
-
configuration: {}
|
1188
|
-
sectionProps: {}
|
1285
|
+
configuration: {}
|
1189
1286
|
};
|
1190
1287
|
|
1191
1288
|
function getTextTracksMenuItems(textTracks, t) {
|
@@ -1255,7 +1352,7 @@ function AudioPlayerControls(_ref) {
|
|
1255
1352
|
}
|
1256
1353
|
|
1257
1354
|
var Viewer = React.lazy(function () {
|
1258
|
-
return import('./Viewer-
|
1355
|
+
return import('./Viewer-ee1aa590.js');
|
1259
1356
|
});
|
1260
1357
|
function Panorama(props) {
|
1261
1358
|
return /*#__PURE__*/React.createElement(Suspense, {
|
@@ -1263,6 +1360,22 @@ function Panorama(props) {
|
|
1263
1360
|
}, /*#__PURE__*/React.createElement(Viewer, props));
|
1264
1361
|
}
|
1265
1362
|
|
1363
|
+
var Viewer$1 = React.lazy(function () {
|
1364
|
+
return import('./Viewer-169e14ca.js');
|
1365
|
+
});
|
1366
|
+
function ExpandableImage(_ref) {
|
1367
|
+
var enabled = _ref.enabled,
|
1368
|
+
props = _objectWithoutProperties(_ref, ["enabled"]);
|
1369
|
+
|
1370
|
+
if (!enabled) {
|
1371
|
+
return props.children;
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
1375
|
+
fallback: /*#__PURE__*/React.createElement("div", null)
|
1376
|
+
}, /*#__PURE__*/React.createElement(Viewer$1, props));
|
1377
|
+
}
|
1378
|
+
|
1266
1379
|
// from https://github.com/n8tb1t/use-scroll-position
|
1267
1380
|
var isBrowser = typeof window !== "undefined";
|
1268
1381
|
|
@@ -1369,6 +1482,7 @@ var AspectRatioContext = React.createContext();
|
|
1369
1482
|
* @param {Object} props
|
1370
1483
|
* @param {number} [props.aspectRatio] - Aspect ratio of div.
|
1371
1484
|
* @param {Object} [props.file] - Use width/height of file to calculate aspect ratio.
|
1485
|
+
* @param {number} [props.scale] - Only take up fraction of the viewport height supplied as value between 0 and 1.
|
1372
1486
|
* @param {Object} [props.opaque] - Render black background behind content.
|
1373
1487
|
*/
|
1374
1488
|
|
@@ -1376,7 +1490,9 @@ function FitViewport(_ref) {
|
|
1376
1490
|
var file = _ref.file,
|
1377
1491
|
aspectRatio = _ref.aspectRatio,
|
1378
1492
|
opaque = _ref.opaque,
|
1379
|
-
children = _ref.children
|
1493
|
+
children = _ref.children,
|
1494
|
+
_ref$scale = _ref.scale,
|
1495
|
+
scale = _ref$scale === void 0 ? 1 : _ref$scale;
|
1380
1496
|
|
1381
1497
|
var _useFullscreenDimensi = useFullscreenDimensions(),
|
1382
1498
|
height = _useFullscreenDimensi.height;
|
@@ -1387,10 +1503,10 @@ function FitViewport(_ref) {
|
|
1387
1503
|
|
1388
1504
|
if (height) {
|
1389
1505
|
// thumbnail view/fixed size: calculate absolute width in px
|
1390
|
-
maxWidthCSS = height / aspectRatio + 'px';
|
1506
|
+
maxWidthCSS = height / aspectRatio * scale + 'px';
|
1391
1507
|
} else {
|
1392
1508
|
// published view: set max width to specific aspect ratio depending on viewport height
|
1393
|
-
maxWidthCSS = 100 / aspectRatio + 'vh';
|
1509
|
+
maxWidthCSS = 100 / aspectRatio * scale + 'vh';
|
1394
1510
|
}
|
1395
1511
|
|
1396
1512
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -1597,22 +1713,241 @@ var unmuted = (function (_ref) {
|
|
1597
1713
|
}));
|
1598
1714
|
});
|
1599
1715
|
|
1716
|
+
function _extends$8() {
|
1717
|
+
_extends$8 = Object.assign || function (target) {
|
1718
|
+
for (var i = 1; i < arguments.length; i++) {
|
1719
|
+
var source = arguments[i];
|
1720
|
+
|
1721
|
+
for (var key in source) {
|
1722
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1723
|
+
target[key] = source[key];
|
1724
|
+
}
|
1725
|
+
}
|
1726
|
+
}
|
1727
|
+
|
1728
|
+
return target;
|
1729
|
+
};
|
1730
|
+
|
1731
|
+
return _extends$8.apply(this, arguments);
|
1732
|
+
}
|
1733
|
+
var gear = (function (_ref) {
|
1734
|
+
var _ref$styles = _ref.styles,
|
1735
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1736
|
+
|
1737
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
1738
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1739
|
+
viewBox: "-3 -3 30 30"
|
1740
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1741
|
+
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"
|
1742
|
+
}));
|
1743
|
+
});
|
1744
|
+
|
1745
|
+
function _extends$9() {
|
1746
|
+
_extends$9 = Object.assign || function (target) {
|
1747
|
+
for (var i = 1; i < arguments.length; i++) {
|
1748
|
+
var source = arguments[i];
|
1749
|
+
|
1750
|
+
for (var key in source) {
|
1751
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1752
|
+
target[key] = source[key];
|
1753
|
+
}
|
1754
|
+
}
|
1755
|
+
}
|
1756
|
+
|
1757
|
+
return target;
|
1758
|
+
};
|
1759
|
+
|
1760
|
+
return _extends$9.apply(this, arguments);
|
1761
|
+
}
|
1762
|
+
var email = (function (_ref) {
|
1763
|
+
var _ref$styles = _ref.styles,
|
1764
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1765
|
+
|
1766
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
1767
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1768
|
+
viewBox: "0 0 612 612"
|
1769
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1770
|
+
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"
|
1771
|
+
}));
|
1772
|
+
});
|
1773
|
+
|
1774
|
+
function _extends$a() {
|
1775
|
+
_extends$a = Object.assign || function (target) {
|
1776
|
+
for (var i = 1; i < arguments.length; i++) {
|
1777
|
+
var source = arguments[i];
|
1778
|
+
|
1779
|
+
for (var key in source) {
|
1780
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1781
|
+
target[key] = source[key];
|
1782
|
+
}
|
1783
|
+
}
|
1784
|
+
}
|
1785
|
+
|
1786
|
+
return target;
|
1787
|
+
};
|
1788
|
+
|
1789
|
+
return _extends$a.apply(this, arguments);
|
1790
|
+
}
|
1791
|
+
var facebook = (function (_ref) {
|
1792
|
+
var _ref$styles = _ref.styles,
|
1793
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1794
|
+
|
1795
|
+
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
1796
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1797
|
+
viewBox: "0 0 430.113 430.114"
|
1798
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1799
|
+
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"
|
1800
|
+
}));
|
1801
|
+
});
|
1802
|
+
|
1803
|
+
function _extends$b() {
|
1804
|
+
_extends$b = Object.assign || function (target) {
|
1805
|
+
for (var i = 1; i < arguments.length; i++) {
|
1806
|
+
var source = arguments[i];
|
1807
|
+
|
1808
|
+
for (var key in source) {
|
1809
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1810
|
+
target[key] = source[key];
|
1811
|
+
}
|
1812
|
+
}
|
1813
|
+
}
|
1814
|
+
|
1815
|
+
return target;
|
1816
|
+
};
|
1817
|
+
|
1818
|
+
return _extends$b.apply(this, arguments);
|
1819
|
+
}
|
1820
|
+
var linkedIn = (function (_ref) {
|
1821
|
+
var _ref$styles = _ref.styles,
|
1822
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1823
|
+
|
1824
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
1825
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1826
|
+
viewBox: "0 0 430.117 430.117"
|
1827
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1828
|
+
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"
|
1829
|
+
}));
|
1830
|
+
});
|
1831
|
+
|
1832
|
+
function _extends$c() {
|
1833
|
+
_extends$c = Object.assign || function (target) {
|
1834
|
+
for (var i = 1; i < arguments.length; i++) {
|
1835
|
+
var source = arguments[i];
|
1836
|
+
|
1837
|
+
for (var key in source) {
|
1838
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1839
|
+
target[key] = source[key];
|
1840
|
+
}
|
1841
|
+
}
|
1842
|
+
}
|
1843
|
+
|
1844
|
+
return target;
|
1845
|
+
};
|
1846
|
+
|
1847
|
+
return _extends$c.apply(this, arguments);
|
1848
|
+
}
|
1849
|
+
var telegram = (function (_ref) {
|
1850
|
+
var _ref$styles = _ref.styles,
|
1851
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1852
|
+
|
1853
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
1854
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1855
|
+
viewBox: "0 0 512.004 512.004"
|
1856
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1857
|
+
d: "M508.194 20.517c-4.43-4.96-11.42-6.29-17.21-3.76l-482 211a15.01 15.01 0 00-8.98 13.41 15.005 15.005 0 008.38 13.79l115.09 56.6 28.68 172.06c.93 6.53 6.06 11.78 12.74 12.73 4.8.69 9.57-1 12.87-4.4l90.86-90.86 129.66 92.62a15.02 15.02 0 0014.24 1.74 15.01 15.01 0 009.19-11.01l90-451c.89-4.47-.26-9.26-3.52-12.92zm-372.84 263.45l-84.75-41.68 334.82-146.57-250.07 188.25zm46.94 44.59l-13.95 69.75-15.05-90.3 183.97-138.49-150.88 151.39c-2.12 2.12-3.53 4.88-4.09 7.65zm9.13 107.3l15.74-78.67 36.71 26.22-52.45 52.45zm205.41 19.94l-176.73-126.23 252.47-253.31-75.74 379.54z"
|
1858
|
+
}));
|
1859
|
+
});
|
1860
|
+
|
1861
|
+
function _extends$d() {
|
1862
|
+
_extends$d = Object.assign || function (target) {
|
1863
|
+
for (var i = 1; i < arguments.length; i++) {
|
1864
|
+
var source = arguments[i];
|
1865
|
+
|
1866
|
+
for (var key in source) {
|
1867
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1868
|
+
target[key] = source[key];
|
1869
|
+
}
|
1870
|
+
}
|
1871
|
+
}
|
1872
|
+
|
1873
|
+
return target;
|
1874
|
+
};
|
1875
|
+
|
1876
|
+
return _extends$d.apply(this, arguments);
|
1877
|
+
}
|
1878
|
+
var twitter = (function (_ref) {
|
1879
|
+
var _ref$styles = _ref.styles,
|
1880
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1881
|
+
|
1882
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
1883
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1884
|
+
viewBox: "0 0 612 612"
|
1885
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1886
|
+
d: "M612 116.258a250.714 250.714 0 01-72.088 19.772c25.929-15.527 45.777-40.155 55.184-69.411-24.322 14.379-51.169 24.82-79.775 30.48-22.907-24.437-55.49-39.658-91.63-39.658-69.334 0-125.551 56.217-125.551 125.513 0 9.828 1.109 19.427 3.251 28.606-104.326-5.24-196.835-55.223-258.75-131.174-10.823 18.51-16.98 40.078-16.98 63.101 0 43.559 22.181 81.993 55.835 104.479a125.556 125.556 0 01-56.867-15.756v1.568c0 60.806 43.291 111.554 100.693 123.104-10.517 2.83-21.607 4.398-33.08 4.398-8.107 0-15.947-.803-23.634-2.333 15.985 49.907 62.336 86.199 117.253 87.194-42.947 33.654-97.099 53.655-155.916 53.655-10.134 0-20.116-.612-29.944-1.721 55.567 35.681 121.536 56.485 192.438 56.485 230.948 0 357.188-191.291 357.188-357.188l-.421-16.253c24.666-17.593 46.005-39.697 62.794-64.861z"
|
1887
|
+
}));
|
1888
|
+
});
|
1889
|
+
|
1890
|
+
function _extends$e() {
|
1891
|
+
_extends$e = Object.assign || function (target) {
|
1892
|
+
for (var i = 1; i < arguments.length; i++) {
|
1893
|
+
var source = arguments[i];
|
1894
|
+
|
1895
|
+
for (var key in source) {
|
1896
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1897
|
+
target[key] = source[key];
|
1898
|
+
}
|
1899
|
+
}
|
1900
|
+
}
|
1901
|
+
|
1902
|
+
return target;
|
1903
|
+
};
|
1904
|
+
|
1905
|
+
return _extends$e.apply(this, arguments);
|
1906
|
+
}
|
1907
|
+
var whatsApp = (function (_ref) {
|
1908
|
+
var _ref$styles = _ref.styles,
|
1909
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
1910
|
+
|
1911
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
1912
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1913
|
+
viewBox: "0 0 90 90"
|
1914
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
1915
|
+
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"
|
1916
|
+
}));
|
1917
|
+
});
|
1918
|
+
|
1600
1919
|
var icons = {
|
1601
1920
|
expand: ArrowRightIcon,
|
1602
1921
|
information: information,
|
1603
1922
|
muted: muted,
|
1604
1923
|
share: share,
|
1605
|
-
unmuted: unmuted
|
1924
|
+
unmuted: unmuted,
|
1925
|
+
gear: gear,
|
1926
|
+
email: email,
|
1927
|
+
facebook: facebook,
|
1928
|
+
linkedIn: linkedIn,
|
1929
|
+
telegram: telegram,
|
1930
|
+
twitter: twitter,
|
1931
|
+
whatsApp: whatsApp,
|
1932
|
+
arrowLeft: ArrowLeftIcon,
|
1933
|
+
arrowRight: ArrowRightIcon
|
1606
1934
|
};
|
1607
1935
|
/**
|
1608
1936
|
* Render an SVG icon that can be customized in themes.
|
1609
1937
|
*
|
1610
1938
|
* @param {Object} props
|
1611
|
-
* @param {string} props.name -
|
1939
|
+
* @param {string} props.name -
|
1940
|
+
* Either: expand, gear, information, muted, share, unmuted,
|
1941
|
+
* email, facebook, linkedIn, telegram, twitter, whatsApp,
|
1942
|
+
* arrowLeft, arrowRight,
|
1943
|
+
* @params {number} [props.width] - Image width.
|
1944
|
+
* @params {number} [props.height] - Image height.
|
1612
1945
|
*/
|
1613
1946
|
|
1614
1947
|
function ThemeIcon(_ref) {
|
1615
|
-
var name = _ref.name
|
1948
|
+
var name = _ref.name,
|
1949
|
+
width = _ref.width,
|
1950
|
+
height = _ref.height;
|
1616
1951
|
var theme = useTheme();
|
1617
1952
|
var FallbackIcon = icons[name];
|
1618
1953
|
var themeAsset = theme.assets.icons[name];
|
@@ -1622,11 +1957,17 @@ function ThemeIcon(_ref) {
|
|
1622
1957
|
}
|
1623
1958
|
|
1624
1959
|
if (themeAsset) {
|
1625
|
-
return /*#__PURE__*/React.createElement("svg",
|
1960
|
+
return /*#__PURE__*/React.createElement("svg", {
|
1961
|
+
width: width,
|
1962
|
+
height: height
|
1963
|
+
}, /*#__PURE__*/React.createElement("use", {
|
1626
1964
|
xlinkHref: "".concat(themeAsset, "#icon")
|
1627
1965
|
}));
|
1628
1966
|
} else {
|
1629
|
-
return /*#__PURE__*/React.createElement(FallbackIcon,
|
1967
|
+
return /*#__PURE__*/React.createElement(FallbackIcon, {
|
1968
|
+
width: width,
|
1969
|
+
height: height
|
1970
|
+
});
|
1630
1971
|
}
|
1631
1972
|
}
|
1632
1973
|
|
@@ -1639,16 +1980,10 @@ function registerTemplateWidgetType (typeName, callback) {
|
|
1639
1980
|
callback(element);
|
1640
1981
|
}
|
1641
1982
|
|
1642
|
-
function isBlank(html) {
|
1643
|
-
return !!stripTags(html).match(/^\s*$/);
|
1644
|
-
}
|
1645
|
-
function presence(html) {
|
1646
|
-
return isBlank(html) ? null : html;
|
1647
|
-
}
|
1648
|
-
|
1649
1983
|
var utils = {
|
1650
1984
|
camelize: camelize,
|
1651
1985
|
isBlank: isBlank,
|
1986
|
+
isBlankEditableTextValue: isBlankEditableTextValue,
|
1652
1987
|
presence: presence
|
1653
1988
|
};
|
1654
1989
|
|
@@ -1739,4 +2074,4 @@ function Root(_ref2) {
|
|
1739
2074
|
}, /*#__PURE__*/React.createElement(Entry, null));
|
1740
2075
|
}
|
1741
2076
|
|
1742
|
-
export { AudioPlayerControls, ClassicPlayerControls, ContentElementBox, EditableInlineText, Entry, Figure, FitViewport, MediaInteractionTracking, MediaPlayerControls, Panorama, PlayerControls, Root, ThemeIcon, Tooltip, VideoPlayerControls, WaveformPlayerControls, Widget, registerTemplateWidgetType, textColorForBackgroundColor, useScrollPosition, utils, withShadowClassName };
|
2077
|
+
export { AudioPlayerControls, ClassicPlayerControls, ContentElementBox, ContentElementFigure, EditableInlineText, Entry, ExpandableImage, Figure, FitViewport, MediaInteractionTracking, MediaPlayerControls, Panorama, PlayerControls, Root, ThemeIcon, Tooltip, VideoPlayerControls, WaveformPlayerControls, Widget, registerTemplateWidgetType, textColorForBackgroundColor, useScrollPosition, utils, withShadowClassName };
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { useState, useRef, useEffect, createContext, useContext } from 'react';
|
2
|
+
import { _ as _slicedToArray } from './i18n-ddd92820.js';
|
3
|
+
|
4
|
+
function useDelayedBoolean(value, _ref) {
|
5
|
+
var fromFalseToTrue = _ref.fromFalseToTrue,
|
6
|
+
fromTrueToFalse = _ref.fromTrueToFalse;
|
7
|
+
|
8
|
+
var _useState = useState(false),
|
9
|
+
_useState2 = _slicedToArray(_useState, 2),
|
10
|
+
setFlag = _useState2[1];
|
11
|
+
|
12
|
+
var timeoutRef = useRef(null);
|
13
|
+
var ref = useRef(value);
|
14
|
+
useEffect(function () {
|
15
|
+
if (value && !fromFalseToTrue || !value && !fromTrueToFalse) {
|
16
|
+
ref.current = value;
|
17
|
+
} else if (ref.current !== value) {
|
18
|
+
timeoutRef.current = setTimeout(function () {
|
19
|
+
ref.current = value;
|
20
|
+
setFlag(function (flag) {
|
21
|
+
return !flag;
|
22
|
+
});
|
23
|
+
}, ref.current ? fromTrueToFalse : fromFalseToTrue);
|
24
|
+
return function () {
|
25
|
+
return clearTimeout(timeoutRef.current);
|
26
|
+
};
|
27
|
+
}
|
28
|
+
}, [value, fromTrueToFalse, fromFalseToTrue]);
|
29
|
+
return !fromFalseToTrue && value || ref.current && (!!fromTrueToFalse || value);
|
30
|
+
}
|
31
|
+
|
32
|
+
var ContentElementEditorStateContext = createContext({
|
33
|
+
isSelected: false,
|
34
|
+
isEditable: false,
|
35
|
+
setTransientState: function setTransientState() {}
|
36
|
+
});
|
37
|
+
/**
|
38
|
+
* Use inside a content element component to determine whether the
|
39
|
+
* component is being rendered inside the editor iframe, and whether
|
40
|
+
* the content element is currently selected. This can be used to
|
41
|
+
* implement simple inline editing capabilities like displaying extra
|
42
|
+
* information when the content element is selected.
|
43
|
+
*
|
44
|
+
* @example
|
45
|
+
* const {isEditable, isSelected} = useContentElementEditorState();
|
46
|
+
*/
|
47
|
+
|
48
|
+
function useContentElementEditorState() {
|
49
|
+
return useContext(ContentElementEditorStateContext);
|
50
|
+
}
|
51
|
+
|
52
|
+
export { ContentElementEditorStateContext as C, useContentElementEditorState as a, useDelayedBoolean as u };
|
@@ -21,6 +21,7 @@
|
|
21
21
|
"react-draggable": "^4.4.2",
|
22
22
|
"react-measure": "^2.3.0",
|
23
23
|
"react-player": "^1.15.2",
|
24
|
+
"react-quick-pinch-zoom": "^4.8.0",
|
24
25
|
"react-tooltip": "^3.11.1",
|
25
26
|
"react_ujs": "^2.6.1",
|
26
27
|
"reselect": "^4.0.0",
|
@@ -30,7 +31,7 @@
|
|
30
31
|
"slugify": "^1.4.6",
|
31
32
|
"striptags": "^3.1.1",
|
32
33
|
"use-context-selector": "^1.2.11",
|
33
|
-
"video.js": "https://github.com/tf/video.js#pageflow-scrolled-
|
34
|
+
"video.js": "https://github.com/tf/video.js#pageflow-scrolled-8",
|
34
35
|
"wavesurfer.js": "6.1.0",
|
35
36
|
"whatwg-fetch": "^3.0.0"
|
36
37
|
},
|
@@ -65,6 +65,9 @@ function _objectSpread2(target) {
|
|
65
65
|
* @param {Object} [options.legalInfo] - imprint, copyright and privacy information of entry.
|
66
66
|
* @param {Object} [options.themeOptions] - Options set via theme registration.
|
67
67
|
* @param {Object} [options.themeAssets] - Paths to theme assets.
|
68
|
+
* @param {Object} [options.additionalSeedData] - Seed data by name.
|
69
|
+
* @param {Array} [options.consentVendors] - Server rendered consent vendor data.
|
70
|
+
* @param {Object} [options.contentElementConsentVendors] - Consent vendor name by content element id.
|
68
71
|
* @param {Object} [options.entry] - attributes of entry.
|
69
72
|
* @param {Array} [options.imageFiles] - Array of objects with image file attributes of entry.
|
70
73
|
* @param {Array} [options.videoFiles] - Array of objects with video file attributes of entry.
|
@@ -96,7 +99,9 @@ function normalizeSeed() {
|
|
96
99
|
sections = _ref.sections,
|
97
100
|
contentElements = _ref.contentElements,
|
98
101
|
widgets = _ref.widgets,
|
99
|
-
additionalSeedData = _ref.additionalSeedData
|
102
|
+
additionalSeedData = _ref.additionalSeedData,
|
103
|
+
consentVendors = _ref.consentVendors,
|
104
|
+
contentElementConsentVendors = _ref.contentElementConsentVendors;
|
100
105
|
|
101
106
|
var entries = entry ? [entry] : [{}];
|
102
107
|
var normalizedEntries = normalizeCollection(entries);
|
@@ -130,7 +135,9 @@ function normalizeSeed() {
|
|
130
135
|
}),
|
131
136
|
additionalSeedData: additionalSeedData || {
|
132
137
|
frontendVersion: 1
|
133
|
-
}
|
138
|
+
},
|
139
|
+
consentVendors: consentVendors || [],
|
140
|
+
contentElementConsentVendors: contentElementConsentVendors || {}
|
134
141
|
},
|
135
142
|
collections: {
|
136
143
|
entries: normalizedEntries,
|