pageflow 14.5.2 → 15.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -39
  3. data/admins/pageflow/membership.rb +1 -5
  4. data/app/assets/javascripts/pageflow/dist/react-client.js +62 -179
  5. data/app/assets/javascripts/pageflow/dist/react-server.js +62 -179
  6. data/app/assets/javascripts/pageflow/editor/api/widget_type.js +1 -0
  7. data/app/assets/javascripts/pageflow/editor/base.js +2 -2
  8. data/app/assets/javascripts/pageflow/editor/collections/files_collection.js +4 -0
  9. data/app/assets/javascripts/pageflow/editor/collections/nested_files_collection.js +4 -0
  10. data/app/assets/javascripts/pageflow/editor/initializers/setup_audio.js +1 -1
  11. data/app/assets/javascripts/pageflow/editor/models/encoded_file.js +1 -1
  12. data/app/assets/javascripts/pageflow/editor/models/image_file.js +1 -1
  13. data/app/assets/javascripts/pageflow/editor/models/mixins/transient_references.js +7 -7
  14. data/app/assets/javascripts/pageflow/editor/models/preview_entry_data.js +2 -2
  15. data/app/assets/javascripts/pageflow/editor/models/{uploaded_file.js → reusable_file.js} +1 -1
  16. data/app/assets/javascripts/pageflow/editor/models/text_track_file.js +2 -2
  17. data/app/assets/javascripts/pageflow/editor/models/{hosted_file.js → uploadable_file.js} +1 -1
  18. data/app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js +0 -3
  19. data/app/assets/stylesheets/pageflow/mixins/pageflow.scss +1 -1
  20. data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -1
  21. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss +50 -10
  22. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +0 -2
  23. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +0 -5
  24. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +0 -4
  25. data/app/controllers/pageflow/files_controller.rb +3 -3
  26. data/app/helpers/pageflow/audio_files_helper.rb +18 -16
  27. data/app/helpers/pageflow/background_image_helper.rb +22 -17
  28. data/app/helpers/pageflow/entry_json_seed_helper.rb +3 -3
  29. data/app/helpers/pageflow/file_thumbnails_helper.rb +1 -1
  30. data/app/helpers/pageflow/meta_tags_helper.rb +3 -3
  31. data/app/helpers/pageflow/pages_helper.rb +10 -1
  32. data/app/helpers/pageflow/revision_file_helper.rb +27 -0
  33. data/app/helpers/pageflow/social_share_helper.rb +5 -3
  34. data/app/helpers/pageflow/social_share_links_helper.rb +1 -1
  35. data/app/helpers/pageflow/video_files_helper.rb +18 -13
  36. data/app/jobs/pageflow/{process_file_job.rb → process_image_or_text_track_job.rb} +1 -1
  37. data/app/models/concerns/pageflow/{uploaded_file.rb → reusable_file.rb} +59 -5
  38. data/app/models/concerns/pageflow/{hosted_file.rb → uploadable_file.rb} +26 -15
  39. data/app/models/pageflow/audio_file.rb +2 -2
  40. data/app/models/pageflow/draft_entry.rb +1 -1
  41. data/app/models/pageflow/entry.rb +0 -8
  42. data/app/models/pageflow/file_usage.rb +3 -1
  43. data/app/models/pageflow/image_file.rb +31 -29
  44. data/app/models/pageflow/membership.rb +4 -3
  45. data/app/models/pageflow/page.rb +0 -8
  46. data/app/models/pageflow/positioned_file.rb +3 -2
  47. data/app/models/pageflow/published_entry.rb +9 -3
  48. data/app/models/pageflow/revision.rb +6 -12
  49. data/app/models/pageflow/text_track_file.rb +13 -12
  50. data/app/models/pageflow/thumbnail_file_resolver.rb +3 -3
  51. data/app/models/pageflow/used_file.rb +4 -0
  52. data/app/models/pageflow/video_file.rb +2 -2
  53. data/app/models/pageflow/widget.rb +6 -12
  54. data/app/state_machines/pageflow/{processed_file_state_machine.rb → image_and_text_track_processing_state_machine.rb} +3 -2
  55. data/app/state_machines/pageflow/{encoded_file_state_machine.rb → media_encoding_state_machine.rb} +27 -19
  56. data/app/views/pageflow/editor/files/_file.json.jbuilder +1 -1
  57. data/app/views/pageflow/entries/mobile_navigation/_page.html.erb +1 -1
  58. data/app/views/pageflow/entries/navigation/_page.html.erb +2 -2
  59. data/app/views/pageflow/entries/overview/_page.html.erb +1 -1
  60. data/app/views/pageflow/files/_file.json.jbuilder +1 -0
  61. data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
  62. data/config/locales/de.yml +0 -24
  63. data/config/locales/en.yml +0 -24
  64. data/db/migrate/20190306161431_copy_file_attributes_of_failed_uploads.rb +4 -4
  65. data/db/migrate/20190523151140_add_perma_id_to_file_usages.rb +13 -0
  66. data/lib/pageflow/built_in_widget_type.rb +0 -7
  67. data/lib/pageflow/built_in_widget_types_plugin.rb +0 -6
  68. data/lib/pageflow/user_mixin.rb +0 -6
  69. data/lib/pageflow/version.rb +1 -1
  70. data/lib/pageflow/widget_types.rb +1 -9
  71. data/spec/factories/{hosted_files.rb → uploadable_files.rb} +3 -3
  72. metadata +16 -32
  73. data/app/assets/javascripts/pageflow/dist/editor.js +0 -11890
  74. data/app/assets/javascripts/pageflow/dist/frontend.js +0 -5800
  75. data/app/assets/javascripts/pageflow/dist/ui.js +0 -3114
  76. data/app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js +0 -18
  77. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss +0 -56
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 033f4a8249a6495f4efd89da77551f81f4c2ebc9d52239b556a1bbe8fd5ffc5b
4
- data.tar.gz: 7acc4e48d957b31061fe32b5cbc089c446b8b77cfeeecb0524f124bb84625225
3
+ metadata.gz: 5feb7019e9f96f81e5a8e469ad88fdfd96cd1c9a5ced86b41c5e2f6ee6f1f513
4
+ data.tar.gz: 1f031ca982c495df641f3ddf97a72fafadcb51134075043c987048dbc147a81f
5
5
  SHA512:
