@karta.io/simplebar 0.33.7 → 0.34.0-alpha.1

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.
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const lodashEs = require('lodash-es');
3
+ const throttle = require('lodash-es/throttle');
4
+ const debounce = require('lodash-es/debounce');
5
+ const memoize = require('lodash-es/memoize');
4
6
  const resizeObserver = require('@juggle/resize-observer');
5
7
  const canUseDOM = require('can-use-dom');
6
8
 
@@ -237,16 +239,16 @@ const _SimpleBar = class {
237
239
  if (_SimpleBar.instances.has(this.el)) {
238
240
  return;
239
241
  }
240
- this.recalculate = lodashEs.throttle(this.recalculate.bind(this), 64);
241
- this.onMouseMove = lodashEs.throttle(this.onMouseMove.bind(this), 64);
242
- this.hideScrollbars = lodashEs.debounce(
242
+ this.recalculate = throttle(this.recalculate.bind(this), 64);
243
+ this.onMouseMove = throttle(this.onMouseMove.bind(this), 64);
244
+ this.hideScrollbars = debounce(
243
245
  this.hideScrollbars.bind(this),
244
246
  this.options.timeout
245
247
  );
246
- this.onWindowResize = lodashEs.debounce(this.onWindowResize.bind(this), 64, {
248
+ this.onWindowResize = debounce(this.onWindowResize.bind(this), 64, {
247
249
  leading: true
248
250
  });
249
- _SimpleBar.getRtlHelpers = lodashEs.memoize(_SimpleBar.getRtlHelpers);
251
+ _SimpleBar.getRtlHelpers = memoize(_SimpleBar.getRtlHelpers);
250
252
  this.init();
251
253
  }
252
254
  static getRtlHelpers() {
@@ -1,4 +1,6 @@
1
- import { throttle, debounce, memoize } from 'lodash-es';
1
+ import throttle from 'lodash-es/throttle';
2
+ import debounce from 'lodash-es/debounce';
3
+ import memoize from 'lodash-es/memoize';
2
4
  import { ResizeObserver } from '@juggle/resize-observer';
3
5
  import canUseDOM from 'can-use-dom';
4
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karta.io/simplebar",
3
- "version": "0.33.7",
3
+ "version": "0.34.0-alpha.1",
4
4
  "description": "Клон core части библиотеки simplebar",
5
5
  "files": [
6
6
  "dist",
package/src/simplebar.js CHANGED
@@ -1,4 +1,6 @@
1
- import { throttle, debounce, memoize } from 'lodash-es';
1
+ import throttle from 'lodash-es/throttle';
2
+ import debounce from 'lodash-es/debounce';
3
+ import memoize from 'lodash-es/memoize';
2
4
  import { ResizeObserver } from '@juggle/resize-observer';
3
5
  import canUseDOM from 'can-use-dom';
4
6
  import scrollbarWidth from './scrollbar-width';