├── .babelrc ├── .eslintrc ├── .flowconfig ├── .gitignore ├── .npmrc ├── LICENSE ├── Procfile ├── README ├── flow-typed └── npm │ ├── babel-cli_vx.x.x.js │ ├── babel-core_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── babel-plugin-lodash_vx.x.x.js │ ├── babel-plugin-transform-async-functions_vx.x.x.js │ ├── babel-plugin-transform-class-properties_vx.x.x.js │ ├── babel-plugin-transform-flow-strip-types_vx.x.x.js │ ├── babel-polyfill_vx.x.x.js │ ├── babel-preset-es2015_vx.x.x.js │ ├── babel-preset-latest_vx.x.x.js │ ├── babel-preset-react_vx.x.x.js │ ├── babel-preset-stage-2_vx.x.x.js │ ├── body-parser_vx.x.x.js │ ├── bootstrap_vx.x.x.js │ ├── browserify_vx.x.x.js │ ├── compression_vx.x.x.js │ ├── cookie-parser_vx.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── eslint-plugin-flowtype_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── eslint-plugin-jsx-a11y_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── express_v4.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── foreman_vx.x.x.js │ ├── hashmark_vx.x.x.js │ ├── hsl-to-hex_vx.x.x.js │ ├── isomorphic-fetch_v2.x.x.js │ ├── lodash_v4.x.x.js │ ├── md5_vx.x.x.js │ ├── multi-slider_vx.x.x.js │ ├── node-sass-module-importer_vx.x.x.js │ ├── node-sass_vx.x.x.js │ ├── pg-promise_vx.x.x.js │ ├── react-redux_v5.x.x.js │ ├── redux-batched-actions_vx.x.x.js │ ├── redux-shortcuts_vx.x.x.js │ ├── redux-thunk_vx.x.x.js │ ├── redux_v3.x.x.js │ ├── response-time_vx.x.x.js │ ├── scrypt_vx.x.x.js │ ├── serve-favicon_vx.x.x.js │ └── uglify-js_vx.x.x.js ├── libs └── redux.flow.js ├── package.json ├── public ├── MavenProLight-300.otf ├── favicon.ico ├── favicon.png ├── icon-white.png └── icon.png ├── sass ├── index.scss └── loader.scss ├── schema.sql ├── src ├── api │ ├── client.js │ └── server.js ├── bundles.json ├── client.js ├── components │ ├── about-section.js │ ├── add-player-page.js │ ├── app.js │ ├── comparison-section.js │ ├── comparison.js │ ├── embed-code.js │ ├── embeded-player.js │ ├── graphs │ │ ├── axis.js │ │ ├── full-graph.js │ │ ├── spark-graph.js │ │ └── spider-graph.js │ ├── home-page.js │ ├── link.js │ ├── login-form.js │ ├── login-page.js │ ├── measurables-section.js │ ├── measurables.js │ ├── modal.js │ ├── nav.js │ ├── page.js │ ├── player-bar.js │ ├── player-page.js │ ├── position-page.js │ ├── position-selector.js │ ├── position-stats-section.js │ ├── search-controls.js │ ├── search-page.js │ ├── search-paging.js │ ├── search-result.js │ ├── search-results.js │ ├── sign-up-form.js │ ├── typeahead.js │ └── year-selector.js ├── connection.js ├── error.js ├── import │ ├── import-measurable.js │ ├── import-nflds-player.js │ ├── import-players.js │ ├── pull-individual-measurements.js │ └── pull-measurements.js ├── index.js ├── init.js ├── layout.js ├── logic.js ├── measurables.js ├── old-url-middleware.js ├── packages │ ├── README.md │ ├── auth-token.js │ ├── http.js │ ├── pass-hash.js │ ├── redux-batcher.js │ └── require-https.js ├── positions.js ├── redux │ ├── actions.js │ ├── default-state.js │ └── reducer.js ├── router.js ├── routes │ ├── add-player-route.js │ ├── embed-route.js │ ├── home-route.js │ ├── player-route.js │ ├── position-route.js │ └── search-route.js ├── services │ ├── comparisons │ │ └── get-comparable-players-at-position.js │ ├── players │ │ ├── create-player.js │ │ └── get-player-by-old-id.js │ ├── schools │ │ ├── create-school.js │ │ ├── get-all-schools.js │ │ └── get-school-by-key.js │ ├── statistics │ │ └── get-percentile-at-position.js │ └── users │ │ ├── create-user.js │ │ ├── get-user-by-email.js │ │ └── get-user-by-id.js ├── types │ ├── api.js │ ├── domain.js │ ├── graphing.js │ └── state.js └── util │ └── on-error.js └── test-data.dump /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react", "latest", "stage-2"], 3 | "plugins": [ 4 | "lodash", 5 | ["transform-builtin-extend", { globals: ["Error"] }] 6 | ] 7 | } -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["flowtype"], 3 | "extends": ["airbnb", "plugin:flowtype/recommended"], 4 | "parser": "babel-eslint", 5 | "env": { 6 | "browser": true, 7 | "node": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "flowtype/require-valid-file-annotation": [ 12 | 2, 13 | "always", 14 | { 15 | "annotationStyle": "line" 16 | } 17 | ], 18 | "react/jsx-filename-extension": 0, 19 | "react/no-unused-prop-types": 0, 20 | "react/prop-types": [2, { "skipUndeclared": true }], 21 | "quote-props": [ 22 | 2, 23 | "as-needed", 24 | { 25 | "numbers": true 26 | } 27 | ], 28 | "no-confusing-arrow": 0 29 | } 30 | } -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | /lib/.* 3 | /public/.* 4 | .*/react/node_modules/.* 5 | .*/node_modules/babel.* 6 | .*/node_modules/bootstrap.* 7 | .*/node_modules/browserify.* 8 | .*/node_modules/eslint.* 9 | .*/node_modules/flow-bin.* 10 | .*/node_modules/foreman.* 11 | .*/node_modules/hashmark.* 12 | .*/node_modules/uglify-js.* 13 | .*/node_modules/.bin/.* 14 | .*/node_modules/fbjs/.* 15 | 16 | [libs] 17 | libs -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | node_modules/ 3 | npm-debug.log 4 | lib 5 | public/bundle* 6 | .env -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | save=true 2 | save-exact=true -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Marcus Armstrong 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. -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node --trace-warnings lib/index.js -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Web front end for mockdraftable.com. Open to PRs. -------------------------------------------------------------------------------- /flow-typed/npm/babel-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c263432e5bdd0e5a8dcb666912da1d7d 2 | // flow-typed version: <>/babel-cli_v6.24.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-cli/bin/babel-doctor' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-cli/bin/babel-external-helpers' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-cli/bin/babel-node' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-cli/bin/babel' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-cli/lib/_babel-node' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-cli/lib/babel-external-helpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-cli/lib/babel-node' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-cli/lib/babel/dir' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-cli/lib/babel/file' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-cli/lib/babel/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-cli/lib/babel/util' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'babel-cli/bin/babel-doctor.js' { 71 | declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>; 72 | } 73 | declare module 'babel-cli/bin/babel-external-helpers.js' { 74 | declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>; 75 | } 76 | declare module 'babel-cli/bin/babel-node.js' { 77 | declare module.exports: $Exports<'babel-cli/bin/babel-node'>; 78 | } 79 | declare module 'babel-cli/bin/babel.js' { 80 | declare module.exports: $Exports<'babel-cli/bin/babel'>; 81 | } 82 | declare module 'babel-cli/index' { 83 | declare module.exports: $Exports<'babel-cli'>; 84 | } 85 | declare module 'babel-cli/index.js' { 86 | declare module.exports: $Exports<'babel-cli'>; 87 | } 88 | declare module 'babel-cli/lib/_babel-node.js' { 89 | declare module.exports: $Exports<'babel-cli/lib/_babel-node'>; 90 | } 91 | declare module 'babel-cli/lib/babel-external-helpers.js' { 92 | declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>; 93 | } 94 | declare module 'babel-cli/lib/babel-node.js' { 95 | declare module.exports: $Exports<'babel-cli/lib/babel-node'>; 96 | } 97 | declare module 'babel-cli/lib/babel/dir.js' { 98 | declare module.exports: $Exports<'babel-cli/lib/babel/dir'>; 99 | } 100 | declare module 'babel-cli/lib/babel/file.js' { 101 | declare module.exports: $Exports<'babel-cli/lib/babel/file'>; 102 | } 103 | declare module 'babel-cli/lib/babel/index.js' { 104 | declare module.exports: $Exports<'babel-cli/lib/babel/index'>; 105 | } 106 | declare module 'babel-cli/lib/babel/util.js' { 107 | declare module.exports: $Exports<'babel-cli/lib/babel/util'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 479f96f7f545e87ab86c11e8927013a9 2 | // flow-typed version: <>/babel-eslint_v7.1.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-eslint' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-eslint' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-eslint/babylon-to-espree/attachComments' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/babylon-to-espree/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/babylon-to-espree/toAST' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/babylon-to-espree/toToken' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/babylon-to-espree/toTokens' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-eslint/babylon-to-espree/attachComments.js' { 51 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; 52 | } 53 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { 54 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; 55 | } 56 | declare module 'babel-eslint/babylon-to-espree/index.js' { 57 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/index'>; 58 | } 59 | declare module 'babel-eslint/babylon-to-espree/toAST.js' { 60 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toAST'>; 61 | } 62 | declare module 'babel-eslint/babylon-to-espree/toToken.js' { 63 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toToken'>; 64 | } 65 | declare module 'babel-eslint/babylon-to-espree/toTokens.js' { 66 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toTokens'>; 67 | } 68 | declare module 'babel-eslint/index' { 69 | declare module.exports: $Exports<'babel-eslint'>; 70 | } 71 | declare module 'babel-eslint/index.js' { 72 | declare module.exports: $Exports<'babel-eslint'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-lodash_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 310dcd54b0b983d2601e31475ce39d60 2 | // flow-typed version: <>/babel-plugin-lodash_v3.2.11/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-lodash' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-lodash' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-lodash/lib/config' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-lodash/lib/importModule' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-plugin-lodash/lib/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-plugin-lodash/lib/Map' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-plugin-lodash/lib/MapCache' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-plugin-lodash/lib/mapping' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-plugin-lodash/lib/ModuleCache' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-plugin-lodash/lib/Package' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-plugin-lodash/lib/Store' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-plugin-lodash/lib/util' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'babel-plugin-lodash/lib/config.js' { 67 | declare module.exports: $Exports<'babel-plugin-lodash/lib/config'>; 68 | } 69 | declare module 'babel-plugin-lodash/lib/importModule.js' { 70 | declare module.exports: $Exports<'babel-plugin-lodash/lib/importModule'>; 71 | } 72 | declare module 'babel-plugin-lodash/lib/index.js' { 73 | declare module.exports: $Exports<'babel-plugin-lodash/lib/index'>; 74 | } 75 | declare module 'babel-plugin-lodash/lib/Map.js' { 76 | declare module.exports: $Exports<'babel-plugin-lodash/lib/Map'>; 77 | } 78 | declare module 'babel-plugin-lodash/lib/MapCache.js' { 79 | declare module.exports: $Exports<'babel-plugin-lodash/lib/MapCache'>; 80 | } 81 | declare module 'babel-plugin-lodash/lib/mapping.js' { 82 | declare module.exports: $Exports<'babel-plugin-lodash/lib/mapping'>; 83 | } 84 | declare module 'babel-plugin-lodash/lib/ModuleCache.js' { 85 | declare module.exports: $Exports<'babel-plugin-lodash/lib/ModuleCache'>; 86 | } 87 | declare module 'babel-plugin-lodash/lib/Package.js' { 88 | declare module.exports: $Exports<'babel-plugin-lodash/lib/Package'>; 89 | } 90 | declare module 'babel-plugin-lodash/lib/Store.js' { 91 | declare module.exports: $Exports<'babel-plugin-lodash/lib/Store'>; 92 | } 93 | declare module 'babel-plugin-lodash/lib/util.js' { 94 | declare module.exports: $Exports<'babel-plugin-lodash/lib/util'>; 95 | } 96 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-async-functions_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 66246b10926ddc3b43b579a1ddc16363 2 | // flow-typed version: <>/babel-plugin-transform-async-functions_v6.22.0/flow_v0.40.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-async-functions' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-async-functions' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-async-functions/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-async-functions/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-async-functions/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5ddcf1a44504bb6f31e74595f8d2cc22 2 | // flow-typed version: <>/babel-plugin-transform-class-properties_v6.23.0/flow_v0.40.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-class-properties' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-class-properties' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-class-properties/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-class-properties/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-class-properties/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ed9cae1f0048c3c132091643e703cd8c 2 | // flow-typed version: <>/babel-plugin-transform-flow-strip-types_v6.22.0/flow_v0.40.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-flow-strip-types' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-flow-strip-types' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-flow-strip-types/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-flow-strip-types/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-flow-strip-types/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-polyfill_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 50a3f848c8c51e6f39295a247175db12 2 | // flow-typed version: <>/babel-polyfill_v6.23.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-polyfill' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-polyfill' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-polyfill/browser' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-polyfill/dist/polyfill' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-polyfill/dist/polyfill.min' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-polyfill/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-polyfill/scripts/postpublish' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-polyfill/scripts/prepublish' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-polyfill/browser.js' { 51 | declare module.exports: $Exports<'babel-polyfill/browser'>; 52 | } 53 | declare module 'babel-polyfill/dist/polyfill.js' { 54 | declare module.exports: $Exports<'babel-polyfill/dist/polyfill'>; 55 | } 56 | declare module 'babel-polyfill/dist/polyfill.min.js' { 57 | declare module.exports: $Exports<'babel-polyfill/dist/polyfill.min'>; 58 | } 59 | declare module 'babel-polyfill/lib/index.js' { 60 | declare module.exports: $Exports<'babel-polyfill/lib/index'>; 61 | } 62 | declare module 'babel-polyfill/scripts/postpublish.js' { 63 | declare module.exports: $Exports<'babel-polyfill/scripts/postpublish'>; 64 | } 65 | declare module 'babel-polyfill/scripts/prepublish.js' { 66 | declare module.exports: $Exports<'babel-polyfill/scripts/prepublish'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-es2015_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e97a58449fd4dec29f2f1743fd2facdd 2 | // flow-typed version: <>/babel-preset-es2015_v6.22.0/flow_v0.40.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-es2015' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-es2015' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-es2015/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-es2015/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-es2015/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-latest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5a50c4da51bb8c602c1e3b3ab079f3ca 2 | // flow-typed version: <>/babel-preset-latest_v6.24.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-latest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-latest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-latest/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-latest/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-latest/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a50c3be4cfffa87a3ad43e697c9130be 2 | // flow-typed version: <>/babel-preset-react_v6.23.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-react/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-react/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-stage-2_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6ecc336c61f3f8ce79dc621b75215020 2 | // flow-typed version: <>/babel-preset-stage-2_v6.22.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-stage-2' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-stage-2' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-stage-2/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-stage-2/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-stage-2/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/body-parser_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 66b08f86b05e140d7af23600675a430d 2 | // flow-typed version: <>/body-parser_v1.17.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'body-parser' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'body-parser' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'body-parser/lib/read' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'body-parser/lib/types/json' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'body-parser/lib/types/raw' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'body-parser/lib/types/text' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'body-parser/lib/types/urlencoded' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'body-parser/index' { 47 | declare module.exports: $Exports<'body-parser'>; 48 | } 49 | declare module 'body-parser/index.js' { 50 | declare module.exports: $Exports<'body-parser'>; 51 | } 52 | declare module 'body-parser/lib/read.js' { 53 | declare module.exports: $Exports<'body-parser/lib/read'>; 54 | } 55 | declare module 'body-parser/lib/types/json.js' { 56 | declare module.exports: $Exports<'body-parser/lib/types/json'>; 57 | } 58 | declare module 'body-parser/lib/types/raw.js' { 59 | declare module.exports: $Exports<'body-parser/lib/types/raw'>; 60 | } 61 | declare module 'body-parser/lib/types/text.js' { 62 | declare module.exports: $Exports<'body-parser/lib/types/text'>; 63 | } 64 | declare module 'body-parser/lib/types/urlencoded.js' { 65 | declare module.exports: $Exports<'body-parser/lib/types/urlencoded'>; 66 | } 67 | -------------------------------------------------------------------------------- /flow-typed/npm/compression_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d840c2d41d45d695b4af82b69258b6b9 2 | // flow-typed version: <>/compression_v1.6.2/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'compression' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'compression' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'compression/index' { 29 | declare module.exports: $Exports<'compression'>; 30 | } 31 | declare module 'compression/index.js' { 32 | declare module.exports: $Exports<'compression'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/cookie-parser_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 93312f13223f383d75b6690764c90656 2 | // flow-typed version: <>/cookie-parser_v1.4.3/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'cookie-parser' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'cookie-parser' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'cookie-parser/index' { 29 | declare module.exports: $Exports<'cookie-parser'>; 30 | } 31 | declare module 'cookie-parser/index.js' { 32 | declare module.exports: $Exports<'cookie-parser'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c84f06092e4e4cd13fe3f8581fe841ad 2 | // flow-typed version: <>/eslint-config-airbnb_v14.1.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-airbnb' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-airbnb' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-airbnb/base' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-airbnb/legacy' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-airbnb/rules/react-a11y' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-airbnb/rules/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-airbnb/test/test-base' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-airbnb/test/test-react-order' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'eslint-config-airbnb/base.js' { 51 | declare module.exports: $Exports<'eslint-config-airbnb/base'>; 52 | } 53 | declare module 'eslint-config-airbnb/index' { 54 | declare module.exports: $Exports<'eslint-config-airbnb'>; 55 | } 56 | declare module 'eslint-config-airbnb/index.js' { 57 | declare module.exports: $Exports<'eslint-config-airbnb'>; 58 | } 59 | declare module 'eslint-config-airbnb/legacy.js' { 60 | declare module.exports: $Exports<'eslint-config-airbnb/legacy'>; 61 | } 62 | declare module 'eslint-config-airbnb/rules/react-a11y.js' { 63 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react-a11y'>; 64 | } 65 | declare module 'eslint-config-airbnb/rules/react.js' { 66 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react'>; 67 | } 68 | declare module 'eslint-config-airbnb/test/test-base.js' { 69 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-base'>; 70 | } 71 | declare module 'eslint-config-airbnb/test/test-react-order.js' { 72 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-react-order'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcusdarmstrong/mockdraftable-web/3db1106cdd53cac26f439975abbcbfa2c47c30f4/flow-typed/npm/flow-bin_v0.x.x.js -------------------------------------------------------------------------------- /flow-typed/npm/foreman_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 44fabbdcf5053e8dd4ec4ea4ba1da737 2 | // flow-typed version: <>/foreman_v2.0.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'foreman' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'foreman' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'foreman/forward' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'foreman/lib/colors' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'foreman/lib/console' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'foreman/lib/envs' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'foreman/lib/exporters' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'foreman/lib/forward' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'foreman/lib/proc' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'foreman/lib/procfile' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'foreman/lib/proxy' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'foreman/lib/requirements' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'foreman/nf' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'foreman/proxy' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'foreman/forward.js' { 75 | declare module.exports: $Exports<'foreman/forward'>; 76 | } 77 | declare module 'foreman/lib/colors.js' { 78 | declare module.exports: $Exports<'foreman/lib/colors'>; 79 | } 80 | declare module 'foreman/lib/console.js' { 81 | declare module.exports: $Exports<'foreman/lib/console'>; 82 | } 83 | declare module 'foreman/lib/envs.js' { 84 | declare module.exports: $Exports<'foreman/lib/envs'>; 85 | } 86 | declare module 'foreman/lib/exporters.js' { 87 | declare module.exports: $Exports<'foreman/lib/exporters'>; 88 | } 89 | declare module 'foreman/lib/forward.js' { 90 | declare module.exports: $Exports<'foreman/lib/forward'>; 91 | } 92 | declare module 'foreman/lib/proc.js' { 93 | declare module.exports: $Exports<'foreman/lib/proc'>; 94 | } 95 | declare module 'foreman/lib/procfile.js' { 96 | declare module.exports: $Exports<'foreman/lib/procfile'>; 97 | } 98 | declare module 'foreman/lib/proxy.js' { 99 | declare module.exports: $Exports<'foreman/lib/proxy'>; 100 | } 101 | declare module 'foreman/lib/requirements.js' { 102 | declare module.exports: $Exports<'foreman/lib/requirements'>; 103 | } 104 | declare module 'foreman/nf.js' { 105 | declare module.exports: $Exports<'foreman/nf'>; 106 | } 107 | declare module 'foreman/proxy.js' { 108 | declare module.exports: $Exports<'foreman/proxy'>; 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/hashmark_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b0f17adc053ab47ac8d46d9820949c87 2 | // flow-typed version: <>/hashmark_v4.1.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'hashmark' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'hashmark' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'hashmark/index' { 29 | declare module.exports: $Exports<'hashmark'>; 30 | } 31 | declare module 'hashmark/index.js' { 32 | declare module.exports: $Exports<'hashmark'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/hsl-to-hex_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b53c0f175c7a2fe3ee1508d08c632fdd 2 | // flow-typed version: <>/hsl-to-hex_v1.0.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'hsl-to-hex' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'hsl-to-hex' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'hsl-to-hex/example' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'hsl-to-hex/test/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'hsl-to-hex/example.js' { 35 | declare module.exports: $Exports<'hsl-to-hex/example'>; 36 | } 37 | declare module 'hsl-to-hex/index' { 38 | declare module.exports: $Exports<'hsl-to-hex'>; 39 | } 40 | declare module 'hsl-to-hex/index.js' { 41 | declare module.exports: $Exports<'hsl-to-hex'>; 42 | } 43 | declare module 'hsl-to-hex/test/index.js' { 44 | declare module.exports: $Exports<'hsl-to-hex/test/index'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/isomorphic-fetch_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 28ad27471ba2cb831af6a1f17b7f0cf0 2 | // flow-typed version: f3161dc07c/isomorphic-fetch_v2.x.x/flow_>=v0.25.x 3 | 4 | 5 | declare module 'isomorphic-fetch' { 6 | declare module.exports: (input: string | Request, init?: RequestOptions) => Promise; 7 | } 8 | -------------------------------------------------------------------------------- /flow-typed/npm/md5_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 16cc0ed690ee350410cfef593b78cb3d 2 | // flow-typed version: <>/md5_v2.2.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'md5' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'md5' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'md5/md5' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'md5/test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'md5/md5.js' { 35 | declare module.exports: $Exports<'md5/md5'>; 36 | } 37 | declare module 'md5/test.js' { 38 | declare module.exports: $Exports<'md5/test'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/multi-slider_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e868cabcef8f49351f3dd48a1f4d42d9 2 | // flow-typed version: <>/multi-slider_v3.0.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'multi-slider' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'multi-slider' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'multi-slider/lib/Handle' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'multi-slider/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'multi-slider/lib/MultiSlider' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'multi-slider/lib/Track' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'multi-slider/lib/useTouches' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'multi-slider/src/Handle' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'multi-slider/src/index' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'multi-slider/src/MultiSlider' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'multi-slider/src/Track' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'multi-slider/src/useTouches' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'multi-slider/lib/Handle.js' { 67 | declare module.exports: $Exports<'multi-slider/lib/Handle'>; 68 | } 69 | declare module 'multi-slider/lib/index.js' { 70 | declare module.exports: $Exports<'multi-slider/lib/index'>; 71 | } 72 | declare module 'multi-slider/lib/MultiSlider.js' { 73 | declare module.exports: $Exports<'multi-slider/lib/MultiSlider'>; 74 | } 75 | declare module 'multi-slider/lib/Track.js' { 76 | declare module.exports: $Exports<'multi-slider/lib/Track'>; 77 | } 78 | declare module 'multi-slider/lib/useTouches.js' { 79 | declare module.exports: $Exports<'multi-slider/lib/useTouches'>; 80 | } 81 | declare module 'multi-slider/src/Handle.js' { 82 | declare module.exports: $Exports<'multi-slider/src/Handle'>; 83 | } 84 | declare module 'multi-slider/src/index.js' { 85 | declare module.exports: $Exports<'multi-slider/src/index'>; 86 | } 87 | declare module 'multi-slider/src/MultiSlider.js' { 88 | declare module.exports: $Exports<'multi-slider/src/MultiSlider'>; 89 | } 90 | declare module 'multi-slider/src/Track.js' { 91 | declare module.exports: $Exports<'multi-slider/src/Track'>; 92 | } 93 | declare module 'multi-slider/src/useTouches.js' { 94 | declare module.exports: $Exports<'multi-slider/src/useTouches'>; 95 | } 96 | -------------------------------------------------------------------------------- /flow-typed/npm/node-sass-module-importer_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f91cef584906048ccebbcd7de541ff70 2 | // flow-typed version: <>/node-sass-module-importer_v0.1.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'node-sass-module-importer' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'node-sass-module-importer' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'node-sass-module-importer/index' { 29 | declare module.exports: $Exports<'node-sass-module-importer'>; 30 | } 31 | declare module 'node-sass-module-importer/index.js' { 32 | declare module.exports: $Exports<'node-sass-module-importer'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/react-redux_v5.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c32cee7feb0968b1fb0c4fc5e755610b 2 | // flow-typed version: aff2bf770e/react-redux_v5.x.x/flow_>=v0.53.x 3 | 4 | // flow-typed signature: 8db7b853f57c51094bf0ab8b2650fd9c 5 | // flow-typed version: ab8db5f14d/react-redux_v5.x.x/flow_>=v0.30.x 6 | 7 | import type { Dispatch, Store } from "redux"; 8 | 9 | declare module "react-redux" { 10 | /* 11 | 12 | S = State 13 | A = Action 14 | OP = OwnProps 15 | SP = StateProps 16 | DP = DispatchProps 17 | 18 | */ 19 | 20 | declare type MapStateToProps = ( 21 | state: S, 22 | ownProps: OP 23 | ) => SP | MapStateToProps; 24 | 25 | declare type MapDispatchToProps = 26 | | ((dispatch: Dispatch, ownProps: OP) => DP) 27 | | DP; 28 | 29 | declare type MergeProps = ( 30 | stateProps: SP, 31 | dispatchProps: DP, 32 | ownProps: OP 33 | ) => P; 34 | 35 | declare type Context = { store: Store<*, *> }; 36 | 37 | declare class ConnectedComponent extends React$Component { 38 | static WrappedComponent: Class>, 39 | getWrappedInstance(): React$Component

