├── .gitignore ├── img ├── todo.png ├── todo2.png ├── todo3.png ├── coverage1.png └── coverage2.png ├── .babelrc ├── .stylelintrc.json ├── src ├── active.js ├── index.html ├── add.js ├── style.css ├── index.js └── todo.test.js ├── .hintrc ├── .eslintrc.json ├── webpack.config.js ├── dist ├── index.html └── main.js ├── package.json ├── README.md └── .github └── workflows └── linters.yml /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | coverage/ -------------------------------------------------------------------------------- /img/todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Whoistolu/To-Do-List/HEAD/img/todo.png -------------------------------------------------------------------------------- /img/todo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Whoistolu/To-Do-List/HEAD/img/todo2.png -------------------------------------------------------------------------------- /img/todo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Whoistolu/To-Do-List/HEAD/img/todo3.png -------------------------------------------------------------------------------- /img/coverage1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Whoistolu/To-Do-List/HEAD/img/coverage1.png -------------------------------------------------------------------------------- /img/coverage2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Whoistolu/To-Do-List/HEAD/img/coverage2.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "test": { 4 | "plugins": ["@babel/plugin-transform-modules-commonjs"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["stylelint-config-standard"], 3 | "plugins": ["stylelint-scss", "stylelint-csstree-validator"], 4 | "rules": { 5 | "at-rule-no-unknown": null, 6 | "scss/at-rule-no-unknown": true, 7 | "csstree/validator": true 8 | }, 9 | "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"] 10 | } -------------------------------------------------------------------------------- /src/active.js: -------------------------------------------------------------------------------- 1 | export const saveLocalStorage = (data) => { 2 | const todoItems = document.querySelectorAll('.todo-item'); 3 | todoItems.forEach((item, idx) => { 4 | item.id = idx + 1; 5 | }); 6 | data.forEach((d, idx) => { 7 | d.index = idx + 1; 8 | }); 9 | localStorage.setItem('toDoStorage', JSON.stringify(data)); 10 | }; 11 | 12 | export const updateCompleted = (item, input) => { 13 | item.completed = input.checked; 14 | }; 15 | -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "connector": { 3 | "name": "local", 4 | "options": { 5 | "pattern": ["**", "!.git/**", "!node_modules/**"] 6 | } 7 | }, 8 | "extends": ["development"], 9 | "formatters": ["stylish"], 10 | "hints": [ 11 | "button-type", 12 | "disown-opener", 13 | "html-checker", 14 | "meta-charset-utf-8", 15 | "meta-viewport", 16 | "no-inline-styles:error" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "jest": true 6 | }, 7 | "parser": "babel-eslint", 8 | "parserOptions": { 9 | "ecmaVersion": 2018, 10 | "sourceType": "module" 11 | }, 12 | "extends": ["airbnb-base"], 13 | "rules": { 14 | "no-shadow": "off", 15 | "no-param-reassign": "off", 16 | "eol-last": "off", 17 | "import/extensions": [ 1, { 18 | "js": "always", "json": "always" 19 | }] 20 | }, 21 | "ignorePatterns": [ 22 | "dist/", 23 | "build/" 24 | ] 25 | } -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 3 | 4 | module.exports = { 5 | mode: 'development', 6 | entry: './src/index.js', 7 | devServer: { 8 | static: './dist', 9 | watchFiles: ['src/**/*'], 10 | }, 11 | plugins: [ 12 | new HtmlWebpackPlugin({ 13 | template: './src/index.html', 14 | }), 15 | ], 16 | module: { 17 | rules: [ 18 | { 19 | test: /\.css$/i, 20 | use: ['style-loader', 'css-loader'], 21 | }, 22 | ], 23 | }, 24 | output: { 25 | filename: 'main.js', 26 | path: path.resolve(__dirname, 'dist'), 27 | }, 28 | }; -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | To Do List 8 | 9 | 10 |
11 |
12 |
13 |

Today's To Do

