@mjhls/mjh-framework 1.0.205 → 1.0.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/DeckContent.js +10 -11
  3. package/dist/cjs/DeckQueue.js +11 -12
  4. package/dist/cjs/{Dfp-d94f7f73.js → Dfp-c4f1f12a.js} +5 -5
  5. package/dist/cjs/GridContent-089aa22c.js +632 -0
  6. package/dist/cjs/GridContent.js +17 -604
  7. package/dist/cjs/IssueContentDeck.js +4 -4
  8. package/dist/cjs/IssueDeck.js +4 -4
  9. package/dist/cjs/MasterDeck.js +5 -6
  10. package/dist/cjs/{Normal-7dd8c339.js → Normal-47d9e184.js} +62 -3
  11. package/dist/cjs/PublicationDeck.js +4 -4
  12. package/dist/cjs/QueueDeckExpanded.js +13 -13
  13. package/dist/cjs/{TaxonomyCard-7b5b4298.js → TaxonomyCard-d97685e2.js} +5 -5
  14. package/dist/cjs/TaxonomyCard.js +1 -1
  15. package/dist/cjs/TemplateNormal.js +4 -4
  16. package/dist/cjs/ThumbnailCard.js +4 -4
  17. package/dist/cjs/VideoSeriesListing.js +6 -7
  18. package/dist/cjs/{YoutubeGroup-f7707ceb.js → YoutubeGroup-7dc3064d.js} +6 -6
  19. package/dist/cjs/YoutubeGroup.js +1 -1
  20. package/dist/cjs/{debounce-286eb3fb.js → debounce-a963b136.js} +211 -6
  21. package/dist/cjs/{get-06aac51b.js → get-126b1712.js} +10 -10
  22. package/dist/cjs/{visibility-sensor-5c5a7302.js → index-0322e486.js} +0 -587
  23. package/dist/cjs/index.js +213 -97
  24. package/dist/cjs/{index.es-2289df51.js → visibility-sensor-bea3105d.js} +587 -0
  25. package/dist/esm/DeckContent.js +3 -4
  26. package/dist/esm/DeckQueue.js +4 -5
  27. package/dist/esm/{Dfp-ab7941d3.js → Dfp-6731ac01.js} +3 -3
  28. package/dist/esm/GridContent-214acb61.js +625 -0
  29. package/dist/esm/GridContent.js +16 -603
  30. package/dist/esm/MasterDeck.js +3 -4
  31. package/dist/esm/{Normal-403c5666.js → Normal-be430fa9.js} +62 -4
  32. package/dist/esm/QueueDeckExpanded.js +2 -2
  33. package/dist/esm/TemplateNormal.js +4 -4
  34. package/dist/esm/VideoSeriesListing.js +4 -5
  35. package/dist/esm/{YoutubeGroup-06df4923.js → YoutubeGroup-dc617e8b.js} +3 -3
  36. package/dist/esm/YoutubeGroup.js +1 -1
  37. package/dist/esm/{debounce-a0242b4a.js → debounce-dc0c02e5.js} +202 -2
  38. package/dist/esm/{get-b684ff61.js → get-b074314b.js} +1 -1
  39. package/dist/esm/{visibility-sensor-3cfe6713.js → index-6a79dad6.js} +2 -588
  40. package/dist/esm/index.js +185 -71
  41. package/dist/esm/{index.es-f369b3e8.js → visibility-sensor-675d3fa1.js} +588 -2
  42. package/package.json +1 -1
  43. package/dist/cjs/AD-e2479b7c.js +0 -31
  44. package/dist/cjs/isSymbol-311eb805.js +0 -209
  45. package/dist/esm/AD-1b2a3dd3.js +0 -26
  46. package/dist/esm/isSymbol-c2b7d05a.js +0 -203
@@ -5,6 +5,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
5
5
  var React = require('react');
6
6
  var React__default = _interopDefault(React);
7
7
  var _commonjsHelpers = require('./_commonjsHelpers-3fc1f64e.js');
8
+ var reactDom = _interopDefault(require('react-dom'));
8
9
 
