Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lodash import fix (backport #1182) #1183

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/appui-react",
"comment": "Fixed `module 'lodash' does not provide an export named...` error when running in Node.js.",
"type": "none"
}
],
"packageName": "@itwin/appui-react"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/components-react",
"comment": "Fixed `module 'lodash' does not provide an export named...` error when running in Node.js.",
"type": "none"
}
],
"packageName": "@itwin/components-react"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-react",
"comment": "Fixed `module 'lodash' does not provide an export named...` error when running in Node.js.",
"type": "none"
}
],
"packageName": "@itwin/core-react"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @module Base
*/
import * as React from "react";
import { isEqual } from "lodash";
import isEqual from "lodash/isEqual.js";
import { BeEvent } from "@itwin/core-bentley";
import { Point } from "@itwin/core-react/internal";
import type { PanelSide } from "../widget-panels/PanelTypes.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import classnames from "classnames";
import { isEqual } from "lodash";
import isEqual from "lodash/isEqual.js";
import * as React from "react";
import type { XAndY } from "@itwin/core-geometry";
import type {
Expand Down
2 changes: 1 addition & 1 deletion ui/appui-react/src/appui-react/pickers/ViewSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { UiFramework } from "../UiFramework.js";
import { ViewUtilities } from "../utils/ViewUtilities.js";
import type { ListItem } from "./ListPicker.js";
import { ListItemType, ListPicker } from "./ListPicker.js";
import { debounce } from "lodash";
import debounce from "lodash/debounce.js";
import { SvgSavedView } from "../icons/SvgSavedView.js";
import { useReduxFrameworkState } from "../uistate/useReduxFrameworkState.js";
import type { ListenerType } from "@itwin/core-react/internal";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import {
packNineZoneState,
stateVersion,
} from "./Frontstage.js";
import type { DebouncedFunc } from "lodash";
import { debounce } from "lodash";
import debounce from "lodash/debounce.js";

type SaveSettingFn = (
frontstage: FrontstageDef,
Expand All @@ -32,9 +31,9 @@ export function useSaveFrontstageSettings(
store: LayoutStore
) {
const uiSettingsStorage = useUiStateStorageHandler();
const saveSettingRef = React.useRef<DebouncedFunc<SaveSettingFn> | undefined>(
undefined
);
const saveSettingRef = React.useRef<
ReturnType<typeof debounce<SaveSettingFn>> | undefined
>(undefined);
const save = React.useCallback<SaveSettingFn>(async (frontstage, state) => {
if (!saveSettingRef.current) return;
if (state.draggedTab) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { immerable } from "immer";
import { cloneDeep } from "lodash";
import cloneDeep from "lodash/cloneDeep.js";
import { assert } from "@itwin/core-bentley";
import type { PropertyRecord } from "@itwin/appui-abstract";
import type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import * as React from "react";
import { throttle } from "lodash";
import throttle from "lodash/throttle.js";

/** lodash throttle options
* @internal
Expand Down
Loading