mirror of
https://github.com/langgenius/dify.git
synced 2026-02-24 18:05:11 +00:00
chore(web): migrate lodash-es to es-toolkit compat (#30126)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { FC } from 'react'
|
||||
import type { ApiBasedExtension } from '@/models/common'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Button from '@/app/components/base/button'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import type { DataSourceNotion as TDataSourceNotion } from '@/models/common'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import * as React from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { FC } from 'react'
|
||||
import {
|
||||
RiDeleteBinLine,
|
||||
} from '@remixicon/react'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DebouncedFunc } from 'lodash-es'
|
||||
import type { DebouncedFunc } from 'es-toolkit/compat'
|
||||
import type { ValidateCallback, ValidatedStatusState, ValidateValue } from './declarations'
|
||||
import { useDebounceFn } from 'ahooks'
|
||||
import { useState } from 'react'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
import { RiCloseLine } from '@remixicon/react'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useContext } from 'use-context-selector'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { InvitationResult } from '@/models/common'
|
||||
import { RiCloseLine, RiErrorWarningFill } from '@remixicon/react'
|
||||
import { useBoolean } from 'ahooks'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { ReactMultiEmail } from 'react-multi-email'
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { InvitationResult } from '@/models/common'
|
||||
import { XMarkIcon } from '@heroicons/react/24/outline'
|
||||
import { CheckCircleIcon } from '@heroicons/react/24/solid'
|
||||
import { RiQuestionLine } from '@remixicon/react'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Button from '@/app/components/base/button'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiCloseLine } from '@remixicon/react'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import * as React from 'react'
|
||||
import { useState } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import { Fragment, useCallback, useEffect } from 'react'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
RiRobot2Fill,
|
||||
RiRobot2Line,
|
||||
} from '@remixicon/react'
|
||||
import { flatten } from 'es-toolkit/compat'
|
||||
import { produce } from 'immer'
|
||||
import { flatten } from 'lodash-es'
|
||||
import { useParams } from 'next/navigation'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { AppDetailResponse } from '@/models/app'
|
||||
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react'
|
||||
import { ChevronDownIcon, PlusIcon } from '@heroicons/react/24/solid'
|
||||
import { noop } from 'lodash-es'
|
||||
import { noop } from 'es-toolkit/compat'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { Fragment, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
RiBook2Fill,
|
||||
RiBook2Line,
|
||||
} from '@remixicon/react'
|
||||
import { flatten } from 'lodash-es'
|
||||
import { flatten } from 'es-toolkit/compat'
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
RiArrowDownSLine,
|
||||
RiArrowRightSLine,
|
||||
} from '@remixicon/react'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { debounce } from 'es-toolkit/compat'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { Fragment, useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
Reference in New Issue
Block a user