pageflow 14.4.0 → 14.5.0

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83633ca0a4d539fe72289335da8fadc780b40861611367e6b457a8ea5021541a
4
- data.tar.gz: 836e8c19598fe2f86ef5797baab839d27d884216b5de86f39a46606b1d427ff8
3
+ metadata.gz: 6055d3a49c9e944d7728bb010779e44c408ff85b47d98e0faa06060875381f25
4
+ data.tar.gz: b298c192fb2e6180d9d3e2c1a040d2b71277f9b00e89302f9053b3bc76d710df
5
5
  SHA512:
6
- metadata.gz: 05ef59f396f6726ec8022d9fcc2605600204c0e0554cf5b6c1514f7968303e09db7f2deab55e2a58da6902e254ef373e961adf888c531f3069409ad9bc56585a
7
- data.tar.gz: bae10300d19ce28fe2ca218d091ee71ae9267a3c0d9f756596bb88d36a3532e75173dd1139484b0b9cc177ac3a7435dec7dc2504dda3c4895705e62aac266ddb
6
+ metadata.gz: dd3d23f519fcd76a92e93d450ab0591f9144a52e09f6ea5b494cc93b0af3c2673f53233a3d971e1911533c6aa6e7f4d060455148a0fba2f43632c2afe277afe1
7
+ data.tar.gz: 3bbf7407c945baa99005789dc1c0fb80b7cc3cde7648058b359dd3ba966a5f4a54acc7dfaf21a5b599f482d562c078b6cc3774dd13bfe9f11ae5b6f51e8f270b
data/CHANGELOG.md CHANGED
@@ -1,16 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 14.4.0
3
+ ### Version 14.5.0
4
4
 
5
- 2019-08-13
5
+ 2019-10-31
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow/compare/14-3-stable...v14.4.0)
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/14-4-stable...v14.5.0)
8
8
 
