indicator-ui 0.0.339 → 0.0.341
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
|
@@ -41457,6 +41457,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41457
41457
|
/* harmony export */ useDebouncedAccumulator: () => (/* reexport safe */ _useDebouncedAccumulator__WEBPACK_IMPORTED_MODULE_2__.useDebouncedAccumulator),
|
|
41458
41458
|
/* harmony export */ useDebouncedInvoker: () => (/* reexport safe */ _useDebouncedInvoker__WEBPACK_IMPORTED_MODULE_8__.useDebouncedInvoker),
|
|
41459
41459
|
/* harmony export */ useDeepCompareEffect: () => (/* reexport safe */ _useDeepCompareEffect__WEBPACK_IMPORTED_MODULE_3__.useDeepCompareEffect),
|
|
41460
|
+
/* harmony export */ useDidUpdateEffect: () => (/* reexport safe */ _useDidUpdateEffect__WEBPACK_IMPORTED_MODULE_11__.useDidUpdateEffect),
|
|
41460
41461
|
/* harmony export */ useElementFixedOffset: () => (/* reexport safe */ _useElementFixedOffset__WEBPACK_IMPORTED_MODULE_4__.useElementFixedOffset),
|
|
41461
41462
|
/* harmony export */ useFormData: () => (/* reexport safe */ _useFormData__WEBPACK_IMPORTED_MODULE_1__.useFormData),
|
|
41462
41463
|
/* harmony export */ useInteractiveZone: () => (/* reexport safe */ _useInteractiveZone__WEBPACK_IMPORTED_MODULE_10__.useInteractiveZone),
|
|
@@ -41477,6 +41478,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41477
41478
|
/* harmony import */ var _useDebouncedInvoker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useDebouncedInvoker */ "./src/hooks/useDebouncedInvoker.ts");
|
|
41478
41479
|
/* harmony import */ var _useSmartScroll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./useSmartScroll */ "./src/hooks/useSmartScroll/index.ts");
|
|
41479
41480
|
/* harmony import */ var _useInteractiveZone__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./useInteractiveZone */ "./src/hooks/useInteractiveZone.ts");
|
|
41481
|
+
/* harmony import */ var _useDidUpdateEffect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./useDidUpdateEffect */ "./src/hooks/useDidUpdateEffect.ts");
|
|
41482
|
+
|
|
41480
41483
|
|
|
41481
41484
|
|
|
41482
41485
|
|
|
@@ -41554,32 +41557,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41554
41557
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
41555
41558
|
|
|
41556
41559
|
|
|
41557
|
-
function useDebouncedInvoker(
|
|
41560
|
+
function useDebouncedInvoker() {
|
|
41561
|
+
var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
|
|
41562
|
+
return undefined;
|
|
41563
|
+
};
|
|
41558
41564
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
41559
41565
|
var callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(callback);
|
|
41560
41566
|
callbackRef.current = callback;
|
|
41561
|
-
var debouncedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(
|
|
41562
|
-
// Инициализация и обновление debounce
|
|
41567
|
+
var debouncedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
|
41563
41568
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
41564
41569
|
debouncedRef.current = lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
|
41565
|
-
|
|
41566
|
-
if (typeof callbackRef.current === "function") {
|
|
41567
|
-
return callbackRef.current.apply(callbackRef, arguments);
|
|
41568
|
-
}
|
|
41570
|
+
callbackRef.current();
|
|
41569
41571
|
}, delay);
|
|
41570
41572
|
return function () {
|
|
41571
41573
|
var _debouncedRef$current;
|
|
41572
41574
|
(_debouncedRef$current = debouncedRef.current) === null || _debouncedRef$current === void 0 || _debouncedRef$current.cancel();
|
|
41573
|
-
debouncedRef.current = null;
|
|
41574
41575
|
};
|
|
41575
41576
|
}, [delay]);
|
|
41577
|
+
// Возвращаем вызываемую функцию
|
|
41576
41578
|
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
|
41577
|
-
|
|
41578
|
-
|
|
41579
|
-
}
|
|
41580
|
-
if (typeof callbackRef.current === "function") {
|
|
41581
|
-
return callbackRef.current.apply(callbackRef, arguments);
|
|
41582
|
-
}
|
|
41579
|
+
var _debouncedRef$current2;
|
|
41580
|
+
(_debouncedRef$current2 = debouncedRef.current) === null || _debouncedRef$current2 === void 0 || _debouncedRef$current2.call(debouncedRef);
|
|
41583
41581
|
}, []);
|
|
41584
41582
|
}
|
|
41585
41583
|
|
|
@@ -41612,6 +41610,41 @@ function useDeepCompareEffect(callback, dependencies) {
|
|
|
41612
41610
|
|
|
41613
41611
|
/***/ }),
|
|
41614
41612
|
|
|
41613
|
+
/***/ "./src/hooks/useDidUpdateEffect.ts":
|
|
41614
|
+
/*!*****************************************!*\
|
|
41615
|
+
!*** ./src/hooks/useDidUpdateEffect.ts ***!
|
|
41616
|
+
\*****************************************/
|
|
41617
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
41618
|
+
|
|
41619
|
+
"use strict";
|
|
41620
|
+
__webpack_require__.r(__webpack_exports__);
|
|
41621
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
41622
|
+
/* harmony export */ useDidUpdateEffect: () => (/* binding */ useDidUpdateEffect)
|
|
41623
|
+
/* harmony export */ });
|
|
41624
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
41625
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
41626
|
+
|
|
41627
|
+
/**
|
|
41628
|
+
* Хук аналогичен `useEffect`, но не срабатывает при монтирование компонента
|
|
41629
|
+
* */
|
|
41630
|
+
function useDidUpdateEffect(fn, dependencies) {
|
|
41631
|
+
var mounted = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
|
|
41632
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
41633
|
+
return function () {
|
|
41634
|
+
mounted.current = false;
|
|
41635
|
+
};
|
|
41636
|
+
}, []);
|
|
41637
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
41638
|
+
if (mounted.current) {
|
|
41639
|
+
return fn();
|
|
41640
|
+
}
|
|
41641
|
+
mounted.current = true;
|
|
41642
|
+
return undefined;
|
|
41643
|
+
}, dependencies);
|
|
41644
|
+
}
|
|
41645
|
+
|
|
41646
|
+
/***/ }),
|
|
41647
|
+
|
|
41615
41648
|
/***/ "./src/hooks/useElementFixedOffset.ts":
|
|
41616
41649
|
/*!********************************************!*\
|
|
41617
41650
|
!*** ./src/hooks/useElementFixedOffset.ts ***!
|
|
@@ -57055,6 +57088,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57055
57088
|
/* harmony export */ useDebouncedAccumulator: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDebouncedAccumulator),
|
|
57056
57089
|
/* harmony export */ useDebouncedInvoker: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDebouncedInvoker),
|
|
57057
57090
|
/* harmony export */ useDeepCompareEffect: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDeepCompareEffect),
|
|
57091
|
+
/* harmony export */ useDidUpdateEffect: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDidUpdateEffect),
|
|
57058
57092
|
/* harmony export */ useElementFixedOffset: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useElementFixedOffset),
|
|
57059
57093
|
/* harmony export */ useFormData: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useFormData),
|
|
57060
57094
|
/* harmony export */ useInteractiveZone: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useInteractiveZone),
|