pageflow 16.0.0 → 16.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +86 -33
  3. data/README.md +6 -6
  4. data/Rakefile +1 -1
  5. data/admins/pageflow/entry.rb +0 -1
  6. data/admins/pageflow/sites.rb +3 -0
  7. data/app/assets/images/pageflow/admin/icons/published_with_noindex.svg +4 -0
  8. data/app/assets/javascripts/pageflow/dist/ui.js +299 -72
  9. data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +1 -1
  10. data/app/assets/stylesheets/pageflow/admin/entries.scss +4 -0
  11. data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +10 -0
  12. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +4 -0
  13. data/app/assets/stylesheets/pageflow/editor/base.scss +0 -1
  14. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +61 -7
  15. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +12 -1
  16. data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -0
  17. data/app/assets/stylesheets/pageflow/editor/help.scss +3 -3
  18. data/app/assets/stylesheets/pageflow/editor/info_box.scss +7 -0
  19. data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +0 -5
  20. data/app/assets/stylesheets/pageflow/ui/forms.scss +4 -4
  21. data/app/assets/stylesheets/pageflow/{editor/wysihtml5.scss → ui/input/text_area_input.scss} +13 -1
  22. data/app/assets/stylesheets/pageflow/ui.scss +1 -0
  23. data/app/controllers/pageflow/chapters_controller.rb +2 -2
  24. data/app/controllers/pageflow/editor/entry_publications_controller.rb +5 -1
  25. data/app/controllers/pageflow/editor/file_import_controller.rb +1 -1
  26. data/app/controllers/pageflow/editor/files_controller.rb +1 -1
  27. data/app/controllers/pageflow/entries_controller.rb +12 -2
  28. data/app/controllers/pageflow/feeds_controller.rb +18 -0
  29. data/app/controllers/pageflow/pages_controller.rb +2 -2
  30. data/app/controllers/pageflow/sitemaps_controller.rb +15 -0
  31. data/app/controllers/pageflow/storylines_controller.rb +2 -2
  32. data/app/helpers/pageflow/entries_helper.rb +4 -1
  33. data/app/helpers/pageflow/feeds_helper.rb +66 -0
  34. data/app/helpers/pageflow/meta_tags_helper.rb +2 -1
  35. data/app/helpers/pageflow/page_types_helper.rb +10 -10
  36. data/app/helpers/pageflow/revision_file_helper.rb +3 -3
  37. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  38. data/app/inputs/pageflow_permalink_input.rb +15 -3
  39. data/app/models/concerns/pageflow/entry_publication_states.rb +9 -0
  40. data/app/models/concerns/pageflow/reusable_file.rb +3 -3
  41. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  42. data/app/models/pageflow/account.rb +8 -0
  43. data/app/models/pageflow/audio_file_url_templates.rb +2 -1
  44. data/app/models/pageflow/draft_entry.rb +1 -1
  45. data/app/models/pageflow/entries_feed.rb +32 -0
  46. data/app/models/pageflow/entry.rb +7 -5
  47. data/app/models/pageflow/entry_at_revision.rb +2 -0
  48. data/app/models/pageflow/image_file.rb +34 -8
  49. data/app/models/pageflow/image_file_url_templates.rb +7 -1
  50. data/app/models/pageflow/membership.rb +3 -2
  51. data/app/models/pageflow/other_file.rb +5 -0
  52. data/app/models/pageflow/other_file_url_templates.rb +16 -0
  53. data/app/models/pageflow/published_entry.rb +6 -0
  54. data/app/models/pageflow/revision.rb +6 -0
  55. data/app/models/pageflow/site.rb +8 -0
  56. data/app/models/pageflow/sitemaps.rb +14 -0
  57. data/app/models/pageflow/used_file.rb +10 -2
  58. data/app/models/pageflow/video_file_url_templates.rb +3 -1
  59. data/app/models/pageflow/widget.rb +9 -1
  60. data/app/views/admin/entries/_permalink_inputs.html.erb +1 -2
  61. data/app/views/admin/sites/_attributes_table.html.arb +3 -0
  62. data/app/views/admin/sites/_fields.html.erb +6 -0
  63. data/app/views/components/pageflow/admin/extensible_attributes_table.rb +2 -2
  64. data/app/views/components/pageflow/admin/revisions_tab.rb +8 -0
  65. data/app/views/components/pageflow/admin/sites_tab.rb +3 -0
  66. data/app/views/pageflow/editor/config/_seeds.json.jbuilder +2 -0
  67. data/app/views/pageflow/editor/entries/_entry.json.jbuilder +1 -0
  68. data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +1 -0
  69. data/app/views/pageflow/feeds/index.atom.builder +20 -0
  70. data/app/views/pageflow/image_files/_image_file.json.jbuilder +1 -0
  71. data/app/views/pageflow/meta_tags/_entry.html.erb +1 -0
  72. data/app/views/pageflow/sitemaps/index.xml.builder +9 -0
  73. data/config/initializers/features.rb +3 -0
  74. data/config/initializers/paperclip.rb +8 -0
  75. data/config/locales/de.yml +77 -6
  76. data/config/locales/en.yml +79 -4
  77. data/config/routes.rb +3 -0
  78. data/config/spring.rb +1 -1
  79. data/db/migrate/20230120092923_create_other_files.rb +23 -0
  80. data/db/migrate/20230323115745_add_feeds_enabled_to_sites.rb +5 -0
  81. data/db/migrate/20230323154323_add_sitemap_enabled_to_sites.rb +5 -0
  82. data/db/migrate/20230331103823_add_title_to_sites.rb +5 -0
  83. data/db/migrate/20230405103612_add_custom_feed_url_to_sites.rb +5 -0
  84. data/db/migrate/20231024062501_add_output_presences_to_image_files.rb +5 -0
  85. data/db/migrate/20231128124523_add_noindex_to_revisions.rb +5 -0
  86. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +710 -259
  87. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +34 -5
  88. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
  89. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  90. data/entry_types/paged/app/controllers/pageflow_paged/editor/entries_controller.rb +0 -2
  91. data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +2 -1
  92. data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
  93. data/entry_types/paged/config/initializers/features.rb +0 -1
  94. data/entry_types/paged/lib/pageflow_paged/engine.rb +13 -1
  95. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
  96. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +3 -4
  97. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +13 -6
  98. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +11 -3
  99. data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +11 -0
  100. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +42 -0
  101. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +8 -5
  102. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +17 -12
  103. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +9 -1
  104. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +1 -1
  105. data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +23 -0
  106. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -1
  107. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +1 -5
  108. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +10 -0
  109. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +44 -41
  110. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_consent_vendors.json.jbuilder +16 -0
  111. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +7 -0
  112. data/entry_types/scrolled/config/initializers/features.rb +5 -0
  113. data/entry_types/scrolled/config/locales/consent_widget.de.yml +4 -0
  114. data/entry_types/scrolled/config/locales/consent_widget.en.yml +4 -0
  115. data/entry_types/scrolled/config/locales/de.yml +225 -8
  116. data/entry_types/scrolled/config/locales/en.yml +239 -2
  117. data/entry_types/scrolled/config/routes.rb +4 -0
  118. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +69 -44
  119. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +2 -1
  120. data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
  121. data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +96 -0
  122. data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +38 -0
  123. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +13 -1
  124. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +30 -0
  125. data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +6 -1
  126. data/entry_types/scrolled/lib/pageflow_scrolled/web_app_manifest.rb +1 -1
  127. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +1 -1
  128. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +1 -2
  129. data/entry_types/scrolled/package/config/webpack.js +26 -0
  130. data/entry_types/scrolled/package/contentElements-editor.js +330 -32
  131. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  132. data/entry_types/scrolled/package/contentElements-frontend.js +920 -145
  133. data/entry_types/scrolled/package/editor.js +819 -239
  134. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-14c7b097.js → EditableInlineText.module-6ee0e024.js} +1975 -1792
  135. data/entry_types/scrolled/package/frontend/PhonePlatformContext-b28d991a.js +32 -0
  136. data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-8242f213.js +107 -0
  137. data/entry_types/scrolled/package/frontend/Viewer-32cd1ac1.js +154 -0
  138. data/entry_types/scrolled/package/frontend/{Viewer-b6becc57.js → Viewer-6e4d14ed.js} +32 -161
  139. data/entry_types/scrolled/package/frontend/arrowRight-e42e6011.js +77 -0
  140. data/entry_types/scrolled/package/frontend/{components-b3160dd7.js → components-24363f97.js} +188 -47
  141. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-f6093cc6.js → i18n-71c39823.js} +191 -111
  142. data/entry_types/scrolled/package/frontend/index-fc4b13e6.js +118 -0
  143. data/entry_types/scrolled/package/frontend/index.css +1 -1
  144. data/entry_types/scrolled/package/frontend/index.js +252 -76
  145. data/entry_types/scrolled/package/frontend/useContentElementEditorState-245f1986.js +52 -0
  146. data/entry_types/scrolled/package/package.json +6 -4
  147. data/entry_types/scrolled/package/testHelpers.js +11 -2
  148. data/entry_types/scrolled/package/values/colors.module.css +15 -0
  149. data/entry_types/scrolled/package/widgets/consentBar.css +1 -0
  150. data/entry_types/scrolled/package/widgets/consentBar.js +426 -0
  151. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  152. data/entry_types/scrolled/package/widgets/defaultNavigation.js +39 -4
  153. data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -0
  154. data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +49 -0
  155. data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -0
  156. data/entry_types/scrolled/package/widgets/textInlineFileRights.js +37 -0
  157. data/lib/generators/pageflow/resque/resque_generator.rb +1 -1
  158. data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
  159. data/lib/generators/pageflow/resque/templates/resque.rb +1 -1
  160. data/lib/generators/pageflow/routes/routes_generator.rb +1 -1
  161. data/lib/pageflow/ability_mixin.rb +5 -5
  162. data/lib/pageflow/active_admin_can_can_fix.rb +2 -2
  163. data/lib/pageflow/built_in_file_type.rb +7 -0
  164. data/lib/pageflow/configuration.rb +29 -1
  165. data/lib/pageflow/engine.rb +18 -40
  166. data/lib/pageflow/entry_export_import/revision_serialization.rb +1 -1
  167. data/lib/pageflow/file_type.rb +2 -2
  168. data/lib/pageflow/global_config_api.rb +2 -2
  169. data/lib/pageflow/nested_revision_component.rb +23 -5
  170. data/lib/pageflow/page_type.rb +1 -1
  171. data/lib/pageflow/paperclip_processors/webp.rb +63 -0
  172. data/lib/pageflow/rails_version.rb +19 -0
  173. data/lib/pageflow/seeds.rb +10 -7
  174. data/lib/pageflow/user_mixin.rb +1 -1
  175. data/lib/pageflow/version.rb +1 -1
  176. data/lib/pageflow/widget_types.rb +4 -0
  177. data/package/config/jest/index.js +3 -1
  178. data/package/config/webpack5.js +14 -0
  179. data/package/editor.js +410 -181
  180. data/package/frontend.js +34 -4
  181. data/package/testHelpers.js +1 -1
  182. data/package/ui.js +297 -71
  183. data/spec/factories/entries.rb +34 -3
  184. data/spec/factories/sites.rb +3 -0
  185. data/vendor/assets/javascripts/iscroll.js +4 -7
  186. metadata +118 -80
  187. data/app/helpers/pageflow/admin/permalinks_helper.rb +0 -15
  188. data/entry_types/scrolled/package/frontend/arrowRight-78a7cee4.js +0 -42
