indicator-ui 0.0.316 → 0.0.317

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
@@ -17888,6 +17888,207 @@ curry.placeholder = {};
17888
17888
  module.exports = curry;
17889
17889
 
17890
17890
 
17891
+ /***/ }),
17892
+
17893
+ /***/ "./node_modules/lodash/debounce.js":
17894
+ /*!*****************************************!*\
17895
+ !*** ./node_modules/lodash/debounce.js ***!
17896
+ \*****************************************/
17897
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
17898
+
17899
+ var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
17900
+ now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
17901
+ toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
17902
+
17903
+ /** Error message constants. */
17904
+ var FUNC_ERROR_TEXT = 'Expected a function';
17905
+
17906
+ /* Built-in method references for those with the same name as other `lodash` methods. */
17907
+ var nativeMax = Math.max,
17908
+ nativeMin = Math.min;
17909
+
17910
+ /**
17911
+ * Creates a debounced function that delays invoking `func` until after `wait`
17912
+ * milliseconds have elapsed since the last time the debounced function was
17913
+ * invoked. The debounced function comes with a `cancel` method to cancel
17914
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
17915
+ * Provide `options` to indicate whether `func` should be invoked on the
17916
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
17917
+ * with the last arguments provided to the debounced function. Subsequent
17918
+ * calls to the debounced function return the result of the last `func`
17919
+ * invocation.
17920
+ *
17921
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
17922
+ * invoked on the trailing edge of the timeout only if the debounced function
17923
+ * is invoked more than once during the `wait` timeout.
17924
+ *
17925
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
17926
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
17927
+ *
17928
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
17929
+ * for details over the differences between `_.debounce` and `_.throttle`.
17930
+ *
17931
+ * @static
17932
+ * @memberOf _
17933
+ * @since 0.1.0
17934
+ * @category Function
17935
+ * @param {Function} func The function to debounce.
17936
+ * @param {number} [wait=0] The number of milliseconds to delay.
17937
+ * @param {Object} [options={}] The options object.
17938
+ * @param {boolean} [options.leading=false]
17939
+ * Specify invoking on the leading edge of the timeout.
17940
+ * @param {number} [options.maxWait]
17941
+ * The maximum time `func` is allowed to be delayed before it's invoked.
17942
+ * @param {boolean} [options.trailing=true]
17943
+ * Specify invoking on the trailing edge of the timeout.
17944
+ * @returns {Function} Returns the new debounced function.
17945
+ * @example
17946
+ *
17947
+ * // Avoid costly calculations while the window size is in flux.
17948
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
17949
+ *
17950
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
17951
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
17952
+ * 'leading': true,
17953
+ * 'trailing': false
17954
+ * }));
17955
+ *
17956
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
17957
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
17958
+ * var source = new EventSource('/stream');
17959
+ * jQuery(source).on('message', debounced);
17960
+ *
17961
+ * // Cancel the trailing debounced invocation.
17962
+ * jQuery(window).on('popstate', debounced.cancel);
17963
+ */
17964
+ function debounce(func, wait, options) {
17965
+ var lastArgs,
17966
+ lastThis,
17967
+ maxWait,
17968
+ result,
17969
+ timerId,
17970
+ lastCallTime,
17971
+ lastInvokeTime = 0,
17972
+ leading = false,
17973
+ maxing = false,
17974
+ trailing = true;
17975
+
17976
+ if (typeof func != 'function') {
17977
+ throw new TypeError(FUNC_ERROR_TEXT);
17978
+ }
17979
+ wait = toNumber(wait) || 0;
17980
+ if (isObject(options)) {
17981
+ leading = !!options.leading;
17982
+ maxing = 'maxWait' in options;
17983
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
17984
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
17985
+ }
17986
+
17987
+ function invokeFunc(time) {
17988
+ var args = lastArgs,
17989
+ thisArg = lastThis;
17990
+
17991
+ lastArgs = lastThis = undefined;
17992
+ lastInvokeTime = time;
17993
+ result = func.apply(thisArg, args);
17994
+ return result;
17995
+ }
17996
+
17997
+ function leadingEdge(time) {
17998
+ // Reset any `maxWait` timer.
17999
+ lastInvokeTime = time;
18000
+ // Start the timer for the trailing edge.
18001
+ timerId = setTimeout(timerExpired, wait);
18002
+ // Invoke the leading edge.
18003
+ return leading ? invokeFunc(time) : result;
18004
+ }
18005
+
18006
+ function remainingWait(time) {
18007
+ var timeSinceLastCall = time - lastCallTime,
18008
+ timeSinceLastInvoke = time - lastInvokeTime,
18009
+ timeWaiting = wait - timeSinceLastCall;
18010
+
18011
+ return maxing
18012
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
18013
+ : timeWaiting;
18014
+ }
18015
+
18016
+ function shouldInvoke(time) {
18017
+ var timeSinceLastCall = time - lastCallTime,
18018
+ timeSinceLastInvoke = time - lastInvokeTime;
18019
+
18020
+ // Either this is the first call, activity has stopped and we're at the
18021
+ // trailing edge, the system time has gone backwards and we're treating
18022
+ // it as the trailing edge, or we've hit the `maxWait` limit.
18023
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
18024
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
18025
+ }
18026
+
18027
+ function timerExpired() {
18028
+ var time = now();
18029
+ if (shouldInvoke(time)) {
18030
+ return trailingEdge(time);
18031
+ }
18032
+ // Restart the timer.
18033
+ timerId = setTimeout(timerExpired, remainingWait(time));
18034
+ }
18035
+
18036
+ function trailingEdge(time) {
18037
+ timerId = undefined;
18038
+
18039
+ // Only invoke if we have `lastArgs` which means `func` has been
18040
+ // debounced at least once.
18041
+ if (trailing && lastArgs) {
18042
+ return invokeFunc(time);
18043
+ }
18044
+ lastArgs = lastThis = undefined;
18045
+ return result;
18046
+ }
18047
+
18048
+ function cancel() {
18049
+ if (timerId !== undefined) {
18050
+ clearTimeout(timerId);
18051
+ }
18052
+ lastInvokeTime = 0;
18053
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
18054
+ }
18055
+
18056
+ function flush() {
18057
+ return timerId === undefined ? result : trailingEdge(now());
18058
+ }
18059
+
18060
+ function debounced() {
18061
+ var time = now(),
18062
+ isInvoking = shouldInvoke(time);
18063
+
18064
+ lastArgs = arguments;
18065
+ lastThis = this;
18066
+ lastCallTime = time;
18067
+
18068
+ if (isInvoking) {
18069
+ if (timerId === undefined) {
18070
+ return leadingEdge(lastCallTime);
18071
+ }
18072
+ if (maxing) {
18073
+ // Handle invocations in a tight loop.
18074
+ clearTimeout(timerId);
18075
+ timerId = setTimeout(timerExpired, wait);
18076
+ return invokeFunc(lastCallTime);
18077
+ }
18078
+ }
18079
+ if (timerId === undefined) {
18080
+ timerId = setTimeout(timerExpired, wait);
18081
+ }
18082
+ return result;
18083
+ }
18084
+ debounced.cancel = cancel;
18085
+ debounced.flush = flush;
18086
+ return debounced;
18087
+ }
18088
+
18089
+ module.exports = debounce;
18090
+
18091
+
17891
18092
  /***/ }),