9
- - Fix entry membership create error
10
- ([#1200](https://github.com/codevise/pageflow/pull/1200))
11
- - Move meta data defaults to attribute reader
12
- ([#1198](https://github.com/codevise/pageflow/pull/1198))
9
+ - Info box pointer-events enabled for anchor tag
10
+ ([#1213](https://github.com/codevise/pageflow/pull/1213))
11
+ - Update Twitter share URL
12
+ ([#1204](https://github.com/codevise/pageflow/pull/1204))
13
+ - Configurable loading spinner
14
+ ([#1186](https://github.com/codevise/pageflow/pull/1186))
13
15
 
14
16
  See
15
- [14-3-stable branch](https://github.com/codevise/pageflow/blob/14-3-stable/CHANGELOG.md)
17
+ [14-4-stable branch](https://github.com/codevise/pageflow/blob/14-4-stable/CHANGELOG.md)
16
18
  for previous changes.
@@ -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];
@@ -31079,11 +31086,14 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31079
31086
 
31080
31087
  var _ClassicLoadingSpinner = __webpack_require__(620);
31081
31088
 
31082
- var _TitleLoadingSpinner = __webpack_require__(621);
31089
+ var _MediaLoadingSpinner = __webpack_require__(621);
31090
+
31091
+ var _TitleLoadingSpinner = __webpack_require__(622);
31083
31092
 
31084
31093
  function registerWidgetTypes() {
31085
31094
  (0, _ClassicLoadingSpinner.register)();
31086
31095
  (0, _TitleLoadingSpinner.register)();
31096
+ (0, _MediaLoadingSpinner.register)();
31087
31097
  }
31088
31098
 
31089
31099
  /***/ }),
@@ -31233,9 +31243,11 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31233
31243
  Object.defineProperty(exports, "__esModule", {
31234
31244
  value: true
31235
31245
  });
31246
+ exports.MediaLoadingSpinner = exports.MediaLoadingSpinnerComponent = undefined;
31236
31247
 
31237
31248
  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; }; }();
31238
31249
 
31250
+ exports.getInvert = getInvert;
31239
31251
  exports.register = register;
31240
31252
 
31241
31253
  var _utils = __webpack_require__(340);
@@ -31270,13 +31282,13 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31270
31282
 
31271
31283
  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; }
31272
31284
 
31273
- var TitleLoadingSpinner = function (_React$Component) {
31274
- _inherits(TitleLoadingSpinner, _React$Component);
31285
+ var MediaLoadingSpinnerComponent = exports.MediaLoadingSpinnerComponent = function (_React$Component) {
31286
+ _inherits(MediaLoadingSpinnerComponent, _React$Component);
31275
31287
 
31276
- function TitleLoadingSpinner(props) {
31277
- _classCallCheck(this, TitleLoadingSpinner);
31288
+ function MediaLoadingSpinnerComponent(props) {
31289
+ _classCallCheck(this, MediaLoadingSpinnerComponent);
31278
31290
 
31279
- var _this = _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).call(this, props));
31291
+ var _this = _possibleConstructorReturn(this, (MediaLoadingSpinnerComponent.__proto__ || Object.getPrototypeOf(MediaLoadingSpinnerComponent)).call(this, props));
31280
31292
 
31281
31293
  _this.state = {
31282
31294
  hidden: false,
@@ -31285,7 +31297,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31285
31297
  return _this;
31286
31298
  }
31287
31299
 
31288
- _createClass(TitleLoadingSpinner, [{
31300
+ _createClass(MediaLoadingSpinnerComponent, [{
31289
31301
  key: 'componentDidMount',
31290
31302
  value: function componentDidMount() {
31291
31303
  var _this2 = this;
@@ -31326,42 +31338,29 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31326
31338
  value: function render() {
31327
31339
  var _this4 = this;
31328
31340
 
31329
- var _props = this.props,
31330
- editing = _props.editing,
31331
- title = _props.title,
31332
- subtitle = _props.subtitle,
31333
- entryTitle = _props.entryTitle;
31341
+ var editing = this.props.editing;
31334
31342
  var _state = this.state,
31335
31343
  hidden = _state.hidden,
31336
31344
  animating = _state.animating;
31337
31345
 
31338
-
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
+ }
31339
31351
  if (editing || !hidden) {
31340
31352
  return _react2.default.createElement(
31341
31353
  'div',
31342
- { className: (0, _classnames2.default)('title_loading_spinner', { 'title_loading_spinner-fade': animating }),
31354
+ { className: (0, _classnames2.default)('media_loading_spinner', { 'media_loading_spinner-fade': animating }, { 'media_loading_spinner-invert': invert }),
31343
31355
  onAnimationEnd: function onAnimationEnd(event) {
31344
31356
  return _this4.hideOrLoop(event);
31345
31357
  },
31346
31358
  onTouchMove: preventScrollBouncing,
31347
- style: inlineStyle() },
31348
- _react2.default.createElement('div', { className: 'title_loading_spinner-logo' }),
31349
- _react2.default.createElement('div', { className: 'title_loading_spinner-image',
31359
+ style: inlineStyle(this.props) },
31360
+ logoElement,
31361
+ _react2.default.createElement('div', { className: 'media_loading_spinner-image',
31350
31362
  style: backgroundImageInlineStyles(this.props) }),
31351
- _react2.default.createElement(
31352
- 'div',
31353
- { className: 'title_loading_spinner-titles' },
31354
- _react2.default.createElement(
31355
- 'div',
31356
- { className: 'title_loading_spinner-title' },
31357
- title || entryTitle
31358
- ),
31359
- _react2.default.createElement(
31360
- 'div',
31361
- { className: 'title_loading_spinner-subtitle' },
31362
- subtitle
31363
- )
31364
- )
31363
+ this.props.children
31365
31364
  );
31366
31365
  } else {
31367
31366
  return _react2.default.createElement('noscript', null);
@@ -31369,10 +31368,36 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31369
31368
  }
31370
31369
  }]);
31371
31370
 
31372
- return TitleLoadingSpinner;
31371
+ return MediaLoadingSpinnerComponent;
31373
31372
  }(_react2.default.Component);
31374
31373
 
31375
- function inlineStyle() {
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);
31376
31401
  return {
31377
31402
  position: 'absolute',
31378
31403
  top: 0,
@@ -31380,49 +31405,144 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31380
31405
  width: '100%',
31381
31406
  height: '100%',
31382
31407
  zIndex: 100,
31383
- backgroundColor: '#000'
31408
+ backgroundColor: invert ? '#fff' : '#000'
31384
31409
  };
31385
31410
  }
31386
31411
 
31387
- function backgroundImageInlineStyles(_ref) {
31388
- var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31389
- backgroundImage = _ref.backgroundImage;
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);
31390
31428
 
31391
- var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31429
+ function register() {
31430
+ (0, _registerWidgetType2.default)('media_loading_spinner', {
31431
+ component: MediaLoadingSpinner
31432
+ });
31433
+ }
31392
31434
 
31393
- if (url) {
31394
- return {
31395
- backgroundImage: 'url("' + url + '")'
31396
- };
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);
31486
+
31487
+ function TitleLoadingSpinner() {
31488
+ _classCallCheck(this, TitleLoadingSpinner);
31489
+
31490
+ return _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).apply(this, arguments));
31397
31491
  }
31398
- }
31399
31492
 
31400
- function preventScrollBouncing(e) {
31401
- e.preventDefault();
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
31525
 
31404
31526
  function register() {
31405
31527
  (0, _registerWidgetType2.default)('title_loading_spinner', {
31406
31528
  component: (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31407
- editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31408
- firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31409
- variant: 'medium',
31410
- page: (0, _selectors4.firstPageAttribures)()
31411
- }),
31529
+ firstPageInvert: (0, _selectors2.firstPageAttribute)('invert'),
31412
31530
  backgroundImage: (0, _selectors3.file)('imageFiles', {
31413
- id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31531
+ id: (0, _selectors4.widgetAttribute)('customBackgroundImageId', {
31414
31532
  role: 'loading_spinner'
31415
31533
  })
31416
31534
  }),
31417
31535
  entryTitle: (0, _selectors.entryAttribute)('title'),
31418
- title: (0, _selectors2.widgetAttribute)('title', { role: 'loading_spinner' }),
31419
- subtitle: (0, _selectors2.widgetAttribute)('subtitle', { role: 'loading_spinner' })
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' })
31420
31540
  }))(TitleLoadingSpinner)
31421
31541
  });
31422
31542
  }
31423
31543
 
31424
31544
  /***/ }),
31425
- /* 622 */
31545
+ /* 623 */
31426
31546
  /***/ (function(module, exports) {
31427
31547
 
31428
31548
  module.exports = pageflow;
@@ -8960,7 +8960,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
8960
8960
 
8961
8961
  var _loadingSpinner = __webpack_require__(616);
8962
8962
 
8963
- var _pageflow = __webpack_require__(619);
8963
+ var _pageflow = __webpack_require__(620);
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];
@@ -31057,11 +31064,14 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31057
31064
 
31058
31065
  var _ClassicLoadingSpinner = __webpack_require__(617);
31059
31066
 
31060
- var _TitleLoadingSpinner = __webpack_require__(618);
31067
+ var _MediaLoadingSpinner = __webpack_require__(618);
31068
+
31069
+ var _TitleLoadingSpinner = __webpack_require__(619);
31061
31070
 
31062
31071
  function registerWidgetTypes() {
31063
31072
  (0, _ClassicLoadingSpinner.register)();
31064
31073
  (0, _TitleLoadingSpinner.register)();
31074
+ (0, _MediaLoadingSpinner.register)();
31065
31075
  }
31066
31076
 
31067
31077
  /***/ }),
@@ -31211,9 +31221,11 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31211
31221
  Object.defineProperty(exports, "__esModule", {
31212
31222
  value: true
31213
31223
  });
31224
+ exports.MediaLoadingSpinner = exports.MediaLoadingSpinnerComponent = undefined;
31214
31225
 
31215
31226
  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; }; }();
31216
31227
 
31228
+ exports.getInvert = getInvert;
31217
31229
  exports.register = register;
31218
31230
 
31219
31231
  var _utils = __webpack_require__(340);
@@ -31248,13 +31260,13 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31248
31260
 
31249
31261
  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; }
