Gathering detailed insights and metrics for sunflower-antd
Gathering detailed insights and metrics for sunflower-antd
Gathering detailed insights and metrics for sunflower-antd
Gathering detailed insights and metrics for sunflower-antd
npm install sunflower-antd
Typescript
Module System
88.6
Supply Chain
91.9
Quality
79.6
Maintenance
100
Vulnerability
100
License
TypeScript (61.03%)
JavaScript (38.97%)
Total Downloads
1,125,427
Last Day
2,830
Last Week
15,759
Last Month
54,804
Last Year
641,095
499 Stars
281 Commits
42 Forks
14 Watching
30 Branches
39 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0-beta.3
Package Id
sunflower-antd@1.0.0-beta.3
Unpacked Size
58.88 kB
Size
12.73 kB
File Count
63
Cumulative downloads
Total Downloads
Last day
-2.5%
2,830
Compared to previous day
Last week
16.3%
15,759
Compared to previous week
Last month
-5.9%
54,804
Compared to previous month
Last year
102.8%
641,095
Compared to previous year
Process Components for antd.
English | 简体ä¸æ–‡
Usually, we use multiple components of antd to complete a process. For example, if you want to complete the function of "using Table to display the list after Form search", you need to deal with the relationship between "Form" and "Table", including query, pagination, etc.
Is there a way to simplify the maintenance of relationships between components? This is what sunflower is for. React-hooks that describe a scene are called "Process Components". Sunflower is a series of antd-based "Process Components".
The following is an example of a "Form & Table" scenario. You only need the following code to complete functions such as querying and paging. useFormTable
is a react-hooks, which will return the props of the antd component, etc. You can give these props to the antd component to complete the connection between the components.
1import React from 'react'; 2import { useFormTable } from 'sunflower-antd'; 3import { Input, Button, Table, Form } from 'antd'; 4 5export default props => { 6 const { formProps, tableProps } = useFormTable({ 7 async search(values) { 8 const res = await request(values); 9 return res; 10 }, 11 }); 12 13 return ( 14 <div> 15 <Form {...formProps}> 16 <Form.Item label="Username" name="username"> 17 <Input placeholder="Username" /> 18 </Form.Item> 19 20 <Form.Item> 21 <Button type="primary" htmlType="submit"> 22 Search 23 </Button> 24 </Form.Item> 25 </Form> 26 27 <Table 28 columns={[ 29 { 30 title: 'Username', 31 dataIndex: 'username', 32 key: 'username', 33 }, 34 ]} 35 {...tableProps} 36 /> 37 </div> 38 ); 39};
$ npm i sunflower-antd --save
// or
$ yarn add sunflower-antd
$ yarn
$ yarn start
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
101 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More