Skip to content

Commit b75cdab

Browse files
authored
Merge pull request #23 from CatalysmsServerManager/development
2 parents b970514 + 95d8080 commit b75cdab

File tree

18 files changed

+11182
-10029
lines changed

18 files changed

+11182
-10029
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Build and Deploy
2-
on: [push]
2+
on: [push, pull_request]
33
jobs:
44
build-and-deploy:
55
runs-on: ubuntu-latest
@@ -47,4 +47,4 @@ jobs:
4747
uses: softprops/action-gh-release@v1
4848
with:
4949
files: build.zip
50-
tag_name: ${{ steps.prep.outputs.version }}-${{ steps.prep.outputs.created }}
50+
tag_name: ${{ steps.prep.outputs.version }}-${{ steps.prep.outputs.created }}

package-lock.json

Lines changed: 9357 additions & 9850 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,38 @@
55
"homepage": "/playground/",
66
"scripts": {
77
"start": "craco start",
8+
"prebuild": "node scripts/versionSetter.js",
89
"build": "craco build"
910
},
1011
"dependencies": {
11-
"@craco/craco": "^6.1.1",
12-
"@material-ui/core": "^4.11.3",
13-
"@sentry/react": "^6.16.1",
14-
"@sentry/tracing": "^6.16.1",
15-
"antd": "^4.18.2",
16-
"axios": "^0.21.1",
17-
"faker": "^5.5.3",
18-
"framer-motion": "^3.10.3",
19-
"history": "^5.0.0",
20-
"immutable": "^4.0.0-rc.12",
21-
"monaco-editor": "^0.23.0",
22-
"monaco-editor-webpack-plugin": "^3.0.1",
23-
"monaco-vim": "^0.1.12",
24-
"notistack": "^1.0.5",
25-
"react": "^17.0.1",
26-
"react-dom": "^17.0.1",
27-
"react-helmet": "^6.1.0",
28-
"react-redux": "^7.2.2",
29-
"react-router-dom": "^6.2.1",
12+
"@craco/craco": "6.1.1",
13+
"@material-ui/core": "4.11.3",
14+
"@sentry/react": "6.16.1",
15+
"@sentry/tracing": "6.16.1",
16+
"antd": "4.18.2",
17+
"axios": "0.21.1",
18+
"faker": "5.5.3",
19+
"framer-motion": "3.10.3",
20+
"history": "5.0.0",
21+
"immutable": "4.0.0-rc.12",
22+
"match-sorter": "6.3.1",
23+
"monaco-editor": "0.23.0",
24+
"monaco-editor-webpack-plugin": "3.0.1",
25+
"notistack": "1.0.5",
26+
"react": "17.0.1",
27+
"react-dom": "17.0.1",
28+
"react-helmet": "6.1.0",
29+
"react-redux": "7.2.2",
30+
"react-router-dom": "6.2.1",
3031
"react-scripts": "4.0.3",
31-
"react-sortable-hoc": "^1.11.0",
32-
"styled-components": "^5.2.1",
33-
"typescript": "^4.1.2",
34-
"web-vitals": "^1.0.1"
32+
"react-table": "latest",
33+
"styled-components": "5.3.5",
34+
"typescript": "4.6.3",
35+
"web-vitals": "1.0.1"
36+
},
37+
"resolutions": {
38+
"//": "See https://github.com/facebook/create-react-app/issues/11773",
39+
"react-error-overlay": "6.0.9"
3540
},
3641
"devDependencies": {
3742
"@types/axios": "^0.14.0",
@@ -41,6 +46,7 @@
4146
"@types/react-dom": "^17.0.0",
4247
"@types/react-helmet": "^6.1.0",
4348
"@types/react-redux": "^7.1.16",
49+
"@types/react-table": "^7.7.10",
4450
"@types/redux": "^3.6.0",
4551
"@types/redux-actions": "^2.6.1",
4652
"@types/styled-components": "^5.1.8",
@@ -185,4 +191,4 @@
185191
"last 1 safari version"
186192
]
187193
}
188-
}
194+
}

scripts/versionSetter.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const date = new Date();
2+
const version = { version: date.toISOString() };
3+
4+
const fs = require('fs');
5+
6+
fs.writeFile('public/version.json', JSON.stringify(version), 'utf8', (error) => {
7+
if (error) {
8+
throw new Error(error);
9+
}
10+
});

src/components/ContentContainer.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
import { FC } from 'react';
1+
import React, { FC } from 'react';
22
import styled from 'styled-components';
33

4-
const Container = styled.div`
4+
const Container = styled.div<{scrollOverflow?: boolean;}>`
55
width: 100%;
66
height: 100vh;
77
padding: 2.5%;
8+
overflow-y: ${(props) => props.scrollOverflow ? 'scroll' : 'unset' };
89
`;
910

10-
export const ContentContainer: FC = (props) => {
11+
interface ContainerProps {
12+
scrollOverflow?: boolean;
13+
}
14+
15+
export const ContentContainer: FC<ContainerProps> = (props) => {
1116
return (
12-
<Container>
17+
<Container scrollOverflow={props.scrollOverflow}>
1318
{props.children}
1419
</Container>
1520
);
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { Checkbox } from 'antd';
2+
import React, { useEffect, forwardRef } from 'react';
3+
4+
interface Props {
5+
indeterminate?: boolean;
6+
id?: string
7+
disabled?: boolean
8+
}
9+
10+
const useCombinedRefs = (...refs: any[]): React.MutableRefObject<any> => {
11+
const targetRef = React.useRef();
12+
13+
React.useEffect(() => {
14+
refs.forEach(ref => {
15+
if (!ref) return;
16+
17+
if (typeof ref === 'function') {
18+
ref(targetRef.current);
19+
} else {
20+
ref.current = targetRef.current;
21+
}
22+
});
23+
}, [refs]);
24+
25+
return targetRef;
26+
};
27+
28+
const IndeterminateCheckbox = forwardRef<HTMLInputElement, Props>(
29+
({ indeterminate, ...rest }, ref: React.Ref<HTMLInputElement>) => {
30+
const defaultRef = React.useRef(null);
31+
const combinedRef = useCombinedRefs(ref, defaultRef);
32+
33+
useEffect(() => {
34+
if (combinedRef?.current) {
35+
combinedRef.current.indeterminate = indeterminate ?? false;
36+
}
37+
}, [combinedRef, indeterminate]);
38+
39+
return (
40+
<React.Fragment>
41+
<Checkbox disabled={rest.disabled} id={rest.id} ref={combinedRef} type="checkbox" {...rest} />
42+
</React.Fragment>
43+
);
44+
}
45+
);
46+
47+
export default IndeterminateCheckbox;

src/components/Playground/Tab.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/components/Playground/TabBar.tsx

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/components/Playground/Tabs.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)