├── .eslintrc ├── .gitignore ├── .npmignore ├── .slugignore ├── .travis.yml ├── LICENSE ├── Procfile ├── README.md ├── build ├── favicon.png ├── index.html └── static │ ├── a520ade770e48057047b110e6f4ae392.png │ ├── logo_small.png │ ├── main.js │ └── vs │ ├── base │ └── worker │ │ └── workerMain.js │ ├── basic-languages │ └── src │ │ ├── bat.js │ │ ├── coffee.js │ │ ├── cpp.js │ │ ├── csharp.js │ │ ├── css.js │ │ ├── dockerfile.js │ │ ├── fsharp.js │ │ ├── go.js │ │ ├── handlebars.js │ │ ├── html.js │ │ ├── ini.js │ │ ├── java.js │ │ ├── less.js │ │ ├── lua.js │ │ ├── markdown.js │ │ ├── msdax.js │ │ ├── objective-c.js │ │ ├── php.js │ │ ├── postiats.js │ │ ├── powershell.js │ │ ├── pug.js │ │ ├── python.js │ │ ├── r.js │ │ ├── razor.js │ │ ├── ruby.js │ │ ├── sb.js │ │ ├── scss.js │ │ ├── solidity.js │ │ ├── sql.js │ │ ├── swift.js │ │ ├── vb.js │ │ ├── xml.js │ │ └── yaml.js │ ├── editor │ ├── contrib │ │ └── suggest │ │ │ └── browser │ │ │ └── media │ │ │ ├── String_16x.svg │ │ │ └── String_inverse_16x.svg │ ├── editor.main.css │ ├── editor.main.js │ ├── editor.main.nls.de.js │ ├── editor.main.nls.es.js │ ├── editor.main.nls.fr.js │ ├── editor.main.nls.hu.js │ ├── editor.main.nls.it.js │ ├── editor.main.nls.ja.js │ ├── editor.main.nls.js │ ├── editor.main.nls.ko.js │ ├── editor.main.nls.pt-br.js │ ├── editor.main.nls.ru.js │ ├── editor.main.nls.tr.js │ ├── editor.main.nls.zh-cn.js │ ├── editor.main.nls.zh-tw.js │ └── standalone │ │ └── browser │ │ └── quickOpen │ │ └── symbol-sprite.svg │ ├── language │ ├── css │ │ ├── cssMode.js │ │ └── cssWorker.js │ ├── html │ │ ├── htmlMode.js │ │ └── htmlWorker.js │ ├── json │ │ ├── jsonMode.js │ │ └── jsonWorker.js │ └── typescript │ │ ├── lib │ │ └── typescriptServices.js │ │ └── src │ │ ├── mode.js │ │ └── worker.js │ └── loader.js ├── coverage ├── lcov-report │ ├── base.css │ ├── common │ │ ├── history.js.html │ │ └── index.html │ ├── features │ │ ├── common │ │ │ ├── PageNotFound.js.html │ │ │ ├── SearchInput.js.html │ │ │ ├── SimpleNav.js.html │ │ │ ├── colors.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ └── redux │ │ │ │ ├── constants.js.html │ │ │ │ ├── index.html │ │ │ │ └── testAction.js.html │ │ ├── diagram │ │ │ ├── ElementDiagram.js.html │ │ │ ├── FeatureDiagram.js.html │ │ │ ├── OverviewChordDiagram.js.html │ │ │ ├── OverviewDiagram.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ │ ├── index.html │ │ │ │ ├── initialState.js.html │ │ │ │ └── reducer.js.html │ │ │ └── selectors │ │ │ │ ├── getElementDiagramData.js.html │ │ │ │ ├── getOverviewChordDiagramData.js.html │ │ │ │ ├── getOverviewDiagramData.js.html │ │ │ │ └── index.html │ │ ├── home │ │ │ ├── About.js.html │ │ │ ├── AddActionForm.js.html │ │ │ ├── AddDialog.js.html │ │ │ ├── CodeView.js.html │ │ │ ├── ElementPage.js.html │ │ │ ├── Hello.js.html │ │ │ ├── ProjectExplorer.js.html │ │ │ ├── SidePanel.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ │ ├── actions.js.html │ │ │ │ ├── constants.js.html │ │ │ │ ├── fetchFileContent.js.html │ │ │ │ ├── fetchProjectData.js.html │ │ │ │ ├── hideDemoAlert.js.html │ │ │ │ ├── index.html │ │ │ │ ├── saveCode.js.html │ │ │ │ ├── saveFile.js.html │ │ │ │ └── showDemoAlert.js.html │ │ │ └── selectors │ │ │ │ ├── explorerTreeData.js.html │ │ │ │ └── index.html │ │ └── rekit-cmds │ │ │ ├── cmdSuccessNotification.js.html │ │ │ ├── index.html │ │ │ └── redux │ │ │ ├── actions.js.html │ │ │ ├── constants.js.html │ │ │ ├── execCmd.js.html │ │ │ ├── hideCmdDialog.js.html │ │ │ ├── index.html │ │ │ └── showCmdDialog.js.html │ ├── index.html │ ├── prettify.css │ ├── prettify.js │ ├── sort-arrow-sprite.png │ ├── sorter.js │ └── src │ │ ├── Root.js.html │ │ ├── common │ │ ├── configStore.js.html │ │ ├── history.js.html │ │ ├── index.html │ │ ├── rootReducer.js.html │ │ └── routeConfig.js.html │ │ ├── features │ │ ├── common │ │ │ ├── PageNotFound.js.html │ │ │ ├── SearchInput.js.html │ │ │ ├── SimpleNav.js.html │ │ │ ├── colors.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ │ ├── constants.js.html │ │ │ │ ├── index.html │ │ │ │ ├── initialState.js.html │ │ │ │ ├── reducer.js.html │ │ │ │ └── testAction.js.html │ │ │ └── route.js.html │ │ ├── diagram │ │ │ ├── ElementDiagram.js.html │ │ │ ├── FeatureDiagram.js.html │ │ │ ├── OverviewChordDiagram.js.html │ │ │ ├── OverviewDiagram.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ │ ├── index.html │ │ │ │ ├── initialState.js.html │ │ │ │ └── reducer.js.html │ │ │ ├── route.js.html │ │ │ └── selectors │ │ │ │ ├── getElementDiagramData.js.html │ │ │ │ ├── getOverviewChordDiagramData.js.html │ │ │ │ ├── getOverviewDiagramData.js.html │ │ │ │ └── index.html │ │ ├── home │ │ │ ├── About.js.html │ │ │ ├── AddActionForm.js.html │ │ │ ├── AddDialog.js.html │ │ │ ├── App.js.html │ │ │ ├── CodeEditor.js.html │ │ │ ├── CodeView.js.html │ │ │ ├── DemoAlert.js.html │ │ │ ├── ElementPage.js.html │ │ │ ├── Hello.js.html │ │ │ ├── HomePage.js.html │ │ │ ├── ProjectExplorer.js.html │ │ │ ├── RekitSteps.js.html │ │ │ ├── RoutesPage.js.html │ │ │ ├── SidePanel.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ │ ├── actions.js.html │ │ │ │ ├── constants.js.html │ │ │ │ ├── fetchFileContent.js.html │ │ │ │ ├── fetchProjectData.js.html │ │ │ │ ├── hideDemoAlert.js.html │ │ │ │ ├── index.html │ │ │ │ ├── initialState.js.html │ │ │ │ ├── reducer.js.html │ │ │ │ ├── saveFile.js.html │ │ │ │ └── showDemoAlert.js.html │ │ │ ├── route.js.html │ │ │ └── selectors │ │ │ │ ├── explorerTreeData.js.html │ │ │ │ ├── getOverviewStat.js.html │ │ │ │ └── index.html │ │ ├── rekit-cmds │ │ │ ├── CmdForm.js.html │ │ │ ├── DialogPlace.js.html │ │ │ ├── LogViewer.js.html │ │ │ ├── LogViewerDialog.js.html │ │ │ ├── cmdFormHelper.js.html │ │ │ ├── cmdSuccessNotification.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ │ ├── actions.js.html │ │ │ │ ├── constants.js.html │ │ │ │ ├── execCmd.js.html │ │ │ │ ├── hideCmdDialog.js.html │ │ │ │ ├── index.html │ │ │ │ ├── initialState.js.html │ │ │ │ ├── reducer.js.html │ │ │ │ └── showCmdDialog.js.html │ │ │ └── route.js.html │ │ └── rekit-tools │ │ │ ├── BuildPage.js.html │ │ │ ├── RunTestPage.js.html │ │ │ ├── TestCoveragePage.js.html │ │ │ ├── TestCoverageSummary.js.html │ │ │ ├── index.html │ │ │ ├── index.js.html │ │ │ ├── redux │ │ │ ├── actions.js.html │ │ │ ├── checkTestCoverage.js.html │ │ │ ├── clearTestOutput.js.html │ │ │ ├── constants.js.html │ │ │ ├── index.html │ │ │ ├── initialState.js.html │ │ │ ├── reducer.js.html │ │ │ ├── runBuild.js.html │ │ │ └── runTest.js.html │ │ │ ├── route.js.html │ │ │ └── utils.js.html │ │ ├── index.html │ │ └── index.js.html └── lcov.info ├── images ├── cmd-dialogs.png ├── demo1.png ├── demo2.png ├── element-diagram.png ├── element-page.png ├── overview-diagram-action.png ├── overview-diagram-component.png ├── overview-diagram-dep1.png ├── overview-diagram-dep2.png ├── overview-diagram-dep3.png ├── overview-diagram-feature.png ├── overview-diagram-misc.png ├── portal-build.png ├── portal-dashboard.png ├── portal-local.png ├── portal-project-explorer.png └── portal-test.png ├── middleware ├── api │ ├── execCmd.js │ ├── fetchProjectData.js │ ├── getFileContent.js │ ├── runBuild.js │ ├── runTest.js │ └── saveFile.js ├── demo.txt └── index.js ├── package.json ├── src ├── Root.js ├── common │ ├── configStore.js │ ├── history.js │ ├── rootReducer.js │ └── routeConfig.js ├── favicon.png ├── features │ ├── common │ │ ├── PageNotFound.js │ │ ├── PageNotFound.less │ │ ├── SearchInput.js │ │ ├── SearchInput.less │ │ ├── SimpleNav.js │ │ ├── SimpleNav.less │ │ ├── colors.js │ │ ├── index.js │ │ ├── redux │ │ │ ├── actions.js │ │ │ ├── constants.js │ │ │ ├── initialState.js │ │ │ ├── reducer.js │ │ │ └── testAction.js │ │ ├── route.js │ │ ├── style.less │ │ └── utils.js │ ├── diagram │ │ ├── ElementDiagram.js │ │ ├── ElementDiagram.less │ │ ├── FeatureDiagram.js │ │ ├── FeatureDiagram.less │ │ ├── OverviewChordDiagram.js │ │ ├── OverviewChordDiagram.less │ │ ├── OverviewDiagram.js │ │ ├── OverviewDiagram.less │ │ ├── index.js │ │ ├── redux │ │ │ ├── actions.js │ │ │ ├── constants.js │ │ │ ├── initialState.js │ │ │ └── reducer.js │ │ ├── route.js │ │ ├── selectors │ │ │ ├── getElementDiagramData.js │ │ │ ├── getOverviewChordDiagramData.js │ │ │ └── getOverviewDiagramData.js │ │ ├── selectors2.js │ │ └── style.less │ ├── home │ │ ├── About.js │ │ ├── About.less │ │ ├── AddActionForm.js │ │ ├── AddActionForm.less │ │ ├── AddDialog.js │ │ ├── AddDialog.less │ │ ├── App.js │ │ ├── App.less │ │ ├── CodeEditor.js │ │ ├── CodeEditor.less │ │ ├── CodeView.js │ │ ├── CodeView.less │ │ ├── DemoAlert.js │ │ ├── DemoAlert.less │ │ ├── ElementPage.js │ │ ├── ElementPage.less │ │ ├── Hello.js │ │ ├── Hello.less │ │ ├── HomePage.js │ │ ├── HomePage.less │ │ ├── ProjectExplorer.js │ │ ├── ProjectExplorer.less │ │ ├── RekitSteps.js │ │ ├── RekitSteps.less │ │ ├── RoutesPage.js │ │ ├── RoutesPage.less │ │ ├── SidePanel.js │ │ ├── SidePanel.less │ │ ├── index.js │ │ ├── readme.md │ │ ├── redux │ │ │ ├── actions.js │ │ │ ├── constants.js │ │ │ ├── fetchFileContent.js │ │ │ ├── fetchProjectData.js │ │ │ ├── hideDemoAlert.js │ │ │ ├── initialState.js │ │ │ ├── reducer.js │ │ │ ├── saveFile.js │ │ │ └── showDemoAlert.js │ │ ├── route.js │ │ ├── selectors │ │ │ ├── explorerTreeData.js │ │ │ └── getOverviewStat.js │ │ ├── style.less │ │ ├── test.json │ │ ├── test.pdf │ │ └── test.txt │ ├── rekit-cmds │ │ ├── CmdForm.js │ │ ├── CmdForm.less │ │ ├── DialogPlace.js │ │ ├── DialogPlace.less │ │ ├── LogViewer.js │ │ ├── LogViewer.less │ │ ├── LogViewerDialog.js │ │ ├── LogViewerDialog.less │ │ ├── cmdFormHelper.js │ │ ├── cmdSuccessNotification.js │ │ ├── index.js │ │ ├── redux │ │ │ ├── actions.js │ │ │ ├── constants.js │ │ │ ├── execCmd.js │ │ │ ├── hideCmdDialog.js │ │ │ ├── initialState.js │ │ │ ├── reducer.js │ │ │ └── showCmdDialog.js │ │ ├── route.js │ │ └── style.less │ └── rekit-tools │ │ ├── BuildPage.js │ │ ├── BuildPage.less │ │ ├── RunTestPage.js │ │ ├── RunTestPage.less │ │ ├── TestCoveragePage.js │ │ ├── TestCoveragePage.less │ │ ├── TestCoverageSummary.js │ │ ├── TestCoverageSummary.less │ │ ├── index.js │ │ ├── redux │ │ ├── actions.js │ │ ├── checkTestCoverage.js │ │ ├── clearTestOutput.js │ │ ├── constants.js │ │ ├── initialState.js │ │ ├── reducer.js │ │ ├── runBuild.js │ │ └── runTest.js │ │ ├── route.js │ │ ├── style.less │ │ └── utils.js ├── fonts │ ├── iconfont │ │ ├── demo.css │ │ ├── demo_fontclass.html │ │ ├── demo_symbol.html │ │ ├── demo_unicode.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ └── work-sans │ │ ├── WorkSans-Black.woff │ │ ├── WorkSans-Bold.woff │ │ ├── WorkSans-ExtraBold.woff │ │ ├── WorkSans-ExtraLight.woff │ │ ├── WorkSans-Light.woff │ │ ├── WorkSans-Medium.woff │ │ ├── WorkSans-Regular.woff │ │ ├── WorkSans-SemiBold.woff │ │ └── WorkSans-Thin.woff ├── images │ ├── logo.png │ └── logo_small.png ├── index.html ├── index.js └── styles │ ├── antdCustom.less │ ├── antdMixins.less │ ├── global.less │ ├── index.less │ ├── mixins.less │ ├── prism.css │ └── reset.css ├── test.js ├── tests ├── .eslintrc ├── before-all.js ├── features │ ├── common │ │ ├── PageNotFound.test.js │ │ ├── SearchInput.test.js │ │ ├── SimpleNav.test.js │ │ └── redux │ │ │ └── testAction.test.js │ ├── diagram │ │ ├── ElementDiagram.test.js │ │ ├── FeatureDiagram.test.js │ │ ├── OverviewChordDiagram.test.js │ │ ├── OverviewDiagram.test.js │ │ └── redux │ │ │ └── reducer.test.js │ ├── home │ │ ├── About.test.js │ │ ├── AddActionForm.test.js │ │ ├── AddDialog.test.js │ │ ├── App.test.js │ │ ├── CodeEditor.test.js │ │ ├── CodeView.test.js │ │ ├── DemoAlert.test.js │ │ ├── ElementPage.test.js │ │ ├── Hello.test.js │ │ ├── HomePage.test.js │ │ ├── ProjectExplorer.test.js │ │ ├── RekitSteps.test.js │ │ ├── RoutesPage.test.js │ │ ├── SidePanel.test.js │ │ └── redux │ │ │ ├── fetchFileContent.test.js │ │ │ ├── fetchProjectData.test.js │ │ │ ├── hideDemoAlert.test.js │ │ │ ├── reducer.test.js │ │ │ ├── saveFile.test.js │ │ │ └── showDemoAlert.test.js │ ├── rekit-cmds │ │ ├── CmdForm.test.js │ │ ├── DialogPlace.test.js │ │ ├── LogViewer.test.js │ │ ├── LogViewerDialog.test.js │ │ └── redux │ │ │ ├── execCmd.test.js │ │ │ ├── hideCmdDialog.test.js │ │ │ ├── reducer.test.js │ │ │ └── showCmdDialog.test.js │ └── rekit-tools │ │ ├── BuildPage.test.js │ │ ├── RunTestPage.test.js │ │ ├── TestCoveragePage.test.js │ │ ├── TestCoverageSummary.test.js │ │ └── redux │ │ ├── checkTestCoverage.test.js │ │ ├── clearTestOutput.test.js │ │ ├── reducer.test.js │ │ ├── runBuild.test.js │ │ └── runTest.test.js ├── index.test.js ├── jsdom-setup.js └── no-duplicated-constant.test.js ├── tools ├── .eslintrc ├── build.js ├── demo_build.js ├── npm_publish.js ├── plugins │ └── antd-form-component │ │ └── config.js ├── run_test.js └── server.js ├── webpack-config.js ├── webpack.test.config.js └── yarn.lock /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | 'extends': './node_modules/eslint-config-airbnb/.eslintrc', 3 | 'parser': 'babel-eslint', 4 | 'globals': { 5 | 'document': true, 6 | 'Prism': true, 7 | 'window': true 8 | }, 9 | 'settings': { 10 | 'import/resolver': { 11 | 'babel-module': {} 12 | } 13 | }, 14 | 'rules': { 15 | 'strict': 0, 16 | 'guard-for-in': 0, 17 | 'max-len': 0, 18 | 'no-nested-ternary': 0, 19 | 'no_underscore_dangle': 0, 20 | 'no-param-reassign': 0, 21 | 'no-mixed-operators': 0, 22 | 'no-console': 0, 23 | 'global-require': 0, 24 | 'no-plusplus': 0, 25 | 'new-cap': 0, 26 | 'class-methods-use-this': 0, 27 | 'react/jsx-filename-extension': 0, 28 | 'react/prefer-stateless-function': 0, 29 | 'react/forbid-prop-types': 0, 30 | 'react/no-danger': 0, 31 | 'react/jsx-no-target-blank': 0, 32 | 'jsx-a11y/label-has-for': 0, 33 | 'import/prefer-default-export': 0, 34 | 'import/no-extraneous-dependencies': 0, 35 | 'import/no-named-as-default': 0, 36 | 'import/imports-first': 0 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | # coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | .tmp 40 | 41 | .DS_Store 42 | # build 43 | dist 44 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | * -------------------------------------------------------------------------------- /.slugignore: -------------------------------------------------------------------------------- 1 | yarn.lock 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "stable" 4 | - "6" 5 | install: npm install 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Nate Wang (supnate@gmail.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node tools/server.js --build --readonly --build-port $PORT 2 | -------------------------------------------------------------------------------- /build/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/build/favicon.png -------------------------------------------------------------------------------- /build/static/a520ade770e48057047b110e6f4ae392.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/build/static/a520ade770e48057047b110e6f4ae392.png -------------------------------------------------------------------------------- /build/static/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/build/static/logo_small.png -------------------------------------------------------------------------------- /build/static/vs/basic-languages/src/bat.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/bat",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},s.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}}); -------------------------------------------------------------------------------- /build/static/vs/basic-languages/src/ini.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/ini",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}); -------------------------------------------------------------------------------- /build/static/vs/basic-languages/src/lua.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/lua",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>]/,"@brackets"],[/[a-zA-Z@#]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[[/0[xX][0-9a-fA-F]*(_?[0-9a-fA-F])*/,"number.hex"],[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)[fF]*/,{cases:{"(\\d)*":"number",$0:"number.float"}}]],strings:[[/'$/,"string.escape","@popall"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/\\./,"string"],[/'/,"string.escape","@popall"],[/.(?=.*')/,"string"],[/.*\\$/,"string"],[/.*$/,"string","@popall"]],dblStringBody:[[/\\./,"string"],[/"/,"string.escape","@popall"],[/.(?=.*")/,"string"],[/.*\\$/,"string"],[/.*$/,"string","@popall"]]}}}); -------------------------------------------------------------------------------- /build/static/vs/basic-languages/src/sb.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/sb",["require","exports"],function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},o.language={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}}); -------------------------------------------------------------------------------- /build/static/vs/basic-languages/src/xml.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/xml",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},t.language={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/ 61 | 62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/features/common/index.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for features/common/index.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / features/common index.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 5  51 |   52 |   53 |   54 |  
export { default as SimpleNav } from './SimpleNav';
55 | export { default as PageNotFound } from './PageNotFound';
56 | export { default as colors } from './colors';
57 | export { default as SearchInput } from './SearchInput';
58 |  
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/features/common/redux/constants.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for features/common/redux/constants.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / features/common/redux constants.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 1/1 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 1/1 41 |
42 |
43 |
44 |
45 |

46 | 
50 | 
1 47 | 21x 48 |  
export const COMMON_TEST_ACTION = 'COMMON_TEST_ACTION';
49 |  
51 |
52 |
53 | 57 | 58 | 59 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /coverage/lcov-report/features/diagram/index.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for features/diagram/index.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / features/diagram index.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 5  51 |   52 |   53 |   54 |  
export { default as ElementDiagram } from './ElementDiagram';
55 | export { default as FeatureDiagram } from './FeatureDiagram';
56 | export { default as OverviewDiagram } from './OverviewDiagram';
57 | export { default as OverviewChordDiagram } from './OverviewChordDiagram';
58 |  
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/features/diagram/redux/initialState.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for features/diagram/redux/initialState.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / features/diagram/redux initialState.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 1/1 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 1/1 41 |
42 |
43 |
44 |
45 |

46 | 
65 | 
1 47 | 2 48 | 3 49 | 4 50 | 5 51 | 6 52 | 71x 53 |   54 |   55 |   56 |   57 |   58 |  
const initialState = {
59 |   selectedFeatures: null,
60 |   focusedFeature: null,
61 | };
62 |  
63 | export default initialState;
64 |  
66 |
67 |
68 | 72 | 73 | 74 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /coverage/lcov-report/features/rekit-cmds/redux/actions.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for features/rekit-cmds/redux/actions.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / features/rekit-cmds/redux actions.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
56 | 
1 47 | 2 48 | 3 49 | 4  50 |   51 |   52 |  
export { showCmdDialog } from './showCmdDialog';
53 | export { hideCmdDialog } from './hideCmdDialog';
54 | export { execCmd, dismissExecCmdError } from './execCmd';
55 |  
57 |
58 |
59 | 63 | 64 | 65 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /coverage/lcov-report/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /coverage/lcov-report/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/coverage/lcov-report/sort-arrow-sprite.png -------------------------------------------------------------------------------- /coverage/lcov-report/src/common/history.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/common/history.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/common history.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 1/1 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 1/1 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 5  51 |   52 |   53 | 1x 54 |  
import createHistory from 'history/createBrowserHistory';
55 |  
56 | // a singleton history object
57 | const history = createHistory();
58 | export default history;
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/common/index.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/common/index.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/common index.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 5  51 |   52 |   53 |   54 |  
export { default as SimpleNav } from './SimpleNav';
55 | export { default as PageNotFound } from './PageNotFound';
56 | export { default as colors } from './colors';
57 | export { default as SearchInput } from './SearchInput';
58 |  
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/common/redux/constants.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/common/redux/constants.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/common/redux constants.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 1/1 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 1/1 41 |
42 |
43 |
44 |
45 |

46 | 
50 | 
1 47 | 21x 48 |  
export const COMMON_TEST_ACTION = 'COMMON_TEST_ACTION';
49 |  
51 |
52 |
53 | 57 | 58 | 59 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/common/redux/initialState.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/common/redux/initialState.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/common/redux initialState.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 1/1 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 1/1 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 51x 51 |   52 |   53 |   54 |  
const initialState = {
55 | };
56 |  
57 | export default initialState;
58 |  
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/common/route.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/common/route.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/common route.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
68 | 
1 47 | 2 48 | 3 49 | 4 50 | 5 51 | 6 52 | 7 53 | 8  54 |   55 |   56 |   57 |   58 |   59 |   60 |  
 
61 | export default {
62 |   path: 'common',
63 |   name: 'Common',
64 |   childRoutes: [
65 |   ],
66 | };
67 |  
69 |
70 |
71 | 75 | 76 | 77 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/diagram/index.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/diagram/index.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/diagram index.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 5  51 |   52 |   53 |   54 |  
export { default as ElementDiagram } from './ElementDiagram';
55 | export { default as FeatureDiagram } from './FeatureDiagram';
56 | export { default as OverviewDiagram } from './OverviewDiagram';
57 | export { default as OverviewChordDiagram } from './OverviewChordDiagram';
58 |  
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/rekit-cmds/redux/actions.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/rekit-cmds/redux/actions.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/rekit-cmds/redux actions.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
56 | 
1 47 | 2 48 | 3 49 | 4  50 |   51 |   52 |  
export { showCmdDialog } from './showCmdDialog';
53 | export { hideCmdDialog } from './hideCmdDialog';
54 | export { execCmd, dismissExecCmdError } from './execCmd';
55 |  
57 |
58 |
59 | 63 | 64 | 65 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /coverage/lcov-report/src/features/rekit-tools/index.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/features/rekit-tools/index.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src/features/rekit-tools index.js 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 0/0 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 0/0 41 |
42 |
43 |
44 |
45 |

46 | 
59 | 
1 47 | 2 48 | 3 49 | 4 50 | 5  51 |   52 |   53 |   54 |  
export { default as TestCoveragePage } from './TestCoveragePage';
55 | export { default as BuildPage } from './BuildPage';
56 | export { default as RunTestPage } from './RunTestPage';
57 | export { default as TestCoverageSummary } from './TestCoverageSummary';
58 |  
60 |
61 |
62 | 66 | 67 | 68 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /images/cmd-dialogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/cmd-dialogs.png -------------------------------------------------------------------------------- /images/demo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/demo1.png -------------------------------------------------------------------------------- /images/demo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/demo2.png -------------------------------------------------------------------------------- /images/element-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/element-diagram.png -------------------------------------------------------------------------------- /images/element-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/element-page.png -------------------------------------------------------------------------------- /images/overview-diagram-action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-action.png -------------------------------------------------------------------------------- /images/overview-diagram-component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-component.png -------------------------------------------------------------------------------- /images/overview-diagram-dep1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-dep1.png -------------------------------------------------------------------------------- /images/overview-diagram-dep2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-dep2.png -------------------------------------------------------------------------------- /images/overview-diagram-dep3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-dep3.png -------------------------------------------------------------------------------- /images/overview-diagram-feature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-feature.png -------------------------------------------------------------------------------- /images/overview-diagram-misc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/overview-diagram-misc.png -------------------------------------------------------------------------------- /images/portal-build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/portal-build.png -------------------------------------------------------------------------------- /images/portal-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/portal-dashboard.png -------------------------------------------------------------------------------- /images/portal-local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/portal-local.png -------------------------------------------------------------------------------- /images/portal-project-explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/portal-project-explorer.png -------------------------------------------------------------------------------- /images/portal-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/images/portal-test.png -------------------------------------------------------------------------------- /middleware/api/execCmd.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const rekitCore = require('rekit-core'); 4 | 5 | function execCmd(req) { 6 | const args = req.body; 7 | rekitCore.handleCommand(args); 8 | const logs = rekitCore.vio.flush(); 9 | return { logs }; 10 | } 11 | 12 | module.exports = execCmd; 13 | -------------------------------------------------------------------------------- /middleware/api/fetchProjectData.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const fs = require('fs'); 5 | const rekitCore = require('rekit-core'); 6 | 7 | const app = rekitCore.app; 8 | const utils = rekitCore.utils; 9 | 10 | function mapRelPathForDepsByArr(arr) { 11 | arr.forEach((item) => { 12 | if (item.file) item.file = utils.getRelativePath(item.file); 13 | if (item.children) mapRelPathForDepsByArr(item.children); 14 | if (item.deps) { 15 | mapRelPathForDepsByArr([].concat( 16 | item.deps.components, 17 | item.deps.actions, 18 | item.deps.misc, 19 | item.deps.constants 20 | )); 21 | } 22 | }); 23 | } 24 | 25 | function fetchProjectData() { 26 | const fids = app.getFeatures(); 27 | 28 | const features = fids.map(f => (Object.assign({ 29 | key: f, 30 | type: 'feature', 31 | name: _.flow(_.lowerCase, _.upperFirst)(f), 32 | }, app.getFeatureStructure(f)))); 33 | 34 | features.forEach((f) => { 35 | f.components.forEach((item) => { 36 | item.deps = app.getDeps(item.file); 37 | }); 38 | mapRelPathForDepsByArr(f.components); 39 | 40 | f.actions.forEach((item) => { 41 | item.deps = app.getDeps(item.file); 42 | }); 43 | 44 | f.misc.forEach((item) => { 45 | if (!item.children && /\.js$/.test(item.file)) item.deps = app.getDeps(item.file); 46 | }); 47 | 48 | mapRelPathForDepsByArr(f.components); 49 | mapRelPathForDepsByArr(f.actions); 50 | mapRelPathForDepsByArr(f.misc); 51 | }); 52 | 53 | const prjRoot = utils.getProjectRoot(); 54 | const srcFiles = app.getSrcFiles(); // readDir(utils.joinPath(prjRoot, 'src')); 55 | mapRelPathForDepsByArr(srcFiles); 56 | 57 | const prjPkgJson = require(utils.joinPath(prjRoot, 'package.json')); // eslint-disable-line 58 | const corePkg = utils.joinPath(prjRoot, 'node_modules/rekit-core/package.json'); 59 | // const portalPkg = utils.joinPath(prjRoot, 'node_modules/rekit-portal/package.json'); 60 | return { 61 | features, 62 | srcFiles, 63 | testCoverage: fs.existsSync(utils.joinPath(prjRoot, 'coverage/lcov-report/index.html')), 64 | projectRoot: prjRoot, 65 | projectName: prjPkgJson.name, 66 | rekit: Object.assign({}, prjPkgJson.rekit, { 67 | coreVersion: fs.existsSync(corePkg) ? require(corePkg).version : 'UNKNOWN', // eslint-disable-line 68 | portalVersion: require(utils.joinPath(__dirname, '../../package.json')).version, // eslint-disable-line 69 | }), 70 | cssExt: utils.getCssExt(), 71 | }; 72 | } 73 | 74 | module.exports = fetchProjectData; 75 | -------------------------------------------------------------------------------- /middleware/api/getFileContent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const rekitCore = require('rekit-core'); 4 | 5 | const vio = rekitCore.vio; 6 | 7 | function getFileContent(file) { 8 | return vio.getContent(file); 9 | } 10 | 11 | module.exports = getFileContent; 12 | 13 | -------------------------------------------------------------------------------- /middleware/api/runBuild.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const rekitCore = require('rekit-core'); 4 | const spawn = require('child_process').spawn; 5 | 6 | function runBuild(io) { 7 | const prjRoot = rekitCore.utils.getProjectRoot(); 8 | return new Promise((resolve) => { 9 | const child = spawn('node', 10 | [ 11 | `${prjRoot}/tools/build.js` 12 | ], 13 | { 14 | stdio: 'pipe', 15 | cwd: prjRoot 16 | } 17 | ); 18 | child.stdout.pipe(process.stdout); 19 | const handleOutput = (data) => { 20 | // collect the data 21 | const text = data.toString('utf8').replace(/ /g, ' ').split('\n'); 22 | 23 | const arr = []; 24 | text.forEach(t => arr.push(t)); 25 | io.emit('output', { 26 | type: 'build', 27 | output: arr, 28 | }); 29 | }; 30 | child.stdout.on('data', handleOutput); 31 | child.stderr.on('data', handleOutput); 32 | 33 | child.on('close', () => { 34 | io.emit('build-finished', {}); 35 | resolve(); 36 | }); 37 | }); 38 | } 39 | 40 | module.exports = runBuild; 41 | -------------------------------------------------------------------------------- /middleware/api/runTest.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const rekitCore = require('rekit-core'); 4 | const spawn = require('child_process').spawn; 5 | 6 | function runBuild(io, testFile) { 7 | const prjRoot = rekitCore.utils.getProjectRoot(); 8 | return new Promise((resolve) => { 9 | console.log('test file: ', testFile); 10 | // if (!testFile) return; 11 | const args = [`${prjRoot}/tools/run_test.js`]; 12 | if (testFile) args.push(testFile); 13 | const child = spawn('node', 14 | args, 15 | { 16 | stdio: 'pipe', 17 | cwd: prjRoot 18 | } 19 | ); 20 | child.stdout.pipe(process.stdout); 21 | const handleOutput = (data) => { 22 | // collect the data 23 | const text = data.toString('utf8').replace(/ /g, ' ').split('\n'); 24 | 25 | const arr = []; 26 | text.forEach(t => arr.push(t)); 27 | io.emit('output', { 28 | type: 'test', 29 | output: arr, 30 | }); 31 | }; 32 | child.stdout.on('data', handleOutput); 33 | child.stderr.on('data', handleOutput); 34 | 35 | child.on('close', () => { 36 | io.emit('test-finished', {}); 37 | resolve(); 38 | }); 39 | }); 40 | } 41 | 42 | module.exports = runBuild; 43 | -------------------------------------------------------------------------------- /middleware/api/saveFile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | 5 | function saveFile(filePath, content) { 6 | fs.writeFileSync(filePath, content); 7 | } 8 | 9 | module.exports = saveFile; 10 | -------------------------------------------------------------------------------- /middleware/demo.txt: -------------------------------------------------------------------------------- 1 | demo -------------------------------------------------------------------------------- /src/Root.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Provider } from 'react-redux'; 3 | import { Switch, Route } from 'react-router-dom'; 4 | import { ConnectedRouter } from 'react-router-redux'; 5 | import history from './common/history'; 6 | 7 | function renderRouteConfigV3(Container, routes, contextPath = '/') { 8 | // Resolve route config object in React Router v3. 9 | 10 | const children = []; // children component list 11 | 12 | const renderRoute = (item, routeContextPath) => { 13 | let newContextPath; 14 | if (/^\//.test(item.path)) { 15 | newContextPath = item.path; 16 | } else { 17 | newContextPath = `${routeContextPath}/${item.path}`; 18 | } 19 | newContextPath = newContextPath.replace(/\/+/g, '/'); 20 | if (item.component && item.childRoutes) { 21 | children.push(renderRouteConfigV3(item.component, item.childRoutes, newContextPath)); 22 | } else if (item.component) { 23 | children.push(); 24 | } else if (item.childRoutes) { 25 | item.childRoutes.forEach(r => renderRoute(r, newContextPath)); 26 | } 27 | }; 28 | 29 | routes.forEach(item => renderRoute(item, contextPath)); 30 | 31 | // Use Switch as the default container by default 32 | if (!Container) return {children}; 33 | 34 | return ( 35 | 36 | 37 | {children} 38 | 39 | 40 | ); 41 | } 42 | 43 | export default class Root extends React.Component { 44 | render() { 45 | const children = renderRouteConfigV3(null, this.props.routeConfig, '/'); 46 | return ( 47 | 48 | 49 | {children} 50 | 51 | 52 | ); 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/common/configStore.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware, compose } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import { routerMiddleware } from 'react-router-redux' 4 | import history from './history'; 5 | import rootReducer from './rootReducer'; 6 | 7 | const router = routerMiddleware(history); 8 | 9 | // NOTE: Do not change middleares delaration pattern since rekit plugins may register middlewares to it. 10 | const middlewares = [ 11 | thunk, 12 | router, 13 | ]; 14 | 15 | let devToolsExtension = f => f; 16 | 17 | /* istanbul ignore if */ 18 | if (process.env.NODE_ENV === 'development') { 19 | const createLogger = require('redux-logger').createLogger; 20 | 21 | const logger = createLogger({ collapsed: true }); 22 | middlewares.push(logger); 23 | 24 | if (window.devToolsExtension) { 25 | devToolsExtension = window.devToolsExtension(); 26 | } 27 | } 28 | 29 | export default function configureStore(initialState) { 30 | const store = createStore(rootReducer, initialState, compose( 31 | applyMiddleware(...middlewares), 32 | devToolsExtension 33 | )); 34 | 35 | if (module.hot) { 36 | // Enable Webpack hot module replacement for reducers 37 | module.hot.accept('./rootReducer', () => { 38 | const nextRootReducer = require('./rootReducer').default; // eslint-disable-line 39 | store.replaceReducer(nextRootReducer); 40 | }); 41 | } 42 | 43 | return store; 44 | } 45 | -------------------------------------------------------------------------------- /src/common/history.js: -------------------------------------------------------------------------------- 1 | import createHistory from 'history/createBrowserHistory'; 2 | 3 | // a singleton history object 4 | const history = createHistory(); 5 | export default history; -------------------------------------------------------------------------------- /src/common/rootReducer.js: -------------------------------------------------------------------------------- 1 | // This file is auto maintained by Rekit, you usually don't need to edit it manually. 2 | 3 | import { combineReducers } from 'redux'; 4 | import { routerReducer } from 'react-router-redux'; 5 | import homeReducer from '../features/home/redux/reducer'; 6 | import commonReducer from '../features/common/redux/reducer'; 7 | import rekitCmdsReducer from '../features/rekit-cmds/redux/reducer'; 8 | import diagramReducer from '../features/diagram/redux/reducer'; 9 | import rekitToolsReducer from '../features/rekit-tools/redux/reducer'; 10 | 11 | // NOTE 1: DO NOT CHANGE the 'reducerMap' name and the declaration pattern. 12 | // This is used for Rekit cmds to register new features, remove features, etc. 13 | 14 | // NOTE 2: always use the camel case of the feature folder name as the store branch name 15 | // So that it's easy for others to understand it and Rekit could manage theme. 16 | 17 | const reducerMap = { 18 | router: routerReducer, 19 | home: homeReducer, 20 | common: commonReducer, 21 | rekitCmds: rekitCmdsReducer, 22 | diagram: diagramReducer, 23 | rekitTools: rekitToolsReducer, 24 | }; 25 | 26 | export default combineReducers(reducerMap); 27 | -------------------------------------------------------------------------------- /src/common/routeConfig.js: -------------------------------------------------------------------------------- 1 | import App from '../features/home/App'; 2 | import { PageNotFound } from '../features/common'; 3 | import homeRoute from '../features/home/route'; 4 | import commonRoute from '../features/common/route'; 5 | import rekitCmdsRoute from '../features/rekit-cmds/route'; 6 | import diagramRoute from '../features/diagram/route'; 7 | import rekitToolsRoute from '../features/rekit-tools/route'; 8 | 9 | // NOTE: DO NOT CHANGE the 'childRoutes' name and the declaration pattern. 10 | // This is used for Rekit cmds to register routes for new features, remove features, etc. 11 | const childRoutes = [ 12 | homeRoute, 13 | commonRoute, 14 | rekitCmdsRoute, 15 | diagramRoute, 16 | rekitToolsRoute, 17 | ]; 18 | 19 | const routes = [{ 20 | path: '/', 21 | component: App, 22 | childRoutes: [ 23 | ...childRoutes, 24 | { path: '*', name: 'Page not found', component: PageNotFound }, 25 | ].filter(r => r.component || (r.childRoutes && r.childRoutes.length > 0)), 26 | }]; 27 | 28 | function handleIndexRoute(route) { 29 | if (!route.childRoutes || !route.childRoutes.length) { 30 | return; 31 | } 32 | 33 | const indexRoute = route.childRoutes.find(child => child.isIndex); 34 | if (indexRoute) { 35 | const first = { ...indexRoute }; 36 | first.path = route.path; 37 | first.exact = true; 38 | first.autoIndexRoute = true; // mark it so that the simple nav won't show it. 39 | route.childRoutes.unshift(first); 40 | } 41 | route.childRoutes.forEach(handleIndexRoute); 42 | } 43 | 44 | routes.forEach(handleIndexRoute); 45 | 46 | export default routes; 47 | -------------------------------------------------------------------------------- /src/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/src/favicon.png -------------------------------------------------------------------------------- /src/features/common/PageNotFound.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | 3 | export default class PageNotFound extends PureComponent { 4 | render() { 5 | return ( 6 |
7 | Page not found. 8 |
9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/features/common/PageNotFound.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .common-page-not-found { 4 | color: red; 5 | } 6 | -------------------------------------------------------------------------------- /src/features/common/SearchInput.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { autobind } from 'core-decorators'; 4 | import { Input } from 'antd'; 5 | 6 | export default class SearchInput extends PureComponent { 7 | static propTypes = { 8 | onSearch: PropTypes.func, 9 | }; 10 | 11 | static defaultProps = { 12 | onSearch() {}, 13 | }; 14 | 15 | @autobind 16 | handleSearchInput(evt) { 17 | const key = evt.target.value; 18 | if (this.searchTimeout) clearTimeout(this.searchTimeout); 19 | this.searchTimeout = setTimeout(() => { 20 | this.props.onSearch(key); 21 | delete this.searchTimeout; 22 | }, 200); 23 | } 24 | 25 | render() { 26 | return ( 27 | 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/features/common/SearchInput.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .common-search-input { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/common/SimpleNav.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a very simple navigation tree for testing purpose. 3 | * It groups URLs by features. 4 | */ 5 | 6 | import React, { PureComponent } from 'react'; 7 | import PropTypes from 'prop-types'; 8 | import { Link } from 'react-router-dom'; 9 | 10 | export default class SimpleNav extends PureComponent { 11 | static propTypes = { 12 | routes: PropTypes.array.isRequired, 13 | }; 14 | 15 | renderLinks(items, basePath) { 16 | return ( 17 | 37 | ); 38 | } 39 | 40 | render() { 41 | return ( 42 |
43 | {this.renderLinks(this.props.routes[0].childRoutes, '')} 44 |
45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/features/common/SimpleNav.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .common-simple-nav { 4 | ul ul { 5 | margin-left: 15px; 6 | } 7 | a { 8 | line-height: 150%; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/features/common/colors.js: -------------------------------------------------------------------------------- 1 | export default { 2 | constant: '#BBBBBB', 3 | action: '#FF81C3', 4 | component: '#FFB14A', 5 | misc: '#A1887F', 6 | feature: '#00C0FF', 7 | featureInner: '#00C0FF', 8 | }; 9 | -------------------------------------------------------------------------------- /src/features/common/index.js: -------------------------------------------------------------------------------- 1 | export { default as SimpleNav } from './SimpleNav'; 2 | export { default as PageNotFound } from './PageNotFound'; 3 | export { default as colors } from './colors'; 4 | export { default as SearchInput } from './SearchInput'; 5 | -------------------------------------------------------------------------------- /src/features/common/redux/actions.js: -------------------------------------------------------------------------------- 1 | export { testAction } from './testAction'; 2 | -------------------------------------------------------------------------------- /src/features/common/redux/constants.js: -------------------------------------------------------------------------------- 1 | export const COMMON_TEST_ACTION = 'COMMON_TEST_ACTION'; 2 | -------------------------------------------------------------------------------- /src/features/common/redux/initialState.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | }; 3 | 4 | export default initialState; 5 | -------------------------------------------------------------------------------- /src/features/common/redux/reducer.js: -------------------------------------------------------------------------------- 1 | import initialState from './initialState'; 2 | import { reducer as testAction } from './testAction'; 3 | 4 | const reducers = [ 5 | testAction, 6 | ]; 7 | 8 | export default function reducer(state = initialState, action) { 9 | let newState; 10 | switch (action.type) { 11 | // Handle cross-topic actions here 12 | default: 13 | newState = state; 14 | break; 15 | } 16 | return reducers.reduce((s, r) => r(s, action), newState); 17 | } 18 | -------------------------------------------------------------------------------- /src/features/common/redux/testAction.js: -------------------------------------------------------------------------------- 1 | import { 2 | COMMON_TEST_ACTION, 3 | } from './constants'; 4 | 5 | export function testAction() { 6 | return { 7 | type: COMMON_TEST_ACTION, 8 | }; 9 | } 10 | 11 | export function reducer(state, action) { 12 | switch (action.type) { 13 | case COMMON_TEST_ACTION: 14 | return { 15 | ...state, 16 | }; 17 | 18 | default: 19 | return state; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/features/common/route.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | path: 'common', 4 | name: 'Common', 5 | childRoutes: [ 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /src/features/common/style.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | @import './SimpleNav.less'; 3 | @import './PageNotFound.less'; 4 | @import './SearchInput.less'; 5 | -------------------------------------------------------------------------------- /src/features/common/utils.js: -------------------------------------------------------------------------------- 1 | // import { browserHistory } from 'react-router-dom'; 2 | 3 | // export function gotoPage(urlPath) { 4 | // browserHistory.push(urlPath); 5 | // } 6 | 7 | // export const history = { 8 | // push: browserHistory.push, 9 | // }; 10 | 11 | // export function encodeFilePath(file) { 12 | // return file.replace(/\//g, '-'); 13 | // } 14 | 15 | // export function decodeFilePath(file) { 16 | // return file.replace(/-/g, '/'); 17 | // } 18 | -------------------------------------------------------------------------------- /src/features/diagram/ElementDiagram.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .diagram-element-diagram { 4 | .diagram-header { 5 | margin-bottom: 20px; 6 | } 7 | 8 | svg { 9 | // background-color: #f7f7f7; 10 | .element-node-text { 11 | // display: none; 12 | font-size: 11px; 13 | fill: #444; 14 | } 15 | 16 | } 17 | 18 | .no-text .dep-node { 19 | display: none; 20 | } 21 | 22 | &-help { 23 | width: 220px; 24 | 25 | ul { 26 | padding-bottom: 10px; 27 | border-bottom: 1px solid #ddd; 28 | 29 | li { 30 | padding: 5px 0; 31 | display: inline-block; 32 | width: 50%; 33 | span { 34 | display: inline-block; 35 | width: 16px; 36 | height: 16px; 37 | box-sizing: border-box; 38 | border-radius: 8px; 39 | transform: translateY(2px); 40 | background-color: red; 41 | 42 | &.feature { 43 | border: 1px solid #555; 44 | position: relative; 45 | &:after { 46 | position: absolute; 47 | display: inline-block; 48 | top: 1px; 49 | left: 1px; 50 | box-sizing: border-box; 51 | content: ' '; 52 | width: 12px; 53 | height: 12px; 54 | border: 1px solid #555; 55 | border-radius: 6px; 56 | background-color: #00C0FF; 57 | } 58 | background-color: #FFFFFF; 59 | } 60 | &.component { background-color: #FF9900; } 61 | &.action { background-color: #FF81C3; } 62 | &.misc { background-color: #8D6E63; } 63 | } 64 | } 65 | } 66 | 67 | p { 68 | margin-top: 10px; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/features/diagram/FeatureDiagram.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { ElementDiagram, OverviewDiagram } from './'; 4 | 5 | // import { ElementDiagram, OverviewDiagram } from './ElementDiagram'; 6 | 7 | export default class FeatureDiagram extends PureComponent { 8 | static propTypes = { 9 | 10 | }; 11 | 12 | render() { 13 | return ( 14 |
15 | Component content: diagram/FeatureDiagram 16 |
17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/features/diagram/FeatureDiagram.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .diagram-feature-diagram { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/diagram/OverviewChordDiagram.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | @link-line-color: #ccc; 4 | 5 | .diagram-overview-chord-diagram { 6 | // svg { background-color: #f7f7f7; } 7 | .group-feature { stroke: @feature-color; } 8 | .group-actions { stroke: @action-color; } 9 | .group-components { stroke: @component-color; } 10 | .group-misc { stroke: @misc-color; } 11 | .group-file { 12 | stroke: #fff; cursor: pointer; 13 | // &:hover { 14 | // opacity: 1!important; 15 | // } 16 | } 17 | 18 | .file-of-type-actions { stroke: lighten(@action-color, 0%); } 19 | .file-of-type-components { stroke: lighten(@component-color, 0%); } 20 | .file-of-type-misc { stroke: lighten(@misc-color, 0%); } 21 | 22 | .group-node { fill: none;} 23 | 24 | .svg-container { 25 | text-align: center; 26 | margin-top: 15px; 27 | } 28 | 29 | svg { 30 | // transform: rotate(-180deg); 31 | .same-feature-dep { 32 | display: none; 33 | stroke-dasharray: 1, 1; 34 | } 35 | 36 | .triangle-marker { 37 | fill: @link-line-color; 38 | } 39 | .link-line { 40 | stroke: @link-line-color; 41 | stroke-width: 1px; 42 | fill: none; 43 | } 44 | 45 | .pie-bg { 46 | stroke: #fafafa; 47 | fill: none; 48 | } 49 | } 50 | 51 | // .d3-tip { 52 | // background-color: #444; 53 | // color: #fff; 54 | // } 55 | 56 | 57 | 58 | // svg.highlight { 59 | // .link-line, .group-node { 60 | // opacity: 0.2; 61 | // } 62 | 63 | // .group-node:hover { 64 | // opacity: 1; 65 | // } 66 | // } 67 | 68 | .same-feature-deps-visible svg { 69 | .same-feature-dep { 70 | display: block; 71 | } 72 | } 73 | } 74 | 75 | .diagram-overview-chord-diagram-feature-select { 76 | li { 77 | padding: 5px 0; 78 | max-width: 300px; 79 | } 80 | } 81 | 82 | .d3-tip { 83 | line-height: 1; 84 | font-size: 10px; 85 | padding: 3px 4px; 86 | background: rgba(0, 0, 0, 0.6); 87 | color: #fff; 88 | border-radius: 2px; 89 | } 90 | 91 | /* Creates a small triangle extender for the tooltip */ 92 | .d3-tip:after { 93 | box-sizing: border-box; 94 | display: inline; 95 | font-size: 8px; 96 | width: 100%; 97 | line-height: 1; 98 | color: rgba(0, 0, 0, 0.6); 99 | content: "\25BC"; 100 | position: absolute; 101 | text-align: center; 102 | } 103 | 104 | /* Style northward tooltips differently */ 105 | .d3-tip.n:after { 106 | margin: -2px 0 0 0; 107 | top: 100%; 108 | left: 0; 109 | } -------------------------------------------------------------------------------- /src/features/diagram/OverviewDiagram.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .diagram-overview-diagram { 4 | svg { 5 | // background-color: #f7f7f7; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/features/diagram/index.js: -------------------------------------------------------------------------------- 1 | export { default as ElementDiagram } from './ElementDiagram'; 2 | export { default as FeatureDiagram } from './FeatureDiagram'; 3 | export { default as OverviewDiagram } from './OverviewDiagram'; 4 | export { default as OverviewChordDiagram } from './OverviewChordDiagram'; 5 | -------------------------------------------------------------------------------- /src/features/diagram/redux/actions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/src/features/diagram/redux/actions.js -------------------------------------------------------------------------------- /src/features/diagram/redux/constants.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/src/features/diagram/redux/constants.js -------------------------------------------------------------------------------- /src/features/diagram/redux/initialState.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | selectedFeatures: null, 3 | focusedFeature: null, 4 | }; 5 | 6 | export default initialState; 7 | -------------------------------------------------------------------------------- /src/features/diagram/redux/reducer.js: -------------------------------------------------------------------------------- 1 | import initialState from './initialState'; 2 | 3 | const reducers = [ 4 | ]; 5 | 6 | export default function reducer(state = initialState, action) { 7 | let newState; 8 | switch (action.type) { 9 | // Handle cross-topic actions here 10 | default: 11 | newState = state; 12 | break; 13 | } 14 | return reducers.reduce((s, r) => r(s, action), newState); 15 | } 16 | -------------------------------------------------------------------------------- /src/features/diagram/route.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | path: 'diagram', 4 | name: 'Diagram', 5 | childRoutes: [ 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /src/features/diagram/selectors/getOverviewDiagramData.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import { createSelector } from 'reselect'; 3 | 4 | const featuresSelector = state => state.features; 5 | const featureByIdSelector = state => state.featureById; 6 | 7 | export const getOverviewDiagramData = createSelector( 8 | featuresSelector, 9 | featureByIdSelector, 10 | (features, featureById) => { 11 | const links = []; 12 | const nodes = features.map((fid) => { 13 | const f = featureById[fid]; 14 | const feature = { name: f.name, id: f.key, r: 30 }; 15 | 16 | [...f.components, ...f.actions, ...f.misc].forEach((item) => { 17 | if (!item.deps) return; 18 | [ 19 | ...item.deps.actions, 20 | ...item.deps.components, 21 | ...item.deps.constants, 22 | ...item.deps.misc, 23 | ].forEach((dep) => { 24 | if (dep.feature === fid) return; 25 | 26 | const data = { 27 | source: fid, 28 | target: dep.feature, 29 | type: dep.type, 30 | }; 31 | const found = _.find(links, data); 32 | if (found) { 33 | found.count += 1; 34 | } else { 35 | links.push({ 36 | ...data, 37 | count: 1, 38 | }); 39 | } 40 | }); 41 | }); 42 | return feature; 43 | }); 44 | 45 | // Relation types: component, action, store, constant, misc 46 | for (let i = 0; i < nodes.length; i++) { // eslint-disable-line 47 | for (let j = 0; j < nodes.length; j++) { // eslint-disable-line 48 | if (i === j) continue; // eslint-disable-line 49 | const f1 = nodes[i]; 50 | const f2 = nodes[j]; 51 | 52 | const arr = links 53 | .filter(l => (l.source === f1.id && l.target === f2.id) || (l.source === f2.id && l.target === f1.id)) 54 | .sort((l1, l2) => (l1.source !== l2.source ? l1.source.localeCompare(l2.source) : l1.type.localeCompare(l2.type))) 55 | ; 56 | 57 | if (arr.length > 0) { 58 | const firstSource = arr[0].source; 59 | arr.forEach((link, k) => { 60 | const m = Math.floor(arr.length / 2); 61 | if (arr.length % 2 === 0) { 62 | if (k < m) link.pos = k - m; 63 | else link.pos = k - m + 1; 64 | } else { 65 | link.pos = k - m; 66 | } 67 | if (link.source !== firstSource) { 68 | link.pos = -link.pos; 69 | } 70 | }); 71 | } 72 | } 73 | } 74 | 75 | for (let i = 0; i < features.length; i++) { 76 | for (let j = i + 1; j < features.length; j++) { 77 | links.push({ 78 | source: features[i], 79 | target: features[j], 80 | type: 'f-f', 81 | }); 82 | } 83 | } 84 | return { nodes, links }; 85 | }, 86 | ); 87 | -------------------------------------------------------------------------------- /src/features/diagram/style.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | @import './ElementDiagram.less'; 3 | @import './FeatureDiagram.less'; 4 | @import './OverviewDiagram.less'; 5 | @import './OverviewChordDiagram.less'; 6 | -------------------------------------------------------------------------------- /src/features/home/About.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-about { 4 | text-align: center; 5 | .header { 6 | position: relative; 7 | padding-left: 150px; 8 | padding-top: 20px; 9 | height: 110px; 10 | text-align: left; 11 | img.logo { 12 | width: 100px; 13 | position: absolute; 14 | left: 40px; 15 | top: 0px; 16 | } 17 | } 18 | 19 | .version { 20 | font-size: 13px; 21 | } 22 | 23 | .versions { 24 | margin-top: 20px; 25 | 26 | h5 { 27 | margin-bottom: 10px; 28 | } 29 | label { 30 | display: inline-block; 31 | width: 180px; 32 | text-align: right; 33 | } 34 | 35 | span { 36 | margin-left: 5px; 37 | display: inline-block; 38 | width: 120px; 39 | text-align: left; 40 | } 41 | } 42 | 43 | .feedback { 44 | margin-top: 20px; 45 | margin-bottom: 10px; 46 | padding: 5px 0; 47 | 48 | &:before { 49 | content: ' '; 50 | display: block; 51 | border-top: 1px solid #e0e0e0; 52 | width: 100px; 53 | margin-left: 110px; 54 | margin-bottom: 20px; 55 | } 56 | } 57 | 58 | &.demo-version { 59 | text-align: left; 60 | padding: 40px; 61 | overflow: auto; 62 | margin-right: -18px; 63 | padding-right: 58px; 64 | // max-height: 600px; 65 | .header { 66 | margin-left: -40px; 67 | margin-top: -20px; 68 | } 69 | 70 | h3 { 71 | margin-top: 25px; 72 | margin-bottom: 10px; 73 | } 74 | 75 | p { margin-top: 15px; } 76 | 77 | .features-list { 78 | list-style: decimal; 79 | margin: 15px 0 15px 30px; 80 | 81 | li { 82 | margin-top: 5px; 83 | } 84 | } 85 | 86 | .learn-more-list { 87 | list-style: disc; 88 | margin-left: 30px; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/features/home/AddActionForm.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | export default class AddActionForm extends PureComponent { 5 | static propTypes = { 6 | 7 | }; 8 | 9 | render() { 10 | return ( 11 |
12 | Component content: home/AddActionForm 13 |
14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/features/home/AddActionForm.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-add-action-form { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/home/AddDialog.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | export default class AddDialog extends PureComponent { 5 | static propTypes = { 6 | 7 | }; 8 | 9 | render() { 10 | return ( 11 |
12 | Component content: home/AddDialog 13 |
14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/features/home/AddDialog.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-add-dialog { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/home/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { bindActionCreators } from 'redux'; 4 | import { connect } from 'react-redux'; 5 | import enUS from 'antd/lib/locale-provider/en_US'; 6 | import { LocaleProvider, message, Modal, Spin } from 'antd'; 7 | import { SidePanel } from './'; 8 | import DialogPlace from '../rekit-cmds/DialogPlace'; 9 | import { fetchProjectData } from './redux/actions'; 10 | 11 | /* 12 | This is the root component of your app. Here you define the overall layout 13 | and the container of the react router. The default one is a two columns layout. 14 | You should adjust it acording to the type of your app. 15 | */ 16 | 17 | export class App extends Component { 18 | static propTypes = { 19 | home: PropTypes.object.isRequired, 20 | actions: PropTypes.object.isRequired, 21 | children: PropTypes.node.isRequired, 22 | }; 23 | 24 | componentDidMount() { 25 | this.props.actions.fetchProjectData().catch((err) => { 26 | Modal.error({ 27 | title: 'Failed to load project data', 28 | content: err && (err.message || err.toString()), 29 | }); 30 | }); 31 | } 32 | 33 | componentWillReceiveProps(nextProps) { 34 | if (nextProps.home.projectDataNeedReload && !nextProps.home.fetchProjectDataError && !nextProps.home.fetchProjectDataPending) { 35 | const hide = message.loading('Reloading project data...'); 36 | this.props.actions.fetchProjectData() 37 | .then(hide) 38 | .catch((e) => { 39 | console.log('failed to fetch project data: ', e); 40 | message.error('Failed to refresh project data'); 41 | }); 42 | } 43 | } 44 | 45 | renderLoading() { 46 | return ( 47 |
48 | 49 | Loading... 50 |
51 | ); 52 | } 53 | 54 | render() { 55 | if (!this.props.home.features) { 56 | return this.renderLoading(); 57 | } 58 | 59 | return ( 60 | 61 |
62 | 63 |
64 | {this.props.children} 65 |
66 | 67 |
68 |
69 | ); 70 | } 71 | } 72 | 73 | function mapStateToProps(state) { 74 | return { 75 | home: state.home, 76 | }; 77 | } 78 | 79 | function mapDispatchToProps(dispatch) { 80 | return { 81 | actions: bindActionCreators({ fetchProjectData }, dispatch) 82 | }; 83 | } 84 | 85 | export default connect( 86 | mapStateToProps, 87 | mapDispatchToProps 88 | )(App); 89 | -------------------------------------------------------------------------------- /src/features/home/App.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-app { 4 | height: 100%; 5 | background-color: #fff; 6 | &.ant-layout { 7 | flex-wrap: nowrap; 8 | } 9 | &.loading { 10 | padding: 20px; 11 | color: #999; 12 | } 13 | 14 | .home-side-panel { 15 | position: fixed; 16 | top: 0; 17 | left: 0; 18 | box-sizing: border-box; 19 | overflow: hidden; 20 | margin: 0; 21 | padding: 10px; 22 | width: 300px; 23 | height: 100%; 24 | 25 | .common-simple-nav { 26 | position: absolute; 27 | z-index: 999; 28 | bottom: 0; 29 | } 30 | } 31 | 32 | .ant-layout-sider { 33 | background-color: #f7f7f7; 34 | } 35 | 36 | .page-container { 37 | position: fixed; 38 | min-width: 700px; 39 | overflow: auto; 40 | left: 300px; 41 | top: 0; 42 | right: 0; 43 | bottom: 0; 44 | padding: 40px; 45 | background-color: #fff; 46 | } 47 | } -------------------------------------------------------------------------------- /src/features/home/CodeEditor.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins'; 2 | 3 | .home-code-editor { 4 | .code-editor-toolbar { 5 | background-color: #444; 6 | 7 | .file-path { 8 | display: inline-block; 9 | padding: 5px 15px; 10 | color: #aaa; 11 | } 12 | 13 | .ant-btn { 14 | margin: 4px 5px 0 5px; 15 | > span { 16 | display: inline-block; 17 | transform: translateY(-1px); 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/features/home/CodeView.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-code-view { 4 | font-size: 12px; 5 | .file-path { 6 | color: #999; 7 | } 8 | pre { 9 | background-color: #2a2d33!important; 10 | } 11 | pre > code { 12 | overflow: auto; 13 | font-weight: normal; 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/features/home/DemoAlert.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { Alert, Modal } from 'antd'; 4 | import { RekitSteps } from './'; 5 | 6 | export default class DemoAlert extends Component { 7 | static propTypes = { 8 | onClose: PropTypes.func, 9 | }; 10 | 11 | static defaultProps = { 12 | onClose() {}, 13 | }; 14 | 15 | render() { 16 | return ( 17 | 25 |
26 | 32 | 33 |
34 |
35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/features/home/DemoAlert.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-demo-alert { 4 | padding: 30px; 5 | 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/features/home/ElementPage.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-element-page { 4 | h2 { 5 | line-height: 60px; 6 | font-weight: normal; 7 | } 8 | 9 | .page-title { 10 | .mark { 11 | display: inline-block; 12 | padding: 0; 13 | width: 16px; 14 | margin-left: 5px; 15 | line-height: 16px; 16 | border-radius: 2px; 17 | font-size: 12px; 18 | text-align: center; 19 | transform: translateY(-2px); 20 | color: #fff; 21 | cursor: default; 22 | 23 | &-c { background-color: #42bd41; } 24 | &-r { background-color: #ffb300; } 25 | &-a { background-color: #4fc3f7; } 26 | } 27 | } 28 | 29 | .pic-wrapper { 30 | text-align: center; 31 | img { 32 | margin-top: 20px; 33 | max-width: 600px; 34 | } 35 | } 36 | 37 | .ant-tabs-bar { 38 | background-color: #fff; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/features/home/Hello.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | 3 | export default class Hello extends PureComponent { 4 | render() { 5 | return ( 6 |

7 | Welcome to your Rekit project! 8 |

9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/features/home/Hello.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-hello { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/home/HomePage.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-home-page { 4 | // svg {background-color: #eee;} 5 | .top-badges { 6 | min-width: 800px; 7 | margin-right: -15px; 8 | } 9 | 10 | .top-badge { 11 | position: relative; 12 | margin-right: 15px; 13 | height: 100px; 14 | background-color: #f7f7f7; 15 | // font-family: 'Work Sans Light', 'Hiragino Sans GB', sans-serif; 16 | // background-color: #f90; 17 | 18 | &.feature .anticon { color: darken(@feature-color, 10%); } 19 | &.action .anticon { color: darken(@action-color, 10%); } 20 | &.component .anticon { color: darken(@component-color, 10%); } 21 | &.misc .anticon { color: darken(@misc-color, 10%); } 22 | &.route .anticon { color: darken(@route-color, 10%); } 23 | 24 | .anticon { 25 | position: absolute; 26 | left: 10px; 27 | top: 18px; 28 | font-size: 28px; 29 | font-weight: normal; 30 | opacity: 1; 31 | } 32 | 33 | .count { 34 | position: absolute; 35 | right: 20px; 36 | top: 0px; 37 | font-size: 42px; 38 | color: #555; 39 | opacity: 0.9; 40 | font-weight: 200; 41 | } 42 | 43 | .type { 44 | position: absolute; 45 | padding-top: 5px; 46 | padding-right: 20px; 47 | left: 0; 48 | right: 0px; 49 | bottom: 10px; 50 | // border-top: 1px solid #ddd; 51 | text-align: right; 52 | color: #888; 53 | font-size: 18px; 54 | opacity: 0.8; 55 | } 56 | } 57 | 58 | h3 { 59 | font-weight: normal; 60 | margin-top: 30px; 61 | margin-bottom: 10px; 62 | padding-bottom: 10px; 63 | border-bottom: 1px solid #ccc; 64 | } 65 | .diagram-container { 66 | padding-right: 40px; 67 | } 68 | 69 | &-overview-diagram-help, &-test-coverage-summary-help { 70 | width: 260px; 71 | padding-bottom: 15px; 72 | 73 | ul { 74 | padding-bottom: 10px; 75 | border-bottom: 1px solid #ddd; 76 | 77 | li { 78 | padding: 5px 0; 79 | display: inline-block; 80 | width: 50%; 81 | span { 82 | display: inline-block; 83 | width: 16px; 84 | height: 10px; 85 | box-sizing: border-box; 86 | 87 | background-color: red; 88 | 89 | &.feature { background-color: @feature-color; } 90 | &.component { background-color: @component-color; } 91 | &.action { background-color: @action-color; } 92 | &.misc { background-color: @misc-color; } 93 | } 94 | } 95 | } 96 | 97 | p { 98 | margin-top: 10px; 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/features/home/ProjectExplorer.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-project-explorer { 4 | position: absolute; 5 | top: 98px; 6 | left: 10px; 7 | right: 0px; 8 | bottom: 0px; 9 | user-select: none; 10 | overflow: auto; 11 | 12 | .no-results { 13 | text-align: center; 14 | margin-top: 15px; 15 | color: #777; 16 | } 17 | 18 | .ant-tree { 19 | margin-top: -10px; 20 | } 21 | .ant-tree-node-content-wrapper { 22 | padding-left: 0; 23 | vertical-align: top; 24 | transform: translate(-7px, 2px); 25 | label { 26 | cursor: pointer; 27 | overflow: hidden; 28 | text-overflow: ellipsis; 29 | max-width: 120px; 30 | font-weight: lighter; 31 | } 32 | } 33 | .ant-tree-title { 34 | cursor: pointer; 35 | i { 36 | padding-left: 3px; 37 | margin-right: 5px; 38 | } 39 | 40 | img { 41 | width: 15px; 42 | margin: 0 5px 0 3px; 43 | transform: translateY(-2px); 44 | } 45 | 46 | .search-highlight { 47 | background-color: yellow; 48 | } 49 | } 50 | 51 | li.feature { 52 | i { color: #0277bd; } 53 | } 54 | 55 | li.actions{ 56 | i { color: #ec407a; } 57 | > ul > li i { color: #888; } 58 | } 59 | li.constants{ 60 | i { color: #536dfe; } 61 | } 62 | li.routes{ 63 | i { color: #26a69a; } 64 | } 65 | li.components{ 66 | i { color: #F08036; } 67 | 68 | > ul > li i { color: #888; } 69 | } 70 | li.misc{ 71 | i { color: #8d6e63; } 72 | > ul > li i { color: #888; } 73 | } 74 | 75 | .mark { 76 | display: inline-block; 77 | padding: 0; 78 | width: 10px; 79 | margin-left: 3px; 80 | line-height: 12px; 81 | border-radius: 2px; 82 | font-size: 8px; 83 | text-align: center; 84 | transform: translateY(-2px); 85 | color: #fff; 86 | 87 | &-c { background-color: #42bd41; } 88 | &-r { background-color: #ffb300; } 89 | &-a { background-color: #4fc3f7; } 90 | } 91 | 92 | .context-menu-archor { 93 | position: absolute; 94 | left: 0; 95 | top: 0; 96 | display: none; 97 | cursor: default; 98 | font-size: 1px; 99 | width: 1px; 100 | height: 1px; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/features/home/RekitSteps.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Steps } from 'antd'; 3 | 4 | const Step = Steps.Step; 5 | 6 | export default class RekitSteps extends Component { 7 | render() { 8 | return ( 9 |
10 |

Create your own Rekit app with only 3 steps!

11 |

12 | Though this demo is readonly, you can try a full-featured Rekit portal by creating your own Rekit app. It's super easy! 13 |

14 |
15 | 16 |
  • > npm install -g rekit
  • } /> 17 |
  • > rekit create app1
  • > cd app1
  • > npm install
  • } /> 18 |
  • > npm start
  • } /> 19 |
    20 |

    Then access http://localhost:6075 for your app. http://localhost:6076 for Rekit portal.

    21 |

    * Alternatively you can use Yarn as the package manager rather than npm.

    22 |
    23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/features/home/RekitSteps.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-rekit-steps { 4 | h3 { 5 | margin-top: 20px; 6 | } 7 | 8 | p { 9 | margin-top: 15px; 10 | } 11 | 12 | .ant-steps-horizontal .ant-steps-description { 13 | max-width: 160px; 14 | ul { 15 | width: 160px; 16 | height: 100px; 17 | margin-top: 8px; 18 | padding: 10px; 19 | background-color: #f7f7f7; 20 | color: #555; 21 | 22 | li span { 23 | font-size: 12px; 24 | color: #aaa; 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/features/home/RoutesPage.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-routes-page { 4 | min-width: 720px; 5 | h2 { 6 | i { color: #26a69a; } 7 | line-height: 60px; 8 | font-weight: normal; 9 | } 10 | 11 | h3 { 12 | margin-top: 30px; 13 | } 14 | 15 | .highlight-label { 16 | padding: 0 2px; 17 | border-radius: 2px; 18 | background-color: #eee; 19 | } 20 | 21 | .ant-alert { 22 | margin-top: 20px; 23 | } 24 | 25 | table { 26 | margin-top: 20px; 27 | th, td { 28 | padding: 10px; 29 | min-width: 400px; 30 | text-align: left; 31 | border: 1px solid #ddd; 32 | &:nth-child(2) { 33 | min-width: 300px; 34 | } 35 | } 36 | thead { 37 | background-color: #eee; 38 | font-weight: bold; 39 | } 40 | 41 | tbody { 42 | tr:hover { 43 | // background-color: lighten(#e0f2f1, 5%); 44 | } 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/features/home/SidePanel.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .home-side-panel { 4 | background-color: #f7f7f7; 5 | .header { 6 | margin: -10px -10px 0 -10px; 7 | padding: 10px 10px; 8 | padding-bottom: 4px; 9 | background-color: #e7e7e7; 10 | color: #fff; 11 | // a { 12 | // display: inline-block; 13 | // img { 14 | // width: 24px; 15 | // height: 24px; 16 | // transform: translateY(-1px); 17 | // } 18 | // } 19 | .home-link { 20 | cursor: pointer; 21 | color: #444; 22 | display: inline-block; 23 | .anticon { 24 | margin-right: 2px; 25 | font-size: 22px; 26 | transform: translateY(1px); 27 | } 28 | 29 | h5 { 30 | display: inline-block; 31 | margin-left: 0px; 32 | margin-bottom: 0px; 33 | width: 230px; 34 | transform: translateY(-1px); 35 | 36 | overflow: hidden; 37 | text-overflow: ellipsis; 38 | font-weight: normal; 39 | 40 | color: #a9a9ab; 41 | } 42 | } 43 | 44 | .ant-dropdown-trigger { 45 | float: right; 46 | transform: translateY(2px); 47 | } 48 | 49 | } 50 | .toolbar { 51 | margin-top: 12px; 52 | } 53 | } 54 | 55 | #react-root .home-side-panel.dark-theme { 56 | background-color: #2a2d33; 57 | 58 | .header { 59 | background-color: rgba(0, 0, 0, 0.15); 60 | } 61 | 62 | .home-link, 63 | .ant-dropdown-trigger, 64 | .ant-tree-title, 65 | .ant-tree-switcher:after { 66 | font-weight: normal; 67 | color: #a9a9ab; 68 | } 69 | 70 | .ant-tree-switcher:after { 71 | color: #ccc; 72 | } 73 | 74 | .ant-tree-title .search-highlight { 75 | background-color: #f90; 76 | color: #444; 77 | } 78 | 79 | .ant-tree li .ant-tree-node-content-wrapper:hover { 80 | background-color: rgba(255, 255, 255, 0.15); 81 | } 82 | 83 | .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected { 84 | background-color: rgba(255, 255, 255, 0.08); 85 | } 86 | 87 | .toolbar { 88 | input { 89 | background-color: rgba(255, 255, 255, 0.08); 90 | color: #ccc; 91 | border-color: rgba(255, 255, 255, 0); 92 | } 93 | 94 | .ant-input-search-icon:before { 95 | color: #ccc; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/features/home/index.js: -------------------------------------------------------------------------------- 1 | export { default as Hello } from './Hello'; 2 | export { default as ProjectExplorer } from './ProjectExplorer'; 3 | export { default as AddDialog } from './AddDialog'; 4 | export { default as AddActionForm } from './AddActionForm'; 5 | export { default as SidePanel } from './SidePanel'; 6 | export { default as CodeView } from './CodeView'; 7 | export { default as ElementPage } from './ElementPage'; 8 | export { default as App } from './App'; 9 | export { default as RoutesPage } from './RoutesPage'; 10 | export { default as HomePage } from './HomePage'; 11 | export { default as About } from './About'; 12 | export { default as DemoAlert } from './DemoAlert'; 13 | export { default as RekitSteps } from './RekitSteps'; 14 | export { default as CodeEditor } from './CodeEditor'; 15 | -------------------------------------------------------------------------------- /src/features/home/readme.md: -------------------------------------------------------------------------------- 1 | # readme.md -------------------------------------------------------------------------------- /src/features/home/redux/actions.js: -------------------------------------------------------------------------------- 1 | // AUTO MAINTAINED FILE: DO NOT CHANGE 2 | 3 | export { fetchProjectData, dismissFetchProjectDataError } from './fetchProjectData'; 4 | export { fetchFileContent, dismissFetchFileContentError } from './fetchFileContent'; 5 | export { showDemoAlert } from './showDemoAlert'; 6 | export { hideDemoAlert } from './hideDemoAlert'; 7 | export { saveFile, dismissSaveFileError } from './saveFile'; 8 | -------------------------------------------------------------------------------- /src/features/home/redux/constants.js: -------------------------------------------------------------------------------- 1 | export const HOME_FETCH_PROJECT_DATA_BEGIN = 'HOME_FETCH_PROJECT_DATA_BEGIN'; 2 | export const HOME_FETCH_PROJECT_DATA_SUCCESS = 'HOME_FETCH_PROJECT_DATA_SUCCESS'; 3 | export const HOME_FETCH_PROJECT_DATA_FAILURE = 'HOME_FETCH_PROJECT_DATA_FAILURE'; 4 | export const HOME_FETCH_PROJECT_DATA_DISMISS_ERROR = 'HOME_FETCH_PROJECT_DATA_DISMISS_ERROR'; 5 | export const HOME_FETCH_FILE_CONTENT_BEGIN = 'HOME_FETCH_FILE_CONTENT_BEGIN'; 6 | export const HOME_FETCH_FILE_CONTENT_SUCCESS = 'HOME_FETCH_FILE_CONTENT_SUCCESS'; 7 | export const HOME_FETCH_FILE_CONTENT_FAILURE = 'HOME_FETCH_FILE_CONTENT_FAILURE'; 8 | export const HOME_FETCH_FILE_CONTENT_DISMISS_ERROR = 'HOME_FETCH_FILE_CONTENT_DISMISS_ERROR'; 9 | export const HOME_SHOW_DEMO_ALERT = 'HOME_SHOW_DEMO_ALERT'; 10 | export const HOME_HIDE_DEMO_ALERT = 'HOME_HIDE_DEMO_ALERT'; 11 | export const HOME_SAVE_FILE_BEGIN = 'HOME_SAVE_FILE_BEGIN'; 12 | export const HOME_SAVE_FILE_SUCCESS = 'HOME_SAVE_FILE_SUCCESS'; 13 | export const HOME_SAVE_FILE_FAILURE = 'HOME_SAVE_FILE_FAILURE'; 14 | export const HOME_SAVE_FILE_DISMISS_ERROR = 'HOME_SAVE_FILE_DISMISS_ERROR'; 15 | -------------------------------------------------------------------------------- /src/features/home/redux/fetchFileContent.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { 3 | HOME_FETCH_FILE_CONTENT_BEGIN, 4 | HOME_FETCH_FILE_CONTENT_SUCCESS, 5 | HOME_FETCH_FILE_CONTENT_FAILURE, 6 | HOME_FETCH_FILE_CONTENT_DISMISS_ERROR, 7 | } from './constants'; 8 | 9 | export function fetchFileContent(file) { 10 | return (dispatch) => { 11 | dispatch({ 12 | type: HOME_FETCH_FILE_CONTENT_BEGIN, 13 | }); 14 | 15 | const promise = new Promise(async (resolve, reject) => { 16 | try { 17 | const res = await axios.get('/rekit/api/file-content', { 18 | params: { file } 19 | }); 20 | dispatch({ 21 | type: HOME_FETCH_FILE_CONTENT_SUCCESS, 22 | data: { file, content: res.data.content }, 23 | }); 24 | resolve(res.data); 25 | } catch (e) { 26 | dispatch({ 27 | type: HOME_FETCH_FILE_CONTENT_FAILURE, 28 | data: { error: e }, 29 | }); 30 | reject(e); 31 | } 32 | }); 33 | return promise; 34 | }; 35 | } 36 | 37 | export function dismissFetchFileContentError() { 38 | return { 39 | type: HOME_FETCH_FILE_CONTENT_DISMISS_ERROR, 40 | }; 41 | } 42 | 43 | export function reducer(state, action) { 44 | switch (action.type) { 45 | case HOME_FETCH_FILE_CONTENT_BEGIN: 46 | return { 47 | ...state, 48 | fetchFileContentPending: true, 49 | fetchFileContentError: null, 50 | }; 51 | 52 | case HOME_FETCH_FILE_CONTENT_SUCCESS: { 53 | const fileContentNeedReload = { ...state.fileContentNeedReload }; 54 | delete fileContentNeedReload[action.data.file]; 55 | return { 56 | ...state, 57 | fileContentById: { 58 | ...state.fileContentById, 59 | [action.data.file]: action.data.content, 60 | }, 61 | fileContentNeedReload, 62 | fetchFileContentPending: false, 63 | fetchFileContentError: null, 64 | }; 65 | } 66 | 67 | case HOME_FETCH_FILE_CONTENT_FAILURE: 68 | return { 69 | ...state, 70 | fetchFileContentPending: false, 71 | fetchFileContentError: action.data.error, 72 | }; 73 | 74 | case HOME_FETCH_FILE_CONTENT_DISMISS_ERROR: 75 | return { 76 | ...state, 77 | fetchFileContentError: null, 78 | }; 79 | 80 | default: 81 | return state; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/features/home/redux/hideDemoAlert.js: -------------------------------------------------------------------------------- 1 | import { 2 | HOME_HIDE_DEMO_ALERT, 3 | } from './constants'; 4 | 5 | export function hideDemoAlert() { 6 | return { 7 | type: HOME_HIDE_DEMO_ALERT, 8 | }; 9 | } 10 | 11 | export function reducer(state, action) { 12 | switch (action.type) { 13 | case HOME_HIDE_DEMO_ALERT: 14 | return { 15 | ...state, 16 | demoAlertVisible: false, 17 | }; 18 | 19 | default: 20 | return state; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/features/home/redux/initialState.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | count: 0, 3 | redditReactjsList: [], 4 | elementById: {}, 5 | fileContentById: {}, 6 | oldFileContentById: {}, 7 | features: null, 8 | projectDataNeedReload: false, 9 | projectFileChanged: false, 10 | fetchProjectDataPending: false, 11 | fetchProjectDataError: null, 12 | fetchFileContentPending: false, 13 | fetchFileContentError: null, 14 | // editingFile: { 15 | // file: null, // File path 16 | // originalContent: null, // Content before save 17 | // }, 18 | demoAlertVisible: false, 19 | saveFilePending: false, 20 | saveFileError: null, 21 | }; 22 | 23 | export default initialState; 24 | -------------------------------------------------------------------------------- /src/features/home/redux/reducer.js: -------------------------------------------------------------------------------- 1 | import initialState from './initialState'; 2 | import { reducer as fetchProjectData } from './fetchProjectData'; 3 | import { reducer as fetchFileContent } from './fetchFileContent'; 4 | import { reducer as showDemoAlertReducer } from './showDemoAlert'; 5 | import { reducer as hideDemoAlertReducer } from './hideDemoAlert'; 6 | import { reducer as saveFileReducer } from './saveFile'; 7 | 8 | const reducers = [ 9 | fetchProjectData, 10 | fetchFileContent, 11 | showDemoAlertReducer, 12 | hideDemoAlertReducer, 13 | saveFileReducer, 14 | ]; 15 | 16 | export default function reducer(state = initialState, action) { 17 | let newState; 18 | switch (action.type) { 19 | // Put global reducers here 20 | case 'PROJECT_FILE_CHANGED': 21 | newState = { 22 | ...state, 23 | projectDataNeedReload: true, 24 | }; 25 | break; 26 | default: 27 | newState = state; 28 | break; 29 | } 30 | return reducers.reduce((s, r) => r(s, action), newState); 31 | } 32 | -------------------------------------------------------------------------------- /src/features/home/redux/showDemoAlert.js: -------------------------------------------------------------------------------- 1 | import { 2 | HOME_SHOW_DEMO_ALERT, 3 | } from './constants'; 4 | 5 | export function showDemoAlert() { 6 | return { 7 | type: HOME_SHOW_DEMO_ALERT, 8 | }; 9 | } 10 | 11 | export function reducer(state, action) { 12 | switch (action.type) { 13 | case HOME_SHOW_DEMO_ALERT: 14 | return { 15 | ...state, 16 | demoAlertVisible: true, 17 | }; 18 | 19 | default: 20 | return state; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/features/home/route.js: -------------------------------------------------------------------------------- 1 | import { 2 | ElementPage, 3 | RoutesPage, 4 | HomePage, 5 | } from './'; 6 | 7 | export default { 8 | path: '', 9 | name: 'Home', 10 | childRoutes: [ 11 | { name: 'Home page', component: HomePage, isIndex: true }, 12 | // { path: '/element', name: 'Element page', component: ElementPage }, 13 | // { path: '/element/:type', name: 'Element page', component: ElementPage }, 14 | { path: '/element/:file/:type?', name: 'Element page', component: ElementPage }, 15 | { path: '/:feature/routes/:type?', name: 'Routes page', component: RoutesPage }, 16 | ], 17 | }; 18 | -------------------------------------------------------------------------------- /src/features/home/selectors/getOverviewStat.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import { createSelector } from 'reselect'; 3 | 4 | const featuresSelector = state => state.features; 5 | const featureByIdSelector = state => state.featureById; 6 | 7 | function flattenMiscFiles(arr) { 8 | return _.flatten(arr.map(item => (item.children ? flattenMiscFiles(item.children) : item))); 9 | } 10 | 11 | export const getOverviewStat = createSelector( 12 | featuresSelector, 13 | featureByIdSelector, 14 | (features, featureById) => { 15 | const stat = { 16 | features: features.length, 17 | components: 0, 18 | actions: 0, 19 | misc: 0, 20 | routes: 0, 21 | }; 22 | 23 | features.forEach((fid) => { 24 | const f = featureById[fid]; 25 | stat.components += f.components.length; 26 | stat.actions += f.actions.length; 27 | stat.routes += f.routes.length; 28 | stat.misc += flattenMiscFiles(f.misc).length; 29 | }); 30 | 31 | // some misc files like index.js, actions.js, constants.js, style.less should be excluded for statics 32 | stat.misc -= stat.features * 6; 33 | 34 | return stat; 35 | } 36 | ); 37 | 38 | -------------------------------------------------------------------------------- /src/features/home/style.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | @import '../../styles/prism.css'; 3 | @import '~prismjs/plugins/line-numbers/prism-line-numbers.css'; 4 | @import './Hello.less'; 5 | @import './ProjectExplorer.less'; 6 | @import './AddDialog.less'; 7 | @import './AddActionForm.less'; 8 | @import './SidePanel.less'; 9 | @import './ElementPage.less'; 10 | @import './CodeView.less'; 11 | @import './App.less'; 12 | @import './RoutesPage.less'; 13 | @import './HomePage.less'; 14 | @import './About.less'; 15 | @import './DemoAlert.less'; 16 | @import './RekitSteps.less'; 17 | @import './CodeEditor'; 18 | -------------------------------------------------------------------------------- /src/features/home/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 1 3 | } -------------------------------------------------------------------------------- /src/features/home/test.pdf: -------------------------------------------------------------------------------- 1 | pdf -------------------------------------------------------------------------------- /src/features/home/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supnate/rekit-portal/8bef3722300d404633675a8c1483e36bf2809981/src/features/home/test.txt -------------------------------------------------------------------------------- /src/features/rekit-cmds/CmdForm.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .rekit-cmds-cmd-form { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/DialogPlace.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import _ from 'lodash'; 4 | import { autobind } from 'core-decorators'; 5 | import { bindActionCreators } from 'redux'; 6 | import { connect } from 'react-redux'; 7 | import { Modal } from 'antd'; 8 | import * as actions from './redux/actions'; 9 | import { CmdForm, cmdSuccessNotification, LogViewerDialog } from './'; 10 | 11 | const displayName = _.flow(_.lowerCase, _.upperFirst); 12 | 13 | export class DialogPlace extends Component { 14 | static propTypes = { 15 | rekitCmds: PropTypes.object.isRequired, 16 | actions: PropTypes.object.isRequired, 17 | }; 18 | 19 | @autobind 20 | handleCmdDialogDone(dialogType) { 21 | this.props.actions.hideDialog(dialogType); 22 | } 23 | 24 | @autobind 25 | handleCmdSuccess(dialogType) { 26 | this.props.actions.hideCmdDialog(dialogType); 27 | const { args } = this.props.rekitCmds.execCmdResult; 28 | cmdSuccessNotification(args, this.props.actions.showCmdDialog); 29 | } 30 | 31 | render() { 32 | const { rekitCmds } = this.props; 33 | const { hideCmdDialog } = this.props.actions; 34 | return ( 35 |
    36 | {rekitCmds.cmdDialogVisible && 37 | hideCmdDialog('cmd')} 44 | {...this.props} 45 | > 46 | hideCmdDialog('cmd')} 48 | onDone={() => this.handleCmdSuccess('cmd')} 49 | /> 50 | 51 | } 52 | {rekitCmds.logViewerDialogVisible && 53 | hideCmdDialog('logViewer')} /> 54 | } 55 |
    56 | ); 57 | } 58 | } 59 | 60 | /* istanbul ignore next */ 61 | function mapStateToProps(state) { 62 | return { 63 | rekitCmds: state.rekitCmds, 64 | }; 65 | } 66 | 67 | /* istanbul ignore next */ 68 | function mapDispatchToProps(dispatch) { 69 | return { 70 | actions: bindActionCreators({ ...actions }, dispatch) 71 | }; 72 | } 73 | 74 | export default connect( 75 | mapStateToProps, 76 | mapDispatchToProps 77 | )(DialogPlace); 78 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/DialogPlace.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .rekit-cmds-dialog-place { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/LogViewer.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const COLORS = { 5 | 'create-dir': '#2196F3', 6 | 'del-file': '#FF4081', 7 | 'mv-file': '#4CAF50', 8 | 'update-file': '#00BCD4', 9 | 'create-file': '#2196F3', 10 | warning: '#FF9800', 11 | diff: '#999999', 12 | }; 13 | 14 | export default class LogViewer extends PureComponent { 15 | static propTypes = { 16 | logs: PropTypes.array.isRequired, 17 | }; 18 | 19 | static defaultProps = { 20 | logs: [], 21 | }; 22 | 23 | renderDiffLine(line) { 24 | if (line.added) { 25 | return line.value.split('\n').filter(l => !!l).map(text => ( 26 |
  • 27 | +++ 28 | {text} 29 |
  • 30 | )); 31 | } else if (line.removed) { 32 | return line.value.split('\n').filter(l => !!l).map(text => ( 33 |
  • 34 | --- 35 | {text} 36 |
  • 37 | )); 38 | } 39 | return null; 40 | } 41 | 42 | renderDiff(diff) { 43 | return ( 44 | 49 | ); 50 | } 51 | 52 | renderDescription(log) { 53 | switch (log.type) { 54 | case 'create-dir': 55 | case 'create-file': 56 | return `Created: ${log.file}`; 57 | case 'update-file': 58 | return `Updated: ${log.file}`; 59 | case 'update-file-warning': 60 | return `Warning: nothing is changed for: ${log.file}`; 61 | case 'mv-file': 62 | return `Moved: ${log.file}`; 63 | case 'mv-file-warning': 64 | return `Warning: no file to move: ${log.file}`; 65 | case 'del-file': 66 | return `Deleted: ${log.file}`; 67 | default: 68 | return `Unknown log type: ${log.type}`; 69 | } 70 | } 71 | 72 | render() { 73 | const { logs } = this.props; 74 | 75 | return ( 76 |
    77 |
      78 | { 79 | logs.map(log => ( 80 |
    • 84 | {this.renderDescription(log)} 85 | {log.diff && this.renderDiff(log.diff)} 86 |
    • 87 | )) 88 | } 89 | {!logs.length &&
    • No logs.
    • } 90 |
    91 |
    92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/LogViewer.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .rekit-cmds-log-viewer { 4 | ul { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/LogViewerDialog.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import _ from 'lodash'; 4 | import { connect } from 'react-redux'; 5 | import { Alert, Button, Modal } from 'antd'; 6 | import { LogViewer } from './'; 7 | 8 | export class LogViewerDialog extends Component { 9 | static propTypes = { 10 | rekitCmds: PropTypes.object.isRequired, 11 | onClose: PropTypes.func.isRequired, 12 | }; 13 | 14 | static defaultProps = { 15 | onClose() {}, 16 | }; 17 | 18 | render() { 19 | const { args, logs } = this.props.rekitCmds.execCmdResult; 20 | return ( 21 | 29 | 35 | 36 |
    37 | 38 |
    39 |
    40 | ); 41 | } 42 | } 43 | 44 | /* istanbul ignore next */ 45 | function mapStateToProps(state) { 46 | return { 47 | rekitCmds: state.rekitCmds, 48 | }; 49 | } 50 | 51 | export default connect( 52 | mapStateToProps, 53 | )(LogViewerDialog); 54 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/LogViewerDialog.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .rekit-cmds-log-viewer-dialog { 4 | .ant-modal-content { 5 | max-width: 600px; 6 | } 7 | .ant-alert { 8 | margin: -16px -16px 0 -16px; 9 | border-radius: 6px 6px 0 0; 10 | } 11 | .rekit-cmds-log-viewer { 12 | margin-top: 20px; 13 | padding-bottom: 10px; 14 | overflow: auto; 15 | max-height: 400px; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/cmdSuccessNotification.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import _ from 'lodash'; 3 | import { Button, notification } from 'antd'; 4 | 5 | export default function cmdSuccessNotification(args, showCmdDialog) { 6 | // const { args } = this.props.rekitCmds.execCmdResult; 7 | const notificationKey = 'cmd_success'; 8 | 9 | const btnClick = () => { 10 | notification.close(notificationKey); 11 | showCmdDialog('logViewer'); 12 | }; 13 | 14 | notification.success({ 15 | duration: 3, 16 | message: `${_.upperFirst(args.commandName)} ${args.type} success.`, 17 | description: 'Click see logs button to see what has been done.', 18 | key: notificationKey, 19 | btn: , 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/index.js: -------------------------------------------------------------------------------- 1 | export DialogPlace from './DialogPlace'; 2 | export LogViewer from './LogViewer'; 3 | export LogViewerDialog from './LogViewerDialog'; 4 | export CmdForm from './CmdForm'; 5 | export cmdSuccessNotification from './cmdSuccessNotification'; 6 | 7 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/actions.js: -------------------------------------------------------------------------------- 1 | export { showCmdDialog } from './showCmdDialog'; 2 | export { hideCmdDialog } from './hideCmdDialog'; 3 | export { execCmd, dismissExecCmdError } from './execCmd'; 4 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/constants.js: -------------------------------------------------------------------------------- 1 | export const REKIT_CMDS_SHOW_CMD_DIALOG = 'REKIT_CMDS_SHOW_CMD_DIALOG'; 2 | export const REKIT_CMDS_HIDE_CMD_DIALOG = 'REKIT_CMDS_HIDE_CMD_DIALOG'; 3 | export const REKIT_CMDS_EXEC_CMD_BEGIN = 'REKIT_CMDS_EXEC_CMD_BEGIN'; 4 | export const REKIT_CMDS_EXEC_CMD_SUCCESS = 'REKIT_CMDS_EXEC_CMD_SUCCESS'; 5 | export const REKIT_CMDS_EXEC_CMD_FAILURE = 'REKIT_CMDS_EXEC_CMD_FAILURE'; 6 | export const REKIT_CMDS_EXEC_CMD_DISMISS_ERROR = 'REKIT_CMDS_EXEC_CMD_DISMISS_ERROR'; 7 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/execCmd.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import axios from 'axios'; 3 | import { 4 | REKIT_CMDS_EXEC_CMD_BEGIN, 5 | REKIT_CMDS_EXEC_CMD_SUCCESS, 6 | REKIT_CMDS_EXEC_CMD_FAILURE, 7 | REKIT_CMDS_EXEC_CMD_DISMISS_ERROR, 8 | } from './constants'; 9 | 10 | // const logs = { 11 | // 'add-action': { title: 'Add action success', description: 'See below logs for what has been done:' }, 12 | // 'add-component': { title: 'Add component success', description: 'See below logs for what has been done:' }, 13 | // }; 14 | 15 | export function execCmd(args) { 16 | return (dispatch) => { 17 | dispatch({ 18 | type: REKIT_CMDS_EXEC_CMD_BEGIN, 19 | }); 20 | const promise = new Promise(async (resolve, reject) => { 21 | let res = null; 22 | try { 23 | res = await axios.post('/rekit/api/exec-cmd', args); 24 | } catch (e) { 25 | dispatch({ 26 | type: REKIT_CMDS_EXEC_CMD_FAILURE, 27 | data: { error: _.get(e, 'response.data') || e.message || e }, 28 | }); 29 | reject(e); 30 | return; 31 | } 32 | dispatch({ 33 | type: REKIT_CMDS_EXEC_CMD_SUCCESS, 34 | data: { execCmdResult: res.data, args }, 35 | }); 36 | resolve(res.data); 37 | }); 38 | 39 | return promise; 40 | }; 41 | } 42 | 43 | export function dismissExecCmdError() { 44 | return { 45 | type: REKIT_CMDS_EXEC_CMD_DISMISS_ERROR, 46 | }; 47 | } 48 | 49 | export function reducer(state, action) { 50 | switch (action.type) { 51 | case REKIT_CMDS_EXEC_CMD_BEGIN: 52 | return { 53 | ...state, 54 | execCmdPending: true, 55 | execCmdError: null, 56 | }; 57 | 58 | case REKIT_CMDS_EXEC_CMD_SUCCESS: 59 | return { 60 | ...state, 61 | execCmdResult: action.data.execCmdResult, 62 | // logsTitle: logs[action.data.args.type].title, 63 | // logsDescription: logs[action.data.args.type].description, 64 | execCmdPending: false, 65 | execCmdError: null, 66 | }; 67 | 68 | case REKIT_CMDS_EXEC_CMD_FAILURE: 69 | return { 70 | ...state, 71 | execCmdPending: false, 72 | execCmdError: action.data.error, 73 | }; 74 | 75 | case REKIT_CMDS_EXEC_CMD_DISMISS_ERROR: 76 | return { 77 | ...state, 78 | execCmdError: null, 79 | }; 80 | 81 | default: 82 | return state; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/hideCmdDialog.js: -------------------------------------------------------------------------------- 1 | import { 2 | REKIT_CMDS_HIDE_CMD_DIALOG, 3 | } from './constants'; 4 | 5 | export function hideCmdDialog(dialogType) { 6 | return { 7 | type: REKIT_CMDS_HIDE_CMD_DIALOG, 8 | data: { dialogType }, 9 | }; 10 | } 11 | 12 | export function reducer(state, action) { 13 | switch (action.type) { 14 | case REKIT_CMDS_HIDE_CMD_DIALOG: 15 | return { 16 | ...state, 17 | [`${action.data.dialogType}DialogVisible`]: false, 18 | cmdArgs: null, 19 | }; 20 | 21 | default: 22 | return state; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/initialState.js: -------------------------------------------------------------------------------- 1 | 2 | const initialState = { 3 | cmdDialogVisible: false, 4 | addActionDialogVisible: false, 5 | logViewerDialogVisible: false, 6 | execCmdResult: null, 7 | logsTitle: '', // Used for logs viewer dialog 8 | logsDescription: '', // Used for logs viewer dialog 9 | cmdArgs: null, // Args provided to the current command 10 | execCmdPending: false, 11 | execCmdError: null, 12 | }; 13 | 14 | export default initialState; 15 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/reducer.js: -------------------------------------------------------------------------------- 1 | import initialState from './initialState'; 2 | import { reducer as showCmdDialog } from './showCmdDialog'; 3 | import { reducer as hideCmdDialog } from './hideCmdDialog'; 4 | import { reducer as execCmd } from './execCmd'; 5 | 6 | const reducers = [ 7 | showCmdDialog, 8 | hideCmdDialog, 9 | execCmd, 10 | ]; 11 | 12 | export default function reducer(state = initialState, action) { 13 | let newState; 14 | switch (action.type) { 15 | // Handle cross-topic actions here 16 | default: 17 | newState = state; 18 | break; 19 | } 20 | return reducers.reduce((s, r) => r(s, action), newState); 21 | } 22 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/redux/showCmdDialog.js: -------------------------------------------------------------------------------- 1 | import { 2 | REKIT_CMDS_SHOW_CMD_DIALOG, 3 | } from './constants'; 4 | 5 | export function showCmdDialog(dialogType, cmdArgs) { 6 | return { 7 | type: REKIT_CMDS_SHOW_CMD_DIALOG, 8 | data: { dialogType, cmdArgs }, 9 | }; 10 | } 11 | 12 | export function reducer(state, action) { 13 | switch (action.type) { 14 | case REKIT_CMDS_SHOW_CMD_DIALOG: 15 | return { 16 | ...state, 17 | [`${action.data.dialogType}DialogVisible`]: true, 18 | cmdArgs: action.data.cmdArgs, 19 | }; 20 | 21 | default: 22 | return state; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/route.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | path: 'rekit-cmds', 4 | name: 'Rekit cmds', 5 | childRoutes: [ 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /src/features/rekit-cmds/style.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | @import './DialogPlace.less'; 3 | @import './LogViewer.less'; 4 | @import './LogViewerDialog.less'; 5 | @import './CmdForm.less'; 6 | 7 | .form-footer, .dialog-footer { 8 | margin-top: 30px; 9 | text-align: right; 10 | button + button { 11 | margin-left: 20px; 12 | } 13 | } -------------------------------------------------------------------------------- /src/features/rekit-tools/BuildPage.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .rekit-tools-build-page { 4 | .build-result-link { 5 | margin-top: 10px; 6 | color: #999; 7 | } 8 | hr { 9 | height: 0px; 10 | border: none; 11 | margin-top: 15px; 12 | border-top: 1px solid #ddd; 13 | } 14 | 15 | .ant-progress { 16 | margin-top: 15px; 17 | } 18 | 19 | .output-container { 20 | margin-top: 15px; 21 | padding: 10px; 22 | background-color: #333; 23 | color: #fff; 24 | overflow: auto; 25 | 26 | font-family: 'Andale Mono', Arial; 27 | font-size: 13px; 28 | 29 | li { 30 | line-height: 20px; 31 | padding: 0; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/features/rekit-tools/RunTestPage.less: -------------------------------------------------------------------------------- 1 | @import '../../styles/mixins.less'; 2 | 3 | .rekit-tools-run-test-page { 4 | h2 { 5 | margin-bottom: 20px; 6 | font-size: 18px; 7 | font-weight: normal; 8 | label { 9 | font-weight: bold; 10 | font-size: 18px; 11 | } 12 | } 13 | hr { 14 | height: 0px; 15 | border: none; 16 | margin-top: 15px; 17 | border-top: 1px solid #ddd; 18 | } 19 | 20 | .output-container { 21 | margin-top: 15px; 22 | padding: 10px; 23 | background-color: #333; 24 | color: #fff; 25 | overflow: auto; 26 | 27 | font-family: 'Andale Mono', Arial; 28 | font-size: 13px; 29 | 30 | li { 31 | line-height: 20px; 32 | padding: 0; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/features/rekit-tools/TestCoveragePage.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { connect } from 'react-redux'; 4 | import { Alert, Button } from 'antd'; 5 | import history from '../../common/history'; 6 | 7 | export class TestCoveragePage extends Component { 8 | static propTypes = { 9 | home: PropTypes.object.isRequired, 10 | }; 11 | 12 | handleRunTestsClick() { 13 | history.push('/tools/tests'); 14 | } 15 | 16 | render() { 17 | return ( 18 |
    19 |

    Test coverage report 20 | {this.props.home.testCoverage && } 21 |

    22 | {this.props.home.testCoverage 23 | ?