├── .babelrc ├── .eslintignore ├── .eslintrc.json ├── .flowconfig ├── .gitignore ├── .lgtm ├── .stylelintrc ├── .travis.yml ├── LICENSE ├── README.md ├── __mocks__ ├── fileMock.js └── react-addons-css-transition-group.js ├── config ├── webpack.dev.js └── webpack.prod.js ├── documents.json ├── eslintrc.json ├── flow-typed ├── global.js └── npm │ ├── babel-core_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── babel-loader_vx.x.x.js │ ├── babel-plugin-flow-react-proptypes_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-react_vx.x.x.js │ ├── babel-preset-stage-1_vx.x.x.js │ ├── babel-runtime_vx.x.x.js │ ├── classnames_v2.x.x.js │ ├── clean-webpack-plugin_vx.x.x.js │ ├── css-loader_vx.x.x.js │ ├── cssnano_vx.x.x.js │ ├── empty_vx.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── eslint-import-resolver-webpack_vx.x.x.js │ ├── eslint-loader_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 │ ├── extract-text-webpack-plugin_vx.x.x.js │ ├── file-loader_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── flow-coverage-report_vx.x.x.js │ ├── html-webpack-plugin_vx.x.x.js │ ├── http-server_vx.x.x.js │ ├── identity-obj-proxy_vx.x.x.js │ ├── istanbul-instrumenter-loader_vx.x.x.js │ ├── jest_v18.x.x.js │ ├── jest_v19.x.x.js │ ├── json-loader_vx.x.x.js │ ├── lodash_v4.x.x.js │ ├── postcss-cssnext_vx.x.x.js │ ├── postcss-import_vx.x.x.js │ ├── postcss-loader_vx.x.x.js │ ├── postcss-reporter_vx.x.x.js │ ├── react-addons-css-transition-group_v15.x.x.js │ ├── react-addons-test-utils_v15.x.x.js │ ├── react-hot-loader_vx.x.x.js │ ├── react-markdown_vx.x.x.js │ ├── react-redux_v5.x.x.js │ ├── react-redux_vx.x.x.js │ ├── react-router-redux_vx.x.x.js │ ├── react-router_vx.x.x.js │ ├── react-test-renderer_vx.x.x.js │ ├── redux-saga_vx.x.x.js │ ├── redux_v3.x.x.js │ ├── rucksack-css_vx.x.x.js │ ├── style-loader_vx.x.x.js │ ├── stylelint_vx.x.x.js │ ├── superagent_vx.x.x.js │ ├── webpack-dev-server_vx.x.x.js │ ├── webpack-hot-middleware_vx.x.x.js │ ├── webpack-md5-hash_vx.x.x.js │ ├── webpack-s3-plugin_vx.x.x.js │ └── webpack_vx.x.x.js ├── jest.config.json ├── model.png ├── organization.png ├── package.json ├── postcss.config.js ├── resource.png ├── src ├── app │ ├── actions.js │ ├── allSagas.js │ ├── components │ │ ├── App.js │ │ └── app.css │ ├── index.js │ ├── reducers.js │ └── rootReducer.js ├── application │ ├── actions.js │ ├── components │ │ ├── Application.js │ │ ├── Application.test.js │ │ ├── ApplicationHome.js │ │ ├── Enum.js │ │ ├── Header.js │ │ ├── JsonDoc │ │ │ ├── Documentation.js │ │ │ ├── Element.js │ │ │ ├── Element.test.js │ │ │ ├── JsonDoc.js │ │ │ ├── ModelDescription.js │ │ │ ├── ModelDescription.test.js │ │ │ ├── __snapshots__ │ │ │ │ ├── Element.test.js.snap │ │ │ │ └── ModelDescription.test.js.snap │ │ │ ├── defaults.js │ │ │ ├── json-doc.css │ │ │ ├── test-jsondoc-spec-expected.js │ │ │ └── test-jsondoc-spec.json │ │ ├── Model.js │ │ ├── Operation.js │ │ ├── ParameterList.js │ │ ├── ParameterListGroup.js │ │ ├── Request.js │ │ ├── ResourceCard.js │ │ ├── Response.js │ │ ├── __snapshots__ │ │ │ └── Application.test.js.snap │ │ ├── application-home.css │ │ ├── application.css │ │ ├── enum.css │ │ ├── header.css │ │ ├── model.css │ │ ├── operation.css │ │ ├── parameter-list-group.css │ │ ├── parameter-list.css │ │ ├── request.css │ │ ├── resource-card.css │ │ ├── response.css │ │ └── service.js │ ├── index.js │ └── reducers.js ├── components │ ├── Button │ │ ├── button.css │ │ └── index.js │ ├── Content │ │ ├── content.css │ │ └── index.js │ ├── H1 │ │ ├── h1.css │ │ └── index.js │ ├── H2 │ │ ├── h2.css │ │ └── index.js │ ├── H3 │ │ ├── h3.css │ │ └── index.js │ ├── LoadingOverlay │ │ ├── index.js │ │ └── loading-overlay.css │ ├── Markdown │ │ ├── index.js │ │ └── markdown.css │ ├── NavBar │ │ ├── index.js │ │ └── navbar.css │ └── SideBar │ │ ├── index.js │ │ └── sidebar.css ├── documentation │ ├── documentation.css │ ├── index.js │ └── reducers.js ├── exampleService.json ├── favicon.ico ├── generated │ ├── application │ │ └── getByOrgkey.js │ ├── docs │ │ └── getHighLevelDocs.js │ ├── documentation │ │ └── getByRootUrlAndMarkdownPath.js │ ├── organization │ │ ├── getOrganizations.js │ │ ├── getOrganizationsByKey.js │ │ └── index.js │ └── version │ │ ├── ServiceType.js │ │ ├── getByOrgkeyAndApplicationkeyAndVersion.js │ │ ├── getByOrgkeyAndApplicationkeyAndVersion.js.flow │ │ └── index.js ├── home │ ├── HomeCard.js │ ├── home-card.css │ ├── home.css │ └── index.js ├── index.html.ejs ├── index.js ├── organization │ ├── AppCard.js │ ├── app-card.css │ ├── index.js │ ├── organization.css │ ├── reducers.js │ └── sagas.js ├── routes.js ├── store │ └── configureStore.js ├── styles │ ├── global.css │ ├── typography.css │ └── variables.css └── utils.js ├── webpack.config.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "react", 4 | ["es2015", {"modules": false}], 5 | "stage-1" 6 | ], 7 | "plugins": [ 8 | "syntax-flow", 9 | "transform-flow-strip-types", 10 | "flow-react-proptypes" 11 | ], 12 | "env": { 13 | "test": { 14 | "plugins": ["transform-es2015-modules-commonjs"] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /src/components/ -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "airbnb", 4 | "prettier", 5 | "prettier/flowtype", 6 | "prettier/react" 7 | ], 8 | "env": { 9 | "browser": true, 10 | "jest": true 11 | }, 12 | "plugins": ["react", "flowtype"], 13 | "parser": "babel-eslint", 14 | "rules": { 15 | "no-confusing-arrow": "off", 16 | "no-else-return": "off", 17 | "no-underscore-dangle": "off", 18 | "no-duplicate-imports": "off", 19 | "max-len": ["error", 120], 20 | "no-unused-vars": ["error", {"args": "none"}], 21 | "react/jsx-boolean-value": ["error", "always"], 22 | "flowtype/define-flow-type": 1, 23 | "import/no-extraneous-dependencies": ["error", {"devDependencies": true, "optionalDependencies": false, "peerDependencies": false}], 24 | "import/prefer-default-export": "off", 25 | "import/no-dynamic-require": "off", 26 | "import/extensions": "off", 27 | "react/self-closing-comp": "off", 28 | "no-constant-condition": ["error", { "checkLoops": false }], 29 | "react/jsx-filename-extension": "off", 30 | "react/require-default-props": "off", 31 | "jsx-a11y/no-static-element-interactions": 0, 32 | "react/sort-comp": [1, { 33 | "order": [ 34 | "type-annotations", 35 | "lifecycle", 36 | "static-methods", 37 | "everything-else", 38 | "render" 39 | ] 40 | }], 41 | "comma-dangle": ["error", { 42 | "arrays": "always-multiline", 43 | "objects": "always-multiline", 44 | "imports": "always-multiline", 45 | "exports": "always-multiline", 46 | "functions": "ignore" 47 | }], 48 | "global-require": "off" 49 | }, 50 | "settings": { 51 | "import/resolver": { 52 | "webpack": { 53 | "config": "config/webpack.dev.js" 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | # https://flowtype.org/docs/advanced-configuration.html 2 | [version] 3 | 4 | [ignore] 5 | .*/node_modules/jsverify/* 6 | .*/node_modules/fbjs/* 7 | .*/node_modules/react-motion/* 8 | .*/node_modules/systemjs-builder/* 9 | .*/node_modules/stylelint/* 10 | .*/node_modules/flow-coverage-report/* 11 | 12 | [options] 13 | suppress_comment=\\(.\\|\n\\)*\\flow-disable-next-line 14 | module.name_mapper='^.*\.css$' -> 'css-module-flow' 15 | module.system.node.resolve_dirname=lib 16 | module.system.node.resolve_dirname=src 17 | module.system.node.resolve_dirname=node_modules 18 | module.use_strict=true 19 | esproposal.class_instance_fields=enable 20 | esproposal.class_static_fields=enable 21 | unsafe.enable_getters_and_setters=true 22 | 23 | [libs] 24 | /flow-typed/ 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_STORE 2 | node_modules 3 | static 4 | .module-cache 5 | *.log* 6 | dist 7 | coverage* 8 | -------------------------------------------------------------------------------- /.lgtm: -------------------------------------------------------------------------------- 1 | pattern = "(?i):shipit:|:\\+1:|LGTM" -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '7' 4 | script: 5 | - yarn run check 6 | cache: 7 | yarn: true 8 | directories: 9 | - node_modules 10 | env: 11 | secure: RjBy3YX1YFSaN4WZbvLMMnlYkz1WD+Ukenzk3igU6+kLTp4SrVC8yQo4d8rjVDihinJ6N+AllMYegFUrr1TL8WH20baFuJOuxJ9Pq89tbx52HkHkp+Qx0yP/R/6MoynFfYjH6KTTvaGWTRn1bnlFPnzNk0EzXKUEBCCmLAlCmPcaavE82lXTKWAD7E2oukIH1QL/4RisFL7SIIuDZiRtxdcD7aayHNlq2634hUgD78CJAmdGOHnq3QhhHHvtTB4mKJCPoJWp9czs2JJaC6Y1Dk8//L98Uj1OZqwbq1QOdFopufbT0p1MDdskrbQsMA6dm6j49sD6LWSQGwkIJvCOCwiqd1aajBiKlGcBz3EWiY5lrb7KkxspcFN4BKlj7e52VdrDObPsasN5CDbbmMU0eHnH2arxqn4skYTqv1sQ7GYoBNoj4F7j/nTeOqQ0KrkGpbipYryJ+6oIJQWs/FQE99pKudC1kq6B+gxP08AQDiwr4bz5FQLVcF4D9iDPdjU+xw21pV4WdNqkmzw6G1QQufr80gT2YTa+fyBozSHzV51aOTJ1LXL32abZzDUDPfUHARSrFnToyZizqnP1Ghvd0K1QUb2Kf5lMfImSBXVebqIwoTXYrMl+nsEomirN5g4qeoVWZOmn6KUuc/DkJbZx64bvei7qejZJhgxBD6ABUmo= 12 | deploy: 13 | skip_cleanup: true 14 | provider: script 15 | script: yarn run deploy 16 | on: 17 | branch: master 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Movio 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/movio/apidoc-ui.svg?branch=master)](https://travis-ci.org/movio/apidoc-ui) 2 | 3 | # apidoc-ui 4 | A fresh UI built using React + Redux for https://github.com/mbryzek/apidoc 5 | 6 | 7 | ## Preview 8 | 9 | ![APIDOC-UI-org](organization.png) 10 | 11 | ![APIDOC-UI-model](model.png) 12 | 13 | ![APIDOC-UI-resource](resource.png) 14 | 15 | 16 | ## Dev 17 | 18 | UI Dev 19 | 20 | 21 | yarn install 22 | yarn start 23 | http://localhost:8080/ 24 | 25 | yarn test 26 | yarn flow 27 | 28 | Before a Pull Request 29 | 30 | yarn run check 31 | 32 | App 33 | 34 | yarn start 35 | 36 | ## Deploy 37 | Deploy will build and push to S3. You need to have ~/.aws/credentials setup with access to the S3 bucket for this 38 | 39 | yarn deploy 40 | 41 | ## Build Settings 42 | 43 | APIDOC_HOST 44 | - Location of the apidoc api, examples: 45 | - http://somehost.com/api 46 | - /custom-api-route 47 | 48 | PREFIX 49 | - prefix for js and css assets. Defaults to / 50 | - /assets 51 | 52 | TITLE 53 | - The default title is APIDOC, this can be customized for a deployment 54 | - If specified this removes the github icon and link 55 | 56 | 57 | Example: 58 | 59 | > APIDOC_HOST='/my-api' PREFIX='/assets' TITLE='My Company' yarn build 60 | -------------------------------------------------------------------------------- /__mocks__/fileMock.js: -------------------------------------------------------------------------------- 1 | module.exports = 'test-file-stub'; 2 | -------------------------------------------------------------------------------- /__mocks__/react-addons-css-transition-group.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | module.exports = React.createClass({ 4 | render() { return
{this.props.children}
; } 5 | }); 6 | -------------------------------------------------------------------------------- /config/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | const HTMLWebpackPlugin = require('html-webpack-plugin'); 4 | 5 | const ROOT_PATH = path.resolve(__dirname, '..'); 6 | const resolve = p => path.resolve(ROOT_PATH, p); 7 | 8 | module.exports = env => ({ 9 | context: resolve('src'), 10 | 11 | entry: [ 12 | 'react-hot-loader/patch', 13 | 'webpack-dev-server/client?http://localhost:8080', 14 | 'webpack/hot/only-dev-server', 15 | 'babel-polyfill', 16 | './index.js', 17 | ], 18 | 19 | devtool: 'cheap-module-eval-source-map', 20 | 21 | output: { 22 | publicPath: '/', 23 | path: resolve('dist/dev'), 24 | filename: 'bundle.js', 25 | }, 26 | 27 | module: { 28 | rules: [ 29 | { 30 | test: /\.(js|jsx)$/, 31 | exclude: /node_modules/, 32 | use: [ 33 | { 34 | loader: 'babel-loader', 35 | options: { 36 | cacheDirectory: true, 37 | }, 38 | }, 39 | ], 40 | }, 41 | { 42 | test: /\.css$/, 43 | include: [resolve('src')], 44 | use: [ 45 | { loader: 'style-loader' }, 46 | { 47 | loader: 'css-loader', 48 | options: { 49 | sourceMap: true, 50 | minimize: false, 51 | camelCase: true, 52 | modules: true, 53 | importLoaders: 1, 54 | localIdentName: '[name]__[local]--[hash:base64:5]', 55 | }, 56 | }, 57 | { loader: 'postcss-loader' }, 58 | ], 59 | }, 60 | { 61 | test: /\.svg$/, 62 | use: ['svg-url-loader'], 63 | }, 64 | { 65 | test: /\.png$/, 66 | use: [ 67 | { 68 | loader: 'url-loader', 69 | options: { 70 | mimetype: 'image/png', 71 | }, 72 | }, 73 | ], 74 | }, 75 | { 76 | test: /\.woff$/, 77 | use: [ 78 | { 79 | loader: 'url-loader', 80 | options: { 81 | limit: 65000, 82 | mimetype: 'application/font-woff', 83 | name: 'fonts/[name].[ext]', 84 | }, 85 | }, 86 | ], 87 | }, 88 | { 89 | test: /\.woff2$/, 90 | use: [ 91 | { 92 | loader: 'url-loader', 93 | options: { 94 | limit: 65000, 95 | mimetype: 'application/font-woff2', 96 | name: 'fonts/[name].[ext]', 97 | }, 98 | }, 99 | ], 100 | }, 101 | { 102 | test: /\.[ot]tf$/, 103 | use: [ 104 | { 105 | loader: 'url-loader', 106 | options: { 107 | limit: 65000, 108 | mimetype: 'application/octet-stream', 109 | name: 'fonts/[name].[ext]', 110 | }, 111 | }, 112 | ], 113 | }, 114 | { 115 | test: /\.eot$/, 116 | use: [ 117 | { 118 | loader: 'url-loader', 119 | options: { 120 | limit: 65000, 121 | mimetype: 'application/vnd.ms-fontobject', 122 | name: 'fonts/[name].[ext]', 123 | }, 124 | }, 125 | ], 126 | }, 127 | ], 128 | }, 129 | 130 | resolve: { 131 | modules: [resolve('src'), resolve('node_modules')], 132 | }, 133 | 134 | plugins: [ 135 | new webpack.NoEmitOnErrorsPlugin(), 136 | new webpack.HotModuleReplacementPlugin(), 137 | new webpack.NamedModulesPlugin(), 138 | new HTMLWebpackPlugin({ 139 | inject: true, 140 | template: path.resolve(ROOT_PATH, 'src/index.html.ejs'), 141 | showErrors: true, 142 | title: process.env.TITLE ? process.env.TITLE : 'APIDOC', 143 | }), 144 | new webpack.DefinePlugin({ 145 | 'process.env': { 146 | APIDOC_HOST: '"/api"', 147 | TITLE: JSON.stringify(process.env.TITLE), 148 | }, 149 | }), 150 | ], 151 | 152 | devServer: { 153 | stats: 'minimal', 154 | hot: true, 155 | publicPath: '/', 156 | port: 8080, 157 | host: 'localhost', 158 | historyApiFallback: true, 159 | noInfo: false, 160 | proxy: { 161 | '/api': { 162 | changeOrigin: true, 163 | target: 'http://api.apibuilder.io', 164 | pathRewrite: { '^/api': '' }, 165 | }, 166 | }, 167 | }, 168 | }); 169 | -------------------------------------------------------------------------------- /documents.json: -------------------------------------------------------------------------------- 1 | { 2 | "organizations": { 3 | "movio.cinema": { 4 | "documents": [{ 5 | "name": "Document 1", 6 | "rootUrl": "http://localhost/doc1/", 7 | "markdownPath": "README.md" 8 | }] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb", 3 | "env": { 4 | "browser": true, 5 | "jest": true 6 | }, 7 | "globals": { 8 | "__DEV__": false 9 | }, 10 | "plugins": ["react", "flowtype"], 11 | "parser": "babel-eslint", 12 | "rules": { 13 | "no-confusing-arrow": "off", 14 | "no-else-return": "off", 15 | "no-underscore-dangle": "off", 16 | "no-duplicate-imports": "off", 17 | "max-len": ["error", 120], 18 | "no-unused-vars": ["error", {"args": "none"}], 19 | "react/jsx-boolean-value": ["error", "always"], 20 | "flowtype/define-flow-type": 1, 21 | "import/no-extraneous-dependencies": [ 22 | "error", { 23 | "devDependencies": true, 24 | "optionalDependencies": false, 25 | "peerDependencies": false 26 | } 27 | ], 28 | "import/prefer-default-export": "off", 29 | "import/no-dynamic-require": "off", 30 | "import/extensions": "off", 31 | "react/self-closing-comp": "off", 32 | "no-constant-condition": ["error", { "checkLoops": false }], 33 | "react/jsx-filename-extension": "off", 34 | "react/require-default-props": "off", 35 | "jsx-a11y/no-static-element-interactions": 0, 36 | "react/sort-comp": [1, { 37 | "order": [ 38 | "type-annotations", 39 | "lifecycle", 40 | "static-methods", 41 | "everything-else", 42 | "render" 43 | ] 44 | }], 45 | "comma-dangle": ["error", { 46 | "arrays": "always-multiline", 47 | "objects": "always-multiline", 48 | "imports": "always-multiline", 49 | "exports": "always-multiline", 50 | "functions": "ignore" 51 | }], 52 | "global-require": "off" 53 | }, 54 | "settings": { 55 | "import/resolver": { 56 | "webpack": { 57 | "config": "config/webpack.dev.js" 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /flow-typed/global.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | // Put global manual declarations here 4 | 5 | // For hot module loading - configureStore 6 | declare var module: { 7 | hot: { 8 | accept(path: ?string) : void; 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 22e5660f6ace1e8a35df70bd5fa9b751 2 | // flow-typed version: <>/babel-eslint_v^7.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-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e29f857cbe719bd33494c101d3b55cd1 2 | // flow-typed version: <>/babel-jest_v^19.0.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-jest' 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-jest' { 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-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-jest/build/index.js' { 31 | declare module.exports: $Exports<'babel-jest/build/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fe859f6659e9d11774ff45bf751d796d 2 | // flow-typed version: <>/babel-loader_v^6.4.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-loader' 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-loader' { 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-loader/lib/fs-cache' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-loader/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-loader/lib/resolve-rc' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-loader/lib/utils/exists' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-loader/lib/utils/read' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-loader/lib/utils/relative' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-loader/lib/fs-cache.js' { 51 | declare module.exports: $Exports<'babel-loader/lib/fs-cache'>; 52 | } 53 | declare module 'babel-loader/lib/index.js' { 54 | declare module.exports: $Exports<'babel-loader/lib/index'>; 55 | } 56 | declare module 'babel-loader/lib/resolve-rc.js' { 57 | declare module.exports: $Exports<'babel-loader/lib/resolve-rc'>; 58 | } 59 | declare module 'babel-loader/lib/utils/exists.js' { 60 | declare module.exports: $Exports<'babel-loader/lib/utils/exists'>; 61 | } 62 | declare module 'babel-loader/lib/utils/read.js' { 63 | declare module.exports: $Exports<'babel-loader/lib/utils/read'>; 64 | } 65 | declare module 'babel-loader/lib/utils/relative.js' { 66 | declare module.exports: $Exports<'babel-loader/lib/utils/relative'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-flow-react-proptypes_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fed6e02230484e52be17ed1543c17a8e 2 | // flow-typed version: <>/babel-plugin-flow-react-proptypes_v^0.21.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-flow-react-proptypes' 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-flow-react-proptypes' { 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-flow-react-proptypes/lib/convertToPropTypes' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-flow-react-proptypes/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-plugin-flow-react-proptypes/lib/makePropTypesAst' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-plugin-flow-react-proptypes/lib/util' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'babel-plugin-flow-react-proptypes/lib/convertToPropTypes.js' { 43 | declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/convertToPropTypes'>; 44 | } 45 | declare module 'babel-plugin-flow-react-proptypes/lib/index.js' { 46 | declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/index'>; 47 | } 48 | declare module 'babel-plugin-flow-react-proptypes/lib/makePropTypesAst.js' { 49 | declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/makePropTypesAst'>; 50 | } 51 | declare module 'babel-plugin-flow-react-proptypes/lib/util.js' { 52 | declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/util'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 76a02125146cb48c4078050ec70abf62 2 | // flow-typed version: <>/babel-plugin-transform-flow-strip-types_v^6.22.0/flow_v0.41.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: 678cc58163c53b800f837a7cb3c7ce77 2 | // flow-typed version: <>/babel-polyfill_v^6.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: 073413068432a6420c7d101834ba49e7 2 | // flow-typed version: <>/babel-preset-es2015_v^6.24.0/flow_v0.41.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-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0ef3794c33e23f232524dd1db663afa3 2 | // flow-typed version: <>/babel-preset-react_v^6.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-1_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 45cdf5fce1f463f67849a6c316586249 2 | // flow-typed version: <>/babel-preset-stage-1_v^6.22.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-stage-1' 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-1' { 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-1/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-stage-1/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-stage-1/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/classnames_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: cf6332fcf9a3398cffb131f7da90662b 2 | // flow-typed version: dc0ded3d57/classnames_v2.x.x/flow_>=v0.28.x 3 | 4 | type $npm$classnames$Classes = 5 | string | 6 | {[className: string]: ?boolean } | 7 | Array | 8 | false | 9 | void | 10 | null 11 | 12 | declare module 'classnames' { 13 | declare function exports( 14 | ...classes: Array<$npm$classnames$Classes> 15 | ): string; 16 | } 17 | -------------------------------------------------------------------------------- /flow-typed/npm/clean-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: dca29d51490cce0e92eec96583affa41 2 | // flow-typed version: <>/clean-webpack-plugin_v^0.1.15/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'clean-webpack-plugin' 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 'clean-webpack-plugin' { 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 'clean-webpack-plugin/index' { 29 | declare module.exports: $Exports<'clean-webpack-plugin'>; 30 | } 31 | declare module 'clean-webpack-plugin/index.js' { 32 | declare module.exports: $Exports<'clean-webpack-plugin'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/css-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2ca9dbe1757c10d4927a5eda42eefa7b 2 | // flow-typed version: <>/css-loader_v^0.27.3/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'css-loader' 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 'css-loader' { 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 'css-loader/lib/compile-exports' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'css-loader/lib/css-base' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'css-loader/lib/getImportPrefix' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'css-loader/lib/getLocalIdent' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'css-loader/lib/loader' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'css-loader/lib/localsLoader' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'css-loader/lib/processCss' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'css-loader/locals' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'css-loader/index' { 59 | declare module.exports: $Exports<'css-loader'>; 60 | } 61 | declare module 'css-loader/index.js' { 62 | declare module.exports: $Exports<'css-loader'>; 63 | } 64 | declare module 'css-loader/lib/compile-exports.js' { 65 | declare module.exports: $Exports<'css-loader/lib/compile-exports'>; 66 | } 67 | declare module 'css-loader/lib/css-base.js' { 68 | declare module.exports: $Exports<'css-loader/lib/css-base'>; 69 | } 70 | declare module 'css-loader/lib/getImportPrefix.js' { 71 | declare module.exports: $Exports<'css-loader/lib/getImportPrefix'>; 72 | } 73 | declare module 'css-loader/lib/getLocalIdent.js' { 74 | declare module.exports: $Exports<'css-loader/lib/getLocalIdent'>; 75 | } 76 | declare module 'css-loader/lib/loader.js' { 77 | declare module.exports: $Exports<'css-loader/lib/loader'>; 78 | } 79 | declare module 'css-loader/lib/localsLoader.js' { 80 | declare module.exports: $Exports<'css-loader/lib/localsLoader'>; 81 | } 82 | declare module 'css-loader/lib/processCss.js' { 83 | declare module.exports: $Exports<'css-loader/lib/processCss'>; 84 | } 85 | declare module 'css-loader/locals.js' { 86 | declare module.exports: $Exports<'css-loader/locals'>; 87 | } 88 | -------------------------------------------------------------------------------- /flow-typed/npm/cssnano_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b489227e84772193e06ee230eb2f96ba 2 | // flow-typed version: <>/cssnano_v^3.9.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'cssnano' 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 'cssnano' { 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 'cssnano/dist/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'cssnano/dist/lib/core' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'cssnano/dist/lib/evenValues' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'cssnano/dist/lib/filterOptimiser' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'cssnano/dist/lib/functionOptimiser' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'cssnano/dist/lib/getArguments' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'cssnano/dist/lib/getMatch' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'cssnano/dist/lib/normalizeString' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'cssnano/dist/lib/normalizeUnicode' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'cssnano/dist/lib/reduceBackgroundRepeat' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'cssnano/dist/lib/reduceDisplayValues' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'cssnano/dist/lib/reducePositions' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'cssnano/dist/lib/reduceTimingFunctions' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'cssnano/dist/lib/styleCache' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'cssnano/quickstart' { 82 | declare module.exports: any; 83 | } 84 | 85 | // Filename aliases 86 | declare module 'cssnano/dist/index.js' { 87 | declare module.exports: $Exports<'cssnano/dist/index'>; 88 | } 89 | declare module 'cssnano/dist/lib/core.js' { 90 | declare module.exports: $Exports<'cssnano/dist/lib/core'>; 91 | } 92 | declare module 'cssnano/dist/lib/evenValues.js' { 93 | declare module.exports: $Exports<'cssnano/dist/lib/evenValues'>; 94 | } 95 | declare module 'cssnano/dist/lib/filterOptimiser.js' { 96 | declare module.exports: $Exports<'cssnano/dist/lib/filterOptimiser'>; 97 | } 98 | declare module 'cssnano/dist/lib/functionOptimiser.js' { 99 | declare module.exports: $Exports<'cssnano/dist/lib/functionOptimiser'>; 100 | } 101 | declare module 'cssnano/dist/lib/getArguments.js' { 102 | declare module.exports: $Exports<'cssnano/dist/lib/getArguments'>; 103 | } 104 | declare module 'cssnano/dist/lib/getMatch.js' { 105 | declare module.exports: $Exports<'cssnano/dist/lib/getMatch'>; 106 | } 107 | declare module 'cssnano/dist/lib/normalizeString.js' { 108 | declare module.exports: $Exports<'cssnano/dist/lib/normalizeString'>; 109 | } 110 | declare module 'cssnano/dist/lib/normalizeUnicode.js' { 111 | declare module.exports: $Exports<'cssnano/dist/lib/normalizeUnicode'>; 112 | } 113 | declare module 'cssnano/dist/lib/reduceBackgroundRepeat.js' { 114 | declare module.exports: $Exports<'cssnano/dist/lib/reduceBackgroundRepeat'>; 115 | } 116 | declare module 'cssnano/dist/lib/reduceDisplayValues.js' { 117 | declare module.exports: $Exports<'cssnano/dist/lib/reduceDisplayValues'>; 118 | } 119 | declare module 'cssnano/dist/lib/reducePositions.js' { 120 | declare module.exports: $Exports<'cssnano/dist/lib/reducePositions'>; 121 | } 122 | declare module 'cssnano/dist/lib/reduceTimingFunctions.js' { 123 | declare module.exports: $Exports<'cssnano/dist/lib/reduceTimingFunctions'>; 124 | } 125 | declare module 'cssnano/dist/lib/styleCache.js' { 126 | declare module.exports: $Exports<'cssnano/dist/lib/styleCache'>; 127 | } 128 | declare module 'cssnano/quickstart.js' { 129 | declare module.exports: $Exports<'cssnano/quickstart'>; 130 | } 131 | -------------------------------------------------------------------------------- /flow-typed/npm/empty_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5e29258715e906efbc89df80a0008d2e 2 | // flow-typed version: <>/empty_v^0.10.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'empty' 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 'empty' { 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 'empty/array' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'empty/function' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'empty/functionThatReturns' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'empty/functionThatReturnsArgument' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'empty/functionThatReturnsFalse' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'empty/functionThatReturnsNull' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'empty/functionThatReturnsThis' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'empty/functionThatReturnsTrue' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'empty/object' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'empty/array.js' { 63 | declare module.exports: $Exports<'empty/array'>; 64 | } 65 | declare module 'empty/function.js' { 66 | declare module.exports: $Exports<'empty/function'>; 67 | } 68 | declare module 'empty/functionThatReturns.js' { 69 | declare module.exports: $Exports<'empty/functionThatReturns'>; 70 | } 71 | declare module 'empty/functionThatReturnsArgument.js' { 72 | declare module.exports: $Exports<'empty/functionThatReturnsArgument'>; 73 | } 74 | declare module 'empty/functionThatReturnsFalse.js' { 75 | declare module.exports: $Exports<'empty/functionThatReturnsFalse'>; 76 | } 77 | declare module 'empty/functionThatReturnsNull.js' { 78 | declare module.exports: $Exports<'empty/functionThatReturnsNull'>; 79 | } 80 | declare module 'empty/functionThatReturnsThis.js' { 81 | declare module.exports: $Exports<'empty/functionThatReturnsThis'>; 82 | } 83 | declare module 'empty/functionThatReturnsTrue.js' { 84 | declare module.exports: $Exports<'empty/functionThatReturnsTrue'>; 85 | } 86 | declare module 'empty/index' { 87 | declare module.exports: $Exports<'empty'>; 88 | } 89 | declare module 'empty/index.js' { 90 | declare module.exports: $Exports<'empty'>; 91 | } 92 | declare module 'empty/object.js' { 93 | declare module.exports: $Exports<'empty/object'>; 94 | } 95 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4f2712fff62a567e98d5b63ebaaf1d17 2 | // flow-typed version: <>/eslint-config-airbnb_v^14.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/eslint-import-resolver-webpack_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e384225c37c5c77b4f7f250556716232 2 | // flow-typed version: <>/eslint-import-resolver-webpack_v^0.8.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-import-resolver-webpack' 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-import-resolver-webpack' { 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-import-resolver-webpack/config' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'eslint-import-resolver-webpack/config.js' { 31 | declare module.exports: $Exports<'eslint-import-resolver-webpack/config'>; 32 | } 33 | declare module 'eslint-import-resolver-webpack/index' { 34 | declare module.exports: $Exports<'eslint-import-resolver-webpack'>; 35 | } 36 | declare module 'eslint-import-resolver-webpack/index.js' { 37 | declare module.exports: $Exports<'eslint-import-resolver-webpack'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5b7b0694458d19231171a56fb2a905dc 2 | // flow-typed version: <>/eslint-loader_v^1.6.3/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-loader' 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-loader' { 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 'eslint-loader/index' { 29 | declare module.exports: $Exports<'eslint-loader'>; 30 | } 31 | declare module 'eslint-loader/index.js' { 32 | declare module.exports: $Exports<'eslint-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6b304c30320d6fa4bdfdfe8cc560cfd2 2 | // flow-typed version: <>/extract-text-webpack-plugin_v^2.1.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'extract-text-webpack-plugin' 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 'extract-text-webpack-plugin' { 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 'extract-text-webpack-plugin/ExtractedModule' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'extract-text-webpack-plugin/loader' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'extract-text-webpack-plugin/OrderUndefinedError' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'extract-text-webpack-plugin/schema/loader-schema' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'extract-text-webpack-plugin/schema/validator' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'extract-text-webpack-plugin/ExtractedModule.js' { 47 | declare module.exports: $Exports<'extract-text-webpack-plugin/ExtractedModule'>; 48 | } 49 | declare module 'extract-text-webpack-plugin/index' { 50 | declare module.exports: $Exports<'extract-text-webpack-plugin'>; 51 | } 52 | declare module 'extract-text-webpack-plugin/index.js' { 53 | declare module.exports: $Exports<'extract-text-webpack-plugin'>; 54 | } 55 | declare module 'extract-text-webpack-plugin/loader.js' { 56 | declare module.exports: $Exports<'extract-text-webpack-plugin/loader'>; 57 | } 58 | declare module 'extract-text-webpack-plugin/OrderUndefinedError.js' { 59 | declare module.exports: $Exports<'extract-text-webpack-plugin/OrderUndefinedError'>; 60 | } 61 | declare module 'extract-text-webpack-plugin/schema/loader-schema.js' { 62 | declare module.exports: $Exports<'extract-text-webpack-plugin/schema/loader-schema'>; 63 | } 64 | declare module 'extract-text-webpack-plugin/schema/validator.js' { 65 | declare module.exports: $Exports<'extract-text-webpack-plugin/schema/validator'>; 66 | } 67 | -------------------------------------------------------------------------------- /flow-typed/npm/file-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: cd0c9c71bc1bc2ee3748f15bc3041280 2 | // flow-typed version: <>/file-loader_v^0.10.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'file-loader' 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 'file-loader' { 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 'file-loader/index' { 29 | declare module.exports: $Exports<'file-loader'>; 30 | } 31 | declare module 'file-loader/index.js' { 32 | declare module.exports: $Exports<'file-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/html-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: eacd3c6e4b0dfcbba2ecf9002206916f 2 | // flow-typed version: <>/html-webpack-plugin_v^2.28.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'html-webpack-plugin' 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 'html-webpack-plugin' { 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 'html-webpack-plugin/lib/chunksorter' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'html-webpack-plugin/lib/compiler' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'html-webpack-plugin/lib/errors' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'html-webpack-plugin/lib/loader' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'html-webpack-plugin/index' { 43 | declare module.exports: $Exports<'html-webpack-plugin'>; 44 | } 45 | declare module 'html-webpack-plugin/index.js' { 46 | declare module.exports: $Exports<'html-webpack-plugin'>; 47 | } 48 | declare module 'html-webpack-plugin/lib/chunksorter.js' { 49 | declare module.exports: $Exports<'html-webpack-plugin/lib/chunksorter'>; 50 | } 51 | declare module 'html-webpack-plugin/lib/compiler.js' { 52 | declare module.exports: $Exports<'html-webpack-plugin/lib/compiler'>; 53 | } 54 | declare module 'html-webpack-plugin/lib/errors.js' { 55 | declare module.exports: $Exports<'html-webpack-plugin/lib/errors'>; 56 | } 57 | declare module 'html-webpack-plugin/lib/loader.js' { 58 | declare module.exports: $Exports<'html-webpack-plugin/lib/loader'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/http-server_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ff077834cd0a0c00c9b37b1adf8774c4 2 | // flow-typed version: <>/http-server_v^0.9.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'http-server' 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 'http-server' { 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 'http-server/lib/http-server' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'http-server/test/http-server-test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'http-server/lib/http-server.js' { 35 | declare module.exports: $Exports<'http-server/lib/http-server'>; 36 | } 37 | declare module 'http-server/test/http-server-test.js' { 38 | declare module.exports: $Exports<'http-server/test/http-server-test'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/istanbul-instrumenter-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8b54150dfd323fb9653d0f8d4cfa620b 2 | // flow-typed version: <>/istanbul-instrumenter-loader_v^2.0.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'istanbul-instrumenter-loader' 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 'istanbul-instrumenter-loader' { 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 'istanbul-instrumenter-loader/index' { 29 | declare module.exports: $Exports<'istanbul-instrumenter-loader'>; 30 | } 31 | declare module 'istanbul-instrumenter-loader/index.js' { 32 | declare module.exports: $Exports<'istanbul-instrumenter-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/json-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f614c51644c37d42d8d3c102d31dde3a 2 | // flow-typed version: <>/json-loader_v^0.5.4/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'json-loader' 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 'json-loader' { 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 'json-loader/index' { 29 | declare module.exports: $Exports<'json-loader'>; 30 | } 31 | declare module 'json-loader/index.js' { 32 | declare module.exports: $Exports<'json-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/postcss-cssnext_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7868771568d8bcb837522c2219b0e344 2 | // flow-typed version: <>/postcss-cssnext_v^2.9.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'postcss-cssnext' 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 'postcss-cssnext' { 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 'postcss-cssnext/lib/features-activation-map' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'postcss-cssnext/lib/features' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'postcss-cssnext/lib/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'postcss-cssnext/lib/warn-for-duplicates' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'postcss-cssnext/src/features-activation-map' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'postcss-cssnext/src/features' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'postcss-cssnext/src/index' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'postcss-cssnext/src/warn-for-duplicates' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'postcss-cssnext/lib/features-activation-map.js' { 59 | declare module.exports: $Exports<'postcss-cssnext/lib/features-activation-map'>; 60 | } 61 | declare module 'postcss-cssnext/lib/features.js' { 62 | declare module.exports: $Exports<'postcss-cssnext/lib/features'>; 63 | } 64 | declare module 'postcss-cssnext/lib/index.js' { 65 | declare module.exports: $Exports<'postcss-cssnext/lib/index'>; 66 | } 67 | declare module 'postcss-cssnext/lib/warn-for-duplicates.js' { 68 | declare module.exports: $Exports<'postcss-cssnext/lib/warn-for-duplicates'>; 69 | } 70 | declare module 'postcss-cssnext/src/features-activation-map.js' { 71 | declare module.exports: $Exports<'postcss-cssnext/src/features-activation-map'>; 72 | } 73 | declare module 'postcss-cssnext/src/features.js' { 74 | declare module.exports: $Exports<'postcss-cssnext/src/features'>; 75 | } 76 | declare module 'postcss-cssnext/src/index.js' { 77 | declare module.exports: $Exports<'postcss-cssnext/src/index'>; 78 | } 79 | declare module 'postcss-cssnext/src/warn-for-duplicates.js' { 80 | declare module.exports: $Exports<'postcss-cssnext/src/warn-for-duplicates'>; 81 | } 82 | -------------------------------------------------------------------------------- /flow-typed/npm/postcss-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 58058147516c325acfb73058ae6fb9f5 2 | // flow-typed version: <>/postcss-import_v^9.1.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'postcss-import' 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 'postcss-import' { 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 'postcss-import/lib/join-media' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'postcss-import/lib/load-content' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'postcss-import/lib/parse-statements' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'postcss-import/lib/process-content' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'postcss-import/lib/resolve-id' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'postcss-import/index' { 47 | declare module.exports: $Exports<'postcss-import'>; 48 | } 49 | declare module 'postcss-import/index.js' { 50 | declare module.exports: $Exports<'postcss-import'>; 51 | } 52 | declare module 'postcss-import/lib/join-media.js' { 53 | declare module.exports: $Exports<'postcss-import/lib/join-media'>; 54 | } 55 | declare module 'postcss-import/lib/load-content.js' { 56 | declare module.exports: $Exports<'postcss-import/lib/load-content'>; 57 | } 58 | declare module 'postcss-import/lib/parse-statements.js' { 59 | declare module.exports: $Exports<'postcss-import/lib/parse-statements'>; 60 | } 61 | declare module 'postcss-import/lib/process-content.js' { 62 | declare module.exports: $Exports<'postcss-import/lib/process-content'>; 63 | } 64 | declare module 'postcss-import/lib/resolve-id.js' { 65 | declare module.exports: $Exports<'postcss-import/lib/resolve-id'>; 66 | } 67 | -------------------------------------------------------------------------------- /flow-typed/npm/postcss-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 603a44cd7d8deb9ad7bf0db7a2aa286c 2 | // flow-typed version: <>/postcss-loader_v^1.3.3/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'postcss-loader' 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 'postcss-loader' { 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 'postcss-loader/error' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'postcss-loader/error.js' { 31 | declare module.exports: $Exports<'postcss-loader/error'>; 32 | } 33 | declare module 'postcss-loader/index' { 34 | declare module.exports: $Exports<'postcss-loader'>; 35 | } 36 | declare module 'postcss-loader/index.js' { 37 | declare module.exports: $Exports<'postcss-loader'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/postcss-reporter_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e489f67e68af29c5308ca7d9227f438e 2 | // flow-typed version: <>/postcss-reporter_v^3.0.0/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'postcss-reporter' 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 'postcss-reporter' { 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 'postcss-reporter/lib/formatter' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'postcss-reporter/lib/reporter' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'postcss-reporter/lib/util' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'postcss-reporter/index' { 39 | declare module.exports: $Exports<'postcss-reporter'>; 40 | } 41 | declare module 'postcss-reporter/index.js' { 42 | declare module.exports: $Exports<'postcss-reporter'>; 43 | } 44 | declare module 'postcss-reporter/lib/formatter.js' { 45 | declare module.exports: $Exports<'postcss-reporter/lib/formatter'>; 46 | } 47 | declare module 'postcss-reporter/lib/reporter.js' { 48 | declare module.exports: $Exports<'postcss-reporter/lib/reporter'>; 49 | } 50 | declare module 'postcss-reporter/lib/util.js' { 51 | declare module.exports: $Exports<'postcss-reporter/lib/util'>; 52 | } 53 | -------------------------------------------------------------------------------- /flow-typed/npm/react-addons-css-transition-group_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fe7abf92d2b0a6cb8907b2ea573c8586 2 | // flow-typed version: e06e1b48c4/react-addons-css-transition-group_v15.x.x/flow_>=v0.26.x 3 | 4 | declare module 'react-addons-css-transition-group' { 5 | declare type ReactCSSTransitionGroupNames = { 6 | enter: string, 7 | enterActive?: string, 8 | leave: string, 9 | leaveActive?: string, 10 | appear: string, 11 | appearActive?: string 12 | }; 13 | declare type Props = { 14 | transitionName: string | ReactCSSTransitionGroupNames, 15 | transitionAppear?: boolean, 16 | transitionEnter?: boolean, 17 | transitionLeave?: boolean, 18 | transitionAppearTimeout?: number, 19 | transitionEnterTimeout?: number, 20 | transitionLeaveTimeout?: number, 21 | }; 22 | declare type DefaultProps = { 23 | transitionAppear: boolean, 24 | transitionEnter: boolean, 25 | transitionLeave: boolean, 26 | } 27 | declare class ReactCSSTransitionGroup extends React$Component { 28 | props: Props; 29 | static defaultProps: DefaultProps; 30 | } 31 | declare module.exports: Class; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/react-addons-test-utils_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 323fcc1a3353d5f7a36c5f1edcd963ef 2 | // flow-typed version: 41f45a7d8c/react-addons-test-utils_v15.x.x/flow_>=v0.23.x 3 | 4 | declare type ReactAddonTest$FunctionOrComponentClass = React$Component | Function; 5 | declare module 'react-addons-test-utils' { 6 | declare var Simulate: { 7 | [eventName: string]: (element: Element, eventData?: Object) => void; 8 | }; 9 | declare function renderIntoDocument(instance: React$Element): React$Component; 10 | declare function mockComponent(componentClass: ReactAddonTest$FunctionOrComponentClass, mockTagName?: string): Object; 11 | declare function isElement(element: React$Element): boolean; 12 | declare function isElementOfType(element: React$Element, componentClass: ReactAddonTest$FunctionOrComponentClass): boolean; 13 | declare function isDOMComponent(instance: React$Component): boolean; 14 | declare function isCompositeComponent(instance: React$Component): boolean; 15 | declare function isCompositeComponentWithType(instance: React$Component, componentClass: ReactAddonTest$FunctionOrComponentClass): boolean; 16 | declare function findAllInRenderedTree(tree: React$Component, test: (child: React$Component) => boolean): Array>; 17 | declare function scryRenderedDOMComponentsWithClass(tree: React$Component, className: string): Array; 18 | declare function findRenderedDOMComponentWithClass(tree: React$Component, className: string): ?Element; 19 | declare function scryRenderedDOMComponentsWithTag(tree: React$Component, tagName: string): Array; 20 | declare function findRenderedDOMComponentWithTag(tree: React$Component, tagName: string): ?Element; 21 | declare function scryRenderedComponentsWithType(tree: React$Component, componentClass: ReactAddonTest$FunctionOrComponentClass): Array>; 22 | declare function findRenderedComponentWithType(tree: React$Component, componentClass: ReactAddonTest$FunctionOrComponentClass): ?React$Component; 23 | declare class ReactShallowRender { 24 | render(element: React$Element): void; 25 | getRenderOutput(): React$Element; 26 | } 27 | declare function createRenderer(): ReactShallowRender; 28 | } 29 | -------------------------------------------------------------------------------- /flow-typed/npm/react-hot-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ba5914948d72e22a3ef01c19512914d3 2 | // flow-typed version: <>/react-hot-loader_v^1.3.1/flow_v0.39.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-hot-loader' 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 'react-hot-loader' { 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 'react-hot-loader/getRootInstancesFromReactMount' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-hot-loader/Injection' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-hot-loader/isReactClassish' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-hot-loader/isReactElementish' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-hot-loader/makeExportsHot' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-hot-loader/makeIdentitySourceMap' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-hot-loader/RootInstanceProvider' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'react-hot-loader/getRootInstancesFromReactMount.js' { 55 | declare module.exports: $Exports<'react-hot-loader/getRootInstancesFromReactMount'>; 56 | } 57 | declare module 'react-hot-loader/index' { 58 | declare module.exports: $Exports<'react-hot-loader'>; 59 | } 60 | declare module 'react-hot-loader/index.js' { 61 | declare module.exports: $Exports<'react-hot-loader'>; 62 | } 63 | declare module 'react-hot-loader/Injection.js' { 64 | declare module.exports: $Exports<'react-hot-loader/Injection'>; 65 | } 66 | declare module 'react-hot-loader/isReactClassish.js' { 67 | declare module.exports: $Exports<'react-hot-loader/isReactClassish'>; 68 | } 69 | declare module 'react-hot-loader/isReactElementish.js' { 70 | declare module.exports: $Exports<'react-hot-loader/isReactElementish'>; 71 | } 72 | declare module 'react-hot-loader/makeExportsHot.js' { 73 | declare module.exports: $Exports<'react-hot-loader/makeExportsHot'>; 74 | } 75 | declare module 'react-hot-loader/makeIdentitySourceMap.js' { 76 | declare module.exports: $Exports<'react-hot-loader/makeIdentitySourceMap'>; 77 | } 78 | declare module 'react-hot-loader/RootInstanceProvider.js' { 79 | declare module.exports: $Exports<'react-hot-loader/RootInstanceProvider'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/react-markdown_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5d7ad4649eec7bbcab60d29a247a2819 2 | // flow-typed version: <>/react-markdown_v^2.4.5/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-markdown' 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 'react-markdown' { 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 'react-markdown/demo/dist/js/codemirror' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-markdown/demo/dist/js/demo' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-markdown/demo/src/code-block' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-markdown/demo/src/demo' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-markdown/demo/src/editor' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-markdown/demo/src/markdown-controls' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-markdown/src/react-markdown' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-markdown/umd/react-markdown' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-markdown/webpack.config.demo' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-markdown/webpack.config' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'react-markdown/demo/dist/js/codemirror.js' { 67 | declare module.exports: $Exports<'react-markdown/demo/dist/js/codemirror'>; 68 | } 69 | declare module 'react-markdown/demo/dist/js/demo.js' { 70 | declare module.exports: $Exports<'react-markdown/demo/dist/js/demo'>; 71 | } 72 | declare module 'react-markdown/demo/src/code-block.js' { 73 | declare module.exports: $Exports<'react-markdown/demo/src/code-block'>; 74 | } 75 | declare module 'react-markdown/demo/src/demo.js' { 76 | declare module.exports: $Exports<'react-markdown/demo/src/demo'>; 77 | } 78 | declare module 'react-markdown/demo/src/editor.js' { 79 | declare module.exports: $Exports<'react-markdown/demo/src/editor'>; 80 | } 81 | declare module 'react-markdown/demo/src/markdown-controls.js' { 82 | declare module.exports: $Exports<'react-markdown/demo/src/markdown-controls'>; 83 | } 84 | declare module 'react-markdown/src/react-markdown.js' { 85 | declare module.exports: $Exports<'react-markdown/src/react-markdown'>; 86 | } 87 | declare module 'react-markdown/umd/react-markdown.js' { 88 | declare module.exports: $Exports<'react-markdown/umd/react-markdown'>; 89 | } 90 | declare module 'react-markdown/webpack.config.demo.js' { 91 | declare module.exports: $Exports<'react-markdown/webpack.config.demo'>; 92 | } 93 | declare module 'react-markdown/webpack.config.js' { 94 | declare module.exports: $Exports<'react-markdown/webpack.config'>; 95 | } 96 | -------------------------------------------------------------------------------- /flow-typed/npm/react-redux_v5.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0ed284c5a2e97a9e3c0e87af3dedc09d 2 | // flow-typed version: bdf1e66252/react-redux_v5.x.x/flow_>=v0.30.x 3 | 4 | import type { Dispatch, Store } from 'redux' 5 | 6 | declare module 'react-redux' { 7 | 8 | /* 9 | 10 | S = State 11 | A = Action 12 | OP = OwnProps 13 | SP = StateProps 14 | DP = DispatchProps 15 | 16 | */ 17 | 18 | declare type MapStateToProps = (state: S, ownProps: OP) => SP | MapStateToProps; 19 | 20 | declare type MapDispatchToProps = ((dispatch: Dispatch, ownProps: OP) => DP) | DP; 21 | 22 | declare type MergeProps = (stateProps: SP, dispatchProps: DP, ownProps: OP) => P; 23 | 24 | declare type StatelessComponent

= (props: P) => ?React$Element; 25 | 26 | declare class ConnectedComponent extends React$Component { 27 | static WrappedComponent: Class>; 28 | getWrappedInstance(): React$Component; 29 | static defaultProps: void; 30 | props: OP; 31 | state: void; 32 | } 33 | 34 | declare type ConnectedComponentClass = Class>; 35 | 36 | declare type Connector = { 37 | (component: StatelessComponent

): ConnectedComponentClass; 38 | (component: Class>): ConnectedComponentClass; 39 | }; 40 | 41 | declare class Provider extends React$Component, children?: any }, void> { } 42 | 43 | declare type ConnectOptions = { 44 | pure?: boolean, 45 | withRef?: boolean 46 | }; 47 | 48 | declare type Null = null | void; 49 | 50 | declare function connect( 51 | ...rest: Array // <= workaround for https://github.com/facebook/flow/issues/2360 52 | ): Connector } & OP>>; 53 | 54 | declare function connect( 55 | mapStateToProps: Null, 56 | mapDispatchToProps: Null, 57 | mergeProps: Null, 58 | options: ConnectOptions 59 | ): Connector } & OP>>; 60 | 61 | declare function connect( 62 | mapStateToProps: MapStateToProps, 63 | mapDispatchToProps: Null, 64 | mergeProps: Null, 65 | options?: ConnectOptions 66 | ): Connector } & OP>>; 67 | 68 | declare function connect( 69 | mapStateToProps: Null, 70 | mapDispatchToProps: MapDispatchToProps, 71 | mergeProps: Null, 72 | options?: ConnectOptions 73 | ): Connector>; 74 | 75 | declare function connect( 76 | mapStateToProps: MapStateToProps, 77 | mapDispatchToProps: MapDispatchToProps, 78 | mergeProps: Null, 79 | options?: ConnectOptions 80 | ): Connector>; 81 | 82 | declare function connect( 83 | mapStateToProps: MapStateToProps, 84 | mapDispatchToProps: MapDispatchToProps, 85 | mergeProps: MergeProps, 86 | options?: ConnectOptions 87 | ): Connector; 88 | 89 | } 90 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-redux_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7e1f48e6273cfc45d48e479414379661 2 | // flow-typed version: <>/react-router-redux_v^4.0.8/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-router-redux' 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 'react-router-redux' { 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 'react-router-redux/dist/ReactRouterRedux' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-router-redux/dist/ReactRouterRedux.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-router-redux/lib/actions' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-router-redux/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-router-redux/lib/middleware' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-router-redux/lib/reducer' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-router-redux/lib/sync' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-router-redux/src/actions' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-router-redux/src/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-router-redux/src/middleware' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-router-redux/src/reducer' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-router-redux/src/sync' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'react-router-redux/dist/ReactRouterRedux.js' { 75 | declare module.exports: $Exports<'react-router-redux/dist/ReactRouterRedux'>; 76 | } 77 | declare module 'react-router-redux/dist/ReactRouterRedux.min.js' { 78 | declare module.exports: $Exports<'react-router-redux/dist/ReactRouterRedux.min'>; 79 | } 80 | declare module 'react-router-redux/lib/actions.js' { 81 | declare module.exports: $Exports<'react-router-redux/lib/actions'>; 82 | } 83 | declare module 'react-router-redux/lib/index.js' { 84 | declare module.exports: $Exports<'react-router-redux/lib/index'>; 85 | } 86 | declare module 'react-router-redux/lib/middleware.js' { 87 | declare module.exports: $Exports<'react-router-redux/lib/middleware'>; 88 | } 89 | declare module 'react-router-redux/lib/reducer.js' { 90 | declare module.exports: $Exports<'react-router-redux/lib/reducer'>; 91 | } 92 | declare module 'react-router-redux/lib/sync.js' { 93 | declare module.exports: $Exports<'react-router-redux/lib/sync'>; 94 | } 95 | declare module 'react-router-redux/src/actions.js' { 96 | declare module.exports: $Exports<'react-router-redux/src/actions'>; 97 | } 98 | declare module 'react-router-redux/src/index.js' { 99 | declare module.exports: $Exports<'react-router-redux/src/index'>; 100 | } 101 | declare module 'react-router-redux/src/middleware.js' { 102 | declare module.exports: $Exports<'react-router-redux/src/middleware'>; 103 | } 104 | declare module 'react-router-redux/src/reducer.js' { 105 | declare module.exports: $Exports<'react-router-redux/src/reducer'>; 106 | } 107 | declare module 'react-router-redux/src/sync.js' { 108 | declare module.exports: $Exports<'react-router-redux/src/sync'>; 109 | } 110 | -------------------------------------------------------------------------------- /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/style-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 928590185114f43e743a6e47b1e972df 2 | // flow-typed version: <>/style-loader_v^0.13.2/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'style-loader' 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 'style-loader' { 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 'style-loader/addStyles' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'style-loader/addStyleUrl' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'style-loader/url' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'style-loader/useable' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'style-loader/addStyles.js' { 43 | declare module.exports: $Exports<'style-loader/addStyles'>; 44 | } 45 | declare module 'style-loader/addStyleUrl.js' { 46 | declare module.exports: $Exports<'style-loader/addStyleUrl'>; 47 | } 48 | declare module 'style-loader/index' { 49 | declare module.exports: $Exports<'style-loader'>; 50 | } 51 | declare module 'style-loader/index.js' { 52 | declare module.exports: $Exports<'style-loader'>; 53 | } 54 | declare module 'style-loader/url.js' { 55 | declare module.exports: $Exports<'style-loader/url'>; 56 | } 57 | declare module 'style-loader/useable.js' { 58 | declare module.exports: $Exports<'style-loader/useable'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-hot-middleware_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1b820e349f3625e13516615b6f2a9389 2 | // flow-typed version: <>/webpack-hot-middleware_v^2.17.1/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-hot-middleware' 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 'webpack-hot-middleware' { 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 'webpack-hot-middleware/client-overlay' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-hot-middleware/client' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-hot-middleware/example/client' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-hot-middleware/example/extra' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-hot-middleware/example/server' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-hot-middleware/example/webpack.config' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-hot-middleware/example/webpack.config.multientry' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-hot-middleware/helpers' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-hot-middleware/middleware' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'webpack-hot-middleware/process-update' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'webpack-hot-middleware/test/client-test' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'webpack-hot-middleware/test/helpers-test' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'webpack-hot-middleware/test/middleware-test' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'webpack-hot-middleware/client-overlay.js' { 79 | declare module.exports: $Exports<'webpack-hot-middleware/client-overlay'>; 80 | } 81 | declare module 'webpack-hot-middleware/client.js' { 82 | declare module.exports: $Exports<'webpack-hot-middleware/client'>; 83 | } 84 | declare module 'webpack-hot-middleware/example/client.js' { 85 | declare module.exports: $Exports<'webpack-hot-middleware/example/client'>; 86 | } 87 | declare module 'webpack-hot-middleware/example/extra.js' { 88 | declare module.exports: $Exports<'webpack-hot-middleware/example/extra'>; 89 | } 90 | declare module 'webpack-hot-middleware/example/server.js' { 91 | declare module.exports: $Exports<'webpack-hot-middleware/example/server'>; 92 | } 93 | declare module 'webpack-hot-middleware/example/webpack.config.js' { 94 | declare module.exports: $Exports<'webpack-hot-middleware/example/webpack.config'>; 95 | } 96 | declare module 'webpack-hot-middleware/example/webpack.config.multientry.js' { 97 | declare module.exports: $Exports<'webpack-hot-middleware/example/webpack.config.multientry'>; 98 | } 99 | declare module 'webpack-hot-middleware/helpers.js' { 100 | declare module.exports: $Exports<'webpack-hot-middleware/helpers'>; 101 | } 102 | declare module 'webpack-hot-middleware/middleware.js' { 103 | declare module.exports: $Exports<'webpack-hot-middleware/middleware'>; 104 | } 105 | declare module 'webpack-hot-middleware/process-update.js' { 106 | declare module.exports: $Exports<'webpack-hot-middleware/process-update'>; 107 | } 108 | declare module 'webpack-hot-middleware/test/client-test.js' { 109 | declare module.exports: $Exports<'webpack-hot-middleware/test/client-test'>; 110 | } 111 | declare module 'webpack-hot-middleware/test/helpers-test.js' { 112 | declare module.exports: $Exports<'webpack-hot-middleware/test/helpers-test'>; 113 | } 114 | declare module 'webpack-hot-middleware/test/middleware-test.js' { 115 | declare module.exports: $Exports<'webpack-hot-middleware/test/middleware-test'>; 116 | } 117 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-md5-hash_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 29461e5bdab81aeaf34db83519ce3013 2 | // flow-typed version: <>/webpack-md5-hash_v^0.0.5/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-md5-hash' 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 'webpack-md5-hash' { 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 'webpack-md5-hash/build' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-md5-hash/example/js/app' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-md5-hash/example/js/module' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-md5-hash/example/webpack.config' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-md5-hash/plugin/webpack_md5_hash' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-md5-hash/spec/fixtures/entry' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-md5-hash/spec/fixtures/module1' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-md5-hash/spec/fixtures/module2' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-md5-hash/spec/WebpackMD5Spec' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'webpack-md5-hash/build.js' { 63 | declare module.exports: $Exports<'webpack-md5-hash/build'>; 64 | } 65 | declare module 'webpack-md5-hash/example/js/app.js' { 66 | declare module.exports: $Exports<'webpack-md5-hash/example/js/app'>; 67 | } 68 | declare module 'webpack-md5-hash/example/js/module.js' { 69 | declare module.exports: $Exports<'webpack-md5-hash/example/js/module'>; 70 | } 71 | declare module 'webpack-md5-hash/example/webpack.config.js' { 72 | declare module.exports: $Exports<'webpack-md5-hash/example/webpack.config'>; 73 | } 74 | declare module 'webpack-md5-hash/index' { 75 | declare module.exports: $Exports<'webpack-md5-hash'>; 76 | } 77 | declare module 'webpack-md5-hash/index.js' { 78 | declare module.exports: $Exports<'webpack-md5-hash'>; 79 | } 80 | declare module 'webpack-md5-hash/plugin/webpack_md5_hash.js' { 81 | declare module.exports: $Exports<'webpack-md5-hash/plugin/webpack_md5_hash'>; 82 | } 83 | declare module 'webpack-md5-hash/spec/fixtures/entry.js' { 84 | declare module.exports: $Exports<'webpack-md5-hash/spec/fixtures/entry'>; 85 | } 86 | declare module 'webpack-md5-hash/spec/fixtures/module1.js' { 87 | declare module.exports: $Exports<'webpack-md5-hash/spec/fixtures/module1'>; 88 | } 89 | declare module 'webpack-md5-hash/spec/fixtures/module2.js' { 90 | declare module.exports: $Exports<'webpack-md5-hash/spec/fixtures/module2'>; 91 | } 92 | declare module 'webpack-md5-hash/spec/WebpackMD5Spec.js' { 93 | declare module.exports: $Exports<'webpack-md5-hash/spec/WebpackMD5Spec'>; 94 | } 95 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-s3-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: efae4e6482878fb0dd153ef86dba1ff0 2 | // flow-typed version: <>/webpack-s3-plugin_v^0.9.2/flow_v0.41.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-s3-plugin' 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 'webpack-s3-plugin' { 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 'webpack-s3-plugin/dist/s3_plugin' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'webpack-s3-plugin/dist/s3_plugin.js' { 31 | declare module.exports: $Exports<'webpack-s3-plugin/dist/s3_plugin'>; 32 | } 33 | -------------------------------------------------------------------------------- /jest.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "verbose": true, 3 | "moduleDirectories": [ 4 | "src", 5 | "node_modules" 6 | ], 7 | "moduleNameMapper": { 8 | "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", 9 | "\\.(css)$": "identity-obj-proxy" 10 | }, 11 | "collectCoverageFrom": [ 12 | "src/**/*.js" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apicollective/ui/0324e73e4b750d1c59302e0ad85d87ab772fb8dc/model.png -------------------------------------------------------------------------------- /organization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apicollective/ui/0324e73e4b750d1c59302e0ad85d87ab772fb8dc/organization.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apibuilder.io-ui", 3 | "version": "0.2.0", 4 | "description": "API Builder UI", 5 | "scripts": { 6 | "build": "webpack --env=prod --progress --profile --colors", 7 | "deploy": "DEPLOY=true webpack --env=prod", 8 | "start": "webpack-dev-server --env=dev --progress --colors --profile", 9 | "lint": "eslint src", 10 | "format": "prettier --single-quote --trailing-comma=es5 --write src/*.js src/**/*.js src/**/*.jsx", 11 | "lint:style": "stylelint \"src/**/*.css\"", 12 | "lint:style:ci": "stylelint \"src/**/*.css\"", 13 | "check": "yarn run format && yarn run test && yarn run flow && yarn run lint && yarn run lint:style", 14 | "flow:cover": "flow coverage --color", 15 | "flow:coverage": "flow-coverage-report -i 'src/**/*.js' -x 'src/**/*.test.js' -x 'src/generated/**/*' -t text", 16 | "test": "jest --config=jest.config.json", 17 | "test:watch": "jest --watch --config=jest.config.json", 18 | "test:coverage": "jest --coverage --config=jest.config.json" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/movio/apidoc-ui" 23 | }, 24 | "keywords": [ 25 | "movio", 26 | "apidoc", 27 | "apibuilder", 28 | "api" 29 | ], 30 | "contributors": [ 31 | { 32 | "name": "Kalman Bekesi", 33 | "url": "https://github.com/kalmanb" 34 | } 35 | ], 36 | "license": "MIT", 37 | "devDependencies": { 38 | "babel-core": "^6.24.1", 39 | "babel-eslint": "^7.2.3", 40 | "babel-jest": "^19.0.0", 41 | "babel-loader": "^7.0.0", 42 | "babel-plugin-flow-react-proptypes": "^2.1.3", 43 | "babel-plugin-transform-decorators-legacy": "^1.3.4", 44 | "babel-plugin-transform-flow-strip-types": "^6.22.0", 45 | "babel-polyfill": "^6.23.0", 46 | "babel-preset-es2015": "^6.24.1", 47 | "babel-preset-react": "^6.24.1", 48 | "babel-preset-stage-1": "^6.24.1", 49 | "babel-runtime": "^6.23.0", 50 | "caniuse-db": "^1.0.30000664", 51 | "clean-webpack-plugin": "^0.1.16", 52 | "css-loader": "^0.28.1", 53 | "cssnano": "^3.9.1", 54 | "empty": "^0.10.1", 55 | "eslint": "^3.19.0", 56 | "eslint-config-airbnb": "^14.1.0", 57 | "eslint-config-prettier": "^1.7.0", 58 | "eslint-import-resolver-webpack": "^0.8.1", 59 | "eslint-loader": "^1.7.1", 60 | "eslint-plugin-flowtype": "^2.32.1", 61 | "eslint-plugin-import": "^2.2.0", 62 | "eslint-plugin-jsx-a11y": "^4.0.0", 63 | "eslint-plugin-react": "^6.10.3", 64 | "extract-text-webpack-plugin": "^2.1.0", 65 | "file-loader": "^0.11.1", 66 | "flow-bin": "^0.45.0", 67 | "flow-coverage-report": "^0.3.0", 68 | "html-webpack-plugin": "^2.28.0", 69 | "http-server": "^0.10.0", 70 | "identity-obj-proxy": "^3.0.0", 71 | "istanbul-instrumenter-loader": "^2.0.0", 72 | "jest": "^19.0.2", 73 | "json-loader": "^0.5.4", 74 | "postcss-cssnext": "^2.10.0", 75 | "postcss-import": "^9.1.0", 76 | "postcss-loader": "^1.3.3", 77 | "postcss-reporter": "^3.0.0", 78 | "prettier": "^1.5.3", 79 | "react-addons-test-utils": "^15.5.1", 80 | "react-hot-loader": "3.0.0-beta.6", 81 | "react-test-renderer": "^15.5.4", 82 | "rucksack-css": "^0.9.1", 83 | "style-loader": "^0.17.0", 84 | "stylelint": "^7.10.1", 85 | "uglify-js": "^2.8.22", 86 | "uglifyjs-webpack-plugin": "^0.4.3", 87 | "webpack": "^2.4.1", 88 | "webpack-dev-server": "^2.4.5", 89 | "webpack-hot-middleware": "^2.18.0", 90 | "webpack-md5-hash": "^0.0.5", 91 | "webpack-s3-plugin": "^0.9.2" 92 | }, 93 | "dependencies": { 94 | "classnames": "^2.2.5", 95 | "immutable": "^3.8.1", 96 | "lodash": "^4.17.2", 97 | "react": "^15.5.4", 98 | "react-addons-css-transition-group": "^15.5.2", 99 | "react-dom": "^15.5.4", 100 | "react-markdown": "^2.5.0", 101 | "react-motion": "^0.5.0", 102 | "react-redux": "^5.0.4", 103 | "react-router": "^3.0.2", 104 | "react-router-redux": "^4.0.8", 105 | "redux": "^3.6.0", 106 | "redux-saga": "^0.15.0", 107 | "superagent": "^3.5.2" 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-import')({ 4 | path: ['./src/styles'], 5 | }), 6 | require('postcss-cssnext')({ 7 | features: { 8 | rem: { 9 | rootValue: '14px', 10 | }, 11 | }, 12 | }), 13 | require('rucksack-css'), 14 | require('cssnano')({ 15 | autoprefixer: false, 16 | discardComments: { 17 | removeAll: true, 18 | }, 19 | discardUnused: false, 20 | mergeIdents: false, 21 | reduceIdents: false, 22 | safe: true, 23 | sourcemap: true, 24 | }), 25 | require('postcss-reporter'), 26 | ], 27 | }; 28 | -------------------------------------------------------------------------------- /resource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apicollective/ui/0324e73e4b750d1c59302e0ad85d87ab772fb8dc/resource.png -------------------------------------------------------------------------------- /src/app/actions.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { Model } from 'generated/version/ServiceType'; 3 | 4 | const actionTypes = { 5 | updateCurrentPage: 'app/updateCurrentPage', 6 | updateNavBar: 'app/updateNavBar', 7 | updateSideBar: 'app/updateSideBar', 8 | }; 9 | 10 | const updateCurrentPage = (page: Object) => ({ 11 | type: actionTypes.updateCurrentPage, 12 | payload: page, 13 | }); 14 | 15 | const updateNavBar = (model: Model) => ({ 16 | type: actionTypes.updateNavBar, 17 | payload: model, 18 | }); 19 | 20 | const updateSideBar = (model: Model) => ({ 21 | type: actionTypes.updateSideBar, 22 | payload: model, 23 | }); 24 | 25 | const actions = { 26 | updateCurrentPage, 27 | updateNavBar, 28 | updateSideBar, 29 | }; 30 | 31 | export { actionTypes, actions }; 32 | -------------------------------------------------------------------------------- /src/app/allSagas.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { sagas as orgSagas } from 'generated/organization'; 3 | import { sagas as specSagas } from 'generated/version'; 4 | import { takeLatestSaga as documentationSaga } from 'generated/documentation/getByRootUrlAndMarkdownPath'; 5 | import { takeLatestSaga as organizationSaga } from 'organization/sagas'; 6 | 7 | const allSagas = [].concat( 8 | orgSagas.getOrganizationsTakeLatestSaga, 9 | specSagas.getByOrgkeyAndApplicationkeyAndVersionLatestSaga, 10 | organizationSaga, 11 | documentationSaga 12 | ); 13 | 14 | export default allSagas; 15 | -------------------------------------------------------------------------------- /src/app/components/app.css: -------------------------------------------------------------------------------- 1 | @import "global.css"; 2 | 3 | .main { 4 | display: flex; 5 | } 6 | -------------------------------------------------------------------------------- /src/app/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { actions, actionTypes } from 'app/actions'; 3 | import { reducers } from 'app/reducers'; 4 | 5 | import App from 'app/components/App'; 6 | 7 | const name = 'app'; 8 | 9 | export { name, actionTypes, actions, reducers, App }; 10 | -------------------------------------------------------------------------------- /src/app/reducers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { actionTypes as orgActionTypes } from 'generated/organization'; 3 | 4 | import type { Organization } from 'generated/version/ServiceType'; 5 | import type { OrgState } from 'organization/reducers'; 6 | import type { State as DocumentationState } from 'documentation/reducers'; 7 | 8 | export type AppState = {| 9 | loaded: boolean, 10 | organizations: Organization[], 11 | |}; 12 | 13 | export type State = {| 14 | app: AppState, 15 | organization: OrgState, 16 | application: any, // FIXME 17 | documentation: DocumentationState, 18 | |}; 19 | 20 | type Action = {| 21 | type: string, 22 | payload: T, 23 | |}; 24 | 25 | type AppAction = Action; 26 | 27 | const initialState = { 28 | loaded: false, 29 | organizations: [], 30 | }; 31 | 32 | const app = (state: AppState = initialState, action: AppAction) => { 33 | switch (action.type) { 34 | case orgActionTypes.getOrganizations_success: { 35 | return { 36 | loaded: true, 37 | organizations: action.payload, 38 | }; 39 | } 40 | case orgActionTypes.getOrganizations_doing: { 41 | return Object.assign(state, { 42 | loaded: false, 43 | }); 44 | } 45 | default: { 46 | return state; 47 | } 48 | } 49 | }; 50 | 51 | const reducers = { 52 | app, 53 | }; 54 | 55 | export { reducers }; 56 | -------------------------------------------------------------------------------- /src/app/rootReducer.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { combineReducers } from 'redux'; 3 | import { routerReducer } from 'react-router-redux'; 4 | 5 | import { reducers as appReducers } from 'app/reducers'; 6 | import { reducers as applicationReducers } from 'application/reducers'; 7 | import { reducers as organizationReducers } from 'organization/reducers'; 8 | import { reducers as documentationReducers } from 'documentation/reducers'; 9 | 10 | const routing = { routing: routerReducer }; 11 | const allReducers = Object.assign( 12 | {}, 13 | routing, 14 | appReducers, 15 | applicationReducers, 16 | organizationReducers, 17 | documentationReducers 18 | ); 19 | 20 | export default combineReducers(allReducers); 21 | -------------------------------------------------------------------------------- /src/application/actions.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | const actionTypes = { 3 | // fixme: 'applciation/fixme', 4 | }; 5 | 6 | // function fixme(text) { 7 | // return { type: 'fixme', text }; 8 | // } 9 | 10 | const actions = { 11 | // fixme 12 | }; 13 | 14 | export { actionTypes, actions }; 15 | -------------------------------------------------------------------------------- /src/application/components/Application.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import renderer from 'react-test-renderer'; 4 | 5 | import { Application } from 'application/components/Application'; 6 | import Example from 'exampleService.json'; 7 | import { actions as serviceActions } from 'generated/version'; 8 | 9 | test('Application Home', () => { 10 | const params = { 11 | actions: serviceActions, 12 | params: { 13 | model: undefined, 14 | resource: undefined, 15 | method: '', 16 | path: '', 17 | applicationKey: '', 18 | organizationKey: '', 19 | }, 20 | loaded: true, 21 | service: Example, 22 | importedServices: [], 23 | }; 24 | 25 | const component = renderer.create(); 26 | 27 | const tree = component.toJSON(); 28 | expect(tree).toMatchSnapshot(); 29 | }); 30 | -------------------------------------------------------------------------------- /src/application/components/ApplicationHome.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import { onClickHref, cleanPath } from 'utils'; 5 | 6 | import H1 from 'components/H1'; 7 | import Markdown from 'components/Markdown'; 8 | import ResourceCard from 'application/components/ResourceCard'; 9 | 10 | import type { Service } from 'generated/version/ServiceType'; 11 | 12 | import styles from 'application/components/application-home.css'; 13 | 14 | const ApplicationHome = ({ 15 | service, 16 | organizationKey, 17 | applicationKey, 18 | }: { 19 | service: Service, 20 | organizationKey: string, 21 | applicationKey: string, 22 | }) => { 23 | const buildClickHref = (type, method, path) => 24 | `/org/${organizationKey}/app/${applicationKey}/r/${type}/m/${method.toLowerCase()}/p/${cleanPath(path)}`; 25 | 26 | return ( 27 |

51 | ); 52 | }; 53 | 54 | export default ApplicationHome; 55 | -------------------------------------------------------------------------------- /src/application/components/Enum.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import H1 from 'components/H1'; 5 | import Markdown from 'components/Markdown'; 6 | import ParameterListGroup from 'application/components/ParameterListGroup'; 7 | 8 | import { simplifyName } from 'utils'; 9 | 10 | import type { Service, Enum as EnumType } from 'generated/version/ServiceType'; 11 | 12 | import styles from 'application/components/enum.css'; 13 | 14 | const Enum = ({ 15 | enumModel, 16 | service, 17 | importedServices, 18 | }: { 19 | enumModel: EnumType, 20 | service: Service, 21 | importedServices: Service[], 22 | }) => { 23 | const enumValues = enumModel.values.map(value => ({ 24 | name: value.name, 25 | description: value.description, 26 | type: 'string', 27 | required: false, 28 | })); 29 | return ( 30 |
31 |
32 |

{simplifyName(enumModel.name)}

33 | 37 |
38 |
39 | 46 |
47 |
48 | ); 49 | }; 50 | 51 | export default Enum; 52 | -------------------------------------------------------------------------------- /src/application/components/Header.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import * as utils from 'utils'; 5 | import ParameterListGroup from 'application/components/ParameterListGroup'; 6 | 7 | import type { Operation, Service } from 'generated/version/ServiceType'; 8 | 9 | import styles from 'application/components/header.css'; 10 | 11 | const Header = ({ 12 | operation, 13 | service, 14 | importedServices, 15 | orgKey, 16 | appKey, 17 | }: { 18 | operation: Operation, 19 | service: Service, 20 | importedServices: Service[], 21 | orgKey: string, 22 | appKey: string, 23 | }) => { 24 | if (service.headers && service.headers.length) { 25 | return ( 26 |
27 | 34 |
35 | ); 36 | } else { 37 | return null; 38 | } 39 | }; 40 | 41 | export default Header; 42 | 43 | export { styles }; 44 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/Documentation.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import classnames from 'classnames'; 4 | 5 | import ParameterList from 'application/components/ParameterList'; 6 | import * as utils from 'utils'; 7 | 8 | import styles from 'application/components/JsonDoc/json-doc.css'; 9 | import type { Service } from 'generated/version/ServiceType'; 10 | 11 | const defaultView = ( 12 |
13 | 14 | <-- Hover over JSON example for documentation 15 | 16 |
17 | ); 18 | 19 | type Props = {| 20 | documentationFullType: string, 21 | service: Service, 22 | importedServices: Service[], 23 | |}; 24 | 25 | class Documentation extends Component { 26 | props: Props; 27 | state: { 28 | height: number, 29 | }; 30 | 31 | container: HTMLDivElement; 32 | 33 | constructor(props: Props) { 34 | super(props); 35 | this.state = { height: 0 }; 36 | } 37 | 38 | componentDidUpdate() { 39 | this.updateContainerHeight(); 40 | } 41 | 42 | updateContainerHeight = (): void => { 43 | const container = this.container; 44 | if (container) { 45 | const height = container.clientHeight; 46 | if (height > this.state.height) { 47 | this.setState({ height }); 48 | } 49 | } 50 | }; 51 | 52 | render() { 53 | const { documentationFullType, service, importedServices } = this.props; 54 | const { height } = this.state; 55 | if (!documentationFullType) return defaultView; 56 | 57 | const modelName = documentationFullType.substring( 58 | 0, 59 | documentationFullType.lastIndexOf('.') 60 | ); 61 | const fieldName = documentationFullType.substring( 62 | documentationFullType.lastIndexOf('.') + 1 63 | ); 64 | const model = utils.getModel(modelName, service, importedServices); 65 | const field = model ? model.fields.find(f => f.name === fieldName) : null; 66 | 67 | return ( 68 |
{ 70 | this.container = el; 71 | }} 72 | className={classnames(styles.documentation)} 73 | style={{ minHeight: `${height}px` }} 74 | > 75 | 81 |
82 | ); 83 | } 84 | } 85 | 86 | export default Documentation; 87 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/Element.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import renderer from 'react-test-renderer'; 4 | 5 | import Element, { JField } from 'application/components/JsonDoc/Element'; 6 | import Example from 'exampleService.json'; 7 | 8 | test('Element Model', () => { 9 | const params = { 10 | field: undefined, 11 | type: 'error', 12 | fieldKey: 'key', 13 | indent: 4, 14 | mouseOver: () => {}, 15 | service: Example, 16 | importedServices: [], 17 | isLast: false, 18 | }; 19 | 20 | const component = renderer.create(); 21 | 22 | const tree = component.toJSON(); 23 | expect(tree).toMatchSnapshot(); 24 | }); 25 | 26 | test('Element Field Model', () => { 27 | const params = { 28 | field: { 29 | name: 'code', 30 | type: 'error', 31 | }, 32 | type: 'n/a', 33 | fieldKey: 'key', 34 | indent: 4, 35 | mouseOver: () => {}, 36 | service: Example, 37 | importedServices: [], 38 | isLast: false, 39 | }; 40 | 41 | const component = renderer.create(); 42 | 43 | const tree = component.toJSON(); 44 | expect(tree).toMatchSnapshot(); 45 | }); 46 | 47 | test('Element Field Value string', () => { 48 | const params = { 49 | field: { 50 | name: 'code', 51 | type: 'string', 52 | }, 53 | type: 'n/a', 54 | fieldKey: 'key', 55 | indent: 4, 56 | mouseOver: () => {}, 57 | service: Example, 58 | importedServices: [], 59 | isLast: false, 60 | }; 61 | 62 | const component = renderer.create(); 63 | 64 | const tree = component.toJSON(); 65 | expect(tree).toMatchSnapshot(); 66 | }); 67 | 68 | test('Element Array', () => { 69 | const params = { 70 | field: undefined, 71 | type: 'attribute[]', 72 | fieldKey: 'key', 73 | indent: 4, 74 | mouseOver: () => {}, 75 | service: Example, 76 | importedServices: [], 77 | isLast: false, 78 | }; 79 | 80 | const component = renderer.create(); 81 | 82 | const tree = component.toJSON(); 83 | expect(tree).toMatchSnapshot(); 84 | }); 85 | 86 | test('JField value', () => { 87 | const params = { 88 | field: { 89 | name: 'code', 90 | type: 'string', 91 | }, 92 | fieldKey: 'key', 93 | indent: 4, 94 | mouseOver: () => {}, 95 | service: Example, 96 | importedServices: [], 97 | isLast: false, 98 | }; 99 | 100 | const component = renderer.create(); 101 | 102 | const tree = component.toJSON(); 103 | expect(tree).toMatchSnapshot(); 104 | }); 105 | 106 | test('JField model', () => { 107 | const params = { 108 | field: { 109 | name: 'code', 110 | type: 'error', 111 | }, 112 | fieldKey: 'key', 113 | indent: 4, 114 | mouseOver: () => {}, 115 | service: Example, 116 | importedServices: [], 117 | isLast: false, 118 | }; 119 | 120 | const component = renderer.create(); 121 | 122 | const tree = component.toJSON(); 123 | expect(tree).toMatchSnapshot(); 124 | }); 125 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/JsonDoc.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | 4 | import Documentation from 'application/components/JsonDoc/Documentation'; 5 | import ModelDescription from 'application/components/JsonDoc/ModelDescription'; 6 | import Element from 'application/components/JsonDoc/Element'; 7 | 8 | import * as utils from 'utils'; 9 | import type { Service } from 'generated/version/ServiceType'; 10 | 11 | import styles from 'application/components/JsonDoc/json-doc.css'; 12 | 13 | type Props = {| 14 | service: Service, 15 | importedServices: Service[], 16 | baseModel: string, 17 | includeModel?: boolean, // Include Model Documentation in JsonDoc 18 | modelNameClick: (event: Event) => void, 19 | rawValue?: string, 20 | |}; 21 | 22 | class JsonDoc extends Component { 23 | props: Props; 24 | state: { 25 | documentationFullType: string, 26 | }; 27 | 28 | mouseOver: (event: Object) => void; 29 | 30 | constructor(props: Props) { 31 | super(props); 32 | this.state = { documentationFullType: '' }; 33 | 34 | this.mouseOver = event => { 35 | const documentationFullType = event.currentTarget.dataset.fieldkey; 36 | this.setState({ documentationFullType }); 37 | // Stop parent nav events to be publishes - jsondoc nesting 38 | if (event.stopPropagation) event.stopPropagation(); 39 | }; 40 | } 41 | 42 | static getJson( 43 | baseModel: string, 44 | service: Service, 45 | importedServices: Service[], 46 | modelFieldJson: any 47 | ) { 48 | if (modelFieldJson) { 49 | return ( 50 |
 51 |           {modelFieldJson}
 52 |         
53 | ); 54 | } else { 55 | return null; 56 | } 57 | } 58 | 59 | getModelJson( 60 | baseModel: string, 61 | service: Service, 62 | importedServices: Service[], 63 | mouseOver: (event: Object) => void 64 | ) { 65 | if (utils.isImportOrInService(baseModel, service, importedServices)) { 66 | return ( 67 | 76 | ); 77 | } else { 78 | return null; 79 | } 80 | } 81 | 82 | render() { 83 | const { baseModel, service, importedServices, includeModel } = this.props; 84 | 85 | const jsonDoc = JsonDoc.getJson( 86 | baseModel, 87 | service, 88 | importedServices, 89 | this.props.rawValue 90 | ? this.props.rawValue 91 | : this.getModelJson( 92 | baseModel, 93 | service, 94 | importedServices, 95 | this.mouseOver 96 | ) 97 | ); 98 | return ( 99 |
100 | {includeModel 101 | ? 107 | : null} 108 |
109 | {jsonDoc} 110 | {jsonDoc && 111 | } 116 |
117 |
118 | ); 119 | } 120 | } 121 | 122 | export default JsonDoc; 123 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/ModelDescription.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import H2 from 'components/H2'; 5 | import Markdown from 'components/Markdown'; 6 | 7 | import type { Service } from 'generated/version/ServiceType'; 8 | 9 | import * as utils from 'utils'; 10 | import styles from 'application/components/JsonDoc/json-doc.css'; 11 | 12 | const ModelDescription = ({ 13 | baseModel, 14 | service, 15 | importedServices, 16 | modelNameClick, 17 | }: { 18 | baseModel: string, 19 | service: Service, 20 | importedServices: Service[], 21 | modelNameClick: (event: Object) => void, 22 | }) => { 23 | const type = utils.getType(baseModel); 24 | const model = utils.getModel(type, service, importedServices); 25 | 26 | //

27 | //

28 | return ( 29 |
30 |

31 | {utils.simplifyName(baseModel)} 32 |

33 | {model && model.description 34 | ? 38 | : null} 39 |
40 | ); 41 | }; 42 | 43 | export default ModelDescription; 44 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/ModelDescription.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import renderer from 'react-test-renderer'; 4 | 5 | import ModelDescription from 'application/components/JsonDoc/ModelDescription'; 6 | import Example from 'exampleService.json'; 7 | 8 | test('simple html', () => { 9 | const params = { 10 | baseModel: 'base', 11 | service: Example, 12 | importedServices: [], 13 | modelNameClick: () => {}, 14 | }; 15 | 16 | const component = renderer.create(); 17 | 18 | const tree = component.toJSON(); 19 | expect(tree).toMatchSnapshot(); 20 | }); 21 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/__snapshots__/ModelDescription.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`simple html 1`] = ` 4 |
7 |

11 | base 12 |

13 |
14 | `; 15 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/defaults.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import * as utils from 'utils'; 3 | import type { Field } from 'generated/version/ServiceType'; 4 | 5 | const getFieldValue = (field: Field) => { 6 | const type = utils.getType(field.type); 7 | const wrap = value => { 8 | switch (type) { 9 | case 'string': 10 | case 'date-time-iso8601': 11 | case 'date-iso8601': 12 | case 'uuid': 13 | return `"${value}"`; 14 | default: 15 | return value; 16 | } 17 | }; 18 | 19 | if (field.example) { 20 | return wrap(field.example); 21 | } 22 | if (field.default) { 23 | return wrap(field.default); 24 | } 25 | switch (type) { 26 | case 'boolean': 27 | return 'true'; 28 | case 'string': 29 | return `"${field.name}"`; 30 | case 'integer': 31 | case 'long': 32 | return '12'; 33 | case 'decimal': 34 | case 'double': 35 | return '10.12'; 36 | case 'date-time-iso8601': 37 | return `"${new Date('2016-03-24T13:56:45.242Z').toISOString()}"`; 38 | case 'date-iso8601': 39 | return '"2016-03-24"'; 40 | case 'uuid': 41 | return '"5ecf6502-e532-4738-aad5-7ac9701251dd"'; 42 | default: 43 | return ''; 44 | } 45 | }; 46 | 47 | export { getFieldValue }; 48 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/json-doc.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .json-doc { 4 | font-style: normal; 5 | font-variant: normal; 6 | font-weight: 500; 7 | display: flex; 8 | align-items: flex-start; 9 | flex-direction: column; 10 | } 11 | 12 | .container { 13 | display: flex; 14 | width: 100%; 15 | flex-direction: row; 16 | align-items: flex-start; 17 | } 18 | 19 | .code { 20 | flex: 0 0 38%; 21 | width: 38%; 22 | padding: 1rem; 23 | background: var(--color-tuatara); 24 | color: white; 25 | margin: 0 2% 0 0; 26 | border-radius: var(--border-radius); 27 | overflow-x: scroll; 28 | } 29 | 30 | .field { 31 | width: 100%; 32 | text-decoration: none; 33 | color: var(--color-aluminium); 34 | font-family: var(--font-mono); 35 | cursor: pointer; 36 | 37 | @nest &:hover { 38 | background-color: color(var(--color-cool-blue) b(+35%)); 39 | border-radius: var(--border-radius); 40 | } 41 | } 42 | 43 | .element { 44 | width: 100%; 45 | text-decoration: none; 46 | color: var(--color-aluminium); 47 | font-family: var(--font-mono); 48 | cursor: pointer; 49 | 50 | @nest &:hover { 51 | background-color: color(var(--color-cool-blue) b(+65%)); 52 | border-radius: var(--border-radius); 53 | } 54 | } 55 | 56 | .name { 57 | color: var(--color-maya-blue); 58 | font-family: var(--font-mono); 59 | } 60 | 61 | .value { 62 | color: var(--color-secondary-light); 63 | font-family: var(--font-mono); 64 | } 65 | 66 | .default { 67 | color: black; 68 | } 69 | 70 | .documentation { 71 | flex: 0 0 60%; 72 | width: 60%; 73 | font-family: var(--font-primary); 74 | } 75 | 76 | .field-container { 77 | display: flex; 78 | } 79 | 80 | .field-left { 81 | flex: 0 1 30%; 82 | } 83 | 84 | .field-right { 85 | flex: 0 1 65%; 86 | margin-left: 5%; 87 | } 88 | 89 | .model { 90 | @nest &:hover { 91 | background-color: color(var(--color-cool-blue) b(+55%)); 92 | border-radius: var(--border-radius); 93 | } 94 | } 95 | 96 | .model-name { 97 | font-weight: 400; 98 | margin: 0 0 0.5rem 0; 99 | font-size: 1.5rem; 100 | line-height: 1; 101 | } 102 | 103 | .model-description { 104 | margin: 2rem 0 1.5rem 0; 105 | } 106 | 107 | .model-description + .field-container { 108 | border-top: 1px solid var(--color-very-light-gray); 109 | } 110 | 111 | .default-view { 112 | color: var(--color-light-gray); 113 | } 114 | -------------------------------------------------------------------------------- /src/application/components/JsonDoc/test-jsondoc-spec-expected.js: -------------------------------------------------------------------------------- 1 | // This is what the test-jsondoc-spec should look like in the ui 2 | 3 | /* eslint-disable comma-dangle */ 4 | 5 | export const getGender200 = 'female'; 6 | 7 | export const getGender201 = 'string'; 8 | 9 | export const postPerson = { 10 | id: 12, 11 | default: 'default value', 12 | example: 'example value', 13 | boolean: true, 14 | dob: '2001-10-10', 15 | time: '2016-03-24T13:56:45.242Z', 16 | tags: ['tag'], 17 | details: { 18 | some_thing: 10, 19 | tags: ['string'], 20 | }, 21 | addresses: [ 22 | { 23 | street: 10, 24 | tags: ['string'], 25 | }, 26 | ], 27 | gender: 'gender', 28 | }; 29 | 30 | export const postPeople = [ 31 | { 32 | id: 'xyz', 33 | name: 'name', 34 | dob: '2001-10-10', 35 | tags: ['tag'], 36 | details: { 37 | some_thing: 10, 38 | tags: ['string'], 39 | }, 40 | addresses: [ 41 | { 42 | street: 10, 43 | tags: ['string'], 44 | }, 45 | ], 46 | gender: 'gender', 47 | }, 48 | ]; 49 | 50 | /* eslint-enable comma-dangle */ 51 | -------------------------------------------------------------------------------- /src/application/components/Model.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import H1 from 'components/H1'; 5 | import Markdown from 'components/Markdown'; 6 | import JsonDoc from 'application/components/JsonDoc/JsonDoc'; 7 | import ParameterListGroup from 'application/components/ParameterListGroup'; 8 | 9 | import { simplifyName } from 'utils'; 10 | 11 | import type { 12 | Service, 13 | Model as ModelType, 14 | } from 'generated/version/ServiceType'; 15 | 16 | import styles from 'application/components/model.css'; 17 | 18 | const Model = ({ 19 | model, 20 | service, 21 | importedServices, 22 | showJsonDoc, 23 | }: { 24 | model: ModelType, 25 | service: Service, 26 | importedServices: Service[], 27 | showJsonDoc: boolean, 28 | }) => ( 29 |
30 |
31 |