9
10
  var moment = _commonjsHelpers.createCommonjsModule(function (module, exports) {
10
11
  (function (global, factory) {
@@ -5024,5 +5025,591 @@ var InfiniteScroll = /** @class */ (function (_super) {
5024
5025
  return InfiniteScroll;
5025
5026
  }(React.Component));
5026
5027
 
5028
+ var visibilitySensor = _commonjsHelpers.createCommonjsModule(function (module, exports) {
5029
+ (function webpackUniversalModuleDefinition(root, factory) {
5030
+ module.exports = factory(React__default, reactDom);
5031
+ })(_commonjsHelpers.commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__) {
5032
+ return /******/ (function(modules) { // webpackBootstrap
5033
+ /******/ // The module cache
5034
+ /******/ var installedModules = {};
5035
+ /******/
5036
+ /******/ // The require function
5037
+ /******/ function __webpack_require__(moduleId) {
5038
+ /******/
5039
+ /******/ // Check if module is in cache
5040
+ /******/ if(installedModules[moduleId]) {
5041
+ /******/ return installedModules[moduleId].exports;
5042
+ /******/ }
5043
+ /******/ // Create a new module (and put it into the cache)
5044
+ /******/ var module = installedModules[moduleId] = {
5045
+ /******/ i: moduleId,
5046
+ /******/ l: false,
5047
+ /******/ exports: {}
5048
+ /******/ };
5049
+ /******/
5050
+ /******/ // Execute the module function
5051
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
5052
+ /******/
5053
+ /******/ // Flag the module as loaded
5054
+ /******/ module.l = true;
5055
+ /******/
5056
+ /******/ // Return the exports of the module
5057
+ /******/ return module.exports;
5058
+ /******/ }
5059
+ /******/
5060
+ /******/
5061
+ /******/ // expose the modules object (__webpack_modules__)
5062
+ /******/ __webpack_require__.m = modules;
5063
+ /******/
5064
+ /******/ // expose the module cache
5065
+ /******/ __webpack_require__.c = installedModules;
5066
+ /******/
5067
+ /******/ // define getter function for harmony exports
5068
+ /******/ __webpack_require__.d = function(exports, name, getter) {
5069
+ /******/ if(!__webpack_require__.o(exports, name)) {
5070
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
5071
+ /******/ }
5072
+ /******/ };
5073
+ /******/
5074
+ /******/ // define __esModule on exports
5075
+ /******/ __webpack_require__.r = function(exports) {
5076
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
5077
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5078
+ /******/ }
5079
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
5080
+ /******/ };
5081
+ /******/
5082
+ /******/ // create a fake namespace object
5083
+ /******/ // mode & 1: value is a module id, require it
5084
+ /******/ // mode & 2: merge all properties of value into the ns
5085
+ /******/ // mode & 4: return value when already ns object
5086
+ /******/ // mode & 8|1: behave like require
5087
+ /******/ __webpack_require__.t = function(value, mode) {
5088
+ /******/ if(mode & 1) value = __webpack_require__(value);
5089
+ /******/ if(mode & 8) return value;
5090
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
5091
+ /******/ var ns = Object.create(null);
5092
+ /******/ __webpack_require__.r(ns);
5093
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
5094
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
5095
+ /******/ return ns;
5096
+ /******/ };
5097
+ /******/
5098
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
5099
+ /******/ __webpack_require__.n = function(module) {
5100
+ /******/ var getter = module && module.__esModule ?
5101
+ /******/ function getDefault() { return module['default']; } :
5102
+ /******/ function getModuleExports() { return module; };
5103
+ /******/ __webpack_require__.d(getter, 'a', getter);
5104
+ /******/ return getter;
5105
+ /******/ };
5106
+ /******/
5107
+ /******/ // Object.prototype.hasOwnProperty.call
5108
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
5109
+ /******/
5110
+ /******/ // __webpack_public_path__
5111
+ /******/ __webpack_require__.p = "";
5112
+ /******/
5113
+ /******/
5114
+ /******/ // Load entry module and return exports
5115
+ /******/ return __webpack_require__(__webpack_require__.s = 4);
5116
+ /******/ })
5117
+ /************************************************************************/
5118
+ /******/ ([
5119
+ /* 0 */
5120
+ /***/ (function(module, exports, __webpack_require__) {
5121
+
5122
+ /**
5123
+ * Copyright (c) 2013-present, Facebook, Inc.
5124
+ *
5125
+ * This source code is licensed under the MIT license found in the
5126
+ * LICENSE file in the root directory of this source tree.
5127
+ */
5128
+
5129
+ {
5130
+ // By explicitly using `prop-types` you are opting into new production behavior.
5131
+ // http://fb.me/prop-types-in-prod
5132
+ module.exports = __webpack_require__(5)();
5133
+ }
5134
+
5135
+
5136
+ /***/ }),
5137
+ /* 1 */
5138
+ /***/ (function(module, exports) {
5139
+
5140
+ module.exports = __WEBPACK_EXTERNAL_MODULE__1__;
5141
+
5142
+ /***/ }),
5143
+ /* 2 */
5144
+ /***/ (function(module, exports) {
5145
+
5146
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
5147
+
5148
+ /***/ }),
5149
+ /* 3 */
5150
+ /***/ (function(module, exports) {
5151
+
5152
+ // Tell whether the rect is visible, given an offset
5153
+ //
5154
+ // return: boolean
5155
+ module.exports = function (offset, rect, containmentRect) {
5156
+ var offsetDir = offset.direction;
5157
+ var offsetVal = offset.value; // Rules for checking different kind of offsets. In example if the element is
5158
+ // 90px below viewport and offsetTop is 100, it is considered visible.
5159
+
5160
+ switch (offsetDir) {
5161
+ case 'top':
5162
+ return containmentRect.top + offsetVal < rect.top && containmentRect.bottom > rect.bottom && containmentRect.left < rect.left && containmentRect.right > rect.right;
5163
+
5164
+ case 'left':
5165
+ return containmentRect.left + offsetVal < rect.left && containmentRect.bottom > rect.bottom && containmentRect.top < rect.top && containmentRect.right > rect.right;
5166
+
5167
+ case 'bottom':
5168
+ return containmentRect.bottom - offsetVal > rect.bottom && containmentRect.left < rect.left && containmentRect.right > rect.right && containmentRect.top < rect.top;
5169
+
5170
+ case 'right':
5171
+ return containmentRect.right - offsetVal > rect.right && containmentRect.left < rect.left && containmentRect.top < rect.top && containmentRect.bottom > rect.bottom;
5172
+ }
5173
+ };
5174
+
5175
+ /***/ }),
5176
+ /* 4 */
5177
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
5178
+ __webpack_require__.r(__webpack_exports__);
5179
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return VisibilitySensor; });
5180
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
5181
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
5182
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
5183
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
5184
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
5185
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
5186
+ /* harmony import */ var _lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
5187
+ /* harmony import */ var _lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3__);
5188
+
5189
+
5190
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5191
+
5192
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5193
+
5194
+ 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); } }
5195
+
5196
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
5197
+
5198
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5199
+
5200
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5201
+
5202
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5203
+
5204
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
5205
+
5206
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
5207
+
5208
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5209
+
5210
+
5211
+
5212
+
5213
+
5214
+
5215
+ function normalizeRect(rect) {
5216
+ if (rect.width === undefined) {
5217
+ rect.width = rect.right - rect.left;
5218
+ }
5219
+
5220
+ if (rect.height === undefined) {
5221
+ rect.height = rect.bottom - rect.top;
5222
+ }
5223
+
5224
+ return rect;
5225
+ }
5226
+
5227
+ var VisibilitySensor =
5228
+ /*#__PURE__*/
5229
+ function (_React$Component) {
5230
+ _inherits(VisibilitySensor, _React$Component);
5231
+
5232
+ function VisibilitySensor(props) {
5233
+ var _this;
5234
+
5235
+ _classCallCheck(this, VisibilitySensor);
5236
+
5237
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(VisibilitySensor).call(this, props));
5238
+
5239
+ _defineProperty(_assertThisInitialized(_this), "getContainer", function () {
5240
+ return _this.props.containment || window;
5241
+ });
5242
+
5243
+ _defineProperty(_assertThisInitialized(_this), "addEventListener", function (target, event, delay, throttle) {
5244
+ if (!_this.debounceCheck) {
5245
+ _this.debounceCheck = {};
5246
+ }
5247
+
5248
+ var timeout;
5249
+ var func;
5250
+
5251
+ var later = function later() {
5252
+ timeout = null;
5253
+
5254
+ _this.check();
5255
+ };
5256
+
5257
+ if (throttle > -1) {
5258
+ func = function func() {
5259
+ if (!timeout) {
5260
+ timeout = setTimeout(later, throttle || 0);
5261
+ }
5262
+ };
5263
+ } else {
5264
+ func = function func() {
5265
+ clearTimeout(timeout);
5266
+ timeout = setTimeout(later, delay || 0);
5267
+ };
5268
+ }
5269
+
5270
+ var info = {
5271
+ target: target,
5272
+ fn: func,
5273
+ getLastTimeout: function getLastTimeout() {
5274
+ return timeout;
5275
+ }
5276
+ };
5277
+ target.addEventListener(event, info.fn);
5278
+ _this.debounceCheck[event] = info;
5279
+ });
5280
+
5281
+ _defineProperty(_assertThisInitialized(_this), "startWatching", function () {
5282
+ if (_this.debounceCheck || _this.interval) {
5283
+ return;
5284
+ }
5285
+
5286
+ if (_this.props.intervalCheck) {
5287
+ _this.interval = setInterval(_this.check, _this.props.intervalDelay);
5288
+ }
5289
+
5290
+ if (_this.props.scrollCheck) {
5291
+ _this.addEventListener(_this.getContainer(), "scroll", _this.props.scrollDelay, _this.props.scrollThrottle);
5292
+ }
5293
+
5294
+ if (_this.props.resizeCheck) {
5295
+ _this.addEventListener(window, "resize", _this.props.resizeDelay, _this.props.resizeThrottle);
5296
+ } // if dont need delayed call, check on load ( before the first interval fires )
5297
+
5298
+
5299
+ !_this.props.delayedCall && _this.check();
5300
+ });
5301
+
5302
+ _defineProperty(_assertThisInitialized(_this), "stopWatching", function () {
5303
+ if (_this.debounceCheck) {
5304
+ // clean up event listeners and their debounce callers
5305
+ for (var debounceEvent in _this.debounceCheck) {
5306
+ if (_this.debounceCheck.hasOwnProperty(debounceEvent)) {
5307
+ var debounceInfo = _this.debounceCheck[debounceEvent];
5308
+ clearTimeout(debounceInfo.getLastTimeout());
5309
+ debounceInfo.target.removeEventListener(debounceEvent, debounceInfo.fn);
5310
+ _this.debounceCheck[debounceEvent] = null;
5311
+ }
5312
+ }
5313
+ }
5314
+
5315
+ _this.debounceCheck = null;
5316
+
5317
+ if (_this.interval) {
5318
+ _this.interval = clearInterval(_this.interval);
5319
+ }
5320
+ });
5321
+
5322
+ _defineProperty(_assertThisInitialized(_this), "check", function () {
5323
+ var el = _this.node;
5324
+ var rect;
5325
+ var containmentRect; // if the component has rendered to null, dont update visibility
5326
+
5327
+ if (!el) {
5328
+ return _this.state;
5329
+ }
5330
+
5331
+ rect = normalizeRect(_this.roundRectDown(el.getBoundingClientRect()));
5332
+
5333
+ if (_this.props.containment) {
5334
+ var containmentDOMRect = _this.props.containment.getBoundingClientRect();
5335
+
5336
+ containmentRect = {
5337
+ top: containmentDOMRect.top,
5338
+ left: containmentDOMRect.left,
5339
+ bottom: containmentDOMRect.bottom,
5340
+ right: containmentDOMRect.right
5341
+ };
5342
+ } else {
5343
+ containmentRect = {
5344
+ top: 0,
5345
+ left: 0,
5346
+ bottom: window.innerHeight || document.documentElement.clientHeight,
5347
+ right: window.innerWidth || document.documentElement.clientWidth
5348
+ };
5349
+ } // Check if visibility is wanted via offset?
5350
+
5351
+
5352
+ var offset = _this.props.offset || {};
5353
+ var hasValidOffset = _typeof(offset) === "object";
5354
+
5355
+ if (hasValidOffset) {
5356
+ containmentRect.top += offset.top || 0;
5357
+ containmentRect.left += offset.left || 0;
5358
+ containmentRect.bottom -= offset.bottom || 0;
5359
+ containmentRect.right -= offset.right || 0;
5360
+ }
5361
+
5362
+ var visibilityRect = {
5363
+ top: rect.top >= containmentRect.top,
5364
+ left: rect.left >= containmentRect.left,
5365
+ bottom: rect.bottom <= containmentRect.bottom,
5366
+ right: rect.right <= containmentRect.right
5367
+ }; // https://github.com/joshwnj/react-visibility-sensor/pull/114
5368
+
5369
+ var hasSize = rect.height > 0 && rect.width > 0;
5370
+ var isVisible = hasSize && visibilityRect.top && visibilityRect.left && visibilityRect.bottom && visibilityRect.right; // check for partial visibility
5371
+
5372
+ if (hasSize && _this.props.partialVisibility) {
5373
+ var partialVisible = rect.top <= containmentRect.bottom && rect.bottom >= containmentRect.top && rect.left <= containmentRect.right && rect.right >= containmentRect.left; // account for partial visibility on a single edge
5374
+
5375
+ if (typeof _this.props.partialVisibility === "string") {
5376
+ partialVisible = visibilityRect[_this.props.partialVisibility];
5377
+ } // if we have minimum top visibility set by props, lets check, if it meets the passed value
5378
+ // so if for instance element is at least 200px in viewport, then show it.
5379
+
5380
+
5381
+ isVisible = _this.props.minTopValue ? partialVisible && rect.top <= containmentRect.bottom - _this.props.minTopValue : partialVisible;
5382
+ } // Deprecated options for calculating offset.
5383
+
5384
+
5385
+ if (typeof offset.direction === "string" && typeof offset.value === "number") {
5386
+ console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }", offset.direction, offset.value);
5387
+ isVisible = _lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3___default()(offset, rect, containmentRect);
5388
+ }
5389
+
5390
+ var state = _this.state; // notify the parent when the value changes
5391
+
5392
+ if (_this.state.isVisible !== isVisible) {
5393
+ state = {
5394
+ isVisible: isVisible,
5395
+ visibilityRect: visibilityRect
5396
+ };
5397
+
5398
+ _this.setState(state);
5399
+
5400
+ if (_this.props.onChange) _this.props.onChange(isVisible);
5401
+ }
5402
+
5403
+ return state;
5404
+ });
5405
+
5406
+ _this.state = {
5407
+ isVisible: null,
5408
+ visibilityRect: {}
5409
+ };
5410
+ return _this;
5411
+ }
5412
+
5413
+ _createClass(VisibilitySensor, [{
5414
+ key: "componentDidMount",
5415
+ value: function componentDidMount() {
5416
+ this.node = react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(this);
5417
+
5418
+ if (this.props.active) {
5419
+ this.startWatching();
5420
+ }
5421
+ }
5422
+ }, {
5423
+ key: "componentWillUnmount",
5424
+ value: function componentWillUnmount() {
5425
+ this.stopWatching();
5426
+ }
5427
+ }, {
5428
+ key: "componentDidUpdate",
5429
+ value: function componentDidUpdate(prevProps) {
5430
+ // re-register node in componentDidUpdate if children diffs [#103]
5431
+ this.node = react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(this);
5432
+
5433
+ if (this.props.active && !prevProps.active) {
5434
+ this.setState({
5435
+ isVisible: null,
5436
+ visibilityRect: {}
5437
+ });
5438
+ this.startWatching();
5439
+ } else if (!this.props.active) {
5440
+ this.stopWatching();
5441
+ }
5442
+ }
5443
+ }, {
5444
+ key: "roundRectDown",
5445
+ value: function roundRectDown(rect) {
5446
+ return {
5447
+ top: Math.floor(rect.top),
5448
+ left: Math.floor(rect.left),
5449
+ bottom: Math.floor(rect.bottom),
5450
+ right: Math.floor(rect.right)
5451
+ };
5452
+ }
5453
+ /**
5454
+ * Check if the element is within the visible viewport
5455
+ */
5456
+
5457
+ }, {
5458
+ key: "render",
5459
+ value: function render() {
5460
+ if (this.props.children instanceof Function) {
5461
+ return this.props.children({
5462
+ isVisible: this.state.isVisible,
5463
+ visibilityRect: this.state.visibilityRect
5464
+ });
5465
+ }
5466
+
5467
+ return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.only(this.props.children);
5468
+ }
5469
+ }]);
5470
+
5471
+ return VisibilitySensor;
5472
+ }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);
5473
+
5474
+ _defineProperty(VisibilitySensor, "defaultProps", {
5475
+ active: true,
5476
+ partialVisibility: false,
5477
+ minTopValue: 0,
5478
+ scrollCheck: false,
5479
+ scrollDelay: 250,
5480
+ scrollThrottle: -1,
5481
+ resizeCheck: false,
5482
+ resizeDelay: 250,
5483
+ resizeThrottle: -1,
5484
+ intervalCheck: true,
5485
+ intervalDelay: 100,
5486
+ delayedCall: false,
5487
+ offset: {},
5488
+ containment: null,
5489
+ children: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null)
5490
+ });
5491
+
5492
+ _defineProperty(VisibilitySensor, "propTypes", {
5493
+ onChange: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,
5494
+ active: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
5495
+ partialVisibility: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(["top", "right", "bottom", "left"])]),
5496
+ delayedCall: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
5497
+ offset: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({
5498
+ top: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5499
+ left: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5500
+ bottom: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5501
+ right: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number
5502
+ }), // deprecated offset property
5503
+ prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({
5504
+ direction: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(["top", "right", "bottom", "left"]),
5505
+ value: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number
5506
+ })]),
5507
+ scrollCheck: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
5508
+ scrollDelay: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5509
+ scrollThrottle: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5510
+ resizeCheck: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
5511
+ resizeDelay: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5512
+ resizeThrottle: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5513
+ intervalCheck: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
5514
+ intervalDelay: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
5515
+ containment: typeof window !== "undefined" ? prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.instanceOf(window.Element) : prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.any,
5516
+ children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.element, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func]),
5517
+ minTopValue: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number
5518
+ });
5519
+
5520
+
5521
+
5522
+ /***/ }),
5523
+ /* 5 */
5524
+ /***/ (function(module, exports, __webpack_require__) {
5525
+ /**
5526
+ * Copyright (c) 2013-present, Facebook, Inc.
5527
+ *
5528
+ * This source code is licensed under the MIT license found in the
5529
+ * LICENSE file in the root directory of this source tree.
5530
+ */
5531
+
5532
+
5533
+
5534
+ var ReactPropTypesSecret = __webpack_require__(6);
5535
+
5536
+ function emptyFunction() {}
5537
+ function emptyFunctionWithReset() {}
5538
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
5539
+
5540
+ module.exports = function() {
5541
+ function shim(props, propName, componentName, location, propFullName, secret) {
5542
+ if (secret === ReactPropTypesSecret) {
5543
+ // It is still safe when called from React.
5544
+ return;
5545
+ }
5546
+ var err = new Error(
5547
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5548
+ 'Use PropTypes.checkPropTypes() to call them. ' +
5549
+ 'Read more at http://fb.me/use-check-prop-types'
5550
+ );
5551
+ err.name = 'Invariant Violation';
5552
+ throw err;
5553
+ } shim.isRequired = shim;
5554
+ function getShim() {
5555
+ return shim;
5556
+ } // Important!
5557
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5558
+ var ReactPropTypes = {
5559
+ array: shim,
5560
+ bool: shim,
5561
+ func: shim,
5562
+ number: shim,
5563
+ object: shim,
5564
+ string: shim,
5565
+ symbol: shim,
5566
+
5567
+ any: shim,
5568
+ arrayOf: getShim,
5569
+ element: shim,
5570
+ elementType: shim,
5571
+ instanceOf: getShim,
5572
+ node: shim,
5573
+ objectOf: getShim,
5574
+ oneOf: getShim,
5575
+ oneOfType: getShim,
5576
+ shape: getShim,
5577
+ exact: getShim,
5578
+
5579
+ checkPropTypes: emptyFunctionWithReset,
5580
+ resetWarningCache: emptyFunction
5581
+ };
5582
+
5583
+ ReactPropTypes.PropTypes = ReactPropTypes;
5584
+
5585
+ return ReactPropTypes;
5586
+ };
5587
+
5588
+
5589
+ /***/ }),
5590
+ /* 6 */
5591
+ /***/ (function(module, exports, __webpack_require__) {
5592
+ /**
5593
+ * Copyright (c) 2013-present, Facebook, Inc.
5594
+ *
5595
+ * This source code is licensed under the MIT license found in the
5596
+ * LICENSE file in the root directory of this source tree.
5597
+ */
5598
+
5599
+
5600
+
5601
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5602
+
5603
+ module.exports = ReactPropTypesSecret;
5604
+
5605
+
5606
+ /***/ })
5607
+ /******/ ]);
5608
+ });
5609
+ });
5610
+
5611
+ var VisibilitySensor = _commonjsHelpers.unwrapExports(visibilitySensor);
5612
+
5027
5613
  exports.InfiniteScroll = InfiniteScroll;