31250
31262
 
31251
- var TitleLoadingSpinner = function (_React$Component) {
31252
- _inherits(TitleLoadingSpinner, _React$Component);
31263
+ var MediaLoadingSpinnerComponent = exports.MediaLoadingSpinnerComponent = function (_React$Component) {
31264
+ _inherits(MediaLoadingSpinnerComponent, _React$Component);
31253
31265
 
31254
- function TitleLoadingSpinner(props) {
31255
- _classCallCheck(this, TitleLoadingSpinner);
31266
+ function MediaLoadingSpinnerComponent(props) {
31267
+ _classCallCheck(this, MediaLoadingSpinnerComponent);
31256
31268
 
31257
- var _this = _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).call(this, props));
31269
+ var _this = _possibleConstructorReturn(this, (MediaLoadingSpinnerComponent.__proto__ || Object.getPrototypeOf(MediaLoadingSpinnerComponent)).call(this, props));
31258
31270
 
31259
31271
  _this.state = {
31260
31272
  hidden: false,
@@ -31263,7 +31275,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31263
31275
  return _this;
31264
31276
  }
31265
31277
 
31266
- _createClass(TitleLoadingSpinner, [{
31278
+ _createClass(MediaLoadingSpinnerComponent, [{
31267
31279
  key: 'componentDidMount',
31268
31280
  value: function componentDidMount() {
31269
31281
  var _this2 = this;
@@ -31304,42 +31316,29 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31304
31316
  value: function render() {
31305
31317
  var _this4 = this;
31306
31318
 
31307
- var _props = this.props,
31308
- editing = _props.editing,
31309
- title = _props.title,
31310
- subtitle = _props.subtitle,
31311
- entryTitle = _props.entryTitle;
31319
+ var editing = this.props.editing;
31312
31320
  var _state = this.state,
31313
31321
  hidden = _state.hidden,
31314
31322
  animating = _state.animating;
31315
31323
 
31316
-
31324
+ var invert = getInvert(this.props);
31325
+ var logoElement = _react2.default.createElement('div', { className: (0, _classnames2.default)("media_loading_spinner-logo", { 'media_loading_spinner-logo-invert': invert }) });
31326
+ if (this.props.removeLogo) {
31327
+ logoElement = '';
31328
+ }
31317
31329
  if (editing || !hidden) {
31318
31330
  return _react2.default.createElement(
31319
31331
  'div',
31320
- { className: (0, _classnames2.default)('title_loading_spinner', { 'title_loading_spinner-fade': animating }),
31332
+ { className: (0, _classnames2.default)('media_loading_spinner', { 'media_loading_spinner-fade': animating }, { 'media_loading_spinner-invert': invert }),
31321
31333
  onAnimationEnd: function onAnimationEnd(event) {
31322
31334
  return _this4.hideOrLoop(event);
31323
31335
  },
31324
31336
  onTouchMove: preventScrollBouncing,
31325
- style: inlineStyle() },
31326
- _react2.default.createElement('div', { className: 'title_loading_spinner-logo' }),
31327
- _react2.default.createElement('div', { className: 'title_loading_spinner-image',
31337
+ style: inlineStyle(this.props) },
31338
+ logoElement,
31339
+ _react2.default.createElement('div', { className: 'media_loading_spinner-image',
31328
31340
  style: backgroundImageInlineStyles(this.props) }),
31329
- _react2.default.createElement(
31330
- 'div',
31331
- { className: 'title_loading_spinner-titles' },
31332
- _react2.default.createElement(
31333
- 'div',
31334
- { className: 'title_loading_spinner-title' },
31335
- title || entryTitle
31336
- ),
31337
- _react2.default.createElement(
31338
- 'div',
31339
- { className: 'title_loading_spinner-subtitle' },
31340
- subtitle
31341
- )
31342
- )
31341
+ this.props.children
31343
31342
  );
31344
31343
  } else {
31345
31344
  return _react2.default.createElement('noscript', null);
@@ -31347,10 +31346,36 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31347
31346
  }
31348
31347
  }]);
31349
31348
 
31350
- return TitleLoadingSpinner;
31349
+ return MediaLoadingSpinnerComponent;
31351
31350
  }(_react2.default.Component);
31352
31351
 
31353
- function inlineStyle() {
31352
+ function preventScrollBouncing(e) {
31353
+ e.preventDefault();
31354
+ }
31355
+
31356
+ function backgroundImageInlineStyles(_ref) {
31357
+ var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31358
+ backgroundImage = _ref.backgroundImage,
31359
+ blurStrength = _ref.blurStrength;
31360
+
31361
+ var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31362
+ if (url) {
31363
+ return {
31364
+ backgroundImage: 'url("' + url + '")',
31365
+ filter: 'blur(' + blurStrength + 'px)'
31366
+ };
31367
+ }
31368
+ }
31369
+
31370
+ function getInvert(props) {
31371
+ if (!props.backgroundImage && props.invert == undefined) {
31372
+ return props.firstPageInvert;
31373
+ }
31374
+ return props.invert;
31375
+ }
31376
+
31377
+ function inlineStyle(props) {
31378
+ var invert = getInvert(props);
31354
31379
  return {
31355
31380
  position: 'absolute',
31356
31381
  top: 0,
@@ -31358,49 +31383,144 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31358
31383
  width: '100%',
31359
31384
  height: '100%',
31360
31385
  zIndex: 100,
31361
- backgroundColor: '#000'
31386
+ backgroundColor: invert ? '#fff' : '#000'
31362
31387
  };
31363
31388
  }
31364
31389
 
31365
- function backgroundImageInlineStyles(_ref) {
31366
- var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31367
- backgroundImage = _ref.backgroundImage;
31390
+ var MediaLoadingSpinner = exports.MediaLoadingSpinner = (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31391
+ editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31392
+ firstPageInvert: (0, _selectors4.firstPageAttribute)('invert'),
31393
+ firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31394
+ variant: 'medium',
31395
+ page: (0, _selectors4.firstPageAttribures)()
31396
+ }),
31397
+ backgroundImage: (0, _selectors3.file)('imageFiles', {
31398
+ id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31399
+ role: 'loading_spinner'
31400
+ })
31401
+ }),
31402
+ invert: (0, _selectors2.widgetAttribute)('invert', { role: 'loading_spinner' }),
31403
+ removeLogo: (0, _selectors2.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31404
+ blurStrength: (0, _selectors2.widgetAttribute)('blurStrength', { role: 'loading_spinner' })
31405
+ }))(MediaLoadingSpinnerComponent);
31368
31406
 
31369
- var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31407
+ function register() {
31408
+ (0, _registerWidgetType2.default)('media_loading_spinner', {
31409
+ component: MediaLoadingSpinner
31410
+ });
31411
+ }
31370
31412
 
31371
- if (url) {
31372
- return {
31373
- backgroundImage: 'url("' + url + '")'
31374
- };
31413
+ /***/ }),
31414
+ /* 619 */
31415
+ /***/ (function(module, exports, __webpack_require__) {
31416
+
31417
+ 'use strict';
31418
+
31419
+ Object.defineProperty(exports, "__esModule", {
31420
+ value: true
31421
+ });
31422
+ exports.TitleLoadingSpinner = undefined;
31423
+
31424
+ 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; }; }();
31425
+
31426
+ exports.register = register;
31427
+
31428
+ var _utils = __webpack_require__(340);
31429
+
31430
+ var _react = __webpack_require__(334);
31431
+
31432
+ var _react2 = _interopRequireDefault(_react);
31433
+
31434
+ var _reactRedux = __webpack_require__(399);
31435
+
31436
+ var _classnames = __webpack_require__(335);
31437
+
31438
+ var _classnames2 = _interopRequireDefault(_classnames);
31439
+
31440
+ var _registerWidgetType = __webpack_require__(562);
31441
+
31442
+ var _registerWidgetType2 = _interopRequireDefault(_registerWidgetType);
31443
+
31444
+ var _selectors = __webpack_require__(502);
31445
+
31446
+ var _selectors2 = __webpack_require__(376);
31447
+
31448
+ var _selectors3 = __webpack_require__(429);
31449
+
31450
+ var _selectors4 = __webpack_require__(493);
31451
+
31452
+ var _MediaLoadingSpinner = __webpack_require__(618);
31453
+
31454
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31455
+
31456
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31457
+
31458
+ 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; }
31459
+
31460
+ 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; }
31461
+
31462
+ var TitleLoadingSpinner = exports.TitleLoadingSpinner = function (_React$Component) {
31463
+ _inherits(TitleLoadingSpinner, _React$Component);
31464
+
31465
+ function TitleLoadingSpinner() {
31466
+ _classCallCheck(this, TitleLoadingSpinner);
31467
+
31468
+ return _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).apply(this, arguments));
31375
31469
  }
31376
- }
31377
31470
 
