Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
qhanw committed Aug 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 81502c1 commit 2b2371f
Showing 8 changed files with 12,996 additions and 9,937 deletions.
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit "${1}"
npx --no -- commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
51 changes: 26 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -37,33 +37,34 @@
]
},
"devDependencies": {
"@ant-design/icons": "^5.3.0",
"@ant-design/pro-components": "^2.6.49",
"@ant-design/icons": "^5.4.0",
"@ant-design/pro-components": "^2.7.15",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"@testing-library/react": "^14.2.1",
"@changesets/cli": "^2.27.7",
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/react": "^18.2.58",
"@types/react-dom": "^18.2.19",
"@vitest/coverage-v8": "^1.3.1",
"antd": "^5.14.2",
"dumi": "^2.2.17",
"dumi-theme-antd-style": "^0.30.0",
"father": "^4.4.0",
"husky": "^9.0.11",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"query-string": "^9.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.1",
"rimraf": "^5.0.5",
"turbo": "^1.12.4",
"typescript": "^5.3.3",
"vitest": "^1.3.1"
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@vitest/coverage-v8": "^2.0.5",
"antd": "^5.20.2",
"dumi": "^2.4.8",
"dumi-theme-antd-style": "^0.31.1",
"father": "^4.5.0",
"husky": "^9.1.5",
"jsdom": "^24.1.1",
"lint-staged": "^15.2.9",
"prettier": "^3.3.3",
"query-string": "^9.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.26.1",
"rimraf": "^6.0.1",
"turbo": "^2.0.14",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"packageManager": "[email protected]",
"license": "MIT"
}
14 changes: 7 additions & 7 deletions packages/components/src/sortable-table/demos/base.tsx
Original file line number Diff line number Diff line change
@@ -3,25 +3,25 @@ import { SortableTable } from '@bizk/components';
import { useState } from 'react';

const data = [
{ id: 1, name: 'Andy', age: 18 },
{ id: 2, name: 'Amy', age: 45 },
{ id: 3, name: 'Tom', age: 32 },
{ id: 4, name: 'Anna', age: 30 },
{ id: 5, name: 'Jue', age: 25 },
{ uid: 1, name: 'Andy', age: 18 },
{ uid: 2, name: 'Amy', age: 45 },
{ uid: 3, name: 'Tom', age: 32 },
{ uid: 4, name: 'Anna', age: 30 },
{ uid: 5, name: 'Jue', age: 25 },
];

export default () => {
const [dataSource, setDataSource] = useState(data);

const columns = [
{ title: 'order', dataIndex: 'id' },
{ title: 'order', dataIndex: 'uid' },
{ title: 'name', dataIndex: 'name' },
{ title: 'age', dataIndex: 'age' },
];

return (
<SortableTable onChange={(d: any) => setDataSource(d)}>
<Table rowKey="id" columns={columns} dataSource={dataSource} />
<Table rowKey="uid" columns={columns} dataSource={dataSource} />
</SortableTable>
);
};
6 changes: 3 additions & 3 deletions packages/components/src/sortable-table/index.tsx
Original file line number Diff line number Diff line change
@@ -48,12 +48,12 @@ export default function SortableTable({
if (!dataSource?.length) return;
const { active, over } = event;

if (active[rowKey] !== over?.[rowKey]) {
if (active.id !== over?.id) {
const oldIndex = dataSource.findIndex(
(item: any) => item[rowKey] === active[rowKey],
(item: any) => item[rowKey] === active.id,
);
const newIndex = dataSource.findIndex(
(item: any) => item[rowKey] === over?.[rowKey],
(item: any) => item[rowKey] === over?.id,
);

const next = arrayMove(dataSource, oldIndex, newIndex);
22,851 changes: 12,958 additions & 9,893 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@
"strict": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"declaration": true,
"skipLibCheck": true,
"paths": {
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"tasks": {
"doctor": {},
"build": {
"dependsOn": ["^build"],

0 comments on commit 2b2371f

Please sign in to comment.