@@ -0,0 +1,32 @@
1
+ import { browser } from 'pageflow/frontend';
2
+ import React, { createContext, useContext, useState, useEffect } from 'react';
3
+ import { _ as _slicedToArray } from './i18n-71c39823.js';
4
+
5
+ var BrowserFeaturesAvailableContext = createContext(); // Browser feature detection is not available during server side
6
+ // rendering. To prevent mismatches during hydration, we keep features
7
+ // disabled in the initial render. Since hydration only starts after
8
+ // feature detection has finished, we can immediately re-render once
9
+ // the provider has mounted.
10
+
11
+ function BrowserFeaturesProvider(_ref) {
12
+ var children = _ref.children;
13
+
14
+ var _useState = useState(false),
15
+ _useState2 = _slicedToArray(_useState, 2),
16
+ isAvailable = _useState2[0],
17
+ setIsAvailable = _useState2[1];
18
+
19
+ useEffect(function () {
20
+ return setIsAvailable(true);
21
+ }, []);
22
+ return /*#__PURE__*/React.createElement(BrowserFeaturesAvailableContext.Provider, {
23
+ value: isAvailable
24
+ }, children);
25
+ }
26
+ function useBrowserFeature(name) {
27
+ return useContext(BrowserFeaturesAvailableContext) && browser.has(name);
28
+ }
29
+
30
+ var PhonePlatformContext = React.createContext(false);
31
+
32
+ export { BrowserFeaturesProvider as B, PhonePlatformContext as P, useBrowserFeature as u };
@@ -0,0 +1,107 @@
1
+ import React from 'react';
2
+ import { e as _objectWithoutProperties, u as useI18n } from './i18n-71c39823.js';
3
+
4
+ function _extends() {
5
+ _extends = Object.assign || function (target) {
6
+ for (var i = 1; i < arguments.length; i++) {
7
+ var source = arguments[i];
8
+
9
+ for (var key in source) {
10
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
11
+ target[key] = source[key];
12
+ }
13
+ }
14
+ }
15
+
16
+ return target;
17
+ };
18
+
19
+ return _extends.apply(this, arguments);
20
+ }
21
+ var EnterFullscreenIcon = (function (_ref) {
22
+ var _ref$styles = _ref.styles,
23
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
24
+ props = _objectWithoutProperties(_ref, ["styles"]);
25
+
26
+ return /*#__PURE__*/React.createElement("svg", _extends({
27
+ "aria-hidden": "true",
28
+ "data-prefix": "fas",
29
+ "data-icon": "expand",
30
+ className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-expand"] || "fa-expand") + " " + (styles["fa-w-14"] || "fa-w-14"),
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ viewBox: "0 0 448 512"
33
+ }, props), /*#__PURE__*/React.createElement("path", {
34
+ fill: "currentColor",
35
+ 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"
36
+ }));
37
+ });
38
+
39
+ function _extends$1() {
40
+ _extends$1 = Object.assign || function (target) {
41
+ for (var i = 1; i < arguments.length; i++) {
42
+ var source = arguments[i];
43
+
44
+ for (var key in source) {
45
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
46
+ target[key] = source[key];
47
+ }
48
+ }
49
+ }
50
+
51
+ return target;
52
+ };
53
+
54
+ return _extends$1.apply(this, arguments);
55
+ }
56
+ var ExitFullscreenIcon = (function (_ref) {
57
+ var _ref$styles = _ref.styles,
58
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
59
+ props = _objectWithoutProperties(_ref, ["styles"]);
60
+
61
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
62
+ "aria-hidden": "true",
63
+ "data-prefix": "fas",
64
+ "data-icon": "compress",
65
+ className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-compress"] || "fa-compress") + " " + (styles["fa-w-14"] || "fa-w-14"),
66
+ xmlns: "http://www.w3.org/2000/svg",
67
+ viewBox: "0 0 448 512"
68
+ }, props), /*#__PURE__*/React.createElement("path", {
69
+ fill: "currentColor",
70
+ 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"
71
+ }));
72
+ });
73
+
74
+ var styles = {"button":"ToggleFullscreenButton-module_button__2n69- utils-module_unstyledButton__3rgne"};
75
+
76
+ function ToggleFullscreenButton(props) {
77
+ var _useI18n = useI18n(),
78
+ t = _useI18n.t;
79
+
80
+ return /*#__PURE__*/React.createElement("button", {
81
+ className: styles.button,
82
+ title: t(props.isFullscreen ? 'exit_fullscreen' : 'enter_fullscreen', {
83
+ scope: 'pageflow_scrolled.public'
84
+ }),
85
+ onClick: function onClick() {
86
+ return props.isFullscreen ? props.onExit() : props.onEnter();
87
+ }
88
+ }, icon(props));
89
+ }
90
+
91
+ function icon(props) {
92
+ if (props.isFullscreen) {
93
+ return /*#__PURE__*/React.createElement(ExitFullscreenIcon, null);
94
+ } else {
95
+ return /*#__PURE__*/React.createElement(EnterFullscreenIcon, null);
96
+ }
97
+ }
98
+
99
+ var styles$1 = {"corner":"ToggleFullscreenCornerButton-module_corner__CxAAH"};
100
+
101
+ function ToggleFullscreenCornerButton(props) {
102
+ return /*#__PURE__*/React.createElement("div", {
103
+ className: styles$1.corner
104
+ }, /*#__PURE__*/React.createElement(ToggleFullscreenButton, props));
105
+ }
106
+
107
+ export { ToggleFullscreenCornerButton as T };
@@ -0,0 +1,154 @@
1
+ import React, { useRef, useCallback, useState } from 'react';
2
+ import 'react-dom';
3
+ import { _ as _slicedToArray, b as _defineProperty } from './i18n-71c39823.js';
4
+ import classNames from 'classnames';
5
+ import { a as useContentElementEditorState } from './useContentElementEditorState-245f1986.js';
6
+ import 'use-context-selector';
7
+ import 'reselect';
8
+ import 'slugify';
9
+ import 'i18n-js';
10
+ import { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-8242f213.js';
11
+ import { F as FullscreenViewer } from './index-fc4b13e6.js';
12
+ import QuickPinchZoom, { make3dTransformValue } from 'react-quick-pinch-zoom';
13
+
14
+ var styles = {"outer":"SwipeToClose-module_outer__1fl2h","inner":"SwipeToClose-module_inner__NOg1v"};
15
+
16
+ function SwipeToClose(_ref) {
17
+ var onClose = _ref.onClose,
18
+ children = _ref.children;
19
+ var start = useRef();
20
+ var inner = useRef();
21
+ var ratio = useRef(0);
22
+ var handleTouchStart = useCallback(function (event) {
23
+ start.current = event.touches[0].pageY;
24
+ }, []);
25
+ var handleTouchMove = useCallback(function (event) {
26
+ var offset = Math.max(-200, Math.min(200, event.touches[0].pageY - start.current));
27
+ ratio.current = Math.abs(offset / 200);
28
+ requestAnimationFrame(function () {
29
+ if (inner.current) {
30
+ inner.current.style.setProperty('transition', "none");
31
+ inner.current.style.setProperty('transform', "translate3d(0, ".concat(offset, "px, 0)"));
32
+ inner.current.style.setProperty('opacity', 1 - ratio.current);
33
+ }
34
+ });
35
+ }, []);
36
+ var handleTouchEnd = useCallback(function (event) {
37
+ event.preventDefault();
38
+
39
+ if (ratio.current > 0.5) {
40
+ onClose();
41
+ }
42
+
43
+ requestAnimationFrame(function () {
44
+ if (inner.current) {
45
+ inner.current.style.setProperty('transition', "opacity 0.2s linear, transform 0.2s ease");
46
+ inner.current.style.setProperty('transform', "translate3d(0, 0, 0)");
47
+ inner.current.style.setProperty('opacity', 1);
48
+ }
49
+ });
50
+ }, [onClose]);
51
+ return /*#__PURE__*/React.createElement("div", {
52
+ className: styles.outer,
53
+ onClick: onClose,
54
+ onTouchStart: handleTouchStart,
55
+ onTouchMove: handleTouchMove,
56
+ onTouchEnd: handleTouchEnd
57
+ }, /*#__PURE__*/React.createElement("div", {
58
+ className: styles.inner,
59
+ ref: inner
60
+ }, children));
61
+ }
62
+
63
+ var styles$1 = {"full":"ZoomableImage-module_full__1YJoO","container":"ZoomableImage-module_container__RTuPI","img":"ZoomableImage-module_img__3Vnst","visible":"ZoomableImage-module_visible__2ez0D"};
64
+
65
+ function ZoomableImage(_ref) {
66
+ var onClose = _ref.onClose,
67
+ imageFile = _ref.imageFile;
68
+ var imgRef = useRef();
69
+
70
+ var _useState = useState(true),
71
+ _useState2 = _slicedToArray(_useState, 2),
72
+ isVisible = _useState2[0],
73
+ setIsVisible = _useState2[1];
74
+
75
+ var onUpdate = useCallback(function (_ref2) {
76
+ var x = _ref2.x,
77
+ y = _ref2.y,
78
+ scale = _ref2.scale;
79
+
80
+ if (imgRef.current) {
81
+ imgRef.current.style.setProperty('transform', make3dTransformValue({
82
+ x: x,
83
+ y: y,
84
+ scale: scale
85
+ }));
86
+ }
87
+ }, []);
88
+ var handleClose = useCallback(function () {
89
+ onClose();
90
+ setIsVisible(false);
91
+ }, [onClose]);
92
+ return /*#__PURE__*/React.createElement("div", {
93
+ className: styles$1.full
94
+ }, /*#__PURE__*/React.createElement(SwipeToClose, {
95
+ onClose: handleClose
96
+ }, /*#__PURE__*/React.createElement(QuickPinchZoom, {
97
+ containerProps: {
98
+ className: styles$1.container
99
+ },
100
+ onUpdate: onUpdate,
101
+ isTouch: function isTouch() {
102
+ return true;
103
+ },
104
+ minZoom: 0.8,
105
+ maxZoom: 5,
106
+ tapZoomFactor: 1.5,
107
+ draggableUnZoomed: false,
108
+ doubleTapToggleZoom: true,
109
+ enforceBoundsDuringZoom: true,
110
+ centerContained: true
111
+ }, /*#__PURE__*/React.createElement("img", {
112
+ src: imageFile.urls.large,
113
+ width: imageFile.width,
114
+ height: imageFile.height,
115
+ alt: "img",
116
+ ref: imgRef,
117
+ className: classNames(styles$1.img, _defineProperty({}, styles$1.visible, isVisible))
118
+ }))));
119
+ }
120
+
121
+ function Viewer(_ref) {
122
+ var imageFile = _ref.imageFile,
123
+ contentElementId = _ref.contentElementId,
124
+ children = _ref.children;
125
+
126
+ var _useContentElementEdi = useContentElementEditorState(),
127
+ isEditable = _useContentElementEdi.isEditable,
128
+ isSelected = _useContentElementEdi.isSelected;
129
+
130
+ return /*#__PURE__*/React.createElement(FullscreenViewer, {
131
+ contentElementId: contentElementId,
132
+ renderChildren: function renderChildren(_ref2) {
133
+ var enterFullscreen = _ref2.enterFullscreen;
134
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
135
+ onClick: enterFullscreen,
136
+ style: {
137
+ pointerEvents: isEditable && !isSelected ? 'none' : undefined
138
+ }
139
+ }, children), /*#__PURE__*/React.createElement(ToggleFullscreenCornerButton, {
140
+ isFullscreen: false,
141
+ onEnter: enterFullscreen
142
+ }));
143
+ },
144
+ renderFullscreenChildren: function renderFullscreenChildren(_ref3) {
145
+ var exitFullscreen = _ref3.exitFullscreen;
146
+ return /*#__PURE__*/React.createElement(ZoomableImage, {
147
+ onClose: exitFullscreen,
148
+ imageFile: imageFile
149
+ });
150
+ }
151
+ });
152
+ }
153
+
154
+ export default Viewer;
@@ -1,112 +1,19 @@
1
1
  import 'pageflow/frontend';