, 40 | props: OP, 41 | state: void 42 | } 43 | 44 | declare type ConnectedComponentClass = Class< 45 | ConnectedComponent 46 | >; 47 | 48 | declare type Connector = ( 49 | component: React$ComponentType

50 | ) => ConnectedComponentClass; 51 | 52 | declare class Provider extends React$Component<{ 53 | store: Store, 54 | children?: any 55 | }> {} 56 | 57 | declare type ConnectOptions = { 58 | pure?: boolean, 59 | withRef?: boolean 60 | }; 61 | 62 | declare type Null = null | void; 63 | 64 | declare function connect( 65 | ...rest: Array // <= workaround for https://github.com/facebook/flow/issues/2360 66 | ): Connector } & OP>>; 67 | 68 | declare function connect( 69 | mapStateToProps: Null, 70 | mapDispatchToProps: Null, 71 | mergeProps: Null, 72 | options: ConnectOptions 73 | ): Connector } & OP>>; 74 | 75 | declare function connect( 76 | mapStateToProps: MapStateToProps, 77 | mapDispatchToProps: Null, 78 | mergeProps: Null, 79 | options?: ConnectOptions 80 | ): Connector } & OP>>; 81 | 82 | declare function connect( 83 | mapStateToProps: Null, 84 | mapDispatchToProps: MapDispatchToProps, 85 | mergeProps: Null, 86 | options?: ConnectOptions 87 | ): Connector>; 88 | 89 | declare function connect( 90 | mapStateToProps: MapStateToProps, 91 | mapDispatchToProps: MapDispatchToProps, 92 | mergeProps: Null, 93 | options?: ConnectOptions 94 | ): Connector>; 95 | 96 | declare function connect( 97 | mapStateToProps: MapStateToProps, 98 | mapDispatchToProps: Null, 99 | mergeProps: MergeProps, 100 | options?: ConnectOptions 101 | ): Connector; 102 | 103 | declare function connect( 104 | mapStateToProps: MapStateToProps, 105 | mapDispatchToProps: MapDispatchToProps, 106 | mergeProps: MergeProps, 107 | options?: ConnectOptions 108 | ): Connector; 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-batched-actions_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: dbf2ac92bcfc910856cc248bbe065e60 2 | // flow-typed version: <>/redux-batched-actions_v0.1.5/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-batched-actions' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-batched-actions' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-batched-actions/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-batched-actions/test/index-test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'redux-batched-actions/lib/index.js' { 35 | declare module.exports: $Exports<'redux-batched-actions/lib/index'>; 36 | } 37 | declare module 'redux-batched-actions/test/index-test.js' { 38 | declare module.exports: $Exports<'redux-batched-actions/test/index-test'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-shortcuts_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: bbf20098811439b36ecd71373708f32b 2 | // flow-typed version: <>/redux-shortcuts_v0.0.3/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-shortcuts' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-shortcuts' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-shortcuts/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'redux-shortcuts/lib/index.js' { 31 | declare module.exports: $Exports<'redux-shortcuts/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-thunk_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 867a600e6b26ddfb663b6b5bb8d80bcf 2 | // flow-typed version: <>/redux-thunk_v2.2.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-thunk' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-thunk' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-thunk/dist/redux-thunk' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-thunk/dist/redux-thunk.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-thunk/es/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-thunk/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-thunk/src/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'redux-thunk/dist/redux-thunk.js' { 47 | declare module.exports: $Exports<'redux-thunk/dist/redux-thunk'>; 48 | } 49 | declare module 'redux-thunk/dist/redux-thunk.min.js' { 50 | declare module.exports: $Exports<'redux-thunk/dist/redux-thunk.min'>; 51 | } 52 | declare module 'redux-thunk/es/index.js' { 53 | declare module.exports: $Exports<'redux-thunk/es/index'>; 54 | } 55 | declare module 'redux-thunk/lib/index.js' { 56 | declare module.exports: $Exports<'redux-thunk/lib/index'>; 57 | } 58 | declare module 'redux-thunk/src/index.js' { 59 | declare module.exports: $Exports<'redux-thunk/src/index'>; 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/redux_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ba132c96664f1a05288f3eb2272a3c35 2 | // flow-typed version: c4bbd91cfc/redux_v3.x.x/flow_>=v0.33.x 3 | 4 | declare module 'redux' { 5 | 6 | /* 7 | 8 | S = State 9 | A = Action 10 | 11 | */ 12 | 13 | declare type Dispatch }> = (action: A) => A; 14 | 15 | declare type MiddlewareAPI = { 16 | dispatch: Dispatch; 17 | getState(): S; 18 | }; 19 | 20 | declare type Store = { 21 | // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) 22 | dispatch: Dispatch; 23 | getState(): S; 24 | subscribe(listener: () => void): () => void; 25 | replaceReducer(nextReducer: Reducer): void 26 | }; 27 | 28 | declare type Reducer = (state: S, action: A) => S; 29 | 30 | declare type Middleware = 31 | (api: MiddlewareAPI) => 32 | (next: Dispatch) => Dispatch; 33 | 34 | declare type StoreCreator = { 35 | (reducer: Reducer, enhancer?: StoreEnhancer): Store; 36 | (reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 37 | }; 38 | 39 | declare type StoreEnhancer = (next: StoreCreator) => StoreCreator; 40 | 41 | declare function createStore(reducer: Reducer, enhancer?: StoreEnhancer): Store; 42 | declare function createStore(reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 43 | 44 | declare function applyMiddleware(...middlewares: Array>): StoreEnhancer; 45 | 46 | declare type ActionCreator = (...args: Array) => A; 47 | declare type ActionCreators = { [key: K]: ActionCreator }; 48 | 49 | declare function bindActionCreators>(actionCreator: C, dispatch: Dispatch): C; 50 | declare function bindActionCreators>(actionCreators: C, dispatch: Dispatch): C; 51 | 52 | declare function combineReducers(reducers: O): Reducer<$ObjMap(r: Reducer) => S>, A>; 53 | 54 | declare function compose(...fns: Array>): Function; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /flow-typed/npm/response-time_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f3c9e819176f544fce5e518f576c4eee 2 | // flow-typed version: <>/response-time_v2.3.2/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'response-time' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'response-time' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'response-time/index' { 29 | declare module.exports: $Exports<'response-time'>; 30 | } 31 | declare module 'response-time/index.js' { 32 | declare module.exports: $Exports<'response-time'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/scrypt_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: dadd54947fd58a9e61095a92f84ba3b6 2 | // flow-typed version: <>/scrypt_v6.0.3/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'scrypt' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'scrypt' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'scrypt/node-scrypt-preinstall' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'scrypt/tests/scrypt-tests' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'scrypt/index' { 35 | declare module.exports: $Exports<'scrypt'>; 36 | } 37 | declare module 'scrypt/index.js' { 38 | declare module.exports: $Exports<'scrypt'>; 39 | } 40 | declare module 'scrypt/node-scrypt-preinstall.js' { 41 | declare module.exports: $Exports<'scrypt/node-scrypt-preinstall'>; 42 | } 43 | declare module 'scrypt/tests/scrypt-tests.js' { 44 | declare module.exports: $Exports<'scrypt/tests/scrypt-tests'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/serve-favicon_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7e778dd2bd5f207db56f75df2c607bd1 2 | // flow-typed version: <>/serve-favicon_v2.4.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'serve-favicon' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'serve-favicon' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'serve-favicon/index' { 29 | declare module.exports: $Exports<'serve-favicon'>; 30 | } 31 | declare module 'serve-favicon/index.js' { 32 | declare module.exports: $Exports<'serve-favicon'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/uglify-js_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8fdb1be34001c548b5861a11c50b84c5 2 | // flow-typed version: <>/uglify-js_v2.8.12/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'uglify-js' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'uglify-js' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'uglify-js/bin/extract-props' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'uglify-js/lib/ast' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'uglify-js/lib/compress' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'uglify-js/lib/mozilla-ast' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'uglify-js/lib/output' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'uglify-js/lib/parse' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'uglify-js/lib/propmangle' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'uglify-js/lib/scope' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'uglify-js/lib/sourcemap' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'uglify-js/lib/transform' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'uglify-js/lib/utils' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'uglify-js/tools/exports' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'uglify-js/tools/node' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'uglify-js/bin/extract-props.js' { 79 | declare module.exports: $Exports<'uglify-js/bin/extract-props'>; 80 | } 81 | declare module 'uglify-js/lib/ast.js' { 82 | declare module.exports: $Exports<'uglify-js/lib/ast'>; 83 | } 84 | declare module 'uglify-js/lib/compress.js' { 85 | declare module.exports: $Exports<'uglify-js/lib/compress'>; 86 | } 87 | declare module 'uglify-js/lib/mozilla-ast.js' { 88 | declare module.exports: $Exports<'uglify-js/lib/mozilla-ast'>; 89 | } 90 | declare module 'uglify-js/lib/output.js' { 91 | declare module.exports: $Exports<'uglify-js/lib/output'>; 92 | } 93 | declare module 'uglify-js/lib/parse.js' { 94 | declare module.exports: $Exports<'uglify-js/lib/parse'>; 95 | } 96 | declare module 'uglify-js/lib/propmangle.js' { 97 | declare module.exports: $Exports<'uglify-js/lib/propmangle'>; 98 | } 99 | declare module 'uglify-js/lib/scope.js' { 100 | declare module.exports: $Exports<'uglify-js/lib/scope'>; 101 | } 102 | declare module 'uglify-js/lib/sourcemap.js' { 103 | declare module.exports: $Exports<'uglify-js/lib/sourcemap'>; 104 | } 105 | declare module 'uglify-js/lib/transform.js' { 106 | declare module.exports: $Exports<'uglify-js/lib/transform'>; 107 | } 108 | declare module 'uglify-js/lib/utils.js' { 109 | declare module.exports: $Exports<'uglify-js/lib/utils'>; 110 | } 111 | declare module 'uglify-js/tools/exports.js' { 112 | declare module.exports: $Exports<'uglify-js/tools/exports'>; 113 | } 114 | declare module 'uglify-js/tools/node.js' { 115 | declare module.exports: $Exports<'uglify-js/tools/node'>; 116 | } 117 | -------------------------------------------------------------------------------- /libs/redux.flow.js: -------------------------------------------------------------------------------- 1 | declare module 'redux' { 2 | declare type Action = { type: $Subtype }; 3 | declare type Dispatch = (action: A) => A; 4 | 5 | declare type MiddlewareAPI = { 6 | dispatch: Dispatch; 7 | getState(): S; 8 | }; 9 | 10 | declare type Store = { 11 | // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) 12 | dispatch: Dispatch; 13 | getState(): S; 14 | subscribe(listener: () => void): () => void; 15 | replaceReducer(nextReducer: Reducer): void 16 | }; 17 | 18 | declare type Reducer = (state: S, action: A) => S; 19 | 20 | declare type Middleware = 21 | (api: MiddlewareAPI) => 22 | (next: Dispatch) => Dispatch; 23 | 24 | declare type StoreCreator = { 25 | (reducer: Reducer, enhancer?: StoreEnhancer): Store; 26 | (reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 27 | }; 28 | 29 | declare type StoreEnhancer = (next: StoreCreator) => StoreCreator; 30 | 31 | declare function createStore(reducer: Reducer, enhancer?: StoreEnhancer): Store; 32 | declare function createStore(reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 33 | 34 | declare function applyMiddleware(...middlewares: Array>): StoreEnhancer; 35 | 36 | declare type ActionCreator = (...args: Array) => A; 37 | declare type ActionCreators = { [key: K]: ActionCreator }; 38 | 39 | declare function bindActionCreators>(actionCreator: C, dispatch: Dispatch): C; 40 | declare function bindActionCreators>(actionCreators: C, dispatch: Dispatch): C; 41 | 42 | declare function combineReducers(reducers: O): Reducer<$ObjMap(r: Reducer) => S>, A>; 43 | 44 | declare function compose(...fns: Array>): Function; 45 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mockdraftable-web", 3 | "version": "0.1.0", 4 | "description": "web front end for mockdraftable.com", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "start": "nf start", 8 | "lint": "eslint ./src", 9 | "clean": "rm -rf lib/* && rm -f public/bundle*", 10 | "prebuild": "npm run clean && npm run -s lint", 11 | "build": "if [ \"${NODE_ENV}\" = \"production\" ]; then npm run build:prod; else npm run build:dev; fi", 12 | "build:dev": "npm run build:js:dev && time npm run build:css:dev", 13 | "build:prod": "npm run build:js:prod && npm run build:css:prod", 14 | "build:js:dev": "time npm run build:server && time npm run build:client:dev", 15 | "build:js:prod": "npm run build:server && npm run build:client:prod", 16 | "build:server": "babel --comments=false src -d lib", 17 | "build:client:dev": "browserify lib/client.js | hashmark -s 'public/bundle-{hash}.js' -n js_bundle_name -l 8 -m './lib/bundles.json'", 18 | "build:client:prod": "browserify lib/client.js | uglifyjs -c -m | hashmark -s 'public/bundle-{hash}.js' -n js_bundle_name -l 8 -m './lib/bundles.json'", 19 | "build:css:prod": "node-sass --importer node_modules/node-sass-module-importer/index.js --output-style compressed sass/index.scss | postcss --use autoprefixer | hashmark -s 'public/bundle-{hash}.css' -n css_bundle_name -l 8 -m './lib/bundles.json'", 20 | "build:css:dev": "node-sass --importer node_modules/node-sass-module-importer/index.js --output-style expanded sass/index.scss | postcss --use autoprefixer | hashmark -s 'public/bundle-{hash}.css' -n css_bundle_name -l 8 -m './lib/bundles.json'", 21 | "postinstall": "npm run build", 22 | "flow": "flow", 23 | "heroku-postbuild": "npm prune --production" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "git+https://github.com/marcusdarmstrong/mockdraftable-web.git" 28 | }, 29 | "author": "Marcus Armstrong", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/marcusdarmstrong/mockdraftable-web/issues" 33 | }, 34 | "homepage": "https://github.com/marcusdarmstrong/mockdraftable-web#readme", 35 | "dependencies": { 36 | "babel-polyfill": "6.26.0", 37 | "body-parser": "1.17.2", 38 | "compression": "1.7.0", 39 | "cookie-parser": "1.4.3", 40 | "express": "4.15.4", 41 | "foreman": "2.0.0", 42 | "hsl-to-hex": "1.0.0", 43 | "isomorphic-fetch": "2.2.1", 44 | "jquery": "3.2.1", 45 | "lodash": "4.17.4", 46 | "md5": "2.2.1", 47 | "multi-slider": "4.0.0", 48 | "pg-promise": "6.5.1", 49 | "popper.js": "1.12.3", 50 | "react": "15.6.1", 51 | "react-dom": "15.6.1", 52 | "react-redux": "5.0.6", 53 | "redux": "3.7.2", 54 | "redux-shortcuts": "0.0.3", 55 | "redux-thunk": "2.2.0", 56 | "response-time": "2.3.2", 57 | "scrypt": "6.0.3", 58 | "serve-favicon": "2.4.3" 59 | }, 60 | "devDependencies": { 61 | "autoprefixer": "7.1.2", 62 | "babel-cli": "6.26.0", 63 | "babel-core": "6.26.0", 64 | "babel-eslint": "7.2.3", 65 | "babel-plugin-lodash": "3.2.11", 66 | "babel-plugin-transform-builtin-extend": "1.1.2", 67 | "babel-preset-latest": "6.24.1", 68 | "babel-preset-react": "6.24.1", 69 | "babel-preset-stage-2": "6.24.1", 70 | "bootstrap": "4.0.0-beta", 71 | "browserify": "14.4.0", 72 | "eslint": "4.5.0", 73 | "eslint-config-airbnb": "15.1.0", 74 | "eslint-plugin-flowtype": "2.35.0", 75 | "eslint-plugin-import": "2.7.0", 76 | "eslint-plugin-jsx-a11y": "5.1.1", 77 | "eslint-plugin-react": "7.3.0", 78 | "flow-bin": "0.53.1", 79 | "hashmark": "5.0.0", 80 | "node-sass": "4.5.3", 81 | "node-sass-module-importer": "0.1.0", 82 | "postcss-cli": "4.1.0", 83 | "uglify-js": "3.0.28" 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /public/MavenProLight-300.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcusdarmstrong/mockdraftable-web/3db1106cdd53cac26f439975abbcbfa2c47c30f4/public/MavenProLight-300.otf -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcusdarmstrong/mockdraftable-web/3db1106cdd53cac26f439975abbcbfa2c47c30f4/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcusdarmstrong/mockdraftable-web/3db1106cdd53cac26f439975abbcbfa2c47c30f4/public/favicon.png -------------------------------------------------------------------------------- /public/icon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcusdarmstrong/mockdraftable-web/3db1106cdd53cac26f439975abbcbfa2c47c30f4/public/icon-white.png -------------------------------------------------------------------------------- /public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcusdarmstrong/mockdraftable-web/3db1106cdd53cac26f439975abbcbfa2c47c30f4/public/icon.png -------------------------------------------------------------------------------- /sass/index.scss: -------------------------------------------------------------------------------- 1 | $gray-100: #f8f9fa; 2 | $gray-600: #868e96; 3 | $gray-800: #343a40; 4 | $red: #dc3545; 5 | $yellow: #ffc107; 6 | $green: #28a745; 7 | $cyan: #17a2b8; 8 | 9 | $theme-colors: ( 10 | primary: #46B77B, 11 | secondary: $gray-600, 12 | success: $green, 13 | info: $cyan, 14 | warning: $yellow, 15 | danger: $red, 16 | light: $gray-100, 17 | dark: $gray-800 18 | ) !default; 19 | 20 | $btn-transition: background-color .05s ease-in-out, border-color .05s ease-in-out, box-shadow .05s ease-in-out; 21 | 22 | 23 | @import "~bootstrap/scss/bootstrap"; 24 | @import "./loader"; 25 | 26 | @font-face { 27 | font-family: "Maven Pro Light"; 28 | src: url("./MavenProLight-300.otf"); 29 | } 30 | 31 | .window { 32 | margin-top: 4rem; 33 | } 34 | 35 | .navbar img { 36 | height: 2.5rem; 37 | width: 3.25rem; 38 | padding-right: .67rem; 39 | vertical-align: -.8rem; 40 | } 41 | 42 | $good-grey: #464a4c; 43 | 44 | text.measurable textpath { 45 | font-size: 1rem; 46 | fill: $good-grey; 47 | text-shadow: 0px 0px 3px white; 48 | color: $good-grey; 49 | } 50 | 51 | path, 52 | .divider, 53 | .grid { 54 | stroke: $good-grey; 55 | stroke-width: 1; 56 | fill-opacity: 0.0; 57 | stroke-opacity: 1; 58 | } 59 | 60 | .grid { 61 | stroke-opacity: 0.25; 62 | } 63 | 64 | .graph { 65 | fill: #0275d8; 66 | stroke-width: 2; 67 | fill-opacity: .5; 68 | stroke-opacity: 1; 69 | stroke: #0275d8; 70 | } 71 | 72 | .percentileMarker circle { 73 | fill: white; 74 | stroke: #0275d8; 75 | stroke-width: 2; 76 | stroke-opacity: 1; 77 | } 78 | 79 | .percentileMarker text { 80 | text-anchor: middle; 81 | /*dominant-baseline: central;*/ 82 | font-size: .75rem; 83 | fill: $good-grey; 84 | font-family: "Arvo"; 85 | } 86 | 87 | .spark-graph svg { 88 | height: 3rem; 89 | } 90 | 91 | .spark-text { 92 | text-anchor: middle; 93 | dominant-baseline: central; 94 | font-family: "Arvo"; 95 | text-shadow: 2px 2px 0 white, -2px -2px 0 white, -2px 2px 0 white, 2px -2px 0 white; 96 | } 97 | 98 | 99 | .search circle { 100 | fill: rgba(0,0,0,0); 101 | stroke: #fff; 102 | stroke-width: 6; 103 | } 104 | 105 | .search line { 106 | stroke: #fff; 107 | stroke-width: 6; 108 | } 109 | 110 | .btn, .custom-select { 111 | cursor: pointer; 112 | } 113 | 114 | button.nav-link { 115 | cursor: pointer; 116 | } 117 | 118 | .btn-search { 119 | padding: .25rem 1rem; 120 | background-color: rgba(0,0,0,0); 121 | border-color: rgba(255,255,255,0.1); 122 | top: 8px; 123 | } 124 | 125 | .navbar { 126 | background: linear-gradient(to right, rgba(70,183,123,1) 0%, rgba(52,148,99,1) 100%); 127 | } 128 | 129 | .navbar-brand { 130 | font-family: "Maven Pro Light"; 131 | font-weight: 300; 132 | height: 40px 133 | } 134 | 135 | .playerbar { 136 | top: 56px; 137 | background-color: #6D6E70; 138 | color: #fff; 139 | z-index: 1; 140 | } 141 | 142 | .playerbar-name { 143 | font-weight: 200; 144 | } 145 | 146 | .playerbar + .window { 147 | margin-top: 8rem; 148 | } 149 | 150 | .navbar-toggler { 151 | margin-right: 1rem; 152 | } 153 | 154 | .spider { 155 | position: relative; 156 | height:0; 157 | width: 100%; 158 | padding-bottom: 100%; 159 | } 160 | 161 | .spider svg { 162 | width: 100%; 163 | height: 100%; 164 | position: absolute; 165 | left: 0; 166 | top: 0; 167 | } 168 | 169 | -------------------------------------------------------------------------------- /sass/loader.scss: -------------------------------------------------------------------------------- 1 | .loader, 2 | .loader:before, 3 | .loader:after { 4 | border-radius: 50%; 5 | width: 2.5em; 6 | height: 2.5em; 7 | animation-fill-mode: both; 8 | animation: load7 1.8s infinite ease-in-out; 9 | } 10 | .loader { 11 | color: #000; 12 | font-size: 10px; 13 | margin: 80px auto; 14 | position: relative; 15 | text-indent: -9999em; 16 | transform: translateZ(0); 17 | animation-delay: -0.16s; 18 | } 19 | .loader:before, 20 | .loader:after { 21 | content: ''; 22 | position: absolute; 23 | top: 0; 24 | } 25 | .loader:before { 26 | left: -3.5em; 27 | animation-delay: -0.32s; 28 | } 29 | .loader:after { 30 | left: 3.5em; 31 | } 32 | @keyframes load7 { 33 | 0%, 34 | 80%, 35 | 100% { 36 | box-shadow: 0 2.5em 0 -1.3em; 37 | } 38 | 40% { 39 | box-shadow: 0 2.5em 0 0; 40 | } 41 | } -------------------------------------------------------------------------------- /schema.sql: -------------------------------------------------------------------------------- 1 | create table t_player ( 2 | id serial, 3 | oldid int null, 4 | status int not null, 5 | first_name TEXT not null, 6 | last_name TEXT not null, 7 | draft_year int not null, 8 | canonical_name TEXT not null unique, 9 | school_id int 10 | ); 11 | 12 | create table t_school ( 13 | id serial, 14 | name TEXT not null 15 | ); 16 | 17 | create table t_position_eligibility ( 18 | player_id int not null, 19 | position_id int not null, 20 | status int not null 21 | ); 22 | 23 | create table t_measurement ( 24 | id serial, 25 | status int not null, 26 | player_id int not null, 27 | measurable_id int not null, 28 | measurement double precision not null, 29 | source int not null 30 | ); 31 | 32 | create table t_user ( 33 | id serial, 34 | status int not null, 35 | email text not null unique, 36 | pass_hash text not null 37 | ); 38 | 39 | create view v_individual_measurements as 40 | select 41 | p.id as id, 42 | case when (m.measurable_id = 1) then m.measurement else NULL end as height, 43 | case when (m.measurable_id = 2) then m.measurement else NULL end as weight, 44 | case when (m.measurable_id = 3) then m.measurement else NULL end as wingspan, 45 | case when (m.measurable_id = 4) then m.measurement else NULL end as arm_length, 46 | case when (m.measurable_id = 5) then m.measurement else NULL end as hand_size, 47 | case when (m.measurable_id = 6) then m.measurement else NULL end as time10, 48 | case when (m.measurable_id = 7) then m.measurement else NULL end as time20, 49 | case when (m.measurable_id = 8) then m.measurement else NULL end as time40, 50 | case when (m.measurable_id = 9) then m.measurement else NULL end as bench, 51 | case when (m.measurable_id = 10) then m.measurement else NULL end as vertical, 52 | case when (m.measurable_id = 11) then m.measurement else NULL end as broad, 53 | case when (m.measurable_id = 12) then m.measurement else NULL end as cone3, 54 | case when (m.measurable_id = 13) then m.measurement else NULL end as shuttle20, 55 | case when (m.measurable_id = 14) then m.measurement else NULL end as shuttle60, 56 | case when (m.measurable_id = 15) then m.measurement else NULL end as wonderlic 57 | from t_player p 58 | join t_measurement m 59 | on m.player_id = p.id; 60 | 61 | create view v_best_measurements as 62 | select 63 | id as id, 64 | max(height) as height, 65 | max(weight) as weight, 66 | max(wingspan) as wingspan, 67 | max(arm_length) as arm_length, 68 | max(hand_size) as hand_size, 69 | min(time10) as time10, 70 | min(time20) as time20, 71 | min(time40) as time40, 72 | max(bench) as bench, 73 | max(vertical) as vertical, 74 | max(broad) as broad, 75 | min(cone3) as cone3, 76 | min(shuttle20) as shuttle20, 77 | min(shuttle60) as shuttle60, 78 | max(wonderlic) as wonderlic 79 | from v_individual_measurements 80 | group by id; 81 | 82 | create index i_measurement_player_id on t_measurement(player_id); 83 | create index i_measurement_measurable_id on t_measurement(measurable_id); 84 | create index i_player_canonical_name on t_player(canonical_name); -------------------------------------------------------------------------------- /src/api/client.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import fetch from 'isomorphic-fetch'; 4 | 5 | import type { Api, AddPlayerDetails } from '../types/api'; 6 | import type { PlayerId, PositionId } from '../types/domain'; 7 | import type { UserId, SearchOptions } from '../types/state'; 8 | 9 | const clientApi: Api = { 10 | fetchPlayer: async (id: PlayerId) => 11 | (await fetch(`/api/player?id=${id}`)).json(), 12 | fetchComparisons: async (id: PlayerId, pos: PositionId) => 13 | (await fetch(`/api/comparisons?id=${id}&pos=${pos}`)).json(), 14 | fetchSearchResults: async (opts: SearchOptions, pos: PositionId) => 15 | (await fetch(`/api/search?opts=${JSON.stringify(opts)}&pos=${pos}`)).json(), 16 | fetchTypeAheadResults: async (search: string) => 17 | (await fetch(`/api/typeahead?search=${search}`)).json(), 18 | fetchDistributionStats: async (pos: PositionId) => 19 | (await fetch(`/api/stats?pos=${pos}`)).json(), 20 | fetchMultiplePlayers: async (ids: Array) => 21 | (await fetch(`/api/multiple-players?ids=${JSON.stringify(ids)}`)).json(), 22 | fetchMultiplePercentiles: async (ids: Array, pos: PositionId) => 23 | (await fetch(`/api/multiple-percentiles?ids=${JSON.stringify(ids)}&pos=${pos}`)).json(), 24 | loginUser: async (email: string, password: string) => 25 | (await fetch('/api/login', { 26 | method: 'POST', 27 | headers: { 28 | Accept: 'application/json', 29 | 'Content-Type': 'application/json', 30 | }, 31 | credentials: 'same-origin', 32 | body: JSON.stringify({ 33 | email, 34 | password, 35 | }), 36 | })).json(), 37 | createUser: async (email: string, password: string) => 38 | (await fetch('/api/create-user', { 39 | method: 'POST', 40 | headers: { 41 | Accept: 'application/json', 42 | 'Content-Type': 'application/json', 43 | }, 44 | credentials: 'same-origin', 45 | body: JSON.stringify({ 46 | email, 47 | password, 48 | }), 49 | })).json(), 50 | doesUserExist: async (email: string) => 51 | (await fetch(`/api/does-user-exist?email=${email}`)).json(), 52 | logout: async () => 53 | (await fetch('/api/logout', { 54 | headers: { 55 | Accept: 'application/json', 56 | 'Content-Type': 'application/json', 57 | }, 58 | credentials: 'same-origin', 59 | })).json(), 60 | addPlayer: async (details: AddPlayerDetails) => 61 | (await fetch('/api/add-player', { 62 | method: 'POST', 63 | headers: { 64 | Accept: 'application/json', 65 | 'Content-Type': 'application/json', 66 | }, 67 | credentials: 'same-origin', 68 | body: JSON.stringify(details), 69 | })).json(), 70 | getSchools: async () => (await fetch('/api/get-schools')).json(), 71 | getUserPermissions: async (id: UserId) => 72 | (await fetch(`/api/get-user-permissions?id=${id}`)).json(), 73 | }; 74 | 75 | export default clientApi; 76 | -------------------------------------------------------------------------------- /src/bundles.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /src/client.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import 'babel-polyfill'; 4 | import React from 'react'; 5 | import ReactDOM from 'react-dom'; 6 | import { createStore, applyMiddleware } from 'redux'; 7 | import { Provider } from 'react-redux'; 8 | import { mousetrap, Mousetrap, bindShortcuts } from 'redux-shortcuts'; 9 | import thunk from 'redux-thunk'; 10 | import batcher from './packages/redux-batcher'; 11 | import App from './components/app'; 12 | import reducer from './redux/reducer'; 13 | import clientApi from './api/client'; 14 | import { updateModalType } from './redux/actions'; 15 | import { translateUrl, parseUrl } from './router'; 16 | 17 | const store = createStore( 18 | reducer, 19 | window.INITIAL_STATE, 20 | applyMiddleware(batcher, thunk.withExtraArgument(clientApi)), 21 | ); 22 | 23 | bindShortcuts( 24 | [['s'], () => updateModalType('TypeAhead'), true], 25 | [['esc'], () => updateModalType('None')], 26 | )(store.dispatch); 27 | 28 | mousetrap.stopCallback = (e, element, combo, sequence) => { 29 | if (combo === 'esc') { 30 | return false; 31 | } 32 | return Mousetrap.stopCallback(e, element, combo, sequence); 33 | }; 34 | 35 | window.onpopstate = () => { 36 | const url = parseUrl(`${document.location.pathname}${document.location.search}`); 37 | store.dispatch(translateUrl(url.path, url.args)); 38 | }; 39 | 40 | ReactDOM.render( 41 | , 42 | document.getElementById('react-container'), 43 | ); 44 | -------------------------------------------------------------------------------- /src/components/about-section.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import React from 'react'; 4 | import { connect } from 'react-redux'; 5 | 6 | import Link from './link'; 7 | import type { Player, Position, PositionId } from '../types/domain'; 8 | import type { PlayerPageState } from '../types/state'; 9 | 10 | type Props = { 11 | selectedPlayer: Player, 12 | selectedPositionId: PositionId, 13 | positions: Array, 14 | }; 15 | 16 | const AboutSection = ({ selectedPlayer, selectedPositionId, positions }: Props) => ( 17 |

61 | ); 62 | 63 | export default connect((state: PlayerPageState) => ({ 64 | selectedPlayer: state.players[state.selectedPlayerId], 65 | selectedPositionId: state.selectedPositionId, 66 | positions: state.players[state.selectedPlayerId].positions.all 67 | .map(i => state.positions[i]), 68 | }))(AboutSection); 69 | -------------------------------------------------------------------------------- /src/components/add-player-page.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import React from 'react'; 4 | import { range } from 'lodash'; 5 | import { connect } from 'react-redux'; 6 | import type { Dispatch } from 'redux'; 7 | 8 | import type { State } from '../types/state'; 9 | import type { School, PlayerId } from '../types/domain'; 10 | import api from '../api/client'; 11 | import { selectPlayer, loadSchools } from '../redux/actions'; 12 | import type { AddPlayerDetails } from '../types/api'; 13 | import type { Action } from '../redux/actions'; 14 | 15 | type Props = { 16 | schools: Array; 17 | selectNewPlayer: (PlayerId) => void, 18 | loadSchool: (School) => void, 19 | }; 20 | 21 | class AddPlayerPage extends React.Component { 22 | state: AddPlayerDetails = { 23 | firstName: '', 24 | lastName: '', 25 | draftYear: 2018, 26 | schoolKey: 0, 27 | newSchoolName: null, 28 | }; 29 | 30 | props: Props; 31 | 32 | handleFirstName = (e: SyntheticInputEvent) => { 33 | this.setState({ firstName: e.target.value }); 34 | }; 35 | 36 | handleLastName = (e: SyntheticInputEvent) => { 37 | this.setState({ lastName: e.target.value }); 38 | }; 39 | 40 | handleDraftYear = (e: SyntheticInputEvent) => { 41 | this.setState({ draftYear: Number(e.target.value) }); 42 | }; 43 | 44 | handleSchool = (e: SyntheticInputEvent) => { 45 | this.setState({ schoolKey: Number(e.target.value) }); 46 | }; 47 | 48 | handleNewSchool = (e: SyntheticInputEvent) => { 49 | this.setState({ newSchoolName: e.target.value }); 50 | }; 51 | 52 | handleSubmit = async (e: SyntheticInputEvent) => { 53 | e.preventDefault(); 54 | const details = this.state; 55 | const response = await api.addPlayer(details); 56 | if (response.success) { 57 | await this.props.selectNewPlayer(response.playerId); 58 | } 59 | }; 60 | 61 | render() { 62 | return ( 63 |
64 |
65 |
66 |

Add a Player

67 |
68 |
69 | 70 |
71 | 72 |
73 |
74 |
75 | 76 |
77 | 78 |
79 |
80 |
81 | 82 |
83 | 88 |
89 |
90 |
91 | 92 |
93 | 100 |
101 |
102 | {this.state.schoolKey === -1 && 103 |
104 | 105 |
106 | 107 |
108 |
109 | } 110 | 111 |
112 |
113 |
114 |
115 | ); 116 | } 117 | } 118 | 119 | export default connect( 120 | (state: State) => ({ schools: state.schools }), 121 | (dispatch: Dispatch) => ({ 122 | selectNewPlayer: id => dispatch(selectPlayer(id)), 123 | loadSchool: school => dispatch(loadSchools([school])), 124 | }), 125 | )(AddPlayerPage); 126 | -------------------------------------------------------------------------------- /src/components/app.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import React from 'react'; 4 | import type { Dispatch } from 'redux'; 5 | import { connect } from 'react-redux'; 6 | import type { Action } from '../redux/actions'; 7 | 8 | import Nav from './nav'; 9 | import PositionSelector from './position-selector'; 10 | import Modal from './modal'; 11 | import PlayerPage from './player-page'; 12 | import HomePage from './home-page'; 13 | import SearchPage from './search-page'; 14 | import Typeahead from './typeahead'; 15 | import type { State, ModalType } from '../types/state'; 16 | import { updateModalType, logout as doLogout } from '../redux/actions'; 17 | import EmbededPlayer from './embeded-player'; 18 | import EmbedCode from './embed-code'; 19 | import PositionPage from './position-page'; 20 | import LoginPage from './login-page'; 21 | import AddPlayerPage from './add-player-page'; 22 | 23 | type Props = { 24 | isPlayerPage: boolean, 25 | isSearchPage: boolean, 26 | isHomePage: boolean, 27 | isPositionPage: boolean, 28 | isAddPlayerPage: boolean, 29 | modalType: ModalType, 30 | closeModal: () => void, 31 | openLoginModal: () => void, 32 | logout: () => void, 33 | embed: boolean, 34 | positionName: string, 35 | isUserLoggedIn: boolean, 36 | }; 37 | 38 | export default connect( 39 | (state: State) => ({ 40 | isPlayerPage: state.page === 'PLAYER', 41 | isSearchPage: state.page === 'SEARCH', 42 | isHomePage: state.page === 'HOME', 43 | isPositionPage: state.page === 'POSITION', 44 | isAddPlayerPage: state.page === 'ADD_PLAYER', 45 | embed: state.embed, 46 | modalType: state.modalType, 47 | positionName: state.positions[state.selectedPositionId].plural, 48 | isUserLoggedIn: !!state.loggedInUserId, 49 | }), 50 | (dispatch: Dispatch) => ({ 51 | closeModal: () => dispatch(updateModalType('None')), 52 | openLoginModal: () => dispatch(updateModalType('Login')), 53 | logout: () => dispatch(doLogout()), 54 | }), 55 | )(({ 56 | isPlayerPage, 57 | isSearchPage, 58 | isHomePage, 59 | isAddPlayerPage, 60 | modalType, 61 | closeModal, 62 | openLoginModal, 63 | logout, 64 | embed, 65 | isPositionPage, 66 | positionName, 67 | isUserLoggedIn, 68 | }: Props) => { // eslint-disable-line indent 69 | if (embed) { 70 | return ; 71 | } 72 | let title = 'Select a position'; 73 | if (modalType === 'TypeAhead') { 74 | title = 'Search for a player by name'; 75 | } else if (modalType === 'Embed') { 76 | title = 'Embed this player'; 77 | } else if (modalType === 'Login') { 78 | title = 'Contributor login'; 79 | } 80 | return (
81 | {modalType !== 'None' && ( 82 | 86 | {modalType === 'PositionSelector' && } 87 | {modalType === 'TypeAhead' && } 88 | {modalType === 'Embed' && } 89 | {modalType === 'Login' && } 90 | 91 | )} 92 |