14 |
15 |
16 | 17 |
18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | To Do List 8 | 9 | 10 |
11 |
12 |
13 |

Today's To Do

14 |
15 |
16 | 17 |
18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /src/add.js: -------------------------------------------------------------------------------- 1 | export const editTodo = (itemsArray, id, newValue) => { 2 | itemsArray.forEach((item) => { 3 | if (item.index.toString() === id) { 4 | item.description = newValue; 5 | } 6 | }); 7 | }; 8 | 9 | export const removeTodos = (something, id) => { 10 | if (something.index.toString() === id) { 11 | return false; 12 | } 13 | return true; 14 | }; 15 | 16 | export const addTodo = (itemsArray, value) => { 17 | itemsArray.push({ completed: false, description: value, index: itemsArray.length + 1 }); 18 | }; 19 | 20 | export const clearCompletedTodos = (array) => { 21 | let resultArray = array; 22 | const todoArray = document.querySelectorAll('.todo-item'); 23 | // console.log(todoArray.length); 24 | todoArray.forEach((div) => { 25 | const input = div.querySelector('input'); 26 | if (input.checked) { 27 | div.remove(); 28 | resultArray = array.filter((something) => { 29 | if (something.index.toString() === div.id) { 30 | return false; 31 | } 32 | return true; 33 | }); 34 | } 35 | }); 36 | return resultArray; 37 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-demo", 3 | "version": "1.0.0", 4 | "description": "", 5 | "private": true, 6 | "scripts": { 7 | "start": "webpack serve --open", 8 | "build": "webpack", 9 | "lint": "npx eslint . && npx stylelint **/*.{css,scss} && npx hint .", 10 | "test": "jest", 11 | "coverage": "jest --coverage" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "devDependencies": { 17 | "@babel/plugin-transform-modules-commonjs": "^7.15.4", 18 | "babel-eslint": "^10.1.0", 19 | "css-loader": "^6.3.0", 20 | "eslint": "^7.32.0", 21 | "eslint-config-airbnb-base": "^14.2.1", 22 | "eslint-plugin-import": "^2.24.2", 23 | "hint": "^6.1.4", 24 | "html-webpack-plugin": "^5.3.2", 25 | "jest": "^27.2.4", 26 | "style-loader": "^3.2.1", 27 | "stylelint": "^13.13.1", 28 | "stylelint-config-standard": "^21.0.0", 29 | "stylelint-csstree-validator": "^1.9.0", 30 | "stylelint-scss": "^3.21.0", 31 | "webpack": "^5.53.0", 32 | "webpack-cli": "^4.8.0", 33 | "webpack-dev-server": "^4.2.1" 34 | }, 35 | "dependencies": { 36 | "lodash": "^4.17.21" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![](https://img.shields.io/badge/Microverse-blueviolet) 3 | 4 | # To Doo List 5 | 6 | ![screenshot](img/coverage2.png) 7 | 8 | ## Built With 9 | 10 | - HTML 11 | - CSS 12 | - JAVASCRIPT ES6 13 | - Webpack 14 | - Jest 15 | - Babel 16 | - Coverage 17 | 18 | ## To get a local copy run the following steps: 19 | - Copy [this link](https://github.com/Whoistolu/To-Do-List) 20 | - Open your terminal or command line 21 | - Run "git clone Paste [this link](https://github.com/Whoistolu/To-Do-List)" 22 | - Open the folder with your code editor 23 | - Create a branch to work on 24 | - Now You can edit the code and do a pull request 25 | 26 | ## Authors 27 | 28 | 👤 **Author1** 29 | 30 | - Name: Ajise Toluwase 31 | - GitHub: [@githubhandle](https://github.com/Whoistolu) 32 | - Twitter: [@twitterhandle](https://twitter.com/Littletolu) 33 | - LinkedIn: [LinkedIn](https://www.linkedin.com/in/toluwase-ajise-9b40411b2/) 34 | ## 🤝 Contributing 35 | 36 | Contributions, issues, and feature requests are welcome! 37 | 38 | ## Show your support 39 | 40 | Give a ⭐️ if you like this project! 41 | 42 | ## Acknowledgments 43 | 44 | - Inspiration 45 | Original design idea by [Cindy Shin in Behance](https://www.behance.net/adagio07) 46 | 47 | ## 📝 License 48 | 49 | This project is [MIT](./MIT.md) licensed. 50 | -------------------------------------------------------------------------------- /src/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | background-color: gray; 9 | } 10 | 11 | .to-do { 12 | position: absolute; 13 | left: 30%; 14 | top: 30%; 15 | right: 30%; 16 | box-shadow: 4px 6px gray; 17 | display: flex; 18 | flex-direction: column; 19 | gap: 4px; 20 | background-color: rgb(247, 240, 240); 21 | } 22 | 23 | .to-do .today { 24 | font-family: Arial, Helvetica, sans-serif; 25 | font-size: 10px; 26 | color: rgb(110, 106, 106); 27 | display: flex; 28 | justify-content: space-between; 29 | padding: 15px 15px; 30 | background-color: #fff; 31 | } 32 | 33 | .to-do .add-text { 34 | display: flex; 35 | justify-content: space-between; 36 | padding: 10px 15px; 37 | background-color: #fff; 38 | } 39 | 40 | .to-do .add-text input { 41 | font-style: italic; 42 | width: 90%; 43 | } 44 | 45 | .to-do .todos { 46 | display: flex; 47 | flex-direction: column; 48 | gap: 4px; 49 | } 50 | 51 | .to-do .todo-item { 52 | display: flex; 53 | gap: 20px; 54 | background-color: #fff; 55 | padding: 15px 15px; 56 | } 57 | 58 | .to-do input[type=text] { 59 | border: none; 60 | background-color: transparent; 61 | font-size: 1rem; 62 | } 63 | 64 | .to-do .todo-item input[type=text] { 65 | flex-grow: 1; 66 | } 67 | 68 | .to-do .button { 69 | display: flex; 70 | justify-content: center; 71 | background-color: rgb(199, 195, 195); 72 | padding: 10px; 73 | } 74 | 75 | .to-do .button button { 76 | border: none; 77 | background-color: transparent; 78 | font-size: 1.2rem; 79 | color: rgb(121, 116, 116); 80 | } 81 | 82 | .trash { 83 | display: none; 84 | } 85 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import './style.css'; 2 | import { saveLocalStorage, updateCompleted } from './active.js'; 3 | import { 4 | editTodo, removeTodos, addTodo, clearCompletedTodos, 5 | } from './add.js'; 6 | 7 | let itemsArray = []; 8 | 9 | const storageData = JSON.parse(localStorage.getItem('toDoStorage')); 10 | if (storageData) { 11 | itemsArray = storageData; 12 | } 13 | 14 | const todos = document.querySelector('.todos'); 15 | itemsArray.forEach((item) => { 16 | const html = ` 17 | 18 | 19 | `; 20 | const div = document.createElement('div'); 21 | div.innerHTML = html; 22 | const input = div.querySelector('input[type=checkbox]'); 23 | input.checked = item.completed; 24 | div.classList.add('todo-item'); 25 | div.id = item.index; 26 | 27 | input.addEventListener('change', () => { 28 | updateCompleted(item, input); 29 | saveLocalStorage(itemsArray); 30 | }); 31 | 32 | todos.appendChild(div); 33 | const vertical = div.querySelector('.vertical'); 34 | const trash = div.querySelector('.trash'); 35 | const edit = div.querySelector('.edit'); 36 | edit.addEventListener('change', () => { 37 | editTodo(itemsArray, div.id, edit.value); 38 | saveLocalStorage(itemsArray); 39 | }); 40 | vertical.addEventListener('click', () => { 41 | vertical.style.display = 'none'; 42 | trash.style.display = 'block'; 43 | }); 44 | trash.addEventListener('click', () => { 45 | div.remove(); 46 | itemsArray = itemsArray.filter((i) => removeTodos(i, div.id)); 47 | saveLocalStorage(itemsArray); 48 | }); 49 | }); 50 | 51 | const form = document.getElementById('form-id'); 52 | form.addEventListener('submit', (e) => { 53 | e.preventDefault(); 54 | const { value } = form.querySelector('input'); 55 | addTodo(itemsArray, value); 56 | saveLocalStorage(itemsArray); 57 | window.location.reload(); 58 | }); 59 | 60 | const clearButton = document.querySelector('#button'); 61 | clearButton.addEventListener('click', () => { 62 | itemsArray = clearCompletedTodos(itemsArray); 63 | saveLocalStorage(itemsArray); 64 | }); 65 | -------------------------------------------------------------------------------- /.github/workflows/linters.yml: -------------------------------------------------------------------------------- 1 | name: Linters 2 | 3 | on: pull_request 4 | 5 | env: 6 | FORCE_COLOR: 1 7 | 8 | jobs: 9 | lighthouse: 10 | name: Lighthouse 11 | runs-on: ubuntu-18.04 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/setup-node@v1 15 | with: 16 | node-version: "12.x" 17 | - name: Setup Lighthouse 18 | run: npm install -g @lhci/cli@0.7.x 19 | - name: Lighthouse Report 20 | run: lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir=. 21 | webhint: 22 | name: Webhint 23 | runs-on: ubuntu-18.04 24 | steps: 25 | - uses: actions/checkout@v2 26 | - uses: actions/setup-node@v1 27 | with: 28 | node-version: "12.x" 29 | - name: Setup Webhint 30 | run: | 31 | npm install --save-dev hint@6.x 32 | [ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc 33 | - name: Webhint Report 34 | run: npx hint --telemetry=off . 35 | stylelint: 36 | name: Stylelint 37 | runs-on: ubuntu-18.04 38 | steps: 39 | - uses: actions/checkout@v2 40 | - uses: actions/setup-node@v1 41 | with: 42 | node-version: "12.x" 43 | - name: Setup Stylelint 44 | run: | 45 | npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x 46 | [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json 47 | - name: Stylelint Report 48 | run: npx stylelint "**/*.{css,scss}" 49 | eslint: 50 | name: ESLint 51 | runs-on: ubuntu-18.04 52 | steps: 53 | - uses: actions/checkout@v2 54 | - uses: actions/setup-node@v1 55 | with: 56 | node-version: "12.x" 57 | - name: Setup ESLint 58 | run: | 59 | npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x 60 | [ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json 61 | - name: ESLint Report 62 | run: npx eslint . -------------------------------------------------------------------------------- /src/todo.test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment jsdom 3 | */ 4 | import { 5 | addTodo, 6 | removeTodos, 7 | editTodo, 8 | clearCompletedTodos, 9 | } from './add.js'; 10 | import { updateCompleted } from './active.js'; 11 | 12 | describe('A test to add items to To-Do-List', () => { 13 | test('Test addToDo function', () => { 14 | // Arrange 15 | const givenArr = [1]; 16 | 17 | // Act 18 | addTodo(givenArr, 'Added to the listli'); 19 | 20 | // Assert 21 | const firstElement = givenArr[1]; 22 | expect(givenArr).toHaveLength(2); 23 | expect(firstElement.completed).toBe(false); 24 | expect(firstElement.description).toBe('Added to the listli'); 25 | expect(firstElement.index).toBe(2); 26 | }); 27 | }); 28 | 29 | describe('A test to remove items from the To-Do-List', () => { 30 | test('Test removeTodos function', () => { 31 | // Arrange 32 | const tolu = { index: 3 }; 33 | const id = '3'; 34 | // Act 35 | const result = removeTodos(tolu, id); 36 | // Assert 37 | expect(result).toBe(false); 38 | }); 39 | }); 40 | 41 | describe('A test to edit items in the To-Do-List', () => { 42 | test('Test editTodo function', () => { 43 | const takenArr = [{ index: 2, description: 'push in this' }]; 44 | const id2 = '2'; 45 | const newestItem = 'push this in'; 46 | 47 | editTodo(takenArr, id2, newestItem); 48 | 49 | expect(takenArr[0].description).toBe('push this in'); 50 | }); 51 | }); 52 | 53 | describe('A test to update items that are completed', () => { 54 | test('Test updateCompleted function', () => { 55 | const newItem = { completed: true }; 56 | const newInput = { checked: true }; 57 | 58 | updateCompleted(newItem, newInput); 59 | 60 | expect(newItem.completed).toBe(newInput.checked); 61 | }); 62 | }); 63 | 64 | describe('A test for the clear completed to-do function', () => { 65 | test('Test clearCompletedTodos function', () => { 66 | document.body.innerHTML = ` 67 |
68 | 69 |
70 |
71 | 72 |
73 |
75 |
76 | `; 77 | clearCompletedTodos([]); 78 | const remainingItems = document.querySelectorAll('.todo-item'); 79 | expect(remainingItems).toHaveLength(1); 80 | }); 81 | }); 82 | -------------------------------------------------------------------------------- /dist/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). 3 | * This devtool is neither made for production nor for readable output files. 4 | * It uses "eval()" calls to create a separate source file in the browser devtools. 5 | * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) 6 | * or disable the default devtool with "devtool: false". 7 | * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). 8 | */ 9 | /******/ (() => { // webpackBootstrap 10 | /******/ "use strict"; 11 | /******/ var __webpack_modules__ = ({ 12 | 13 | /***/ "./node_modules/css-loader/dist/cjs.js!./src/style.css": 14 | /*!*************************************************************!*\ 15 | !*** ./node_modules/css-loader/dist/cjs.js!./src/style.css ***! 16 | \*************************************************************/ 17 | /***/ ((module, __webpack_exports__, __webpack_require__) => { 18 | 19 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"* {\\n padding: 0;\\n margin: 0;\\n box-sizing: border-box;\\n}\\n\\nbody {\\n background-color: gray;\\n}\\n\\n.to-do {\\n position: absolute;\\n left: 30%;\\n top: 30%;\\n right: 30%;\\n box-shadow: 4px 6px gray;\\n display: flex;\\n flex-direction: column;\\n gap: 4px;\\n background-color: rgb(247, 240, 240);\\n}\\n\\n.to-do .today {\\n font-family: Arial, Helvetica, sans-serif;\\n font-size: 10px;\\n color: rgb(110, 106, 106);\\n display: flex;\\n justify-content: space-between;\\n padding: 15px 15px;\\n background-color: #fff;\\n}\\n\\n.to-do .add-text {\\n display: flex;\\n justify-content: space-between;\\n padding: 10px 15px;\\n background-color: #fff;\\n}\\n\\n.to-do .add-text input {\\n font-style: italic;\\n width: 90%;\\n}\\n\\n.to-do .todos {\\n display: flex;\\n flex-direction: column;\\n gap: 4px;\\n}\\n\\n.to-do .todo-item {\\n display: flex;\\n gap: 20px;\\n background-color: #fff;\\n padding: 15px 15px;\\n}\\n\\n.to-do input[type=text] {\\n border: none;\\n background-color: transparent;\\n font-size: 1rem;\\n}\\n\\n.to-do .todo-item input[type=text] {\\n flex-grow: 1;\\n}\\n\\n.to-do .button {\\n display: flex;\\n justify-content: center;\\n background-color: rgb(199, 195, 195);\\n padding: 10px;\\n}\\n\\n.to-do .button button {\\n border: none;\\n background-color: transparent;\\n font-size: 1.2rem;\\n color: rgb(121, 116, 116);\\n}\\n\\n.trash {\\n display: none;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://webpack-demo/./src/style.css?./node_modules/css-loader/dist/cjs.js"); 20 | 21 | /***/ }), 22 | 23 | /***/ "./node_modules/css-loader/dist/runtime/api.js": 24 | /*!*****************************************************!*\ 25 | !*** ./node_modules/css-loader/dist/runtime/api.js ***! 26 | \*****************************************************/ 27 | /***/ ((module) => { 28 | 29 | eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var _i = 0; _i < this.length; _i++) {\n var id = this[_i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i2 = 0; _i2 < modules.length; _i2++) {\n var item = [].concat(modules[_i2]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/css-loader/dist/runtime/api.js?"); 30 | 31 | /***/ }), 32 | 33 | /***/ "./node_modules/css-loader/dist/runtime/noSourceMaps.js": 34 | /*!**************************************************************!*\ 35 | !*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***! 36 | \**************************************************************/ 37 | /***/ ((module) => { 38 | 39 | eval("\n\nmodule.exports = function (i) {\n return i[1];\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/css-loader/dist/runtime/noSourceMaps.js?"); 40 | 41 | /***/ }), 42 | 43 | /***/ "./src/style.css": 44 | /*!***********************!*\ 45 | !*** ./src/style.css ***! 46 | \***********************/ 47 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 48 | 49 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./style.css */ \"./node_modules/css-loader/dist/cjs.js!./src/style.css\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://webpack-demo/./src/style.css?"); 50 | 51 | /***/ }), 52 | 53 | /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": 54 | /*!****************************************************************************!*\ 55 | !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! 56 | \****************************************************************************/ 57 | /***/ ((module) => { 58 | 59 | eval("\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?"); 60 | 61 | /***/ }), 62 | 63 | /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js": 64 | /*!********************************************************************!*\ 65 | !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***! 66 | \********************************************************************/ 67 | /***/ ((module) => { 68 | 69 | eval("\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/style-loader/dist/runtime/insertBySelector.js?"); 70 | 71 | /***/ }), 72 | 73 | /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js": 74 | /*!**********************************************************************!*\ 75 | !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***! 76 | \**********************************************************************/ 77 | /***/ ((module) => { 78 | 79 | eval("\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var style = document.createElement(\"style\");\n options.setAttributes(style, options.attributes);\n options.insert(style);\n return style;\n}\n\nmodule.exports = insertStyleElement;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/style-loader/dist/runtime/insertStyleElement.js?"); 80 | 81 | /***/ }), 82 | 83 | /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js": 84 | /*!**********************************************************************************!*\ 85 | !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! 86 | \**********************************************************************************/ 87 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 88 | 89 | eval("\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(style) {\n var nonce = true ? __webpack_require__.nc : 0;\n\n if (nonce) {\n style.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?"); 90 | 91 | /***/ }), 92 | 93 | /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js": 94 | /*!***************************************************************!*\ 95 | !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***! 96 | \***************************************************************/ 97 | /***/ ((module) => { 98 | 99 | eval("\n\n/* istanbul ignore next */\nfunction apply(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute(\"media\", media);\n } else {\n style.removeAttribute(\"media\");\n }\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, style);\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var style = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(style, options, obj);\n },\n remove: function remove() {\n removeStyleElement(style);\n }\n };\n}\n\nmodule.exports = domAPI;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/style-loader/dist/runtime/styleDomAPI.js?"); 100 | 101 | /***/ }), 102 | 103 | /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js": 104 | /*!*********************************************************************!*\ 105 | !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***! 106 | \*********************************************************************/ 107 | /***/ ((module) => { 108 | 109 | eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, style) {\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/style-loader/dist/runtime/styleTagTransform.js?"); 110 | 111 | /***/ }), 112 | 113 | /***/ "./src/active.js": 114 | /*!***********************!*\ 115 | !*** ./src/active.js ***! 116 | \***********************/ 117 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 118 | 119 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"saveLocalStorage\": () => (/* binding */ saveLocalStorage),\n/* harmony export */ \"updateCompleted\": () => (/* binding */ updateCompleted)\n/* harmony export */ });\nconst saveLocalStorage = (data) => {\n const todoItems = document.querySelectorAll('.todo-item');\n todoItems.forEach((item, idx) => {\n item.id = idx + 1;\n });\n data.forEach((d, idx) => {\n d.index = idx + 1;\n });\n localStorage.setItem('toDoStorage', JSON.stringify(data));\n};\n\nconst updateCompleted = (item, input) => {\n item.completed = input.checked;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./src/active.js?"); 120 | 121 | /***/ }), 122 | 123 | /***/ "./src/add.js": 124 | /*!********************!*\ 125 | !*** ./src/add.js ***! 126 | \********************/ 127 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 128 | 129 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"editTodo\": () => (/* binding */ editTodo),\n/* harmony export */ \"removeTodos\": () => (/* binding */ removeTodos),\n/* harmony export */ \"addTodo\": () => (/* binding */ addTodo),\n/* harmony export */ \"clearCompletedTodos\": () => (/* binding */ clearCompletedTodos)\n/* harmony export */ });\nconst editTodo = (itemsArray, id, newValue) => {\n itemsArray.forEach((item) => {\n if (item.index.toString() === id) {\n item.description = newValue;\n }\n });\n};\n\nconst removeTodos = (something, id) => {\n if (something.index.toString() === id) {\n return false;\n }\n return true;\n};\n\nconst addTodo = (itemsArray, value) => {\n itemsArray.push({ completed: false, description: value, index: itemsArray.length + 1 });\n};\n\nconst clearCompletedTodos = (array) => {\n let resultArray = array;\n const todoArray = document.querySelectorAll('.todo-item');\n // console.log(todoArray.length);\n todoArray.forEach((div) => {\n const input = div.querySelector('input');\n if (input.checked) {\n div.remove();\n resultArray = array.filter((something) => {\n if (something.index.toString() === div.id) {\n return false;\n }\n return true;\n });\n }\n });\n return resultArray;\n};\n\n//# sourceURL=webpack://webpack-demo/./src/add.js?"); 130 | 131 | /***/ }), 132 | 133 | /***/ "./src/index.js": 134 | /*!**********************!*\ 135 | !*** ./src/index.js ***! 136 | \**********************/ 137 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 138 | 139 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */ \"./src/style.css\");\n/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./active.js */ \"./src/active.js\");\n/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./add.js */ \"./src/add.js\");\n\n\n\n\nlet itemsArray = [];\n\nconst storageData = JSON.parse(localStorage.getItem('toDoStorage'));\nif (storageData) {\n itemsArray = storageData;\n}\n\nconst todos = document.querySelector('.todos');\nitemsArray.forEach((item) => {\n const html = `\n \n \n `;\n const div = document.createElement('div');\n div.innerHTML = html;\n const input = div.querySelector('input[type=checkbox]');\n input.checked = item.completed;\n div.classList.add('todo-item');\n div.id = item.index;\n\n input.addEventListener('change', () => {\n (0,_active_js__WEBPACK_IMPORTED_MODULE_1__.updateCompleted)(item, input);\n (0,_active_js__WEBPACK_IMPORTED_MODULE_1__.saveLocalStorage)(itemsArray);\n });\n\n todos.appendChild(div);\n const vertical = div.querySelector('.vertical');\n const trash = div.querySelector('.trash');\n const edit = div.querySelector('.edit');\n edit.addEventListener('change', () => {\n (0,_add_js__WEBPACK_IMPORTED_MODULE_2__.editTodo)(itemsArray, div.id, edit.value);\n (0,_active_js__WEBPACK_IMPORTED_MODULE_1__.saveLocalStorage)(itemsArray);\n });\n vertical.addEventListener('click', () => {\n vertical.style.display = 'none';\n trash.style.display = 'block';\n });\n trash.addEventListener('click', () => {\n div.remove();\n itemsArray = itemsArray.filter((i) => (0,_add_js__WEBPACK_IMPORTED_MODULE_2__.removeTodos)(i, div.id));\n (0,_active_js__WEBPACK_IMPORTED_MODULE_1__.saveLocalStorage)(itemsArray);\n });\n});\n\nconst form = document.getElementById('form-id');\nform.addEventListener('submit', (e) => {\n e.preventDefault();\n const { value } = form.querySelector('input');\n (0,_add_js__WEBPACK_IMPORTED_MODULE_2__.addTodo)(itemsArray, value);\n (0,_active_js__WEBPACK_IMPORTED_MODULE_1__.saveLocalStorage)(itemsArray);\n window.location.reload();\n});\n\nconst clearButton = document.querySelector('#button');\nclearButton.addEventListener('click', () => {\n itemsArray = (0,_add_js__WEBPACK_IMPORTED_MODULE_2__.clearCompletedTodos)(itemsArray);\n (0,_active_js__WEBPACK_IMPORTED_MODULE_1__.saveLocalStorage)(itemsArray);\n});\n\n\n//# sourceURL=webpack://webpack-demo/./src/index.js?"); 140 | 141 | /***/ }) 142 | 143 | /******/ }); 144 | /************************************************************************/ 145 | /******/ // The module cache 146 | /******/ var __webpack_module_cache__ = {}; 147 | /******/ 148 | /******/ // The require function 149 | /******/ function __webpack_require__(moduleId) { 150 | /******/ // Check if module is in cache 151 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; 152 | /******/ if (cachedModule !== undefined) { 153 | /******/ return cachedModule.exports; 154 | /******/ } 155 | /******/ // Create a new module (and put it into the cache) 156 | /******/ var module = __webpack_module_cache__[moduleId] = { 157 | /******/ id: moduleId, 158 | /******/ // no module.loaded needed 159 | /******/ exports: {} 160 | /******/ }; 161 | /******/ 162 | /******/ // Execute the module function 163 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 164 | /******/ 165 | /******/ // Return the exports of the module 166 | /******/ return module.exports; 167 | /******/ } 168 | /******/ 169 | /************************************************************************/ 170 | /******/ /* webpack/runtime/compat get default export */ 171 | /******/ (() => { 172 | /******/ // getDefaultExport function for compatibility with non-harmony modules 173 | /******/ __webpack_require__.n = (module) => { 174 | /******/ var getter = module && module.__esModule ? 175 | /******/ () => (module['default']) : 176 | /******/ () => (module); 177 | /******/ __webpack_require__.d(getter, { a: getter }); 178 | /******/ return getter; 179 | /******/ }; 180 | /******/ })(); 181 | /******/ 182 | /******/ /* webpack/runtime/define property getters */ 183 | /******/ (() => { 184 | /******/ // define getter functions for harmony exports 185 | /******/ __webpack_require__.d = (exports, definition) => { 186 | /******/ for(var key in definition) { 187 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 188 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 189 | /******/ } 190 | /******/ } 191 | /******/ }; 192 | /******/ })(); 193 | /******/ 194 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ 195 | /******/ (() => { 196 | /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 197 | /******/ })(); 198 | /******/ 199 | /******/ /* webpack/runtime/make namespace object */ 200 | /******/ (() => { 201 | /******/ // define __esModule on exports 202 | /******/ __webpack_require__.r = (exports) => { 203 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 204 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 205 | /******/ } 206 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 207 | /******/ }; 208 | /******/ })(); 209 | /******/ 210 | /************************************************************************/ 211 | /******/ 212 | /******/ // startup 213 | /******/ // Load entry module and return exports 214 | /******/ // This entry module can't be inlined because the eval devtool is used. 215 | /******/ var __webpack_exports__ = __webpack_require__("./src/index.js"); 216 | /******/ 217 | /******/ })() 218 | ; --------------------------------------------------------------------------------