pageflow 15.0.0.beta2 → 15.0.0.beta3

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +105 -2
  3. data/README.md +5 -1
  4. data/app/assets/javascripts/pageflow/dist/react-client.js +176 -56
  5. data/app/assets/javascripts/pageflow/dist/react-server.js +176 -56
  6. data/app/assets/javascripts/pageflow/editor/api/widget_type.js +0 -1
  7. data/app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js +18 -0
  8. data/app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js +3 -0
  9. data/app/assets/javascripts/pageflow/ui/views/tabs_view.js +2 -1
  10. data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -1
  11. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +37 -1
  12. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss +56 -0
  13. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss +10 -50
  14. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +10 -1
  15. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +5 -0
  16. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +4 -0
  17. data/app/controllers/pageflow/editor/files_controller.rb +6 -3
  18. data/app/helpers/pageflow/meta_tags_helper.rb +3 -3
  19. data/app/helpers/pageflow/social_share_links_helper.rb +1 -1
  20. data/app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb +41 -0
  21. data/app/models/concerns/pageflow/reusable_file.rb +6 -0
  22. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  23. data/app/models/pageflow/draft_entry.rb +26 -2
  24. data/app/models/pageflow/membership.rb +3 -4
  25. data/app/models/pageflow/revision.rb +20 -4
  26. data/app/models/pageflow/widget.rb +12 -6
  27. data/config/locales/de.yml +24 -0
  28. data/config/locales/en.yml +24 -0
  29. data/db/migrate/20140418225525_setup_schema.rb +18 -18
  30. data/db/migrate/20190820152900_drop_accounts_themes.rb +8 -0
  31. data/lib/pageflow/built_in_page_type.rb +3 -0
  32. data/lib/pageflow/built_in_widget_type.rb +7 -0
  33. data/lib/pageflow/built_in_widget_types_plugin.rb +6 -0
  34. data/lib/pageflow/entry_export_import.rb +43 -0
  35. data/lib/pageflow/entry_export_import/attachment_files.rb +65 -0
  36. data/lib/pageflow/entry_export_import/entry_serialization.rb +68 -0
  37. data/lib/pageflow/entry_export_import/file_mappings.rb +32 -0
  38. data/lib/pageflow/entry_export_import/page_type_versions.rb +29 -0
  39. data/lib/pageflow/entry_export_import/revision_serialization.rb +58 -0
  40. data/lib/pageflow/entry_export_import/revision_serialization/import.rb +158 -0
  41. data/lib/pageflow/entry_export_import/zip_archive.rb +36 -0
  42. data/lib/pageflow/file_type.rb +17 -4
  43. data/lib/pageflow/page_type.rb +20 -0
  44. data/lib/pageflow/page_types.rb +8 -0
  45. data/lib/pageflow/react/page_type.rb +10 -0
  46. data/lib/pageflow/version.rb +1 -1
  47. data/lib/pageflow/widget_types.rb +9 -1
  48. data/lib/tasks/entry_export_import.rake +27 -0
  49. data/spec/factories/revisions.rb +6 -0
  50. data/spec/factories/test_multi_attachment_files.rb +16 -0
  51. data/spec/factories/test_revision_components.rb +7 -0
  52. metadata +46 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5219177ac3ed7d7f1727e3f669cc687d160a63942e34c89d1e3aee7f9beff9ce
4
- data.tar.gz: c54857b1b2dc21afb8543ddc35a2b5d9ffdfd3df68ceeb9c553762584c47f5e2
3
+ metadata.gz: 3fa3471d4148c01ab6b96a880b7eae57b18ca56dbcdebc7f8515ce800ac36cac
4
+ data.tar.gz: 3c1c8e322b4c5a978169d7e71990c597d7f5e9ca043cd1a23f6e85fc395cda27
5
5
  SHA512:
