Gathering detailed insights and metrics for rc-dock
Gathering detailed insights and metrics for rc-dock
Gathering detailed insights and metrics for rc-dock
Gathering detailed insights and metrics for rc-dock
npm install rc-dock
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
691 Stars
609 Commits
97 Forks
12 Watching
4 Branches
13 Contributors
Updated on 22 Nov 2024
Minified
Minified + Gzipped
JavaScript (65.15%)
TypeScript (27.66%)
SCSS (3.86%)
HTML (2.83%)
CSS (0.5%)
Cumulative downloads
Total Downloads
Last day
20.5%
2,395
Compared to previous day
Last week
20.6%
13,619
Compared to previous week
Last month
135.2%
50,626
Compared to previous month
Last year
14.4%
303,537
Compared to previous year
24
1import DockLayout from 'rc-dock' 2import "rc-dock/dist/rc-dock.css"; 3 4... 5 6defaultLayout = { 7 dockbox: { 8 mode: 'horizontal', 9 children: [ 10 { 11 tabs: [ 12 {id: 'tab1', title: 'tab1', content: <div>Hello World</div>} 13 ] 14 } 15 ] 16 } 17}; 18 19render() { 20 return ( 21 <DockLayout 22 defaultLayout={defaultLayout} 23 style={{ 24 position: "absolute", 25 left: 10, 26 top: 10, 27 right: 10, 28 bottom: 10, 29 }} 30 /> 31 ) 32} 33
Property | Type | Comments | Default |
---|---|---|---|
dockbox | BoxData | main dock box | empty BoxData |
floatbox | BoxData | main float box, children can only be PanelData | empty BoxData |
a box is the layout element that contains other boxes or panels
Property | Type | Comments | Default |
---|---|---|---|
mode | 'horizontal' | 'vertical' | 'float' | layout mode of the box | |
children | (BoxData | PanelData)[] | children boxes or panels | required |
a panel is a visiaul container with tabs button in the title bar
Property | Type | Comments | Default |
---|---|---|---|
tabs | TabData[] | children tabs | required |
panelLock | PanelLock | addition information of a panel, this prevents the panel from being removed when there is no tab inside, a locked panel can not be moved to float layer either |
Property | Type | Comments | Default |
---|---|---|---|
id | string | unique id | required |
title | string | ReactElement | tab title | required |
content | ReactElement | (tab: TabData) => ReactElement | tab content | required |
closable | bool | whether tab can be closed | false |
group | string | tabs with different tab group can not be put in same panel, more options for the group can be defined as TabGroup in DefaultLayout.groups |
get the ref
of the DockLayout component to use the following API
save layout
1saveLayout(): SavedLayout
load layout
1 loadLayout(savedLayout: SavedLayout): void
move a tab or a panel, if source is already in the layout, you can use the find method to get it with id first
1dockMove(source: TabData | PanelData, target: string | TabData | PanelData | BoxData, direction: DropDirection): void;
find PanelData or TabData by id
1find(id: string): PanelData | TabData;
update a tab with new TabData
returns false if the tab is not found
1updateTab(id: string, newTab: TabData): boolean;
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/18 approved changesets -- score normalized to 2
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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