@revolist/revogrid 3.2.13 → 3.2.16

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 (62) hide show
  1. package/custom-element/_baseIteratee.js +2070 -0
  2. package/custom-element/columnService.js +743 -0
  3. package/custom-element/consts.js +46 -0
  4. package/custom-element/data.store.js +545 -0
  5. package/custom-element/debounce.js +217 -0
  6. package/custom-element/dimension.helpers.js +340 -0
  7. package/custom-element/each.js +180 -0
  8. package/custom-element/filter.button.js +36 -0
  9. package/custom-element/identity.js +26 -0
  10. package/custom-element/index.d.ts +15 -98
  11. package/custom-element/index.js +15 -29221
  12. package/custom-element/isSymbol.js +220 -0
  13. package/custom-element/keys.js +561 -0
  14. package/custom-element/localScrollService.js +86 -0
  15. package/custom-element/revo-grid.d.ts +11 -0
  16. package/custom-element/revo-grid.js +3662 -0
  17. package/custom-element/revogr-clipboard.d.ts +11 -0
  18. package/custom-element/revogr-clipboard.js +72 -0
  19. package/custom-element/revogr-data.d.ts +11 -0
  20. package/custom-element/revogr-data.js +9 -0
  21. package/custom-element/revogr-data2.js +171 -0
  22. package/custom-element/revogr-edit.d.ts +11 -0
  23. package/custom-element/revogr-edit.js +9 -0
  24. package/custom-element/revogr-edit2.js +402 -0
  25. package/custom-element/revogr-filter-panel.d.ts +11 -0
  26. package/custom-element/revogr-filter-panel.js +308 -0
  27. package/custom-element/revogr-focus.d.ts +11 -0
  28. package/custom-element/revogr-focus.js +9 -0
  29. package/custom-element/revogr-focus2.js +64 -0
  30. package/custom-element/revogr-header.d.ts +11 -0
  31. package/custom-element/revogr-header.js +9 -0
  32. package/custom-element/revogr-header2.js +591 -0
  33. package/custom-element/revogr-order-editor.d.ts +11 -0
  34. package/custom-element/revogr-order-editor.js +9 -0
  35. package/custom-element/revogr-order-editor2.js +190 -0
  36. package/custom-element/revogr-overlay-selection.d.ts +11 -0
  37. package/custom-element/revogr-overlay-selection.js +9 -0
  38. package/custom-element/revogr-overlay-selection2.js +741 -0
  39. package/custom-element/revogr-row-headers.d.ts +11 -0
  40. package/custom-element/revogr-row-headers.js +9 -0
  41. package/custom-element/revogr-row-headers2.js +403 -0
  42. package/custom-element/revogr-scroll-virtual.d.ts +11 -0
  43. package/custom-element/revogr-scroll-virtual.js +9 -0
  44. package/custom-element/revogr-scroll-virtual2.js +135 -0
  45. package/custom-element/revogr-temp-range.d.ts +11 -0
  46. package/custom-element/revogr-temp-range.js +9 -0
  47. package/custom-element/revogr-temp-range2.js +17275 -0
  48. package/custom-element/revogr-viewport-scroll.d.ts +11 -0
  49. package/custom-element/revogr-viewport-scroll.js +9 -0
  50. package/custom-element/revogr-viewport-scroll2.js +367 -0
  51. package/custom-element/selection.utils.js +106 -0
  52. package/custom-element/toInteger.js +107 -0
  53. package/custom-element/toNumber.js +105 -0
  54. package/custom-element/utils.js +69 -0
  55. package/dist/cjs/revo-grid_11.cjs.entry.js +1 -1
  56. package/dist/collection/plugins/filter/filter.plugin.js +1 -1
  57. package/dist/collection/utilsExternal/generate-data.js +1 -0
  58. package/dist/esm/revo-grid_11.entry.js +1 -1
  59. package/dist/esm-es5/revo-grid_11.entry.js +1 -1
  60. package/dist/revo-grid/revo-grid_11.entry.js +1 -1
  61. package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
  62. package/package.json +2 -2