5614
+ exports.VisibilitySensor = VisibilitySensor;
5028
5615
  exports.moment = moment;
@@ -1,16 +1,15 @@
1
1
  import React__default from 'react';
2
2
  import './_commonjsHelpers-ae1b5db5.js';
3
- import { l as lib_3, V as VisibilitySensor } from './visibility-sensor-3cfe6713.js';
3
+ import { a as lib_3 } from './index-6a79dad6.js';
4
4
  import 'prop-types';
5
5
  import Container from 'react-bootstrap/Container';
6
6
  import Row from 'react-bootstrap/Row';
7
7
  import Col from 'react-bootstrap/Col';
8
8
  import Card from 'react-bootstrap/Card';
9
- import { I as InfiniteScroll, m as moment } from './index.es-f369b3e8.js';
9
+ import { I as InfiniteScroll, V as VisibilitySensor, m as moment } from './visibility-sensor-675d3fa1.js';
10
10
  import 'next/link';
11
11
  import { withRouter } from 'next/router';
12
- import './isSymbol-c2b7d05a.js';
13
- import { d as debounce_1 } from './debounce-a0242b4a.js';
12
+ import { d as debounce_1 } from './debounce-dc0c02e5.js';
14
13
  import 'react-dom';
15
14
  import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
16
15
  import { L as LazyLoad } from './index-3c1ee9ab.js';
