├── .npmignore ├── .nowignore ├── .postcssrc ├── Docker ├── run.sh ├── Dockerfile └── example.env.json ├── webapp.png ├── assets └── spinner.gif ├── .gitignore ├── .flowconfig ├── flow-typed └── npm │ ├── babel-polyfill_v6.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── typeface-noto-sans_vx.x.x.js │ ├── color_vx.x.x.js │ ├── whatwg-fetch_vx.x.x.js │ ├── apply-loader_vx.x.x.js │ ├── color-string_vx.x.x.js │ ├── babel-preset-flow_vx.x.x.js │ ├── babel-preset-react_vx.x.x.js │ ├── babel-preset-es2015_vx.x.x.js │ ├── babel-plugin-external-helpers_vx.x.x.js │ ├── react-addons-transition-group_vx.x.x.js │ ├── linkify-it_vx.x.x.js │ ├── babel-plugin-transform-class-properties_vx.x.x.js │ ├── file-loader_vx.x.x.js │ ├── striptags_vx.x.x.js │ ├── babel-plugin-array-includes_vx.x.x.js │ ├── rollup-plugin-buble_vx.x.x.js │ ├── node-fetch_vx.x.x.js │ ├── raf_vx.x.x.js │ ├── classlist-polyfill_vx.x.x.js │ ├── prop-types_v15.x.x.js │ ├── mini-css-extract-plugin_vx.x.x.js │ ├── element-dataset_vx.x.x.js │ ├── rollup-plugin-json_vx.x.x.js │ ├── rollup_vx.x.x.js │ ├── in-publish_vx.x.x.js │ ├── url-search-params-polyfill_vx.x.x.js │ ├── rollup-plugin-node-resolve_vx.x.x.js │ ├── html-webpack-plugin_vx.x.x.js │ ├── style-loader_vx.x.x.js │ ├── babel-loader_vx.x.x.js │ ├── webpack-cli_vx.x.x.js │ ├── iframe-resizer_vx.x.x.js │ ├── rollup-plugin-babel_vx.x.x.js │ ├── clipboard_vx.x.x.js │ ├── localforage_v1.5.x.js │ ├── extract-text-webpack-plugin_vx.x.x.js │ ├── css-loader_vx.x.x.js │ ├── node-fetch_v1.x.x.js │ ├── rollup-plugin-commonjs_vx.x.x.js │ ├── babel-cli_vx.x.x.js │ ├── react-router_v4.x.x.js │ ├── styled-jsx_vx.x.x.js │ ├── moment-timezone_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── es6-promise_vx.x.x.js │ ├── react-router-dom_v4.x.x.js │ ├── ical.js_vx.x.x.js │ ├── webpack-dev-server_vx.x.x.js │ ├── npm-run-all_vx.x.x.js │ ├── flow-typed_vx.x.x.js │ ├── nodemon_vx.x.x.js │ ├── babel-core_vx.x.x.js │ ├── express_v4.x.x.js │ └── webpack-bundle-analyzer_vx.x.x.js ├── .editorconfig ├── babel.config.json ├── src ├── google-analytics.js ├── components │ ├── index.js │ ├── EventLocation.js │ ├── CustomGroupSelector.js │ ├── AddToCalendar.js │ ├── CalendarTree.js │ ├── CalendarLegend.js │ ├── Options.js │ ├── Subscription.js │ └── CalendarEvent.js ├── index.ejs ├── constants.js ├── web.js ├── combine-handler.js ├── server.js ├── index.js ├── fullcalendar-to-ics.js ├── server-utils.js └── calendar-handler.js ├── rollup.config.js ├── rollup.config.server.js ├── rollup.config.bundle.js ├── cli.js ├── .eslintrc.json ├── now.json ├── LICENSE ├── webpack.config.js ├── README.md └── package.json /.npmignore: -------------------------------------------------------------------------------- 1 | .env.json 2 | **/*.map 3 | stats.json 4 | -------------------------------------------------------------------------------- /.nowignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | public/ 3 | !env.json 4 | -------------------------------------------------------------------------------- /.postcssrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "autoprefixer": {} 4 | } 5 | } -------------------------------------------------------------------------------- /Docker/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd /ics-merger 4 | yarn start 5 | -------------------------------------------------------------------------------- /webapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmischka/ics-merger/HEAD/webapp.png -------------------------------------------------------------------------------- /assets/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmischka/ics-merger/HEAD/assets/spinner.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | env.json 3 | service-account-key.json 4 | dist/ 5 | public/ 6 | 7 | .now -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | [include] 4 | 5 | [libs] 6 | 7 | [lints] 8 | 9 | [options] 10 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-polyfill_v6.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7d18f5557148a87d419029c8f2da61c6 2 | // flow-typed version: c6154227d1/babel-polyfill_v6.x.x/flow_>=v0.30.x <=v0.103.x 3 | 4 | declare module 'babel-polyfill' {} 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | indent_style = tab 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [package.json] 10 | indent_style = space 11 | indent_size = 2 12 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4e6a5da3290fe9ea49e6bcdced64f358 2 | // flow-typed version: c6154227d1/flow-bin_v0.x.x/flow_>=v0.25.x <=v0.103.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-flow", 4 | "@babel/preset-react", 5 | ["@babel/preset-env", { "modules": false }] 6 | ], 7 | "plugins": [ 8 | "@babel/plugin-proposal-class-properties", 9 | "styled-jsx/babel" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | 3 | RUN git clone https://github.com/jacobmischka/ics-merger.git 4 | WORKDIR /ics-merger 5 | RUN yarn install 6 | 7 | COPY ./env.json /ics-merger/env.json 8 | COPY ./run.sh /run.sh 9 | 10 | RUN yarn build 11 | 12 | EXPOSE 3000/tcp 13 | 14 | ENTRYPOINT ["/run.sh"] 15 | -------------------------------------------------------------------------------- /src/google-analytics.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 3 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 4 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 5 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 6 | -------------------------------------------------------------------------------- /src/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as ActiveEvent } from './ActiveEvent.js'; 2 | export { default as App } from './App.js'; 3 | export { default as CalendarEvent } from './CalendarEvent.js'; 4 | export { default as CalendarLegend } from './CalendarLegend.js'; 5 | export { default as CustomGroupSelector } from './CustomGroupSelector.js'; 6 | export { default as FullCalendar } from './FullCalendar.js'; 7 | export { default as Subscription } from './Subscription.js'; 8 | -------------------------------------------------------------------------------- /src/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <%= htmlWebpackPlugin.options.title %> 8 | 13 | 14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /src/constants.js: -------------------------------------------------------------------------------- 1 | export const BREAKPOINTS = { 2 | SMALL_DESKTOP: 768, 3 | MEDIUM_DESKTOP: 996, 4 | LARGE_DESKTOP: 1200, 5 | VERY_LARGE_DESKTOP: 1600 6 | }; 7 | 8 | export const COLORS = { 9 | PRIMARY: '#2c6fa1', 10 | ACCENT: '#1a6b60', 11 | BACKGROUND: '#fff', 12 | TEXT: '#000', 13 | GREY: '#666', 14 | SHADOW: 'rgba(0, 0, 0, 0.5)' 15 | }; 16 | 17 | export const OPACITIES = { 18 | TEXT: { 19 | PRIMARY: 0.85, 20 | SECONDARY: 0.56, 21 | DISABLED: 0.24 22 | }, 23 | PRIMARY: 1, 24 | SECONDARY: 0.75, 25 | DISABLED: 0.25 26 | }; 27 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import json from 'rollup-plugin-json'; 3 | import babel from 'rollup-plugin-babel'; 4 | 5 | export default { 6 | input: './src/index.js', 7 | output: [ 8 | { 9 | file: './dist/ical-merger.js', 10 | format: 'es' 11 | }, 12 | { 13 | file: './dist/ical-merger.cjs.js', 14 | format: 'cjs' 15 | } 16 | ], 17 | plugins: [ 18 | json(), 19 | babel({ 20 | exclude: 'node_modules/**', 21 | }) 22 | ], 23 | external: [ 24 | path.resolve('./.env.json'), 25 | 'ical.js' 26 | ], 27 | preferConst: true 28 | }; 29 | -------------------------------------------------------------------------------- /rollup.config.server.js: -------------------------------------------------------------------------------- 1 | import commonjs from 'rollup-plugin-commonjs'; 2 | import json from 'rollup-plugin-json'; 3 | import babel from 'rollup-plugin-babel'; 4 | 5 | export default { 6 | input: './src/server.js', 7 | output: { 8 | file: './dist/server.js', 9 | format: 'cjs' 10 | }, 11 | plugins: [ 12 | json(), 13 | commonjs(), 14 | babel({ 15 | exclude: 'node_modules/**', 16 | }) 17 | ], 18 | external: [ 19 | 'ical.js', 20 | 'express', 21 | 'node-fetch', 22 | 'body-parser', 23 | 'color-string', 24 | 'moment' 25 | ], 26 | preferConst: true 27 | }; 28 | -------------------------------------------------------------------------------- /flow-typed/npm/typeface-noto-sans_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 57a28fb77d6336df68b2cc2113ce96d1 2 | // flow-typed version: <>/typeface-noto-sans_v^0.0.54/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'typeface-noto-sans' 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 'typeface-noto-sans' { 17 | declare module.exports: any; 18 | } 19 | -------------------------------------------------------------------------------- /rollup.config.bundle.js: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import commonjs from 'rollup-plugin-commonjs'; 3 | import nodeResolve from 'rollup-plugin-node-resolve'; 4 | import json from 'rollup-plugin-json'; 5 | import babel from 'rollup-plugin-babel'; 6 | 7 | export default { 8 | input: './src/index.js', 9 | output: { 10 | file: './dist/ical-merger.bundle.js', 11 | format: 'umd', 12 | name: 'icalMerger', 13 | }, 14 | plugins: [ 15 | json(), 16 | commonjs(), 17 | babel({ 18 | exclude: 'node_modules/**', 19 | }), 20 | nodeResolve({ 21 | jsnext: true 22 | }) 23 | ], 24 | external: [ 25 | path.resolve('./.env.json') 26 | ] 27 | }; 28 | -------------------------------------------------------------------------------- /cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* eslint-env node */ 3 | 4 | const fs = require('fs'); 5 | const merge = require('./dist/ical-merger.cjs.js'); 6 | 7 | const files = process.argv.slice(2); 8 | let inputs = []; 9 | for (const file of files) { 10 | try { 11 | inputs.push(fs.readFileSync(file, 'utf8')); 12 | } catch(e) { 13 | console.error(`Error reading file ${file}: ${e}`); 14 | } 15 | } 16 | 17 | let options = {}; 18 | 19 | if(process.env.CALNAME) 20 | options.calname = process.env.CALNAME; 21 | if(process.env.TIMEZONE) 22 | options.timezone = process.env.TIMEZONE; 23 | if(process.env.CALDESC) 24 | options.caldesc = process.env.CALDESC; 25 | 26 | console.log(merge(inputs, options)); 27 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "parserOptions": { 4 | "ecmaVersion": 6, 5 | "sourceType": "module", 6 | "ecmaFeatures": { 7 | "jsx": true 8 | } 9 | }, 10 | "env": { 11 | "browser": true, 12 | "es6": true 13 | }, 14 | "extends": ["eslint:recommended", "plugin:react/recommended"], 15 | "rules": { 16 | "no-console": ["warn", { "allow": ["warn", "error"]}], 17 | "no-var": "warn", 18 | "eqeqeq": ["warn", "smart"], 19 | "semi": ["warn", "always"], 20 | "no-spaced-func": "warn", 21 | "comma-style": "warn", 22 | "comma-spacing": "warn", 23 | "key-spacing": "warn", 24 | "react/prop-types": [0] 25 | }, 26 | "plugins": ["react"], 27 | "settings": { 28 | "react": { 29 | "version": "detect" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /now.json: -------------------------------------------------------------------------------- 1 | { 2 | "scope": "mcw-anesth", 3 | "name": "ics-merger", 4 | "version": 2, 5 | "builds": [ 6 | { 7 | "src": "package.json", 8 | "use": "@now/static-build", 9 | "config": { 10 | "distDir": "public" 11 | } 12 | }, 13 | { 14 | "src": "env.json", 15 | "use": "@now/static" 16 | }, 17 | { 18 | "src": "src/calendar-handler.js", 19 | "use": "@now/node" 20 | }, 21 | { 22 | "src": "src/combine-handler.js", 23 | "use": "@now/node" 24 | } 25 | ], 26 | "routes": [ 27 | { "src": "/env.json", "dest": "env.json" }, 28 | { "src": "/combine\\.ics(.*)", "dest": "/src/combine-handler.js" }, 29 | { "src": "/(.+)\\.ics(.*)", "dest": "/src/calendar-handler.js" }, 30 | { "src": "/(.+)\\.(.+)", "dest": "/$1.$2" }, 31 | { "src": "/(.*)", "dest": "/index.html" } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /src/components/EventLocation.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const EventLocation = ({ location }) => { 4 | if (!location) 5 | return; 6 | 7 | if (typeof location === 'string') 8 | return ( 9 |
10 | 15 |
16 | {location} 17 |
18 |
19 | ); 20 | 21 | const { name, location: subLocation, address, description } = location; 22 | 23 | return ( 24 |
25 | 30 |
31 | {name}
32 | {subLocation}
33 | {address} 34 |
35 | {description && ( 36 |

{description}

37 | )} 38 |
39 | ); 40 | 41 | }; 42 | 43 | export default EventLocation; 44 | -------------------------------------------------------------------------------- /flow-typed/npm/color_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b99945fc4a71d33def9a558bdb0b5a8c 2 | // flow-typed version: <>/color_v^3.0.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'color' 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 'color' { 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 'color/index' { 29 | declare module.exports: $Exports<'color'>; 30 | } 31 | declare module 'color/index.js' { 32 | declare module.exports: $Exports<'color'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/whatwg-fetch_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ac6157aec5af024f367402f68580beeb 2 | // flow-typed version: <>/whatwg-fetch_v^2.0.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'whatwg-fetch' 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 'whatwg-fetch' { 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 'whatwg-fetch/fetch' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'whatwg-fetch/fetch.js' { 31 | declare module.exports: $Exports<'whatwg-fetch/fetch'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/apply-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c8cbd07739fbd91ca9c0fbba08849fe4 2 | // flow-typed version: <>/apply-loader_v^2.0.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'apply-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 'apply-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 'apply-loader/index' { 29 | declare module.exports: $Exports<'apply-loader'>; 30 | } 31 | declare module 'apply-loader/index.js' { 32 | declare module.exports: $Exports<'apply-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/color-string_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1ea5c28fbf07dd9b69d11fd2ca5fbde9 2 | // flow-typed version: <>/color-string_v^1.4.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'color-string' 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 'color-string' { 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 'color-string/index' { 29 | declare module.exports: $Exports<'color-string'>; 30 | } 31 | declare module 'color-string/index.js' { 32 | declare module.exports: $Exports<'color-string'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-flow_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3a85be9faf6f2a015f984b2943e46a88 2 | // flow-typed version: <>/babel-preset-flow_v^6.23.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-flow' 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-flow' { 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-flow/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-flow/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-flow/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2b8c98dc3b34262952a79c982556cf74 2 | // flow-typed version: <>/babel-preset-react_v^6.16.0/flow_v0.75.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-es2015_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 9f2ae9cd4840cb5aae1d78355e87eedd 2 | // flow-typed version: <>/babel-preset-es2015_v^6.18.0/flow_v0.75.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 | -------------------------------------------------------------------------------- /src/web.js: -------------------------------------------------------------------------------- 1 | import 'core-js/stable'; 2 | import 'regenerator-runtime/runtime'; 3 | import 'es6-promise'; 4 | import 'whatwg-fetch'; 5 | import 'classlist-polyfill'; 6 | import 'element-dataset'; 7 | import 'url-search-params-polyfill'; 8 | import 'raf/polyfill'; 9 | import '../assets/spinner.gif'; 10 | 11 | import React from 'react'; 12 | import { render } from 'react-dom'; 13 | import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom'; 14 | 15 | import 'iframe-resizer/js/iframeResizer.contentWindow.js'; 16 | import 'typeface-noto-sans'; 17 | 18 | import App from './components/App.js'; 19 | 20 | render(( 21 | 22 |
23 | } /> 27 | 28 | } /> 32 |
33 |
34 | ), document.getElementById('app')); 35 | -------------------------------------------------------------------------------- /src/components/CustomGroupSelector.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React from 'react'; 4 | 5 | import CalendarTree from './CalendarTree.js'; 6 | 7 | import type { CalendarLike, CalendarTreeDef } from '../utils.js'; 8 | 9 | type Props = { 10 | calendars: {[string]: CalendarLike}, 11 | calendarTree?: CalendarTreeDef, 12 | customCalendarIds: Array, 13 | handleChangeCustomCalendarIds: Function 14 | }; 15 | 16 | const CustomGroupSelector = (props: Props) => { 17 | return ( 18 | Calendars in Custom Group} 23 | render={calendarId => ( 24 |
  • 25 | 31 |
  • 32 | )} /> 33 | ); 34 | }; 35 | 36 | export default CustomGroupSelector; 37 | -------------------------------------------------------------------------------- /src/combine-handler.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | /* eslint-env node */ 3 | 4 | const { parse } = require("url"); 5 | 6 | const merge = require("./index.js"); 7 | const { getIcalsFromUrls, setHeaders } = require("./server-utils.js"); 8 | const dotenv = require("../env.json"); 9 | 10 | const URL_PROPS = ["url", "urls", "urls[]"]; 11 | 12 | module.exports = (req, res) => { 13 | const { query } = parse(req.url, true); 14 | 15 | let urls = []; 16 | for (const prop of URL_PROPS) { 17 | if (query[prop]) { 18 | urls = urls.concat(query[prop]); 19 | } 20 | } 21 | 22 | if (!urls) { 23 | res.writeHead(400); 24 | res.end(); 25 | return; 26 | } 27 | 28 | let icals = getIcalsFromUrls(urls); 29 | 30 | setHeaders(res); 31 | 32 | let options = {}; 33 | if (dotenv && dotenv.combine) options = Object.assign({}, dotenv.combine); 34 | options = Object.assign({}, options, query); 35 | 36 | icals 37 | .then(icals => { 38 | res.writeHead(200); 39 | res.end(merge(icals, options)); 40 | }) 41 | .catch(err => { 42 | console.error(`Error merging: ${err}`); 43 | res.writeHead(500); 44 | res.end(); 45 | }); 46 | }; 47 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-external-helpers_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 697dd2643c0d9fa4f7cb9b6a76b7ded9 2 | // flow-typed version: <>/babel-plugin-external-helpers_v^6.22.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-external-helpers' 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-external-helpers' { 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-external-helpers/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-external-helpers/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-external-helpers/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Jacob Mischka 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 | -------------------------------------------------------------------------------- /flow-typed/npm/react-addons-transition-group_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f709cc029dbfbb2809a4c188209aac37 2 | // flow-typed version: <>/react-addons-transition-group_v^15.5.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-addons-transition-group' 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-addons-transition-group' { 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 'react-addons-transition-group/index' { 29 | declare module.exports: $Exports<'react-addons-transition-group'>; 30 | } 31 | declare module 'react-addons-transition-group/index.js' { 32 | declare module.exports: $Exports<'react-addons-transition-group'>; 33 | } 34 | -------------------------------------------------------------------------------- /src/server.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | const express = require('express'); 4 | 5 | const handleCalendar = require('./calendar-handler.js'); 6 | const combineCalendars = require('./combine-handler.js'); 7 | 8 | const dotenv = require('../env.json'); 9 | 10 | const app = express(); 11 | 12 | app.use(express.static('public')); 13 | 14 | app.get('/env.json', (req, res) => { 15 | const options = { 16 | root: './', 17 | dotfiles: 'allow' 18 | }; 19 | 20 | res.sendFile('env.json', options); 21 | }); 22 | 23 | app.get('/combine.ics', combineCalendars); 24 | 25 | if (dotenv && dotenv.calendars) { 26 | for(let calendarName in dotenv.calendars) { 27 | app.get(`/${calendarName}.ics`, handleCalendar); 28 | } 29 | 30 | if (dotenv.calendarGroups) { 31 | for(let calendarName in dotenv.calendarGroups) { 32 | app.get(`/${calendarName}.ics`, handleCalendar); 33 | } 34 | } 35 | } 36 | 37 | app.get('/:calendarId', (req, res) => { 38 | res.sendFile('index.html', { 39 | root: './public/' 40 | }); 41 | }); 42 | 43 | let port = process.env.PORT || 3000; 44 | 45 | app.listen(port, () => { 46 | console.log(`Listening on ${port}`); // eslint-disable-line no-console 47 | }); 48 | -------------------------------------------------------------------------------- /flow-typed/npm/linkify-it_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 938be676ee5808b5df460642f33afeb9 2 | // flow-typed version: <>/linkify-it_v^2.0.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'linkify-it' 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 'linkify-it' { 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 'linkify-it/lib/re' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'linkify-it/index' { 31 | declare module.exports: $Exports<'linkify-it'>; 32 | } 33 | declare module 'linkify-it/index.js' { 34 | declare module.exports: $Exports<'linkify-it'>; 35 | } 36 | declare module 'linkify-it/lib/re.js' { 37 | declare module.exports: $Exports<'linkify-it/lib/re'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7d85d517ec0202cd502140a164af1f43 2 | // flow-typed version: <>/babel-plugin-transform-class-properties_v^6.24.1/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-class-properties' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-class-properties' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-class-properties/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-class-properties/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-class-properties/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/file-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 69320f01f329cf0b8ee2970669d755a4 2 | // flow-typed version: <>/file-loader_v^1.1.5/flow_v0.75.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 | declare module 'file-loader/dist/cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'file-loader/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'file-loader/dist/cjs.js' { 35 | declare module.exports: $Exports<'file-loader/dist/cjs'>; 36 | } 37 | declare module 'file-loader/dist/index.js' { 38 | declare module.exports: $Exports<'file-loader/dist/index'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/striptags_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 960a9f4acd9b1c0bf6b9552d70da64d1 2 | // flow-typed version: <>/striptags_v^3.1.1/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'striptags' 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 'striptags' { 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 'striptags/src/striptags' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'striptags/test/striptags-test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'striptags/src/striptags.js' { 35 | declare module.exports: $Exports<'striptags/src/striptags'>; 36 | } 37 | declare module 'striptags/test/striptags-test.js' { 38 | declare module.exports: $Exports<'striptags/test/striptags-test'>; 39 | } 40 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | /* eslint-env node */ 3 | 4 | const ICAL = require("ical.js"); 5 | 6 | const { icalMerger } = require("../package.json"); 7 | 8 | function merge(inputs, options = {}) { 9 | if (!Array.isArray(inputs)) inputs = [...arguments]; 10 | 11 | let calendar; 12 | for (let input of inputs) { 13 | try { 14 | let jcal = ICAL.parse(input); 15 | let cal = new ICAL.Component(jcal); 16 | 17 | if (!calendar) { 18 | calendar = cal; 19 | calendar.updatePropertyWithValue("prodid", icalMerger.prodid); 20 | calendar.updatePropertyWithValue("version", icalMerger.version); 21 | 22 | if (options.calname) 23 | calendar.updatePropertyWithValue("x-wr-calname", options.calname); 24 | if (options.timezone) 25 | calendar.updatePropertyWithValue("x-wr-timezone", options.timezone); 26 | if (options.caldesc) 27 | calendar.updatePropertyWithValue("x-wr-caldesc", options.caldesc); 28 | } else { 29 | for (let vevent of cal.getAllSubcomponents("vevent")) { 30 | calendar.addSubcomponent(vevent); 31 | } 32 | } 33 | } catch (e) { 34 | console.error(`Failed to merge: ${e}\n\nWith input: ${input}`); 35 | } 36 | } 37 | 38 | if (!calendar) { 39 | console.error("No icals parsed successfully"); 40 | return; 41 | } 42 | 43 | return calendar.toString(); 44 | } 45 | 46 | module.exports = merge; 47 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-array-includes_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fb2326abbe5fe652043c5cc33db99393 2 | // flow-typed version: <>/babel-plugin-array-includes_v^2.0.3/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-array-includes' 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-array-includes' { 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-array-includes/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-array-includes/test/test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'babel-plugin-array-includes/lib/index.js' { 35 | declare module.exports: $Exports<'babel-plugin-array-includes/lib/index'>; 36 | } 37 | declare module 'babel-plugin-array-includes/test/test.js' { 38 | declare module.exports: $Exports<'babel-plugin-array-includes/test/test'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/rollup-plugin-buble_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5c2c13d9c8638460c1510553779e4c87 2 | // flow-typed version: <>/rollup-plugin-buble_v^0.19.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rollup-plugin-buble' 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 'rollup-plugin-buble' { 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 'rollup-plugin-buble/dist/rollup-plugin-buble.cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rollup-plugin-buble/dist/rollup-plugin-buble.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'rollup-plugin-buble/dist/rollup-plugin-buble.cjs.js' { 35 | declare module.exports: $Exports<'rollup-plugin-buble/dist/rollup-plugin-buble.cjs'>; 36 | } 37 | declare module 'rollup-plugin-buble/dist/rollup-plugin-buble.es.js' { 38 | declare module.exports: $Exports<'rollup-plugin-buble/dist/rollup-plugin-buble.es'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/node-fetch_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5efbcdb82d6b5d85a286f8df07dd1ab6 2 | // flow-typed version: <>/node-fetch_v^2.1.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'node-fetch' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'node-fetch' { 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 'node-fetch/browser' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'node-fetch/lib/index.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'node-fetch/lib/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'node-fetch/browser.js' { 39 | declare module.exports: $Exports<'node-fetch/browser'>; 40 | } 41 | declare module 'node-fetch/lib/index.es.js' { 42 | declare module.exports: $Exports<'node-fetch/lib/index.es'>; 43 | } 44 | declare module 'node-fetch/lib/index.js' { 45 | declare module.exports: $Exports<'node-fetch/lib/index'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/raf_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ce70765fa6d6f1dd723753741a62a37c 2 | // flow-typed version: <>/raf_v^3.3.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'raf' 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 'raf' { 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 'raf/polyfill' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'raf/test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'raf/window' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'raf/index' { 39 | declare module.exports: $Exports<'raf'>; 40 | } 41 | declare module 'raf/index.js' { 42 | declare module.exports: $Exports<'raf'>; 43 | } 44 | declare module 'raf/polyfill.js' { 45 | declare module.exports: $Exports<'raf/polyfill'>; 46 | } 47 | declare module 'raf/test.js' { 48 | declare module.exports: $Exports<'raf/test'>; 49 | } 50 | declare module 'raf/window.js' { 51 | declare module.exports: $Exports<'raf/window'>; 52 | } 53 | -------------------------------------------------------------------------------- /flow-typed/npm/classlist-polyfill_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b669e98db2808549a5754215fc21ca71 2 | // flow-typed version: <>/classlist-polyfill_v^1.0.3/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'classlist-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 'classlist-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 'classlist-polyfill/src/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'classlist-polyfill/tests/remove' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'classlist-polyfill/tests/tests' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'classlist-polyfill/src/index.js' { 39 | declare module.exports: $Exports<'classlist-polyfill/src/index'>; 40 | } 41 | declare module 'classlist-polyfill/tests/remove.js' { 42 | declare module.exports: $Exports<'classlist-polyfill/tests/remove'>; 43 | } 44 | declare module 'classlist-polyfill/tests/tests.js' { 45 | declare module.exports: $Exports<'classlist-polyfill/tests/tests'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/prop-types_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: cadebf9b85943ae7d76b81524404aa4c 2 | // flow-typed version: 84e615b60b/prop-types_v15.x.x/flow_>=v0.41.x <=v0.88.x 3 | 4 | type $npm$propTypes$ReactPropsCheckType = ( 5 | props: any, 6 | propName: string, 7 | componentName: string, 8 | href?: string) => ?Error; 9 | 10 | declare module 'prop-types' { 11 | declare var array: React$PropType$Primitive>; 12 | declare var bool: React$PropType$Primitive; 13 | declare var func: React$PropType$Primitive; 14 | declare var number: React$PropType$Primitive; 15 | declare var object: React$PropType$Primitive; 16 | declare var string: React$PropType$Primitive; 17 | declare var symbol: React$PropType$Primitive; 18 | declare var any: React$PropType$Primitive; 19 | declare var arrayOf: React$PropType$ArrayOf; 20 | declare var element: React$PropType$Primitive; /* TODO */ 21 | declare var instanceOf: React$PropType$InstanceOf; 22 | declare var node: React$PropType$Primitive; /* TODO */ 23 | declare var objectOf: React$PropType$ObjectOf; 24 | declare var oneOf: React$PropType$OneOf; 25 | declare var oneOfType: React$PropType$OneOfType; 26 | declare var shape: React$PropType$Shape; 27 | 28 | declare function checkPropTypes( 29 | propTypes: $Subtype<{[_: $Keys]: $npm$propTypes$ReactPropsCheckType}>, 30 | values: V, 31 | location: string, 32 | componentName: string, 33 | getStack: ?(() => ?string) 34 | ) : void; 35 | } 36 | -------------------------------------------------------------------------------- /flow-typed/npm/mini-css-extract-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3c12be0dc7d9446a9121454075de9025 2 | // flow-typed version: <>/mini-css-extract-plugin_v^0.4.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'mini-css-extract-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 'mini-css-extract-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 'mini-css-extract-plugin/dist/cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'mini-css-extract-plugin/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'mini-css-extract-plugin/dist/loader' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'mini-css-extract-plugin/dist/cjs.js' { 39 | declare module.exports: $Exports<'mini-css-extract-plugin/dist/cjs'>; 40 | } 41 | declare module 'mini-css-extract-plugin/dist/index.js' { 42 | declare module.exports: $Exports<'mini-css-extract-plugin/dist/index'>; 43 | } 44 | declare module 'mini-css-extract-plugin/dist/loader.js' { 45 | declare module.exports: $Exports<'mini-css-extract-plugin/dist/loader'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/element-dataset_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6d5767ccb2c8694e83dc26235e6b7818 2 | // flow-typed version: <>/element-dataset_v^2.2.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'element-dataset' 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 'element-dataset' { 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 'element-dataset/lib/browser/index.cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'element-dataset/lib/browser/index.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'element-dataset/lib/browser/index.release' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'element-dataset/lib/browser/index.cjs.js' { 39 | declare module.exports: $Exports<'element-dataset/lib/browser/index.cjs'>; 40 | } 41 | declare module 'element-dataset/lib/browser/index.es.js' { 42 | declare module.exports: $Exports<'element-dataset/lib/browser/index.es'>; 43 | } 44 | declare module 'element-dataset/lib/browser/index.release.js' { 45 | declare module.exports: $Exports<'element-dataset/lib/browser/index.release'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/rollup-plugin-json_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 13c993df673336f90a953cc9b7ffc1cf 2 | // flow-typed version: <>/rollup-plugin-json_v^4.0.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rollup-plugin-json' 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 'rollup-plugin-json' { 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 'rollup-plugin-json/dist/rollup-plugin-json.cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rollup-plugin-json/dist/rollup-plugin-json.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'rollup-plugin-json/src/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'rollup-plugin-json/dist/rollup-plugin-json.cjs.js' { 39 | declare module.exports: $Exports<'rollup-plugin-json/dist/rollup-plugin-json.cjs'>; 40 | } 41 | declare module 'rollup-plugin-json/dist/rollup-plugin-json.es.js' { 42 | declare module.exports: $Exports<'rollup-plugin-json/dist/rollup-plugin-json.es'>; 43 | } 44 | declare module 'rollup-plugin-json/src/index.js' { 45 | declare module.exports: $Exports<'rollup-plugin-json/src/index'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/rollup_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8c59754f1da287ee61db48fa1b81f5c2 2 | // flow-typed version: <>/rollup_v^1.7.4/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rollup' 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 'rollup' { 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 'rollup/dist/rollup.browser.es' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rollup/dist/rollup.browser' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'rollup/dist/rollup.es' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'rollup/dist/rollup' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'rollup/dist/rollup.browser.es.js' { 43 | declare module.exports: $Exports<'rollup/dist/rollup.browser.es'>; 44 | } 45 | declare module 'rollup/dist/rollup.browser.js' { 46 | declare module.exports: $Exports<'rollup/dist/rollup.browser'>; 47 | } 48 | declare module 'rollup/dist/rollup.es.js' { 49 | declare module.exports: $Exports<'rollup/dist/rollup.es'>; 50 | } 51 | declare module 'rollup/dist/rollup.js' { 52 | declare module.exports: $Exports<'rollup/dist/rollup'>; 53 | } 54 | -------------------------------------------------------------------------------- /src/components/AddToCalendar.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import Color from 'color'; 4 | 5 | import { COLORS, OPACITIES } from '../constants.js'; 6 | import { fullCalendarToIcsUrl, fullCalendarToGoogleUrl } from '../utils.js'; 7 | 8 | const buttonHoverBackgroundColor = new Color(COLORS.ACCENT).alpha(OPACITIES.SECONDARY); 9 | 10 | const AddToCalendar = ({event}) => ( 11 |
    12 | Add event to calendar 13 | 22 | 48 |
    49 | ); 50 | 51 | AddToCalendar.propTypes = { 52 | event: PropTypes.shape({ 53 | start: PropTypes.object, 54 | end: PropTypes.object, 55 | title: PropTypes.string, 56 | description: PropTypes.string, 57 | location: PropTypes.string, 58 | url: PropTypes.string, 59 | }) 60 | }; 61 | 62 | export default AddToCalendar; 63 | -------------------------------------------------------------------------------- /Docker/example.env.json: -------------------------------------------------------------------------------- 1 | { 2 | "GOOGLE_CALENDAR_API_KEY": "[API KEY]", 3 | "GOOGLE_ANALYTICS_TRACKING_ID": "[ID]", 4 | "calendars": { 5 | "cal1": { 6 | "calname": "Calendar 1", 7 | "caldesc": "Calendar 1 desc", 8 | "timezone": "America/Chicago", 9 | "color": "#462aa3", 10 | "googleCalendarId": "[ID]@group.calendar.google.com", 11 | "url": "https://calendar.google.com/calendar/ical/[ID]%40group.calendar.google.com/public/basic.ics" 12 | }, 13 | "cal2": { 14 | "calname": "Calendar 2", 15 | "caldesc": "Calendar 2 desc", 16 | "timezone": "America/Chicago", 17 | "color": "#001f3f", 18 | "subCalendars": [ 19 | { 20 | "calname": "Subcalendar 1", 21 | "caldesc": "Subcalendar 1 desc", 22 | "timezone": "America/Chicago", 23 | "color": "#0074D9", 24 | "googleCalendarId": "[ID]@group.calendar.google.com", 25 | "url": "https://calendar.google.com/calendar/ical/[ID]%40group.calendar.google.com/public/basic.ics" 26 | }, 27 | { 28 | "calname": "Subcalendar 2", 29 | "caldesc": "Subcalendar 2 desc", 30 | "timezone": "America/Chicago", 31 | "color": "#7FDBFF", 32 | "googleCalendarId": "[ID]@group.calendar.google.com", 33 | "url": "https://calendar.google.com/calendar/ical/[ID]%40group.calendar.google.com/public/basic.ics" 34 | } 35 | ] 36 | } 37 | }, 38 | "calendarGroups": { 39 | "basic": { 40 | "calname": "Group Name", 41 | "caldesc": "Main calendar group", 42 | "timezone": "America/Chicago", 43 | "color": "#36a2eb", 44 | "calendars": [ 45 | "cal1", 46 | "cal2" 47 | ] 48 | } 49 | }, 50 | "combine": { 51 | "calname": "Combined Calendar", 52 | "caldesc": "Combined calendar desc", 53 | "timezone": "America/Chicago" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/fullcalendar-to-ics.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | /* eslint-env node */ 3 | 4 | const ICAL = require("ical.js"); 5 | 6 | const { icalMerger } = require("../package.json"); 7 | 8 | function fullCalendarEventsToIcs(events, options = {}) { 9 | const calendar = new ICAL.Component(["vcalendar", [], []]); 10 | 11 | calendar.updatePropertyWithValue("prodid", icalMerger.prodid); 12 | calendar.updatePropertyWithValue("version", icalMerger.version); 13 | 14 | let { timezone: tzid } = options; 15 | 16 | if (!tzid) { 17 | const moment = require('moment-timezone'); 18 | tzid = moment.tz.guess(); 19 | } 20 | calendar.updatePropertyWithValue("x-wr-timezone", tzid); 21 | 22 | const vtimezone = new ICAL.Component('vtimezone'); 23 | const timezone = new ICAL.Timezone({ 24 | component: vtimezone, 25 | tzid 26 | }); 27 | 28 | if (options.calname) 29 | calendar.updatePropertyWithValue("x-wr-calname", options.calname); 30 | 31 | if (options.caldesc) 32 | calendar.updatePropertyWithValue("x-wr-caldesc", options.caldesc); 33 | 34 | for (const fcEvent of events) { 35 | const vevent = new ICAL.Component("vevent"); 36 | const event = new ICAL.Event(vevent); 37 | 38 | event.startDate = new ICAL.Time(getTimeData(fcEvent.start), timezone); 39 | event.endDate = new ICAL.Time(getTimeData(fcEvent.end), timezone); 40 | event.description = fcEvent.title; 41 | event.uid = fcEvent.id; 42 | 43 | calendar.addSubcomponent(vevent); 44 | } 45 | 46 | return calendar.toString(); 47 | } 48 | 49 | function getTimeData(date) { 50 | date = new Date(date); 51 | return { 52 | year: date.getFullYear(), 53 | month: date.getMonth() + 1, 54 | day: date.getDate(), 55 | hour: date.getHours(), 56 | minute: date.getMinutes(), 57 | second: date.getSeconds() 58 | }; 59 | } 60 | 61 | module.exports = fullCalendarEventsToIcs; 62 | -------------------------------------------------------------------------------- /flow-typed/npm/in-publish_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 61e720cb5913de87d7450192326235eb 2 | // flow-typed version: <>/in-publish_v^2.0.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'in-publish' 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 'in-publish' { 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 'in-publish/in-install' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'in-publish/in-publish' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'in-publish/not-in-install' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'in-publish/not-in-publish' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'in-publish/in-install.js' { 43 | declare module.exports: $Exports<'in-publish/in-install'>; 44 | } 45 | declare module 'in-publish/in-publish.js' { 46 | declare module.exports: $Exports<'in-publish/in-publish'>; 47 | } 48 | declare module 'in-publish/index' { 49 | declare module.exports: $Exports<'in-publish'>; 50 | } 51 | declare module 'in-publish/index.js' { 52 | declare module.exports: $Exports<'in-publish'>; 53 | } 54 | declare module 'in-publish/not-in-install.js' { 55 | declare module.exports: $Exports<'in-publish/not-in-install'>; 56 | } 57 | declare module 'in-publish/not-in-publish.js' { 58 | declare module.exports: $Exports<'in-publish/not-in-publish'>; 59 | } 60 | -------------------------------------------------------------------------------- /src/components/CalendarTree.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React, { Component } from 'react'; 4 | import type { Node, ElementType } from 'react'; 5 | 6 | import type { CalendarLike, CalendarTreeDef } from '../utils.js'; 7 | 8 | type Props = { 9 | calendars: {[string]: CalendarLike}, 10 | label?: Node, 11 | calendarTree?: CalendarTreeDef, 12 | render: (string, CalendarLike) => Node, 13 | keyPrefix: string, 14 | container: ElementType, 15 | children?: Node 16 | }; 17 | 18 | export default class CalendarTree extends Component { 19 | static defaultProps = { 20 | container: 'li' 21 | }; 22 | 23 | render() { 24 | const { calendars, calendarTree, render, keyPrefix, children } = this.props; 25 | const Container = this.props.container; 26 | 27 | const label = this.props.label 28 | ? this.props.label 29 | : calendarTree 30 | ? calendarTree.label 31 | : ''; 32 | 33 | const items = calendarTree 34 | ? ( 35 | calendarTree.items.filter(item => 36 | typeof item !== 'string' || calendars[item] 37 | ).map((item, i) => { 38 | if (typeof item === 'string') { 39 | const calendar: CalendarLike = calendars[item]; 40 | return render(item, calendar); 41 | } else { 42 | let key = `${keyPrefix}-${i}`; 43 | return ( 44 | 49 | ); 50 | } 51 | }) 52 | ) 53 | : ( 54 | // $FlowFixMe: https://github.com/facebook/flow/issues/2221 55 | (Object.entries(calendars): Array<[string, CalendarLike]>) 56 | .map(([calId, cal]) => render(calId, cal)) 57 | ); 58 | 59 | return ( 60 | 61 | {label} 62 |
      63 | {items} 64 | {children} 65 |
    66 |
    67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /flow-typed/npm/url-search-params-polyfill_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 353952b5cb7f19dd820a0ce599974494 2 | // flow-typed version: <>/url-search-params-polyfill_v^4.0.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'url-search-params-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 'url-search-params-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 'url-search-params-polyfill/test/index.test' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'url-search-params-polyfill/test/partial-support.test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'url-search-params-polyfill/test/USP-without-full-feature' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'url-search-params-polyfill/index' { 39 | declare module.exports: $Exports<'url-search-params-polyfill'>; 40 | } 41 | declare module 'url-search-params-polyfill/index.js' { 42 | declare module.exports: $Exports<'url-search-params-polyfill'>; 43 | } 44 | declare module 'url-search-params-polyfill/test/index.test.js' { 45 | declare module.exports: $Exports<'url-search-params-polyfill/test/index.test'>; 46 | } 47 | declare module 'url-search-params-polyfill/test/partial-support.test.js' { 48 | declare module.exports: $Exports<'url-search-params-polyfill/test/partial-support.test'>; 49 | } 50 | declare module 'url-search-params-polyfill/test/USP-without-full-feature.js' { 51 | declare module.exports: $Exports<'url-search-params-polyfill/test/USP-without-full-feature'>; 52 | } 53 | -------------------------------------------------------------------------------- /flow-typed/npm/rollup-plugin-node-resolve_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2c0c1a0be05d0288caebde4f9f85d4e9 2 | // flow-typed version: <>/rollup-plugin-node-resolve_v^4.0.1/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rollup-plugin-node-resolve' 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 'rollup-plugin-node-resolve' { 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 'rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'rollup-plugin-node-resolve/src/empty' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'rollup-plugin-node-resolve/src/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js' { 43 | declare module.exports: $Exports<'rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs'>; 44 | } 45 | declare module 'rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js' { 46 | declare module.exports: $Exports<'rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es'>; 47 | } 48 | declare module 'rollup-plugin-node-resolve/src/empty.js' { 49 | declare module.exports: $Exports<'rollup-plugin-node-resolve/src/empty'>; 50 | } 51 | declare module 'rollup-plugin-node-resolve/src/index.js' { 52 | declare module.exports: $Exports<'rollup-plugin-node-resolve/src/index'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/html-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a72b18a888e7abf72775195c132899f 2 | // flow-typed version: <>/html-webpack-plugin_v^3.2.0/flow_v0.75.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/style-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f9c7bab3554f7bfda9eb575f882ddfb5 2 | // flow-typed version: <>/style-loader_v^0.21.0/flow_v0.75.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/lib/addStyles' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'style-loader/lib/addStyleUrl' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'style-loader/lib/urls' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'style-loader/url' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'style-loader/useable' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'style-loader/index' { 47 | declare module.exports: $Exports<'style-loader'>; 48 | } 49 | declare module 'style-loader/index.js' { 50 | declare module.exports: $Exports<'style-loader'>; 51 | } 52 | declare module 'style-loader/lib/addStyles.js' { 53 | declare module.exports: $Exports<'style-loader/lib/addStyles'>; 54 | } 55 | declare module 'style-loader/lib/addStyleUrl.js' { 56 | declare module.exports: $Exports<'style-loader/lib/addStyleUrl'>; 57 | } 58 | declare module 'style-loader/lib/urls.js' { 59 | declare module.exports: $Exports<'style-loader/lib/urls'>; 60 | } 61 | declare module 'style-loader/url.js' { 62 | declare module.exports: $Exports<'style-loader/url'>; 63 | } 64 | declare module 'style-loader/useable.js' { 65 | declare module.exports: $Exports<'style-loader/useable'>; 66 | } 67 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 128ea5b970a1ce641dce55946b1a626a 2 | // flow-typed version: <>/babel-loader_v^7.1.1/flow_v0.75.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/webpack-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6253feb244d89edae1bd602794d43257 2 | // flow-typed version: <>/webpack-cli_v^3.0.8/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-cli/bin/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-cli/bin/config-yargs' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-cli/bin/convert-argv' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-cli/bin/errorHelpers' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-cli/bin/prepareOptions' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-cli/bin/prompt-command' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'webpack-cli/bin/cli.js' { 51 | declare module.exports: $Exports<'webpack-cli/bin/cli'>; 52 | } 53 | declare module 'webpack-cli/bin/config-yargs.js' { 54 | declare module.exports: $Exports<'webpack-cli/bin/config-yargs'>; 55 | } 56 | declare module 'webpack-cli/bin/convert-argv.js' { 57 | declare module.exports: $Exports<'webpack-cli/bin/convert-argv'>; 58 | } 59 | declare module 'webpack-cli/bin/errorHelpers.js' { 60 | declare module.exports: $Exports<'webpack-cli/bin/errorHelpers'>; 61 | } 62 | declare module 'webpack-cli/bin/prepareOptions.js' { 63 | declare module.exports: $Exports<'webpack-cli/bin/prepareOptions'>; 64 | } 65 | declare module 'webpack-cli/bin/prompt-command.js' { 66 | declare module.exports: $Exports<'webpack-cli/bin/prompt-command'>; 67 | } 68 | -------------------------------------------------------------------------------- /src/components/CalendarLegend.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import Color from 'color'; 4 | 5 | import { COLORS } from '../constants.js'; 6 | 7 | const legendBorderColor = new Color(COLORS.GREY).alpha(0.45); 8 | 9 | const CalendarLegend = (props) => { 10 | if(!props.calendars || props.calendars.length < 1) 11 | return null; 12 | 13 | let calendarsInGroup = props.calendars.map(calendar => ( 14 |
  • 15 | 19 | 20 | {calendar.calname} 21 | 34 |
  • 35 | )); 36 | 37 | return ( 38 |
    39 |
    40 | 41 | {`Calendars in ${props.calname}`} 42 | 43 |
      44 | {calendarsInGroup} 45 |
    46 |
    47 | 80 |
    81 | ); 82 | }; 83 | 84 | export default CalendarLegend; 85 | 86 | CalendarLegend.propTypes = { 87 | calendars: PropTypes.array, 88 | calname: PropTypes.string 89 | }; 90 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | const path = require('path'); 3 | const webpack = require('webpack'); 4 | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 5 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 6 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; 7 | 8 | module.exports = (env, argv) => ({ 9 | entry: { 10 | bundle: argv.mode === 'production' 11 | ? [ 12 | './src/web.js', 13 | './src/google-analytics.js' 14 | ] 15 | : './src/web.js' 16 | }, 17 | output: { 18 | path: path.resolve(__dirname, './public/'), 19 | filename: argv.mode === 'production' 20 | ? 'js/[name].[chunkhash].js' 21 | : 'js/[name].js' 22 | }, 23 | target: 'web', 24 | module: { 25 | rules: [ 26 | { 27 | test: /\.js$/, 28 | exclude: /node_modules/, 29 | use: 'babel-loader' 30 | }, 31 | { 32 | test: /element-dataset/, 33 | use: 'apply-loader' 34 | }, 35 | { 36 | test: /\.css$/, 37 | use: [ 38 | MiniCssExtractPlugin.loader, 39 | 'css-loader' 40 | ] 41 | }, 42 | { 43 | test: /\.(eot|svg|ttf|woff|woff2|gif)$/, 44 | include: /node_modules/, 45 | use: { 46 | loader: 'file-loader', 47 | options: { 48 | name: '/assets/[path][name].[ext]', 49 | context: './node_modules' 50 | } 51 | } 52 | }, 53 | { 54 | test: /\.(eot|svg|ttf|woff|woff2|gif)$/, 55 | include: /assets/, 56 | use: { 57 | loader: 'file-loader', 58 | options: { 59 | name: '/assets/[path][name].[ext]', 60 | context: './assets' 61 | } 62 | } 63 | } 64 | ] 65 | }, 66 | plugins: [ 67 | new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), 68 | new BundleAnalyzerPlugin({ 69 | analyzerMode: 'disabled', 70 | generateStatsFile: true, 71 | statsFilename: 'stats.json' 72 | }), 73 | new MiniCssExtractPlugin({ 74 | filename: argv.mode === 'production' 75 | ? 'css/style.[contenthash].css' 76 | : 'css/style.css' 77 | }), 78 | new HtmlWebpackPlugin({ 79 | filename: 'index.html', 80 | title: 'Calendar', 81 | template: './src/index.ejs', 82 | xhtml: true 83 | }) 84 | ], 85 | devtool: 'source-map', 86 | devServer: { 87 | index: '', 88 | proxy: { 89 | context: () => true, 90 | target: 'http://localhost:4444', 91 | } 92 | } 93 | }); 94 | -------------------------------------------------------------------------------- /src/server-utils.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | const fetch = require('node-fetch'); 4 | const fullCalendarEventsToIcs = require('./fullcalendar-to-ics.js'); 5 | 6 | function setHeaders(res) { 7 | res.setHeader('Expires', 'Mon, 01 Jan 1990 00:00:00 GMT'); 8 | res.setHeader('Date', new Date().toGMTString()); 9 | res.setHeader('Content-Type', 'text/calendar; charset=UTF-8'); 10 | res.setHeader('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate'); 11 | res.setHeader('Pragma', 'no-cache'); 12 | } 13 | 14 | function getIcalsFromUrls(urls) { 15 | const promises = []; 16 | for (let url of urls) { 17 | promises.push(fetch(url).then(response => { 18 | return response.text(); 19 | }).catch(err => { 20 | console.error(`Error reading ${url}: ${err}`); 21 | return err; 22 | })); 23 | } 24 | 25 | return Promise.all(promises); 26 | } 27 | 28 | function getIcalsFromFullCalendarEventSourceCalendars(calendars) { 29 | const promises = []; 30 | for (let calendar of calendars) { 31 | promises.push(fetch(calendar.source).then(response => { 32 | return response.json(); 33 | }).then(events => { 34 | return fullCalendarEventsToIcs(events, calendar); 35 | }).catch(err => { 36 | console.error('Error parsing calendar', err, calendar); 37 | return err; 38 | })); 39 | } 40 | 41 | return Promise.all(promises); 42 | } 43 | 44 | function isCalendarVisible( 45 | calendar, 46 | keys, 47 | ) { 48 | if (!Array.isArray(keys)) 49 | keys = [keys]; 50 | 51 | return calendar && ( 52 | !calendar.private 53 | || ( 54 | Boolean(calendar.key) 55 | && typeof calendar.key === 'string' 56 | && keys.includes(calendar.key) 57 | )); 58 | } 59 | 60 | function getDeepCalendarIdsFromSubGroups( 61 | calendarGroup, 62 | allCalendars, 63 | allCalendarGroups, 64 | ) { 65 | let calendarIds = []; 66 | 67 | if (calendarGroup.calendars && calendarGroup.calendars.length > 0) { 68 | calendarIds.push(...calendarGroup.calendars); 69 | } 70 | 71 | if (calendarGroup.subGroups && calendarGroup.subGroups.length > 0) { 72 | let subGroups = calendarGroup.subGroups.map(id => allCalendarGroups[id]); 73 | for (let subGroup of subGroups) { 74 | calendarIds.push(...getDeepCalendarIdsFromSubGroups(subGroup, allCalendars, allCalendarGroups)); 75 | } 76 | } 77 | 78 | return calendarIds; 79 | } 80 | 81 | 82 | module.exports = { 83 | setHeaders, 84 | getIcalsFromUrls, 85 | getIcalsFromFullCalendarEventSourceCalendars, 86 | isCalendarVisible, 87 | getDeepCalendarIdsFromSubGroups 88 | }; 89 | -------------------------------------------------------------------------------- /flow-typed/npm/iframe-resizer_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 605741203cee25b0c64b5ef651f1d796 2 | // flow-typed version: <>/iframe-resizer_v^3.5.14/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'iframe-resizer' 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 'iframe-resizer' { 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 'iframe-resizer/js/ie8.polyfils.min' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'iframe-resizer/js/iframeResizer.contentWindow' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'iframe-resizer/js/iframeResizer.contentWindow.min' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'iframe-resizer/js/iframeResizer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'iframe-resizer/js/iframeResizer.min' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'iframe-resizer/js/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'iframe-resizer/index' { 51 | declare module.exports: $Exports<'iframe-resizer'>; 52 | } 53 | declare module 'iframe-resizer/index.js' { 54 | declare module.exports: $Exports<'iframe-resizer'>; 55 | } 56 | declare module 'iframe-resizer/js/ie8.polyfils.min.js' { 57 | declare module.exports: $Exports<'iframe-resizer/js/ie8.polyfils.min'>; 58 | } 59 | declare module 'iframe-resizer/js/iframeResizer.contentWindow.js' { 60 | declare module.exports: $Exports<'iframe-resizer/js/iframeResizer.contentWindow'>; 61 | } 62 | declare module 'iframe-resizer/js/iframeResizer.contentWindow.min.js' { 63 | declare module.exports: $Exports<'iframe-resizer/js/iframeResizer.contentWindow.min'>; 64 | } 65 | declare module 'iframe-resizer/js/iframeResizer.js' { 66 | declare module.exports: $Exports<'iframe-resizer/js/iframeResizer'>; 67 | } 68 | declare module 'iframe-resizer/js/iframeResizer.min.js' { 69 | declare module.exports: $Exports<'iframe-resizer/js/iframeResizer.min'>; 70 | } 71 | declare module 'iframe-resizer/js/index.js' { 72 | declare module.exports: $Exports<'iframe-resizer/js/index'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/rollup-plugin-babel_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 282f30ef480f76fc8dc1a2b0fc97c116 2 | // flow-typed version: <>/rollup-plugin-babel_v^3.0.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rollup-plugin-babel' 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 'rollup-plugin-babel' { 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 'rollup-plugin-babel/dist/rollup-plugin-babel.cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rollup-plugin-babel/dist/rollup-plugin-babel.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'rollup-plugin-babel/src/constants' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'rollup-plugin-babel/src/helperPlugin' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'rollup-plugin-babel/src/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'rollup-plugin-babel/src/preflightCheck' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'rollup-plugin-babel/src/utils' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js' { 55 | declare module.exports: $Exports<'rollup-plugin-babel/dist/rollup-plugin-babel.cjs'>; 56 | } 57 | declare module 'rollup-plugin-babel/dist/rollup-plugin-babel.es.js' { 58 | declare module.exports: $Exports<'rollup-plugin-babel/dist/rollup-plugin-babel.es'>; 59 | } 60 | declare module 'rollup-plugin-babel/src/constants.js' { 61 | declare module.exports: $Exports<'rollup-plugin-babel/src/constants'>; 62 | } 63 | declare module 'rollup-plugin-babel/src/helperPlugin.js' { 64 | declare module.exports: $Exports<'rollup-plugin-babel/src/helperPlugin'>; 65 | } 66 | declare module 'rollup-plugin-babel/src/index.js' { 67 | declare module.exports: $Exports<'rollup-plugin-babel/src/index'>; 68 | } 69 | declare module 'rollup-plugin-babel/src/preflightCheck.js' { 70 | declare module.exports: $Exports<'rollup-plugin-babel/src/preflightCheck'>; 71 | } 72 | declare module 'rollup-plugin-babel/src/utils.js' { 73 | declare module.exports: $Exports<'rollup-plugin-babel/src/utils'>; 74 | } 75 | -------------------------------------------------------------------------------- /flow-typed/npm/clipboard_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 61bd1780cf0ca8cb4c38c4217cfb0288 2 | // flow-typed version: <>/clipboard_v^2.0.1/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'clipboard' 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 'clipboard' { 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 'clipboard/dist/clipboard' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'clipboard/dist/clipboard.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'clipboard/karma.conf' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'clipboard/package' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'clipboard/src/clipboard-action' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'clipboard/src/clipboard' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'clipboard/test/clipboard-action' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'clipboard/test/clipboard' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'clipboard/webpack.config' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'clipboard/dist/clipboard.js' { 63 | declare module.exports: $Exports<'clipboard/dist/clipboard'>; 64 | } 65 | declare module 'clipboard/dist/clipboard.min.js' { 66 | declare module.exports: $Exports<'clipboard/dist/clipboard.min'>; 67 | } 68 | declare module 'clipboard/karma.conf.js' { 69 | declare module.exports: $Exports<'clipboard/karma.conf'>; 70 | } 71 | declare module 'clipboard/package.js' { 72 | declare module.exports: $Exports<'clipboard/package'>; 73 | } 74 | declare module 'clipboard/src/clipboard-action.js' { 75 | declare module.exports: $Exports<'clipboard/src/clipboard-action'>; 76 | } 77 | declare module 'clipboard/src/clipboard.js' { 78 | declare module.exports: $Exports<'clipboard/src/clipboard'>; 79 | } 80 | declare module 'clipboard/test/clipboard-action.js' { 81 | declare module.exports: $Exports<'clipboard/test/clipboard-action'>; 82 | } 83 | declare module 'clipboard/test/clipboard.js' { 84 | declare module.exports: $Exports<'clipboard/test/clipboard'>; 85 | } 86 | declare module 'clipboard/webpack.config.js' { 87 | declare module.exports: $Exports<'clipboard/webpack.config'>; 88 | } 89 | -------------------------------------------------------------------------------- /src/calendar-handler.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | /* eslint-env node */ 3 | 4 | const { parse } = require("url"); 5 | const { basename } = require("path"); 6 | 7 | const { 8 | getIcalsFromUrls, 9 | getIcalsFromFullCalendarEventSourceCalendars, 10 | setHeaders, 11 | isCalendarVisible, 12 | getDeepCalendarIdsFromSubGroups 13 | } = require("./server-utils.js"); 14 | const merge = require("./index.js"); 15 | 16 | const dotenv = require("../env.json"); 17 | 18 | module.exports = (req, res) => { 19 | const { query, pathname } = parse(req.url, true); 20 | const isVisible = calendar => isCalendarVisible(calendar, query.key); 21 | const calendarName = basename(pathname, ".ics"); 22 | 23 | const calendar = 24 | (dotenv.calendars && dotenv.calendars[calendarName]) || 25 | (dotenv.calendarGroups && dotenv.calendarGroups[calendarName]); 26 | 27 | if (!calendar || !isVisible(calendar)) { 28 | res.writeHead(501); 29 | res.end(); 30 | return; 31 | } 32 | 33 | let urls = []; 34 | let sourceCalendars = []; 35 | if (calendar.url) { 36 | urls.push(calendar.url); 37 | } else if (calendar.source) { 38 | sourceCalendars.push(calendar); 39 | } 40 | 41 | if (calendar.calendars || calendar.subGroups) { 42 | let calIds = getDeepCalendarIdsFromSubGroups( 43 | calendar, 44 | dotenv.calendars, 45 | dotenv.calendarGroups 46 | ); 47 | 48 | for (let calId of calIds) { 49 | let calendar = dotenv.calendars[calId]; 50 | if (isVisible(calendar)) { 51 | if (calendar.url) { 52 | urls.push(calendar.url); 53 | } else if (calendar.source) { 54 | sourceCalendars.push(calendar); 55 | } 56 | 57 | if (calendar.subCalendars) { 58 | const visible = calendar.subCalendars.filter(isVisible); 59 | urls = urls.concat(visible.map(subCal => subCal.url).filter(Boolean)); 60 | sourceCalendars = sourceCalendars.concat( 61 | visible.filter(subCal => subCal.source) 62 | ); 63 | } 64 | } 65 | } 66 | } 67 | 68 | if (calendar.subCalendars) { 69 | const visible = calendar.subCalendars.filter(isVisible); 70 | urls = urls.concat(visible.map(subCal => subCal.url)); 71 | sourceCalendars = sourceCalendars.concat( 72 | visible.filter(subCal => subCal.source) 73 | ); 74 | } 75 | 76 | urls = Array.from(new Set(urls)); 77 | sourceCalendars = Array.from(new Set(sourceCalendars)); 78 | 79 | let icals = Promise.all([ 80 | getIcalsFromUrls(urls), 81 | getIcalsFromFullCalendarEventSourceCalendars(sourceCalendars) 82 | ]).then(([urlIcals, fcIcals]) => urlIcals.concat(fcIcals)); 83 | 84 | setHeaders(res); 85 | 86 | let options = Object.assign({}, calendar); 87 | 88 | icals 89 | .then(icals => { 90 | res.writeHead(200); 91 | res.end(merge(icals, options)); 92 | }) 93 | .catch(err => { 94 | console.error(`Error merging: ${err}`); 95 | res.writeHead(500); 96 | res.end(); 97 | }); 98 | }; 99 | -------------------------------------------------------------------------------- /flow-typed/npm/localforage_v1.5.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f4f1c9d03bd1677a46b6bd7086e2bc10 2 | // flow-typed version: c6154227d1/localforage_v1.5.x/flow_>=v0.25.x <=v0.103.x 3 | 4 | type PartialConfig = { 5 | driver?: string | Array, 6 | name?: string, 7 | size?: number, 8 | storeName?: string, 9 | version?: string, 10 | description?: string, 11 | }; 12 | 13 | type Driver = { 14 | _driver: string, 15 | _initStorage(config: PartialConfig): void, 16 | 17 | getItem( 18 | key: string, 19 | successCallback?: (err?: Error, value?: T) => mixed, 20 | ): ?Promise, 21 | setItem( 22 | key: string, 23 | value: T, 24 | successCallback?: (err?: Error, value?: T) => mixed, 25 | ): ?Promise, 26 | removeItem( 27 | key: string, 28 | successCallback?: (err?: Error) => mixed, 29 | ): ?Promise, 30 | clear(successCallback?: ?(numberOfKeys: number) => mixed): ?Promise, 31 | length(successCallback?: (numberOfKeys: number) => mixed): ?Promise, 32 | key( 33 | keyIndex: number, 34 | successCallback?: (keyName: string) => mixed, 35 | ): ?Promise, 36 | keys( 37 | successCallback?: (keyNames: Array) => mixed, 38 | ): ?Promise>, 39 | }; 40 | 41 | type localforageInstance = { 42 | INDEXEDDB: 'asyncStorage', 43 | WEBSQL: 'webSQLStorage', 44 | LOCALSTORAGE: 'localStorageWrapper', 45 | 46 | getItem( 47 | key: string, 48 | successCallback?: (err?: Error, value?: T) => mixed, 49 | ): Promise, 50 | setItem( 51 | key: string, 52 | value: T, 53 | successCallback?: (err?: Error, value?: T) => mixed, 54 | ): Promise, 55 | removeItem( 56 | key: string, 57 | successCallback?: (err?: Error) => mixed, 58 | ): Promise, 59 | clear(successCallback?: ?(numberOfKeys: number) => mixed): Promise, 60 | length(successCallback?: (numberOfKeys: number) => mixed): Promise, 61 | key( 62 | keyIndex: number, 63 | successCallback?: (keyName: string) => mixed, 64 | ): Promise, 65 | keys( 66 | successCallback?: (keyNames: Array) => mixed, 67 | ): Promise>, 68 | iterate( 69 | iteratorCallback: (value: T, key: string, iterationNumber: number) => mixed, 70 | successCallback?: (result: void | [string, T]) => mixed, 71 | ): Promise, 72 | setDriver(driverNames: string | Array): void, 73 | config(config?: PartialConfig): boolean | PartialConfig, 74 | defineDriver(driver: Driver): void, 75 | driver(): string, 76 | ready(): Promise, 77 | supports(driverName: string): boolean, 78 | createInstance(config?: PartialConfig): localforageInstance, 79 | dropInstance(config?: PartialConfig): Promise, 80 | }; 81 | 82 | declare module 'localforage' { 83 | declare module.exports: localforageInstance; 84 | } 85 | -------------------------------------------------------------------------------- /flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c2bbf05d8bcf197a3ae8a2b716a0d977 2 | // flow-typed version: <>/extract-text-webpack-plugin_v^3.0.0/flow_v0.54.1 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/dist/cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'extract-text-webpack-plugin/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'extract-text-webpack-plugin/dist/lib/ExtractedModule' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'extract-text-webpack-plugin/dist/lib/ExtractTextPluginCompilation' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'extract-text-webpack-plugin/dist/lib/helpers' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'extract-text-webpack-plugin/dist/lib/OrderUndefinedError' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'extract-text-webpack-plugin/dist/loader' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'extract-text-webpack-plugin/dist/cjs.js' { 55 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/cjs'>; 56 | } 57 | declare module 'extract-text-webpack-plugin/dist/index.js' { 58 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/index'>; 59 | } 60 | declare module 'extract-text-webpack-plugin/dist/lib/ExtractedModule.js' { 61 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/lib/ExtractedModule'>; 62 | } 63 | declare module 'extract-text-webpack-plugin/dist/lib/ExtractTextPluginCompilation.js' { 64 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/lib/ExtractTextPluginCompilation'>; 65 | } 66 | declare module 'extract-text-webpack-plugin/dist/lib/helpers.js' { 67 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/lib/helpers'>; 68 | } 69 | declare module 'extract-text-webpack-plugin/dist/lib/OrderUndefinedError.js' { 70 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/lib/OrderUndefinedError'>; 71 | } 72 | declare module 'extract-text-webpack-plugin/dist/loader.js' { 73 | declare module.exports: $Exports<'extract-text-webpack-plugin/dist/loader'>; 74 | } 75 | -------------------------------------------------------------------------------- /flow-typed/npm/css-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fa21783bb0e0cf7e2f14364ca18ac887 2 | // flow-typed version: <>/css-loader_v^0.28.0/flow_v0.75.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/createResolver' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'css-loader/lib/css-base' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'css-loader/lib/getImportPrefix' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'css-loader/lib/getLocalIdent' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'css-loader/lib/loader' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'css-loader/lib/localsLoader' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'css-loader/lib/processCss' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'css-loader/lib/url/escape' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'css-loader/locals' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'css-loader/index' { 67 | declare module.exports: $Exports<'css-loader'>; 68 | } 69 | declare module 'css-loader/index.js' { 70 | declare module.exports: $Exports<'css-loader'>; 71 | } 72 | declare module 'css-loader/lib/compile-exports.js' { 73 | declare module.exports: $Exports<'css-loader/lib/compile-exports'>; 74 | } 75 | declare module 'css-loader/lib/createResolver.js' { 76 | declare module.exports: $Exports<'css-loader/lib/createResolver'>; 77 | } 78 | declare module 'css-loader/lib/css-base.js' { 79 | declare module.exports: $Exports<'css-loader/lib/css-base'>; 80 | } 81 | declare module 'css-loader/lib/getImportPrefix.js' { 82 | declare module.exports: $Exports<'css-loader/lib/getImportPrefix'>; 83 | } 84 | declare module 'css-loader/lib/getLocalIdent.js' { 85 | declare module.exports: $Exports<'css-loader/lib/getLocalIdent'>; 86 | } 87 | declare module 'css-loader/lib/loader.js' { 88 | declare module.exports: $Exports<'css-loader/lib/loader'>; 89 | } 90 | declare module 'css-loader/lib/localsLoader.js' { 91 | declare module.exports: $Exports<'css-loader/lib/localsLoader'>; 92 | } 93 | declare module 'css-loader/lib/processCss.js' { 94 | declare module.exports: $Exports<'css-loader/lib/processCss'>; 95 | } 96 | declare module 'css-loader/lib/url/escape.js' { 97 | declare module.exports: $Exports<'css-loader/lib/url/escape'>; 98 | } 99 | declare module 'css-loader/locals.js' { 100 | declare module.exports: $Exports<'css-loader/locals'>; 101 | } 102 | -------------------------------------------------------------------------------- /flow-typed/npm/node-fetch_v1.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 12ca90f2258926f80c00486f72690ea1 2 | // flow-typed version: 2c4367e37c/node-fetch_v1.x.x/flow_>=v0.44.x 3 | 4 | declare module 'node-fetch' { 5 | declare export class Request mixins Body { 6 | constructor(input: string | Request, init?: RequestInit): this; 7 | method: string; 8 | url: string; 9 | headers: Headers; 10 | context: RequestContext; 11 | referrer: string; 12 | redirect: RequestRedirect; 13 | 14 | // node-fetch extensions 15 | compress: boolean; 16 | agent: http$Agent; 17 | counter: number; 18 | follow: number; 19 | hostname: string; 20 | protocol: string; 21 | port: number; 22 | timeout: number; 23 | size: number 24 | } 25 | 26 | declare interface RequestInit { 27 | method?: string, 28 | headers?: HeaderInit | { 29 | [index: string]: string 30 | }, 31 | body?: BodyInit, 32 | redirect?: RequestRedirect, 33 | 34 | // node-fetch extensions 35 | timeout?: number, 36 | compress?: boolean, 37 | size?: number, 38 | agent?: http$Agent, 39 | follow?: number 40 | } 41 | 42 | declare type RequestContext = 43 | 'audio' | 'beacon' | 'cspreport' | 'download' | 'embed' | 44 | 'eventsource' | 'favicon' | 'fetch' | 'font' | 'form' | 'frame' | 45 | 'hyperlink' | 'iframe' | 'image' | 'imageset' | 'import' | 46 | 'internal' | 'location' | 'manifest' | 'object' | 'ping' | 'plugin' | 47 | 'prefetch' | 'script' | 'serviceworker' | 'sharedworker' | 48 | 'subresource' | 'style' | 'track' | 'video' | 'worker' | 49 | 'xmlhttprequest' | 'xslt'; 50 | declare type RequestRedirect = 'follow' | 'error' | 'manual'; 51 | 52 | declare export class Headers { 53 | append(name: string, value: string): void; 54 | delete(name: string): void; 55 | get(name: string): string; 56 | getAll(name: string): Array; 57 | has(name: string): boolean; 58 | set(name: string, value: string): void; 59 | forEach(callback: (value: string, name: string) => void): void 60 | } 61 | 62 | declare export class Body { 63 | bodyUsed: boolean; 64 | body: stream$Readable; 65 | json(): Promise; 66 | json(): Promise; 67 | text(): Promise; 68 | buffer(): Promise 69 | } 70 | 71 | declare export class Response mixins Body { 72 | constructor(body?: BodyInit, init?: ResponseInit): this; 73 | error(): Response; 74 | redirect(url: string, status: number): Response; 75 | type: ResponseType; 76 | url: string; 77 | status: number; 78 | ok: boolean; 79 | size: number; 80 | statusText: string; 81 | timeout: number; 82 | headers: Headers; 83 | clone(): Response 84 | } 85 | 86 | declare type ResponseType = 87 | | 'basic' 88 | | 'cors' 89 | | 'default' 90 | | 'error' 91 | | 'opaque' 92 | | 'opaqueredirect'; 93 | 94 | declare interface ResponseInit { 95 | status: number, 96 | statusText?: string, 97 | headers?: HeaderInit 98 | } 99 | 100 | declare type HeaderInit = Headers | Array; 101 | declare type BodyInit = string; 102 | 103 | declare export default function fetch(url: string | Request, init?: RequestInit): Promise 104 | } 105 | -------------------------------------------------------------------------------- /flow-typed/npm/rollup-plugin-commonjs_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d6dfa10b8def9f0d8fe165b4e85c45a1 2 | // flow-typed version: <>/rollup-plugin-commonjs_v^9.1.3/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rollup-plugin-commonjs' 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 'rollup-plugin-commonjs' { 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 'rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rollup-plugin-commonjs/dist/rollup-plugin-commonjs.es' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'rollup-plugin-commonjs/src/ast-utils' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'rollup-plugin-commonjs/src/default-resolver' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'rollup-plugin-commonjs/src/helpers' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'rollup-plugin-commonjs/src/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'rollup-plugin-commonjs/src/is-cjs' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'rollup-plugin-commonjs/src/resolve-id' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'rollup-plugin-commonjs/src/transform' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'rollup-plugin-commonjs/src/utils' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js' { 67 | declare module.exports: $Exports<'rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs'>; 68 | } 69 | declare module 'rollup-plugin-commonjs/dist/rollup-plugin-commonjs.es.js' { 70 | declare module.exports: $Exports<'rollup-plugin-commonjs/dist/rollup-plugin-commonjs.es'>; 71 | } 72 | declare module 'rollup-plugin-commonjs/src/ast-utils.js' { 73 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/ast-utils'>; 74 | } 75 | declare module 'rollup-plugin-commonjs/src/default-resolver.js' { 76 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/default-resolver'>; 77 | } 78 | declare module 'rollup-plugin-commonjs/src/helpers.js' { 79 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/helpers'>; 80 | } 81 | declare module 'rollup-plugin-commonjs/src/index.js' { 82 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/index'>; 83 | } 84 | declare module 'rollup-plugin-commonjs/src/is-cjs.js' { 85 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/is-cjs'>; 86 | } 87 | declare module 'rollup-plugin-commonjs/src/resolve-id.js' { 88 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/resolve-id'>; 89 | } 90 | declare module 'rollup-plugin-commonjs/src/transform.js' { 91 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/transform'>; 92 | } 93 | declare module 'rollup-plugin-commonjs/src/utils.js' { 94 | declare module.exports: $Exports<'rollup-plugin-commonjs/src/utils'>; 95 | } 96 | -------------------------------------------------------------------------------- /src/components/Options.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | import * as localforage from 'localforage'; 5 | 6 | import { camelCaseToWords } from '../utils.js'; 7 | 8 | export default class Options extends Component { 9 | constructor() { 10 | super(); 11 | 12 | this.options = [ 13 | 'showCalendarNames', 14 | 'showLocations', 15 | 'showPresenters', 16 | 'showDescriptions' 17 | ]; 18 | 19 | this.handleOptionChange = this.handleOptionChange.bind(this); 20 | this.getStoredOptions = this.getStoredOptions.bind(this); 21 | this.toggleOption = this.toggleOption.bind(this); 22 | } 23 | 24 | componentDidMount() { 25 | this.getStoredOptions(); 26 | } 27 | 28 | render() { 29 | let params = new URLSearchParams(location.search); 30 | 31 | const inputs = this.options.map(option => 32 | 39 | ); 40 | 41 | return ( 42 |
    43 | {inputs} 44 | 52 |
    53 | ); 54 | } 55 | 56 | getStoredOptions() { 57 | const promises = this.options.map(option => 58 | localforage.getItem(option).then(val => ([option, val])).catch(err => { 59 | console.error(`Failed fetching stored option for ${option}`, err); 60 | }) 61 | ); 62 | 63 | Promise.all(promises).then(options => { 64 | const { location, history } = this.props; 65 | let params = new URLSearchParams(location.search); 66 | 67 | let paramsChanged = false; 68 | for (const [option, value] of options) { 69 | if (value && !params.has(option)) { 70 | params.set(option, true); 71 | paramsChanged = true; 72 | } 73 | } 74 | 75 | if (paramsChanged) { 76 | let newLocation = Object.assign({}, location, {search: `?${params.toString()}`}); 77 | history.push(newLocation); 78 | } 79 | }).catch(err => { 80 | console.error( 81 | "Failed fetching all options somehow? Don't think this should happen", 82 | err 83 | ); 84 | }); 85 | } 86 | 87 | handleOptionChange(event) { 88 | let option = event.target.value; 89 | this.toggleOption(option); 90 | } 91 | 92 | toggleOption(option, checked) { 93 | const { location, history } = this.props; 94 | let params = new URLSearchParams(location.search); 95 | const enabled = checked != null 96 | ? checked 97 | : !params.has(option); 98 | if (enabled) { 99 | params.set(option, true); 100 | localforage.setItem(option, true).catch(err => { 101 | console.error(`Failed setting stored option ${option}`, err); 102 | }); 103 | } else { 104 | params.delete(option); 105 | localforage.removeItem(option).catch(err => { 106 | console.error(`Failed removing stored option ${option}`, err); 107 | }); 108 | } 109 | 110 | let newLocation = Object.assign({}, location, {search: `?${params.toString()}`}); 111 | history.push(newLocation); 112 | } 113 | } 114 | 115 | Options.propTypes = { 116 | location: PropTypes.shape({ 117 | search: PropTypes.string 118 | }), 119 | history: PropTypes.shape({ 120 | push: PropTypes.func.isRequired 121 | }) 122 | }; 123 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 9d828b4104eb30fcb2548dd05f077acb 2 | // flow-typed version: <>/babel-cli_v^6.23.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-cli/bin/babel-doctor' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-cli/bin/babel-external-helpers' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-cli/bin/babel-node' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-cli/bin/babel' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-cli/lib/_babel-node' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-cli/lib/babel-external-helpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-cli/lib/babel-node' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-cli/lib/babel/dir' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-cli/lib/babel/file' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-cli/lib/babel/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-cli/lib/babel/util' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'babel-cli/bin/babel-doctor.js' { 71 | declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>; 72 | } 73 | declare module 'babel-cli/bin/babel-external-helpers.js' { 74 | declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>; 75 | } 76 | declare module 'babel-cli/bin/babel-node.js' { 77 | declare module.exports: $Exports<'babel-cli/bin/babel-node'>; 78 | } 79 | declare module 'babel-cli/bin/babel.js' { 80 | declare module.exports: $Exports<'babel-cli/bin/babel'>; 81 | } 82 | declare module 'babel-cli/index' { 83 | declare module.exports: $Exports<'babel-cli'>; 84 | } 85 | declare module 'babel-cli/index.js' { 86 | declare module.exports: $Exports<'babel-cli'>; 87 | } 88 | declare module 'babel-cli/lib/_babel-node.js' { 89 | declare module.exports: $Exports<'babel-cli/lib/_babel-node'>; 90 | } 91 | declare module 'babel-cli/lib/babel-external-helpers.js' { 92 | declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>; 93 | } 94 | declare module 'babel-cli/lib/babel-node.js' { 95 | declare module.exports: $Exports<'babel-cli/lib/babel-node'>; 96 | } 97 | declare module 'babel-cli/lib/babel/dir.js' { 98 | declare module.exports: $Exports<'babel-cli/lib/babel/dir'>; 99 | } 100 | declare module 'babel-cli/lib/babel/file.js' { 101 | declare module.exports: $Exports<'babel-cli/lib/babel/file'>; 102 | } 103 | declare module 'babel-cli/lib/babel/index.js' { 104 | declare module.exports: $Exports<'babel-cli/lib/babel/index'>; 105 | } 106 | declare module 'babel-cli/lib/babel/util.js' { 107 | declare module.exports: $Exports<'babel-cli/lib/babel/util'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fd05ff7ee75da2ba5d12a620675d5923 2 | // flow-typed version: c6154227d1/react-router_v4.x.x/flow_>=v0.63.x <=v0.103.x 3 | 4 | declare module "react-router" { 5 | // NOTE: many of these are re-exported by react-router-dom and 6 | // react-router-native, so when making changes, please be sure to update those 7 | // as well. 8 | declare export type Location = { 9 | pathname: string, 10 | search: string, 11 | hash: string, 12 | state?: any, 13 | key?: string 14 | }; 15 | 16 | declare export type LocationShape = { 17 | pathname?: string, 18 | search?: string, 19 | hash?: string, 20 | state?: any 21 | }; 22 | 23 | declare export type HistoryAction = "PUSH" | "REPLACE" | "POP"; 24 | 25 | declare export type RouterHistory = { 26 | length: number, 27 | location: Location, 28 | action: HistoryAction, 29 | listen( 30 | callback: (location: Location, action: HistoryAction) => void 31 | ): () => void, 32 | push(path: string | LocationShape, state?: any): void, 33 | replace(path: string | LocationShape, state?: any): void, 34 | go(n: number): void, 35 | goBack(): void, 36 | goForward(): void, 37 | canGo?: (n: number) => boolean, 38 | block( 39 | callback: string | (location: Location, action: HistoryAction) => ?string 40 | ): () => void, 41 | // createMemoryHistory 42 | index?: number, 43 | entries?: Array 44 | }; 45 | 46 | declare export type Match = { 47 | params: { [key: string]: ?string }, 48 | isExact: boolean, 49 | path: string, 50 | url: string 51 | }; 52 | 53 | declare export type ContextRouter = {| 54 | history: RouterHistory, 55 | location: Location, 56 | match: Match, 57 | staticContext?: StaticRouterContext 58 | |}; 59 | 60 | declare export type GetUserConfirmation = ( 61 | message: string, 62 | callback: (confirmed: boolean) => void 63 | ) => void; 64 | 65 | declare type StaticRouterContext = { 66 | url?: string 67 | }; 68 | 69 | declare export class StaticRouter extends React$Component<{ 70 | basename?: string, 71 | location?: string | Location, 72 | context: StaticRouterContext, 73 | children?: React$Node 74 | }> {} 75 | 76 | declare export class MemoryRouter extends React$Component<{ 77 | initialEntries?: Array, 78 | initialIndex?: number, 79 | getUserConfirmation?: GetUserConfirmation, 80 | keyLength?: number, 81 | children?: React$Node 82 | }> {} 83 | 84 | declare export class Router extends React$Component<{ 85 | history: RouterHistory, 86 | children?: React$Node 87 | }> {} 88 | 89 | declare export class Prompt extends React$Component<{ 90 | message: string | ((location: Location) => string | true), 91 | when?: boolean 92 | }> {} 93 | 94 | declare export class Redirect extends React$Component<{| 95 | to: string | LocationShape, 96 | push?: boolean, 97 | from?: string, 98 | exact?: boolean, 99 | strict?: boolean 100 | |}> {} 101 | 102 | 103 | declare export class Route extends React$Component<{| 104 | component?: React$ComponentType<*>, 105 | render?: (router: ContextRouter) => React$Node, 106 | children?: React$ComponentType | React$Node, 107 | path?: string, 108 | exact?: boolean, 109 | strict?: boolean, 110 | location?: LocationShape, 111 | sensitive?: boolean 112 | |}> {} 113 | 114 | declare export class Switch extends React$Component<{| 115 | children?: React$Node, 116 | location?: Location 117 | |}> {} 118 | 119 | declare export function withRouter

    ( 120 | Component: React$ComponentType<{| ...ContextRouter, ...P |}> 121 | ): React$ComponentType

    ; 122 | 123 | declare type MatchPathOptions = { 124 | path?: string, 125 | exact?: boolean, 126 | strict?: boolean, 127 | sensitive?: boolean 128 | }; 129 | 130 | declare export function matchPath( 131 | pathname: string, 132 | options?: MatchPathOptions | string 133 | ): null | Match; 134 | } 135 | -------------------------------------------------------------------------------- /flow-typed/npm/styled-jsx_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5877d7c28bb255fcce821bbf0f4e0c55 2 | // flow-typed version: <>/styled-jsx_v^2.2.6/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'styled-jsx' 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 'styled-jsx' { 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 'styled-jsx/babel' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'styled-jsx/css' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'styled-jsx/dist/_constants' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'styled-jsx/dist/_utils' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'styled-jsx/dist/babel-external' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'styled-jsx/dist/babel' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'styled-jsx/dist/lib/style-transform' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'styled-jsx/dist/lib/stylesheet' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'styled-jsx/dist/server' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'styled-jsx/dist/style' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'styled-jsx/dist/stylesheet-registry' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'styled-jsx/lib/style-transform' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'styled-jsx/lib/stylesheet' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'styled-jsx/server' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'styled-jsx/style' { 82 | declare module.exports: any; 83 | } 84 | 85 | // Filename aliases 86 | declare module 'styled-jsx/babel.js' { 87 | declare module.exports: $Exports<'styled-jsx/babel'>; 88 | } 89 | declare module 'styled-jsx/css.js' { 90 | declare module.exports: $Exports<'styled-jsx/css'>; 91 | } 92 | declare module 'styled-jsx/dist/_constants.js' { 93 | declare module.exports: $Exports<'styled-jsx/dist/_constants'>; 94 | } 95 | declare module 'styled-jsx/dist/_utils.js' { 96 | declare module.exports: $Exports<'styled-jsx/dist/_utils'>; 97 | } 98 | declare module 'styled-jsx/dist/babel-external.js' { 99 | declare module.exports: $Exports<'styled-jsx/dist/babel-external'>; 100 | } 101 | declare module 'styled-jsx/dist/babel.js' { 102 | declare module.exports: $Exports<'styled-jsx/dist/babel'>; 103 | } 104 | declare module 'styled-jsx/dist/lib/style-transform.js' { 105 | declare module.exports: $Exports<'styled-jsx/dist/lib/style-transform'>; 106 | } 107 | declare module 'styled-jsx/dist/lib/stylesheet.js' { 108 | declare module.exports: $Exports<'styled-jsx/dist/lib/stylesheet'>; 109 | } 110 | declare module 'styled-jsx/dist/server.js' { 111 | declare module.exports: $Exports<'styled-jsx/dist/server'>; 112 | } 113 | declare module 'styled-jsx/dist/style.js' { 114 | declare module.exports: $Exports<'styled-jsx/dist/style'>; 115 | } 116 | declare module 'styled-jsx/dist/stylesheet-registry.js' { 117 | declare module.exports: $Exports<'styled-jsx/dist/stylesheet-registry'>; 118 | } 119 | declare module 'styled-jsx/lib/style-transform.js' { 120 | declare module.exports: $Exports<'styled-jsx/lib/style-transform'>; 121 | } 122 | declare module 'styled-jsx/lib/stylesheet.js' { 123 | declare module.exports: $Exports<'styled-jsx/lib/stylesheet'>; 124 | } 125 | declare module 'styled-jsx/server.js' { 126 | declare module.exports: $Exports<'styled-jsx/server'>; 127 | } 128 | declare module 'styled-jsx/style.js' { 129 | declare module.exports: $Exports<'styled-jsx/style'>; 130 | } 131 | -------------------------------------------------------------------------------- /flow-typed/npm/moment-timezone_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b58299c3e1c10e8d75f67d2859a7276f 2 | // flow-typed version: <>/moment-timezone_v^0.5.26/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'moment-timezone' 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 'moment-timezone' { 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 'moment-timezone/builds/moment-timezone-with-data-10-year-range' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'moment-timezone/builds/moment-timezone-with-data-10-year-range.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'moment-timezone/builds/moment-timezone-with-data-1970-2030' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'moment-timezone/builds/moment-timezone-with-data-1970-2030.min' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'moment-timezone/builds/moment-timezone-with-data-2012-2022' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'moment-timezone/builds/moment-timezone-with-data-2012-2022.min' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'moment-timezone/builds/moment-timezone-with-data' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'moment-timezone/builds/moment-timezone-with-data.min' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'moment-timezone/builds/moment-timezone.min' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'moment-timezone/moment-timezone-utils' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'moment-timezone/moment-timezone' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'moment-timezone/builds/moment-timezone-with-data-10-year-range.js' { 71 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data-10-year-range'>; 72 | } 73 | declare module 'moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js' { 74 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data-10-year-range.min'>; 75 | } 76 | declare module 'moment-timezone/builds/moment-timezone-with-data-1970-2030.js' { 77 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data-1970-2030'>; 78 | } 79 | declare module 'moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js' { 80 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data-1970-2030.min'>; 81 | } 82 | declare module 'moment-timezone/builds/moment-timezone-with-data-2012-2022.js' { 83 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data-2012-2022'>; 84 | } 85 | declare module 'moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js' { 86 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data-2012-2022.min'>; 87 | } 88 | declare module 'moment-timezone/builds/moment-timezone-with-data.js' { 89 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data'>; 90 | } 91 | declare module 'moment-timezone/builds/moment-timezone-with-data.min.js' { 92 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone-with-data.min'>; 93 | } 94 | declare module 'moment-timezone/builds/moment-timezone.min.js' { 95 | declare module.exports: $Exports<'moment-timezone/builds/moment-timezone.min'>; 96 | } 97 | declare module 'moment-timezone/index' { 98 | declare module.exports: $Exports<'moment-timezone'>; 99 | } 100 | declare module 'moment-timezone/index.js' { 101 | declare module.exports: $Exports<'moment-timezone'>; 102 | } 103 | declare module 'moment-timezone/moment-timezone-utils.js' { 104 | declare module.exports: $Exports<'moment-timezone/moment-timezone-utils'>; 105 | } 106 | declare module 'moment-timezone/moment-timezone.js' { 107 | declare module.exports: $Exports<'moment-timezone/moment-timezone'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 898adc4a329d56f57a2bab4a4ab1a460 2 | // flow-typed version: <>/babel-eslint_v^8.0.0/flow_v0.75.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/lib/analyze-scope' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/lib/babylon-to-espree/attachComments' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/lib/babylon-to-espree/convertComments' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/lib/babylon-to-espree/convertTemplateType' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/lib/babylon-to-espree/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/lib/babylon-to-espree/toAST' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-eslint/lib/babylon-to-espree/toToken' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-eslint/lib/babylon-to-espree/toTokens' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-eslint/lib/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-eslint/lib/parse-with-patch' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-eslint/lib/parse-with-scope' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'babel-eslint/lib/parse' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'babel-eslint/lib/patch-eslint-scope' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'babel-eslint/lib/visitor-keys' { 78 | declare module.exports: any; 79 | } 80 | 81 | // Filename aliases 82 | declare module 'babel-eslint/lib/analyze-scope.js' { 83 | declare module.exports: $Exports<'babel-eslint/lib/analyze-scope'>; 84 | } 85 | declare module 'babel-eslint/lib/babylon-to-espree/attachComments.js' { 86 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/attachComments'>; 87 | } 88 | declare module 'babel-eslint/lib/babylon-to-espree/convertComments.js' { 89 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/convertComments'>; 90 | } 91 | declare module 'babel-eslint/lib/babylon-to-espree/convertTemplateType.js' { 92 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/convertTemplateType'>; 93 | } 94 | declare module 'babel-eslint/lib/babylon-to-espree/index.js' { 95 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/index'>; 96 | } 97 | declare module 'babel-eslint/lib/babylon-to-espree/toAST.js' { 98 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toAST'>; 99 | } 100 | declare module 'babel-eslint/lib/babylon-to-espree/toToken.js' { 101 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toToken'>; 102 | } 103 | declare module 'babel-eslint/lib/babylon-to-espree/toTokens.js' { 104 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toTokens'>; 105 | } 106 | declare module 'babel-eslint/lib/index.js' { 107 | declare module.exports: $Exports<'babel-eslint/lib/index'>; 108 | } 109 | declare module 'babel-eslint/lib/parse-with-patch.js' { 110 | declare module.exports: $Exports<'babel-eslint/lib/parse-with-patch'>; 111 | } 112 | declare module 'babel-eslint/lib/parse-with-scope.js' { 113 | declare module.exports: $Exports<'babel-eslint/lib/parse-with-scope'>; 114 | } 115 | declare module 'babel-eslint/lib/parse.js' { 116 | declare module.exports: $Exports<'babel-eslint/lib/parse'>; 117 | } 118 | declare module 'babel-eslint/lib/patch-eslint-scope.js' { 119 | declare module.exports: $Exports<'babel-eslint/lib/patch-eslint-scope'>; 120 | } 121 | declare module 'babel-eslint/lib/visitor-keys.js' { 122 | declare module.exports: $Exports<'babel-eslint/lib/visitor-keys'>; 123 | } 124 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Calendar merger 2 | 3 | Suite of tools to merge multiple external calendars into a single view or a single file for importing. 4 | 5 | ## Components 6 | 7 | ### Package 8 | 9 | `dist/ical-merger*.js` 10 | 11 | Default export is a relatively simple function that merges multiple .ics files into one. 12 | 13 | ```javascript 14 | merge(inputs, options); 15 | ``` 16 | 17 | ```javascript 18 | icals = [ 19 | fs.readFileSync('cal.ics', 'utf8'), 20 | fs.readFileSync('another.ics', 'utf8') 21 | ]; 22 | merge(icals, { 23 | calname: 'Merged Calendar', 24 | timezone: 'America/Chicago', 25 | caldesc: 'Two calendars put together' 26 | }) 27 | ``` 28 | 29 | Calendar name, description, and timezone default to their respective values in the first calendar encountered (`inputs[0]`); 30 | 31 | ### CLI tool 32 | 33 | `cli.js` 34 | 35 | A small wrapper for the underlying package. 36 | 37 | ```sh 38 | ical-merge 39 | ``` 40 | 41 | ```sh 42 | CALNAME="Merged Calendar"\ 43 | TIMEZONE="America/Chicago"\ 44 | CALDESC="Two calendars put together"\ 45 | ical-merge cal.ics another.ics 46 | ``` 47 | 48 | Accepts filenames, options are set by environment variables. Output is sent to stdout. 49 | 50 | ### Web service 51 | 52 | `dist/server.js` 53 | 54 | Web service that serves the calendar webapp and serves merged .ics files. 55 | 56 | `/combine.ics` accepts an array of URLs to externally-hosted .ics files, and responds with the merged file. URLs are specified with PHP-style array syntax: `?urls[]=…`. 57 | 58 | Other `/[ID].ics` merged files are returned, based on the [`.env.json`][env] configuration file. 59 | 60 | ### Webapp 61 | 62 | `public/**/*` 63 | 64 | Webapp that displays public calendars from Google Calendar in a single view. Uses [FullCalendar][fullcalendar] heavily. 65 | 66 | ![Webapp view](webapp.png) 67 | 68 | ## Requirements 69 | 70 | ### `.env.json` 71 | 72 | The web service and the webapp require configuration via `.env.json` in the project's root 73 | 74 | ```json 75 | { 76 | "GOOGLE_CALENDAR_API_KEY": "[API KEY]", 77 | "GOOGLE_ANALYTICS_TRACKING_ID": "[ID]", 78 | "calendars": { 79 | "cal1": { 80 | "calname": "Calendar 1", 81 | "caldesc": "Calendar 1 desc", 82 | "timezone": "America/Chicago", 83 | "color": "#462aa3", 84 | "googleCalendarId": "[ID]@group.calendar.google.com", 85 | "url": "https://calendar.google.com/calendar/ical/[ID]%40group.calendar.google.com/public/basic.ics" 86 | }, 87 | "cal2": { 88 | "calname": "Calendar 2", 89 | "caldesc": "Calendar 2 desc", 90 | "timezone": "America/Chicago", 91 | "color": "#001f3f", 92 | "subCalendars": [ 93 | { 94 | "calname": "Subcalendar 1", 95 | "caldesc": "Subcalendar 1 desc", 96 | "timezone": "America/Chicago", 97 | "color": "#0074D9", 98 | "googleCalendarId": "[ID]@group.calendar.google.com", 99 | "url": "https://calendar.google.com/calendar/ical/[ID]%40group.calendar.google.com/public/basic.ics" 100 | }, 101 | { 102 | "calname": "Subcalendar 2", 103 | "caldesc": "Subcalendar 2 desc", 104 | "timezone": "America/Chicago", 105 | "color": "#7FDBFF", 106 | "googleCalendarId": "[ID]@group.calendar.google.com", 107 | "url": "https://calendar.google.com/calendar/ical/[ID]%40group.calendar.google.com/public/basic.ics" 108 | } 109 | ] 110 | } 111 | }, 112 | "calendarGroups": { 113 | "basic": { 114 | "calname": "Group Name", 115 | "caldesc": "Main calendar group", 116 | "timezone": "America/Chicago", 117 | "color": "#36a2eb", 118 | "calendars": [ 119 | "cal1", 120 | "cal2" 121 | ] 122 | } 123 | }, 124 | "combine": { 125 | "calname": "Combined Calendar", 126 | "caldesc": "Combined calendar desc", 127 | "timezone": "America/Chicago" 128 | } 129 | } 130 | ``` 131 | Webapp uses `googleCalendarId`s, web service uses `url`s. 132 | 133 | 134 | [FullCalendar instructions for Google Calendar API key and calendar IDs][fullcalendar-gcal] 135 | 136 | ## Docker 137 | 138 | ### Build 139 | To build the Docker container run the following command in `./Docker`: 140 | 141 | 1. `cd Docker` 142 | 2. `cp example.env.json env.json` 143 | 3. _(Edit `env.json` to your needs)_ 144 | 4. `docker build . -t ics-merger` 145 | 146 | ### Run 147 | To run the tool in a Docker-container build it first then run: 148 | 149 | `docker run -p 80:3000 -d -v $PWD/env.json:/ics-merger/env.json:ro ics-merger` 150 | 151 | Where `env.json` is your configured file. 152 | 153 | [env]: #envjson 154 | [fullcalendar]: https://fullcalendar.io 155 | [fullcalendar-gcal]: https://fullcalendar.io/docs/google_calendar/ 156 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@jacobmischka/ical-merger", 3 | "version": "6.0.2", 4 | "description": "Merges multiple ical .ics files into one for importing elsewhere", 5 | "main": "dist/ical-merger.cjs.js", 6 | "bundle": "dist/ical-merger.bundle.js", 7 | "module": "dist/ical-merger.js", 8 | "scripts": { 9 | "start": "NODE_ENV=production node dist/server.js", 10 | "serve": "PORT=4444 nodemon --watch ./dist dist/server.js", 11 | "build": "npm-run-all clean --parallel build:*", 12 | "now-build": "NODE_ENV=production webpack --mode production", 13 | "build:webpack": "NODE_ENV=production webpack --mode production", 14 | "build:rollup": "run-p rollup:*", 15 | "build:components": "NODE_ENV=production babel ./src/components --out-dir ./dist/components", 16 | "build:helpers": "NODE_ENV=production babel ./src/constants.js -o ./dist/constants.js && NODE_ENV=production babel ./src/utils.js -o ./dist/utils.js && NODE_ENV=production babel ./src/server-utils.js -o ./dist/server-utils.js && NODE_ENV=production babel ./src/fullcalendar-to-ics.js -o ./dist/fullcalendar-to-ics.js", 17 | "rollup:node": "rollup -c", 18 | "rollup:bundle": "rollup -c rollup.config.bundle.js", 19 | "rollup:server": "rollup -c rollup.config.server.js", 20 | "watch": "npm-run-all clean --parallel watch:*", 21 | "watch:webpack": "webpack --progress --color --watch --mode development", 22 | "watch:rollup": "run-p rollup-watch:*", 23 | "watch:components": "NODE_ENV=production babel ./src/components --watch --out-dir ./dist/components", 24 | "watch:constants": "NODE_ENV=production babel ./src/constants.js --watch -o ./dist/constants.js", 25 | "watch:utils": "NODE_ENV=production babel ./src/utils.js --watch -o ./dist/utils.js", 26 | "rollup-watch:node": "rollup -cw", 27 | "rollup-watch:bundle": "rollup -c rollup.config.bundle.js -w", 28 | "rollup-watch:server": "rollup -c rollup.config.server.js -w", 29 | "clean": "rm -rf ./dist ./public ; mkdir -p dist", 30 | "lint": "eslint src", 31 | "analyze:bundle": "webpack-bundle-analyzer ./public/js/stats.json", 32 | "deploy": "echo '!env.json' >> .npmignore ; now ; sed -i '$ d' .npmignore", 33 | "prepublish": "in-publish && npm-run-all lint && npm-run-all build || not-in-publish" 34 | }, 35 | "bin": { 36 | "ical-merge": "./cli.js" 37 | }, 38 | "repository": { 39 | "url": "git@github.com:jacobmischka/ics-merger.git", 40 | "type": "git" 41 | }, 42 | "engines": { 43 | "node": ">6.8.1" 44 | }, 45 | "browserslist": [ 46 | "> 1%", 47 | "last 2 versions", 48 | "IE 9" 49 | ], 50 | "author": "Jacob Mischka ", 51 | "license": "MIT", 52 | "dependencies": { 53 | "clipboard": "^2.0.1", 54 | "color": "^3.0.0", 55 | "color-string": "^1.4.0", 56 | "express": "^4.14.0", 57 | "fullcalendar": "^3.10.1", 58 | "ical.js": "^1.2.2", 59 | "iframe-resizer": "^3.5.14", 60 | "jquery": "^3.4.1", 61 | "linkifyjs": "^2.1.9", 62 | "localforage": "^1.5.6", 63 | "lodash": "^4.17.4", 64 | "moment-timezone": "^0.5.26", 65 | "node-fetch": "^2.1.2", 66 | "prop-types": "^15.5.6", 67 | "react": "^17.0.0", 68 | "react-dom": "^17.0.0", 69 | "react-feather": "^1.1.0", 70 | "react-router": "^4.0.0", 71 | "react-router-dom": "^4.0.0", 72 | "striptags": "^3.1.1", 73 | "styled-jsx": "3.3.2", 74 | "typeface-noto-sans": "^0.0.54" 75 | }, 76 | "devDependencies": { 77 | "@babel/cli": "^7.12.10", 78 | "@babel/core": "^7.12.10", 79 | "@babel/plugin-external-helpers": "^7.12.1", 80 | "@babel/plugin-proposal-class-properties": "^7.12.1", 81 | "@babel/preset-env": "^7.12.11", 82 | "@babel/preset-flow": "^7.12.1", 83 | "@babel/preset-react": "^7.12.10", 84 | "apply-loader": "^2.0.0", 85 | "autoprefixer": "^8.6.3", 86 | "babel-eslint": "^10.1.0", 87 | "babel-loader": "^8.2.2", 88 | "babel-plugin-transform-class-properties": "^6.24.1", 89 | "classlist-polyfill": "^1.0.3", 90 | "core-js": "^3.8.3", 91 | "css-loader": "^0.28.0", 92 | "element-dataset": "^2.2.2", 93 | "es6-promise": "^4.0.5", 94 | "eslint": "^4.4.1", 95 | "eslint-plugin-react": "^7.2.1", 96 | "file-loader": "^1.1.5", 97 | "flow-bin": "^0.75.0", 98 | "flow-typed": "^2.1.5", 99 | "html-webpack-plugin": "^3.2.0", 100 | "in-publish": "^2.0.0", 101 | "mini-css-extract-plugin": "^0.4.0", 102 | "nodemon": "^1.11.0", 103 | "npm-run-all": "^4.0.1", 104 | "raf": "^3.3.2", 105 | "regenerator-runtime": "^0.13.7", 106 | "rollup": "^2.38.0", 107 | "rollup-plugin-babel": "^4.4.0", 108 | "rollup-plugin-buble": "^0.19.2", 109 | "rollup-plugin-commonjs": "^10.1.0", 110 | "rollup-plugin-json": "^4.0.0", 111 | "rollup-plugin-node-resolve": "^5.2.0", 112 | "style-loader": "^0.21.0", 113 | "url-search-params-polyfill": "^4.0.0", 114 | "webpack": "^4.12.0", 115 | "webpack-bundle-analyzer": "^2.1.1", 116 | "webpack-cli": "^3.0.8", 117 | "webpack-dev-server": "^3.1.4", 118 | "whatwg-fetch": "^2.0.0" 119 | }, 120 | "icalMerger": { 121 | "prodid": "-//Jacob Mischka//iCal Merger//EN", 122 | "version": "2.0" 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /flow-typed/npm/es6-promise_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fc3dc133725f4fd2bfcc21b53149b6ec 2 | // flow-typed version: <>/es6-promise_v^4.0.5/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'es6-promise' 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 'es6-promise' { 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 'es6-promise/auto' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'es6-promise/dist/es6-promise.auto' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'es6-promise/dist/es6-promise.auto.min' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'es6-promise/dist/es6-promise' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'es6-promise/dist/es6-promise.min' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'es6-promise/lib/es6-promise.auto' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'es6-promise/lib/es6-promise' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'es6-promise/lib/es6-promise/-internal' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'es6-promise/lib/es6-promise/asap' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'es6-promise/lib/es6-promise/enumerator' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'es6-promise/lib/es6-promise/polyfill' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'es6-promise/lib/es6-promise/promise' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'es6-promise/lib/es6-promise/promise/all' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'es6-promise/lib/es6-promise/promise/race' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'es6-promise/lib/es6-promise/promise/reject' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'es6-promise/lib/es6-promise/promise/resolve' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'es6-promise/lib/es6-promise/then' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'es6-promise/lib/es6-promise/utils' { 94 | declare module.exports: any; 95 | } 96 | 97 | // Filename aliases 98 | declare module 'es6-promise/auto.js' { 99 | declare module.exports: $Exports<'es6-promise/auto'>; 100 | } 101 | declare module 'es6-promise/dist/es6-promise.auto.js' { 102 | declare module.exports: $Exports<'es6-promise/dist/es6-promise.auto'>; 103 | } 104 | declare module 'es6-promise/dist/es6-promise.auto.min.js' { 105 | declare module.exports: $Exports<'es6-promise/dist/es6-promise.auto.min'>; 106 | } 107 | declare module 'es6-promise/dist/es6-promise.js' { 108 | declare module.exports: $Exports<'es6-promise/dist/es6-promise'>; 109 | } 110 | declare module 'es6-promise/dist/es6-promise.min.js' { 111 | declare module.exports: $Exports<'es6-promise/dist/es6-promise.min'>; 112 | } 113 | declare module 'es6-promise/lib/es6-promise.auto.js' { 114 | declare module.exports: $Exports<'es6-promise/lib/es6-promise.auto'>; 115 | } 116 | declare module 'es6-promise/lib/es6-promise.js' { 117 | declare module.exports: $Exports<'es6-promise/lib/es6-promise'>; 118 | } 119 | declare module 'es6-promise/lib/es6-promise/-internal.js' { 120 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/-internal'>; 121 | } 122 | declare module 'es6-promise/lib/es6-promise/asap.js' { 123 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/asap'>; 124 | } 125 | declare module 'es6-promise/lib/es6-promise/enumerator.js' { 126 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/enumerator'>; 127 | } 128 | declare module 'es6-promise/lib/es6-promise/polyfill.js' { 129 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/polyfill'>; 130 | } 131 | declare module 'es6-promise/lib/es6-promise/promise.js' { 132 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/promise'>; 133 | } 134 | declare module 'es6-promise/lib/es6-promise/promise/all.js' { 135 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/promise/all'>; 136 | } 137 | declare module 'es6-promise/lib/es6-promise/promise/race.js' { 138 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/promise/race'>; 139 | } 140 | declare module 'es6-promise/lib/es6-promise/promise/reject.js' { 141 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/promise/reject'>; 142 | } 143 | declare module 'es6-promise/lib/es6-promise/promise/resolve.js' { 144 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/promise/resolve'>; 145 | } 146 | declare module 'es6-promise/lib/es6-promise/then.js' { 147 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/then'>; 148 | } 149 | declare module 'es6-promise/lib/es6-promise/utils.js' { 150 | declare module.exports: $Exports<'es6-promise/lib/es6-promise/utils'>; 151 | } 152 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-dom_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e17b8456b4440f2ec927d930e61db55f 2 | // flow-typed version: 2973a15489/react-router-dom_v4.x.x/flow_>=v0.63.x <=v0.97.x 3 | 4 | declare module "react-router-dom" { 5 | declare export var BrowserRouter: React$ComponentType<{| 6 | basename?: string, 7 | forceRefresh?: boolean, 8 | getUserConfirmation?: GetUserConfirmation, 9 | keyLength?: number, 10 | children?: React$Node 11 | |}> 12 | 13 | declare export var HashRouter: React$ComponentType<{| 14 | basename?: string, 15 | getUserConfirmation?: GetUserConfirmation, 16 | hashType?: "slash" | "noslash" | "hashbang", 17 | children?: React$Node 18 | |}> 19 | 20 | declare export var Link: React$ComponentType<{ 21 | className?: string, 22 | to: string | LocationShape, 23 | replace?: boolean, 24 | children?: React$Node 25 | }> 26 | 27 | declare export var NavLink: React$ComponentType<{ 28 | to: string | LocationShape, 29 | activeClassName?: string, 30 | className?: string, 31 | activeStyle?: Object, 32 | style?: Object, 33 | isActive?: (match: Match, location: Location) => boolean, 34 | children?: React$Node, 35 | exact?: boolean, 36 | strict?: boolean 37 | }> 38 | 39 | // NOTE: Below are duplicated from react-router. If updating these, please 40 | // update the react-router and react-router-native types as well. 41 | declare export type Location = { 42 | pathname: string, 43 | search: string, 44 | hash: string, 45 | state?: any, 46 | key?: string 47 | }; 48 | 49 | declare export type LocationShape = { 50 | pathname?: string, 51 | search?: string, 52 | hash?: string, 53 | state?: any 54 | }; 55 | 56 | declare export type HistoryAction = "PUSH" | "REPLACE" | "POP"; 57 | 58 | declare export type RouterHistory = { 59 | length: number, 60 | location: Location, 61 | action: HistoryAction, 62 | listen( 63 | callback: (location: Location, action: HistoryAction) => void 64 | ): () => void, 65 | push(path: string | LocationShape, state?: any): void, 66 | replace(path: string | LocationShape, state?: any): void, 67 | go(n: number): void, 68 | goBack(): void, 69 | goForward(): void, 70 | canGo?: (n: number) => boolean, 71 | block( 72 | callback: string | (location: Location, action: HistoryAction) => ?string 73 | ): () => void, 74 | // createMemoryHistory 75 | index?: number, 76 | entries?: Array 77 | }; 78 | 79 | declare export type Match = { 80 | params: { [key: string]: ?string }, 81 | isExact: boolean, 82 | path: string, 83 | url: string 84 | }; 85 | 86 | declare export type ContextRouter = {| 87 | history: RouterHistory, 88 | location: Location, 89 | match: Match, 90 | staticContext?: StaticRouterContext 91 | |}; 92 | 93 | declare type ContextRouterVoid = { 94 | history: RouterHistory | void, 95 | location: Location | void, 96 | match: Match | void, 97 | staticContext?: StaticRouterContext | void 98 | }; 99 | 100 | declare export type GetUserConfirmation = ( 101 | message: string, 102 | callback: (confirmed: boolean) => void 103 | ) => void; 104 | 105 | declare export type StaticRouterContext = { 106 | url?: string 107 | }; 108 | 109 | declare export var StaticRouter: React$ComponentType<{| 110 | basename?: string, 111 | location?: string | Location, 112 | context: StaticRouterContext, 113 | children?: React$Node 114 | |}> 115 | 116 | declare export var MemoryRouter: React$ComponentType<{| 117 | initialEntries?: Array, 118 | initialIndex?: number, 119 | getUserConfirmation?: GetUserConfirmation, 120 | keyLength?: number, 121 | children?: React$Node 122 | |}> 123 | 124 | declare export var Router: React$ComponentType<{| 125 | history: RouterHistory, 126 | children?: React$Node 127 | |}> 128 | 129 | declare export var Prompt: React$ComponentType<{| 130 | message: string | ((location: Location) => string | boolean), 131 | when?: boolean 132 | |}> 133 | 134 | declare export var Redirect: React$ComponentType<{| 135 | to: string | LocationShape, 136 | push?: boolean, 137 | from?: string, 138 | exact?: boolean, 139 | strict?: boolean 140 | |}> 141 | 142 | declare export var Route: React$ComponentType<{| 143 | component?: React$ComponentType<*>, 144 | render?: (router: ContextRouter) => React$Node, 145 | children?: React$ComponentType | React$Node, 146 | path?: string | Array, 147 | exact?: boolean, 148 | strict?: boolean, 149 | location?: LocationShape, 150 | sensitive?: boolean 151 | |}> 152 | 153 | declare export var Switch: React$ComponentType<{| 154 | children?: React$Node, 155 | location?: Location 156 | |}> 157 | 158 | declare export function withRouter>(WrappedComponent: Component) : React$ComponentType<$Diff>, ContextRouterVoid>>; 159 | 160 | declare type MatchPathOptions = { 161 | path?: string, 162 | exact?: boolean, 163 | sensitive?: boolean, 164 | strict?: boolean 165 | }; 166 | 167 | declare export function matchPath( 168 | pathname: string, 169 | options?: MatchPathOptions | string, 170 | parent?: Match 171 | ): null | Match; 172 | 173 | declare export function generatePath(pattern?: string, params?: Object): string; 174 | } 175 | -------------------------------------------------------------------------------- /flow-typed/npm/ical.js_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4746ab353c5c3ca127e6611d9bcc471d 2 | // flow-typed version: <>/ical.js_v^1.2.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'ical.js' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'ical.js' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'ical.js/build/ical' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'ical.js/build/ical.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'ical.js/lib/ical/binary' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'ical.js/lib/ical/component_parser' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'ical.js/lib/ical/component' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'ical.js/lib/ical/design' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'ical.js/lib/ical/duration' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'ical.js/lib/ical/event' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'ical.js/lib/ical/helpers' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'ical.js/lib/ical/parse' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'ical.js/lib/ical/period' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'ical.js/lib/ical/property' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'ical.js/lib/ical/recur_expansion' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'ical.js/lib/ical/recur_iterator' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'ical.js/lib/ical/recur' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'ical.js/lib/ical/stringify' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'ical.js/lib/ical/time' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'ical.js/lib/ical/timezone_service' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'ical.js/lib/ical/timezone' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'ical.js/lib/ical/utc_offset' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'ical.js/lib/ical/vcard_time' { 106 | declare module.exports: any; 107 | } 108 | 109 | // Filename aliases 110 | declare module 'ical.js/build/ical.js' { 111 | declare module.exports: $Exports<'ical.js/build/ical'>; 112 | } 113 | declare module 'ical.js/build/ical.min.js' { 114 | declare module.exports: $Exports<'ical.js/build/ical.min'>; 115 | } 116 | declare module 'ical.js/lib/ical/binary.js' { 117 | declare module.exports: $Exports<'ical.js/lib/ical/binary'>; 118 | } 119 | declare module 'ical.js/lib/ical/component_parser.js' { 120 | declare module.exports: $Exports<'ical.js/lib/ical/component_parser'>; 121 | } 122 | declare module 'ical.js/lib/ical/component.js' { 123 | declare module.exports: $Exports<'ical.js/lib/ical/component'>; 124 | } 125 | declare module 'ical.js/lib/ical/design.js' { 126 | declare module.exports: $Exports<'ical.js/lib/ical/design'>; 127 | } 128 | declare module 'ical.js/lib/ical/duration.js' { 129 | declare module.exports: $Exports<'ical.js/lib/ical/duration'>; 130 | } 131 | declare module 'ical.js/lib/ical/event.js' { 132 | declare module.exports: $Exports<'ical.js/lib/ical/event'>; 133 | } 134 | declare module 'ical.js/lib/ical/helpers.js' { 135 | declare module.exports: $Exports<'ical.js/lib/ical/helpers'>; 136 | } 137 | declare module 'ical.js/lib/ical/parse.js' { 138 | declare module.exports: $Exports<'ical.js/lib/ical/parse'>; 139 | } 140 | declare module 'ical.js/lib/ical/period.js' { 141 | declare module.exports: $Exports<'ical.js/lib/ical/period'>; 142 | } 143 | declare module 'ical.js/lib/ical/property.js' { 144 | declare module.exports: $Exports<'ical.js/lib/ical/property'>; 145 | } 146 | declare module 'ical.js/lib/ical/recur_expansion.js' { 147 | declare module.exports: $Exports<'ical.js/lib/ical/recur_expansion'>; 148 | } 149 | declare module 'ical.js/lib/ical/recur_iterator.js' { 150 | declare module.exports: $Exports<'ical.js/lib/ical/recur_iterator'>; 151 | } 152 | declare module 'ical.js/lib/ical/recur.js' { 153 | declare module.exports: $Exports<'ical.js/lib/ical/recur'>; 154 | } 155 | declare module 'ical.js/lib/ical/stringify.js' { 156 | declare module.exports: $Exports<'ical.js/lib/ical/stringify'>; 157 | } 158 | declare module 'ical.js/lib/ical/time.js' { 159 | declare module.exports: $Exports<'ical.js/lib/ical/time'>; 160 | } 161 | declare module 'ical.js/lib/ical/timezone_service.js' { 162 | declare module.exports: $Exports<'ical.js/lib/ical/timezone_service'>; 163 | } 164 | declare module 'ical.js/lib/ical/timezone.js' { 165 | declare module.exports: $Exports<'ical.js/lib/ical/timezone'>; 166 | } 167 | declare module 'ical.js/lib/ical/utc_offset.js' { 168 | declare module.exports: $Exports<'ical.js/lib/ical/utc_offset'>; 169 | } 170 | declare module 'ical.js/lib/ical/vcard_time.js' { 171 | declare module.exports: $Exports<'ical.js/lib/ical/vcard_time'>; 172 | } 173 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-dev-server_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ba854619dd7ef4162238e115c439c167 2 | // flow-typed version: <>/webpack-dev-server_v^3.1.4/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-dev-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 'webpack-dev-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 'webpack-dev-server/bin/options' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-dev-server/bin/webpack-dev-server' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-dev-server/client/index.bundle' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-dev-server/client/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-dev-server/client/live.bundle' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-dev-server/client/overlay' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-dev-server/client/socket' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-dev-server/client/sockjs.bundle' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-dev-server/client/webpack.config' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'webpack-dev-server/lib/Server' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'webpack-dev-server/lib/utils/addEntries' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'webpack-dev-server/lib/utils/colors' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'webpack-dev-server/lib/utils/createCertificate' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'webpack-dev-server/lib/utils/createConfig' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'webpack-dev-server/lib/utils/createDomain' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'webpack-dev-server/lib/utils/createLogger' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'webpack-dev-server/lib/utils/defaultTo' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'webpack-dev-server/lib/utils/getVersions' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'webpack-dev-server/lib/utils/runBonjour' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'webpack-dev-server/lib/utils/status' { 102 | declare module.exports: any; 103 | } 104 | 105 | // Filename aliases 106 | declare module 'webpack-dev-server/bin/options.js' { 107 | declare module.exports: $Exports<'webpack-dev-server/bin/options'>; 108 | } 109 | declare module 'webpack-dev-server/bin/webpack-dev-server.js' { 110 | declare module.exports: $Exports<'webpack-dev-server/bin/webpack-dev-server'>; 111 | } 112 | declare module 'webpack-dev-server/client/index.bundle.js' { 113 | declare module.exports: $Exports<'webpack-dev-server/client/index.bundle'>; 114 | } 115 | declare module 'webpack-dev-server/client/index.js' { 116 | declare module.exports: $Exports<'webpack-dev-server/client/index'>; 117 | } 118 | declare module 'webpack-dev-server/client/live.bundle.js' { 119 | declare module.exports: $Exports<'webpack-dev-server/client/live.bundle'>; 120 | } 121 | declare module 'webpack-dev-server/client/overlay.js' { 122 | declare module.exports: $Exports<'webpack-dev-server/client/overlay'>; 123 | } 124 | declare module 'webpack-dev-server/client/socket.js' { 125 | declare module.exports: $Exports<'webpack-dev-server/client/socket'>; 126 | } 127 | declare module 'webpack-dev-server/client/sockjs.bundle.js' { 128 | declare module.exports: $Exports<'webpack-dev-server/client/sockjs.bundle'>; 129 | } 130 | declare module 'webpack-dev-server/client/webpack.config.js' { 131 | declare module.exports: $Exports<'webpack-dev-server/client/webpack.config'>; 132 | } 133 | declare module 'webpack-dev-server/lib/Server.js' { 134 | declare module.exports: $Exports<'webpack-dev-server/lib/Server'>; 135 | } 136 | declare module 'webpack-dev-server/lib/utils/addEntries.js' { 137 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/addEntries'>; 138 | } 139 | declare module 'webpack-dev-server/lib/utils/colors.js' { 140 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/colors'>; 141 | } 142 | declare module 'webpack-dev-server/lib/utils/createCertificate.js' { 143 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/createCertificate'>; 144 | } 145 | declare module 'webpack-dev-server/lib/utils/createConfig.js' { 146 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/createConfig'>; 147 | } 148 | declare module 'webpack-dev-server/lib/utils/createDomain.js' { 149 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/createDomain'>; 150 | } 151 | declare module 'webpack-dev-server/lib/utils/createLogger.js' { 152 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/createLogger'>; 153 | } 154 | declare module 'webpack-dev-server/lib/utils/defaultTo.js' { 155 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/defaultTo'>; 156 | } 157 | declare module 'webpack-dev-server/lib/utils/getVersions.js' { 158 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/getVersions'>; 159 | } 160 | declare module 'webpack-dev-server/lib/utils/runBonjour.js' { 161 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/runBonjour'>; 162 | } 163 | declare module 'webpack-dev-server/lib/utils/status.js' { 164 | declare module.exports: $Exports<'webpack-dev-server/lib/utils/status'>; 165 | } 166 | -------------------------------------------------------------------------------- /flow-typed/npm/npm-run-all_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1ba79a9dce5f8e423807e5031216169c 2 | // flow-typed version: <>/npm-run-all_v^4.0.1/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'npm-run-all' 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 'npm-run-all' { 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 'npm-run-all/bin/common/bootstrap' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'npm-run-all/bin/common/parse-cli-args' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'npm-run-all/bin/common/version' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'npm-run-all/bin/npm-run-all/help' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'npm-run-all/bin/npm-run-all/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'npm-run-all/bin/npm-run-all/main' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'npm-run-all/bin/run-p/help' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'npm-run-all/bin/run-p/index' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'npm-run-all/bin/run-p/main' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'npm-run-all/bin/run-s/help' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'npm-run-all/bin/run-s/index' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'npm-run-all/bin/run-s/main' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'npm-run-all/lib/create-header' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'npm-run-all/lib/create-prefix-transform-stream' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'npm-run-all/lib/index' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'npm-run-all/lib/match-tasks' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'npm-run-all/lib/npm-run-all-error' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'npm-run-all/lib/read-package-json' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'npm-run-all/lib/run-task' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'npm-run-all/lib/run-tasks' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'npm-run-all/lib/spawn-posix' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'npm-run-all/lib/spawn-win32' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'npm-run-all/lib/spawn' { 114 | declare module.exports: any; 115 | } 116 | 117 | // Filename aliases 118 | declare module 'npm-run-all/bin/common/bootstrap.js' { 119 | declare module.exports: $Exports<'npm-run-all/bin/common/bootstrap'>; 120 | } 121 | declare module 'npm-run-all/bin/common/parse-cli-args.js' { 122 | declare module.exports: $Exports<'npm-run-all/bin/common/parse-cli-args'>; 123 | } 124 | declare module 'npm-run-all/bin/common/version.js' { 125 | declare module.exports: $Exports<'npm-run-all/bin/common/version'>; 126 | } 127 | declare module 'npm-run-all/bin/npm-run-all/help.js' { 128 | declare module.exports: $Exports<'npm-run-all/bin/npm-run-all/help'>; 129 | } 130 | declare module 'npm-run-all/bin/npm-run-all/index.js' { 131 | declare module.exports: $Exports<'npm-run-all/bin/npm-run-all/index'>; 132 | } 133 | declare module 'npm-run-all/bin/npm-run-all/main.js' { 134 | declare module.exports: $Exports<'npm-run-all/bin/npm-run-all/main'>; 135 | } 136 | declare module 'npm-run-all/bin/run-p/help.js' { 137 | declare module.exports: $Exports<'npm-run-all/bin/run-p/help'>; 138 | } 139 | declare module 'npm-run-all/bin/run-p/index.js' { 140 | declare module.exports: $Exports<'npm-run-all/bin/run-p/index'>; 141 | } 142 | declare module 'npm-run-all/bin/run-p/main.js' { 143 | declare module.exports: $Exports<'npm-run-all/bin/run-p/main'>; 144 | } 145 | declare module 'npm-run-all/bin/run-s/help.js' { 146 | declare module.exports: $Exports<'npm-run-all/bin/run-s/help'>; 147 | } 148 | declare module 'npm-run-all/bin/run-s/index.js' { 149 | declare module.exports: $Exports<'npm-run-all/bin/run-s/index'>; 150 | } 151 | declare module 'npm-run-all/bin/run-s/main.js' { 152 | declare module.exports: $Exports<'npm-run-all/bin/run-s/main'>; 153 | } 154 | declare module 'npm-run-all/lib/create-header.js' { 155 | declare module.exports: $Exports<'npm-run-all/lib/create-header'>; 156 | } 157 | declare module 'npm-run-all/lib/create-prefix-transform-stream.js' { 158 | declare module.exports: $Exports<'npm-run-all/lib/create-prefix-transform-stream'>; 159 | } 160 | declare module 'npm-run-all/lib/index.js' { 161 | declare module.exports: $Exports<'npm-run-all/lib/index'>; 162 | } 163 | declare module 'npm-run-all/lib/match-tasks.js' { 164 | declare module.exports: $Exports<'npm-run-all/lib/match-tasks'>; 165 | } 166 | declare module 'npm-run-all/lib/npm-run-all-error.js' { 167 | declare module.exports: $Exports<'npm-run-all/lib/npm-run-all-error'>; 168 | } 169 | declare module 'npm-run-all/lib/read-package-json.js' { 170 | declare module.exports: $Exports<'npm-run-all/lib/read-package-json'>; 171 | } 172 | declare module 'npm-run-all/lib/run-task.js' { 173 | declare module.exports: $Exports<'npm-run-all/lib/run-task'>; 174 | } 175 | declare module 'npm-run-all/lib/run-tasks.js' { 176 | declare module.exports: $Exports<'npm-run-all/lib/run-tasks'>; 177 | } 178 | declare module 'npm-run-all/lib/spawn-posix.js' { 179 | declare module.exports: $Exports<'npm-run-all/lib/spawn-posix'>; 180 | } 181 | declare module 'npm-run-all/lib/spawn-win32.js' { 182 | declare module.exports: $Exports<'npm-run-all/lib/spawn-win32'>; 183 | } 184 | declare module 'npm-run-all/lib/spawn.js' { 185 | declare module.exports: $Exports<'npm-run-all/lib/spawn'>; 186 | } 187 | -------------------------------------------------------------------------------- /src/components/Subscription.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import Clipboard from 'clipboard'; 4 | import Color from 'color'; 5 | 6 | import { COLORS, OPACITIES } from '../constants.js'; 7 | 8 | const buttonHoverBackgroundColor = new Color(COLORS.PRIMARY).alpha(OPACITIES.SECONDARY); 9 | const secondaryText = new Color(COLORS.TEXT).alpha(OPACITIES.TEXT.SECONDARY); 10 | 11 | export default class Subscription extends Component { 12 | constructor(props){ 13 | super(props); 14 | this.state = { 15 | showSub: false, 16 | copyButtonHovered: false, 17 | showUrl: false, 18 | copied: false 19 | }; 20 | 21 | this.handleShowSub = this.handleShowSub.bind(this); 22 | this.handleHideSub = this.handleHideSub.bind(this); 23 | this.toggleShowUrl = this.toggleShowUrl.bind(this); 24 | this.handleCopyButtonMouseDown = this.handleCopyButtonMouseDown.bind(this); 25 | this.handleCopyButtonMouseUp = this.handleCopyButtonMouseUp.bind(this); 26 | } 27 | 28 | UNSAFE_componentWillUpdate(nextProps, nextState){ 29 | if((this.state.showSub && !nextState.showSub) 30 | || (this.state.showUrl && !nextState.showUrl)) 31 | this.clipboard.destroy(); 32 | } 33 | 34 | render(){ 35 | const { url } = this.props; 36 | 37 | let dirs = url.split('?')[0].split('/'); 38 | const filename = dirs[dirs.length - 1]; 39 | const webcalUrl = `webcal://${url.substring(url.indexOf('://') + 3)}`; 40 | 41 | return ( 42 |

    43 | { 44 | this.state.showSub 45 | ? ( 46 |
    47 |
    48 | 50 | Subscribe with Outlook 51 | 52 | { 53 | this.state.showUrl 54 | ? ( 55 |
    56 | 58 | 65 |
    66 | ) 67 | : ( 68 | 75 | ) 76 | } 77 | 80 | Download ICal/.ics file 81 | 82 |
    83 | 88 |
    89 | ) 90 | : ( 91 |
    92 | 95 |
    96 | ) 97 | } 98 | 99 | 178 |
    179 | ); 180 | } 181 | 182 | componentDidUpdate(){ 183 | if(this.state.showSub){ 184 | this.clipboard = new Clipboard('#copy-button'); 185 | this.clipboard.on('success', () => { 186 | this.setState({copied: true}, () => { 187 | window.setTimeout(() => { 188 | this.setState({copied: false}); 189 | }, 2000); 190 | }); 191 | }); 192 | } 193 | } 194 | 195 | handleShowSub(event){ 196 | event.preventDefault(); 197 | this.setState({showSub: true}); 198 | } 199 | 200 | handleHideSub(event){ 201 | event.preventDefault(); 202 | this.setState({showSub: false}); 203 | } 204 | 205 | toggleShowUrl(){ 206 | this.setState(state => { 207 | return {showUrl: !state.showUrl}; 208 | }); 209 | } 210 | 211 | handleCopyButtonMouseDown(){ 212 | this.copyButtonPressTimeout = window.setTimeout(() => { 213 | this.toggleShowUrl(); 214 | }, 1000); 215 | } 216 | 217 | handleCopyButtonMouseUp(){ 218 | if(this.copyButtonPressTimeout) 219 | window.clearTimeout(this.copyButtonPressTimeout); 220 | } 221 | } 222 | 223 | Subscription.propTypes = { 224 | url: PropTypes.string 225 | }; 226 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-typed_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 688acd36c2ecfd8ec0a92bd7873aba8e 2 | // flow-typed version: <>/flow-typed_v^2.1.5/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'flow-typed' 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 'flow-typed' { 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 'flow-typed/dist/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'flow-typed/dist/commands/create-stub' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'flow-typed/dist/commands/install' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'flow-typed/dist/commands/runTests' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'flow-typed/dist/commands/search' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'flow-typed/dist/commands/update-cache' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'flow-typed/dist/commands/update' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'flow-typed/dist/commands/validateDefs' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'flow-typed/dist/commands/version' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'flow-typed/dist/lib/cacheRepoUtils' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'flow-typed/dist/lib/codeSign' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'flow-typed/dist/lib/fileUtils' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'flow-typed/dist/lib/flowProjectUtils' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'flow-typed/dist/lib/flowVersion' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'flow-typed/dist/lib/git' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'flow-typed/dist/lib/github' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'flow-typed/dist/lib/isInFlowTypedRepo' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'flow-typed/dist/lib/libDefs' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'flow-typed/dist/lib/node' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'flow-typed/dist/lib/npm/npmLibDefs' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'flow-typed/dist/lib/npm/npmProjectUtils' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'flow-typed/dist/lib/semver' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'flow-typed/dist/lib/stubUtils' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'flow-typed/dist/lib/validationErrors' { 118 | declare module.exports: any; 119 | } 120 | 121 | // Filename aliases 122 | declare module 'flow-typed/dist/cli.js' { 123 | declare module.exports: $Exports<'flow-typed/dist/cli'>; 124 | } 125 | declare module 'flow-typed/dist/commands/create-stub.js' { 126 | declare module.exports: $Exports<'flow-typed/dist/commands/create-stub'>; 127 | } 128 | declare module 'flow-typed/dist/commands/install.js' { 129 | declare module.exports: $Exports<'flow-typed/dist/commands/install'>; 130 | } 131 | declare module 'flow-typed/dist/commands/runTests.js' { 132 | declare module.exports: $Exports<'flow-typed/dist/commands/runTests'>; 133 | } 134 | declare module 'flow-typed/dist/commands/search.js' { 135 | declare module.exports: $Exports<'flow-typed/dist/commands/search'>; 136 | } 137 | declare module 'flow-typed/dist/commands/update-cache.js' { 138 | declare module.exports: $Exports<'flow-typed/dist/commands/update-cache'>; 139 | } 140 | declare module 'flow-typed/dist/commands/update.js' { 141 | declare module.exports: $Exports<'flow-typed/dist/commands/update'>; 142 | } 143 | declare module 'flow-typed/dist/commands/validateDefs.js' { 144 | declare module.exports: $Exports<'flow-typed/dist/commands/validateDefs'>; 145 | } 146 | declare module 'flow-typed/dist/commands/version.js' { 147 | declare module.exports: $Exports<'flow-typed/dist/commands/version'>; 148 | } 149 | declare module 'flow-typed/dist/lib/cacheRepoUtils.js' { 150 | declare module.exports: $Exports<'flow-typed/dist/lib/cacheRepoUtils'>; 151 | } 152 | declare module 'flow-typed/dist/lib/codeSign.js' { 153 | declare module.exports: $Exports<'flow-typed/dist/lib/codeSign'>; 154 | } 155 | declare module 'flow-typed/dist/lib/fileUtils.js' { 156 | declare module.exports: $Exports<'flow-typed/dist/lib/fileUtils'>; 157 | } 158 | declare module 'flow-typed/dist/lib/flowProjectUtils.js' { 159 | declare module.exports: $Exports<'flow-typed/dist/lib/flowProjectUtils'>; 160 | } 161 | declare module 'flow-typed/dist/lib/flowVersion.js' { 162 | declare module.exports: $Exports<'flow-typed/dist/lib/flowVersion'>; 163 | } 164 | declare module 'flow-typed/dist/lib/git.js' { 165 | declare module.exports: $Exports<'flow-typed/dist/lib/git'>; 166 | } 167 | declare module 'flow-typed/dist/lib/github.js' { 168 | declare module.exports: $Exports<'flow-typed/dist/lib/github'>; 169 | } 170 | declare module 'flow-typed/dist/lib/isInFlowTypedRepo.js' { 171 | declare module.exports: $Exports<'flow-typed/dist/lib/isInFlowTypedRepo'>; 172 | } 173 | declare module 'flow-typed/dist/lib/libDefs.js' { 174 | declare module.exports: $Exports<'flow-typed/dist/lib/libDefs'>; 175 | } 176 | declare module 'flow-typed/dist/lib/node.js' { 177 | declare module.exports: $Exports<'flow-typed/dist/lib/node'>; 178 | } 179 | declare module 'flow-typed/dist/lib/npm/npmLibDefs.js' { 180 | declare module.exports: $Exports<'flow-typed/dist/lib/npm/npmLibDefs'>; 181 | } 182 | declare module 'flow-typed/dist/lib/npm/npmProjectUtils.js' { 183 | declare module.exports: $Exports<'flow-typed/dist/lib/npm/npmProjectUtils'>; 184 | } 185 | declare module 'flow-typed/dist/lib/semver.js' { 186 | declare module.exports: $Exports<'flow-typed/dist/lib/semver'>; 187 | } 188 | declare module 'flow-typed/dist/lib/stubUtils.js' { 189 | declare module.exports: $Exports<'flow-typed/dist/lib/stubUtils'>; 190 | } 191 | declare module 'flow-typed/dist/lib/validationErrors.js' { 192 | declare module.exports: $Exports<'flow-typed/dist/lib/validationErrors'>; 193 | } 194 | -------------------------------------------------------------------------------- /src/components/CalendarEvent.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | import React, { Component } from "react"; 4 | import PropTypes from "prop-types"; 5 | import Color from "color"; 6 | import striptags from "striptags"; 7 | import linkifyHtml from 'linkifyjs/html'; 8 | 9 | import MapPin from "react-feather/dist/icons/map-pin.js"; 10 | import User from "react-feather/dist/icons/user.js"; 11 | import Users from "react-feather/dist/icons/users.js"; 12 | 13 | import { OPACITIES } from "../constants.js"; 14 | 15 | export default class CalendarEvent extends Component { 16 | constructor(props) { 17 | super(props); 18 | 19 | this.handleClick = this.handleClick.bind(this); 20 | this.getEventTime = this.getEventTime.bind(this); 21 | this.getClassName = this.getClassName.bind(this); 22 | } 23 | 24 | markupDescription(description) { 25 | description = linkifyHtml(striptags(description, ["a", "i", "b", "br", "p"])); 26 | 27 | return { __html: description }; 28 | } 29 | 30 | renderEventLocation(location) { 31 | if (!location) return; 32 | 33 | if (typeof location === "string") return location; 34 | if (location.name) return location.name; 35 | } 36 | 37 | render() { 38 | const { 39 | event, 40 | showLocation, 41 | showCalendarName, 42 | showDescription, 43 | showPresenters 44 | } = this.props; 45 | 46 | let eventTime = this.getEventTime(); 47 | let className = this.getClassName(); 48 | 49 | let color = Color(event.color); 50 | 51 | let style = { 52 | border: `1px solid ${color.rgb().string()}`, 53 | backgroundColor: color 54 | .alpha(0.3) 55 | .rgb() 56 | .string() 57 | }; 58 | 59 | const ContainerElement = this.props.containerElement || "div"; 60 | 61 | return ( 62 | (this.container = container)} 68 | > 69 | {eventTime} 70 | 71 | {showCalendarName && ( 72 | {event.calendar.calname} 73 | )} 74 | {event.title} 75 | 76 | {showLocation && event.location && ( 77 | 78 | 79 | {this.renderEventLocation(event.location)} 80 | 81 | )} 82 | {showPresenters && event.presenters && event.presenters.length > 0 && ( 83 | 84 | {event.presenters.length === 1 ? : } 85 | {event.presenters.map(presenter => presenter.name).join(", ")} 86 | 87 | )} 88 | {showDescription && event.description && ( 89 |
    93 | )} 94 | 165 | 166 | ); 167 | } 168 | 169 | getEventTime() { 170 | let eventTime; 171 | 172 | try { 173 | const { event } = this.props; 174 | if (event.allDay) { 175 | eventTime = All day; 176 | } else { 177 | const { start, end } = event; 178 | let startTime = start.format("h"); 179 | if (start.get("minute") !== 0) startTime += `:${start.format("mm")}`; 180 | if (start.format("A") !== end.format("A")) 181 | startTime += ` ${start.format("A")}`; 182 | let endTime = 183 | end.get("minute") === 0 ? end.format("h A") : end.format("LT"); 184 | 185 | eventTime = ( 186 | 187 | 190 | {` – `} 191 | 194 | 195 | ); 196 | } 197 | } catch (err) { 198 | console.error(err); 199 | } 200 | 201 | return eventTime; 202 | } 203 | 204 | getClassName() { 205 | let className = "event"; 206 | if (this.props.event.allDay) className += " all-day"; 207 | 208 | return className; 209 | } 210 | 211 | handleClick(clickEvent) { 212 | clickEvent.preventDefault(); 213 | 214 | const { event, setActiveEvent, setActiveEventId } = this.props; 215 | 216 | setActiveEventId(event.id, this.container); 217 | setActiveEvent(event); 218 | } 219 | } 220 | 221 | CalendarEvent.propTypes = { 222 | setActiveEvent: PropTypes.func.isRequired, 223 | setActiveEventId: PropTypes.func.isRequired, 224 | event: PropTypes.object.isRequired, 225 | view: PropTypes.object, 226 | containerElement: PropTypes.string, 227 | showLocation: PropTypes.bool, 228 | showCalendarName: PropTypes.bool, 229 | showDescription: PropTypes.bool, 230 | showPresenters: PropTypes.bool 231 | }; 232 | 233 | CalendarEvent.defaultProps = { 234 | showLocation: false, 235 | showCalendarName: false, 236 | showDescription: false, 237 | showPresenters: false 238 | }; 239 | -------------------------------------------------------------------------------- /flow-typed/npm/nodemon_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a9f7edc9b0d11dedd4e7050990d64aa9 2 | // flow-typed version: <>/nodemon_v^1.11.0/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'nodemon' 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 'nodemon' { 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 'nodemon/bin/nodemon' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'nodemon/bin/postinstall' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'nodemon/commitlint.config' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'nodemon/lib/cli/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'nodemon/lib/cli/parse' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'nodemon/lib/config/command' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'nodemon/lib/config/defaults' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'nodemon/lib/config/exec' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'nodemon/lib/config/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'nodemon/lib/config/load' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'nodemon/lib/help/index' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'nodemon/lib/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'nodemon/lib/monitor/index' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'nodemon/lib/monitor/match' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'nodemon/lib/monitor/run' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'nodemon/lib/monitor/signals' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'nodemon/lib/monitor/watch' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'nodemon/lib/nodemon' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'nodemon/lib/rules/add' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'nodemon/lib/rules/index' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'nodemon/lib/rules/parse' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'nodemon/lib/spawn' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'nodemon/lib/utils/bus' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'nodemon/lib/utils/clone' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'nodemon/lib/utils/colour' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'nodemon/lib/utils/index' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'nodemon/lib/utils/log' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'nodemon/lib/utils/merge' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'nodemon/lib/version' { 138 | declare module.exports: any; 139 | } 140 | 141 | // Filename aliases 142 | declare module 'nodemon/bin/nodemon.js' { 143 | declare module.exports: $Exports<'nodemon/bin/nodemon'>; 144 | } 145 | declare module 'nodemon/bin/postinstall.js' { 146 | declare module.exports: $Exports<'nodemon/bin/postinstall'>; 147 | } 148 | declare module 'nodemon/commitlint.config.js' { 149 | declare module.exports: $Exports<'nodemon/commitlint.config'>; 150 | } 151 | declare module 'nodemon/lib/cli/index.js' { 152 | declare module.exports: $Exports<'nodemon/lib/cli/index'>; 153 | } 154 | declare module 'nodemon/lib/cli/parse.js' { 155 | declare module.exports: $Exports<'nodemon/lib/cli/parse'>; 156 | } 157 | declare module 'nodemon/lib/config/command.js' { 158 | declare module.exports: $Exports<'nodemon/lib/config/command'>; 159 | } 160 | declare module 'nodemon/lib/config/defaults.js' { 161 | declare module.exports: $Exports<'nodemon/lib/config/defaults'>; 162 | } 163 | declare module 'nodemon/lib/config/exec.js' { 164 | declare module.exports: $Exports<'nodemon/lib/config/exec'>; 165 | } 166 | declare module 'nodemon/lib/config/index.js' { 167 | declare module.exports: $Exports<'nodemon/lib/config/index'>; 168 | } 169 | declare module 'nodemon/lib/config/load.js' { 170 | declare module.exports: $Exports<'nodemon/lib/config/load'>; 171 | } 172 | declare module 'nodemon/lib/help/index.js' { 173 | declare module.exports: $Exports<'nodemon/lib/help/index'>; 174 | } 175 | declare module 'nodemon/lib/index.js' { 176 | declare module.exports: $Exports<'nodemon/lib/index'>; 177 | } 178 | declare module 'nodemon/lib/monitor/index.js' { 179 | declare module.exports: $Exports<'nodemon/lib/monitor/index'>; 180 | } 181 | declare module 'nodemon/lib/monitor/match.js' { 182 | declare module.exports: $Exports<'nodemon/lib/monitor/match'>; 183 | } 184 | declare module 'nodemon/lib/monitor/run.js' { 185 | declare module.exports: $Exports<'nodemon/lib/monitor/run'>; 186 | } 187 | declare module 'nodemon/lib/monitor/signals.js' { 188 | declare module.exports: $Exports<'nodemon/lib/monitor/signals'>; 189 | } 190 | declare module 'nodemon/lib/monitor/watch.js' { 191 | declare module.exports: $Exports<'nodemon/lib/monitor/watch'>; 192 | } 193 | declare module 'nodemon/lib/nodemon.js' { 194 | declare module.exports: $Exports<'nodemon/lib/nodemon'>; 195 | } 196 | declare module 'nodemon/lib/rules/add.js' { 197 | declare module.exports: $Exports<'nodemon/lib/rules/add'>; 198 | } 199 | declare module 'nodemon/lib/rules/index.js' { 200 | declare module.exports: $Exports<'nodemon/lib/rules/index'>; 201 | } 202 | declare module 'nodemon/lib/rules/parse.js' { 203 | declare module.exports: $Exports<'nodemon/lib/rules/parse'>; 204 | } 205 | declare module 'nodemon/lib/spawn.js' { 206 | declare module.exports: $Exports<'nodemon/lib/spawn'>; 207 | } 208 | declare module 'nodemon/lib/utils/bus.js' { 209 | declare module.exports: $Exports<'nodemon/lib/utils/bus'>; 210 | } 211 | declare module 'nodemon/lib/utils/clone.js' { 212 | declare module.exports: $Exports<'nodemon/lib/utils/clone'>; 213 | } 214 | declare module 'nodemon/lib/utils/colour.js' { 215 | declare module.exports: $Exports<'nodemon/lib/utils/colour'>; 216 | } 217 | declare module 'nodemon/lib/utils/index.js' { 218 | declare module.exports: $Exports<'nodemon/lib/utils/index'>; 219 | } 220 | declare module 'nodemon/lib/utils/log.js' { 221 | declare module.exports: $Exports<'nodemon/lib/utils/log'>; 222 | } 223 | declare module 'nodemon/lib/utils/merge.js' { 224 | declare module.exports: $Exports<'nodemon/lib/utils/merge'>; 225 | } 226 | declare module 'nodemon/lib/version.js' { 227 | declare module.exports: $Exports<'nodemon/lib/version'>; 228 | } 229 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-core_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: db4f9c5cf54f9510856e7e0e9c06f50b 2 | // flow-typed version: <>/babel-core_v^6.18.2/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-core' 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-core' { 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-core/lib/api/browser' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-core/lib/api/node' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-core/lib/helpers/get-possible-plugin-names' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-core/lib/helpers/get-possible-preset-names' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-core/lib/helpers/merge' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-core/lib/helpers/normalize-ast' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-core/lib/helpers/resolve-from-possible-names' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-core/lib/helpers/resolve-plugin' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-core/lib/helpers/resolve-preset' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-core/lib/helpers/resolve' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-core/lib/store' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'babel-core/lib/tools/build-external-helpers' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'babel-core/lib/transformation/file/index' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'babel-core/lib/transformation/file/logger' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'babel-core/lib/transformation/file/merge-map' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'babel-core/lib/transformation/file/metadata' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'babel-core/lib/transformation/file/options/build-config-chain' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'babel-core/lib/transformation/file/options/config' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'babel-core/lib/transformation/file/options/index' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'babel-core/lib/transformation/file/options/option-manager' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'babel-core/lib/transformation/file/options/parsers' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'babel-core/lib/transformation/file/options/removed' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'babel-core/lib/transformation/internal-plugins/block-hoist' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'babel-core/lib/transformation/internal-plugins/shadow-functions' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'babel-core/lib/transformation/pipeline' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'babel-core/lib/transformation/plugin-pass' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'babel-core/lib/transformation/plugin' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'babel-core/lib/util' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'babel-core/register' { 138 | declare module.exports: any; 139 | } 140 | 141 | // Filename aliases 142 | declare module 'babel-core/index' { 143 | declare module.exports: $Exports<'babel-core'>; 144 | } 145 | declare module 'babel-core/index.js' { 146 | declare module.exports: $Exports<'babel-core'>; 147 | } 148 | declare module 'babel-core/lib/api/browser.js' { 149 | declare module.exports: $Exports<'babel-core/lib/api/browser'>; 150 | } 151 | declare module 'babel-core/lib/api/node.js' { 152 | declare module.exports: $Exports<'babel-core/lib/api/node'>; 153 | } 154 | declare module 'babel-core/lib/helpers/get-possible-plugin-names.js' { 155 | declare module.exports: $Exports<'babel-core/lib/helpers/get-possible-plugin-names'>; 156 | } 157 | declare module 'babel-core/lib/helpers/get-possible-preset-names.js' { 158 | declare module.exports: $Exports<'babel-core/lib/helpers/get-possible-preset-names'>; 159 | } 160 | declare module 'babel-core/lib/helpers/merge.js' { 161 | declare module.exports: $Exports<'babel-core/lib/helpers/merge'>; 162 | } 163 | declare module 'babel-core/lib/helpers/normalize-ast.js' { 164 | declare module.exports: $Exports<'babel-core/lib/helpers/normalize-ast'>; 165 | } 166 | declare module 'babel-core/lib/helpers/resolve-from-possible-names.js' { 167 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve-from-possible-names'>; 168 | } 169 | declare module 'babel-core/lib/helpers/resolve-plugin.js' { 170 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve-plugin'>; 171 | } 172 | declare module 'babel-core/lib/helpers/resolve-preset.js' { 173 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve-preset'>; 174 | } 175 | declare module 'babel-core/lib/helpers/resolve.js' { 176 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve'>; 177 | } 178 | declare module 'babel-core/lib/store.js' { 179 | declare module.exports: $Exports<'babel-core/lib/store'>; 180 | } 181 | declare module 'babel-core/lib/tools/build-external-helpers.js' { 182 | declare module.exports: $Exports<'babel-core/lib/tools/build-external-helpers'>; 183 | } 184 | declare module 'babel-core/lib/transformation/file/index.js' { 185 | declare module.exports: $Exports<'babel-core/lib/transformation/file/index'>; 186 | } 187 | declare module 'babel-core/lib/transformation/file/logger.js' { 188 | declare module.exports: $Exports<'babel-core/lib/transformation/file/logger'>; 189 | } 190 | declare module 'babel-core/lib/transformation/file/merge-map.js' { 191 | declare module.exports: $Exports<'babel-core/lib/transformation/file/merge-map'>; 192 | } 193 | declare module 'babel-core/lib/transformation/file/metadata.js' { 194 | declare module.exports: $Exports<'babel-core/lib/transformation/file/metadata'>; 195 | } 196 | declare module 'babel-core/lib/transformation/file/options/build-config-chain.js' { 197 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/build-config-chain'>; 198 | } 199 | declare module 'babel-core/lib/transformation/file/options/config.js' { 200 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/config'>; 201 | } 202 | declare module 'babel-core/lib/transformation/file/options/index.js' { 203 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/index'>; 204 | } 205 | declare module 'babel-core/lib/transformation/file/options/option-manager.js' { 206 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/option-manager'>; 207 | } 208 | declare module 'babel-core/lib/transformation/file/options/parsers.js' { 209 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/parsers'>; 210 | } 211 | declare module 'babel-core/lib/transformation/file/options/removed.js' { 212 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/removed'>; 213 | } 214 | declare module 'babel-core/lib/transformation/internal-plugins/block-hoist.js' { 215 | declare module.exports: $Exports<'babel-core/lib/transformation/internal-plugins/block-hoist'>; 216 | } 217 | declare module 'babel-core/lib/transformation/internal-plugins/shadow-functions.js' { 218 | declare module.exports: $Exports<'babel-core/lib/transformation/internal-plugins/shadow-functions'>; 219 | } 220 | declare module 'babel-core/lib/transformation/pipeline.js' { 221 | declare module.exports: $Exports<'babel-core/lib/transformation/pipeline'>; 222 | } 223 | declare module 'babel-core/lib/transformation/plugin-pass.js' { 224 | declare module.exports: $Exports<'babel-core/lib/transformation/plugin-pass'>; 225 | } 226 | declare module 'babel-core/lib/transformation/plugin.js' { 227 | declare module.exports: $Exports<'babel-core/lib/transformation/plugin'>; 228 | } 229 | declare module 'babel-core/lib/util.js' { 230 | declare module.exports: $Exports<'babel-core/lib/util'>; 231 | } 232 | declare module 'babel-core/register.js' { 233 | declare module.exports: $Exports<'babel-core/register'>; 234 | } 235 | -------------------------------------------------------------------------------- /flow-typed/npm/express_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3981cb29b9fff6abc7f33fd4095e2b25 2 | // flow-typed version: def1ce6bf5/express_v4.x.x/flow_>=v0.32.x <=v0.92.x 3 | 4 | import * as http from "http"; 5 | 6 | declare type express$RouterOptions = { 7 | caseSensitive?: boolean, 8 | mergeParams?: boolean, 9 | strict?: boolean 10 | }; 11 | 12 | declare class express$RequestResponseBase { 13 | app: express$Application; 14 | get(field: string): string | void; 15 | } 16 | 17 | declare type express$RequestParams = { 18 | [param: string]: string 19 | } 20 | 21 | declare class express$Request extends http$IncomingMessage mixins express$RequestResponseBase { 22 | baseUrl: string; 23 | body: mixed; 24 | cookies: {[cookie: string]: string}; 25 | connection: net$Socket; 26 | fresh: boolean; 27 | hostname: string; 28 | ip: string; 29 | ips: Array; 30 | method: string; 31 | originalUrl: string; 32 | params: express$RequestParams; 33 | path: string; 34 | protocol: 'https' | 'http'; 35 | query: {[name: string]: string | Array}; 36 | route: string; 37 | secure: boolean; 38 | signedCookies: {[signedCookie: string]: string}; 39 | stale: boolean; 40 | subdomains: Array; 41 | xhr: boolean; 42 | accepts(types: string): string | false; 43 | accepts(types: Array): string | false; 44 | acceptsCharsets(...charsets: Array): string | false; 45 | acceptsEncodings(...encoding: Array): string | false; 46 | acceptsLanguages(...lang: Array): string | false; 47 | header(field: string): string | void; 48 | is(type: string): string | false; 49 | param(name: string, defaultValue?: string): string | void; 50 | } 51 | 52 | declare type express$CookieOptions = { 53 | domain?: string, 54 | encode?: (value: string) => string, 55 | expires?: Date, 56 | httpOnly?: boolean, 57 | maxAge?: number, 58 | path?: string, 59 | secure?: boolean, 60 | signed?: boolean 61 | }; 62 | 63 | declare type express$Path = string | RegExp; 64 | 65 | declare type express$RenderCallback = (err: Error | null, html?: string) => mixed; 66 | 67 | declare type express$SendFileOptions = { 68 | maxAge?: number, 69 | root?: string, 70 | lastModified?: boolean, 71 | headers?: {[name: string]: string}, 72 | dotfiles?: 'allow' | 'deny' | 'ignore' 73 | }; 74 | 75 | declare class express$Response extends http$ServerResponse mixins express$RequestResponseBase { 76 | headersSent: boolean; 77 | locals: {[name: string]: mixed}; 78 | append(field: string, value?: string): this; 79 | attachment(filename?: string): this; 80 | cookie(name: string, value: string, options?: express$CookieOptions): this; 81 | clearCookie(name: string, options?: express$CookieOptions): this; 82 | download(path: string, filename?: string, callback?: (err?: ?Error) => void): this; 83 | format(typesObject: {[type: string]: Function}): this; 84 | json(body?: mixed): this; 85 | jsonp(body?: mixed): this; 86 | links(links: {[name: string]: string}): this; 87 | location(path: string): this; 88 | redirect(url: string, ...args: Array): this; 89 | redirect(status: number, url: string, ...args: Array): this; 90 | render(view: string, locals?: {[name: string]: mixed}, callback?: express$RenderCallback): this; 91 | send(body?: mixed): this; 92 | sendFile(path: string, options?: express$SendFileOptions, callback?: (err?: ?Error) => mixed): this; 93 | sendStatus(statusCode: number): this; 94 | header(field: string, value?: string): this; 95 | header(headers: {[name: string]: string}): this; 96 | set(field: string, value?: string|string[]): this; 97 | set(headers: {[name: string]: string}): this; 98 | status(statusCode: number): this; 99 | type(type: string): this; 100 | vary(field: string): this; 101 | req: express$Request; 102 | } 103 | 104 | declare type express$NextFunction = (err?: ?Error | 'route') => mixed; 105 | declare type express$Middleware = 106 | ((req: $Subtype, res: express$Response, next: express$NextFunction) => mixed) | 107 | ((error: Error, req: $Subtype, res: express$Response, next: express$NextFunction) => mixed); 108 | declare interface express$RouteMethodType { 109 | (middleware: express$Middleware): T; 110 | (...middleware: Array): T; 111 | (path: express$Path|express$Path[], ...middleware: Array): T; 112 | } 113 | declare class express$Route { 114 | all: express$RouteMethodType; 115 | get: express$RouteMethodType; 116 | post: express$RouteMethodType; 117 | put: express$RouteMethodType; 118 | head: express$RouteMethodType; 119 | delete: express$RouteMethodType; 120 | options: express$RouteMethodType; 121 | trace: express$RouteMethodType; 122 | copy: express$RouteMethodType; 123 | lock: express$RouteMethodType; 124 | mkcol: express$RouteMethodType; 125 | move: express$RouteMethodType; 126 | purge: express$RouteMethodType; 127 | propfind: express$RouteMethodType; 128 | proppatch: express$RouteMethodType; 129 | unlock: express$RouteMethodType; 130 | report: express$RouteMethodType; 131 | mkactivity: express$RouteMethodType; 132 | checkout: express$RouteMethodType; 133 | merge: express$RouteMethodType; 134 | 135 | // @TODO Missing 'm-search' but get flow illegal name error. 136 | 137 | notify: express$RouteMethodType; 138 | subscribe: express$RouteMethodType; 139 | unsubscribe: express$RouteMethodType; 140 | patch: express$RouteMethodType; 141 | search: express$RouteMethodType; 142 | connect: express$RouteMethodType; 143 | } 144 | 145 | declare class express$Router extends express$Route { 146 | constructor(options?: express$RouterOptions): void; 147 | route(path: string): express$Route; 148 | static (options?: express$RouterOptions): express$Router; 149 | use(middleware: express$Middleware): this; 150 | use(...middleware: Array): this; 151 | use(path: express$Path|express$Path[], ...middleware: Array): this; 152 | use(path: string, router: express$Router): this; 153 | handle(req: http$IncomingMessage, res: http$ServerResponse, next: express$NextFunction): void; 154 | param( 155 | param: string, 156 | callback: ( 157 | req: $Subtype, 158 | res: express$Response, 159 | next: express$NextFunction, 160 | id: string 161 | ) => mixed 162 | ): void; 163 | (req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction): void; 164 | } 165 | 166 | declare class express$Application extends express$Router mixins events$EventEmitter { 167 | constructor(): void; 168 | locals: {[name: string]: mixed}; 169 | mountpath: string; 170 | listen(port: number, hostname?: string, backlog?: number, callback?: (err?: ?Error) => mixed): ?http.Server; 171 | listen(port: number, hostname?: string, callback?: (err?: ?Error) => mixed): ?http.Server; 172 | listen(port: number, callback?: (err?: ?Error) => mixed): ?http.Server; 173 | listen(path: string, callback?: (err?: ?Error) => mixed): ?http.Server; 174 | listen(handle: Object, callback?: (err?: ?Error) => mixed): ?http.Server; 175 | disable(name: string): void; 176 | disabled(name: string): boolean; 177 | enable(name: string): express$Application; 178 | enabled(name: string): boolean; 179 | engine(name: string, callback: Function): void; 180 | /** 181 | * Mixed will not be taken as a value option. Issue around using the GET http method name and the get for settings. 182 | */ 183 | // get(name: string): mixed; 184 | set(name: string, value: mixed): mixed; 185 | render(name: string, optionsOrFunction: {[name: string]: mixed}, callback: express$RenderCallback): void; 186 | handle(req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction): void; 187 | // callable signature is not inherited 188 | (req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction): void; 189 | } 190 | 191 | declare module 'express' { 192 | declare export type RouterOptions = express$RouterOptions; 193 | declare export type CookieOptions = express$CookieOptions; 194 | declare export type Middleware = express$Middleware; 195 | declare export type NextFunction = express$NextFunction; 196 | declare export type RequestParams = express$RequestParams; 197 | declare export type $Response = express$Response; 198 | declare export type $Request = express$Request; 199 | declare export type $Application = express$Application; 200 | 201 | declare module.exports: { 202 | (): express$Application, // If you try to call like a function, it will use this signature 203 | static: (root: string, options?: Object) => express$Middleware, // `static` property on the function 204 | Router: typeof express$Router, // `Router` property on the function 205 | }; 206 | } 207 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-bundle-analyzer_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b03be77ce72c71f8e1deea283ed2ccab 2 | // flow-typed version: <>/webpack-bundle-analyzer_v^2.1.1/flow_v0.75.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-bundle-analyzer' 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-bundle-analyzer' { 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-bundle-analyzer/lib/analyzer' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-bundle-analyzer/lib/bin/analyzer' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-bundle-analyzer/lib/BundleAnalyzerPlugin' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-bundle-analyzer/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-bundle-analyzer/lib/Logger' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-bundle-analyzer/lib/parseUtils' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-bundle-analyzer/lib/tree/BaseFolder' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-bundle-analyzer/lib/tree/ConcatenatedModule' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-bundle-analyzer/lib/tree/ContentFolder' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'webpack-bundle-analyzer/lib/tree/ContentModule' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'webpack-bundle-analyzer/lib/tree/Folder' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'webpack-bundle-analyzer/lib/tree/Module' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'webpack-bundle-analyzer/lib/tree/Node' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'webpack-bundle-analyzer/lib/tree/utils' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'webpack-bundle-analyzer/lib/utils' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'webpack-bundle-analyzer/lib/viewer' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'webpack-bundle-analyzer/public/viewer' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'webpack-bundle-analyzer/src/analyzer' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'webpack-bundle-analyzer/src/bin/analyzer' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'webpack-bundle-analyzer/src/BundleAnalyzerPlugin' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'webpack-bundle-analyzer/src/index' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'webpack-bundle-analyzer/src/Logger' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'webpack-bundle-analyzer/src/parseUtils' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'webpack-bundle-analyzer/src/tree/BaseFolder' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'webpack-bundle-analyzer/src/tree/ConcatenatedModule' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'webpack-bundle-analyzer/src/tree/ContentFolder' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'webpack-bundle-analyzer/src/tree/ContentModule' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'webpack-bundle-analyzer/src/tree/Folder' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'webpack-bundle-analyzer/src/tree/Module' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'webpack-bundle-analyzer/src/tree/Node' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'webpack-bundle-analyzer/src/tree/utils' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'webpack-bundle-analyzer/src/utils' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'webpack-bundle-analyzer/src/viewer' { 154 | declare module.exports: any; 155 | } 156 | 157 | // Filename aliases 158 | declare module 'webpack-bundle-analyzer/lib/analyzer.js' { 159 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/analyzer'>; 160 | } 161 | declare module 'webpack-bundle-analyzer/lib/bin/analyzer.js' { 162 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/bin/analyzer'>; 163 | } 164 | declare module 'webpack-bundle-analyzer/lib/BundleAnalyzerPlugin.js' { 165 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/BundleAnalyzerPlugin'>; 166 | } 167 | declare module 'webpack-bundle-analyzer/lib/index.js' { 168 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/index'>; 169 | } 170 | declare module 'webpack-bundle-analyzer/lib/Logger.js' { 171 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/Logger'>; 172 | } 173 | declare module 'webpack-bundle-analyzer/lib/parseUtils.js' { 174 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/parseUtils'>; 175 | } 176 | declare module 'webpack-bundle-analyzer/lib/tree/BaseFolder.js' { 177 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/BaseFolder'>; 178 | } 179 | declare module 'webpack-bundle-analyzer/lib/tree/ConcatenatedModule.js' { 180 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/ConcatenatedModule'>; 181 | } 182 | declare module 'webpack-bundle-analyzer/lib/tree/ContentFolder.js' { 183 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/ContentFolder'>; 184 | } 185 | declare module 'webpack-bundle-analyzer/lib/tree/ContentModule.js' { 186 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/ContentModule'>; 187 | } 188 | declare module 'webpack-bundle-analyzer/lib/tree/Folder.js' { 189 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/Folder'>; 190 | } 191 | declare module 'webpack-bundle-analyzer/lib/tree/Module.js' { 192 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/Module'>; 193 | } 194 | declare module 'webpack-bundle-analyzer/lib/tree/Node.js' { 195 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/Node'>; 196 | } 197 | declare module 'webpack-bundle-analyzer/lib/tree/utils.js' { 198 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree/utils'>; 199 | } 200 | declare module 'webpack-bundle-analyzer/lib/utils.js' { 201 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/utils'>; 202 | } 203 | declare module 'webpack-bundle-analyzer/lib/viewer.js' { 204 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/viewer'>; 205 | } 206 | declare module 'webpack-bundle-analyzer/public/viewer.js' { 207 | declare module.exports: $Exports<'webpack-bundle-analyzer/public/viewer'>; 208 | } 209 | declare module 'webpack-bundle-analyzer/src/analyzer.js' { 210 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/analyzer'>; 211 | } 212 | declare module 'webpack-bundle-analyzer/src/bin/analyzer.js' { 213 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/bin/analyzer'>; 214 | } 215 | declare module 'webpack-bundle-analyzer/src/BundleAnalyzerPlugin.js' { 216 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/BundleAnalyzerPlugin'>; 217 | } 218 | declare module 'webpack-bundle-analyzer/src/index.js' { 219 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/index'>; 220 | } 221 | declare module 'webpack-bundle-analyzer/src/Logger.js' { 222 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/Logger'>; 223 | } 224 | declare module 'webpack-bundle-analyzer/src/parseUtils.js' { 225 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/parseUtils'>; 226 | } 227 | declare module 'webpack-bundle-analyzer/src/tree/BaseFolder.js' { 228 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/BaseFolder'>; 229 | } 230 | declare module 'webpack-bundle-analyzer/src/tree/ConcatenatedModule.js' { 231 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/ConcatenatedModule'>; 232 | } 233 | declare module 'webpack-bundle-analyzer/src/tree/ContentFolder.js' { 234 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/ContentFolder'>; 235 | } 236 | declare module 'webpack-bundle-analyzer/src/tree/ContentModule.js' { 237 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/ContentModule'>; 238 | } 239 | declare module 'webpack-bundle-analyzer/src/tree/Folder.js' { 240 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/Folder'>; 241 | } 242 | declare module 'webpack-bundle-analyzer/src/tree/Module.js' { 243 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/Module'>; 244 | } 245 | declare module 'webpack-bundle-analyzer/src/tree/Node.js' { 246 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/Node'>; 247 | } 248 | declare module 'webpack-bundle-analyzer/src/tree/utils.js' { 249 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree/utils'>; 250 | } 251 | declare module 'webpack-bundle-analyzer/src/utils.js' { 252 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/utils'>; 253 | } 254 | declare module 'webpack-bundle-analyzer/src/viewer.js' { 255 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/viewer'>; 256 | } 257 | --------------------------------------------------------------------------------