31378
- function preventScrollBouncing(e) {
31379
- e.preventDefault();
31380
- }
31471
+ _createClass(TitleLoadingSpinner, [{
31472
+ key: 'render',
31473
+ value: function render() {
31474
+ var _props = this.props,
31475
+ title = _props.title,
31476
+ subtitle = _props.subtitle,
31477
+ entryTitle = _props.entryTitle;
31478
+
31479
+ var invert = (0, _MediaLoadingSpinner.getInvert)(this.props);
31480
+ return _react2.default.createElement(
31481
+ _MediaLoadingSpinner.MediaLoadingSpinner,
31482
+ null,
31483
+ _react2.default.createElement(
31484
+ 'div',
31485
+ { className: (0, _classnames2.default)('media_loading_spinner-titles', { 'media_loading_spinner-invert': invert }) },
31486
+ _react2.default.createElement(
31487
+ 'div',
31488
+ { className: 'media_loading_spinner-title' },
31489
+ title || entryTitle
31490
+ ),
31491
+ _react2.default.createElement(
31492
+ 'div',
31493
+ { className: 'media_loading_spinner-subtitle' },
31494
+ subtitle
31495
+ )
31496
+ )
31497
+ );
31498
+ }
31499
+ }]);
31500
+
31501
+ return TitleLoadingSpinner;
31502
+ }(_react2.default.Component);
31381
31503
 
