@mjhls/mjh-framework 1.0.594 → 1.0.596

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ArticleQueue.js +286 -16
  3. package/dist/cjs/{AuthorComponent-cb8b8128.js → AuthorComponent-3c79e1ab.js} +2 -2
  4. package/dist/cjs/ForbesHero.js +1 -1
  5. package/dist/cjs/GridContent.js +1 -1
  6. package/dist/cjs/GridHero.js +1 -1
  7. package/dist/cjs/InscreenSensor-e45e95e3.js +85 -0
  8. package/dist/cjs/IssueContentDeck.js +1 -1
  9. package/dist/cjs/IssueLanding.js +1 -1
  10. package/dist/cjs/OncliveLargeHero.js +1 -1
  11. package/dist/cjs/PartnerDetailListing.js +1 -1
  12. package/dist/cjs/QueueDeckExpanded.js +1 -1
  13. package/dist/cjs/RecentNews.js +93 -0
  14. package/dist/cjs/View.js +219 -48
  15. package/dist/cjs/YahooHero.js +1 -1
  16. package/dist/cjs/getQuery.js +2 -4
  17. package/dist/cjs/getRelatedArticle.js +4 -6
  18. package/dist/cjs/index.js +2 -2
  19. package/dist/esm/AD.js +1 -1
  20. package/dist/esm/AD300x250.js +2 -2
  21. package/dist/esm/AD300x250x600.js +2 -2
  22. package/dist/esm/AD728x90.js +2 -2
  23. package/dist/esm/ADFloatingFooter.js +2 -2
  24. package/dist/esm/ADGutter.js +2 -2
  25. package/dist/esm/ADSkyscraper.js +2 -2
  26. package/dist/esm/ADSponsoredResources.js +2 -2
  27. package/dist/esm/ADWebcast.js +2 -2
  28. package/dist/esm/ADWelcome.js +2 -2
  29. package/dist/esm/AdSlot.js +2 -2
  30. package/dist/esm/ArticleQueue.js +286 -16
  31. package/dist/esm/{AuthorComponent-158226c9.js → AuthorComponent-357dbee9.js} +2 -2
  32. package/dist/esm/CMEDeck.js +2 -2
  33. package/dist/esm/Column2.js +3 -3
  34. package/dist/esm/Column3.js +4 -4
  35. package/dist/esm/DeckContent.js +3 -3
  36. package/dist/esm/DeckQueue.js +4 -4
  37. package/dist/esm/{Dfp-ae9336e2.js → Dfp-56444b73.js} +2 -2
  38. package/dist/esm/ExternalResources.js +3 -3
  39. package/dist/esm/ForbesHero.js +1 -1
  40. package/dist/esm/GridContent.js +7 -7
  41. package/dist/esm/GridHero.js +1 -1
  42. package/dist/esm/InscreenSensor-beb2ec79.js +80 -0
  43. package/dist/esm/IssueContentDeck.js +1 -1
  44. package/dist/esm/IssueLanding.js +5 -5
  45. package/dist/esm/LeftNav.js +2 -2
  46. package/dist/esm/MasterDeck.js +4 -4
  47. package/dist/esm/OncliveLargeHero.js +1 -1
  48. package/dist/esm/PartnerDetailListing.js +6 -6
  49. package/dist/esm/QueueDeckExpanded.js +5 -5
  50. package/dist/esm/RecentNews.js +88 -0
  51. package/dist/esm/SideFooter.js +3 -3
  52. package/dist/esm/TemplateNormal.js +4 -4
  53. package/dist/esm/VideoSeriesListing.js +2 -2
  54. package/dist/esm/View.js +222 -51
  55. package/dist/esm/YahooHero.js +1 -1
  56. package/dist/esm/{_arrayMap-64cbe0e4.js → _arrayMap-818441dd.js} +1 -1
  57. package/dist/esm/{debounce-048d9cb6.js → debounce-a0d9abca.js} +1 -1
  58. package/dist/esm/{get-0eb56363.js → get-58d2f7cc.js} +2 -2
  59. package/dist/esm/getQuery.js +2 -4
  60. package/dist/esm/getRelatedArticle.js +4 -6
  61. package/dist/esm/getSerializers.js +3 -3
  62. package/dist/esm/index.js +9 -9
  63. package/dist/esm/{isSymbol-b7b7434f.js → isSymbol-47f5ff3b.js} +1 -1
  64. package/package.json +1 -1
  65. package/dist/cjs/InscreenSensor-e7f3579f.js +0 -361
  66. package/dist/esm/InscreenSensor-280b2b10.js +0 -352
  67. /package/dist/esm/{ADInfeed-c7dba95f.js → ADInfeed-cecd42e8.js} +0 -0
  68. /package/dist/esm/{ADlgInfeed-8bfd6d58.js → ADlgInfeed-234ba767.js} +0 -0
  69. /package/dist/esm/{index-80cb5ee6.js → index-91506c27.js} +0 -0