2
2
  import React, { useMemo, useEffect, useRef, useState } from 'react';
3
3
  import ReactDOM from 'react-dom';
4
- import { _ as _objectWithoutProperties, u as useI18n, b as _defineProperty, n as useBrowserFeature, c as _slicedToArray } from './PhonePlatformContext-f6093cc6.js';
5
- import 'i18n-js';
4
+ import { b as _defineProperty, e as _objectWithoutProperties, _ as _slicedToArray } from './i18n-71c39823.js';
5
+ import classNames from 'classnames';
6
6
  import 'use-context-selector';
7
7
  import 'reselect';
8
8
  import 'slugify';
9
- import classNames from 'classnames';
10
- import { A as ArrowRightIcon, u as usePhonePlatform } from './arrowRight-78a7cee4.js';
9
+ import 'i18n-js';
10
+ import { u as useBrowserFeature } from './PhonePlatformContext-b28d991a.js';
11
+ import { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-8242f213.js';
12
+ import { a as ArrowLeftIcon, A as ArrowRightIcon, u as usePhonePlatform } from './arrowRight-e42e6011.js';
11
13
  import { PanoViewer } from '@egjs/view360';
12
14
  import screenfull from 'screenfull';
13
15
 
14
- function _extends() {
15
- _extends = Object.assign || function (target) {
16
- for (var i = 1; i < arguments.length; i++) {
17
- var source = arguments[i];
18
-
19
- for (var key in source) {
20
- if (Object.prototype.hasOwnProperty.call(source, key)) {
21
- target[key] = source[key];
22
- }
23
- }
24
- }
25
-
26
- return target;
27
- };
28
-
29
- return _extends.apply(this, arguments);
30
- }
31
- var EnterFullscreenIcon = (function (_ref) {
32
- var _ref$styles = _ref.styles,
33
- styles = _ref$styles === void 0 ? {} : _ref$styles,
34
- props = _objectWithoutProperties(_ref, ["styles"]);
35
-
36
- return /*#__PURE__*/React.createElement("svg", _extends({
37
- "aria-hidden": "true",
38
- "data-prefix": "fas",
39
- "data-icon": "expand",
40
- className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-expand"] || "fa-expand") + " " + (styles["fa-w-14"] || "fa-w-14"),
41
- xmlns: "http://www.w3.org/2000/svg",
42
- viewBox: "0 0 448 512"
43
- }, props), /*#__PURE__*/React.createElement("path", {
44
- fill: "currentColor",
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
- }));
47
- });
48
-
49
- function _extends$1() {
50
- _extends$1 = Object.assign || function (target) {
51
- for (var i = 1; i < arguments.length; i++) {
52
- var source = arguments[i];
53
-
54
- for (var key in source) {
55
- if (Object.prototype.hasOwnProperty.call(source, key)) {
56
- target[key] = source[key];
57
- }
58
- }
59
- }
60
-
61
- return target;
62
- };
63
-
64
- return _extends$1.apply(this, arguments);
65
- }
66
- var ExitFullscreenIcon = (function (_ref) {
67
- var _ref$styles = _ref.styles,
68
- styles = _ref$styles === void 0 ? {} : _ref$styles,
69
- props = _objectWithoutProperties(_ref, ["styles"]);
70
-
71
- return /*#__PURE__*/React.createElement("svg", _extends$1({
72
- "aria-hidden": "true",
73
- "data-prefix": "fas",
74
- "data-icon": "compress",
75
- className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-compress"] || "fa-compress") + " " + (styles["fa-w-14"] || "fa-w-14"),
76
- xmlns: "http://www.w3.org/2000/svg",
77
- viewBox: "0 0 448 512"
78
- }, props), /*#__PURE__*/React.createElement("path", {
79
- fill: "currentColor",
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
- }));
82
- });
83
-
84
- var styles = {"button":"ToggleFullscreenButton-module_button__3iBr8 utils-module_unstyledButton__3rgne"};
85
-
86
- function ToggleFullscreenButton(props) {
87
- var _useI18n = useI18n(),
88
- t = _useI18n.t;
89
-
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));
99
- }
100
-
101
- function icon(props) {
102
- if (props.isFullscreen) {
103
- return /*#__PURE__*/React.createElement(ExitFullscreenIcon, null);
104
- } else {
105
- return /*#__PURE__*/React.createElement(EnterFullscreenIcon, null);
106
- }
107
- }
108
-
109
- var styles$1 = {"wrapper":"Fullscreen-module_wrapper__300hJ"};
16
+ var styles = {"wrapper":"Fullscreen-module_wrapper__300hJ"};
110
17
 