@@ -0,0 +1,561 @@
1
+ /*!
2
+ * Built by Revolist
3
+ */
4
+ import { i as isObjectLike_1, _ as _baseGetTag, c as createCommonjsModule, e as _root, g as _freeGlobal, b as isObject_1 } from './isSymbol.js';
5
+
6
+ /**
7
+ * The base implementation of `_.times` without support for iteratee shorthands
8
+ * or max array length checks.
9
+ *
10
+ * @private
11
+ * @param {number} n The number of times to invoke `iteratee`.
12
+ * @param {Function} iteratee The function invoked per iteration.
13
+ * @returns {Array} Returns the array of results.
14
+ */
15
+ function baseTimes(n, iteratee) {
16
+ var index = -1,
17
+ result = Array(n);
18
+
19
+ while (++index < n) {
20
+ result[index] = iteratee(index);
21
+ }
22
+ return result;
23
+ }
24
+
25
+ var _baseTimes = baseTimes;
26
+
27
+ /** `Object#toString` result references. */
28
+ var argsTag$1 = '[object Arguments]';
29
+
30
+ /**
31
+ * The base implementation of `_.isArguments`.
32
+ *
33
+ * @private
34
+ * @param {*} value The value to check.
35
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
36
+ */
37
+ function baseIsArguments(value) {
38
+ return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
39
+ }
40
+
41
+ var _baseIsArguments = baseIsArguments;
42
+
43
+ /** Used for built-in method references. */
44
+ var objectProto$3 = Object.prototype;
45
+
46
+ /** Used to check objects for own properties. */
47
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
48
+
49
+ /** Built-in value references. */
50
+ var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
51
+
52
+ /**
53
+ * Checks if `value` is likely an `arguments` object.
54
+ *
55
+ * @static
56
+ * @memberOf _
57
+ * @since 0.1.0
58
+ * @category Lang
59
+ * @param {*} value The value to check.
60
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
61
+ * else `false`.
62
+ * @example
63
+ *
64
+ * _.isArguments(function() { return arguments; }());
65
+ * // => true
66
+ *
67
+ * _.isArguments([1, 2, 3]);
68
+ * // => false
69
+ */
70
+ var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
71
+ return isObjectLike_1(value) && hasOwnProperty$2.call(value, 'callee') &&
72
+ !propertyIsEnumerable.call(value, 'callee');
73
+ };
74
+
75
+ var isArguments_1 = isArguments;
76
+
77
+ /**
78
+ * Checks if `value` is classified as an `Array` object.
79
+ *
80
+ * @static
81
+ * @memberOf _
82
+ * @since 0.1.0
83
+ * @category Lang
84
+ * @param {*} value The value to check.
85
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
86
+ * @example
87
+ *
88
+ * _.isArray([1, 2, 3]);
89
+ * // => true
90
+ *
91
+ * _.isArray(document.body.children);
92
+ * // => false
93
+ *
94
+ * _.isArray('abc');
95
+ * // => false
96
+ *
97
+ * _.isArray(_.noop);
98
+ * // => false
99
+ */
100
+ var isArray = Array.isArray;
101
+
102
+ var isArray_1 = isArray;
103
+
104
+ /**
105
+ * This method returns `false`.
106
+ *
107
+ * @static
108
+ * @memberOf _
109
+ * @since 4.13.0
110
+ * @category Util
111
+ * @returns {boolean} Returns `false`.
112
+ * @example
113
+ *
114
+ * _.times(2, _.stubFalse);
115
+ * // => [false, false]
116
+ */
117
+ function stubFalse() {
118
+ return false;
119
+ }
120
+
121
+ var stubFalse_1 = stubFalse;
122
+
123
+ var isBuffer_1 = createCommonjsModule(function (module, exports) {
124
+ /** Detect free variable `exports`. */
125
+ var freeExports = exports && !exports.nodeType && exports;
126
+
127
+ /** Detect free variable `module`. */
128
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
129
+
130
+ /** Detect the popular CommonJS extension `module.exports`. */
131
+ var moduleExports = freeModule && freeModule.exports === freeExports;
132
+
133
+ /** Built-in value references. */
134
+ var Buffer = moduleExports ? _root.Buffer : undefined;
135
+
136
+ /* Built-in method references for those with the same name as other `lodash` methods. */
137
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
138
+
139
+ /**
140
+ * Checks if `value` is a buffer.
141
+ *
142
+ * @static
143
+ * @memberOf _
144
+ * @since 4.3.0
145
+ * @category Lang
146
+ * @param {*} value The value to check.
147
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
148
+ * @example
149
+ *
150
+ * _.isBuffer(new Buffer(2));
151
+ * // => true
152
+ *
153
+ * _.isBuffer(new Uint8Array(2));
154
+ * // => false
155
+ */
156
+ var isBuffer = nativeIsBuffer || stubFalse_1;
157
+
158
+ module.exports = isBuffer;
159
+ });
160
+
161
+ /** Used as references for various `Number` constants. */
162
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
163
+
164
+ /** Used to detect unsigned integer values. */
165
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
166
+
167
+ /**
168
+ * Checks if `value` is a valid array-like index.
169
+ *
170
+ * @private
171
+ * @param {*} value The value to check.
172
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
173
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
174
+ */
175
+ function isIndex(value, length) {
176
+ var type = typeof value;
177
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
178
+
179
+ return !!length &&
180
+ (type == 'number' ||
181
+ (type != 'symbol' && reIsUint.test(value))) &&
182
+ (value > -1 && value % 1 == 0 && value < length);
183
+ }
184
+
185
+ var _isIndex = isIndex;
186
+
187
+ /** Used as references for various `Number` constants. */
188
+ var MAX_SAFE_INTEGER = 9007199254740991;
189
+
190
+ /**
191
+ * Checks if `value` is a valid array-like length.
192
+ *
193
+ * **Note:** This method is loosely based on
194
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
195
+ *
196
+ * @static
197
+ * @memberOf _
198
+ * @since 4.0.0
199
+ * @category Lang
200
+ * @param {*} value The value to check.
201
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
202
+ * @example
203
+ *
204
+ * _.isLength(3);
205
+ * // => true
206
+ *
207
+ * _.isLength(Number.MIN_VALUE);
208
+ * // => false
209
+ *
210
+ * _.isLength(Infinity);
211
+ * // => false
212
+ *
213
+ * _.isLength('3');
214
+ * // => false
215
+ */
216
+ function isLength(value) {
217
+ return typeof value == 'number' &&
218
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
219
+ }
220
+
221
+ var isLength_1 = isLength;
222
+
223
+ /** `Object#toString` result references. */
224
+ var argsTag = '[object Arguments]',
225
+ arrayTag = '[object Array]',
226
+ boolTag = '[object Boolean]',
227
+ dateTag = '[object Date]',
228
+ errorTag = '[object Error]',
229
+ funcTag$1 = '[object Function]',
230
+ mapTag = '[object Map]',
231
+ numberTag = '[object Number]',
232
+ objectTag = '[object Object]',
233
+ regexpTag = '[object RegExp]',
234
+ setTag = '[object Set]',
235
+ stringTag = '[object String]',
236
+ weakMapTag = '[object WeakMap]';
237
+
238
+ var arrayBufferTag = '[object ArrayBuffer]',
239
+ dataViewTag = '[object DataView]',
240
+ float32Tag = '[object Float32Array]',
241
+ float64Tag = '[object Float64Array]',
242
+ int8Tag = '[object Int8Array]',
243
+ int16Tag = '[object Int16Array]',
244
+ int32Tag = '[object Int32Array]',
245
+ uint8Tag = '[object Uint8Array]',
246
+ uint8ClampedTag = '[object Uint8ClampedArray]',
247
+ uint16Tag = '[object Uint16Array]',
248
+ uint32Tag = '[object Uint32Array]';
249
+
250
+ /** Used to identify `toStringTag` values of typed arrays. */
251
+ var typedArrayTags = {};
252
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
253
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
254
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
255
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
256
+ typedArrayTags[uint32Tag] = true;
257
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
258
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
259
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
260
+ typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
261
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
262
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
263
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
264
+ typedArrayTags[weakMapTag] = false;
265
+
266
+ /**
267
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
268
+ *
269
+ * @private
270
+ * @param {*} value The value to check.
271
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
272
+ */
273
+ function baseIsTypedArray(value) {
274
+ return isObjectLike_1(value) &&
275
+ isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
276
+ }
277
+
278
+ var _baseIsTypedArray = baseIsTypedArray;
279
+
280
+ /**
281
+ * The base implementation of `_.unary` without support for storing metadata.
282
+ *
283
+ * @private
284
+ * @param {Function} func The function to cap arguments for.
285
+ * @returns {Function} Returns the new capped function.
286
+ */
287
+ function baseUnary(func) {
288
+ return function(value) {
289
+ return func(value);
290
+ };
291
+ }
292
+
293
+ var _baseUnary = baseUnary;
294
+
295
+ var _nodeUtil = createCommonjsModule(function (module, exports) {
296
+ /** Detect free variable `exports`. */
297
+ var freeExports = exports && !exports.nodeType && exports;
298
+
299
+ /** Detect free variable `module`. */
300
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
301
+
302
+ /** Detect the popular CommonJS extension `module.exports`. */
303
+ var moduleExports = freeModule && freeModule.exports === freeExports;
304
+
305
+ /** Detect free variable `process` from Node.js. */
306
+ var freeProcess = moduleExports && _freeGlobal.process;
307
+
308
+ /** Used to access faster Node.js helpers. */
309
+ var nodeUtil = (function() {
310
+ try {
311
+ // Use `util.types` for Node.js 10+.
312
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
313
+
314
+ if (types) {
315
+ return types;
316
+ }
317
+
318
+ // Legacy `process.binding('util')` for Node.js < 10.
319
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
320
+ } catch (e) {}
321
+ }());
322
+
323
+ module.exports = nodeUtil;
324
+ });
325
+
326
+ /* Node.js helper references. */
327
+ var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
328
+
329
+ /**
330
+ * Checks if `value` is classified as a typed array.
331
+ *
332
+ * @static
333
+ * @memberOf _
334
+ * @since 3.0.0
335
+ * @category Lang
336
+ * @param {*} value The value to check.
337
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
338
+ * @example
339
+ *
340
+ * _.isTypedArray(new Uint8Array);
341
+ * // => true
342
+ *
343
+ * _.isTypedArray([]);
344
+ * // => false
345
+ */
346
+ var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
347
+
348
+ var isTypedArray_1 = isTypedArray;
349
+
350
+ /** Used for built-in method references. */
351
+ var objectProto$2 = Object.prototype;
352
+
353
+ /** Used to check objects for own properties. */
354
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
355
+
356
+ /**
357
+ * Creates an array of the enumerable property names of the array-like `value`.
358
+ *
359
+ * @private
360
+ * @param {*} value The value to query.
361
+ * @param {boolean} inherited Specify returning inherited property names.
362
+ * @returns {Array} Returns the array of property names.
363
+ */
364
+ function arrayLikeKeys(value, inherited) {
365
+ var isArr = isArray_1(value),
366
+ isArg = !isArr && isArguments_1(value),
367
+ isBuff = !isArr && !isArg && isBuffer_1(value),
368
+ isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
369
+ skipIndexes = isArr || isArg || isBuff || isType,
370
+ result = skipIndexes ? _baseTimes(value.length, String) : [],
371
+ length = result.length;
372
+
373
+ for (var key in value) {
374
+ if ((inherited || hasOwnProperty$1.call(value, key)) &&
375
+ !(skipIndexes && (
376
+ // Safari 9 has enumerable `arguments.length` in strict mode.
377
+ key == 'length' ||
378
+ // Node.js 0.10 has enumerable non-index properties on buffers.
379
+ (isBuff && (key == 'offset' || key == 'parent')) ||
380
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
381
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
382
+ // Skip index properties.
383
+ _isIndex(key, length)
384
+ ))) {
385
+ result.push(key);
386
+ }
387
+ }
388
+ return result;
389
+ }
390
+
391
+ var _arrayLikeKeys = arrayLikeKeys;
392
+
393
+ /** Used for built-in method references. */
394
+ var objectProto$1 = Object.prototype;
395
+
396
+ /**
397
+ * Checks if `value` is likely a prototype object.
398
+ *
399
+ * @private
400
+ * @param {*} value The value to check.
401
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
402
+ */
403
+ function isPrototype(value) {
404
+ var Ctor = value && value.constructor,
405
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$1;
406
+
407
+ return value === proto;
408
+ }
409
+
410
+ var _isPrototype = isPrototype;
411
+
412
+ /**
413
+ * Creates a unary function that invokes `func` with its argument transformed.
414
+ *
415
+ * @private
416
+ * @param {Function} func The function to wrap.
417
+ * @param {Function} transform The argument transform.
418
+ * @returns {Function} Returns the new function.
419
+ */
420
+ function overArg(func, transform) {
421
+ return function(arg) {
422
+ return func(transform(arg));
423
+ };
424
+ }
425
+
426
+ var _overArg = overArg;
427
+
428
+ /* Built-in method references for those with the same name as other `lodash` methods. */
429
+ var nativeKeys = _overArg(Object.keys, Object);
430
+
431
+ var _nativeKeys = nativeKeys;
432
+
433
+ /** Used for built-in method references. */
434
+ var objectProto = Object.prototype;
435
+
436
+ /** Used to check objects for own properties. */
437
+ var hasOwnProperty = objectProto.hasOwnProperty;
438
+
439
+ /**
440
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
441
+ *
442
+ * @private
443
+ * @param {Object} object The object to query.
444
+ * @returns {Array} Returns the array of property names.
445
+ */
446
+ function baseKeys(object) {
447
+ if (!_isPrototype(object)) {
448
+ return _nativeKeys(object);
449
+ }
450
+ var result = [];
451
+ for (var key in Object(object)) {
452
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
453
+ result.push(key);
454
+ }
455
+ }
456
+ return result;
457
+ }
458
+
459
+ var _baseKeys = baseKeys;
460
+
461
+ /** `Object#toString` result references. */
462
+ var asyncTag = '[object AsyncFunction]',
463
+ funcTag = '[object Function]',
464
+ genTag = '[object GeneratorFunction]',
465
+ proxyTag = '[object Proxy]';
466
+
467
+ /**
468
+ * Checks if `value` is classified as a `Function` object.
469
+ *
470
+ * @static
471
+ * @memberOf _
472
+ * @since 0.1.0
473
+ * @category Lang
474
+ * @param {*} value The value to check.
475
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
476
+ * @example
477
+ *
478
+ * _.isFunction(_);
479
+ * // => true
480
+ *
481
+ * _.isFunction(/abc/);
482
+ * // => false
483
+ */
484
+ function isFunction(value) {
485
+ if (!isObject_1(value)) {
486
+ return false;
487
+ }
488
+ // The use of `Object#toString` avoids issues with the `typeof` operator
489
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
490
+ var tag = _baseGetTag(value);
491
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
492
+ }
493
+
494
+ var isFunction_1 = isFunction;
495
+
496
+ /**
497
+ * Checks if `value` is array-like. A value is considered array-like if it's
498
+ * not a function and has a `value.length` that's an integer greater than or
499
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
500
+ *
501
+ * @static
502
+ * @memberOf _
503
+ * @since 4.0.0
504
+ * @category Lang
505
+ * @param {*} value The value to check.
506
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
507
+ * @example
508
+ *
509
+ * _.isArrayLike([1, 2, 3]);
510
+ * // => true
511
+ *
512
+ * _.isArrayLike(document.body.children);
513
+ * // => true
514
+ *
515
+ * _.isArrayLike('abc');
516
+ * // => true
517
+ *
518
+ * _.isArrayLike(_.noop);
519
+ * // => false
520
+ */
521
+ function isArrayLike(value) {
522
+ return value != null && isLength_1(value.length) && !isFunction_1(value);
523
+ }
524
+
525
+ var isArrayLike_1 = isArrayLike;
526
+
527
+ /**
528
+ * Creates an array of the own enumerable property names of `object`.
529
+ *
530
+ * **Note:** Non-object values are coerced to objects. See the
531
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
532
+ * for more details.
533
+ *
534
+ * @static
535
+ * @since 0.1.0
536
+ * @memberOf _
537
+ * @category Object
538
+ * @param {Object} object The object to query.
539
+ * @returns {Array} Returns the array of property names.
540
+ * @example
541
+ *
542
+ * function Foo() {
543
+ * this.a = 1;
544
+ * this.b = 2;
545
+ * }
546
+ *
547
+ * Foo.prototype.c = 3;
548
+ *
549
+ * _.keys(new Foo);
550
+ * // => ['a', 'b'] (iteration order is not guaranteed)
551
+ *
552
+ * _.keys('hi');
553
+ * // => ['0', '1']
554
+ */
555
+ function keys(object) {
556
+ return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
557
+ }
558
+
559
+ var keys_1 = keys;
560
+
561
+ export { _baseKeys as _, isArray_1 as a, _isIndex as b, isFunction_1 as c, isBuffer_1 as d, isTypedArray_1 as e, isLength_1 as f, isArguments_1 as g, isArrayLike_1 as i, keys_1 as k };
@@ -0,0 +1,86 @@
1
+ /*!
2
+ * Built by Revolist
3
+ */
4
+ import { s as scaleValue } from './utils.js';
5
+
6
+ const initialParams = {
7
+ contentSize: 0,
8
+ clientSize: 0,
9
+ virtualSize: 0,
10
+ maxSize: 0,
11
+ };
12
+ class LocalScrollService {
13
+ constructor(cfg) {
14
+ this.cfg = cfg;
15
+ this.preventArtificialScroll = { rgRow: null, rgCol: null };
16
+ // to check if scroll changed
17
+ this.previousScroll = { rgRow: 0, rgCol: 0 };
18
+ this.params = { rgRow: Object.assign({}, initialParams), rgCol: Object.assign({}, initialParams) };
19
+ }
20
+ static getVirtualContentSize(contentSize, clientSize, virtualSize = 0) {
21
+ return contentSize + (virtualSize ? clientSize - virtualSize : 0);
22
+ }
23
+ setParams(params, dimension) {
24
+ const virtualContentSize = LocalScrollService.getVirtualContentSize(params.contentSize, params.clientSize, params.virtualSize);
25
+ this.params[dimension] = Object.assign(Object.assign({}, params), { maxSize: virtualContentSize - params.clientSize, virtualContentSize });
26
+ }
27
+ // apply scroll values after scroll done
28
+ setScroll(e) {
29
+ this.cancelScroll(e.dimension);
30
+ this.preventArtificialScroll[e.dimension] = window.requestAnimationFrame(() => {
31
+ const params = this.getParams(e.dimension);
32
+ e.coordinate = Math.ceil(e.coordinate);
33
+ this.previousScroll[e.dimension] = this.wrapCoordinate(e.coordinate, params);
34
+ this.preventArtificialScroll[e.dimension] = null;
35
+ this.cfg.afterScroll(Object.assign(Object.assign({}, e), { coordinate: params.virtualSize ? this.convert(e.coordinate, params, false) : e.coordinate }));
36
+ });
37
+ }
38
+ // initiate scrolling event
39
+ scroll(coordinate, dimension, force = false, delta) {
40
+ this.cancelScroll(dimension);
41
+ if (!force && this.previousScroll[dimension] === coordinate) {
42
+ this.previousScroll[dimension] = 0;
43
+ return;
44
+ }
45
+ const param = this.getParams(dimension);
46
+ this.cfg.beforeScroll({
47
+ dimension: dimension,
48
+ coordinate: param.virtualSize ? this.convert(coordinate, param) : coordinate,
49
+ delta,
50
+ });
51
+ }
52
+ getParams(dimension) {
53
+ return this.params[dimension];
54
+ }
55
+ // check if scroll outside of region to avoid looping
56
+ wrapCoordinate(c, param) {
57
+ if (c < 0) {
58
+ return 0;
59
+ }
60
+ if (c > param.maxSize) {
61
+ return param.maxSize;
62
+ }
63
+ return c;
64
+ }
65
+ // prevent already started scroll, performance optimization
66
+ cancelScroll(dimension) {
67
+ if (typeof this.preventArtificialScroll[dimension] === 'number') {
68
+ window.cancelAnimationFrame(this.preventArtificialScroll[dimension]);
69
+ this.preventArtificialScroll[dimension] = null;
70
+ return true;
71
+ }
72
+ return false;
73
+ }
74
+ /* convert virtual to real and back, scale range */
75
+ convert(pos, param, toReal = true) {
76
+ const minRange = param.clientSize;
77
+ const from = [0, param.virtualContentSize - minRange];
78
+ const to = [0, param.contentSize - param.virtualSize];
79
+ if (toReal) {
80
+ return scaleValue(pos, from, to);
81
+ }
82
+ return scaleValue(pos, to, from);
83
+ }
84
+ }
85
+
86
+ export { LocalScrollService as L };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface RevoGrid extends Components.RevoGrid, HTMLElement {}
4
+ export const RevoGrid: {
5
+ prototype: RevoGrid;
6
+ new (): RevoGrid;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;