@@ -1,361 +0,0 @@
1
- 'use strict';
2
-
3
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
-
5
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
6
- var inherits = require('./inherits-93684212.js');
7
- var React = require('react');
8
- var React__default = _interopDefault(React);
9
- var isSymbol = require('./isSymbol-488934a7.js');
10
-
11
- /** Used as references for various `Number` constants. */
12
- var MAX_SAFE_INTEGER = 9007199254740991;
13
-
14
- /**
15
- * Checks if `value` is a valid array-like length.
16
- *
17
- * **Note:** This method is loosely based on
18
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
19
- *
20
- * @static
21
- * @memberOf _
22
- * @since 4.0.0
23
- * @category Lang
24
- * @param {*} value The value to check.
25
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
26
- * @example
27
- *
28
- * _.isLength(3);
29
- * // => true
30
- *
31
- * _.isLength(Number.MIN_VALUE);
32
- * // => false
33
- *
34
- * _.isLength(Infinity);
35
- * // => false
36
- *
37
- * _.isLength('3');
38
- * // => false
39
- */
40
- function isLength(value) {
41
- return typeof value == 'number' &&
42
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
43
- }
44
-
45
- var isLength_1 = isLength;
46
-
47
- /** `Object#toString` result references. */
48
- var argsTag = '[object Arguments]';
49
-
50
- /**
51
- * The base implementation of `_.isArguments`.
52
- *
53
- * @private
54
- * @param {*} value The value to check.
55
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
56
- */
57
- function baseIsArguments(value) {
58
- return isSymbol.isObjectLike_1(value) && isSymbol._baseGetTag(value) == argsTag;
59
- }
60
-
61
- var _baseIsArguments = baseIsArguments;
62
-
63
- /** Used for built-in method references. */
64
- var objectProto = Object.prototype;
65
-
66
- /** Used to check objects for own properties. */
67
- var hasOwnProperty = objectProto.hasOwnProperty;
68
-
69
- /** Built-in value references. */
70
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
71
-
72
- /**
73
- * Checks if `value` is likely an `arguments` object.
74
- *
75
- * @static
76
- * @memberOf _
77
- * @since 0.1.0
78
- * @category Lang
79
- * @param {*} value The value to check.
80
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
81
- * else `false`.
82
- * @example
83
- *
84
- * _.isArguments(function() { return arguments; }());
85
- * // => true
86
- *
87
- * _.isArguments([1, 2, 3]);
88
- * // => false
89
- */
90
- var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
91
- return isSymbol.isObjectLike_1(value) && hasOwnProperty.call(value, 'callee') &&
92
- !propertyIsEnumerable.call(value, 'callee');
93
- };
94
-
95
- var isArguments_1 = isArguments;
96
-
97
- /**
98
- * This method returns `false`.
99
- *
100
- * @static
101
- * @memberOf _
102
- * @since 4.13.0
103
- * @category Util
104
- * @returns {boolean} Returns `false`.
105
- * @example
106
- *
107
- * _.times(2, _.stubFalse);
108
- * // => [false, false]
109
- */
110
- function stubFalse() {
111
- return false;
112
- }
113
-
114
- var stubFalse_1 = stubFalse;
115
-
116
- var isBuffer_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
117
- /** Detect free variable `exports`. */
118
- var freeExports = exports && !exports.nodeType && exports;
119
-
120
- /** Detect free variable `module`. */
121
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
122
-
123
- /** Detect the popular CommonJS extension `module.exports`. */
124
- var moduleExports = freeModule && freeModule.exports === freeExports;
125
-
126
- /** Built-in value references. */
127
- var Buffer = moduleExports ? isSymbol._root.Buffer : undefined;
128
-
129
- /* Built-in method references for those with the same name as other `lodash` methods. */
130
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
131
-
132
- /**
133
- * Checks if `value` is a buffer.
134
- *
135
- * @static
136
- * @memberOf _
137
- * @since 4.3.0
138
- * @category Lang
139
- * @param {*} value The value to check.
140
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
141
- * @example
142
- *
143
- * _.isBuffer(new Buffer(2));
144
- * // => true
145
- *
146
- * _.isBuffer(new Uint8Array(2));
147
- * // => false
148
- */
149
- var isBuffer = nativeIsBuffer || stubFalse_1;
150
-
151
- module.exports = isBuffer;
152
- });
153
-
154
- /** `Object#toString` result references. */
155
- var argsTag$1 = '[object Arguments]',
156
- arrayTag = '[object Array]',
157
- boolTag = '[object Boolean]',
158
- dateTag = '[object Date]',
159
- errorTag = '[object Error]',
160
- funcTag = '[object Function]',
161
- mapTag = '[object Map]',
162
- numberTag = '[object Number]',
163
- objectTag = '[object Object]',
164
- regexpTag = '[object RegExp]',
165
- setTag = '[object Set]',
166
- stringTag = '[object String]',
167
- weakMapTag = '[object WeakMap]';
168
-
169
- var arrayBufferTag = '[object ArrayBuffer]',
170
- dataViewTag = '[object DataView]',
171
- float32Tag = '[object Float32Array]',
172
- float64Tag = '[object Float64Array]',
173
- int8Tag = '[object Int8Array]',
174
- int16Tag = '[object Int16Array]',
175
- int32Tag = '[object Int32Array]',
176
- uint8Tag = '[object Uint8Array]',
177
- uint8ClampedTag = '[object Uint8ClampedArray]',
178
- uint16Tag = '[object Uint16Array]',
179
- uint32Tag = '[object Uint32Array]';
180
-
181
- /** Used to identify `toStringTag` values of typed arrays. */
182
- var typedArrayTags = {};
183
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
184
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
185
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
186
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
187
- typedArrayTags[uint32Tag] = true;
188
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
189
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
190
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
191
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
192
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
193
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
194
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
195
- typedArrayTags[weakMapTag] = false;
196
-
197
- /**
198
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
199
- *
200
- * @private
201
- * @param {*} value The value to check.
202
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
203
- */
204
- function baseIsTypedArray(value) {
205
- return isSymbol.isObjectLike_1(value) &&
206
- isLength_1(value.length) && !!typedArrayTags[isSymbol._baseGetTag(value)];
207
- }
208
-
209
- var _baseIsTypedArray = baseIsTypedArray;
210
-
211
- /**
212
- * The base implementation of `_.unary` without support for storing metadata.
213
- *
214
- * @private
215
- * @param {Function} func The function to cap arguments for.
216
- * @returns {Function} Returns the new capped function.
217
- */
218
- function baseUnary(func) {
219
- return function(value) {
220
- return func(value);
221
- };
222
- }
223
-
224
- var _baseUnary = baseUnary;
225
-
226
- var _nodeUtil = _commonjsHelpers.createCommonjsModule(function (module, exports) {
227
- /** Detect free variable `exports`. */
228
- var freeExports = exports && !exports.nodeType && exports;
229
-
230
- /** Detect free variable `module`. */
231
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
232
-
233
- /** Detect the popular CommonJS extension `module.exports`. */
234
- var moduleExports = freeModule && freeModule.exports === freeExports;
235
-
236
- /** Detect free variable `process` from Node.js. */
237
- var freeProcess = moduleExports && isSymbol._freeGlobal.process;
238
-
239
- /** Used to access faster Node.js helpers. */
240
- var nodeUtil = (function() {
241
- try {
242
- // Use `util.types` for Node.js 10+.
243
- var types = freeModule && freeModule.require && freeModule.require('util').types;
244
-
245
- if (types) {
246
- return types;
247
- }
248
-
249
- // Legacy `process.binding('util')` for Node.js < 10.
250
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
251
- } catch (e) {}
252
- }());
253
-
254
- module.exports = nodeUtil;
255
- });
256
-
257
- /* Node.js helper references. */
258
- var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
259
-
260
- /**
261
- * Checks if `value` is classified as a typed array.
262
- *
263
- * @static
264
- * @memberOf _
265
- * @since 3.0.0
266
- * @category Lang
267
- * @param {*} value The value to check.
268
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
269
- * @example
270
- *
271
- * _.isTypedArray(new Uint8Array);
272
- * // => true
273
- *
274
- * _.isTypedArray([]);
275
- * // => false
276
- */
277
- var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
278
-
279
- var isTypedArray_1 = isTypedArray;
280
-
281
- var InscreenSensor = function (_React$Component) {
282
- inherits._inherits(InscreenSensor, _React$Component);
283
-
284
- function InscreenSensor(props) {
285
- inherits._classCallCheck(this, InscreenSensor);
286
-
287
- var _this = inherits._possibleConstructorReturn(this, (InscreenSensor.__proto__ || inherits._Object$getPrototypeOf(InscreenSensor)).call(this, props));
288
-
289
- _this.scrollHandler = function () {
290
- var visible = _this.checkInside();
291
- if (visible !== _this.visible) {
292
- _this.visible = visible;
293
- _this.props.onChange(visible);
294
- }
295
- };
296
-
297
- _this.checkInside = function () {
298
- var rect = _this.wraperRef.current.getBoundingClientRect();
299
- var _this$props$offSetTop = _this.props.offSetTop,
300
- offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
301
- var top = rect.top,
302
- bottom = rect.bottom;
303
-
304
- var viewHeight = window.innerHeight;
305
- var wrpElem = document.getElementsByClassName('inscreen-wrapper');
306
-
307
- if (top > 0 && top <= offSetTop) {
308
- if (wrpElem.length > 1 && top <= viewHeight && bottom > viewHeight) {
309
- return 'top';
310
- } else if (wrpElem.length > 1 && bottom < viewHeight) {
311
- return 'small-top';
312
- }
313
- } else if (wrpElem.length > 1 && top < offSetTop && bottom + offSetTop >= viewHeight) {
314
- return 'bottom';
315
- }
316
- };
317
-
318
- _this.wraperRef = React__default.createRef();
319
- _this.visible = false;
320
- return _this;
321
- }
322
-
323
- inherits._createClass(InscreenSensor, [{
324
- key: 'componentDidMount',
325
- value: function componentDidMount() {
326
- this.visible = this.checkInside();
327
- this.props.onChange(this.visible);
328
- window.addEventListener('scroll', this.scrollHandler);
329
- }
330
- }, {
331
- key: 'componentWillUnmount',
332
- value: function componentWillUnmount() {
333
- window.removeEventListener('scroll', this.scrollHandler);
334
- }
335
- }, {
336
- key: 'render',
337
- value: function render() {
338
- var _props = this.props,
339
- _props$className = _props.className,
340
- className = _props$className === undefined ? '' : _props$className,
341
- _props$style = _props.style,
342
- style = _props$style === undefined ? {} : _props$style,
343
- _props$id = _props.id,
344
- id = _props$id === undefined ? '' : _props$id;
345
-
346
- return React__default.createElement(
347
- 'div',
348
- { ref: this.wraperRef, className: className, style: style, id: id },
349
- this.props.children
350
- );
351
- }
352
- }]);
353
-
354
- return InscreenSensor;
355
- }(React__default.Component);
356
-
357
- exports.InscreenSensor = InscreenSensor;
358
- exports.isArguments_1 = isArguments_1;
359
- exports.isBuffer_1 = isBuffer_1;
360
- exports.isLength_1 = isLength_1;
361
- exports.isTypedArray_1 = isTypedArray_1;
@@ -1,352 +0,0 @@
1
- import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
2
- import { _ as _inherits, a as _classCallCheck, b as _possibleConstructorReturn, c as _Object$getPrototypeOf, d as _createClass } from './inherits-b8e4c697.js';
3
- import React__default from 'react';
4
- import { i as isObjectLike_1, _ as _baseGetTag, a as _root, e as _freeGlobal } from './isSymbol-b7b7434f.js';
5
-
6
- /** Used as references for various `Number` constants. */
7
- var MAX_SAFE_INTEGER = 9007199254740991;
8
-
9
- /**
10
- * Checks if `value` is a valid array-like length.
11
- *
12
- * **Note:** This method is loosely based on
13
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
14
- *
15
- * @static
16
- * @memberOf _
17
- * @since 4.0.0
18
- * @category Lang
19
- * @param {*} value The value to check.
20
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
21
- * @example
22
- *
23
- * _.isLength(3);
24
- * // => true
25
- *
26
- * _.isLength(Number.MIN_VALUE);
27
- * // => false
28
- *
29
- * _.isLength(Infinity);
30
- * // => false
31
- *
32
- * _.isLength('3');
33
- * // => false
34
- */
35
- function isLength(value) {
36
- return typeof value == 'number' &&
37
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
38
- }
39
-
40
- var isLength_1 = isLength;
41
-
42
- /** `Object#toString` result references. */
43
- var argsTag = '[object Arguments]';
44
-
45
- /**
46
- * The base implementation of `_.isArguments`.
47
- *
48
- * @private
49
- * @param {*} value The value to check.
50
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
51
- */
52
- function baseIsArguments(value) {
53
- return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
54
- }
55
-
56
- var _baseIsArguments = baseIsArguments;
57
-
58
- /** Used for built-in method references. */
59
- var objectProto = Object.prototype;
60
-
61
- /** Used to check objects for own properties. */
62
- var hasOwnProperty = objectProto.hasOwnProperty;
63
-
64
- /** Built-in value references. */
65
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
66
-
67
- /**
68
- * Checks if `value` is likely an `arguments` object.
69
- *
70
- * @static
71
- * @memberOf _
72
- * @since 0.1.0
73
- * @category Lang
74
- * @param {*} value The value to check.
75
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
76
- * else `false`.
77
- * @example
78
- *
79
- * _.isArguments(function() { return arguments; }());
80
- * // => true
81
- *
82
- * _.isArguments([1, 2, 3]);
83
- * // => false
84
- */
85
- var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
86
- return isObjectLike_1(value) && hasOwnProperty.call(value, 'callee') &&
87
- !propertyIsEnumerable.call(value, 'callee');
88
- };
89
-
90
- var isArguments_1 = isArguments;
91
-
92
- /**
93
- * This method returns `false`.
94
- *
95
- * @static
96
- * @memberOf _
97
- * @since 4.13.0
98
- * @category Util
99
- * @returns {boolean} Returns `false`.
100
- * @example
101
- *
102
- * _.times(2, _.stubFalse);
103
- * // => [false, false]
104
- */
105
- function stubFalse() {
106
- return false;
107
- }
108
-
109
- var stubFalse_1 = stubFalse;
110
-
111
- var isBuffer_1 = createCommonjsModule(function (module, exports) {
112
- /** Detect free variable `exports`. */
113
- var freeExports = exports && !exports.nodeType && exports;
114
-
115
- /** Detect free variable `module`. */
116
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
117
-
118
- /** Detect the popular CommonJS extension `module.exports`. */
119
- var moduleExports = freeModule && freeModule.exports === freeExports;
120
-
121
- /** Built-in value references. */
122
- var Buffer = moduleExports ? _root.Buffer : undefined;
123
-
124
- /* Built-in method references for those with the same name as other `lodash` methods. */
125
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
126
-
127
- /**
128
- * Checks if `value` is a buffer.
129
- *
130
- * @static
131
- * @memberOf _
132
- * @since 4.3.0
133
- * @category Lang
134
- * @param {*} value The value to check.
135
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
136
- * @example
137
- *
138
- * _.isBuffer(new Buffer(2));
139
- * // => true
140
- *
141
- * _.isBuffer(new Uint8Array(2));
142
- * // => false
143
- */
144
- var isBuffer = nativeIsBuffer || stubFalse_1;
145
-
146
- module.exports = isBuffer;
147
- });
148
-
149
- /** `Object#toString` result references. */
150
- var argsTag$1 = '[object Arguments]',
151
- arrayTag = '[object Array]',
152
- boolTag = '[object Boolean]',
153
- dateTag = '[object Date]',
154
- errorTag = '[object Error]',
155
- funcTag = '[object Function]',
156
- mapTag = '[object Map]',
157
- numberTag = '[object Number]',
158
- objectTag = '[object Object]',
159
- regexpTag = '[object RegExp]',
160
- setTag = '[object Set]',
161
- stringTag = '[object String]',
162
- weakMapTag = '[object WeakMap]';
163
-
164
- var arrayBufferTag = '[object ArrayBuffer]',
165
- dataViewTag = '[object DataView]',
166
- float32Tag = '[object Float32Array]',
167
- float64Tag = '[object Float64Array]',
168
- int8Tag = '[object Int8Array]',
169
- int16Tag = '[object Int16Array]',
170
- int32Tag = '[object Int32Array]',
171
- uint8Tag = '[object Uint8Array]',
172
- uint8ClampedTag = '[object Uint8ClampedArray]',
173
- uint16Tag = '[object Uint16Array]',
174
- uint32Tag = '[object Uint32Array]';
175
-
176
- /** Used to identify `toStringTag` values of typed arrays. */
177
- var typedArrayTags = {};
178
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
179
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
180
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
181
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
182
- typedArrayTags[uint32Tag] = true;
183
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
184
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
185
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
186
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
187
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
188
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
189
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
190
- typedArrayTags[weakMapTag] = false;
191
-
192
- /**
193
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
194
- *
195
- * @private
196
- * @param {*} value The value to check.
197
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
198
- */
199
- function baseIsTypedArray(value) {
200
- return isObjectLike_1(value) &&
201
- isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
202
- }
203
-
204
- var _baseIsTypedArray = baseIsTypedArray;
205
-
206
- /**
207
- * The base implementation of `_.unary` without support for storing metadata.
208
- *
209
- * @private
210
- * @param {Function} func The function to cap arguments for.
211
- * @returns {Function} Returns the new capped function.
212
- */
213
- function baseUnary(func) {
214
- return function(value) {
215
- return func(value);
216
- };
217
- }
218
-
219
- var _baseUnary = baseUnary;
220
-
221
- var _nodeUtil = createCommonjsModule(function (module, exports) {
222
- /** Detect free variable `exports`. */
223
- var freeExports = exports && !exports.nodeType && exports;
224
-
225
- /** Detect free variable `module`. */
226
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
227
-
228
- /** Detect the popular CommonJS extension `module.exports`. */
229
- var moduleExports = freeModule && freeModule.exports === freeExports;
230
-
231
- /** Detect free variable `process` from Node.js. */
232
- var freeProcess = moduleExports && _freeGlobal.process;
233
-
234
- /** Used to access faster Node.js helpers. */
235
- var nodeUtil = (function() {
236
- try {
237
- // Use `util.types` for Node.js 10+.
238
- var types = freeModule && freeModule.require && freeModule.require('util').types;
239
-
240
- if (types) {
241
- return types;
242
- }
243
-
244
- // Legacy `process.binding('util')` for Node.js < 10.
245
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
246
- } catch (e) {}
247
- }());
248
-
249
- module.exports = nodeUtil;
250
- });
251
-
252
- /* Node.js helper references. */
253
- var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
254
-
255
- /**
256
- * Checks if `value` is classified as a typed array.
257
- *
258
- * @static
259
- * @memberOf _
260
- * @since 3.0.0
261
- * @category Lang
262
- * @param {*} value The value to check.
263
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
264
- * @example
265
- *
266
- * _.isTypedArray(new Uint8Array);
267
- * // => true
268
- *
269
- * _.isTypedArray([]);
270
- * // => false
271
- */
272
- var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
273
-
274
- var isTypedArray_1 = isTypedArray;
275
-
276
- var InscreenSensor = function (_React$Component) {
277
- _inherits(InscreenSensor, _React$Component);
278
-
279
- function InscreenSensor(props) {
280
- _classCallCheck(this, InscreenSensor);
281
-
282
- var _this = _possibleConstructorReturn(this, (InscreenSensor.__proto__ || _Object$getPrototypeOf(InscreenSensor)).call(this, props));
283
-
284
- _this.scrollHandler = function () {
285
- var visible = _this.checkInside();
286
- if (visible !== _this.visible) {
287
- _this.visible = visible;
288
- _this.props.onChange(visible);
289
- }
290
- };
291
-
292
- _this.checkInside = function () {
293
- var rect = _this.wraperRef.current.getBoundingClientRect();
294
- var _this$props$offSetTop = _this.props.offSetTop,
295
- offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
296
- var top = rect.top,
297
- bottom = rect.bottom;
298
-
299
- var viewHeight = window.innerHeight;
300
- var wrpElem = document.getElementsByClassName('inscreen-wrapper');
301
-
302
- if (top > 0 && top <= offSetTop) {
303
- if (wrpElem.length > 1 && top <= viewHeight && bottom > viewHeight) {
304
- return 'top';
305
- } else if (wrpElem.length > 1 && bottom < viewHeight) {
306
- return 'small-top';
307
- }
308
- } else if (wrpElem.length > 1 && top < offSetTop && bottom + offSetTop >= viewHeight) {
309
- return 'bottom';
310
- }
311
- };
312
-
313
- _this.wraperRef = React__default.createRef();
314
- _this.visible = false;
315
- return _this;
316
- }
317
-
318
- _createClass(InscreenSensor, [{
319
- key: 'componentDidMount',
320
- value: function componentDidMount() {
321
- this.visible = this.checkInside();
322
- this.props.onChange(this.visible);
323
- window.addEventListener('scroll', this.scrollHandler);
324
- }
325
- }, {
326
- key: 'componentWillUnmount',
327
- value: function componentWillUnmount() {
328
- window.removeEventListener('scroll', this.scrollHandler);
329
- }
330
- }, {
331
- key: 'render',
332
- value: function render() {
333
- var _props = this.props,
334
- _props$className = _props.className,
335
- className = _props$className === undefined ? '' : _props$className,
336
- _props$style = _props.style,
337
- style = _props$style === undefined ? {} : _props$style,
338
- _props$id = _props.id,
339
- id = _props$id === undefined ? '' : _props$id;
340
-
341
- return React__default.createElement(
342
- 'div',
343
- { ref: this.wraperRef, className: className, style: style, id: id },
344
- this.props.children
345
- );
346
- }
347
- }]);
348
-
349
- return InscreenSensor;
350
- }(React__default.Component);
351
-
352
- export { InscreenSensor as I, isArguments_1 as a, isBuffer_1 as b, isTypedArray_1 as c, isLength_1 as i };