@mjhls/mjh-framework 1.0.206 → 1.0.208

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