111
18
  function Fullscreen(_ref) {
112
19
  var isFullscreen = _ref.isFullscreen,
@@ -124,108 +31,74 @@ function Fullscreen(_ref) {
124
31
 
125
32
  if (isFullscreen) {
126
33
  return ReactDOM.createPortal( /*#__PURE__*/React.createElement("div", {
127
- className: styles$1.wrapper
34
+ className: styles.wrapper
128
35
  }, children), root);
129
36
  } else {
130
37
  return children;
131
38
  }
132
39
  }
133
40
 
134
- function _extends$2() {
135
- _extends$2 = Object.assign || function (target) {
136
- for (var i = 1; i < arguments.length; i++) {
137
- var source = arguments[i];
138
-
139
- for (var key in source) {
140
- if (Object.prototype.hasOwnProperty.call(source, key)) {
141
- target[key] = source[key];
142
- }
143
- }
144
- }
145
-
146
- return target;
147
- };
148
-
149
- return _extends$2.apply(this, arguments);
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
- 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"};
41
+ var styles$1 = {"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"};
169
42
 
170
43
  function PanoramaIndicator(_ref) {
171
44
  var visible = _ref.visible;
172
45
  var size = 40;
173
46
  return /*#__PURE__*/React.createElement("div", {
174
- className: classNames(styles$2.indicator, _defineProperty({}, styles$2.visible, visible))
47
+ className: classNames(styles$1.indicator, _defineProperty({}, styles$1.visible, visible))
175
48
  }, /*#__PURE__*/React.createElement("div", {
176
- className: styles$2.arrowLeft
49
+ className: styles$1.arrowLeft
177
50
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
178
51
  width: size,
179
52
  height: size
180
53
  }))), /*#__PURE__*/React.createElement("div", {
181
- className: styles$2.arrowRight
54
+ className: styles$1.arrowRight
182
55
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ArrowRightIcon, {
183
56
  width: size,
184
57
  height: size
185
58
  }))), /*#__PURE__*/React.createElement("div", {
186
- className: styles$2.text
59
+ className: styles$1.text
187
60
  }, "360\xB0"));
