This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| handleRowResizerMove = (e: React.MouseEvent<HTMLDivElement>) => { | |
| const { activePanel } = this.props.appStore.uiStore.queryPanelStore; | |
| const containerTop = this.containerRef.current.getBoundingClientRect().top; | |
| mouseEventSubscribe( | |
| (mpos: IMousePosition) => { | |
| const resizerTop = mpos.clientY - containerTop; | |
| activePanel.setFlexGlow((resizerTop * 2) / this.containerHeight); | |
| }, | |
| () => { | |
| // onSubscribeEnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sortPanel(fromIndex: number, toIndex: number) { | |
| const movePanel = self.panelsRefs[fromIndex]; | |
| self.panelsRefs.splice(fromIndex, 1); | |
| self.panelsRefs.splice(toIndex, 0, movePanel); | |
| open(movePanel); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| handleDragEnd = (tabIndex: number, e: React.DragEvent) => { | |
| const { sortPanel } = this.props.appStore.uiStore.queryPanelStore; | |
| if ( | |
| this.dragTabIndex !== undefined && | |
| this.dragOverTabIndex !== undefined && | |
| this.dragTabIndex !== this.dragOverTabIndex | |
| ) { | |
| sortPanel(this.dragTabIndex, this.dragOverTabIndex); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .ant-modal { | |
| top: 24px; | |
| .effect() { | |
| animation-duration: 0.3s; | |
| animation-fill-mode: both; | |
| } | |
| &.slidedown-enter, | |
| &.slidedown-appear { | |
| opacity: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export interface IMousePosition { | |
| pageX: number; | |
| pageY: number; | |
| clientX: number; | |
| clientY: number; | |
| } | |
| export type MouseEventSubscribeCallbackFn = (mpos: IMousePosition) => void; | |
| const mouseEventSubscribe = ( | |
| callBack: MouseEventSubscribeCallbackFn, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ReactMultiEmail | |
| placeholder="Input your email" | |
| emails={emails} | |
| onChange={(_emails: string[]) => { | |
| this.setState({ emails: _emails }); | |
| }} | |
| getLabel={( | |
| email: string, | |
| index: number, | |
| removeEmail: (index: number) => void, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export interface ISMixinFlex { | |
| direction?: 'row' | 'column'; | |
| justifyContent?: | |
| | 'normal' | |
| | 'space-between' | |
| | 'space-around' | |
| | 'space-evenly' | |
| | 'stretch' | |
| | 'start' | |
| | 'end' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "scripts": { | |
| "start": "npm-run-all -p build-watch:less-var build-watch:react", | |
| "tslint-check": "tslint-config-prettier-check ./tslint.json", | |
| "build-watch:react": "react-app-rewired start --scripts-version react-scripts-ts", | |
| "build-watch:less-var": "ts-node -P ./tsconfig.dev.json ./script/generate-less-var.ts" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| const fs = require('fs-extra'); | |
| const chalk = require('chalk'); | |
| const srcPath = '../src/styles/theme.ts'; | |
| const srcResoloved = path.resolve(__dirname, srcPath); | |
| const target = path.resolve(__dirname, '../src/styles/less/theme-vars.less'); | |
| const buildLessVar = () => { | |
| delete require.cache[srcResoloved]; | |
| const theme = require(srcPath); | |
| fs.writeFileSync( |