indicator-ui 0.0.338 → 0.0.340
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/index.js
CHANGED
|
@@ -41552,35 +41552,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41552
41552
|
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_0__);
|
|
41553
41553
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
41554
41554
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
41555
|
-
/* harmony import */ var _useDeepCompareEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useDeepCompareEffect */ "./src/hooks/useDeepCompareEffect.ts");
|
|
41556
41555
|
|
|
41557
41556
|
|
|
41558
|
-
|
|
41559
|
-
function
|
|
41557
|
+
function useDebouncedInvoker() {
|
|
41558
|
+
var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
|
|
41559
|
+
return undefined;
|
|
41560
|
+
};
|
|
41560
41561
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
41561
41562
|
var callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(callback);
|
|
41562
41563
|
callbackRef.current = callback;
|
|
41563
|
-
var debouncedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(
|
|
41564
|
-
(0,
|
|
41564
|
+
var debouncedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
|
41565
|
+
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
41565
41566
|
debouncedRef.current = lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
|
41566
|
-
|
|
41567
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41568
|
-
args[_key] = arguments[_key];
|
|
41569
|
-
}
|
|
41570
|
-
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call.apply(_callbackRef$current, [callbackRef].concat(args));
|
|
41567
|
+
callbackRef.current();
|
|
41571
41568
|
}, delay);
|
|
41572
41569
|
return function () {
|
|
41573
41570
|
var _debouncedRef$current;
|
|
41574
41571
|
(_debouncedRef$current = debouncedRef.current) === null || _debouncedRef$current === void 0 || _debouncedRef$current.cancel();
|
|
41575
41572
|
};
|
|
41576
|
-
}, [delay
|
|
41573
|
+
}, [delay]);
|
|
41577
41574
|
// Возвращаем вызываемую функцию
|
|
41578
41575
|
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
|
41579
41576
|
var _debouncedRef$current2;
|
|
41580
|
-
|
|
41581
|
-
args[_key2] = arguments[_key2];
|
|
41582
|
-
}
|
|
41583
|
-
return (_debouncedRef$current2 = debouncedRef.current) === null || _debouncedRef$current2 === void 0 ? void 0 : _debouncedRef$current2.call.apply(_debouncedRef$current2, [debouncedRef].concat(args));
|
|
41577
|
+
(_debouncedRef$current2 = debouncedRef.current) === null || _debouncedRef$current2 === void 0 || _debouncedRef$current2.call(debouncedRef);
|
|
41584
41578
|
}, []);
|
|
41585
41579
|
}
|
|
41586
41580
|
|