@quansitech/antd-admin 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import {Badge, Flex} from "antd";
5
5
  import {ColumnReadonlyProps} from "./types";
6
6
  import {asyncFilter, handleRules} from "../../../lib/helpers";
7
7
  import {Rules} from "@rc-component/async-validator/lib/interface";
8
- import {upperFirst} from "lodash";
8
+ import {upperFirst} from "es-toolkit";
9
9
  import {TableColumnActionProps} from "./Action/types";
10
10
 
11
11
  type ComponentType = {
@@ -3,7 +3,7 @@ import {Component} from "react";
3
3
  import {createScript, filterObjectKeys} from "../../lib/helpers";
4
4
  import {Spin} from "antd";
5
5
  import {ModalContext, ModalContextProps} from "../ModalContext";
6
- import {uniqueId} from "lodash";
6
+ import {uniqueId} from "es-toolkit/compat";
7
7
 
8
8
  declare global {
9
9
  interface Window {
@@ -3,7 +3,7 @@ import {lazy, useEffect, useState} from "react";
3
3
  import {ReactComponentLike} from "prop-types";
4
4
  import {Badge, Space} from "antd";
5
5
  import container from "../../lib/container";
6
- import {upperFirst} from "lodash";
6
+ import {upperFirst} from "es-toolkit";
7
7
 
8
8
  export default function (props: {
9
9
  actions?: FormActionType[]
@@ -1,7 +1,7 @@
1
1
  import {BetaSchemaForm, ProFormColumnsType, ProFormInstance, ProSkeleton} from "@ant-design/pro-components";
2
2
  import type {FormSchema} from "@ant-design/pro-form/es/components/SchemaForm/typing";
3
3
  import React, {lazy, Suspense, useContext, useEffect, useRef, useState} from "react";
4
- import {cloneDeep, upperFirst} from "lodash";
4
+ import {cloneDeep, upperFirst} from "es-toolkit";
5
5
  import container from "../lib/container";
6
6
  import {FormActionType} from "./Form/Action/types";
7
7
  import Actions from "./Form/Actions";
@@ -9,7 +9,6 @@ import {MenuInfo} from "rc-menu/lib/interface";
9
9
  import http from "../../lib/http";
10
10
  // @ts-ignore
11
11
  import {Route} from '@ant-design/pro-layout/lib/typing';
12
- import {assign} from "lodash";
13
12
  import {MoonOutlined, SunOutlined} from "@ant-design/icons";
14
13
 
15
14
  export default function ({children, pageTitle, siteTitle}: {
@@ -39,7 +38,7 @@ export default function ({children, pageTitle, siteTitle}: {
39
38
  const [theme, setTheme] = useState<'light' | 'realDark'>('light')
40
39
 
41
40
  const assignProps = (newProps: LayoutProps) => {
42
- setProps(assign(props, newProps))
41
+ setProps(Object.assign(props, newProps))
43
42
  }
44
43
 
45
44
  const headerContentRender = () => {
@@ -3,7 +3,7 @@ import container from "../../lib/container";
3
3
  import {ReactComponentLike} from "prop-types";
4
4
  import {Badge, Space} from "antd";
5
5
  import {TableActionProps} from "./Action/types";
6
- import {upperFirst} from "lodash";
6
+ import {upperFirst} from "es-toolkit";
7
7
 
8
8
  export default function ({
9
9
  actions,
@@ -9,7 +9,7 @@ import {
9
9
  } from "@ant-design/pro-components";
10
10
  import type {SortOrder} from "antd/lib/table/interface";
11
11
  import {TablePaginationConfig} from "antd/es/table";
12
- import {cloneDeep, isArray, uniqueId, upperFirst} from "lodash"
12
+ import {cloneDeep, isArray, uniqueId, upperFirst} from "es-toolkit/compat"
13
13
  import {TableContext} from "./TableContext";
14
14
  import ToolbarActions from "./Table/ToolbarActions";
15
15
  import container from "../lib/container";
@@ -3,7 +3,7 @@ import {lazy, Suspense, useEffect, useState} from "react";
3
3
  import type {Tab} from 'rc-tabs/lib/interface';
4
4
  import container from "../lib/container";
5
5
  import {routerNavigateTo} from "../lib/helpers";
6
- import {upperFirst} from "lodash";
6
+ import {upperFirst} from "es-toolkit";
7
7
  import {ProSkeleton} from "@ant-design/pro-components";
8
8
 
9
9
  type TabProps = {
package/lib/helpers.tsx CHANGED
@@ -5,7 +5,6 @@ import {Rules, ValidateError, ValidateFieldsError, Values} from "@rc-component/a
5
5
  import {Spin} from "antd";
6
6
  import http from "./http";
7
7
  import container from "./container";
8
- import {upperFirst} from "lodash";
9
8
  import {lazy, Suspense} from "react";
10
9
  import global from "./global";
11
10
  import {ModalContext} from "../components/ModalContext";
@@ -143,4 +142,8 @@ export async function modalShow(options: ModalOptions) {
143
142
  destroy: modal.destroy,
144
143
  update: modal.update,
145
144
  }
145
+ }
146
+
147
+ export function upperFirst(str: string) {
148
+ return str.charAt(0).toUpperCase() + str.slice(1)
146
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quansitech/antd-admin",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "components",
@@ -12,13 +12,12 @@
12
12
  "antd": "^5.20.5",
13
13
  "antd-img-crop": "^4.23.0",
14
14
  "axios": "^1.7.7",
15
- "lodash": "^4.17.21",
15
+ "es-toolkit": "^1.26.1",
16
16
  "react": "^18.3.0",
17
17
  "react-dom": "^18.3.0",
18
18
  "js-md5": "^0.8.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/lodash": "^4.14.193",
22
21
  "@types/react": "^18.3.0",
23
22
  "@types/react-dom": "^18.3.0"
24
23
  },