188
61
  }
189
62
 
190
- 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"};
63
+ var styles$2 = {"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"};
191
64
 
192
65
  function FullscreenIndicator(_ref) {
193
66
  var visible = _ref.visible,
194
67
  onClick = _ref.onClick;
195
68
  var size = 50;
196
69
  return /*#__PURE__*/React.createElement("div", {
197
- className: classNames(styles$3.indicator, _defineProperty({}, styles$3.visible, visible))
70
+ className: classNames(styles$2.indicator, _defineProperty({}, styles$2.visible, visible))
198
71
  }, /*#__PURE__*/React.createElement("div", {
199
- className: styles$3.icons
72
+ className: styles$2.icons
200
73
  }, /*#__PURE__*/React.createElement("div", {
201
- className: styles$3.iconTopLeft
74
+ className: styles$2.iconTopLeft
202
75
  }, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
203
76
  width: size,
204
77
  height: size
205
78
  })), /*#__PURE__*/React.createElement("div", {
206
- className: styles$3.iconTopRight
79
+ className: styles$2.iconTopRight
207
80
  }, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
208
81
  width: size,
209
82
  height: size
210
83
  })), /*#__PURE__*/React.createElement("div", {
211
- className: styles$3.iconBottomRight
84
+ className: styles$2.iconBottomRight
212
85
  }, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
213
86
  width: size,
214
87
  height: size
215
88
  })), /*#__PURE__*/React.createElement("div", {
216
- className: styles$3.iconBottomLeft
89
+ className: styles$2.iconBottomLeft
217
90
  }, /*#__PURE__*/React.createElement(ArrowLeftIcon, {
218
91
  width: size,
219
92
  height: size
220
93
  }))), /*#__PURE__*/React.createElement("div", {
221
- className: styles$3.text
94
+ className: styles$2.text
222
95
  }, "360\xB0"));
