bundle.js.map 10.6 KB
Newer Older
Zac Wood's avatar
Zac Wood committed
1
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/components/App.tsx","webpack:///./src/components/Search.tsx","webpack:///./src/components/SectionList.tsx","webpack:///./src/index.tsx","webpack:///./src/section.ts","webpack:///external \"React\"","webpack:///external \"ReactDOM\""],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;ACnEA,wDAA+B;AAE/B,mGAAwC;AACxC,oFAA8B;AAM9B,SAAU,SAAQ,KAAK,CAAC,SAAqB;IACzC,YAAY,KAAU;QAClB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;QAErC,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;IAED,2BAA2B,CAAC,OAAgB;QACxC,IAAI,CAAC,QAAQ,CAAC;YACV,eAAe,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,CAAC;SAC5D,CAAC,CAAC;IACP,CAAC;IAED,MAAM;QACF,OAAO,CACH;YACI,4CAAkB;YAClB,oBAAC,gBAAM,OAAG;YACV,oBAAC,qBAAW,IAAC,qBAAqB,EAAE,IAAI,CAAC,2BAA2B,GAAI;YACxE,oBAAC,qBA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QACI,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC7E,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,QAAQ,GAAc,EAAE,CAAC;QAC7B,WAAW,CAAC,OAAO,CAAC,CAAC,MAAW,EAAE,EAAE;YAChC,QAAQ,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,MAAM,CAAC,EAAE;gBACb,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,SAAS,EAAE,MAAM,CAAC,UAAU;gBAC5B,OAAO,EAAE,MAAM,CAAC,QAAQ;aAC3B,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IACpB,CAAC;CAAA;AAlBD,sCAkBC;;;;;;;;;;;;AC9BD,uB;;;;;;;;;;;ACAA,0B","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.tsx\");\n","import * as React from 'react';\nimport Section from '../section';\nimport SectionList from './SectionList';\nimport Search from './Search';\n\ninterface State {\n    currentSchedule: Section[];\n}\n\nclass App extends React.Component<any, State> {\n    constructor(props: any) {\n        super(props);\n        this.state = { currentSchedule: [] };\n\n        this.addSectionToCurrentSchedule = this.addSectionToCurrentSchedule.bind(this);\n    }\n\n    addSectionToCurrentSchedule(section: Section) {\n        this.setState({\n            currentSchedule: [...this.state.currentSchedule, section],\n        });\n    }\n\n    render() {\n        return (\n            <div>\n                <h1>Schedules</h1>\n                <Search />\n                <SectionList addToScheduleCallback={this.addSectionToCurrentSchedule} />\n                <SectionList />\n            </div>\n        );\n    }\n}\nexport default App;\n","import * as React from 'react';\n\ninterface State {\n    searchTerm: string;\n}\n\nexport default class Search extends React.Component<any, State> {\n    constructor(props: any) {\n        super(props);\n        this.state = { searchTerm: '' };\n\n        this.onSearch = this.onSearch.bind(this);\n        this.updateSearchTerm = this.updateSearchTerm.bind(this);\n    }\n\n    updateSearchTerm(event: any) {\n        this.setState({\n            searchTerm: event.target.value,\n        });\n    }\n\n    onSearch(event: any) {\n        event.preventDefault();\n    }\n\n    render() {\n        return (\n            <form onSubmit={this.onSearch}>\n                <input\n                    type=\"text\"\n                    placeholder=\"Enter CRN...\"\n                    value={this.state.searchTerm}\n                    onChange={this.updateSearchTerm}\n                />\n                <input type=\"submit\" value=\"Search\" />\n            </form>\n        );\n    }\n}\n","import * as React from 'react';\nimport Section, { fetchSections } from '../section';\n\ninterface Props {\n    addToScheduleCallback?: (section: Section) => void;\n}\n\ninterface State {\n    sections: Section[];\n}\n\nexport default class SectionList extends React.Component<Props, State> {\n    constructor(props: Props) {\n        super(props);\n\n        this.state = { sections: [] };\n        fetchSections().then(sections => this.updateStateWithSections(sections));\n\n        this.updateStateWithSections = this.updateStateWithSections.bind(this);\n    }\n\n    updateStateWithSections(sections: Section[]) {\n        this.setState({\n            sections,\n        });\n    }\n\n    render() {\n        return (\n            <table>\n                <tr>\n                    <th>Course</th>\n                    <th>Section Name</th>\n                    <th>CRN</th>\n                    <th>Days</th>\n                    <th>Instructor</th>\n                    <th>Location</th>\n                    <th>Time</th>\n                </tr>\n                {this.renderRowsForSections(this.state.sections)}\n            </table>\n        );\n    }\n\n    renderRowsForSections(sections: Section[]): JSX.Element[] {\n        return sections.map(section => {\n            return (\n                <tr>\n                    <td>{section.name}</td>\n                    <td>{section.title}</td>\n                    <td>{section.crn}</td>\n                    <td>{section.days}</td>\n                    <td>{section.instructor}</td>\n                    <td>{section.location}</td>\n                    <td>{[section.startTime, section.endTime].join(' - ')}</td>\n                </tr>\n            );\n        });\n    }\n}\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\n\nimport App from './components/App';\n\nReactDOM.render(<App />, document.getElementById('root'));\n","export default interface Section {\n    id: number;\n    name: string;\n    title: string;\n    crn: string;\n    instructor: string;\n    location: string;\n    days: string;\n    startTime: string;\n    endTime: string;\n}\n\nexport async function fetchSections(): Promise<Section[]> {\n    const response = await fetch('http://localhost:3001/api/courses/1/sections');\n    const jsonObjects = await response.json();\n    let sections: Section[] = [];\n    jsonObjects.forEach((object: any) => {\n        sections.push({\n            id: object.id,\n            name: object.name,\n            title: object.title,\n            crn: object.crn,\n            instructor: object.instructor,\n            location: object.location,\n            days: object.days,\n            startTime: object.start_time,\n            endTime: object.end_time,\n        });\n    });\n    return sections;\n}\n","module.exports = React;","module.exports = ReactDOM;"],"sourceRoot":""}