diff --git a/.eslintrc.js b/.eslintrc.js index da50b459c2f..019b59d44df 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -172,13 +172,17 @@ module.exports = { 'no-restricted-syntax': [ 'warn', { - selector: 'ImportDeclaration[source.value="lodash"] > ImportSpecifier', - message: 'Use default import from "lodash/{method}" instead of named import from "lodash". Example: import set from "lodash/set"', + selector: 'ImportDeclaration[source.value="lodash"]', + message: 'Use specific lodash imports instead. Example: import get from "lodash/get"', }, { selector: 'VariableDeclarator[id.type="ObjectPattern"][init.type="CallExpression"][init.callee.name="require"][init.arguments.0.value="lodash"]', message: 'Use require("lodash/{method}") instead of destructuring from require("lodash"). Example: const get = require("lodash/get")', }, + { + selector: 'VariableDeclarator[init.type="CallExpression"][init.callee.name="require"][init.arguments.0.value="lodash"]', + message: 'Use specific lodash imports instead. Example: const get = require("lodash/get")', + }, ], 'import/order': [ 'error', diff --git a/apps/condo/domains/acquiring/components/payments/PaymentsTable.tsx b/apps/condo/domains/acquiring/components/payments/PaymentsTable.tsx index f16e36a1a08..44fd19a3c24 100644 --- a/apps/condo/domains/acquiring/components/payments/PaymentsTable.tsx +++ b/apps/condo/domains/acquiring/components/payments/PaymentsTable.tsx @@ -2,7 +2,7 @@ import { PaymentStatusType, SortPaymentsBy } from '@app/condo/schema' import { Col, Row, Space } from 'antd' import { Gutter } from 'antd/lib/grid/row' import dayjs, { Dayjs } from 'dayjs' -import { get } from 'lodash' +import get from 'lodash/get' import getConfig from 'next/config' import { useRouter } from 'next/router' import React, { useCallback, useState } from 'react' diff --git a/apps/condo/domains/acquiring/utils/clientSchema/search.ts b/apps/condo/domains/acquiring/utils/clientSchema/search.ts index 48b49e8423f..4776f6bfbf7 100644 --- a/apps/condo/domains/acquiring/utils/clientSchema/search.ts +++ b/apps/condo/domains/acquiring/utils/clientSchema/search.ts @@ -1,6 +1,6 @@ import { BillingIntegrationOrganizationContext } from '@app/condo/schema' import { gql } from 'graphql-tag' -import { isEmpty } from 'lodash' +import isEmpty from 'lodash/isEmpty' const GET_ALL_BILLING_PROPERTIES_BY_VALUE_QUERY = gql` query selectBillingProperty ($where: BillingPropertyWhereInput, $orderBy: String, $first: Int, $skip: Int) { diff --git a/apps/condo/domains/analytics/utils/helpers.ts b/apps/condo/domains/analytics/utils/helpers.ts index c7814ea2ea4..fd210201ec6 100644 --- a/apps/condo/domains/analytics/utils/helpers.ts +++ b/apps/condo/domains/analytics/utils/helpers.ts @@ -6,9 +6,9 @@ import { import dayjs, { Dayjs } from 'dayjs' import duration from 'dayjs/plugin/duration' import relativeTime from 'dayjs/plugin/relativeTime' -import { isEmpty } from 'lodash' import get from 'lodash/get' import groupBy from 'lodash/groupBy' +import isEmpty from 'lodash/isEmpty' import { fontSizes } from '@condo/domains/common/constants/style' import { TICKET_REPORT_DAY_GROUP_STEPS } from '@condo/domains/ticket/constants/common' diff --git a/apps/condo/domains/common/components/BaseSearchInput/index.tsx b/apps/condo/domains/common/components/BaseSearchInput/index.tsx index 8f7da0687bc..e7dccac687d 100644 --- a/apps/condo/domains/common/components/BaseSearchInput/index.tsx +++ b/apps/condo/domains/common/components/BaseSearchInput/index.tsx @@ -1,7 +1,7 @@ import styled from '@emotion/styled' -import { isEmpty } from 'lodash' import debounce from 'lodash/debounce' import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import isFunction from 'lodash/isFunction' import throttle from 'lodash/throttle' import uniqBy from 'lodash/uniqBy' diff --git a/apps/condo/domains/common/components/Comments/index.tsx b/apps/condo/domains/common/components/Comments/index.tsx index f87bc93710d..8f0b65854e9 100644 --- a/apps/condo/domains/common/components/Comments/index.tsx +++ b/apps/condo/domains/common/components/Comments/index.tsx @@ -12,7 +12,7 @@ import { Ticket, TicketComment, TicketCommentFile } from '@app/condo/schema' import { Form, FormInstance, notification } from 'antd' import classNames from 'classnames' import dayjs from 'dayjs' -import { pickBy } from 'lodash' +import pickBy from 'lodash/pickBy' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { getClientSideSenderInfo } from '@open-condo/miniapp-utils' diff --git a/apps/condo/domains/common/components/TextHighlighter.tsx b/apps/condo/domains/common/components/TextHighlighter.tsx index 753efe6b1c8..97fc9abecd3 100644 --- a/apps/condo/domains/common/components/TextHighlighter.tsx +++ b/apps/condo/domains/common/components/TextHighlighter.tsx @@ -1,7 +1,7 @@ import { Typography } from 'antd' import { BaseType } from 'antd/lib/typography/Base' -import { isNull } from 'lodash' import isEmpty from 'lodash/isEmpty' +import isNull from 'lodash/isNull' import React from 'react' import { getEscaped } from '@condo/domains/common/utils/string.utils' diff --git a/apps/condo/domains/common/components/containers/FormList.tsx b/apps/condo/domains/common/components/containers/FormList.tsx index fe4e0b8c029..c0f72693dff 100644 --- a/apps/condo/domains/common/components/containers/FormList.tsx +++ b/apps/condo/domains/common/components/containers/FormList.tsx @@ -16,9 +16,10 @@ import { } from 'antd' import { FormProps } from 'antd/lib/form/Form' import { ArgsProps } from 'antd/lib/notification' -import { isUndefined, throttle } from 'lodash' import isFunction from 'lodash/isFunction' +import isUndefined from 'lodash/isUndefined' import omitBy from 'lodash/omitBy' +import throttle from 'lodash/throttle' import React, { useCallback, useState, useRef, CSSProperties, ComponentProps } from 'react' import { Options } from 'scroll-into-view-if-needed' diff --git a/apps/condo/domains/common/hooks/useDateRangeSearch.ts b/apps/condo/domains/common/hooks/useDateRangeSearch.ts index 1485e4d745e..59eb4a657b8 100644 --- a/apps/condo/domains/common/hooks/useDateRangeSearch.ts +++ b/apps/condo/domains/common/hooks/useDateRangeSearch.ts @@ -1,5 +1,7 @@ import dayjs from 'dayjs' -import { get, debounce, isArray } from 'lodash' +import debounce from 'lodash/debounce' +import get from 'lodash/get' +import isArray from 'lodash/isArray' import { useRouter } from 'next/router' import { useCallback } from 'react' diff --git a/apps/condo/domains/common/hooks/useExportToExcel.tsx b/apps/condo/domains/common/hooks/useExportToExcel.tsx index 7760ab53950..a50b271c22a 100644 --- a/apps/condo/domains/common/hooks/useExportToExcel.tsx +++ b/apps/condo/domains/common/hooks/useExportToExcel.tsx @@ -1,6 +1,6 @@ import { notification } from 'antd' import { DocumentNode } from 'graphql' -import { get } from 'lodash' +import get from 'lodash/get' import React, { useCallback } from 'react' import { getClientSideSenderInfo } from '@open-condo/miniapp-utils/helpers/sender' diff --git a/apps/condo/domains/common/hooks/useGlobalHints.tsx b/apps/condo/domains/common/hooks/useGlobalHints.tsx index 97fad450920..ee87ebbe49c 100644 --- a/apps/condo/domains/common/hooks/useGlobalHints.tsx +++ b/apps/condo/domains/common/hooks/useGlobalHints.tsx @@ -1,10 +1,10 @@ import { Col, Row, RowProps } from 'antd' -import { isObject } from 'lodash' import get from 'lodash/get' import has from 'lodash/has' import isArray from 'lodash/isArray' import isBoolean from 'lodash/isBoolean' import isEmpty from 'lodash/isEmpty' +import isObject from 'lodash/isObject' import isString from 'lodash/isString' import getConfig from 'next/config' import Link from 'next/link' diff --git a/apps/condo/domains/contact/components/ContactsEditor/index.tsx b/apps/condo/domains/contact/components/ContactsEditor/index.tsx index 2edb5289c7d..64205915eca 100644 --- a/apps/condo/domains/contact/components/ContactsEditor/index.tsx +++ b/apps/condo/domains/contact/components/ContactsEditor/index.tsx @@ -3,12 +3,12 @@ import { BuildingUnitSubType, Contact as ContactType } from '@app/condo/schema' import styled from '@emotion/styled' import { Col, Form, FormInstance, FormItemProps, Row, Tabs } from 'antd' import { Gutter } from 'antd/lib/grid/row' -import { isNil } from 'lodash' import debounce from 'lodash/debounce' import find from 'lodash/find' import get from 'lodash/get' import isEmpty from 'lodash/isEmpty' import isFunction from 'lodash/isFunction' +import isNil from 'lodash/isNil' import pickBy from 'lodash/pickBy' import React, { CSSProperties, useCallback, useEffect, useMemo, useState } from 'react' diff --git a/apps/condo/domains/contact/components/contactRoles/BaseContactRoleForm.tsx b/apps/condo/domains/contact/components/contactRoles/BaseContactRoleForm.tsx index 31763de3a6b..1698613c12e 100644 --- a/apps/condo/domains/contact/components/contactRoles/BaseContactRoleForm.tsx +++ b/apps/condo/domains/contact/components/contactRoles/BaseContactRoleForm.tsx @@ -1,6 +1,6 @@ import { Col, Form, Input, Row } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { get } from 'lodash' +import get from 'lodash/get' import { useRouter } from 'next/router' import React, { useCallback } from 'react' diff --git a/apps/condo/domains/contact/components/contactRoles/CreateContactRoleForm.tsx b/apps/condo/domains/contact/components/contactRoles/CreateContactRoleForm.tsx index 77be5a720ed..40823e6f9f3 100644 --- a/apps/condo/domains/contact/components/contactRoles/CreateContactRoleForm.tsx +++ b/apps/condo/domains/contact/components/contactRoles/CreateContactRoleForm.tsx @@ -1,4 +1,4 @@ -import { get } from 'lodash' +import get from 'lodash/get' import React, { useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/contact/components/contactRoles/UpdateContactRoleForm.tsx b/apps/condo/domains/contact/components/contactRoles/UpdateContactRoleForm.tsx index 693165ba1a8..0f41351fee0 100644 --- a/apps/condo/domains/contact/components/contactRoles/UpdateContactRoleForm.tsx +++ b/apps/condo/domains/contact/components/contactRoles/UpdateContactRoleForm.tsx @@ -1,4 +1,4 @@ -import { get } from 'lodash' +import get from 'lodash/get' import React, { useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/marketplace/components/Invoice/InvoiceForm.tsx b/apps/condo/domains/marketplace/components/Invoice/InvoiceForm.tsx index 27a22594d6e..12d3317bbb5 100644 --- a/apps/condo/domains/marketplace/components/Invoice/InvoiceForm.tsx +++ b/apps/condo/domains/marketplace/components/Invoice/InvoiceForm.tsx @@ -1,5 +1,5 @@ import { Invoice } from '@app/condo/schema' -import { get } from 'lodash' +import get from 'lodash/get' import { useRouter } from 'next/router' import React, { useCallback } from 'react' diff --git a/apps/condo/domains/marketplace/utils/clientSchema/Invoice.ts b/apps/condo/domains/marketplace/utils/clientSchema/Invoice.ts index bcdf4080a56..8a565183f8e 100644 --- a/apps/condo/domains/marketplace/utils/clientSchema/Invoice.ts +++ b/apps/condo/domains/marketplace/utils/clientSchema/Invoice.ts @@ -8,9 +8,12 @@ import { InvoiceUpdateInput, QueryAllInvoicesArgs, } from '@app/condo/schema' -import { get, isNull, isUndefined, pickBy } from 'lodash' +import get from 'lodash/get' import isEmpty from 'lodash/isEmpty' +import isNull from 'lodash/isNull' +import isUndefined from 'lodash/isUndefined' import omit from 'lodash/omit' +import pickBy from 'lodash/pickBy' import { generateReactHooks } from '@open-condo/codegen/generate.hooks' diff --git a/apps/condo/domains/meter/components/Import/Index.tsx b/apps/condo/domains/meter/components/Import/Index.tsx index 7ac7a035321..416c5822041 100644 --- a/apps/condo/domains/meter/components/Import/Index.tsx +++ b/apps/condo/domains/meter/components/Import/Index.tsx @@ -1,5 +1,6 @@ import { File } from '@app/condo/schema' -import { isNil, isFunction } from 'lodash' +import isFunction from 'lodash/isFunction' +import isNil from 'lodash/isNil' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useAuth } from '@open-condo/next/auth' diff --git a/apps/condo/domains/meter/utils/helpers.ts b/apps/condo/domains/meter/utils/helpers.ts index 63ec9206be4..7927af884ff 100644 --- a/apps/condo/domains/meter/utils/helpers.ts +++ b/apps/condo/domains/meter/utils/helpers.ts @@ -1,9 +1,9 @@ import { FormInstance } from 'antd' import dayjs from 'dayjs' -import { isUndefined } from 'lodash' import isEmpty from 'lodash/isEmpty' import isNumber from 'lodash/isNumber' import isString from 'lodash/isString' +import isUndefined from 'lodash/isUndefined' import { NextRouter } from 'next/router' import React from 'react' diff --git a/apps/condo/domains/organization/components/EmployeeForm/UpdateEmployeeForm.tsx b/apps/condo/domains/organization/components/EmployeeForm/UpdateEmployeeForm.tsx index 88e06faecf6..942d0bb0e58 100644 --- a/apps/condo/domains/organization/components/EmployeeForm/UpdateEmployeeForm.tsx +++ b/apps/condo/domains/organization/components/EmployeeForm/UpdateEmployeeForm.tsx @@ -1,5 +1,7 @@ import { Col, Form, Row, Typography } from 'antd' -import { difference, find, get } from 'lodash' +import difference from 'lodash/difference' +import find from 'lodash/find' +import get from 'lodash/get' import getConfig from 'next/config' import { useRouter } from 'next/router' import React, { useCallback, useEffect, useMemo } from 'react' diff --git a/apps/condo/domains/organization/utils/clientSchema/OrganizationEmployee.ts b/apps/condo/domains/organization/utils/clientSchema/OrganizationEmployee.ts index 081c5913c7e..7bd5e241ce8 100644 --- a/apps/condo/domains/organization/utils/clientSchema/OrganizationEmployee.ts +++ b/apps/condo/domains/organization/utils/clientSchema/OrganizationEmployee.ts @@ -8,7 +8,8 @@ import { OrganizationEmployeeUpdateInput, QueryAllOrganizationEmployeesArgs, } from '@app/condo/schema' -import { get, omit } from 'lodash' +import get from 'lodash/get' +import omit from 'lodash/omit' import { generateReactHooks } from '@open-condo/codegen/generate.hooks' diff --git a/apps/condo/domains/organization/utils/clientSchema/Renders.tsx b/apps/condo/domains/organization/utils/clientSchema/Renders.tsx index c95a75e1146..7a768e21cf3 100644 --- a/apps/condo/domains/organization/utils/clientSchema/Renders.tsx +++ b/apps/condo/domains/organization/utils/clientSchema/Renders.tsx @@ -1,5 +1,5 @@ import { Typography } from 'antd' -import { isEmpty } from 'lodash' +import isEmpty from 'lodash/isEmpty' import React from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/property/components/UnitInfo.tsx b/apps/condo/domains/property/components/UnitInfo.tsx index 742992c0f1a..ff7a3616e3a 100644 --- a/apps/condo/domains/property/components/UnitInfo.tsx +++ b/apps/condo/domains/property/components/UnitInfo.tsx @@ -2,8 +2,8 @@ import { GetPropertyByIdQueryHookResult } from '@app/condo/gql' import { BuildingFloor, BuildingSection, BuildingUnitSubType, MeterUnitTypeType } from '@app/condo/schema' import { Col, Form, FormInstance, Row } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { isEmpty } from 'lodash' import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useDeepCompareEffect } from '@open-condo/codegen/utils/useDeepCompareEffect' diff --git a/apps/condo/domains/property/components/panels/Builder/MapConstructor.spec.ts b/apps/condo/domains/property/components/panels/Builder/MapConstructor.spec.ts index 8a69b3a8c1e..580912cbd8b 100644 --- a/apps/condo/domains/property/components/panels/Builder/MapConstructor.spec.ts +++ b/apps/condo/domains/property/components/panels/Builder/MapConstructor.spec.ts @@ -1,5 +1,5 @@ import { BuildingMap, BuildingSectionType, BuildingUnitSubType } from '@app/condo/schema' -import { cloneDeep } from 'lodash' +import cloneDeep from 'lodash/cloneDeep' import { autoFixBuildingMapJson, diff --git a/apps/condo/domains/property/utils/clientSchema/Property.ts b/apps/condo/domains/property/utils/clientSchema/Property.ts index c9a60a50453..2b11ccefc0f 100644 --- a/apps/condo/domains/property/utils/clientSchema/Property.ts +++ b/apps/condo/domains/property/utils/clientSchema/Property.ts @@ -10,7 +10,7 @@ import { BuildingMap, } from '@app/condo/schema' import dayjs from 'dayjs' -import { get } from 'lodash' +import get from 'lodash/get' import { generateReactHooks } from '@open-condo/codegen/generate.hooks' diff --git a/apps/condo/domains/scope/components/BasePropertyScopeForm.tsx b/apps/condo/domains/scope/components/BasePropertyScopeForm.tsx index f1fe955f7ec..59ad16168cf 100644 --- a/apps/condo/domains/scope/components/BasePropertyScopeForm.tsx +++ b/apps/condo/domains/scope/components/BasePropertyScopeForm.tsx @@ -4,8 +4,9 @@ import { } from '@app/condo/schema' import { Col, Form, Input, Row } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { difference, isEmpty } from 'lodash' +import difference from 'lodash/difference' import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import { useRouter } from 'next/router' import React, { useCallback, useMemo, useState } from 'react' diff --git a/apps/condo/domains/scope/components/CreatePropertyScopeForm.tsx b/apps/condo/domains/scope/components/CreatePropertyScopeForm.tsx index 3d0cc43cf1e..ba4e120b10e 100644 --- a/apps/condo/domains/scope/components/CreatePropertyScopeForm.tsx +++ b/apps/condo/domains/scope/components/CreatePropertyScopeForm.tsx @@ -1,4 +1,4 @@ -import { get } from 'lodash' +import get from 'lodash/get' import React, { useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/scope/components/UpdatePropertyScopeForm.tsx b/apps/condo/domains/scope/components/UpdatePropertyScopeForm.tsx index 92ff6df15ee..440b1161b36 100644 --- a/apps/condo/domains/scope/components/UpdatePropertyScopeForm.tsx +++ b/apps/condo/domains/scope/components/UpdatePropertyScopeForm.tsx @@ -1,4 +1,4 @@ -import { get } from 'lodash' +import get from 'lodash/get' import React, { useCallback, useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/scope/utils/clientSchema/search.ts b/apps/condo/domains/scope/utils/clientSchema/search.ts index 55bed5493fb..fd125fd2c82 100644 --- a/apps/condo/domains/scope/utils/clientSchema/search.ts +++ b/apps/condo/domains/scope/utils/clientSchema/search.ts @@ -1,6 +1,6 @@ import { Property } from '@app/condo/schema' import { gql } from 'graphql-tag' -import { isEmpty } from 'lodash' +import isEmpty from 'lodash/isEmpty' async function _search (client, query, variables) { return await client.query({ diff --git a/apps/condo/domains/scope/utils/clientSchema/utils.tsx b/apps/condo/domains/scope/utils/clientSchema/utils.tsx index 4836287908d..aef94edc707 100644 --- a/apps/condo/domains/scope/utils/clientSchema/utils.tsx +++ b/apps/condo/domains/scope/utils/clientSchema/utils.tsx @@ -1,4 +1,6 @@ -import { differenceBy, get, isEmpty } from 'lodash' +import differenceBy from 'lodash/differenceBy' +import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import React from 'react' import { renderBlockedOption } from '@condo/domains/common/components/GraphQlSearchInput' diff --git a/apps/condo/domains/ticket/components/ClientCard/TabContent.tsx b/apps/condo/domains/ticket/components/ClientCard/TabContent.tsx index fb0e28f8dad..765aa425729 100644 --- a/apps/condo/domains/ticket/components/ClientCard/TabContent.tsx +++ b/apps/condo/domains/ticket/components/ClientCard/TabContent.tsx @@ -11,7 +11,7 @@ import { TicketWhereInput, } from '@app/condo/schema' import { Col, ColProps, Form, Row, RowProps } from 'antd' -import { isNil } from 'lodash' +import isNil from 'lodash/isNil' import { useRouter } from 'next/router' import qs from 'qs' import React, { useCallback, useMemo, useState } from 'react' diff --git a/apps/condo/domains/ticket/components/TicketClassifierSelect.tsx b/apps/condo/domains/ticket/components/TicketClassifierSelect.tsx index f2e091a5e32..7ebba19cb33 100644 --- a/apps/condo/domains/ticket/components/TicketClassifierSelect.tsx +++ b/apps/condo/domains/ticket/components/TicketClassifierSelect.tsx @@ -2,8 +2,11 @@ import { useGetTicketsWithSamePropertyAndClassifierExistenceQuery, usePredictTic import { TicketStatusTypeType } from '@app/condo/schema' import { Col, Form, FormInstance, Row } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { uniqBy, isEmpty, find, pick } from 'lodash' +import find from 'lodash/find' +import isEmpty from 'lodash/isEmpty' import isFunction from 'lodash/isFunction' +import pick from 'lodash/pick' +import uniqBy from 'lodash/uniqBy' import React, { useEffect, useState, useRef, useMemo, useCallback } from 'react' import { useCachePersistor } from '@open-condo/apollo' diff --git a/apps/condo/domains/ticket/components/TicketId/TicketClientField.tsx b/apps/condo/domains/ticket/components/TicketId/TicketClientField.tsx index c6dda158581..fda72d14dfd 100644 --- a/apps/condo/domains/ticket/components/TicketId/TicketClientField.tsx +++ b/apps/condo/domains/ticket/components/TicketId/TicketClientField.tsx @@ -1,6 +1,6 @@ import { Ticket } from '@app/condo/schema' import { Typography } from 'antd' -import { get } from 'lodash' +import get from 'lodash/get' import React, { useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/ticket/components/TicketId/TicketFileListField.tsx b/apps/condo/domains/ticket/components/TicketId/TicketFileListField.tsx index 907daa1cb42..92a848bc2ea 100644 --- a/apps/condo/domains/ticket/components/TicketId/TicketFileListField.tsx +++ b/apps/condo/domains/ticket/components/TicketId/TicketFileListField.tsx @@ -1,6 +1,6 @@ import { useGetTicketFilesQuery } from '@app/condo/gql' import { Ticket } from '@app/condo/schema' -import { isEmpty } from 'lodash' +import isEmpty from 'lodash/isEmpty' import React, { useMemo } from 'react' import { useCachePersistor } from '@open-condo/apollo' diff --git a/apps/condo/domains/ticket/components/TicketPropertyHint/BaseTicketPropertyHintForm.tsx b/apps/condo/domains/ticket/components/TicketPropertyHint/BaseTicketPropertyHintForm.tsx index d84469b9bd0..02870301170 100644 --- a/apps/condo/domains/ticket/components/TicketPropertyHint/BaseTicketPropertyHintForm.tsx +++ b/apps/condo/domains/ticket/components/TicketPropertyHint/BaseTicketPropertyHintForm.tsx @@ -1,7 +1,8 @@ import { Editor } from '@tinymce/tinymce-react' import { Alert, Col, Form, Row, Typography } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { get, isEmpty } from 'lodash' +import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import getConfig from 'next/config' import { useRouter } from 'next/router' import qs from 'qs' diff --git a/apps/condo/domains/ticket/components/TicketPropertyHint/CreateTicketPropertyHintForm.tsx b/apps/condo/domains/ticket/components/TicketPropertyHint/CreateTicketPropertyHintForm.tsx index 376a1577f88..90a2525b346 100644 --- a/apps/condo/domains/ticket/components/TicketPropertyHint/CreateTicketPropertyHintForm.tsx +++ b/apps/condo/domains/ticket/components/TicketPropertyHint/CreateTicketPropertyHintForm.tsx @@ -1,4 +1,4 @@ -import { get } from 'lodash' +import get from 'lodash/get' import React, { useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/ticket/components/TicketPropertyHint/SettingsContent.tsx b/apps/condo/domains/ticket/components/TicketPropertyHint/SettingsContent.tsx index 96d2340d90e..1ce28e3a221 100644 --- a/apps/condo/domains/ticket/components/TicketPropertyHint/SettingsContent.tsx +++ b/apps/condo/domains/ticket/components/TicketPropertyHint/SettingsContent.tsx @@ -2,8 +2,8 @@ import { SortTicketPropertyHintsBy } from '@app/condo/schema' import styled from '@emotion/styled' import { Col, Row, Typography } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { isEmpty } from 'lodash' import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import { useRouter } from 'next/router' import React, { useCallback, useMemo } from 'react' diff --git a/apps/condo/domains/ticket/components/TicketPropertyHint/TicketPropertyHintCard.tsx b/apps/condo/domains/ticket/components/TicketPropertyHint/TicketPropertyHintCard.tsx index e6c37d10326..1db3907fb3c 100644 --- a/apps/condo/domains/ticket/components/TicketPropertyHint/TicketPropertyHintCard.tsx +++ b/apps/condo/domains/ticket/components/TicketPropertyHint/TicketPropertyHintCard.tsx @@ -1,7 +1,7 @@ import { useGetTicketPropertyHintByIdQuery, useGetTicketPropertyHintPropertyByPropertyQuery } from '@app/condo/gql' import styled from '@emotion/styled' import { Col, ColProps, Typography } from 'antd' -import { get } from 'lodash' +import get from 'lodash/get' import React, { CSSProperties, useMemo } from 'react' import { useCachePersistor } from '@open-condo/apollo' diff --git a/apps/condo/domains/ticket/components/TicketPropertyHint/UpdateTicketPropertyHintForm.tsx b/apps/condo/domains/ticket/components/TicketPropertyHint/UpdateTicketPropertyHintForm.tsx index 5efe474f38a..9927d6c2932 100644 --- a/apps/condo/domains/ticket/components/TicketPropertyHint/UpdateTicketPropertyHintForm.tsx +++ b/apps/condo/domains/ticket/components/TicketPropertyHint/UpdateTicketPropertyHintForm.tsx @@ -1,4 +1,4 @@ -import { get } from 'lodash' +import get from 'lodash/get' import React, { useCallback, useMemo } from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/domains/ticket/utils/clientSchema/IncidentRenders.tsx b/apps/condo/domains/ticket/utils/clientSchema/IncidentRenders.tsx index c6e01a02596..3a0bbd98fed 100644 --- a/apps/condo/domains/ticket/utils/clientSchema/IncidentRenders.tsx +++ b/apps/condo/domains/ticket/utils/clientSchema/IncidentRenders.tsx @@ -8,8 +8,8 @@ import { import { TableColumnType } from 'antd' import { FilterValue } from 'antd/es/table/interface' import dayjs from 'dayjs' -import { isEmpty } from 'lodash' import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import uniqBy from 'lodash/uniqBy' import React from 'react' import { IntlShape } from 'react-intl/src/types' diff --git a/apps/condo/domains/ticket/utils/clientSchema/Ticket.ts b/apps/condo/domains/ticket/utils/clientSchema/Ticket.ts index 7568573ae3c..3a4deeaadc0 100644 --- a/apps/condo/domains/ticket/utils/clientSchema/Ticket.ts +++ b/apps/condo/domains/ticket/utils/clientSchema/Ticket.ts @@ -10,7 +10,9 @@ import { TicketStatusTypeType, } from '@app/condo/schema' import dayjs, { Dayjs } from 'dayjs' -import { get, isUndefined, isNull } from 'lodash' +import get from 'lodash/get' +import isNull from 'lodash/isNull' +import isUndefined from 'lodash/isUndefined' import { generateReactHooks } from '@open-condo/codegen/generate.hooks' diff --git a/apps/condo/domains/ticket/utils/clientSchema/clientCard.tsx b/apps/condo/domains/ticket/utils/clientSchema/clientCard.tsx index 925bd4e3236..04c24a36943 100644 --- a/apps/condo/domains/ticket/utils/clientSchema/clientCard.tsx +++ b/apps/condo/domains/ticket/utils/clientSchema/clientCard.tsx @@ -7,7 +7,7 @@ import { import { Col, Row } from 'antd' import { Gutter } from 'antd/es/grid/row' import { gql } from 'graphql-tag' -import { get } from 'lodash' +import get from 'lodash/get' import { NextRouter } from 'next/router' import qs from 'qs' import { useCallback } from 'react' diff --git a/apps/condo/domains/user/components/SectionNameInput.tsx b/apps/condo/domains/user/components/SectionNameInput.tsx index 2704be13554..de0dbff1dc4 100644 --- a/apps/condo/domains/user/components/SectionNameInput.tsx +++ b/apps/condo/domains/user/components/SectionNameInput.tsx @@ -1,6 +1,6 @@ -import { sortBy } from 'lodash' import get from 'lodash/get' import isEmpty from 'lodash/isEmpty' +import sortBy from 'lodash/sortBy' import React from 'react' import { useIntl } from '@open-condo/next/intl' diff --git a/apps/condo/pages/employee/[id]/index.tsx b/apps/condo/pages/employee/[id]/index.tsx index a22cdee811e..328248d9026 100644 --- a/apps/condo/pages/employee/[id]/index.tsx +++ b/apps/condo/pages/employee/[id]/index.tsx @@ -1,8 +1,8 @@ import { useGetOrganizationEmployeeTicketsCountForReassignmentQuery } from '@app/condo/gql' import { OrganizationEmployee as OrganizationEmployeeType, OrganizationEmployeeUpdateInput } from '@app/condo/schema' import { Col, Row, Space, Switch } from 'antd' -import { map } from 'lodash' import get from 'lodash/get' +import map from 'lodash/map' import Head from 'next/head' import Link from 'next/link' import { useRouter } from 'next/router' diff --git a/apps/condo/pages/employee/index.tsx b/apps/condo/pages/employee/index.tsx index 905a43c0e10..06f38a85967 100644 --- a/apps/condo/pages/employee/index.tsx +++ b/apps/condo/pages/employee/index.tsx @@ -1,7 +1,7 @@ import { SortOrganizationEmployeesBy } from '@app/condo/schema' import styled from '@emotion/styled' import { Col, Row } from 'antd' -import { get } from 'lodash' +import get from 'lodash/get' import Head from 'next/head' import { useRouter } from 'next/router' import React, { useCallback, useState } from 'react' diff --git a/apps/condo/pages/news/index.tsx b/apps/condo/pages/news/index.tsx index 1fdabe83495..d37eeb96a3a 100644 --- a/apps/condo/pages/news/index.tsx +++ b/apps/condo/pages/news/index.tsx @@ -1,6 +1,6 @@ import { Col, Row, RowProps } from 'antd' -import { isEmpty } from 'lodash' import get from 'lodash/get' +import isEmpty from 'lodash/isEmpty' import Head from 'next/head' import { useRouter } from 'next/router' import React, { useCallback, useMemo } from 'react' diff --git a/apps/condo/pages/property/[id]/hint.tsx b/apps/condo/pages/property/[id]/hint.tsx index df949fa780d..63236742c75 100644 --- a/apps/condo/pages/property/[id]/hint.tsx +++ b/apps/condo/pages/property/[id]/hint.tsx @@ -1,6 +1,6 @@ import { Col, Row } from 'antd' import { Gutter } from 'antd/es/grid/row' -import { get } from 'lodash' +import get from 'lodash/get' import Head from 'next/head' import { useRouter } from 'next/router' import React, { useMemo } from 'react'