223
96
  }
224
97
 
225
- 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"};
98
+ var styles$3 = {"full":"Viewer-module_full__1q18y","container":"Viewer-module_container__3eJ34 Viewer-module_full__1q18y","spinner":"Viewer-module_spinner__2oRve","spin":"Viewer-module_spin__3jBR2","isLoading":"Viewer-module_isLoading__sQuGw"};
226
99
 
227
- function _extends$3() {
228
- _extends$3 = Object.assign || function (target) {
100
+ function _extends() {
101
+ _extends = Object.assign || function (target) {
229
102
  for (var i = 1; i < arguments.length; i++) {
230
103
  var source = arguments[i];
231
104
 
@@ -239,13 +112,13 @@ function _extends$3() {
239
112
  return target;
240
113
  };
241
114
 
242
- return _extends$3.apply(this, arguments);
115
+ return _extends.apply(this, arguments);
243
116
  }
244
117
  var SpinnerIcon = (function (_ref) {
245
118
  var _ref$styles = _ref.styles,
246
119
  props = _objectWithoutProperties(_ref, ["styles"]);
247
120
 
248
- return /*#__PURE__*/React.createElement("svg", _extends$3({
121
+ return /*#__PURE__*/React.createElement("svg", _extends({
249
122
  xmlns: "http://www.w3.org/2000/svg",
250
123
  fill: "none",
251
124
  viewBox: "0 0 24 24"
@@ -299,7 +172,7 @@ function Viewer(_ref) {
299
172
  function appendViewerTo(parentNode) {
300
173
  if (!elRef.current) {
301
174
  elRef.current = document.createElement('div');
302
- elRef.current.className = styles$4.full;
175
+ elRef.current.className = styles$3.full;
303
176
  viewerRef.current = new PanoViewer(elRef.current, {
304
177
  image: imageFile.urls.ultra,
305
178
  projectionType: imageFile.configuration.projection === 'equirectangular_stereo' ? PanoViewer.PROJECTION_TYPE.STEREOSCOPIC_EQUI : PanoViewer.PROJECTION_TYPE.EQUIRECTANGULAR,
@@ -424,25 +297,23 @@ function Viewer(_ref) {
424
297
  return /*#__PURE__*/React.createElement(Fullscreen, {
425
298
  isFullscreen: isFullscreen
426
299
  }, /*#__PURE__*/React.createElement("div", {
427
- className: styles$4.container,
300
+ className: styles$3.container,
428
301
  onKeyDown: preventDefaultForArrowUpDown,
429
302
  onClick: function onClick() {
430
303
  isPhonePlatform && enterFullscreen();
431
304
  }
432
305
  }, /*#__PURE__*/React.createElement(DOMNodeContainer, {
433
- className: styles$4.full,
306
+ className: styles$3.full,
434
307
  onUpdate: function onUpdate(el) {
435
308
  return appendViewerTo(el);
436
309
  }
437
310
  })), /*#__PURE__*/React.createElement(SpinnerIcon, {
438
- className: classNames(styles$4.spinner, _defineProperty({}, styles$4.isLoading, isLoading))
439
- }), (!isPhonePlatform || isFullscreen) && /*#__PURE__*/React.createElement("div", {
440
- className: styles$4.controls
441
- }, /*#__PURE__*/React.createElement(ToggleFullscreenButton, {
311
+ className: classNames(styles$3.spinner, _defineProperty({}, styles$3.isLoading, isLoading))
312
+ }), (!isPhonePlatform || isFullscreen) && /*#__PURE__*/React.createElement(ToggleFullscreenCornerButton, {
442
313
  isFullscreen: isFullscreen,
443
314
  onEnter: enterFullscreen,
444
315
  onExit: exitFullscreen
445
- })), /*#__PURE__*/React.createElement(PanoramaIndicator, {
316
+ }), /*#__PURE__*/React.createElement(PanoramaIndicator, {
446
317
  visible: !isLoading && !isPhonePlatform && !isFullscreen && !hidePanoramaIndicator
447
318
  }), /*#__PURE__*/React.createElement(FullscreenIndicator, {
448
319
  visible: !isLoading && isPhonePlatform && !isFullscreen
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { e as _objectWithoutProperties } from './i18n-71c39823.js';
3
+ import { P as PhonePlatformContext } from './PhonePlatformContext-b28d991a.js';
4
+
5
+ function usePhonePlatform() {
6
+ return React.useContext(PhonePlatformContext);
7
+ }
8
+
9
+ function _extends() {
10
+ _extends = Object.assign || function (target) {
11
+ for (var i = 1; i < arguments.length; i++) {
12
+ var source = arguments[i];
13
+
14
+ for (var key in source) {
15
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
16
+ target[key] = source[key];
17
+ }
18
+ }
19
+ }
20
+
21
+ return target;
22
+ };
23
+
24
+ return _extends.apply(this, arguments);
25
+ }
26
+ var ArrowLeftIcon = (function (_ref) {
27
+ var _ref$styles = _ref.styles,
28
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
29
+ props = _objectWithoutProperties(_ref, ["styles"]);
30
+
31
+ return /*#__PURE__*/React.createElement("svg", _extends({
32
+ xmlns: "http://www.w3.org/2000/svg",
33
+ className: (styles["h-5"] || "h-5") + " " + (styles["w-5"] || "w-5"),
34
+ viewBox: "0 0 20 20",
35
+ fill: "currentColor"
36
+ }, props), /*#__PURE__*/React.createElement("path", {
37
+ fillRule: "evenodd",
38
+ 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",
39
+ clipRule: "evenodd"
40
+ }));
41
+ });
42
+
43
+ function _extends$1() {
44
+ _extends$1 = Object.assign || function (target) {
45
+ for (var i = 1; i < arguments.length; i++) {
46
+ var source = arguments[i];
47
+
48
+ for (var key in source) {
49
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
50
+ target[key] = source[key];
51
+ }
52
+ }
53
+ }
54
+
55
+ return target;
56
+ };
57
+
58
+ return _extends$1.apply(this, arguments);
59
+ }
60
+ var ArrowRightIcon = (function (_ref) {
61
+ var _ref$styles = _ref.styles,
62
+ styles = _ref$styles === void 0 ? {} : _ref$styles,
63
+ props = _objectWithoutProperties(_ref, ["styles"]);
64
+
65
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
66
+ xmlns: "http://www.w3.org/2000/svg",
67
+ className: (styles["h-5"] || "h-5") + " " + (styles["w-5"] || "w-5"),
68
+ viewBox: "0 0 20 20",
69
+ fill: "currentColor"
70
+ }, props), /*#__PURE__*/React.createElement("path", {
71
+ fillRule: "evenodd",
72
+ 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",
73
+ clipRule: "evenodd"
74
+ }));
75
+ });
76
+
77
+ export { ArrowRightIcon as A, ArrowLeftIcon as a, usePhonePlatform as u };