17892
18093
 
17893
18094
  /***/ "./node_modules/lodash/eq.js":
@@ -37288,6 +37489,39 @@ function noop() {
37288
37489
  module.exports = noop;
37289
37490
 
37290
37491
 
37492
+ /***/ }),
37493
+
37494
+ /***/ "./node_modules/lodash/now.js":
37495
+ /*!************************************!*\
37496
+ !*** ./node_modules/lodash/now.js ***!
37497
+ \************************************/
37498
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
37499
+
37500
+ var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
37501
+
37502
+ /**
37503
+ * Gets the timestamp of the number of milliseconds that have elapsed since
37504
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
37505
+ *
37506
+ * @static
37507
+ * @memberOf _
37508
+ * @since 2.4.0
37509
+ * @category Date
37510
+ * @returns {number} Returns the timestamp.
37511
+ * @example
37512
+ *
37513
+ * _.defer(function(stamp) {
37514
+ * console.log(_.now() - stamp);
37515
+ * }, _.now());
37516
+ * // => Logs the number of milliseconds it took for the deferred invocation.
37517
+ */
37518
+ var now = function() {
37519
+ return root.Date.now();
37520
+ };
37521
+
37522
+ module.exports = now;
37523
+
37524
+
37291
37525
  /***/ }),
37292
37526
 
37293
37527
  /***/ "./node_modules/lodash/property.js":
@@ -41221,6 +41455,7 @@ __webpack_require__.r(__webpack_exports__);
41221
41455
  __webpack_require__.r(__webpack_exports__);