6
- metadata.gz: 3a5eb4cfadae67dd795a2fb151c95135202aa22a024710b8f6e287fd9afd028f5aa16e2e1549ae3b4c2f47bf1e7a86931dcfc4d1ba347569432f63ecc85eb7c3
7
- data.tar.gz: 9bb8fcff78f53f24d64bb00507fa2a5b485f1445c29c031326fdd0fc3e789dd506b4d72019042fc02d488cc372c7ae0e793b0a16cb720246f6d77c81244c7982
6
+ metadata.gz: 43de860f0f5856811fe417d7906850dda042c0f9eebc9ea3d54dd531f8bad7fe813bb52afae100c1312d95aabef06673fb48b40923a4d10d7683c09a34036cb3
7
+ data.tar.gz: 8b0369b3f01d070bbe9fcef46199190c8f900d3d03bb3182f4e55cfc573b18bb3a39fcb682168266326134d664c85f467132de155a4fe702fca8b9eefe7b2758
@@ -1,17 +1,120 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### Version 15.0.0.beta3
4
+
5
+ 2019-10-24
6
+
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/14-x-stable...v15.0.0.beta3)
8
+
9
+ #### Breaking Changes
10
+
11
+ - Entry export/import
12
+ ([#1219](https://github.com/codevise/pageflow/pull/1219))
13
+
14
+ File types need to be updated to integrate correctly with the new
15
+ entry export/import feature. Check the updated
16
+ ["Creating File Types" guide](https://github.com/codevise/pageflow/blob/master/doc/creating_file_types.md)
17
+ for details.
18
+
19
+ #### Published Entries
20
+
21
+ - Info box pointer-events enabled for anchor tag
22
+ ([#1214](https://github.com/codevise/pageflow/pull/1214))
23
+ - More options for title loading spinner
24
+ ([#1215](https://github.com/codevise/pageflow/pull/1215))
25
+ - Theme options for logo and loading spinner
26
+ ([#1216](https://github.com/codevise/pageflow/pull/1216))
27
+
28
+ #### Editor
29
+
30
+ - Make tabs in mobile editor touchable
31
+ ([#1212](https://github.com/codevise/pageflow/pull/1212))
32
+
33
+ #### Rails Engine
34
+
35
+ - Require Sprockets < 4
36
+ ([#1217](https://github.com/codevise/pageflow/pull/1217))
37
+ - Drop pageflow_accounts_themes table
38
+ ([#1205](https://github.com/codevise/pageflow/pull/1205))
39
+ - Bug fix: fix entry membership create error
40
+ ([#1196](https://github.com/codevise/pageflow/pull/1196))
41
+ - Bug fix: fix missing analytics interpolator variables
42
+ ([#1192](https://github.com/codevise/pageflow/pull/1192))
43
+
3
44
  ### Version 15.0.0.beta2
4
45
 
5
46
  2019-08-01
6
47
 
7
- [Compare changes](https://github.com/codevise/pageflow/compare/14-x-stable...v15.0.0.beta2)
48
+ [Compare changes](https://github.com/codevise/pageflow/compare/v15.0.0.beta1...v15.0.0.beta2)
8
49
 
9
50
  - Move UsedFileTestHelper to support directory
10
51
  in order to make it available in Plugins.
11
52
  Require it in spec_helper to keep it available in Pageflow itself.
12
-
13
53
  ([#1194](https://github.com/codevise/pageflow/pull/1194))
14
54
 
55
+ - Remove default charset utf8mb3. This is motivated by the popularity
56
+ of emoji, which utf8mb3 doesn't support. Note that from Rails 6
57
+ onwards, for MySQL utf8mb4 is also the default [1]. For existing
58
+ Pageflow instances, especially when using MySQL 5.5 or 5.6, a switch
59
+ to utf8mb4 might work better after setting INNODB_LARGE_PREFIX and
60
+ making related changes towards allowing a longer index key prefix
61
+ [2], which in those versions isn't yet the default. For new
62
+ installations, MySQL 5.7 is preferable to older versions, because,
63
+ from a Rails perspective, it has 4-byte-character-friendlier default
64
+ settings. Also see MySQL's official guide on converting between
65
+ 3-byte and 4-byte character sets [3].
66
+ ([#1210](https://github.com/codevise/pageflow/pull/1194))
67
+
68
+ [1] https://github.com/rails/rails/pull/33608
69
+
70
+ [2] https://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_large_prefix
71
+
72
+ [3] https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-conversion.html
73
+
74
+ ### Version 15.0.0.beta1
75
+
76
+ 2019-07-31
77
+
78
+ [Compare changes](https://github.com/codevise/pageflow/compare/14-x-stable...v15.0.0.beta1)
79
+
80
+ #### Breaking Changes
81
+
82
+ - Refactor file modules
83
+ ([#1180](https://github.com/codevise/pageflow/pull/1180))
84
+
85
+ This version includes various refactorings and class renamings.
86
+ If you include any of the files or modules below, you need to update your code accordingly.
87
+
88
+ ##### File modules:
89
+ HostedFile => UploadableFile (concerning uploading of files)\
90
+ UploadedFile => ReusableFile (concerning usage of files)
91
+
92
+ ##### StateMachines:
93
+ ProcessedFileStateMachine => ImageAndTextTrackProcessingStateMachine\
94
+ EncodedFileStateMachine => MediaEncodingStateMachine
95
+
96
+ ##### StateMachineJobs:
97
+ ProcessFileJob => ProcessImageOrTextTrackJob
98
+
99
+ - Introduce PermaId on FileUsage, change file lookup to PermaId throughout Pageflow codebase.
100
+ ([#1179](https://github.com/codevise/pageflow/pull/1179))
101
+
102
+ File lookup is now done via the `perma_id` of the files usage within the revisions scope.
103
+ Therefore it is strongly advised to change file lookup to the new RevisionFileHelper:
104
+
105
+ I.e.
106
+ ```
107
+ Pageflow::Imagefile.find(some_id)
108
+ ```
109
+ has to become
110
+ ```
111
+ include RevisionFileHelper
112
+ [...]
113
+ find_file_in_entry(Pageflow::Imagefile, image_file_usage_perma_id)
114
+ ```
115
+
116
+ Also see migration inside the PR.
117
+
15
118
  See
16
119
  [14-x-stable branch](https://github.com/codevise/pageflow/blob/14-x-stable/CHANGELOG.md)
17
120
  for previous changes.
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Code Climate](https://codeclimate.com/github/codevise/pageflow/badges/gpa.svg)](https://codeclimate.com/github/codevise/pageflow)
7
7
  [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
8
8
 
9
- Multimedia storytelling for the web.
9
+ Multimedia storytelling for the web. Built in cooperation with [WDR](https://wdr.de).
10
10
 
11
11
  For a high level introduction and example Pageflow stories see
12
12
  [pageflow.io](https://pageflow.io).
@@ -208,6 +208,10 @@ The gem is available as open source under the terms of the
208
208
 
209
209
  ## Special Thanks
210
210
 
211
+ Built in cooperation with:
212
+
213
+ [![WDR](doc/supporter_logos/wdr.png)](https://wdr.de)
214
+
211
215
  We would like to express our special thanks to the following services
212
216
  for supporting Pageflow through free open source plans:
213
217
 
@@ -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__(622);
8963
+ var _pageflow = __webpack_require__(623);
8964
8964
 
8965
8965
  var _pageflow2 = _interopRequireDefault(_pageflow);
8966
8966
 
@@ -12016,6 +12016,7 @@ 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;
12019
12020
  exports.pageAttribute = pageAttribute;
12020
12021
  exports.pageAttributes = pageAttributes;
12021
12022
  exports.pageState = pageState;
@@ -12045,6 +12046,12 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
12045
12046
  });
12046
12047
  }
12047
12048
 
12049
+ function firstPageAttribute(property) {
12050
+ return (0, _utils.memoizedSelector)(firstPage, function (page) {
12051
+ return page && page.attributes[property];
12052
+ });
12053
+ }
12054
+
12048
12055
  function pageAttribute(property, options) {
12049
12056
  return (0, _utils.memoizedSelector)(selector(options), function (page) {
12050
12057
  return page && page.attributes[property];
@@ -31082,11 +31089,14 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31082
31089
 
31083
31090
  var _ClassicLoadingSpinner = __webpack_require__(620);
31084
31091
 
31085
- var _TitleLoadingSpinner = __webpack_require__(621);
31092
+ var _MediaLoadingSpinner = __webpack_require__(621);
31093
+
31094
+ var _TitleLoadingSpinner = __webpack_require__(622);
31086
31095
 
31087
31096
  function registerWidgetTypes() {
31088
31097
  (0, _ClassicLoadingSpinner.register)();
31089
31098
  (0, _TitleLoadingSpinner.register)();
31099
+ (0, _MediaLoadingSpinner.register)();
31090
31100
  }
31091
31101
 
31092
31102
  /***/ }),
@@ -31236,9 +31246,11 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31236
31246
  Object.defineProperty(exports, "__esModule", {
31237
31247
  value: true
31238
31248
  });
31249
+ exports.MediaLoadingSpinner = exports.MediaLoadingSpinnerComponent = undefined;
31239
31250
 
31240
31251
  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; }; }();
31241
31252
 
31253
+ exports.getInvert = getInvert;
31242
31254
  exports.register = register;
31243
31255
 
31244
31256
  var _utils = __webpack_require__(340);
@@ -31273,13 +31285,13 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31273
31285
 
31274
31286
  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; }
31275
31287
 
31276
- var TitleLoadingSpinner = function (_React$Component) {
31277
- _inherits(TitleLoadingSpinner, _React$Component);
31288
+ var MediaLoadingSpinnerComponent = exports.MediaLoadingSpinnerComponent = function (_React$Component) {
31289
+ _inherits(MediaLoadingSpinnerComponent, _React$Component);
31278
31290
 
31279
- function TitleLoadingSpinner(props) {
31280
- _classCallCheck(this, TitleLoadingSpinner);
31291
+ function MediaLoadingSpinnerComponent(props) {
31292
+ _classCallCheck(this, MediaLoadingSpinnerComponent);
31281
31293
 
31282
- var _this = _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).call(this, props));
31294
+ var _this = _possibleConstructorReturn(this, (MediaLoadingSpinnerComponent.__proto__ || Object.getPrototypeOf(MediaLoadingSpinnerComponent)).call(this, props));
31283
31295
 
31284
31296
  _this.state = {
31285
31297
  hidden: false,
@@ -31288,7 +31300,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31288
31300
  return _this;
31289
31301
  }
31290
31302
 
31291
- _createClass(TitleLoadingSpinner, [{
31303
+ _createClass(MediaLoadingSpinnerComponent, [{
31292
31304
  key: 'componentDidMount',
31293
31305
  value: function componentDidMount() {
31294
31306
  var _this2 = this;
@@ -31329,42 +31341,29 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31329
31341
  value: function render() {
31330
31342
  var _this4 = this;
31331
31343
 
31332
- var _props = this.props,
31333
- editing = _props.editing,
31334
- title = _props.title,
31335
- subtitle = _props.subtitle,
31336
- entryTitle = _props.entryTitle;
31344
+ var editing = this.props.editing;
31337
31345
  var _state = this.state,
31338
31346
  hidden = _state.hidden,
31339
31347
  animating = _state.animating;
31340
31348
 
31341
-
31349
+ var invert = getInvert(this.props);
31350
+ var logoElement = _react2.default.createElement('div', { className: (0, _classnames2.default)("media_loading_spinner-logo", { 'media_loading_spinner-logo-invert': invert }) });
31351
+ if (this.props.removeLogo) {
31352
+ logoElement = '';
31353
+ }
31342
31354
  if (editing || !hidden) {
31343
31355
  return _react2.default.createElement(
31344
31356
  'div',
31345
- { className: (0, _classnames2.default)('title_loading_spinner', { 'title_loading_spinner-fade': animating }),
31357
+ { className: (0, _classnames2.default)('media_loading_spinner', { 'media_loading_spinner-fade': animating }, { 'media_loading_spinner-invert': invert }),
31346
31358
  onAnimationEnd: function onAnimationEnd(event) {
31347
31359
  return _this4.hideOrLoop(event);
31348
31360
  },
31349
31361
  onTouchMove: preventScrollBouncing,
31350
- style: inlineStyle() },
31351
- _react2.default.createElement('div', { className: 'title_loading_spinner-logo' }),
31352
- _react2.default.createElement('div', { className: 'title_loading_spinner-image',
31362
+ style: inlineStyle(this.props) },
31363
+ logoElement,
31364
+ _react2.default.createElement('div', { className: 'media_loading_spinner-image',
31353
31365
  style: backgroundImageInlineStyles(this.props) }),
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
- )
31366
+ this.props.children
31368
31367
  );
31369
31368
  } else {
31370
31369
  return _react2.default.createElement('noscript', null);
@@ -31372,10 +31371,36 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31372
31371
  }
31373
31372
  }]);
31374
31373
 
31375
- return TitleLoadingSpinner;
31374
+ return MediaLoadingSpinnerComponent;
31376
31375
  }(_react2.default.Component);
31377
31376
 
31378
- function inlineStyle() {
31377
+ function preventScrollBouncing(e) {
31378
+ e.preventDefault();
31379
+ }
31380
+
31381
+ function backgroundImageInlineStyles(_ref) {
31382
+ var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31383
+ backgroundImage = _ref.backgroundImage,
31384
+ blurStrength = _ref.blurStrength;
31385
+
31386
+ var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31387
+ if (url) {
31388
+ return {
31389
+ backgroundImage: 'url("' + url + '")',
31390
+ filter: 'blur(' + blurStrength + 'px)'
31391
+ };
31392
+ }
31393
+ }
31394
+
31395
+ function getInvert(props) {
31396
+ if (!props.backgroundImage && props.invert == undefined) {
31397
+ return props.firstPageInvert;
31398
+ }
31399
+ return props.invert;
31400
+ }
31401
+
31402
+ function inlineStyle(props) {
31403
+ var invert = getInvert(props);
31379
31404
  return {
31380
31405
  position: 'absolute',
31381
31406
  top: 0,
@@ -31383,49 +31408,144 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31383
31408
  width: '100%',
31384
31409
  height: '100%',
31385
31410
  zIndex: 100,
31386
- backgroundColor: '#000'
31411
+ backgroundColor: invert ? '#fff' : '#000'
31387
31412
  };
31388
31413
  }
31389
31414
 
31390
- function backgroundImageInlineStyles(_ref) {
31391
- var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31392
- backgroundImage = _ref.backgroundImage;
31415
+ var MediaLoadingSpinner = exports.MediaLoadingSpinner = (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31416
+ editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31417
+ firstPageInvert: (0, _selectors4.firstPageAttribute)('invert'),
31418
+ firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31419
+ variant: 'medium',
31420
+ page: (0, _selectors4.firstPageAttribures)()
31421
+ }),
31422
+ backgroundImage: (0, _selectors3.file)('imageFiles', {
31423
+ id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31424
+ role: 'loading_spinner'
31425
+ })
31426
+ }),
31427
+ invert: (0, _selectors2.widgetAttribute)('invert', { role: 'loading_spinner' }),
31428
+ removeLogo: (0, _selectors2.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31429
+ blurStrength: (0, _selectors2.widgetAttribute)('blurStrength', { role: 'loading_spinner' })
31430
+ }))(MediaLoadingSpinnerComponent);
31393
31431
 
31394
- var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31432
+ function register() {
31433
+ (0, _registerWidgetType2.default)('media_loading_spinner', {
31434
+ component: MediaLoadingSpinner
31435
+ });
31436
+ }
31395
31437
 
31396
- if (url) {
31397
- return {
31398
- backgroundImage: 'url("' + url + '")'
31399
- };
31438
+ /***/ }),
31439
+ /* 622 */
31440
+ /***/ (function(module, exports, __webpack_require__) {
31441
+
31442
+ 'use strict';
31443
+
31444
+ Object.defineProperty(exports, "__esModule", {
31445
+ value: true
31446
+ });
31447
+ exports.TitleLoadingSpinner = undefined;
31448
+
31449
+ 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; }; }();
31450
+
31451
+ exports.register = register;
31452
+
31453
+ var _utils = __webpack_require__(340);
31454
+
31455
+ var _react = __webpack_require__(334);
31456
+
31457
+ var _react2 = _interopRequireDefault(_react);
31458
+
31459
+ var _reactRedux = __webpack_require__(399);
31460
+
31461
+ var _classnames = __webpack_require__(335);
31462
+
31463
+ var _classnames2 = _interopRequireDefault(_classnames);
31464
+
31465
+ var _registerWidgetType = __webpack_require__(565);
31466
+
31467
+ var _registerWidgetType2 = _interopRequireDefault(_registerWidgetType);
31468
+
31469
+ var _selectors = __webpack_require__(503);
31470
+
31471
+ var _selectors2 = __webpack_require__(376);
31472
+
31473
+ var _selectors3 = __webpack_require__(429);
31474
+
31475
+ var _selectors4 = __webpack_require__(494);
31476
+
31477
+ var _MediaLoadingSpinner = __webpack_require__(621);
31478
+
31479
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31480
+
31481
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31482
+
31483
+ 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; }
31484
+
31485
+ 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; }
31486
+
31487
+ var TitleLoadingSpinner = exports.TitleLoadingSpinner = function (_React$Component) {
31488
+ _inherits(TitleLoadingSpinner, _React$Component);
31489
+
31490
+ function TitleLoadingSpinner() {
31491
+ _classCallCheck(this, TitleLoadingSpinner);
31492
+
31493
+ return _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).apply(this, arguments));
31400
31494
  }
31401
- }
31402
31495
 
31403
- function preventScrollBouncing(e) {
31404
- e.preventDefault();
31405
- }
31496
+ _createClass(TitleLoadingSpinner, [{
31497
+ key: 'render',
31498
+ value: function render() {
31499
+ var _props = this.props,
31500
+ title = _props.title,
31501
+ subtitle = _props.subtitle,
31502
+ entryTitle = _props.entryTitle;
31503
+
31504
+ var invert = (0, _MediaLoadingSpinner.getInvert)(this.props);
31505
+ return _react2.default.createElement(
31506
+ _MediaLoadingSpinner.MediaLoadingSpinner,
31507
+ null,
31508
+ _react2.default.createElement(
31509
+ 'div',
31510
+ { className: (0, _classnames2.default)('media_loading_spinner-titles', { 'media_loading_spinner-invert': invert }) },
31511
+ _react2.default.createElement(
31512
+ 'div',
31513
+ { className: 'media_loading_spinner-title' },
31514
+ title || entryTitle
31515
+ ),
31516
+ _react2.default.createElement(
31517
+ 'div',
31518
+ { className: 'media_loading_spinner-subtitle' },
31519
+ subtitle
31520
+ )
31521
+ )
31522
+ );
31523
+ }
31524
+ }]);
31525
+
31526
+ return TitleLoadingSpinner;
31527
+ }(_react2.default.Component);
31406
31528
 
31407
31529
  function register() {
31408
31530
  (0, _registerWidgetType2.default)('title_loading_spinner', {
31409
31531
  component: (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31410
- editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31411
- firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31412
- variant: 'medium',
31413
- page: (0, _selectors4.firstPageAttribures)()
31414
- }),
31532
+ firstPageInvert: (0, _selectors2.firstPageAttribute)('invert'),
31415
31533
  backgroundImage: (0, _selectors3.file)('imageFiles', {
31416
- id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31534
+ id: (0, _selectors4.widgetAttribute)('customBackgroundImageId', {
31417
31535
  role: 'loading_spinner'
31418
31536
  })
31419
31537
  }),
31420
31538
  entryTitle: (0, _selectors.entryAttribute)('title'),
31421
- title: (0, _selectors2.widgetAttribute)('title', { role: 'loading_spinner' }),
31422
- subtitle: (0, _selectors2.widgetAttribute)('subtitle', { role: 'loading_spinner' })
31539
+ title: (0, _selectors4.widgetAttribute)('title', { role: 'loading_spinner' }),
31540
+ subtitle: (0, _selectors4.widgetAttribute)('subtitle', { role: 'loading_spinner' }),
31541
+ removeLogo: (0, _selectors4.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31542
+ invert: (0, _selectors4.widgetAttribute)('invert', { role: 'loading_spinner' })
31423
31543
  }))(TitleLoadingSpinner)
31424
31544
  });
31425
31545
  }
31426
31546
 
31427
31547
  /***/ }),
31428
- /* 622 */
31548
+ /* 623 */
31429
31549
  /***/ (function(module, exports) {
31430
31550
 
31431
31551
  module.exports = pageflow;