{simplifyName(model.name)}

32 | 36 |
37 |
38 | 45 |
46 | {showJsonDoc 47 | ? {}} 53 | /> 54 | : null} 55 |
56 |
57 |
58 | ); 59 | 60 | export default Model; 61 | -------------------------------------------------------------------------------- /src/application/components/Operation.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { Link } from 'react-router'; 4 | import Markdown from 'components/Markdown'; 5 | import Header from 'application/components/Header'; 6 | import Request from 'application/components/Request'; 7 | import Response from 'application/components/Response'; 8 | import ResourceCard from 'application/components/ResourceCard'; 9 | import H1 from 'components/H1'; 10 | 11 | import type { 12 | Operation as OperationServiceType, 13 | Service, 14 | Resource as ResourceServiceType, 15 | } from 'generated/version/ServiceType'; 16 | 17 | import styles from 'application/components/operation.css'; 18 | 19 | const Operation = ({ 20 | service, 21 | operation, 22 | applicationKey, 23 | organizationKey, 24 | resource, 25 | method, 26 | path, 27 | importedServices, 28 | }: { 29 | service: Service, 30 | operation: OperationServiceType, 31 | applicationKey: string, 32 | organizationKey: string, 33 | resource: ResourceServiceType, 34 | method: string, 35 | path: string, 36 | importedServices: Service[], 37 | }) => ( 38 |
39 |
40 |

41 | 45 | {resource.type} 46 | 47 |

48 | {resource.description && 49 | } 53 |
54 |
55 | 56 |
57 | {operation.description && 58 | } 62 |
63 |
71 |
72 |
73 | 79 |
80 | 88 |
89 | ); 90 | 91 | export default Operation; 92 | -------------------------------------------------------------------------------- /src/application/components/ParameterList.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import classnames from 'classnames'; 4 | 5 | import Markdown from 'components/Markdown'; 6 | import { 7 | buildNavHref, 8 | getType, 9 | isImport, 10 | isImportOrInService, 11 | onClickHref, 12 | simplifyName, 13 | } from 'utils'; 14 | 15 | import type { Service } from 'generated/version/ServiceType'; 16 | 17 | import styles from 'application/components/parameter-list.css'; 18 | 19 | const ParameterList = ( 20 | { 21 | name, 22 | type, 23 | required, 24 | description, 25 | minimum, 26 | maximum, 27 | example, 28 | defaultValue, 29 | service, 30 | importedServices, 31 | parentModel, 32 | }: { 33 | name: string, 34 | type: string, 35 | required: boolean, 36 | minimum?: number, 37 | maximum?: number, 38 | description?: string, 39 | example?: string, 40 | defaultValue?: string, 41 | service: Service, 42 | importedServices: Service[], 43 | parentModel: string, 44 | } = {} 45 | ) => { 46 | const possibleImportType = `${parentModel.substring(0, parentModel.lastIndexOf('.'))}.${type}`; 47 | const modelType = isImport(possibleImportType, importedServices) 48 | ? possibleImportType 49 | : type; 50 | const typeClickFn = isImportOrInService( 51 | getType(modelType), 52 | service, 53 | importedServices 54 | ) 55 | ? onClickHref( 56 | buildNavHref({ 57 | organization: service.organization.key, 58 | application: service.application.key, 59 | model: getType(modelType), 60 | }) 61 | ) 62 | : null; 63 | 64 | return ( 65 |
66 |
67 | 68 | {name} 69 | 70 | {/*

71 | {simplifyName(modelType)} 72 |

*/} 73 | 81 | {simplifyName(modelType)} 82 | 83 | {required ?

required

: null} 84 |
85 |
86 | {description 87 | ? 88 | :

No description

} 89 | {minimum 90 | ?

91 | Minimum{minimum} 92 |

93 | : null 94 | } 95 | {maximum 96 | ?

97 | Maximum{maximum} 98 |

99 | : null 100 | } 101 | {example 102 | ?

103 | Example{example} 104 |

105 | : null} 106 | {defaultValue 107 | ?

108 | Default{defaultValue} 109 |

110 | : null} 111 |
112 |
113 | ); 114 | }; 115 | 116 | export default ParameterList; 117 | -------------------------------------------------------------------------------- /src/application/components/ParameterListGroup.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import H2 from 'components/H2'; 5 | import ParameterList from 'application/components/ParameterList'; 6 | 7 | import type { Service } from 'generated/version/ServiceType'; 8 | 9 | import styles from 'application/components/parameter-list-group.css'; 10 | 11 | const ParameterListGroup = ({ 12 | title, 13 | parameters, 14 | service, 15 | importedServices, 16 | parentModel, 17 | }: { 18 | title: string, 19 | parameters: any[], // FIXME PropTypes.array.isRequired, 20 | service: Service, 21 | importedServices: Service[], 22 | parentModel: string, 23 | }) => ( 24 |
25 |

{title}

26 |
27 | {parameters.length > 0 28 | ? parameters.map((parameter, id) => ( 29 | 36 | )) 37 | :

No parameters

} 38 |
39 |
40 | ); 41 | 42 | export default ParameterListGroup; 43 | -------------------------------------------------------------------------------- /src/application/components/Request.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import { cleanPath } from 'utils'; 5 | import JsonDoc from 'application/components/JsonDoc/JsonDoc'; 6 | import ParameterListGroup from 'application/components/ParameterListGroup'; 7 | 8 | import H2 from 'components/H2'; 9 | import type { Operation, Service } from 'generated/version/ServiceType'; 10 | 11 | import styles from 'application/components/request.css'; 12 | 13 | const Request = ({ 14 | operation, 15 | service, 16 | importedServices, 17 | }: { 18 | operation: Operation, 19 | service: Service, 20 | importedServices: Service[], 21 | }) => { 22 | const responseParameters = () => { 23 | if (operation.parameters && !!operation.parameters.length) { 24 | return ( 25 |
26 | 33 |
34 | ); 35 | } else return null; 36 | }; 37 | const body = () => { 38 | if (operation.body) { 39 | const baseModel = operation.body.type; 40 | return ( 41 |
42 |

Request Body

43 |
44 | {}} 51 | /> 52 |
53 |
54 | ); 55 | } else return null; 56 | }; 57 | 58 | return ( 59 |
60 | {responseParameters()} 61 | {body()} 62 |
63 | ); 64 | }; 65 | 66 | export default Request; 67 | 68 | export { styles }; 69 | -------------------------------------------------------------------------------- /src/application/components/ResourceCard.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import classnames from 'classnames'; 4 | 5 | import Markdown from 'components/Markdown'; 6 | 7 | import styles from 'application/components/resource-card.css'; 8 | 9 | const ResourceCard = ( 10 | { 11 | method, 12 | path, 13 | click, 14 | description, 15 | }: { 16 | method: string, 17 | path: string, 18 | click?: Function, 19 | description?: string, 20 | } = {} 21 | ) => { 22 | const methodClasses = classnames( 23 | styles.method, 24 | styles[method.toLowerCase()], 25 | description ? styles.isExpandedMethod : null 26 | ); 27 | const containerClasses = classnames( 28 | styles.container, 29 | click ? styles.isClick : null 30 | ); 31 | const pathClasses = classnames( 32 | styles.path, 33 | description ? styles.isExpandedPath : null 34 | ); 35 | 36 | return ( 37 | 54 | ); 55 | }; 56 | 57 | export default ResourceCard; 58 | 59 | export { styles }; 60 | -------------------------------------------------------------------------------- /src/application/components/Response.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import { onClickHref, buildNavHref, getType } from 'utils'; 5 | 6 | import H2 from 'components/H2'; 7 | import Markdown from 'components/Markdown'; 8 | import JsonDoc from 'application/components/JsonDoc/JsonDoc'; 9 | 10 | import type { Operation, Service } from 'generated/version/ServiceType'; 11 | 12 | import styles from 'application/components/response.css'; 13 | 14 | const Response = ({ 15 | operation, 16 | service, 17 | importedServices, 18 | orgKey, 19 | appKey, 20 | }: { 21 | operation: Operation, 22 | service: Service, 23 | importedServices: Service[], 24 | orgKey: string, 25 | appKey: string, 26 | }) => { 27 | const body = response => { 28 | if (response.type) { 29 | const baseModel = response.type; 30 | // TODO make this better, perhaps use isInImportOrService? 31 | const rawValue = response.type === 'string' || 32 | response.type === 'integer' || 33 | response.type === 'number' 34 | ? `${response.code.integer.value}` 35 | : ''; 36 | const formattedRawValue = response.type === 'string' 37 | ? `"${rawValue}"` 38 | : rawValue; 39 | return ( 40 |
41 | 55 |
56 | ); 57 | } else return null; 58 | }; 59 | 60 | return ( 61 |
62 | {operation.responses.map(response => ( 63 |
64 |

{`${response.code.integer.value} Response`}

67 | 71 | {body(response)} 72 |
73 | ))} 74 |
75 | ); 76 | }; 77 | 78 | export default Response; 79 | 80 | export { styles }; 81 | -------------------------------------------------------------------------------- /src/application/components/application-home.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .header { 4 | padding: 2rem 0 1rem 0; 5 | background: white; 6 | } 7 | 8 | .content { 9 | padding: 0 3rem; 10 | } 11 | 12 | .description { 13 | line-height: 2; 14 | margin: 0; 15 | } 16 | -------------------------------------------------------------------------------- /src/application/components/application.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .method { 4 | padding: 0 5rem; 5 | } 6 | 7 | .request { 8 | background: #FAFAFA; 9 | } 10 | 11 | .section-header { 12 | margin: 0; 13 | font-weight: 600; 14 | } 15 | -------------------------------------------------------------------------------- /src/application/components/enum.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .header { 4 | margin: 2rem 0 1rem 0; 5 | } 6 | 7 | .title { 8 | font-weight: 700; 9 | margin: 0 0 1rem 0; 10 | } 11 | 12 | .container { 13 | padding: 0 3rem; 14 | } 15 | 16 | .fields-container { 17 | padding: 0 1rem 1rem 1rem; 18 | border: 2px solid var(--color-concrete); 19 | border-bottom-right-radius: var(--border-radius); 20 | border-bottom-left-radius: var(--border-radius); 21 | } 22 | 23 | .description { 24 | margin: 0; 25 | } 26 | 27 | .json { 28 | padding: 1rem 0 1rem 0; 29 | } 30 | -------------------------------------------------------------------------------- /src/application/components/header.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | padding: 0 1rem 1rem 1rem; 5 | margin: 0 0 1rem 0; 6 | border: 2px solid var(--color-concrete); 7 | border-bottom-right-radius: var(--border-radius); 8 | border-bottom-left-radius: var(--border-radius); 9 | } 10 | 11 | .json { 12 | padding: 1rem 0 1rem 0; 13 | } 14 | -------------------------------------------------------------------------------- /src/application/components/model.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .header { 4 | margin: 2rem 0 1rem 0; 5 | } 6 | 7 | .title { 8 | font-weight: 700; 9 | margin: 0 0 1rem 0; 10 | } 11 | 12 | .container { 13 | padding: 0 3rem; 14 | } 15 | 16 | .fields-container { 17 | padding: 0 1rem 1rem 1rem; 18 | border: 2px solid var(--color-concrete); 19 | border-bottom-right-radius: var(--border-radius); 20 | border-bottom-left-radius: var(--border-radius); 21 | } 22 | 23 | .description { 24 | margin: 0; 25 | } 26 | 27 | .json { 28 | padding: 1rem 0 1rem 0; 29 | } 30 | -------------------------------------------------------------------------------- /src/application/components/operation.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .header { 4 | padding: 2rem 0 1rem 0; 5 | } 6 | 7 | .resource { 8 | padding: 0 0 1rem 0; 9 | } 10 | 11 | .content { 12 | padding: 0 3rem; 13 | } 14 | 15 | .description { 16 | padding: 1rem 0; 17 | } 18 | 19 | .link { 20 | color: inherit; 21 | text-decoration: none; 22 | 23 | @nest &:hover { 24 | opacity: 0.7; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/application/components/parameter-list-group.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | background: var(--color-concrete); 5 | padding: 1rem 0 1rem 0; 6 | border-radius: var(--border-radius); 7 | overflow: hidden; 8 | } 9 | 10 | .title { 11 | font-weight: 400; 12 | } 13 | 14 | .no-content { 15 | color: var(--color-very-light-gray); 16 | margin: 0; 17 | padding: 0.67rem 2rem; 18 | } 19 | -------------------------------------------------------------------------------- /src/application/components/parameter-list.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | font-family: var(--font-primary); 5 | font-weight: 300; 6 | display: flex; 7 | align-items: stretch; 8 | padding: 0 2rem 1.5rem 2rem; 9 | margin: 0 0 1.5rem 0; 10 | border-bottom: 2px solid white; 11 | 12 | @nest &:last-of-type { 13 | border-color: transparent; 14 | padding: 0 2rem; 15 | margin: 0; 16 | } 17 | } 18 | 19 | .pointer { 20 | cursor: pointer; 21 | } 22 | 23 | .meta { 24 | flex: 0 0 25%; 25 | max-width: 25%; 26 | margin: 0 2% 0 0; 27 | } 28 | 29 | .name { 30 | font-weight: 700; 31 | margin: 0; 32 | line-height: 1.5; 33 | } 34 | 35 | .type { 36 | font-weight: 400; 37 | max-width: 95%; 38 | overflow-x: hidden; 39 | text-overflow: ellipsis; 40 | margin: 0; 41 | color: var(--color-light-gray); 42 | line-height: 1.5; 43 | display: block; 44 | } 45 | 46 | .required { 47 | line-height: 1.5; 48 | font-weight: 400; 49 | margin: 0; 50 | color: var(--color-alert); 51 | } 52 | 53 | .info { 54 | flex: 0 0 73%; 55 | max-width: 73%; 56 | margin: 0; 57 | } 58 | 59 | .description { 60 | margin: 0 0 1rem 0; 61 | line-height: 1.5; 62 | } 63 | 64 | .no-content { 65 | color: var(--color-very-light-gray); 66 | margin: 0; 67 | } 68 | 69 | .sample { 70 | margin: 0 0 1rem 0; 71 | font-weight: 400; 72 | } 73 | 74 | .sample-title { 75 | font-weight: 700; 76 | text-decoration: none; 77 | display: inline-block; 78 | margin: 0 0.5rem 0 0; 79 | } 80 | -------------------------------------------------------------------------------- /src/application/components/request.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | padding: 0 1rem 1rem 1rem; 5 | margin: 0 0 1rem 0; 6 | border: 2px solid var(--color-concrete); 7 | border-bottom-right-radius: var(--border-radius); 8 | border-bottom-left-radius: var(--border-radius); 9 | } 10 | 11 | .json { 12 | padding: 1rem 0 1rem 0; 13 | } 14 | -------------------------------------------------------------------------------- /src/application/components/resource-card.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | margin: 0.75rem 0; 5 | } 6 | 7 | .is-click { 8 | cursor: pointer; 9 | } 10 | 11 | .flex { 12 | display: flex; 13 | } 14 | 15 | .left { 16 | flex: 0 0 10%; 17 | border-radius: var(--border-radius); 18 | } 19 | 20 | .method { 21 | padding: 0.67rem 1rem; 22 | border-top-left-radius: var(--border-radius); 23 | border-bottom-left-radius: var(--border-radius); 24 | text-transform: uppercase; 25 | letter-spacing: 0.05em; 26 | color: white; 27 | text-align: center; 28 | 29 | @nest &.get { 30 | background: var(--color-method-get); 31 | } 32 | 33 | @nest &.post { 34 | background: var(--color-method-post); 35 | } 36 | 37 | @nest &.put { 38 | background: var(--color-method-put); 39 | } 40 | 41 | @nest &.delete { 42 | background: var(--color-method-delete); 43 | } 44 | } 45 | 46 | .is-expanded-method { 47 | border-bottom-left-radius: 0; 48 | } 49 | 50 | .right { 51 | flex: 0 0 90%; 52 | } 53 | 54 | .path { 55 | display: block; 56 | margin: 0; 57 | background: var(--color-concrete); 58 | font-family: var(--font-code); 59 | padding: 0.67rem 1rem; 60 | border-top-right-radius: var(--border-radius); 61 | border-bottom-right-radius: var(--border-radius); 62 | } 63 | 64 | .is-expanded-path { 65 | border-bottom-right-radius: 0; 66 | } 67 | 68 | .description { 69 | padding: 0.67rem 2rem 0.67rem 11%; 70 | border: 2px solid var(--color-concrete); 71 | border-top-color: transparent; 72 | border-bottom-right-radius: var(--border-radius); 73 | border-bottom-left-radius: var(--border-radius); 74 | } 75 | -------------------------------------------------------------------------------- /src/application/components/response.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | margin: 0 0 1rem 0; 5 | padding: 0 0 1rem 1rem; 6 | border: 2px solid var(--color-concrete); 7 | border-bottom-right-radius: var(--border-radius); 8 | border-bottom-left-radius: var(--border-radius); 9 | } 10 | 11 | .description { 12 | padding: 0 0 1rem 0; 13 | } 14 | -------------------------------------------------------------------------------- /src/application/components/service.js: -------------------------------------------------------------------------------- 1 | export const service = { 2 | name: 'apidoc generator', 3 | description: 'This is an api', 4 | organization: { 5 | key: 'bryzek', 6 | }, 7 | application: { 8 | key: 'apidoc-generator', 9 | }, 10 | resources: [ 11 | { 12 | type: 'generator', 13 | plural: 'generators', 14 | operations: [ 15 | { 16 | method: 'GET', 17 | path: '/generators', 18 | parameters: [ 19 | { 20 | name: 'key', 21 | type: 'string', 22 | location: 'Query', 23 | required: false, 24 | description: 'Filter generators with this key', 25 | }, 26 | { 27 | name: 'limit', 28 | type: 'integer', 29 | location: 'Query', 30 | required: true, 31 | description: 'The number of records to return', 32 | default: '100', 33 | minimum: 0, 34 | }, 35 | { 36 | name: 'offset', 37 | type: 'integer', 38 | location: 'Query', 39 | required: true, 40 | description: 'Used to paginate. First page of results is 0.', 41 | default: '0', 42 | minimum: 0, 43 | }, 44 | ], 45 | responses: [ 46 | { 47 | code: { 48 | integer: { 49 | value: 200, 50 | }, 51 | }, 52 | type: '[generator]', 53 | }, 54 | ], 55 | attributes: [], 56 | description: 'Get all available generators', 57 | }, 58 | { 59 | method: 'GET', 60 | path: '/generators/:key', 61 | parameters: [ 62 | { 63 | name: 'key', 64 | type: 'string', 65 | location: 'Path', 66 | required: true, 67 | }, 68 | ], 69 | responses: [ 70 | { 71 | code: { 72 | integer: { 73 | value: 200, 74 | }, 75 | }, 76 | type: 'generator', 77 | }, 78 | { 79 | code: { 80 | integer: { 81 | value: 404, 82 | }, 83 | }, 84 | type: 'unit', 85 | }, 86 | ], 87 | attributes: [], 88 | description: 'Get generator with this key', 89 | }, 90 | ], 91 | attributes: [], 92 | path: '/generators', 93 | }, 94 | ], 95 | }; 96 | -------------------------------------------------------------------------------- /src/application/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { actions, actionTypes } from 'application/actions'; 3 | import { reducers } from 'application/reducers'; 4 | 5 | import Appln from 'application/components/Application'; 6 | 7 | const name = 'application'; 8 | 9 | export { name, actionTypes, actions, reducers, Appln }; 10 | -------------------------------------------------------------------------------- /src/application/reducers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { actionTypes } from 'generated/version'; 3 | 4 | import type { Service } from 'generated/version/ServiceType'; 5 | 6 | export type State = {| 7 | loaded: boolean, 8 | service?: Service, 9 | importedServices: Service[], 10 | |}; 11 | 12 | type Action = {| 13 | type: string, 14 | payload: any, // FIXME 15 | |}; 16 | 17 | const initialState: State = { 18 | loaded: false, 19 | importedServices: [], 20 | }; 21 | 22 | const application = (state: State = initialState, action: Action) => { 23 | switch (action.type) { 24 | case actionTypes.getByOrgkeyAndApplicationkeyAndVersion_success: { 25 | return { 26 | loaded: true, 27 | service: action.payload.service, 28 | importedServices: action.payload.importedServices, 29 | }; 30 | } 31 | case actionTypes.getByOrgkeyAndApplicationkeyAndVersion_doing: { 32 | return Object.assign(state, { 33 | loaded: false, 34 | }); 35 | } 36 | default: { 37 | return state; 38 | } 39 | } 40 | }; 41 | 42 | const reducers = { 43 | application, 44 | }; 45 | 46 | export { reducers }; 47 | -------------------------------------------------------------------------------- /src/components/Button/button.css: -------------------------------------------------------------------------------- 1 | @import 'variables.css'; 2 | 3 | :root { 4 | --spacing: 10px 10px; 5 | --bg-color: var(--color-primary); 6 | } 7 | 8 | .button-inner { 9 | background: var(--color-primary); 10 | outline: none; 11 | border: none; 12 | color: white; 13 | line-height: 32px; 14 | font-size: 14px; 15 | padding: 0 12px; 16 | border-radius: var(--border-radius); 17 | text-decoration: none; 18 | transition: all 0.3s; 19 | cursor: pointer; 20 | 21 | &:not(.disabled):hover { 22 | background: var(--color-primary-dark); 23 | } 24 | 25 | &.disabled { 26 | cursor: default; 27 | background: var(--color-very-light-gray); 28 | color: var(--color-light-gray); 29 | } 30 | } 31 | 32 | .button { 33 | text-decoration: none; 34 | border: none; 35 | } 36 | 37 | /* // Variations */ 38 | 39 | .button.loading { 40 | position: relative; 41 | padding-left: 42px; 42 | 43 | &::before { 44 | content: ""; 45 | position: absolute; 46 | top: 7px; 47 | left: 12px; 48 | width: 14px; 49 | height: 14px; 50 | border-radius: 50%; 51 | border: 2px solid white; 52 | border-bottom-color: rgba(0, 0, 0, 0); 53 | animation: rotate 1s linear infinite; 54 | } 55 | } 56 | 57 | /* // Component relations */ 58 | 59 | h1 + .button { margin-top: 30px; } 60 | h2 + .button { margin-top: 20px; } 61 | p + .button { margin-top: 20px; } 62 | .button + .button { margin-left: 10px; } 63 | -------------------------------------------------------------------------------- /src/components/Button/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | import styles from 'components/Button/button.css'; 3 | import classnames from 'classnames'; 4 | 5 | const Button = props => ( 6 |
7 | 13 |
14 | ); 15 | 16 | Button.propTypes = { 17 | children: PropTypes.node.isRequired, 18 | className: PropTypes.string, 19 | classNameInner: PropTypes.string, 20 | onClick: PropTypes.func.isRequired, 21 | target: PropTypes.string, 22 | }; 23 | 24 | export default Button; 25 | 26 | export { styles }; 27 | -------------------------------------------------------------------------------- /src/components/Content/content.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .content { 4 | position: fixed 50px 0 0 400px; 5 | width: calc(100% - 400px); 6 | padding: 0; 7 | font-family: var(--font-primary); 8 | overflow-y: auto; 9 | 10 | @nest &::-webkit-scrollbar { 11 | width: 0; 12 | background: transparent; 13 | } 14 | } 15 | 16 | .content-inner { 17 | padding: 0 0 1.25rem 0; 18 | width: 100%; 19 | min-height: calc(100% - 50px); 20 | } 21 | -------------------------------------------------------------------------------- /src/components/Content/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | 3 | import styles from 'components/Content/content.css'; 4 | 5 | const Content = props => ( 6 |
7 |
8 | {props.children} 9 |
10 |
11 | ); 12 | 13 | Content.propTypes = { 14 | children: PropTypes.node, 15 | }; 16 | 17 | export default Content; 18 | 19 | export { styles }; 20 | -------------------------------------------------------------------------------- /src/components/H1/h1.css: -------------------------------------------------------------------------------- 1 | @import 'variables.css'; 2 | 3 | :root { 4 | --spacing: 10px 10px; 5 | --bg-color: var(--color-primary); 6 | } 7 | 8 | .h1 { 9 | font-size: 2.5rem; 10 | color: var(--color-primary); 11 | font-weight: 700; 12 | font-family: var(--font-secondary); 13 | letter-spacing: 0.025em; 14 | margin: 0; 15 | } 16 | -------------------------------------------------------------------------------- /src/components/H1/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import styles from 'components/H1/h1.css'; 5 | 6 | const H1 = ({ className, children }) => ( 7 |

8 | {children} 9 |

10 | ); 11 | 12 | H1.propTypes = { 13 | children: PropTypes.node, 14 | className: PropTypes.string, 15 | }; 16 | 17 | export default H1; 18 | 19 | export { styles }; 20 | -------------------------------------------------------------------------------- /src/components/H2/h2.css: -------------------------------------------------------------------------------- 1 | @import 'variables.css'; 2 | 3 | :root { 4 | --bg-color: var(--color-primary); 5 | } 6 | 7 | .pointer { 8 | cursor: pointer; 9 | } 10 | 11 | .h2 { 12 | font-size: 24px; 13 | font-weight: 400; 14 | } 15 | -------------------------------------------------------------------------------- /src/components/H2/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import styles from 'components/H2/h2.css'; 5 | 6 | const H2 = ({ className, children, click }) => ( 7 |

11 | {children} 12 |

13 | ); 14 | 15 | H2.propTypes = { 16 | children: PropTypes.node.isRequired, 17 | className: PropTypes.string, 18 | click: PropTypes.func, 19 | }; 20 | 21 | export default H2; 22 | 23 | export { styles }; 24 | -------------------------------------------------------------------------------- /src/components/H3/h3.css: -------------------------------------------------------------------------------- 1 | @import 'variables.css'; 2 | 3 | :root { 4 | --bg-color: var(--color-primary); 5 | } 6 | 7 | .pointer { 8 | cursor: pointer; 9 | } 10 | 11 | .h3 { 12 | font-size: 18px; 13 | font-weight: 400; 14 | } 15 | -------------------------------------------------------------------------------- /src/components/H3/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import styles from 'components/H3/h3.css'; 5 | 6 | const H3 = ({ className, children, click }) => ( 7 |

11 | {children} 12 |

13 | ); 14 | 15 | H3.propTypes = { 16 | children: PropTypes.node.isRequired, 17 | className: PropTypes.string, 18 | click: PropTypes.func, 19 | }; 20 | 21 | export default H3; 22 | 23 | export { styles }; 24 | -------------------------------------------------------------------------------- /src/components/LoadingOverlay/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; 3 | import classnames from 'classnames'; 4 | 5 | import styles from 'components/LoadingOverlay/loading-overlay.css'; 6 | 7 | const LoadingOverlay = ( 8 | { 9 | isLoaded, 10 | children, 11 | }: { 12 | isLoaded: boolean, 13 | children?: React$Element<*>, 14 | } = {} 15 | ) => { 16 | const loader = ( 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ); 25 | return ( 26 | 33 | {isLoaded ?
{children}
: loader} 34 |
35 | ); 36 | }; 37 | 38 | export default LoadingOverlay; 39 | -------------------------------------------------------------------------------- /src/components/Markdown/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | import ReactMarkdown from 'react-markdown'; 3 | import classnames from 'classnames'; 4 | 5 | import styles from 'components/Markdown/markdown.css'; 6 | 7 | const Markdown = ({ source, className }) => ( 8 |
9 | 10 |
11 | ); 12 | 13 | Markdown.propTypes = { 14 | source: PropTypes.string.isRequired, 15 | className: PropTypes.string, 16 | }; 17 | 18 | export default Markdown; 19 | 20 | export { styles }; 21 | -------------------------------------------------------------------------------- /src/components/Markdown/markdown.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .markdown { 4 | @nest & p { 5 | font-size: 1rem; 6 | font-weight: 400; 7 | line-height: 1.6; 8 | margin: 0 0 1rem 0; 9 | 10 | @nest &:last-of-type { 11 | margin: 0; 12 | } 13 | } 14 | 15 | @nest & code { 16 | font-family: var(--font-code); 17 | display: inline-block; 18 | background: white; 19 | border-radius: 3px; 20 | color: var(--color-red); 21 | border: 1px solid var(--color-very-light-gray); 22 | line-height: 1.5; 23 | font-size: 0.85rem; 24 | padding: 0 0.25rem; 25 | } 26 | 27 | @nest & ul { 28 | list-style-type: none; 29 | padding: 0; 30 | margin: 0 0 0 0.2rem; 31 | font-size: 0; 32 | 33 | @nest & li { 34 | display: block; 35 | font-size: 1rem; 36 | font-weight: normal; 37 | padding: 0.25rem 0 0.25rem 1rem; 38 | margin: 0; 39 | line-height: 1.5; 40 | border-left: 2px solid var(--color-very-light-gray); 41 | } 42 | } 43 | 44 | @nest & a { 45 | text-decoration: none; 46 | color: var(--color-cool-blue); 47 | } 48 | 49 | @nest & h1, & h2 { 50 | font-size: 1rem; 51 | margin: 0 0 1rem 0; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/components/NavBar/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | 3 | import Button from 'components/Button'; 4 | import styles from 'components/NavBar/navbar.css'; 5 | 6 | const githubLink = () => ( 7 | 13 | 20 | 24 | 25 | 26 | ); 27 | 28 | const NavBar = ({ title, items, homeOnClick, removeGithubLink }) => ( 29 |
30 | {title} 31 |
32 | {items.map((item, id) => ( 33 | 36 | ))} 37 |
38 | {removeGithubLink ? null : githubLink()} 39 |
40 | ); 41 | 42 | NavBar.propTypes = { 43 | title: PropTypes.string.isRequired, 44 | items: PropTypes.array.isRequired, 45 | homeOnClick: PropTypes.func.isRequired, 46 | removeGithubLink: PropTypes.bool.isRequired, 47 | }; 48 | 49 | export default NavBar; 50 | 51 | export { styles }; 52 | -------------------------------------------------------------------------------- /src/components/NavBar/navbar.css: -------------------------------------------------------------------------------- 1 | @import 'variables.css'; 2 | 3 | :root { 4 | --spacing: 10px 10px; 5 | --bg-color: var(--color-primary); 6 | } 7 | 8 | .navbar { 9 | position: fixed; 10 | width: 100%; 11 | height: 50px; 12 | background: var(--color-primary); 13 | padding: 5px 20px; 14 | } 15 | 16 | .home { 17 | font-family: var(--font-secondary); 18 | text-transform: uppercase; 19 | color: white; 20 | padding: 5px 0; 21 | float: left; 22 | line-height: 2; 23 | cursor: pointer; 24 | letter-spacing: 0.05em; 25 | text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.1); 26 | width: 400px; 27 | } 28 | 29 | .breadcrumbs { 30 | float: left; 31 | } 32 | 33 | .github { 34 | padding-top: 2px; 35 | float: right; 36 | color: white; 37 | } 38 | 39 | .button { 40 | display: inline-block; 41 | line-height: 40px; 42 | padding-left: 10px; 43 | 44 | @nest &::before { 45 | content: '/'; 46 | color: white; 47 | position: relative 0 auto auto -10px; 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/components/SideBar/index.js: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import { simplifyName } from 'utils'; 5 | 6 | import styles from 'components/SideBar/sidebar.css'; 7 | 8 | const SidebarIcon = ({ item }) => { 9 | const iconClasses = classnames( 10 | styles[item.type.toLowerCase()], 11 | styles.icon, 12 | item.method ? styles[item.method.toLowerCase()] : null 13 | ); 14 | 15 | const markup = item.method ? item.method : item.type[0]; 16 | 17 | return
{markup}
; 18 | }; 19 | 20 | SidebarIcon.propTypes = { 21 | item: PropTypes.object.isRequired, 22 | }; 23 | 24 | const Item = ({ item }) => ( 25 |
30 | {item.path ? `${item.method} ${item.path}` : simplifyName(item.name)} 31 |
32 | ); 33 | 34 | Item.propTypes = { 35 | item: PropTypes.object.isRequired, 36 | }; 37 | 38 | const Groups = ({ group }) => ( 39 |
40 |

{group.name}

41 | {group.items.map((item, id) => )} 42 |
43 | ); 44 | 45 | Groups.propTypes = { 46 | group: PropTypes.object.isRequired, 47 | }; 48 | 49 | const Section = ({ section }) => ( 50 |
51 | 52 | {section.items.map((group, id) => )} 53 |
54 | ); 55 | 56 | Section.propTypes = { 57 | section: PropTypes.object.isRequired, 58 | }; 59 | 60 | const SideBar = ({ sections }) => ( 61 |
62 |
63 | {sections.map((section, id) =>
)} 64 |
65 |
66 | ); 67 | 68 | SideBar.propTypes = { 69 | sections: PropTypes.array.isRequired, 70 | }; 71 | 72 | export default SideBar; 73 | 74 | export { styles }; 75 | -------------------------------------------------------------------------------- /src/components/SideBar/sidebar.css: -------------------------------------------------------------------------------- 1 | @import 'variables.css'; 2 | 3 | :root { 4 | --spacing: 10px 10px; 5 | --bg-color: var(--color-primary); 6 | } 7 | 8 | .sidebar { 9 | position: fixed 50px auto 0 0; 10 | width: 400px; 11 | height: 100%; 12 | background: var(--color-tuatara); 13 | color: white; 14 | padding: 1.25rem; 15 | overflow-y: auto; 16 | } 17 | 18 | .sidebar-inner { 19 | padding-bottom: 1.25rem; 20 | min-height: calc(100% - 50px); 21 | } 22 | 23 | .icon { 24 | display: inline-block; 25 | margin-right: 0.4rem; 26 | border-radius: 3px; 27 | color: white; 28 | font-size: 0.5rem; 29 | padding: 0.25rem 0.25rem 0.35rem 0.25rem; 30 | text-align: center; 31 | line-height: 1.2; 32 | position: relative; 33 | top: -1px; 34 | } 35 | 36 | .get { 37 | background: var(--color-method-get); 38 | } 39 | 40 | .post { 41 | background: var(--color-method-post); 42 | } 43 | 44 | .put { 45 | background: var(--color-method-put); 46 | } 47 | 48 | .delete { 49 | line-height: 1.7; 50 | background: var(--color-method-delete); 51 | } 52 | 53 | .enum { 54 | background: var(--color-hawkes-blue); 55 | color: black; 56 | line-height: 1.5; 57 | } 58 | 59 | .model { 60 | background: var(--color-medium-persian-blue); 61 | color: white; 62 | } 63 | 64 | .a { 65 | color: white; 66 | display: block; 67 | padding: 0.5rem 0 0.5rem 0.75rem; 68 | margin: 0 0 0 0.25rem; 69 | font-family: var(--font-primary); 70 | text-decoration: none; 71 | border-left: 2px solid rgba(255, 255, 255, 0.5); 72 | position: relative; 73 | cursor: pointer; 74 | max-width: 100%; 75 | overflow: hidden; 76 | white-space: nowrap; 77 | 78 | @nest &:after { 79 | content: ''; 80 | position: absolute 0 0 0 0; 81 | background-image: linear-gradient(to right, transparent 90%, color(var(--color-tuatara) alpha(- 95%))); 82 | } 83 | 84 | @nest &:hover, .active { 85 | background: var(--color-primary); 86 | } 87 | } 88 | 89 | .group { 90 | margin: 0 0 2rem 0; 91 | 92 | @nest &:last-of-type { 93 | margin: 0; 94 | } 95 | } 96 | 97 | .h2 { 98 | font-family: var(--font-primary); 99 | margin: 0 0 0.5rem 0; 100 | font-weight: 400; 101 | max-width: 100%; 102 | overflow: hidden; 103 | white-space: nowrap; 104 | } 105 | 106 | .label { 107 | font-family: var(--font-secondary); 108 | font-weight: 700; 109 | text-transform: uppercase; 110 | letter-spacing: 0.05rem; 111 | color: var(--color-primary); 112 | display: block; 113 | margin: 0 0 0.5rem 0; 114 | } 115 | 116 | .section { 117 | margin: 0 0 2rem 0; 118 | } 119 | -------------------------------------------------------------------------------- /src/documentation/documentation.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | padding: 3rem; 5 | } 6 | 7 | .h1 { 8 | margin-bottom: 1rem; 9 | } 10 | -------------------------------------------------------------------------------- /src/documentation/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { bindActionCreators } from 'redux'; 4 | import { connect } from 'react-redux'; 5 | 6 | import { actions as docActions } from 'generated/documentation/getByRootUrlAndMarkdownPath'; 7 | 8 | import H1 from 'components/H1'; 9 | import LoadingOverlay from 'components/LoadingOverlay'; 10 | import Markdown from 'components/Markdown'; 11 | 12 | import styles from 'documentation/documentation.css'; 13 | 14 | import type { State as ApplicationState } from 'app/reducers'; 15 | import docs from '../../documents.json'; 16 | 17 | const allActions = Object.assign({}, docActions); 18 | 19 | type Props = {| 20 | loaded: boolean, 21 | params: Object, // FIXME 22 | actions: Object, // FIXME 23 | markdown: string, 24 | |}; 25 | 26 | class Documentation extends Component { 27 | props: Props; 28 | 29 | componentWillMount() { 30 | const document = docs.organizations[ 31 | this.props.params.organizationKey 32 | ].documents.filter( 33 | doc => doc.slug === this.props.params.documentationKey 34 | )[0]; 35 | this.props.actions.getByRootUrlAndMarkdownPath_get({ 36 | rootUrl: document.rootUrl, 37 | markdownPath: document.markdownPath, 38 | }); 39 | } 40 | 41 | componentWillReceiveProps(nextProps) { 42 | if ( 43 | this.props.params.documentationKey !== nextProps.params.documentationKey 44 | ) { 45 | const document = docs.organizations[ 46 | nextProps.params.organizationKey 47 | ].documents.filter( 48 | doc => doc.slug === nextProps.params.documentationKey 49 | )[0]; 50 | this.props.actions.getByRootUrlAndMarkdownPath_get({ 51 | rootUrl: document.rootUrl, 52 | markdownPath: document.markdownPath, 53 | }); 54 | } 55 | } 56 | 57 | render() { 58 | const document = docs.organizations[ 59 | this.props.params.organizationKey 60 | ].documents.filter( 61 | doc => doc.slug === this.props.params.documentationKey 62 | )[0]; 63 | return ( 64 | 65 |
66 |
67 |

68 | {document.name} 69 |

70 | 74 |
75 |
76 |
77 | ); 78 | } 79 | } 80 | 81 | const mapStateToProps = (state: ApplicationState) => ({ 82 | markdown: state.documentation.markdown, 83 | loaded: state.documentation.loaded, 84 | }); 85 | 86 | const mapDispatchToProps = (dispatch): { [key: string]: Function } => ({ 87 | actions: bindActionCreators(allActions, dispatch), 88 | }); 89 | 90 | export default connect(mapStateToProps, mapDispatchToProps)(Documentation); 91 | 92 | export { styles }; 93 | -------------------------------------------------------------------------------- /src/documentation/reducers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { actionTypes } from 'generated/documentation/getByRootUrlAndMarkdownPath'; 3 | 4 | export type State = { 5 | loaded: boolean, 6 | markdown?: string, 7 | }; 8 | 9 | type Action = {| 10 | type: string, 11 | payload: any, // FIXME 12 | |}; 13 | 14 | const initialState: State = { 15 | loaded: false, 16 | }; 17 | 18 | const documentation = (state: State = initialState, action: Action) => { 19 | switch (action.type) { 20 | // Get documentation 21 | case actionTypes.getByRootUrlAndMarkdownPath_success: { 22 | return { 23 | markdown: action.payload, 24 | loaded: true, 25 | }; 26 | } 27 | case actionTypes.getByRootUrlAndMarkdownPath_doing: { 28 | return { 29 | loaded: false, 30 | markdown: state.markdown, 31 | }; 32 | } 33 | case actionTypes.getByRootUrlAndMarkdownPath_failure: { 34 | return { 35 | loaded: true, 36 | markdown: state.markdown, 37 | }; 38 | } 39 | default: { 40 | return state; 41 | } 42 | } 43 | }; 44 | 45 | const reducers = { 46 | documentation, 47 | }; 48 | 49 | export { reducers }; 50 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apicollective/ui/0324e73e4b750d1c59302e0ad85d87ab772fb8dc/src/favicon.ico -------------------------------------------------------------------------------- /src/generated/application/getByOrgkey.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | /* eslint-disable max-len */ 3 | 4 | import { takeEvery, takeLatest } from 'redux-saga'; 5 | import { call, put } from 'redux-saga/effects'; 6 | import * as request from 'superagent'; 7 | 8 | function api({ orgKey, name, guid, key, has_version, limit, offset } = {}) { 9 | return request.get(`${process.env.APIDOC_HOST}/${orgKey}`); 10 | } 11 | 12 | const actionTypes = { 13 | getByOrgkey_get: 'getByOrgkey/get', 14 | getByOrgkey_doing: 'getByOrgkey/doing', 15 | getByOrgkey_success: 'getByOrgkey/success', 16 | getByOrgkey_failure: 'getByOrgkey/failure', 17 | }; 18 | 19 | const actions = { 20 | /** 21 | * Search all applications. Results are always paginated. 22 | * @param {string} orgKey - The organization key for which to search applications 23 | * @param {string=} name - The name of an application. Case in-sensitive. Exact match (Optional) 24 | * @param {uuid=} guid - The guid of an application. Exact match (Optional) 25 | * @param {string=} key - The key of an application. Case in-sensitive. Exact match (Optional) 26 | * @param {boolean=} has_version - If true, we return applications that have at least one version. If false, we return applications that have no versions in the system (Optional) 27 | * @param {long} limit - The number of records to return 28 | * @param {long} offset - Used to paginate. First page of results is 0. 29 | */ 30 | getByOrgkey_get: ( 31 | { orgKey, name, guid, key, has_version, limit, offset } = {} 32 | ) => ({ 33 | type: actionTypes.getByOrgkey_get, 34 | payload: { 35 | orgKey, 36 | name, 37 | guid, 38 | key, 39 | has_version, 40 | limit, 41 | offset, 42 | }, 43 | }), 44 | getByOrgkey_doing: () => ({ 45 | type: actionTypes.getByOrgkey_doing, 46 | }), 47 | getByOrgkey_success: response => ({ 48 | type: actionTypes.getByOrgkey_success, 49 | payload: response, 50 | }), 51 | getByOrgkey_failure: err => ({ 52 | type: actionTypes.getByOrgkey_failure, 53 | payload: err, 54 | error: true, 55 | }), 56 | }; 57 | 58 | function* saga(action) { 59 | try { 60 | yield put(actions.getByOrgkey_doing()); 61 | const { body } = yield call(api, action.payload); 62 | yield put(actions.getByOrgkey_success(body)); 63 | } catch (error) { 64 | yield put(actions.getByOrgkey_failure(error)); 65 | } 66 | } 67 | 68 | /** 69 | * Start this saga if you'd prefer to process every action 70 | */ 71 | function* takeEverySaga() { 72 | yield* takeEvery(actionTypes.getByOrgkey_get, saga); 73 | } 74 | 75 | /** 76 | * Start this saga if you'd prefer to process only the latest action 77 | */ 78 | function* takeLatestSaga() { 79 | yield* takeLatest(actionTypes.getByOrgkey_get, saga); 80 | } 81 | 82 | export { actions, actionTypes, api, saga, takeEverySaga, takeLatestSaga }; 83 | -------------------------------------------------------------------------------- /src/generated/docs/getHighLevelDocs.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | /* eslint-disable max-len */ 3 | 4 | import { takeEvery, takeLatest } from 'redux-saga'; 5 | import { call, put } from 'redux-saga/effects'; 6 | import * as request from 'superagent'; 7 | 8 | function api({ orgKey, name, guid, key, has_version, limit, offset } = {}) { 9 | return request.get(`${process.env.APIDOC_HOST}/docs/${orgKey}`); 10 | } 11 | 12 | const actionTypes = { 13 | getHighLevelDocs_get: 'getHighLevelDocs/get', 14 | getHighLevelDocs_doing: 'getHighLevelDocs/doing', 15 | getHighLevelDocs_success: 'getHighLevelDocs/success', 16 | getHighLevelDocs_failure: '/failure', 17 | }; 18 | 19 | const actions = { 20 | /** 21 | * Search all applications. Results are always paginated. 22 | * @param {string} orgKey - The organization key for which to search applications 23 | * @param {string=} name - The name of an application. Case in-sensitive. Exact match (Optional) 24 | * @param {uuid=} guid - The guid of an application. Exact match (Optional) 25 | * @param {string=} key - The key of an application. Case in-sensitive. Exact match (Optional) 26 | * @param {boolean=} has_version - If true, we return applications that have at least one version. If false, we return applications that have no versions in the system (Optional) 27 | * @param {long} limit - The number of records to return 28 | * @param {long} offset - Used to paginate. First page of results is 0. 29 | */ 30 | getHighLevelDocs_get: ( 31 | { orgKey, name, guid, key, has_version, limit, offset } = {} 32 | ) => ({ 33 | type: actionTypes.getHighLevelDocs_get, 34 | payload: { 35 | orgKey, 36 | }, 37 | }), 38 | getHighLevelDocs_doing: () => ({ 39 | type: actionTypes.getHighLevelDocs_doing, 40 | }), 41 | getHighLevelDocs_success: response => ({ 42 | type: actionTypes.getHighLevelDocs_success, 43 | payload: response, 44 | }), 45 | getHighLevelDocs_failure: err => ({ 46 | type: actionTypes.getHighLevelDocs_failure, 47 | payload: err, 48 | error: true, 49 | }), 50 | }; 51 | 52 | function* saga(action) { 53 | try { 54 | yield put(actions.getHighLevelDocs_doing()); 55 | const { body } = yield call(api, action.payload); 56 | yield put(actions.getHighLevelDocs_success(body)); 57 | } catch (error) { 58 | yield put(actions.getHighLevelDocs_failure(error)); 59 | } 60 | } 61 | 62 | /** 63 | * Start this saga if you'd prefer to process every action 64 | */ 65 | function* takeEverySaga() { 66 | yield* takeEvery(actionTypes.getHighLevelDocs_get, saga); 67 | } 68 | 69 | /** 70 | * Start this saga if you'd prefer to process only the latest action 71 | */ 72 | function* takeLatestSaga() { 73 | yield* takeLatest(actionTypes.getHighLevelDocs_get, saga); 74 | } 75 | 76 | export { actions, actionTypes, api, saga, takeEverySaga, takeLatestSaga }; 77 | -------------------------------------------------------------------------------- /src/generated/documentation/getByRootUrlAndMarkdownPath.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | /* eslint-disable max-len */ 3 | 4 | import { takeEvery, takeLatest } from 'redux-saga'; 5 | import { call, put } from 'redux-saga/effects'; 6 | import * as request from 'superagent'; 7 | import { resolve } from 'url'; 8 | 9 | function api({ rootUrl, markdownPath } = {}) { 10 | const url = resolve(rootUrl, markdownPath); 11 | return request.get(url); 12 | } 13 | 14 | const actionTypes = { 15 | getByRootUrlAndMarkdownPath_get: 'getByRootUrlAndMarkdownPath/get', 16 | getByRootUrlAndMarkdownPath_doing: 'getByRootUrlAndMarkdownPath/doing', 17 | getByRootUrlAndMarkdownPath_success: 'getByRootUrlAndMarkdownPath/success', 18 | getByRootUrlAndMarkdownPath_failure: 'getByRootUrlAndMarkdownPath/failure', 19 | }; 20 | 21 | const actions = { 22 | getByRootUrlAndMarkdownPath_get: ({ rootUrl, markdownPath } = {}) => ({ 23 | type: actionTypes.getByRootUrlAndMarkdownPath_get, 24 | payload: { 25 | rootUrl, 26 | markdownPath, 27 | }, 28 | }), 29 | getByRootUrlAndMarkdownPath_doing: () => ({ 30 | type: actionTypes.getByRootUrlAndMarkdownPath_doing, 31 | }), 32 | getByRootUrlAndMarkdownPath_success: response => ({ 33 | type: actionTypes.getByRootUrlAndMarkdownPath_success, 34 | payload: response, 35 | }), 36 | getByRootUrlAndMarkdownPath_failure: err => ({ 37 | type: actionTypes.getByRootUrlAndMarkdownPath_failure, 38 | payload: err, 39 | error: true, 40 | }), 41 | }; 42 | 43 | function* saga(action) { 44 | try { 45 | const rootUrl = action.payload.rootUrl; 46 | yield put(actions.getByRootUrlAndMarkdownPath_doing()); 47 | const { text } = yield call(api, action.payload); 48 | 49 | const imagesRegex = /!\[(.*)]\(/gi; 50 | const textWithImages = text.replace(imagesRegex, `![$1](${rootUrl}`); 51 | 52 | yield put(actions.getByRootUrlAndMarkdownPath_success(textWithImages)); 53 | } catch (error) { 54 | yield put(actions.getByRootUrlAndMarkdownPath_failure(error)); 55 | } 56 | } 57 | 58 | /** 59 | * Start this saga if you'd prefer to process every action 60 | */ 61 | function* takeEverySaga() { 62 | yield* takeEvery(actionTypes.getByRootUrlAndMarkdownPath_get, saga); 63 | } 64 | 65 | /** 66 | * Start this saga if you'd prefer to process only the latest action 67 | */ 68 | function* takeLatestSaga() { 69 | yield* takeLatest(actionTypes.getByRootUrlAndMarkdownPath_get, saga); 70 | } 71 | 72 | export { actions, actionTypes, api, saga, takeEverySaga, takeLatestSaga }; 73 | -------------------------------------------------------------------------------- /src/generated/organization/getOrganizations.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | /* eslint-disable max-len */ 3 | 4 | import { takeEvery, takeLatest } from 'redux-saga'; 5 | import { call, put } from 'redux-saga/effects'; 6 | import * as request from 'superagent'; 7 | 8 | function api({ guid, user_guid, key, name, namespace, limit, offset } = {}) { 9 | return request.get(`${process.env.APIDOC_HOST}/organizations`); 10 | } 11 | 12 | // FIXME - eg of types 13 | /* declare type Response = 'yes' | 'no' | 'maybe';*/ 14 | const actionTypes = { 15 | getOrganizations_get: 'getOrganizations/get', 16 | getOrganizations_doing: 'getOrganizations/doing', 17 | getOrganizations_success: 'getOrganizations/success', 18 | getOrganizations_failure: 'getOrganizations/failure', 19 | }; 20 | 21 | const actions = { 22 | /** 23 | * Search all organizations. Results are always paginated. 24 | * @param {uuid=} guid - Finds the organization with this guid, if any (Optional) 25 | * @param {uuid=} user_guid - If specified, restricts to organizations that this user is specifically a member of (e.g. will exclude public organizations with which the user does not have a direct membership). (Optional) 26 | * @param {string=} key - Find organizations with this key. Case in-sensitive. Exact match (Optional) 27 | * @param {string=} name - Find organizations with this name. Case in-sensitive. Exact match (Optional) 28 | * @param {string=} namespace - Find organizations with this namespace. Case in-sensitive. Exact match (Optional) 29 | * @param {long} limit - The number of records to return 30 | * @param {long} offset - Used to paginate. First page of results is 0. 31 | */ 32 | getOrganizations_get: ( 33 | { guid, user_guid, key, name, namespace, limit, offset } = {} 34 | ) => ({ 35 | type: actionTypes.getOrganizations_get, 36 | payload: { 37 | guid, 38 | user_guid, 39 | key, 40 | name, 41 | namespace, 42 | limit, 43 | offset, 44 | }, 45 | }), 46 | getOrganizations_doing: () => ({ 47 | type: actionTypes.getOrganizations_doing, 48 | }), 49 | getOrganizations_success: response => ({ 50 | type: actionTypes.getOrganizations_success, 51 | payload: response, 52 | }), 53 | getOrganizations_failure: err => ({ 54 | type: actionTypes.getOrganizations_failure, 55 | payload: err, 56 | error: true, 57 | }), 58 | }; 59 | 60 | function* saga(action) { 61 | try { 62 | yield put(actions.getOrganizations_doing()); 63 | const { body } = yield call(api, action.payload); 64 | yield put(actions.getOrganizations_success(body)); 65 | } catch (error) { 66 | yield put(actions.getOrganizations_failure(error)); 67 | } 68 | } 69 | 70 | /** 71 | * Start this saga if you'd prefer to process every action 72 | */ 73 | function* takeEverySaga() { 74 | yield* takeEvery(actionTypes.getOrganizations_get, saga); 75 | } 76 | 77 | /** 78 | * Start this saga if you'd prefer to process only the latest action 79 | */ 80 | function* takeLatestSaga() { 81 | yield* takeLatest(actionTypes.getOrganizations_get, saga); 82 | } 83 | 84 | export { actions, actionTypes, api, saga, takeEverySaga, takeLatestSaga }; 85 | -------------------------------------------------------------------------------- /src/generated/organization/getOrganizationsByKey.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | 3 | import { takeEvery, takeLatest } from 'redux-saga'; 4 | import { call, put } from 'redux-saga/effects'; 5 | import * as request from 'superagent'; 6 | 7 | function api({ key } = {}) { 8 | return request.get(`${process.env.APIDOC_HOST}/organizations/${key}`); 9 | } 10 | 11 | const actionTypes = { 12 | getOrganizationsByKey_get: 'getOrganizationsByKey/get', 13 | getOrganizationsByKey_doing: 'getOrganizationsByKey/doing', 14 | getOrganizationsByKey_success: 'getOrganizationsByKey/success', 15 | getOrganizationsByKey_failure: 'getOrganizationsByKey/failure', 16 | }; 17 | 18 | const actions = { 19 | /** 20 | * Returns the organization with this key. 21 | * @param {string} key - 22 | */ 23 | getOrganizationsByKey_get: key => ({ 24 | type: actionTypes.getOrganizationsByKey_get, 25 | payload: { 26 | key, 27 | }, 28 | }), 29 | getOrganizationsByKey_doing: () => ({ 30 | type: actionTypes.getOrganizationsByKey_doing, 31 | }), 32 | getOrganizationsByKey_success: response => ({ 33 | type: actionTypes.getOrganizationsByKey_success, 34 | payload: response, 35 | }), 36 | getOrganizationsByKey_failure: err => ({ 37 | type: actionTypes.getOrganizationsByKey_failure, 38 | payload: err, 39 | error: true, 40 | }), 41 | }; 42 | 43 | function* saga(action) { 44 | try { 45 | yield put(actions.getOrganizationsByKey_doing()); 46 | const { body } = yield call(api, action.payload); 47 | yield put(actions.getOrganizationsByKey_success(body)); 48 | } catch (error) { 49 | yield put(actions.getOrganizationsByKey_failure(error)); 50 | } 51 | } 52 | 53 | /** 54 | * Start this saga if you'd prefer to process every action 55 | */ 56 | function* takeEverySaga() { 57 | yield* takeEvery(actionTypes.getOrganizationsByKey_get, saga); 58 | } 59 | 60 | /** 61 | * Start this saga if you'd prefer to process only the latest action 62 | */ 63 | function* takeLatestSaga() { 64 | yield* takeLatest(actionTypes.getOrganizationsByKey_get, saga); 65 | } 66 | 67 | export { actions, actionTypes, api, saga, takeEverySaga, takeLatestSaga }; 68 | -------------------------------------------------------------------------------- /src/generated/organization/index.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | 3 | import * as getOrganizations from 'generated/organization/getOrganizations'; 4 | 5 | const actionTypes = Object.assign({}, getOrganizations.actionTypes); 6 | 7 | const actions = Object.assign({}, getOrganizations.actions); 8 | 9 | const sagas = { 10 | getOrganizationsTakeEverySaga: getOrganizations.takeEverySaga, 11 | getOrganizationsTakeLatestSaga: getOrganizations.takeLatestSaga, 12 | }; 13 | 14 | export { actionTypes, actions, sagas }; 15 | -------------------------------------------------------------------------------- /src/generated/version/ServiceType.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | // THIS FILE WILL BE GENERATED in the future 3 | 4 | export type Header = {| 5 | name: string, 6 | type: string, 7 | required: boolean, 8 | description?: string, 9 | default?: string, 10 | |}; 11 | 12 | export type Organization = {| 13 | key: string, 14 | name: string, 15 | description?: string, 16 | |}; 17 | 18 | export type Application = {| 19 | key: string, 20 | name: string, 21 | description?: string, 22 | |}; 23 | 24 | export type Import = {| 25 | uri: string, 26 | namespace: string, 27 | organization: Organization, 28 | application: Application, 29 | version: string, 30 | enums: string[], 31 | unions: string[], 32 | models: string[], 33 | |}; 34 | 35 | export type EnumValue = {| 36 | name: string, 37 | description?: string, 38 | |}; 39 | 40 | export type Enum = {| 41 | name: string, 42 | plural: string, 43 | description?: string, 44 | values: EnumValue[], 45 | |}; 46 | 47 | export type UnionType = {| 48 | type: string, 49 | description?: string, 50 | |}; 51 | 52 | export type Union = {| 53 | name: string, 54 | plural: string, 55 | descriminator?: string, 56 | description?: string, 57 | types: UnionType[], 58 | |}; 59 | 60 | export type Field = {| 61 | name: string, 62 | type: string, 63 | description?: string, 64 | default?: string, 65 | required?: boolean, 66 | minimum?: number, 67 | maximum?: number, 68 | example?: string, 69 | |}; 70 | 71 | export type Model = {| 72 | name: string, 73 | plural: string, 74 | description?: string, 75 | fields: Field[], 76 | |}; 77 | 78 | export type Method = string; 79 | 80 | export type Parameter = {| 81 | name: string, 82 | type: string, 83 | location: string, 84 | description?: string, 85 | required?: boolean, 86 | default?: string, 87 | minimum?: number, 88 | maximum?: number, 89 | example?: string, 90 | |}; 91 | 92 | export type Integer = {| 93 | value: number, 94 | |}; 95 | 96 | export type Code = {| 97 | integer: Integer, 98 | |}; 99 | 100 | export type Response = {| 101 | code: Code, 102 | type: string, 103 | description?: string, 104 | |}; 105 | 106 | export type Body = {| 107 | type: string, 108 | description: ?string, 109 | |}; 110 | 111 | export type Operation = {| 112 | method: Method, 113 | path: string, 114 | description?: string, 115 | body?: Body, 116 | parameters: Parameter[], 117 | responses: Response[], 118 | |}; 119 | 120 | export type Resource = {| 121 | type: string, 122 | plural: string, 123 | path?: string, 124 | description?: string, 125 | operations: Operation[], 126 | |}; 127 | 128 | export type Service = {| 129 | name: string, 130 | organization: Organization, 131 | application: Application, 132 | namespace: string, 133 | version: string, 134 | headers: Header[], 135 | imports: Import[], 136 | enums: Enum[], 137 | unions: Union[], 138 | models: Model[], 139 | resources: Resource[], 140 | |}; 141 | -------------------------------------------------------------------------------- /src/generated/version/getByOrgkeyAndApplicationkeyAndVersion.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | /* eslint-disable max-len */ 3 | 4 | import { takeEvery, takeLatest } from 'redux-saga'; 5 | import { call, put } from 'redux-saga/effects'; 6 | import * as request from 'superagent'; 7 | 8 | // import exampleService from 'exampleService.json'; 9 | 10 | function api({ orgKey, applicationKey, version } = {}) { 11 | return request.get( 12 | `${process.env.APIDOC_HOST}/${orgKey}/${applicationKey}/latest` 13 | ); 14 | // return new Promise((resolve) => { 15 | // resolve(exampleService); 16 | // }); 17 | } 18 | 19 | const actionTypes = { 20 | getByOrgkeyAndApplicationkeyAndVersion_get: 'getByOrgkeyAndApplicationkeyAndVersion/get', 21 | getByOrgkeyAndApplicationkeyAndVersion_doing: 'getByOrgkeyAndApplicationkeyAndVersion/doing', 22 | getByOrgkeyAndApplicationkeyAndVersion_success: 'getByOrgkeyAndApplicationkeyAndVersion/success', 23 | getByOrgkeyAndApplicationkeyAndVersion_failure: 'getByOrgkeyAndApplicationkeyAndVersion/failure', 24 | }; 25 | 26 | const actions = { 27 | /** 28 | * Retrieve a specific version of an application. 29 | * @param {string} orgKey - 30 | * @param {string} applicationKey - 31 | * @param {string} version - The version of tthis application to download, or the keyword latest to get the latest version 32 | */ 33 | getByOrgkeyAndApplicationkeyAndVersion_get: ( 34 | { orgKey, applicationKey, version } = {} 35 | ) => ({ 36 | type: actionTypes.getByOrgkeyAndApplicationkeyAndVersion_get, 37 | payload: { 38 | orgKey, 39 | applicationKey, 40 | version, 41 | }, 42 | }), 43 | getByOrgkeyAndApplicationkeyAndVersion_doing: () => ({ 44 | type: actionTypes.getByOrgkeyAndApplicationkeyAndVersion_doing, 45 | }), 46 | getByOrgkeyAndApplicationkeyAndVersion_success: payload => ({ 47 | type: actionTypes.getByOrgkeyAndApplicationkeyAndVersion_success, 48 | payload, 49 | }), 50 | getByOrgkeyAndApplicationkeyAndVersion_failure: err => ({ 51 | type: actionTypes.getByOrgkeyAndApplicationkeyAndVersion_failure, 52 | payload: err, 53 | error: true, 54 | }), 55 | }; 56 | 57 | const namespaceEntities = (namespace, entities, entityType) => 58 | entities.map(entity => 59 | Object.assign(entity, { 60 | name: `${namespace}.${entityType}.${entity.name}`, 61 | plural: `${namespace}.${entityType}.${entity.plural}`, 62 | }) 63 | ); 64 | 65 | function* saga(action) { 66 | try { 67 | yield put(actions.getByOrgkeyAndApplicationkeyAndVersion_doing()); 68 | const { body } = yield call(api, action.payload); 69 | const calls = body.service.imports.map(importValue => 70 | call(api, { 71 | orgKey: importValue.organization.key, 72 | applicationKey: importValue.application.key, 73 | version: importValue.version, 74 | }) 75 | ); 76 | const results = yield calls; 77 | body.importedServices = results.map(result => { 78 | const service = result.body.service; 79 | namespaceEntities(service.namespace, service.models, 'models'); 80 | namespaceEntities(service.namespace, service.enums, 'enums'); 81 | return service; 82 | }); 83 | 84 | yield put(actions.getByOrgkeyAndApplicationkeyAndVersion_success(body)); 85 | } catch (error) { 86 | yield put(actions.getByOrgkeyAndApplicationkeyAndVersion_failure(error)); 87 | } 88 | } 89 | 90 | /** 91 | * Start this saga if you'd prefer to process every action 92 | */ 93 | function* takeEverySaga() { 94 | yield* takeEvery( 95 | actionTypes.getByOrgkeyAndApplicationkeyAndVersion_get, 96 | saga 97 | ); 98 | } 99 | 100 | /** 101 | * Start this saga if you'd prefer to process only the latest action 102 | */ 103 | function* takeLatestSaga() { 104 | yield* takeLatest( 105 | actionTypes.getByOrgkeyAndApplicationkeyAndVersion_get, 106 | saga 107 | ); 108 | } 109 | 110 | export { actions, actionTypes, api, saga, takeEverySaga, takeLatestSaga }; 111 | -------------------------------------------------------------------------------- /src/generated/version/getByOrgkeyAndApplicationkeyAndVersion.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import type { Service, Model, Field } from 'generated/version/ServiceType'; 4 | 5 | declare export var actionTypes: { 6 | getByOrgkeyAndApplicationkeyAndVersion_get: string, 7 | getByOrgkeyAndApplicationkeyAndVersion_doing: string, 8 | getByOrgkeyAndApplicationkeyAndVersion_success: string, 9 | getByOrgkeyAndApplicationkeyAndVersion_failure: string, 10 | }; 11 | 12 | declare type Query = { 13 | orgKey: string, 14 | applicationKey: string, 15 | version?: string 16 | }; 17 | 18 | declare type Result = { 19 | type: string, 20 | payload: Query, 21 | error?: boolean 22 | }; 23 | 24 | declare export var actions: { 25 | /** 26 | * Retrieve a specific version of an application. 27 | * @param {string} orgKey - 28 | * @param {string} applicationKey - 29 | * @param {string} version - The version of tthis application to download, or the keyword latest to get the latest version 30 | */ 31 | getByOrgkeyAndApplicationkeyAndVersion_get: (query: Query) => Result; 32 | 33 | getByOrgkeyAndApplicationkeyAndVersion_doing: () => {type: string}; 34 | 35 | getByOrgkeyAndApplicationkeyAndVersion_success: (results: Array) => Result; 36 | 37 | getByOrgkeyAndApplicationkeyAndVersion_failure: (err: Object) => Result; 38 | }; 39 | 40 | declare export function api(parmas: Query): Promise<*>; 41 | -------------------------------------------------------------------------------- /src/generated/version/index.js: -------------------------------------------------------------------------------- 1 | // This file is generated 2 | 3 | import * as getByOrgkeyAndApplicationkeyAndVersion 4 | from 'generated/version/getByOrgkeyAndApplicationkeyAndVersion'; 5 | 6 | const actionTypes = Object.assign( 7 | {}, 8 | getByOrgkeyAndApplicationkeyAndVersion.actionTypes 9 | ); 10 | 11 | const actions = Object.assign( 12 | {}, 13 | getByOrgkeyAndApplicationkeyAndVersion.actions 14 | ); 15 | 16 | const sagas = { 17 | getByOrgkeyAndApplicationkeyAndVersionTakeEverySaga: getByOrgkeyAndApplicationkeyAndVersion.takeEverySaga, 18 | getByOrgkeyAndApplicationkeyAndVersionLatestSaga: getByOrgkeyAndApplicationkeyAndVersion.takeLatestSaga, 19 | }; 20 | 21 | export { actionTypes, actions, sagas }; 22 | -------------------------------------------------------------------------------- /src/home/HomeCard.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import Markdown from 'components/Markdown'; 5 | import { onClickHref } from 'utils'; 6 | 7 | import styles from 'home/home-card.css'; 8 | 9 | const HomeCard = ( 10 | { 11 | name, 12 | description, 13 | link, 14 | }: { 15 | name: string, 16 | description?: string, 17 | link: string, 18 | } = {} 19 | ) => 20 | ; 32 | 33 | export default HomeCard; 34 | 35 | export { styles }; 36 | -------------------------------------------------------------------------------- /src/home/home-card.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | border-radius: var(--border-radius); 5 | cursor: pointer; 6 | } 7 | 8 | .name { 9 | margin: 0; 10 | background: var(--color-concrete); 11 | border-top-left-radius: var(--border-radius); 12 | border-top-right-radius: var(--border-radius); 13 | font-size: 1.75rem; 14 | padding: 0.67rem 1rem; 15 | color: var(--color-cool-blue); 16 | } 17 | 18 | .no-content { 19 | color: var(--color-very-light-gray); 20 | margin: 0; 21 | } 22 | 23 | .description { 24 | border: 2px solid var(--color-concrete); 25 | border-bottom-left-radius: var(--border-radius); 26 | border-bottom-right-radius: var(--border-radius); 27 | padding: 0.67rem 1rem; 28 | } 29 | -------------------------------------------------------------------------------- /src/home/home.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .main { 4 | display: flex; 5 | } 6 | 7 | .header { 8 | margin: 2rem 0 2rem 0; 9 | background: white; 10 | } 11 | 12 | .content { 13 | padding: 0 3rem; 14 | } 15 | 16 | .container { 17 | margin: 0 0 0.75rem; 18 | } 19 | 20 | .link { 21 | display: block; 22 | text-decoration: none; 23 | color: var(--color-cool-blue); 24 | line-height: 2; 25 | cursor: pointer; 26 | 27 | @nest &:hover { 28 | color: color(var(--color-cool-blue) b(+15%)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/home/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { bindActionCreators } from 'redux'; 4 | import { connect } from 'react-redux'; 5 | 6 | import { actions as orgActions } from 'generated/organization'; 7 | 8 | import H1 from 'components/H1'; 9 | import LoadingOverlay from 'components/LoadingOverlay'; 10 | import HomeCard from 'home/HomeCard'; 11 | 12 | import styles from 'home/home.css'; 13 | 14 | import type { State } from 'app/reducers'; 15 | import type { Organization } from 'generated/version/ServiceType'; 16 | 17 | const allActions = Object.assign({}, orgActions); 18 | 19 | const Org = ({ organization }: { organization: Organization }) => 20 | ; 25 | 26 | const Organizations = ({ organizations }: { organizations: Organization[] }) => 27 |
28 | {organizations.map(organization => 29 |
30 | 31 |
32 | )} 33 |
; 34 | 35 | type Props = { 36 | loaded: boolean, 37 | actions: Object, // FIXME - types 38 | organizations: Organization[], 39 | }; 40 | class Home extends Component { 41 | props: Props; 42 | 43 | // TODO: Can I haz more orgs? 44 | componentDidMount() { 45 | this.props.actions.getOrganizations_get({ limit: 20, offset: 0 }); 46 | } 47 | 48 | render() { 49 | return ( 50 | 51 |
52 |
53 |

Organizations

54 |
55 |
56 | 57 |
58 |
59 |
60 | ); 61 | } 62 | } 63 | 64 | const mapStateToProps = (state: State) => ({ ...state.app }); 65 | 66 | const mapDispatchToProps = (dispatch): { [key: string]: Function } => ({ 67 | actions: bindActionCreators(allActions, dispatch), 68 | }); 69 | 70 | export default connect(mapStateToProps, mapDispatchToProps)(Home); 71 | 72 | export { styles }; 73 | -------------------------------------------------------------------------------- /src/index.html.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= htmlWebpackPlugin.options.title %> 6 | 7 | 8 |
9 | 10 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import React from 'react'; 4 | import ReactDOM from 'react-dom'; 5 | import { Provider } from 'react-redux'; 6 | import { Router, browserHistory } from 'react-router'; 7 | import { syncHistoryWithStore } from 'react-router-redux'; 8 | 9 | import routes from 'routes'; 10 | import configureStore from 'store/configureStore'; 11 | 12 | // Needed for React Developer Tools 13 | window.React = React; 14 | 15 | const store = configureStore(); 16 | 17 | const history = syncHistoryWithStore(browserHistory, store); 18 | 19 | ReactDOM.render( 20 | 21 | 22 | , 23 | document.getElementById('root') 24 | ); 25 | -------------------------------------------------------------------------------- /src/organization/AppCard.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | import Markdown from 'components/Markdown'; 5 | import { onClickHref } from 'utils'; 6 | 7 | import styles from 'organization/app-card.css'; 8 | 9 | const AppCard = ( 10 | { 11 | name, 12 | description, 13 | link, 14 | }: { 15 | name: string, 16 | description?: string, 17 | link: string, 18 | } = {} 19 | ) => 20 | ; 32 | 33 | export default AppCard; 34 | 35 | export { styles }; 36 | -------------------------------------------------------------------------------- /src/organization/app-card.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .container { 4 | border-radius: var(--border-radius); 5 | cursor: pointer; 6 | } 7 | 8 | .name { 9 | margin: 0; 10 | background: var(--color-concrete); 11 | border-top-left-radius: var(--border-radius); 12 | border-top-right-radius: var(--border-radius); 13 | font-size: 1.75rem; 14 | padding: 0.67rem 1rem; 15 | color: var(--color-cool-blue); 16 | } 17 | 18 | .no-content { 19 | color: var(--color-very-light-gray); 20 | margin: 0; 21 | } 22 | 23 | .description { 24 | border: 2px solid var(--color-concrete); 25 | border-bottom-left-radius: var(--border-radius); 26 | border-bottom-right-radius: var(--border-radius); 27 | padding: 0.67rem 1rem; 28 | } 29 | -------------------------------------------------------------------------------- /src/organization/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { bindActionCreators } from 'redux'; 4 | import { connect } from 'react-redux'; 5 | 6 | import H1 from 'components/H1'; 7 | import LoadingOverlay from 'components/LoadingOverlay'; 8 | import AppCard from 'organization/AppCard'; 9 | 10 | import styles from 'organization/organization.css'; 11 | import { actions } from 'organization/sagas'; 12 | 13 | import type { State } from 'app/reducers'; 14 | import type { 15 | Application, 16 | Organization as OrganizationType, 17 | } from 'generated/version/ServiceType'; 18 | 19 | const App = ({ 20 | orgKey, 21 | application, 22 | }: { 23 | orgKey: string, 24 | application: Application, 25 | }) => 26 | ; 31 | 32 | // Roll into Org FIXME 33 | const Applications = ({ 34 | orgKey, 35 | applications, 36 | }: { 37 | orgKey: string, 38 | applications: Application[], 39 | }) => 40 |
41 | {applications.map(application => 42 |
43 | 44 |
45 | )} 46 |
; 47 | 48 | type Props = { 49 | loaded: boolean, 50 | params: Object, // FIXME 51 | actions: Object, // FIXME 52 | organization?: OrganizationType, 53 | applications: any, // FIXME PropTypes.array.isRequired, 54 | }; 55 | 56 | class Organization extends Component { 57 | props: Props; 58 | 59 | componentDidMount() { 60 | const orgKey = this.props.params.organizationKey; 61 | this.props.actions.getOrganizationDetails_get({ orgKey }); 62 | } 63 | 64 | render() { 65 | return ( 66 | 67 |
68 |
69 |

70 | {this.props.organization && this.props.organization.name} 71 |

72 |
73 |
74 | 78 |
79 |
80 |
81 | ); 82 | } 83 | } 84 | 85 | const mapStateToProps = (state: State) => ({ 86 | organization: state.organization.organization, 87 | applications: state.organization.applications, 88 | loaded: state.organization.loaded, 89 | }); 90 | 91 | const mapDispatchToProps = dispatch => ({ 92 | actions: bindActionCreators(actions, dispatch), 93 | }); 94 | 95 | export default connect(mapStateToProps, mapDispatchToProps)(Organization); 96 | 97 | export { styles }; 98 | -------------------------------------------------------------------------------- /src/organization/organization.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .link { 4 | display: block; 5 | text-decoration: none; 6 | color: var(--color-cool-blue); 7 | line-height: 2; 8 | cursor: pointer; 9 | 10 | @nest &:hover { 11 | color: color(var(--color-cool-blue) b(+15%)); 12 | } 13 | } 14 | 15 | .header { 16 | margin: 2rem 0 2rem 0; 17 | background: white; 18 | } 19 | 20 | .content { 21 | padding: 0 3rem; 22 | } 23 | 24 | .container { 25 | margin: 0 0 0.75rem; 26 | } 27 | -------------------------------------------------------------------------------- /src/organization/reducers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { actionTypes } from 'organization/sagas'; 3 | 4 | import type { Application, Organization } from 'generated/version/ServiceType'; 5 | 6 | export type OrgState = { 7 | loaded: boolean, 8 | organization?: Organization, 9 | applications: Application[], 10 | }; 11 | 12 | export type OrgAction = { 13 | type: string, 14 | payload: { 15 | organization: Organization, 16 | applications: Application[], 17 | }, 18 | }; 19 | 20 | const initialState = { 21 | loaded: false, 22 | /* organization: {},*/ 23 | applications: [], 24 | }; 25 | 26 | const organization = (state: OrgState = initialState, action: OrgAction) => { 27 | switch (action.type) { 28 | // Get Applications 29 | case actionTypes.getOrganizationDetails_success: { 30 | return { 31 | loaded: true, 32 | organization: action.payload.organization, 33 | applications: action.payload.applications, 34 | }; 35 | } 36 | case actionTypes.getOrganizationDetails_doing: { 37 | return Object.assign(state, { 38 | loaded: false, 39 | }); 40 | } 41 | default: { 42 | return state; 43 | } 44 | } 45 | }; 46 | 47 | const reducers = { 48 | organization, 49 | }; 50 | 51 | export { reducers }; 52 | -------------------------------------------------------------------------------- /src/organization/sagas.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { takeLatest } from 'redux-saga'; 3 | import { call, put } from 'redux-saga/effects'; 4 | 5 | import { api as appsApi } from 'generated/organization/getOrganizationsByKey'; 6 | import { api as orgsApi } from 'generated/application/getByOrgkey'; 7 | 8 | const actionTypes = { 9 | getOrganizationDetails_get: 'getOrganizationDetails/get', 10 | getOrganizationDetails_doing: 'getOrganizationDetails/doing', 11 | getOrganizationDetails_success: 'getOrganizationDetails/success', 12 | getOrganizationDetails_failure: 'getOrganizationDetails/failure', 13 | }; 14 | 15 | const actions = { 16 | getOrganizationDetails_get: ({ orgKey }: { orgKey?: string } = {}) => ({ 17 | type: actionTypes.getOrganizationDetails_get, 18 | payload: { orgKey }, 19 | }), 20 | getOrganizationDetails_doing: () => ({ 21 | type: actionTypes.getOrganizationDetails_doing, 22 | }), 23 | getOrganizationDetails_success: (result: any) => ({ 24 | // FIXME types 25 | type: actionTypes.getOrganizationDetails_success, 26 | payload: result, 27 | }), 28 | getOrganizationDetails_failure: (err: any) => ({ 29 | // FIXME types 30 | type: actionTypes.getOrganizationDetails_failure, 31 | payload: err, 32 | error: true, 33 | }), 34 | }; 35 | 36 | function* saga(action: any): Generator { 37 | // FIXME types 38 | const { orgKey } = action.payload; 39 | try { 40 | yield put(actions.getOrganizationDetails_doing()); 41 | const [appResult, orgResult] = yield [ 42 | call(orgsApi, { orgKey }), 43 | call(appsApi, { key: orgKey }), 44 | ]; 45 | const organization = orgResult.body; 46 | const applications = appResult.body; 47 | 48 | yield put( 49 | actions.getOrganizationDetails_success({ 50 | organization, 51 | applications, 52 | }) 53 | ); 54 | } catch (error) { 55 | yield put(actions.getOrganizationDetails_failure(error)); 56 | } 57 | } 58 | 59 | function* takeLatestSaga(): Generator { 60 | yield* takeLatest(actionTypes.getOrganizationDetails_get, saga); 61 | } 62 | 63 | export { actions, actionTypes, saga, takeLatestSaga }; 64 | -------------------------------------------------------------------------------- /src/routes.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { IndexRoute, Route } from 'react-router'; 4 | 5 | import { App } from 'app'; 6 | 7 | import Home from 'home'; 8 | import Organization from 'organization'; 9 | import { Appln } from 'application'; 10 | import Documentation from 'documentation'; 11 | 12 | const routes = ( 13 | 14 | 15 | 16 | 17 | 21 | 25 | 29 | 30 | ); 31 | 32 | export default routes; 33 | -------------------------------------------------------------------------------- /src/store/configureStore.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { createStore, applyMiddleware, compose } from 'redux'; 3 | import createSagaMiddleware from 'redux-saga'; 4 | import rootReducer from 'app/rootReducer'; 5 | import allSagas from 'app/allSagas'; 6 | 7 | // for flowtype of module 8 | /* declare var module : { 9 | * hot : { 10 | * accept(path:string, callback:() => void): void; 11 | * }; 12 | * }; 13 | * */ 14 | const configureStore = () => { 15 | const sagaMiddleware = createSagaMiddleware(); 16 | const store = createStore( 17 | rootReducer, 18 | compose( 19 | applyMiddleware(sagaMiddleware), 20 | window.devToolsExtension ? window.devToolsExtension() : f => f 21 | ) 22 | ); 23 | 24 | if (module.hot) { 25 | // Enable Webpack hot module replacement for reducers 26 | module.hot.accept('../app/rootReducer', () => { 27 | const nextReducer = rootReducer; 28 | store.replaceReducer(nextReducer); 29 | }); 30 | } 31 | 32 | // Run Sagas - needs to be done after the middleware is added to the store 33 | allSagas.map(_ => sagaMiddleware.run(_)); 34 | 35 | return store; 36 | }; 37 | 38 | export default configureStore; 39 | -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- 1 | /* Sensible defaults */ 2 | 3 | html { 4 | font-size: 14px; 5 | margin: 0; 6 | padding: 0; 7 | box-sizing: border-box; 8 | border-collapse: collapse; 9 | } 10 | 11 | * { 12 | border-collapse: inherit; 13 | } 14 | 15 | *, 16 | *::before, 17 | *::after { 18 | box-sizing: inherit; 19 | } 20 | 21 | body { 22 | margin: 0; 23 | padding: 0; 24 | } 25 | -------------------------------------------------------------------------------- /src/styles/typography.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | 3 | .h1 { 4 | font-family: var(--font-primary); 5 | font-weight: 400; 6 | font-size: 3.157rem; 7 | line-height: 1.2; 8 | margin: 0; 9 | padding: 0; 10 | } 11 | 12 | .h2 { 13 | font-family: var(--font-secondary); 14 | font-size: 2.369rem; 15 | line-height: 1.2; 16 | margin: 0; 17 | padding: 0; 18 | } 19 | 20 | .h3 { 21 | font-family: var(--font-primary); 22 | font-size: 1.777rem; 23 | font-weight: 500; 24 | line-height: 1.2; 25 | margin: 0; 26 | padding: 0; 27 | } 28 | 29 | .p { 30 | font-family: var(--font-primary); 31 | line-height: 1.2; 32 | font-size: 1rem; 33 | color: var(--color-tuatara); 34 | } 35 | -------------------------------------------------------------------------------- /src/styles/variables.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Top level variables 3 | */ 4 | 5 | :root { 6 | --color-concrete: #F3F3F3; 7 | --color-very-light-gray: #CECECE; 8 | --color-light-gray: #AAA; 9 | --color-aluminium: #9B9B9B; 10 | --color-monsoon: #777; 11 | --color-steel: #666; 12 | --color-armadillo: #494949; 13 | --color-montana: #3A3A3A; 14 | --color-tuatara: #343434; 15 | --color-dark: #222; 16 | 17 | --color-solitude: #E8F4FF; 18 | --color-hawkes-blue: #D1EAFE; 19 | --color-sail: #BAE0FD; 20 | --color-colombia-blue: #9BD5FD; 21 | --color-light-sky-blue: #82CAFC; 22 | --color-maya-blue: #5DBBFB; 23 | --color-dodger-blue: #2BA6FA; 24 | --color-cool-blue: #0696F9; 25 | --color-rich-electric-blue: #0688E1; 26 | --color-lochmara: #0578C8; 27 | --color-medium-persian-blue: #056AAF; 28 | --color-bahama-blue: #045A96; 29 | --color-dark-cerulean: #044C7D; 30 | --color-astronaut-blue: #033C64; 31 | --color-blue-whale: #022E4C; 32 | --color-midnight: #021E32; 33 | 34 | --color-red: #E74C3C; 35 | 36 | --color-method-get: #27AE60; 37 | --color-method-post: #F39C12; 38 | --color-method-put: #8E44AD; 39 | --color-method-delete: #E74C3C; 40 | 41 | --color-primary: var(--color-cool-blue); 42 | --color-primary-light: var(--color-maya-blue); 43 | --color-primary-dark: var(--color-lochmara); 44 | --color-secondary: #27DBCF; 45 | --color-secondary-light: #98ECE6; 46 | --color-secondary-dark: #1FAFA6; 47 | 48 | --color-alert: var(--color-red); 49 | --border-radius: 3px; 50 | --font-avenir: avenir, helvetica, arial, sans-serif; 51 | --font-open-sans: 'Open Sans', sans-serif; 52 | --font-brandon: "Brandon grotesque"; 53 | --font-lato: 'Lato', sans-serif; 54 | --font-mono: 'Droid Sans Mono', monospace; 55 | 56 | --font-primary: var(--font-open-sans); 57 | --font-secondary: var(--font-lato); 58 | --font-code: var(--font-mono); 59 | } 60 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | function buildConfig(env) { 2 | return require(`./config/webpack.${env ? env : 'dev'}.js`)({ env }); 3 | } 4 | 5 | module.exports = buildConfig; 6 | --------------------------------------------------------------------------------