41222
41456
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
41223
41457
  /* harmony export */ useDebouncedAccumulator: () => (/* reexport safe */ _useDebouncedAccumulator__WEBPACK_IMPORTED_MODULE_2__.useDebouncedAccumulator),
41458
+ /* harmony export */ useDebouncedInvoker: () => (/* reexport safe */ _useDebouncedInvoker__WEBPACK_IMPORTED_MODULE_8__.useDebouncedInvoker),
41224
41459
  /* harmony export */ useDeepCompareEffect: () => (/* reexport safe */ _useDeepCompareEffect__WEBPACK_IMPORTED_MODULE_3__.useDeepCompareEffect),
41225
41460
  /* harmony export */ useElementFixedOffset: () => (/* reexport safe */ _useElementFixedOffset__WEBPACK_IMPORTED_MODULE_4__.useElementFixedOffset),
41226
41461
  /* harmony export */ useFormData: () => (/* reexport safe */ _useFormData__WEBPACK_IMPORTED_MODULE_1__.useFormData),
@@ -41237,6 +41472,8 @@ __webpack_require__.r(__webpack_exports__);
41237
41472
  /* harmony import */ var _useSyncedStateRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./useSyncedStateRef */ "./src/hooks/useSyncedStateRef.ts");
41238
41473
  /* harmony import */ var _useResettableTimeout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useResettableTimeout */ "./src/hooks/useResettableTimeout.ts");
41239
41474
  /* harmony import */ var _useSmartPosition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./useSmartPosition */ "./src/hooks/useSmartPosition.ts");
41475
+ /* harmony import */ var _useDebouncedInvoker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useDebouncedInvoker */ "./src/hooks/useDebouncedInvoker.ts");
41476
+
41240
41477
 
41241
41478
 
41242
41479
 
@@ -41294,6 +41531,49 @@ function useDebouncedAccumulator(_ref) {
41294
41531
 
41295
41532
  /***/ }),
41296
41533
 
41534
+ /***/ "./src/hooks/useDebouncedInvoker.ts":
41535
+ /*!******************************************!*\
41536
+ !*** ./src/hooks/useDebouncedInvoker.ts ***!
41537
+ \******************************************/
41538
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
41539
+
41540
+ "use strict";
41541
+ __webpack_require__.r(__webpack_exports__);
41542
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
41543
+ /* harmony export */ useDebouncedInvoker: () => (/* binding */ useDebouncedInvoker)
41544
+ /* harmony export */ });
41545
+ /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
41546
+ /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_0__);
41547
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
41548
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
41549
+
41550
+
41551
+ function useDebouncedInvoker() {
41552
+ var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
41553
+ return undefined;
41554
+ };
41555
+ var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
41556
+ var callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(callback);
41557
+ callbackRef.current = callback;
41558
+ var debouncedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
41559
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
41560
+ debouncedRef.current = lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default()(function () {
41561
+ callbackRef.current();
41562
+ }, delay);
41563
+ return function () {
41564
+ var _debouncedRef$current;
41565
+ (_debouncedRef$current = debouncedRef.current) === null || _debouncedRef$current === void 0 || _debouncedRef$current.cancel();
41566
+ };
41567
+ }, [delay]);
41568
+ // Возвращаем вызываемую функцию
41569
+ return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
41570
+ var _debouncedRef$current2;
41571
+ (_debouncedRef$current2 = debouncedRef.current) === null || _debouncedRef$current2 === void 0 || _debouncedRef$current2.call(debouncedRef);
41572
+ }, []);
41573
+ }
41574
+
41575
+ /***/ }),
41576
+
41297
41577
  /***/ "./src/hooks/useDeepCompareEffect.ts":
41298
41578
  /*!*******************************************!*\
41299
41579
  !*** ./src/hooks/useDeepCompareEffect.ts ***!
@@ -55942,6 +56222,7 @@ __webpack_require__.r(__webpack_exports__);
55942
56222
  /* harmony export */ traverseTreeByStack: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.traverseTreeByStack),
55943
56223
  /* harmony export */ uniqueByKey: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.uniqueByKey),
55944
56224
  /* harmony export */ useDebouncedAccumulator: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDebouncedAccumulator),
56225
+ /* harmony export */ useDebouncedInvoker: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDebouncedInvoker),
55945
56226
  /* harmony export */ useDeepCompareEffect: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useDeepCompareEffect),
55946
56227
  /* harmony export */ useElementFixedOffset: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useElementFixedOffset),
55947
56228
  /* harmony export */ useFormData: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useFormData),