@itwin/core-react 5.0.3 → 5.0.4
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @itwin/core-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri, 17 Jan 2025
|
|
3
|
+
This log was last generated on Fri, 17 Jan 2025 14:12:03 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.0.4
|
|
6
|
+
Fri, 17 Jan 2025 14:12:03 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Fixed `module 'lodash' does not provide an export named...` error when running in Node.js.
|
|
4
11
|
|
|
5
12
|
## 5.0.3
|
|
6
13
|
Fri, 17 Jan 2025 11:42:02 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThrottledFn.js","sourceRoot":"","sources":["../../../../src/core-react/utils/hooks/useThrottledFn.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"useThrottledFn.js","sourceRoot":"","sources":["../../../../src/core-react/utils/hooks/useThrottledFn.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAU1C,MAAM,cAAc,GAAqB;IACvC,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,kBAAqB,EACrB,QAAgB,EAChB,YAAkC,EAClC,UAA4B,cAAc;IAE1C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1E,uDAAuD;IACvD,OAAO,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport throttle from \"lodash/throttle.js\";\n\n/** lodash throttle options\n * @internal\n */\nexport interface ThrottleSettings {\n leading: boolean;\n trailing: boolean;\n}\n\nconst defaultOptions: ThrottleSettings = {\n leading: false,\n trailing: true,\n};\n\n/** Used to throttle function calls\n * @internal\n */\nexport function useThrottledFn<T extends (...args: any) => any>(\n functionToThrottle: T,\n waitTime: number,\n dependencies: React.DependencyList,\n options: ThrottleSettings = defaultOptions\n) {\n const throttledFunction = throttle(functionToThrottle, waitTime, options);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(throttledFunction, dependencies);\n}\n"]}
|