6
- metadata.gz: aa80c8bff2c29709f64238ded3af623132485aee9b67f30fd90392b2b48015985d52f951bad79f93f546a6cf81505f3560702dd6c53f76def9a82687652cc0f3
7
- data.tar.gz: 01c0d4e10ae16e0ecea6d489b1ab3ffa98fa6a8d8ff534cefe83677c9e63bfb891fd0f8f36d9274aae2a4a770808ce3b91fdd9fcb79b06f8444eb3a048ad938c
6
+ metadata.gz: d1c2e4aed4664e290da0c82c9399a68f35d7ed1a53cfbfa2dabb1f82ffad96f58a7b3a45ccaa4768405ff81a227e4147298955fcf2957f73e687037f277c22c4
7
+ data.tar.gz: c7cb6b5d037cf93b22046b426ce4ab6e97930a8a3c797ec2873c486a9901f9e684db4a1fffa9a6c88cbf2f26dd2fc3b1b28a49159fec0dbf2d8893febb3d7f32
data/CHANGELOG.md CHANGED
@@ -1,44 +1,49 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 14.5.2
4
-
5
- 2022-09-14
6
-
7
- [Compare changes](https://github.com/codevise/pageflow/compare/v14.5.1...v14.5.2)
8
-
9
- ##### Security
10
-
11
- - Fix
12
- [GHSA-qcqv-38jg-2r43](https://github.com/codevise/pageflow/security/advisories/GHSA-qcqv-38jg-2r43):
13
- Insecure direct object reference in membership update endpoint
14
- ([#1862](https://github.com/codevise/pageflow/pull/1862))
15
- - Fix
16
- [GHSA-wrrw-crp8-979q](https://github.com/codevise/pageflow/security/advisories/GHSA-wrrw-crp8-979q):
17
- Sensitive user data extraction via Ransack query injection
18
- ([#1862](https://github.com/codevise/pageflow/pull/1862))
19
-
20
- ### Version 14.5.1
21
-
22
- 2019-10-31
23
-
24
- [Compare changes](https://github.com/codevise/pageflow/compare/v14.5.0...v14.5.1)
25
-
26
- - Require Sprockets < 4 (14.x Backport)
27
- ([#1235](https://github.com/codevise/pageflow/pull/1235))
28
-
29
- ### Version 14.5.0
30
-
31
- 2019-10-31
32
-
33
- [Compare changes](https://github.com/codevise/pageflow/compare/14-4-stable...v14.5.0)
34
-
35
- - Info box pointer-events enabled for anchor tag
36
- ([#1213](https://github.com/codevise/pageflow/pull/1213))
37
- - Update Twitter share URL
38
- ([#1204](https://github.com/codevise/pageflow/pull/1204))
39
- - Configurable loading spinner
40
- ([#1186](https://github.com/codevise/pageflow/pull/1186))
3
+ ### Version 15.0.0.beta1
4
+
5
+ 2019-07-31
6
+
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/14-x-stable...v15.0.0.beta1)
8
+
9
+ #### Manual Update Steps
10
+
11
+ - Refactor file modules
12
+ ([#1180](https://github.com/codevise/pageflow/pull/1180))
13
+
14
+ This version includes various refactorings and class renamings.
15
+ If you include any of the files or modules below, you need to update your code accordingly.
16
+
17
+ ##### File modules:
18
+ HostedFile => UploadableFile (concerning uploading of files)\
19
+ UploadedFile => ReusableFile (concerning usage of files)
20
+
21
+ ##### StateMachines:
22
+ ProcessedFileStateMachine => ImageAndTextTrackProcessingStateMachine\
23
+ EncodedFileStateMachine => MediaEncodingStateMachine
24
+
25
+ ##### StateMachineJobs:
26
+ ProcessFileJob => ProcessImageOrTextTrackJob
27
+
28
+ - Introduce PermaId on FileUsage, change file lookup to PermaId throughout Pageflow codebase.
29
+ ([#1179](https://github.com/codevise/pageflow/pull/1179))
30
+
31
+ File lookup is now done via the `perma_id` of the files usage within the revisions scope.
32
+ Therefore it is strongly advised to change file lookup to the new RevisionFileHelper:
33
+
34
+ I.e.
35
+ ```
36
+ Pageflow::Imagefile.find(some_id)
37
+ ```
38
+ will become
39
+ ```
40
+ include RevisionFileHelper
41
+ [...]
42
+ find_file_in_entry(Pageflow::Imagefile, image_file_usage_perma_id)
43
+ ```
44
+
45
+ Also see migration inside the PR.
41
46
 
42
47
  See
43
- [14-4-stable branch](https://github.com/codevise/pageflow/blob/14-4-stable/CHANGELOG.md)
48
+ [14-x-stable branch](https://github.com/codevise/pageflow/blob/14-x-stable/CHANGELOG.md)
44
49
  for previous changes.
@@ -100,11 +100,7 @@ module Pageflow
100
100
  private
101
101
 
102
102
  def permitted_params
103
- if [:create, :new].include?(action_name.to_sym)
104
- params.permit(membership: [:user_id, :entity_id, :entity_type, :role])
105
- else
106
- params.permit(membership: [:role])
107
- end
103
+ params.permit(membership: [:user_id, :entity_id, :entity_type, :role])
108
104
  end
109
105
 
110
106
  def redirect_path
@@ -8960,7 +8960,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
8960
8960
 
8961
8961
  var _loadingSpinner = __webpack_require__(619);
8962
8962
 
8963
- var _pageflow = __webpack_require__(623);
8963
+ var _pageflow = __webpack_require__(622);
8964
8964
 
8965
8965
  var _pageflow2 = _interopRequireDefault(_pageflow);
8966
8966
 
@@ -12016,7 +12016,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
12016
12016
  });
12017
12017
  exports.firstPage = exports.selector = exports.pageBackgroundImageUrl = undefined;
12018
12018
  exports.firstPageAttribures = firstPageAttribures;
12019
- exports.firstPageAttribute = firstPageAttribute;
12020
12019
  exports.pageAttribute = pageAttribute;
12021
12020
  exports.pageAttributes = pageAttributes;
12022
12021
  exports.pageState = pageState;
@@ -12046,12 +12045,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
12046
12045
  });
12047
12046
  }
12048
12047
 
12049
- function firstPageAttribute(property) {
12050
- return (0, _utils.memoizedSelector)(firstPage, function (page) {
12051
- return page && page.attributes[property];
12052
- });
12053
- }
12054
-
12055
12048
  function pageAttribute(property, options) {
12056
12049
  return (0, _utils.memoizedSelector)(selector(options), function (page) {
12057
12050
  return page && page.attributes[property];
@@ -24287,7 +24280,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
24287
24280
  function autoTextTrackFile(textTrackFiles, defaultTextTrackFileId, locale, volume) {
24288
24281
  if (defaultTextTrackFileId) {
24289
24282
  var defaultTextTrackFile = textTrackFiles.find(function (textTrackFile) {
24290
- return textTrackFile.id == defaultTextTrackFileId;
24283
+ return textTrackFile.permaId == defaultTextTrackFileId;
24291
24284
  });
24292
24285
 
24293
24286
  if (defaultTextTrackFile) {
@@ -29932,7 +29925,8 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
29932
29925
  collectionName: (0, _utils.camelize)(collectionName),
29933
29926
  dispatch: dispatch,
29934
29927
 
29935
- attributes: ['id', 'basename', 'variants', 'is_ready', 'parent_file_id', 'parent_file_model_type', 'width', 'height', 'duration_in_ms', 'rights', 'created_at'],
29928
+ idAttribute: 'perma_id',
29929
+ attributes: ['id', 'perma_id', 'basename', 'variants', 'is_ready', 'parent_file_id', 'parent_file_model_type', 'width', 'height', 'duration_in_ms', 'rights', 'created_at'],
29936
29930
  includeConfiguration: true
29937
29931
  });
29938
29932
  });
@@ -29950,7 +29944,9 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
29950
29944
  return {
29951
29945
  files: (0, _redux.combineReducers)(Object.keys(files).reduce(function (result, collectionName) {
29952
29946
  collectionName = (0, _utils.camelize)(collectionName);
29953
- result[collectionName] = (0, _collections.createReducer)(collectionName);
29947
+ result[collectionName] = (0, _collections.createReducer)(collectionName, {
29948
+ idAttribute: 'permaId'
29949
+ });
29954
29950
  return result;
29955
29951
  }, {})),
29956
29952
 
@@ -31086,14 +31082,11 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31086
31082
 
31087
31083
  var _ClassicLoadingSpinner = __webpack_require__(620);
31088
31084
 
31089
- var _MediaLoadingSpinner = __webpack_require__(621);
31090
-
31091
- var _TitleLoadingSpinner = __webpack_require__(622);
31085
+ var _TitleLoadingSpinner = __webpack_require__(621);
31092
31086
 
31093
31087
  function registerWidgetTypes() {
31094
31088
  (0, _ClassicLoadingSpinner.register)();
31095
31089
  (0, _TitleLoadingSpinner.register)();
31096
- (0, _MediaLoadingSpinner.register)();
31097
31090
  }
31098
31091
 
31099
31092
  /***/ }),
@@ -31243,11 +31236,9 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31243
31236
  Object.defineProperty(exports, "__esModule", {
31244
31237
  value: true
31245
31238
  });
31246
- exports.MediaLoadingSpinner = exports.MediaLoadingSpinnerComponent = undefined;
31247
31239
 
31248
31240
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
31249
31241
 
31250
- exports.getInvert = getInvert;
31251
31242
  exports.register = register;
31252
31243
 
31253
31244
  var _utils = __webpack_require__(340);
@@ -31282,13 +31273,13 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31282
31273
 
31283
31274
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
31284
31275
 
31285
- var MediaLoadingSpinnerComponent = exports.MediaLoadingSpinnerComponent = function (_React$Component) {
31286
- _inherits(MediaLoadingSpinnerComponent, _React$Component);
31276
+ var TitleLoadingSpinner = function (_React$Component) {
31277
+ _inherits(TitleLoadingSpinner, _React$Component);
31287
31278
 
31288
- function MediaLoadingSpinnerComponent(props) {
31289
- _classCallCheck(this, MediaLoadingSpinnerComponent);
31279
+ function TitleLoadingSpinner(props) {
31280
+ _classCallCheck(this, TitleLoadingSpinner);
31290
31281
 
31291
- var _this = _possibleConstructorReturn(this, (MediaLoadingSpinnerComponent.__proto__ || Object.getPrototypeOf(MediaLoadingSpinnerComponent)).call(this, props));
31282
+ var _this = _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).call(this, props));
31292
31283
 
31293
31284
  _this.state = {
31294
31285
  hidden: false,
@@ -31297,7 +31288,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31297
31288
  return _this;
31298
31289
  }
31299
31290
 
31300
- _createClass(MediaLoadingSpinnerComponent, [{
31291
+ _createClass(TitleLoadingSpinner, [{
31301
31292
  key: 'componentDidMount',
31302
31293
  value: function componentDidMount() {
31303
31294
  var _this2 = this;
@@ -31338,29 +31329,42 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31338
31329
  value: function render() {
31339
31330
  var _this4 = this;
31340
31331
 
31341
- var editing = this.props.editing;
31332
+ var _props = this.props,
31333
+ editing = _props.editing,
31334
+ title = _props.title,
31335
+ subtitle = _props.subtitle,
31336
+ entryTitle = _props.entryTitle;
31342
31337
  var _state = this.state,
31343
31338
  hidden = _state.hidden,
31344
31339
  animating = _state.animating;
31345
31340
 
31346
- var invert = getInvert(this.props);
31347
- var logoElement = _react2.default.createElement('div', { className: (0, _classnames2.default)("media_loading_spinner-logo", { 'media_loading_spinner-logo-invert': invert }) });
31348
- if (this.props.removeLogo) {
31349
- logoElement = '';
31350
- }
31341
+
31351
31342
  if (editing || !hidden) {
31352
31343
  return _react2.default.createElement(
31353
31344
  'div',
31354
- { className: (0, _classnames2.default)('media_loading_spinner', { 'media_loading_spinner-fade': animating }, { 'media_loading_spinner-invert': invert }),
31345
+ { className: (0, _classnames2.default)('title_loading_spinner', { 'title_loading_spinner-fade': animating }),
31355
31346
  onAnimationEnd: function onAnimationEnd(event) {
31356
31347
  return _this4.hideOrLoop(event);
31357
31348
  },
31358
31349
  onTouchMove: preventScrollBouncing,
31359
- style: inlineStyle(this.props) },
31360
- logoElement,
31361
- _react2.default.createElement('div', { className: 'media_loading_spinner-image',
31350
+ style: inlineStyle() },
31351
+ _react2.default.createElement('div', { className: 'title_loading_spinner-logo' }),
31352
+ _react2.default.createElement('div', { className: 'title_loading_spinner-image',
31362
31353
  style: backgroundImageInlineStyles(this.props) }),
31363
- this.props.children
31354
+ _react2.default.createElement(
31355
+ 'div',
31356
+ { className: 'title_loading_spinner-titles' },
31357
+ _react2.default.createElement(
31358
+ 'div',
31359
+ { className: 'title_loading_spinner-title' },
31360
+ title || entryTitle
31361
+ ),
31362
+ _react2.default.createElement(
31363
+ 'div',
31364
+ { className: 'title_loading_spinner-subtitle' },
31365
+ subtitle
31366
+ )
31367
+ )
31364
31368
  );
31365
31369
  } else {
31366
31370
  return _react2.default.createElement('noscript', null);
@@ -31368,36 +31372,10 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31368
31372
  }
31369
31373
  }]);
31370
31374
 
31371
- return MediaLoadingSpinnerComponent;
31375
+ return TitleLoadingSpinner;
31372
31376
  }(_react2.default.Component);
31373
31377
 
31374
- function preventScrollBouncing(e) {
31375
- e.preventDefault();
31376
- }
31377
-
31378
- function backgroundImageInlineStyles(_ref) {
31379
- var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31380
- backgroundImage = _ref.backgroundImage,
31381
- blurStrength = _ref.blurStrength;
31382
-
31383
- var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31384
- if (url) {
31385
- return {
31386
- backgroundImage: 'url("' + url + '")',
31387
- filter: 'blur(' + blurStrength + 'px)'
31388
- };
31389
- }
31390
- }
31391
-
31392
- function getInvert(props) {
31393
- if (!props.backgroundImage && props.invert == undefined) {
31394
- return props.firstPageInvert;
31395
- }
31396
- return props.invert;
31397
- }
31398
-
31399
- function inlineStyle(props) {
31400
- var invert = getInvert(props);
31378
+ function inlineStyle() {
31401
31379
  return {
31402
31380
  position: 'absolute',
31403
31381
  top: 0,
@@ -31405,144 +31383,49 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31405
31383
  width: '100%',
31406
31384
  height: '100%',
31407
31385
  zIndex: 100,
31408
- backgroundColor: invert ? '#fff' : '#000'
31386
+ backgroundColor: '#000'
31409
31387
  };
31410
31388
  }
31411
31389
 
31412
- var MediaLoadingSpinner = exports.MediaLoadingSpinner = (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31413
- editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31414
- firstPageInvert: (0, _selectors4.firstPageAttribute)('invert'),
31415
- firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31416
- variant: 'medium',
31417
- page: (0, _selectors4.firstPageAttribures)()
31418
- }),
31419
- backgroundImage: (0, _selectors3.file)('imageFiles', {
31420
- id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31421
- role: 'loading_spinner'
31422
- })
31423
- }),
31424
- invert: (0, _selectors2.widgetAttribute)('invert', { role: 'loading_spinner' }),
31425
- removeLogo: (0, _selectors2.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31426
- blurStrength: (0, _selectors2.widgetAttribute)('blurStrength', { role: 'loading_spinner' })
31427
- }))(MediaLoadingSpinnerComponent);
31428
-
31429
- function register() {
31430
- (0, _registerWidgetType2.default)('media_loading_spinner', {
31431
- component: MediaLoadingSpinner
31432
- });
31433
- }
31434
-
31435
- /***/ }),
31436
- /* 622 */
31437
- /***/ (function(module, exports, __webpack_require__) {
31438
-
31439
- 'use strict';
31440
-
31441
- Object.defineProperty(exports, "__esModule", {
31442
- value: true
31443
- });
31444
- exports.TitleLoadingSpinner = undefined;
31445
-
31446
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
31447
-
31448
- exports.register = register;
31449
-
31450
- var _utils = __webpack_require__(340);
31451
-
31452
- var _react = __webpack_require__(334);
31453
-
31454
- var _react2 = _interopRequireDefault(_react);
31455
-
31456
- var _reactRedux = __webpack_require__(399);
31457
-
31458
- var _classnames = __webpack_require__(335);
31459
-
31460
- var _classnames2 = _interopRequireDefault(_classnames);
31461
-
31462
- var _registerWidgetType = __webpack_require__(565);
31463
-
31464
- var _registerWidgetType2 = _interopRequireDefault(_registerWidgetType);
31465
-
31466
- var _selectors = __webpack_require__(503);
31467
-
31468
- var _selectors2 = __webpack_require__(376);
31469
-
31470
- var _selectors3 = __webpack_require__(429);
31471
-
31472
- var _selectors4 = __webpack_require__(494);
31473
-
31474
- var _MediaLoadingSpinner = __webpack_require__(621);
31475
-
31476
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31477
-
31478
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31479
-
31480
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
31481
-
31482
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
31483
-
31484
- var TitleLoadingSpinner = exports.TitleLoadingSpinner = function (_React$Component) {
31485
- _inherits(TitleLoadingSpinner, _React$Component);
31390
+ function backgroundImageInlineStyles(_ref) {
31391
+ var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31392
+ backgroundImage = _ref.backgroundImage;
31486
31393
 
31487
- function TitleLoadingSpinner() {
31488
- _classCallCheck(this, TitleLoadingSpinner);
31394
+ var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31489
31395
 
31490
- return _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).apply(this, arguments));
31396
+ if (url) {
31397
+ return {
31398
+ backgroundImage: 'url("' + url + '")'
31399
+ };
31491
31400
  }
31401
+ }
31492
31402
 
31493
- _createClass(TitleLoadingSpinner, [{
31494
- key: 'render',
31495
- value: function render() {
31496
- var _props = this.props,
31497
- title = _props.title,
31498
- subtitle = _props.subtitle,
31499
- entryTitle = _props.entryTitle;
31500
-
31501
- var invert = (0, _MediaLoadingSpinner.getInvert)(this.props);
31502
- return _react2.default.createElement(
31503
- _MediaLoadingSpinner.MediaLoadingSpinner,
31504
- null,
31505
- _react2.default.createElement(
31506
- 'div',
31507
- { className: (0, _classnames2.default)('media_loading_spinner-titles', { 'media_loading_spinner-invert': invert }) },
31508
- _react2.default.createElement(
31509
- 'div',
31510
- { className: 'media_loading_spinner-title' },
31511
- title || entryTitle
31512
- ),
31513
- _react2.default.createElement(
31514
- 'div',
31515
- { className: 'media_loading_spinner-subtitle' },
31516
- subtitle
31517
- )
31518
- )
31519
- );
31520
- }
31521
- }]);
31522
-
31523
- return TitleLoadingSpinner;
31524
- }(_react2.default.Component);
31403
+ function preventScrollBouncing(e) {
31404
+ e.preventDefault();
31405
+ }
31525
31406
 
31526
31407
  function register() {
31527
31408
  (0, _registerWidgetType2.default)('title_loading_spinner', {
31528
31409
  component: (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31529
- firstPageInvert: (0, _selectors2.firstPageAttribute)('invert'),
31410
+ editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31411
+ firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31412
+ variant: 'medium',
31413
+ page: (0, _selectors4.firstPageAttribures)()
31414
+ }),
31530
31415
  backgroundImage: (0, _selectors3.file)('imageFiles', {
31531
- id: (0, _selectors4.widgetAttribute)('customBackgroundImageId', {
31416
+ id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31532
31417
  role: 'loading_spinner'
31533
31418
  })
31534
31419
  }),
31535
31420
  entryTitle: (0, _selectors.entryAttribute)('title'),
31536
- title: (0, _selectors4.widgetAttribute)('title', { role: 'loading_spinner' }),
31537
- subtitle: (0, _selectors4.widgetAttribute)('subtitle', { role: 'loading_spinner' }),
31538
- removeLogo: (0, _selectors4.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31539
- invert: (0, _selectors4.widgetAttribute)('invert', { role: 'loading_spinner' })
31421
+ title: (0, _selectors2.widgetAttribute)('title', { role: 'loading_spinner' }),
31422
+ subtitle: (0, _selectors2.widgetAttribute)('subtitle', { role: 'loading_spinner' })
31540
31423
  }))(TitleLoadingSpinner)
31541
31424
  });
31542
31425
  }
31543
31426
 
31544
31427
  /***/ }),
31545
- /* 623 */
31428
+ /* 622 */
31546
31429
  /***/ (function(module, exports) {
31547
31430
 
31548
31431
  module.exports = pageflow;