31382
31504
  function register() {
31383
31505
  (0, _registerWidgetType2.default)('title_loading_spinner', {
31384
31506
  component: (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31385
- editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31386
- firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31387
- variant: 'medium',
31388
- page: (0, _selectors4.firstPageAttribures)()
31389
- }),
31507
+ firstPageInvert: (0, _selectors2.firstPageAttribute)('invert'),
31390
31508
  backgroundImage: (0, _selectors3.file)('imageFiles', {
31391
- id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31509
+ id: (0, _selectors4.widgetAttribute)('customBackgroundImageId', {
31392
31510
  role: 'loading_spinner'
31393
31511
  })
31394
31512
  }),
31395
31513
  entryTitle: (0, _selectors.entryAttribute)('title'),
31396
- title: (0, _selectors2.widgetAttribute)('title', { role: 'loading_spinner' }),
31397
- subtitle: (0, _selectors2.widgetAttribute)('subtitle', { role: 'loading_spinner' })
31514
+ title: (0, _selectors4.widgetAttribute)('title', { role: 'loading_spinner' }),
31515
+ subtitle: (0, _selectors4.widgetAttribute)('subtitle', { role: 'loading_spinner' }),
31516
+ removeLogo: (0, _selectors4.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31517
+ invert: (0, _selectors4.widgetAttribute)('invert', { role: 'loading_spinner' })
31398
31518
  }))(TitleLoadingSpinner)
31399
31519
  });
31400
31520
  }
31401
31521
 
31402
31522
  /***/ }),
