Skip to content

Commit 50047e0

Browse files
luarmrjombooth
andauthored
fix: FIT-628: Remove unnecessary lodash dependencies. (#8276)
Co-authored-by: jombooth <[email protected]>
1 parent f5056d9 commit 50047e0

File tree

16 files changed

+15
-32
lines changed

16 files changed

+15
-32
lines changed

web/apps/labelstudio/src/pages/WebhookPage/WebhookDetail.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IconCross, IconPlus } from "@humansignal/icons";
22
import { Button } from "@humansignal/ui";
3-
import { cloneDeep } from "lodash";
3+
import cloneDeep from "lodash/cloneDeep";
44
import { useEffect, useState } from "react";
55
import { Form, Input, Label, Toggle } from "../../components/Form";
66
import { useAPI } from "../../providers/ApiProvider";

web/libs/datamanager/src/components/DataManager/Toolbar/GridWidthButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Button, ButtonGroup } from "@humansignal/ui";
44
import { Dropdown } from "../../Common/Dropdown/DropdownComponent";
55
import { Toggle } from "../../Common/Form";
66
import { IconSettings, IconMinus, IconPlus } from "@humansignal/icons";
7-
import debounce from "lodash.debounce";
7+
import debounce from "lodash/debounce";
88

99
const injector = inject(({ store }) => {
1010
const view = store?.currentView;

web/libs/editor/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
"keymaster": "^1.6.2",
1919
"konva": "^8.1.3",
2020
"lodash": "4.17.21",
21-
"lodash.get": "^4.4.0",
22-
"lodash.ismatch": "^4.4.0",
23-
"lodash.throttle": "^4.1.1",
2421
"mobx": "^5.15.4",
2522
"mobx-react": "^6",
2623
"mobx-react-lite": "2.2.2",

web/libs/editor/src/common/TextArea/TextArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type FC, type FocusEvent, type MutableRefObject, type RefObject, useCallback, useEffect, useRef } from "react";
2-
import { debounce } from "lodash";
2+
import debounce from "lodash/debounce";
33
import { cn } from "../../utils/bem";
44
import { isMacOS } from "../../utils/utilities";
55

web/libs/editor/src/components/HtxTextBox/HtxTextBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { IconEdit, IconTrashAlt, IconCheck } from "@humansignal/icons";
33
import { Button, Tooltip, Typography } from "@humansignal/ui";
4-
import throttle from "lodash.throttle";
4+
import throttle from "lodash/throttle";
55

66
// used for correct auto-height calculation
77
const BORDER_WIDTH = 1;

web/libs/editor/src/components/NewTaxonomy/TaxonomySearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import React, {
1111
import "./TaxonomySearch.scss";
1212
import { Block } from "../../utils/bem";
1313
import type { AntTaxonomyItem } from "./NewTaxonomy";
14-
import { debounce } from "lodash";
14+
import debounce from "lodash/debounce";
1515

1616
type TaxonomySearchProps = {
1717
treeData: AntTaxonomyItem[];

web/libs/editor/src/components/Timeline/Seeker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { clamp } from "lodash";
1+
import clamp from "lodash/clamp";
22
import { type FC, type ReactElement, useCallback, useRef } from "react";
33
import { Block, Elem } from "../../utils/bem";
44
import type { TimelineMinimapProps } from "./Types";

web/libs/editor/src/components/Timeline/Views/Frames/Frames.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useResizeObserver } from "@humansignal/core/hooks/useResizeObserver";
2-
import { clamp } from "lodash";
2+
import clamp from "lodash/clamp";
33
import { type FC, type MouseEvent, useCallback, useEffect, useMemo, useRef, useState } from "react";
44
import { useMemoizedHandlers } from "../../../../hooks/useMemoizedHandlers";
55
import { Block, Elem } from "../../../../utils/bem";

web/libs/editor/src/mixins/DrawingTool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { types } from "mobx-state-tree";
22

33
import Utils from "../utils";
4-
import throttle from "lodash.throttle";
4+
import throttle from "lodash/throttle";
55
import { MIN_SIZE } from "../tools/Base";
66
import { FF_DEV_3391, FF_DEV_3793, isFF } from "../utils/feature-flags";
77
import { ff } from "@humansignal/core";

web/libs/editor/src/stores/Annotation/Annotation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import throttle from "lodash.throttle";
1+
import throttle from "lodash/throttle";
22
import { destroy, detach, flow, getEnv, getParent, getRoot, isAlive, onSnapshot, types } from "mobx-state-tree";
33
import { ff } from "@humansignal/core";
44
import { errorBuilder } from "../../core/DataValidator/ConfigValidator";

0 commit comments

Comments
 (0)