Fix imports of lodash functions (imports cost issues)

This commit is contained in:
Alexey Safronov 2024-08-13 13:56:17 +04:00
parent 4d005d483a
commit b6e0b512b4
7 changed files with 9 additions and 9 deletions

View File

@ -10,6 +10,7 @@
"formulahendry.auto-complete-tag",
"formulahendry.auto-rename-tag",
"mrmlnc.vscode-duplicate",
"ms-python.python"
"ms-python.python",
"wix.vscode-import-cost"
]
}

View File

@ -31,7 +31,7 @@ import { Avatar } from "@docspace/shared/components/avatar";
import CatalogSpamIcon from "PUBLIC_DIR/images/catalog.spam.react.svg";
import { commonIconsStyles } from "@docspace/shared/utils";
import { capitalize } from "lodash";
import capitalize from "lodash/capitalize";
const StyledCatalogSpamIcon = styled(CatalogSpamIcon)`
${commonIconsStyles}

View File

@ -27,7 +27,8 @@
import React from "react";
import { Trans } from "react-i18next";
import MailReactSvgUrl from "PUBLIC_DIR/images/mail.react.svg?url";
import { find, cloneDeep } from "lodash";
import cloneDeep from "lodash/cloneDeep";
import find from "lodash/find";
import {
EmployeeActivationStatus,
EmployeeStatus,

View File

@ -26,7 +26,7 @@
/* eslint-disable no-console */
import { makeAutoObservable, runInAction } from "mobx";
import { cloneDeep } from "lodash";
import cloneDeep from "lodash/cloneDeep";
import api from "@docspace/shared/api";
import { SettingsStore } from "@docspace/shared/store/SettingsStore";

View File

@ -24,7 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { capitalize } from "lodash";
import capitalize from "lodash/capitalize";
import { DateTime, Info } from "luxon";
import {

View File

@ -24,7 +24,6 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import React from "react";
import styled, { css } from "styled-components";
import ExpanderDownReactSvg from "PUBLIC_DIR/images/expander-down.react.svg";
@ -32,7 +31,6 @@ import { Base } from "../../themes";
import { Text } from "../text";
import { TextProps } from "../text/Text.types";
// import { transform } from "lodash";
import {
SimpleLinkWithDropdownProps,
TDropdownType,

View File

@ -24,7 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import lodash from "lodash";
import omit from "lodash/omit";
import { useGesture } from "@use-gesture/react";
import { useSpring, animated } from "@react-spring/web";
import {
@ -640,7 +640,7 @@ export const ViewerPlayer = ({
ref={videoRef}
hidden={isAudio}
preload="metadata"
style={lodash.omit(style, ["x", "y"])}
style={omit(style, ["x", "y"])}
src={thumbnailSrc ? src : `${src}#t=0.001`}
poster={posterUrl}
onError={hadleError}