31403
- /* 619 */
31523
+ /* 620 */
31404
31524
  /***/ (function(module, exports) {
31405
31525
 
31406
31526
  module.exports = pageflow;
@@ -12,7 +12,6 @@ pageflow.WidgetType = pageflow.Object.extend({
12
12
 
13
13
  createConfigurationEditorView: function(options) {
14
14
  var constructor = this.configurationEditorView;
15
-
16
15
  return new constructor(_.extend({
17
16
  attributeTranslationKeyPrefixes: [
18
17
  'pageflow.editor.widgets.attributes.' + this.name,
@@ -0,0 +1,18 @@
1
+ pageflow.editor.widgetTypes.register('media_loading_spinner', {
2
+ configurationEditorView: pageflow.ConfigurationEditorView.extend({
3
+ configure: function() {
4
+ this.tab('loading_spinner', function() {
5
+ this.view(pageflow.InfoBoxView, {
6
+ text: I18n.t('pageflow.editor.media_loading_spinner.widget_type_info_box_text')
7
+ });
8
+ this.input('custom_background_image_id', pageflow.FileInputView, {
9
+ collection: 'image_files',
10
+ fileSelectionHandler: 'widgetConfiguration'
11
+ });
12
+ this.input('invert', pageflow.CheckBoxInputView);
13
+ this.input('remove_logo', pageflow.CheckBoxInputView);
14
+ this.input('blur_strength', pageflow.SliderInputView);
15
+ });
16
+ }
17
+ })
18
+ });
@@ -14,6 +14,9 @@ pageflow.editor.widgetTypes.register('title_loading_spinner', {
14
14
  collection: 'image_files',
15
15
  fileSelectionHandler: 'widgetConfiguration'
16
16
  });
17
+ this.input('invert', pageflow.CheckBoxInputView);
18
+ this.input('remove_logo', pageflow.CheckBoxInputView);
19
+ this.input('blur_strength', pageflow.SliderInputView);
17
20
  });
18
21
  }
19
22
  })
@@ -17,9 +17,9 @@
17
17
  @import "./built_in_page_types";
18
18
  @import "./anchors";
19
19
  @import "./cookie_notice_bar";
20
- @import "./loading_spinner";
21
20
  @import "./logo";
22
21
  @import "./page";
22
+ @import "./loading_spinner";
23
23
  @import "./indicators";
24
24
  @import "./navigation";
25
25
  @import "./navigation_share_box";
@@ -46,8 +46,10 @@ $loading-spinner-glow-size: 140px !default;
46
46
  /// File extension of background and logo
47
47
  $loading-spinner-image-file-extension: "png" !default;
48
48
 
49
+ @import "./loading_spinner/media";
49
50
  @import "./loading_spinner/title";
50
51
 
52
+
51
53
  @if not $custom-loading-spinner {
52
54
  .loading_spinner {
53
55
  // scss-lint:disable ImportantRule
@@ -0,0 +1,56 @@
1
+ $media-loading-spinner-duration: 7s;
2
+
3
+ .media_loading_spinner {
4
+ &:before {
5
+ content: "";
6
+ display: block;
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ bottom: 0;
11
+ right: 0;
12
+ z-index: 1;
13
+ background-color: rgba(0, 0, 0, 0.15);
14
+ }
15
+
16
+ &-image {
17
+ background-size: cover;
18
+ height: 100%;
19
+ }
20
+
21
+ &-logo {
22
+ @extend %pageflow_widget_margin_right !optional;
23
+ position: relative;
24
+
25
+ &:after {
26
+ @extend %background_logo;
27
+ content: "";
28
+ display: block;
29
+ z-index: 1;
30
+ opacity: 0;
31
+ }
32
+ }
33
+
34
+ &-logo-invert {
35
+ &:after{
36
+ background-image: image-url("pageflow/themes/#{$theme-name}/logo_header_invert.#{$logo-image-file-extension}");
37
+ }
38
+ }
39
+
40
+ &-fade {
41
+ @include animation(fade_out 1s ease 1);
42
+ @include animation-delay($media-loading-spinner-duration + 0.5s);
43
+ @include animation-fill-mode(forwards);
44
+
45
+ .media_loading_spinner-logo:after {
46
+ @include animation(fade_in 1s ease-out 1);
47
+ @include animation-fill-mode(forwards);
48
+ }
49
+ }
50
+
51
+ &-invert {
52
+ color: #000 !important;
53
+ }
54
+
55
+ }
56
+
@@ -8,25 +8,13 @@ $title-loading-spinner-subtitle-typography: () !default;
8
8
 
9
9
  $title-loading-spinner-phone-subtitle-typography: () !default;
10
10
 
11
- .title_loading_spinner {
12
- $duration: 7s;
11
+ .media_loading_spinner {
13
12
 
14
- &:before {
15
- content: "";
16
- display: block;
17
- position: absolute;
18
- top: 0;
19
- left: 0;
20
- bottom: 0;
21
- right: 0;
22
- z-index: 1;
23
- background-color: rgba(0, 0, 0, 0.15);
24
- }
25
-
26
- &-image {
27
- background-size: cover;
28
- filter: blur(50px);
29
- height: 100%;
13
+ &-fade {
14
+ .media_loading_spinner-titles {
15
+ @include animation(title_fade $media-loading-spinner-duration ease-out 1);
16
+ @include animation-fill-mode(forwards);
17
+ }
30
18
  }
31
19
 
32
20
  &-titles {
@@ -53,7 +41,7 @@ $title-loading-spinner-phone-subtitle-typography: () !default;
53
41
  content: "";
54
42
  display: block;
55
43
  width: 100px;
56
- border-bottom: solid 2px #fff;
44
+ border-bottom: solid 2px;
57
45
  margin: 20px auto;
58
46
  }
59
47
 
@@ -96,36 +84,7 @@ $title-loading-spinner-phone-subtitle-typography: () !default;
96
84
  );
97
85
  }
98
86
  }
99
-
100
- &-logo {
101
- @extend %pageflow_widget_margin_right !optional;
102
- position: relative;
103
-
104
- &:after {
105
- @extend %background_logo;
106
- content: "";
107
- display: block;
108
- z-index: 1;
109
- opacity: 0;
110
- }
111
- }
112
-
113
- &-fade {
114
- @include animation(fade_out 1s ease 1);
115
- @include animation-delay($duration + 0.5s);
116
- @include animation-fill-mode(forwards);
117
-
118
- .title_loading_spinner-titles {
119
- @include animation(title_fade $duration ease-out 1);
120
- @include animation-fill-mode(forwards);
121
- }
122
-
123
- .title_loading_spinner-logo:after {
124
- @include animation(fade_in 1s ease-out 1);
125
- @include animation-fill-mode(forwards);
126
- }
127
- }
128
-
87
+
129
88
  @include keyframes(title_fade) {
130
89
  0% {
131
90
  @include transform(translate(-50%, -30%));
@@ -155,4 +114,5 @@ $title-loading-spinner-phone-subtitle-typography: () !default;
155
114
  opacity: 0;
156
115
  }
157
116
  }
158
- }
117
+
118
+ }
@@ -78,6 +78,11 @@ $classic-player-controls-info-box-border-radius: 4px !default;
78
78
 
79
79
  .js &-info_box {
80
80
  pointer-events: none;
81
+
82
+ a {
83
+ pointer-events: all;
84
+ }
85
+
81
86
  margin: 0;
82
87
  margin-bottom: 60px + $classic-player-controls-border-width * 4;
83
88
  width: 434px;
@@ -73,6 +73,10 @@ $slim-player-controls-info-box-header-typography: () !default;
73
73
  @include transition(opacity 0.2s linear, visibility 0.2s linear, transform 0.2s ease);
74
74
  pointer-events: none;
75
75
 
76
+ a {
77
+ pointer-events: all;
78
+ }
79
+
76
80
  position: absolute;
77
81
  left: 50%;
78
82
  @include transform(translate3d(-50%, 0, 0));
@@ -8,7 +8,7 @@ module Pageflow
8
8
  google: 'https://plus.google.com/share?url=%{url}',
9
9
  linked_in: 'https://www.linkedin.com/shareArticle?mini=true&url=%{url}',
10
10
  telegram: 'tg://msg?text=%{url}',
11
- twitter: 'http://twitter.com/home?status=%{url}',
11
+ twitter: 'https://twitter.com/intent/tweet?url=%{url}',
12
12
  whats_app: 'WhatsApp://send?text=%{url}'
13
13
  }.freeze
14
14
 
@@ -61,10 +61,14 @@ module Pageflow
61
61
  private
62
62
 
63
63
  def all
64
- placeholders_by_role
65
- .merge(defaults_by_role)
66
- .merge(from_db_by_role)
67
- .values
64
+ initial_widgets = placeholders_by_role.merge(defaults_by_role)
65
+ initial_widgets.merge(from_db_by_role) { |_role_key, old_val, new_val|
66
+ if old_val.configuration.present?
67
+ new_val.configuration = {} if new_val.configuration.nil?
68
+ new_val.configuration = old_val.configuration.merge(new_val.configuration)
69
+ end
70
+ new_val
71
+ }.values
68
72
  end
69
73
 
70
74
  def from_db_by_role
@@ -73,13 +77,15 @@ module Pageflow
73
77
 
74
78
  def defaults_by_role
75
79
  config.widget_types.defaults_by_role.each_with_object({}) do |(role, widget_type), result|
76
- result[role] = Widget.new(role: role, type_name: widget_type.name, subject: nil)
80
+ result[role] = Widget.new(role: role, type_name: widget_type.name,
81
+ subject: nil,
82
+ configuration:
83
+ config.widget_types.default_configuration(role))
77
84
  end
78
85
  end
79
86
 
80
87
  def placeholders_by_role
81
88
  return {} unless options[:include_placeholders]
82
-
83
89
  config.widget_types.roles.each_with_object({}) do |role, result|
84
90
  result[role] = Widget.new(role: role, type_name: nil, subject: nil)
85
91
  end
@@ -282,6 +282,10 @@ de:
282
282
  dimensions: Maße
283
283
  duration: Länge
284
284
  format: Format
285
+ pageflow/widget:
286
+ blur_strength: Unschärfe
287
+ invert: Farben invertieren
288
+ remove_logo: Logo entfernen
285
289
  user:
286
290
  account: Konto
287
291
  admin: System-Administrator
@@ -1124,6 +1128,8 @@ de:
1124
1128
  audio_files: Audios
1125
1129
  image_files: Bilder
1126
1130
  video_files: Videos
1131
+ media_loading_spinner:
1132
+ widget_type_info_box_text: Dies ist eine Vorschau der Lade-Ansicht von 'Bild'. Die Animation wird ausgeführt, während die Seite geladen wird.
1127
1133
  nested_files:
1128
1134
  text_track_files:
1129
1135
  delete:
@@ -1396,7 +1402,19 @@ de:
1396
1402
  without_parent_page: Ohne übergeordnete Seite
1397
1403
  widgets:
1398
1404
  attributes:
1405
+ media_loading_spinner:
1406
+ blur_strength:
1407
+ inline_help: Steuern Sie die Unschärfe des Hintergrundbilds.
1408
+ label: Unschärfe
1409
+ custom_background_image_id:
1410
+ inline_help: Standardmäßig wird das Hintergrundbild der ersten Seite verwendet.
1411
+ label: Hintegrundbild
1412
+ remove_logo:
1413
+ label: Logo entfernen
1399
1414
  title_loading_spinner:
1415
+ blur_strength:
1416
+ inline_help: Steuern Sie die Unschärfe des Hintergrundbilds.
1417
+ label: Unschärfe
1400
1418
  custom_background_image_id:
1401
1419
  inline_help: Standardmäßig wird das Hintergrundbild der ersten Seite verwendet.
1402
1420
  label: Hintegrundbild
@@ -1737,6 +1755,8 @@ de:
1737
1755
  tr: Türkisch
1738
1756
  unknown: "(Unbekannt)"
1739
1757
  zh: Chinesisch
1758
+ media_loading_spinner:
1759
+ widget_type_name: Media
1740
1760
  page_transitions:
1741
1761
  crossfade: Überblenden
1742
1762
  cut: Harter Schnitt
@@ -282,6 +282,10 @@ en:
282
282
  dimensions: Dimensions
283
283
  duration: Duration
284
284
  format: Format
285
+ pageflow/widget:
286
+ blur_strength: Blurriness
287
+ invert: Invert Color
288
+ remove_logo: Remove Logo
285
289
  user:
286
290
  account: Account
287
291
  admin: System administrator
@@ -1124,6 +1128,8 @@ en:
1124
1128
  audio_files: Audios
1125
1129
  image_files: Images
1126
1130
  video_files: Videos
1131
+ media_loading_spinner:
1132
+ widget_type_info_box_text: This is a preview of the 'Image' loading view. The animation runs while the page is loading.
1127
1133
  nested_files:
1128
1134
  text_track_files:
1129
1135
  delete:
@@ -1396,7 +1402,19 @@ en:
1396
1402
  without_parent_page: Without parent page
1397
1403
  widgets:
1398
1404
  attributes:
1405
+ media_loading_spinner:
1406
+ blur_strength:
1407
+ inline_help: Control the bluriness of background image.
1408
+ label: Blur Strength
1409
+ custom_background_image_id:
1410
+ inline_help: By default, the background image of the first page is used.
1411
+ label: Background Image
1412
+ remove_logo:
1413
+ label: Remove logo
1399
1414
  title_loading_spinner:
1415
+ blur_strength:
1416
+ inline_help: Control the bluriness of background image.
1417
+ label: Blur Strength
1400
1418
  custom_background_image_id:
1401
1419
  inline_help: By default the background image of the first page is used.
1402
1420
  label: Background image
@@ -1709,6 +1727,8 @@ en:
1709
1727
  tr: Turkish
1710
1728
  unknown: "(Unknown)"
1711
1729
  zh: Chinese
1730
+ media_loading_spinner:
1731
+ widget_type_name: Media
1712
1732
  page_transitions:
1713
1733
  crossfade: Crossfade
1714
1734
  cut: Cut
@@ -61,5 +61,12 @@ module Pageflow
61
61
  insert_point: :before_entry,
62
62
  server_rendering: true)
63
63
  end
64
+
65
+ def self.media_loading_spinner
66
+ Pageflow::React.create_widget_type('media_loading_spinner',
67
+ 'loading_spinner',
68
+ insert_point: :before_entry,
69
+ server_rendering: true)
70
+ end
64
71
  end
65
72
  end
@@ -9,12 +9,18 @@ module Pageflow
9
9
  .phone_horizontal_slideshow_mode)
10
10
  end
11
11
 
12
+ config.widget_types.register_widget_defaults('loading_spinner',
13
+ 'blur_strength' => 50,
14
+ 'remove_logo' => false,
15
+ 'invert' => false)
12
16
  config.widget_types.register(Pageflow::BuiltInWidgetType.classic_loading_spinner,
13
17
  default: true)
14
18
 
15
19
  config.features.register('title_loading_spinner') do |feature_config|
20
+ feature_config.widget_types.register(Pageflow::BuiltInWidgetType.media_loading_spinner)
16
21
  feature_config.widget_types.register(Pageflow::BuiltInWidgetType.title_loading_spinner)
17
22
  end
23
+ config.features.enable_by_default('title_loading_spinner')
18
24
 
19
25
  config.widget_types.register(Pageflow::BuiltInWidgetType.navigation, default: true)
20
26
  config.widget_types.register(Pageflow::BuiltInWidgetType.mobile_navigation, default: true)
@@ -1,3 +1,3 @@
1
1
  module Pageflow
2
- VERSION = '14.4.0'.freeze
2
+ VERSION = '14.5.0'.freeze
3
3
  end
@@ -10,7 +10,6 @@ module Pageflow
10
10
 
11
11
  def register(widget_type, options = {})
12
12
  @widget_types[widget_type.name] = widget_type
13
-
14
13
  if options[:default]
15
14
  widget_type.roles.each do |role|
16
15
  defaults_by_role[role] = widget_type
@@ -18,9 +17,14 @@ module Pageflow
18
17
  end
19
18
  end
20
19
 
20
+ def register_widget_defaults(widget_role, default_configurations)
21
+ @default_configurations[widget_role] = default_configurations
22
+ end
23
+
21
24
  def clear
22
25
  @widget_types = {}
23
26
  @defaults_by_role = {}
27
+ @default_configurations = {}
24
28
  end
25
29
 
26
30
  def each(&block)
@@ -37,6 +41,10 @@ module Pageflow
37
41
  @widget_types.fetch(name, &block)
38
42
  end
39
43
 
44
+ def default_configuration(name)
45
+ @default_configurations[name]
46
+ end
47
+
40
48
  def find_all_by_role(role)
41
49
  select do |widget_type|
42
50
  widget_type.roles.include?(role)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.4.0
4
+ version: 14.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-13 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1250,6 +1250,7 @@ files:
1250
1250
  - app/assets/javascripts/pageflow/editor/views/widget_item_view.js
1251
1251
  - app/assets/javascripts/pageflow/editor/views/widget_types/classic_loading_spinner.js
1252
1252
  - app/assets/javascripts/pageflow/editor/views/widget_types/cookie_notice_bar.js
1253
+ - app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js
1253
1254
  - app/assets/javascripts/pageflow/editor/views/widget_types/phone_horizontal_slideshow_mode.js
1254
1255
  - app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js
1255
1256
  - app/assets/javascripts/pageflow/entry_data.js
@@ -1540,6 +1541,7 @@ files:
1540
1541
  - app/assets/stylesheets/pageflow/themes/default/indicators/typography.scss
1541
1542
  - app/assets/stylesheets/pageflow/themes/default/indicators/widget_margins.scss
1542
1543
  - app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss
1544
+ - app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss
1543
1545
  - app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss
1544
1546
  - app/assets/stylesheets/pageflow/themes/default/logo.scss
1545
1547
  - app/assets/stylesheets/pageflow/themes/default/logo/alignment.scss