@danielgindi/virtual-list-helper 1.0.6 → 1.0.8
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.
- package/dist/virtual-list-helper.cjs.js +130 -103
- package/dist/virtual-list-helper.cjs.js.map +1 -1
- package/dist/virtual-list-helper.cjs.min.js +2 -2
- package/dist/virtual-list-helper.cjs.min.js.map +1 -1
- package/dist/virtual-list-helper.es6.js +25 -6
- package/dist/virtual-list-helper.es6.js.map +1 -1
- package/dist/virtual-list-helper.es6.min.js +2 -2
- package/dist/virtual-list-helper.es6.min.js.map +1 -1
- package/dist/virtual-list-helper.umd.js +130 -103
- package/dist/virtual-list-helper.umd.js.map +1 -1
- package/dist/virtual-list-helper.umd.min.js +2 -2
- package/dist/virtual-list-helper.umd.min.js.map +1 -1
- package/lib/index.js +24 -5
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/virtual-list-helper 1.0.
|
|
2
|
+
* @danielgindi/virtual-list-helper 1.0.8
|
|
3
3
|
* git://github.com/danielgindi/virtual-list-helper.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -556,6 +556,46 @@ function AsyncFromSyncIterator(s) {
|
|
|
556
556
|
function _awaitAsyncGenerator(value) {
|
|
557
557
|
return new _OverloadYield(value, 0);
|
|
558
558
|
}
|
|
559
|
+
function _checkInRHS(value) {
|
|
560
|
+
if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? typeof value : "null"));
|
|
561
|
+
return value;
|
|
562
|
+
}
|
|
563
|
+
function _iterableToArrayLimit(arr, i) {
|
|
564
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
565
|
+
if (null != _i) {
|
|
566
|
+
var _s,
|
|
567
|
+
_e,
|
|
568
|
+
_x,
|
|
569
|
+
_r,
|
|
570
|
+
_arr = [],
|
|
571
|
+
_n = !0,
|
|
572
|
+
_d = !1;
|
|
573
|
+
try {
|
|
574
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
575
|
+
if (Object(_i) !== _i) return;
|
|
576
|
+
_n = !1;
|
|
577
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
578
|
+
} catch (err) {
|
|
579
|
+
_d = !0, _e = err;
|
|
580
|
+
} finally {
|
|
581
|
+
try {
|
|
582
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
583
|
+
} finally {
|
|
584
|
+
if (_d) throw _e;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
return _arr;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function _iterableToArrayLimitLoose(arr, i) {
|
|
591
|
+
var _i = arr && ("undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
592
|
+
if (null != _i) {
|
|
593
|
+
var _s,
|
|
594
|
+
_arr = [];
|
|
595
|
+
for (_i = _i.call(arr); arr.length < i && !(_s = _i.next()).done;) _arr.push(_s.value);
|
|
596
|
+
return _arr;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
559
599
|
var REACT_ELEMENT_TYPE;
|
|
560
600
|
function _jsx(type, props, key, children) {
|
|
561
601
|
REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103);
|
|
@@ -734,14 +774,9 @@ function _regeneratorRuntime() {
|
|
|
734
774
|
};
|
|
735
775
|
}
|
|
736
776
|
function maybeInvokeDelegate(delegate, context) {
|
|
737
|
-
var
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
741
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
742
|
-
}
|
|
743
|
-
return ContinueSentinel;
|
|
744
|
-
}
|
|
777
|
+
var methodName = context.method,
|
|
778
|
+
method = delegate.iterator[methodName];
|
|
779
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
745
780
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
746
781
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
747
782
|
var info = record.arg;
|
|
@@ -1010,7 +1045,7 @@ function _defineProperties(target, props) {
|
|
|
1010
1045
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
1011
1046
|
descriptor.configurable = true;
|
|
1012
1047
|
if ("value" in descriptor) descriptor.writable = true;
|
|
1013
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1048
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
1014
1049
|
}
|
|
1015
1050
|
}
|
|
1016
1051
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -1052,6 +1087,7 @@ function _defaults(obj, defaults) {
|
|
|
1052
1087
|
return obj;
|
|
1053
1088
|
}
|
|
1054
1089
|
function _defineProperty(obj, key, value) {
|
|
1090
|
+
key = _toPropertyKey(key);
|
|
1055
1091
|
if (key in obj) {
|
|
1056
1092
|
Object.defineProperty(obj, key, {
|
|
1057
1093
|
value: value,
|
|
@@ -1418,40 +1454,6 @@ function _maybeArrayLike(next, arr, i) {
|
|
|
1418
1454
|
function _iterableToArray(iter) {
|
|
1419
1455
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1420
1456
|
}
|
|
1421
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1422
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1423
|
-
if (_i == null) return;
|
|
1424
|
-
var _arr = [];
|
|
1425
|
-
var _n = true;
|
|
1426
|
-
var _d = false;
|
|
1427
|
-
var _s, _e;
|
|
1428
|
-
try {
|
|
1429
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
1430
|
-
_arr.push(_s.value);
|
|
1431
|
-
if (i && _arr.length === i) break;
|
|
1432
|
-
}
|
|
1433
|
-
} catch (err) {
|
|
1434
|
-
_d = true;
|
|
1435
|
-
_e = err;
|
|
1436
|
-
} finally {
|
|
1437
|
-
try {
|
|
1438
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
1439
|
-
} finally {
|
|
1440
|
-
if (_d) throw _e;
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
return _arr;
|
|
1444
|
-
}
|
|
1445
|
-
function _iterableToArrayLimitLoose(arr, i) {
|
|
1446
|
-
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
1447
|
-
if (_i == null) return;
|
|
1448
|
-
var _arr = [];
|
|
1449
|
-
for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
|
|
1450
|
-
_arr.push(_step.value);
|
|
1451
|
-
if (i && _arr.length === i) break;
|
|
1452
|
-
}
|
|
1453
|
-
return _arr;
|
|
1454
|
-
}
|
|
1455
1457
|
function _unsupportedIterableToArray(o, minLen) {
|
|
1456
1458
|
if (!o) return;
|
|
1457
1459
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -2074,7 +2076,13 @@ function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
|
2074
2076
|
function getAugmentedNamespace(n) {
|
|
2075
2077
|
var f = n.default;
|
|
2076
2078
|
if (typeof f == "function") {
|
|
2077
|
-
var a = function () {
|
|
2079
|
+
var a = function a () {
|
|
2080
|
+
if (this instanceof a) {
|
|
2081
|
+
var args = [null];
|
|
2082
|
+
args.push.apply(args, arguments);
|
|
2083
|
+
var Ctor = Function.bind.apply(f, args);
|
|
2084
|
+
return new Ctor();
|
|
2085
|
+
}
|
|
2078
2086
|
return f.apply(this, arguments);
|
|
2079
2087
|
};
|
|
2080
2088
|
a.prototype = f.prototype;
|
|
@@ -2140,31 +2148,12 @@ var FunctionPrototype$2 = Function.prototype;
|
|
|
2140
2148
|
var call$8 = FunctionPrototype$2.call;
|
|
2141
2149
|
var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$8, call$8);
|
|
2142
2150
|
|
|
2143
|
-
var
|
|
2151
|
+
var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
|
|
2144
2152
|
return function () {
|
|
2145
2153
|
return call$8.apply(fn, arguments);
|
|
2146
2154
|
};
|
|
2147
2155
|
};
|
|
2148
2156
|
|
|
2149
|
-
var uncurryThisRaw$1 = functionUncurryThisRaw;
|
|
2150
|
-
|
|
2151
|
-
var toString$6 = uncurryThisRaw$1({}.toString);
|
|
2152
|
-
var stringSlice$1 = uncurryThisRaw$1(''.slice);
|
|
2153
|
-
|
|
2154
|
-
var classofRaw$2 = function (it) {
|
|
2155
|
-
return stringSlice$1(toString$6(it), 8, -1);
|
|
2156
|
-
};
|
|
2157
|
-
|
|
2158
|
-
var classofRaw$1 = classofRaw$2;
|
|
2159
|
-
var uncurryThisRaw = functionUncurryThisRaw;
|
|
2160
|
-
|
|
2161
|
-
var functionUncurryThis = function (fn) {
|
|
2162
|
-
// Nashorn bug:
|
|
2163
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
2164
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
2165
|
-
if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
|
|
2166
|
-
};
|
|
2167
|
-
|
|
2168
2157
|
var documentAll$2 = typeof document == 'object' && document.all;
|
|
2169
2158
|
|
|
2170
2159
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
@@ -2289,9 +2278,9 @@ var getBuiltIn$8 = function (namespace, method) {
|
|
|
2289
2278
|
return arguments.length < 2 ? aFunction(global$c[namespace]) : global$c[namespace] && global$c[namespace][method];
|
|
2290
2279
|
};
|
|
2291
2280
|
|
|
2292
|
-
var uncurryThis$
|
|
2281
|
+
var uncurryThis$k = functionUncurryThis;
|
|
2293
2282
|
|
|
2294
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
2283
|
+
var objectIsPrototypeOf = uncurryThis$k({}.isPrototypeOf);
|
|
2295
2284
|
|
|
2296
2285
|
var getBuiltIn$7 = getBuiltIn$8;
|
|
2297
2286
|
|
|
@@ -2446,10 +2435,10 @@ var store$2 = sharedStore;
|
|
|
2446
2435
|
(shared$6.exports = function (key, value) {
|
|
2447
2436
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
2448
2437
|
})('versions', []).push({
|
|
2449
|
-
version: '3.26.
|
|
2438
|
+
version: '3.26.1',
|
|
2450
2439
|
mode: IS_PURE$1 ? 'pure' : 'global',
|
|
2451
2440
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
2452
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.26.
|
|
2441
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
2453
2442
|
source: 'https://github.com/zloirock/core-js'
|
|
2454
2443
|
});
|
|
2455
2444
|
|
|
@@ -2474,10 +2463,10 @@ var toObject$4 = function (argument) {
|
|
|
2474
2463
|
return $Object$2(requireObjectCoercible$2(argument));
|
|
2475
2464
|
};
|
|
2476
2465
|
|
|
2477
|
-
var uncurryThis$
|
|
2466
|
+
var uncurryThis$j = functionUncurryThis;
|
|
2478
2467
|
var toObject$3 = toObject$4;
|
|
2479
2468
|
|
|
2480
|
-
var hasOwnProperty$1 = uncurryThis$
|
|
2469
|
+
var hasOwnProperty$1 = uncurryThis$j({}.hasOwnProperty);
|
|
2481
2470
|
|
|
2482
2471
|
// `HasOwnProperty` abstract operation
|
|
2483
2472
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -2486,14 +2475,14 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
2486
2475
|
return hasOwnProperty$1(toObject$3(it), key);
|
|
2487
2476
|
};
|
|
2488
2477
|
|
|
2489
|
-
var uncurryThis$
|
|
2478
|
+
var uncurryThis$i = functionUncurryThis;
|
|
2490
2479
|
|
|
2491
2480
|
var id = 0;
|
|
2492
2481
|
var postfix = Math.random();
|
|
2493
|
-
var toString$
|
|
2482
|
+
var toString$6 = uncurryThis$i(1.0.toString);
|
|
2494
2483
|
|
|
2495
2484
|
var uid$3 = function (key) {
|
|
2496
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
2485
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$6(++id + postfix, 36);
|
|
2497
2486
|
};
|
|
2498
2487
|
|
|
2499
2488
|
var global$8 = global$e;
|
|
@@ -2621,11 +2610,11 @@ var functionName = {
|
|
|
2621
2610
|
CONFIGURABLE: CONFIGURABLE
|
|
2622
2611
|
};
|
|
2623
2612
|
|
|
2624
|
-
var uncurryThis$
|
|
2613
|
+
var uncurryThis$h = functionUncurryThis;
|
|
2625
2614
|
var isCallable$9 = isCallable$g;
|
|
2626
2615
|
var store$1 = sharedStore;
|
|
2627
2616
|
|
|
2628
|
-
var functionToString = uncurryThis$
|
|
2617
|
+
var functionToString = uncurryThis$h(Function.toString);
|
|
2629
2618
|
|
|
2630
2619
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
2631
2620
|
if (!isCallable$9(store$1.inspectSource)) {
|
|
@@ -2835,7 +2824,7 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
2835
2824
|
|
|
2836
2825
|
/* eslint-disable no-proto -- safe */
|
|
2837
2826
|
|
|
2838
|
-
var uncurryThis$
|
|
2827
|
+
var uncurryThis$g = functionUncurryThis;
|
|
2839
2828
|
var anObject$4 = anObject$6;
|
|
2840
2829
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
2841
2830
|
|
|
@@ -2849,7 +2838,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
2849
2838
|
var setter;
|
|
2850
2839
|
try {
|
|
2851
2840
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2852
|
-
setter = uncurryThis$
|
|
2841
|
+
setter = uncurryThis$g(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
2853
2842
|
setter(test, []);
|
|
2854
2843
|
CORRECT_SETTER = test instanceof Array;
|
|
2855
2844
|
} catch (error) { /* empty */ }
|
|
@@ -2883,12 +2872,21 @@ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
|
|
|
2883
2872
|
|
|
2884
2873
|
var objectGetOwnPropertyNames = {};
|
|
2885
2874
|
|
|
2886
|
-
var uncurryThis$
|
|
2875
|
+
var uncurryThis$f = functionUncurryThis;
|
|
2876
|
+
|
|
2877
|
+
var toString$5 = uncurryThis$f({}.toString);
|
|
2878
|
+
var stringSlice$1 = uncurryThis$f(''.slice);
|
|
2879
|
+
|
|
2880
|
+
var classofRaw$2 = function (it) {
|
|
2881
|
+
return stringSlice$1(toString$5(it), 8, -1);
|
|
2882
|
+
};
|
|
2883
|
+
|
|
2884
|
+
var uncurryThis$e = functionUncurryThis;
|
|
2887
2885
|
var fails$7 = fails$f;
|
|
2888
2886
|
var classof$6 = classofRaw$2;
|
|
2889
2887
|
|
|
2890
2888
|
var $Object$1 = Object;
|
|
2891
|
-
var split = uncurryThis$
|
|
2889
|
+
var split = uncurryThis$e(''.split);
|
|
2892
2890
|
|
|
2893
2891
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
2894
2892
|
var indexedObject = fails$7(function () {
|
|
@@ -2992,13 +2990,13 @@ var arrayIncludes = {
|
|
|
2992
2990
|
indexOf: createMethod$2(false)
|
|
2993
2991
|
};
|
|
2994
2992
|
|
|
2995
|
-
var uncurryThis$
|
|
2993
|
+
var uncurryThis$d = functionUncurryThis;
|
|
2996
2994
|
var hasOwn$9 = hasOwnProperty_1;
|
|
2997
2995
|
var toIndexedObject$4 = toIndexedObject$6;
|
|
2998
2996
|
var indexOf = arrayIncludes.indexOf;
|
|
2999
2997
|
var hiddenKeys$3 = hiddenKeys$5;
|
|
3000
2998
|
|
|
3001
|
-
var push$2 = uncurryThis$
|
|
2999
|
+
var push$2 = uncurryThis$d([].push);
|
|
3002
3000
|
|
|
3003
3001
|
var objectKeysInternal = function (object, names) {
|
|
3004
3002
|
var O = toIndexedObject$4(object);
|
|
@@ -3078,11 +3076,11 @@ var f$4 = objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDesc
|
|
|
3078
3076
|
if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$4(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
3079
3077
|
};
|
|
3080
3078
|
|
|
3081
|
-
var uncurryThis$
|
|
3079
|
+
var uncurryThis$c = functionUncurryThis;
|
|
3082
3080
|
|
|
3083
3081
|
// `thisNumberValue` abstract operation
|
|
3084
3082
|
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
3085
|
-
var thisNumberValue$1 = uncurryThis$
|
|
3083
|
+
var thisNumberValue$1 = uncurryThis$c(1.0.valueOf);
|
|
3086
3084
|
|
|
3087
3085
|
var wellKnownSymbol$8 = wellKnownSymbol$a;
|
|
3088
3086
|
|
|
@@ -3095,14 +3093,14 @@ var toStringTagSupport = String(test) === '[object z]';
|
|
|
3095
3093
|
|
|
3096
3094
|
var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
|
|
3097
3095
|
var isCallable$3 = isCallable$g;
|
|
3098
|
-
var classofRaw = classofRaw$2;
|
|
3096
|
+
var classofRaw$1 = classofRaw$2;
|
|
3099
3097
|
var wellKnownSymbol$7 = wellKnownSymbol$a;
|
|
3100
3098
|
|
|
3101
3099
|
var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
|
|
3102
3100
|
var $Object = Object;
|
|
3103
3101
|
|
|
3104
3102
|
// ES3 wrong here
|
|
3105
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
3103
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
|
|
3106
3104
|
|
|
3107
3105
|
// fallback for IE11 Script Access Denied error
|
|
3108
3106
|
var tryGet = function (it, key) {
|
|
@@ -3112,15 +3110,15 @@ var tryGet = function (it, key) {
|
|
|
3112
3110
|
};
|
|
3113
3111
|
|
|
3114
3112
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
3115
|
-
var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
|
|
3113
|
+
var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
|
|
3116
3114
|
var O, tag, result;
|
|
3117
3115
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
3118
3116
|
// @@toStringTag case
|
|
3119
3117
|
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
3120
3118
|
// builtinTag case
|
|
3121
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
3119
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
3122
3120
|
// ES3 arguments fallback
|
|
3123
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
|
|
3121
|
+
: (result = classofRaw$1(O)) == 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
|
|
3124
3122
|
};
|
|
3125
3123
|
|
|
3126
3124
|
var classof$4 = classof$5;
|
|
@@ -3136,12 +3134,12 @@ var toString$4 = function (argument) {
|
|
|
3136
3134
|
var whitespaces$1 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
3137
3135
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
3138
3136
|
|
|
3139
|
-
var uncurryThis$
|
|
3137
|
+
var uncurryThis$b = functionUncurryThis;
|
|
3140
3138
|
var requireObjectCoercible = requireObjectCoercible$3;
|
|
3141
3139
|
var toString$3 = toString$4;
|
|
3142
3140
|
var whitespaces = whitespaces$1;
|
|
3143
3141
|
|
|
3144
|
-
var replace$2 = uncurryThis$
|
|
3142
|
+
var replace$2 = uncurryThis$b(''.replace);
|
|
3145
3143
|
var whitespace = '[' + whitespaces + ']';
|
|
3146
3144
|
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
3147
3145
|
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
@@ -3171,7 +3169,7 @@ var stringTrim = {
|
|
|
3171
3169
|
'use strict';
|
|
3172
3170
|
var DESCRIPTORS$4 = descriptors;
|
|
3173
3171
|
var global$5 = global$e;
|
|
3174
|
-
var uncurryThis$
|
|
3172
|
+
var uncurryThis$a = functionUncurryThis;
|
|
3175
3173
|
var isForced$1 = isForced_1;
|
|
3176
3174
|
var defineBuiltIn$4 = defineBuiltIn$5;
|
|
3177
3175
|
var hasOwn$7 = hasOwnProperty_1;
|
|
@@ -3190,8 +3188,8 @@ var NUMBER = 'Number';
|
|
|
3190
3188
|
var NativeNumber = global$5[NUMBER];
|
|
3191
3189
|
var NumberPrototype = NativeNumber.prototype;
|
|
3192
3190
|
var TypeError$2 = global$5.TypeError;
|
|
3193
|
-
var arraySlice$3 = uncurryThis$
|
|
3194
|
-
var charCodeAt$1 = uncurryThis$
|
|
3191
|
+
var arraySlice$3 = uncurryThis$a(''.slice);
|
|
3192
|
+
var charCodeAt$1 = uncurryThis$a(''.charCodeAt);
|
|
3195
3193
|
|
|
3196
3194
|
// `ToNumeric` abstract operation
|
|
3197
3195
|
// https://tc39.es/ecma262/#sec-tonumeric
|
|
@@ -3265,12 +3263,12 @@ var objectGetOwnPropertySymbols = {};
|
|
|
3265
3263
|
var f$3 = objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
3266
3264
|
|
|
3267
3265
|
var getBuiltIn$5 = getBuiltIn$8;
|
|
3268
|
-
var uncurryThis$
|
|
3266
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
3269
3267
|
var getOwnPropertyNamesModule$1 = objectGetOwnPropertyNames;
|
|
3270
3268
|
var getOwnPropertySymbolsModule$2 = objectGetOwnPropertySymbols;
|
|
3271
3269
|
var anObject$3 = anObject$6;
|
|
3272
3270
|
|
|
3273
|
-
var concat = uncurryThis$
|
|
3271
|
+
var concat = uncurryThis$9([].concat);
|
|
3274
3272
|
|
|
3275
3273
|
// all object keys, includes non-enumerable and symbols
|
|
3276
3274
|
var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -3351,7 +3349,17 @@ var _export = function (options, source) {
|
|
|
3351
3349
|
}
|
|
3352
3350
|
};
|
|
3353
3351
|
|
|
3354
|
-
var
|
|
3352
|
+
var classofRaw = classofRaw$2;
|
|
3353
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
3354
|
+
|
|
3355
|
+
var functionUncurryThisClause = function (fn) {
|
|
3356
|
+
// Nashorn bug:
|
|
3357
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
3358
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
3359
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$8(fn);
|
|
3360
|
+
};
|
|
3361
|
+
|
|
3362
|
+
var uncurryThis$7 = functionUncurryThisClause;
|
|
3355
3363
|
var aCallable = aCallable$2;
|
|
3356
3364
|
var NATIVE_BIND$1 = functionBindNative;
|
|
3357
3365
|
|
|
@@ -3881,7 +3889,7 @@ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
|
3881
3889
|
'use strict';
|
|
3882
3890
|
/* eslint-disable es/no-array-prototype-indexof -- required for testing */
|
|
3883
3891
|
var $$6 = _export;
|
|
3884
|
-
var uncurryThis$4 =
|
|
3892
|
+
var uncurryThis$4 = functionUncurryThisClause;
|
|
3885
3893
|
var $indexOf = arrayIncludes.indexOf;
|
|
3886
3894
|
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
3887
3895
|
|
|
@@ -4512,6 +4520,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
|
|
|
4512
4520
|
* @property {VirtualListHelper~ItemElementCreatorFunction} [itemElementCreatorFn] an optional function for providing fresh item elements (default creates `<li />`s)
|
|
4513
4521
|
* @property {VirtualListHelper~ItemRenderFunction} [onItemRender] a function for rendering element content based on item index
|
|
4514
4522
|
* @property {VirtualListHelper~ItemUnrenderFunction} [onItemUnrender] a function for freeing resources in an item element
|
|
4523
|
+
* @property {function(height: number)} [onScrollHeightChange] a function to be notified when scroll height changes
|
|
4515
4524
|
*
|
|
4516
4525
|
*/
|
|
4517
4526
|
|
|
@@ -4524,9 +4533,9 @@ var hasInsertAdjacentElement = Element.prototype.insertAdjacentElement !== undef
|
|
|
4524
4533
|
function insertBefore(el, before, parent) {
|
|
4525
4534
|
if (!before)
|
|
4526
4535
|
parent.appendChild(el);else
|
|
4527
|
-
if (hasInsertAdjacentElement ===
|
|
4528
|
-
|
|
4529
|
-
|
|
4536
|
+
if (hasInsertAdjacentElement === false || el instanceof DocumentFragment)
|
|
4537
|
+
parent.insertBefore(el, before);else
|
|
4538
|
+
before.insertAdjacentElement('beforebegin', el);
|
|
4530
4539
|
}
|
|
4531
4540
|
|
|
4532
4541
|
/**
|
|
@@ -4586,6 +4595,8 @@ function insertBeforeWithFragment(itemEl, fragment, before, itemParent) {
|
|
|
4586
4595
|
/** @type VirtualListHelper~ItemUnrenderFunction|null */
|
|
4587
4596
|
onItemUnrender: null,
|
|
4588
4597
|
|
|
4598
|
+
onScrollHeightChange: opts.onScrollHeightChange,
|
|
4599
|
+
|
|
4589
4600
|
// internal:
|
|
4590
4601
|
|
|
4591
4602
|
/** @type Element|null */
|
|
@@ -4852,6 +4863,17 @@ function insertBeforeWithFragment(itemEl, fragment, before, itemParent) {
|
|
|
4852
4863
|
return this;
|
|
4853
4864
|
}
|
|
4854
4865
|
|
|
4866
|
+
/**
|
|
4867
|
+
* The `onScrollHeightChange` is a function called when the scroll height changes.
|
|
4868
|
+
* @param {function(height: number)} fn
|
|
4869
|
+
* @returns {VirtualListHelper}
|
|
4870
|
+
*/ }, { key: "setOnScrollHeightChange", value:
|
|
4871
|
+
function setOnScrollHeightChange(fn) {
|
|
4872
|
+
var p = this._p;
|
|
4873
|
+
p.onScrollHeightChange = fn;
|
|
4874
|
+
return this;
|
|
4875
|
+
}
|
|
4876
|
+
|
|
4855
4877
|
/**
|
|
4856
4878
|
* Estimates the full scroll height. This gets better as more renderings occur.
|
|
4857
4879
|
* @returns {number}
|
|
@@ -5066,7 +5088,12 @@ function insertBeforeWithFragment(itemEl, fragment, before, itemParent) {
|
|
|
5066
5088
|
|
|
5067
5089
|
// Calculate up-to-date scroll height
|
|
5068
5090
|
var scrollHeight = this.estimateFullHeight();
|
|
5069
|
-
|
|
5091
|
+
var scrollHeightPx = scrollHeight + 'px';
|
|
5092
|
+
|
|
5093
|
+
if (virtualWrapper.style.height !== scrollHeightPx) {var _p$onScrollHeightChan;
|
|
5094
|
+
p.virtualWrapper.style.height = scrollHeightPx;
|
|
5095
|
+
(_p$onScrollHeightChan = p.onScrollHeightChange) === null || _p$onScrollHeightChan === void 0 ? void 0 : _p$onScrollHeightChan.call(p, scrollHeight);
|
|
5096
|
+
}
|
|
5070
5097
|
|
|
5071
5098
|
if (originalWidth !== list.clientWidth)
|
|
5072
5099
|
this.render();
|
|
@@ -5077,7 +5104,7 @@ function insertBeforeWithFragment(itemEl, fragment, before, itemParent) {
|
|
|
5077
5104
|
}
|
|
5078
5105
|
|
|
5079
5106
|
// Find the element to insert before
|
|
5080
|
-
var _before =
|
|
5107
|
+
var _before = itemParent.childNodes[0];
|
|
5081
5108
|
|
|
5082
5109
|
/** @type DocumentFragment|null */
|
|
5083
5110
|
var _fragment = null;var _loop = function _loop(
|