@@ -1,23 +1,22 @@
1
1
  import React__default from 'react';
2
2
  import './_commonjsHelpers-ae1b5db5.js';
3
- import { V as VisibilitySensor, l as lib_3 } from './visibility-sensor-3cfe6713.js';
3
+ import { a as lib_3 } from './index-6a79dad6.js';
4
4
  import 'prop-types';
5
5
  import Container from 'react-bootstrap/Container';
6
6
  import Row from 'react-bootstrap/Row';
7
7
  import Col from 'react-bootstrap/Col';
8
8
  import Card from 'react-bootstrap/Card';
9
- import { m as moment, I as InfiniteScroll } from './index.es-f369b3e8.js';
9
+ import { V as VisibilitySensor, m as moment, I as InfiniteScroll } from './visibility-sensor-675d3fa1.js';
10
10
  import 'next/link';
11
11
  import { withRouter } from 'next/router';
12
- import './isSymbol-c2b7d05a.js';
13
- import { d as debounce_1 } from './debounce-a0242b4a.js';
12
+ import { d as debounce_1 } from './debounce-dc0c02e5.js';
14
13
  import 'react-dom';
15
14
  import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
16
15
  import { L as LazyLoad } from './index-3c1ee9ab.js';
17
16
  import { a as main_36 } from './main-dea495b7.js';
18
17
  import { c as clean_html_1 } from './entities-e85d3a4a.js';
19
18
  import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-67c05996.js';
20
- import { g as get_1 } from './get-b684ff61.js';
19
+ import { g as get_1 } from './get-b074314b.js';
21
20
 
22
21
  var DeckQueue = function (_React$Component) {
23
22
  inherits(DeckQueue, _React$Component);
@@ -1,9 +1,9 @@
1
1
  import React__default, { useState } from 'react';
2
2
  import './_commonjsHelpers-ae1b5db5.js';
3
- import { a as lib_1, b as lib_2, V as VisibilitySensor } from './visibility-sensor-3cfe6713.js';
3
+ import { l as lib_1, b as lib_2 } from './index-6a79dad6.js';
4
4
  import PropTypes from 'prop-types';
5
- import './isSymbol-c2b7d05a.js';
6
- import { d as debounce_1 } from './debounce-a0242b4a.js';
5
+ import { V as VisibilitySensor } from './visibility-sensor-675d3fa1.js';
6
+ import { d as debounce_1 } from './debounce-dc0c02e5.js';
7
7
  import 'react-dom';
8
8
  import { s as slicedToArray } from './_babelHelpers-67c05996.js';
9
9