mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 07:37:49 +01:00
fix eslint
This commit is contained in:
2270
package-lock.json
generated
2270
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
353
react/package-lock.json
generated
353
react/package-lock.json
generated
@@ -3179,51 +3179,85 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "4.19.1",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.1.0.tgz",
|
||||||
"integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==",
|
"integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^5.3.0",
|
"ajv": "^6.5.0",
|
||||||
"babel-code-frame": "^6.22.0",
|
"babel-code-frame": "^6.26.0",
|
||||||
"chalk": "^2.1.0",
|
"chalk": "^2.1.0",
|
||||||
"concat-stream": "^1.6.0",
|
"cross-spawn": "^6.0.5",
|
||||||
"cross-spawn": "^5.1.0",
|
|
||||||
"debug": "^3.1.0",
|
"debug": "^3.1.0",
|
||||||
"doctrine": "^2.1.0",
|
"doctrine": "^2.1.0",
|
||||||
"eslint-scope": "^3.7.1",
|
"eslint-scope": "^4.0.0",
|
||||||
|
"eslint-utils": "^1.3.1",
|
||||||
"eslint-visitor-keys": "^1.0.0",
|
"eslint-visitor-keys": "^1.0.0",
|
||||||
"espree": "^3.5.4",
|
"espree": "^4.0.0",
|
||||||
"esquery": "^1.0.0",
|
"esquery": "^1.0.1",
|
||||||
"esutils": "^2.0.2",
|
"esutils": "^2.0.2",
|
||||||
"file-entry-cache": "^2.0.0",
|
"file-entry-cache": "^2.0.0",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"globals": "^11.0.1",
|
"globals": "^11.7.0",
|
||||||
"ignore": "^3.3.3",
|
"ignore": "^3.3.3",
|
||||||
"imurmurhash": "^0.1.4",
|
"imurmurhash": "^0.1.4",
|
||||||
"inquirer": "^3.0.6",
|
"inquirer": "^5.2.0",
|
||||||
"is-resolvable": "^1.0.0",
|
"is-resolvable": "^1.1.0",
|
||||||
"js-yaml": "^3.9.1",
|
"js-yaml": "^3.11.0",
|
||||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
"levn": "^0.3.0",
|
"levn": "^0.3.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.5",
|
||||||
"minimatch": "^3.0.2",
|
"minimatch": "^3.0.4",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
"optionator": "^0.8.2",
|
"optionator": "^0.8.2",
|
||||||
"path-is-inside": "^1.0.2",
|
"path-is-inside": "^1.0.2",
|
||||||
"pluralize": "^7.0.0",
|
"pluralize": "^7.0.0",
|
||||||
"progress": "^2.0.0",
|
"progress": "^2.0.0",
|
||||||
"regexpp": "^1.0.1",
|
"regexpp": "^1.1.0",
|
||||||
"require-uncached": "^1.0.3",
|
"require-uncached": "^1.0.3",
|
||||||
"semver": "^5.3.0",
|
"semver": "^5.5.0",
|
||||||
|
"string.prototype.matchall": "^2.0.0",
|
||||||
"strip-ansi": "^4.0.0",
|
"strip-ansi": "^4.0.0",
|
||||||
"strip-json-comments": "~2.0.1",
|
"strip-json-comments": "^2.0.1",
|
||||||
"table": "4.0.2",
|
"table": "^4.0.3",
|
||||||
"text-table": "~0.2.0"
|
"text-table": "^0.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"acorn": {
|
||||||
|
"version": "5.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",
|
||||||
|
"integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"acorn-jsx": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"acorn": "^5.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ajv": {
|
||||||
|
"version": "6.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz",
|
||||||
|
"integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fast-deep-equal": "^2.0.1",
|
||||||
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
|
"json-schema-traverse": "^0.4.1",
|
||||||
|
"uri-js": "^4.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ajv-keywords": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz",
|
||||||
|
"integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||||
@@ -3241,6 +3275,19 @@
|
|||||||
"supports-color": "^5.3.0"
|
"supports-color": "^5.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"cross-spawn": {
|
||||||
|
"version": "6.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||||
|
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"nice-try": "^1.0.4",
|
||||||
|
"path-key": "^2.0.1",
|
||||||
|
"semver": "^5.5.0",
|
||||||
|
"shebang-command": "^1.2.0",
|
||||||
|
"which": "^1.2.9"
|
||||||
|
}
|
||||||
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||||
@@ -3250,10 +3297,36 @@
|
|||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"esprima": {
|
"eslint-scope": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz",
|
||||||
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",
|
"integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"esrecurse": "^4.1.0",
|
||||||
|
"estraverse": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"espree": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"acorn": "^5.6.0",
|
||||||
|
"acorn-jsx": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"fast-deep-equal": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
@@ -3262,6 +3335,27 @@
|
|||||||
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
|
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"inquirer": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-escapes": "^3.0.0",
|
||||||
|
"chalk": "^2.0.0",
|
||||||
|
"cli-cursor": "^2.1.0",
|
||||||
|
"cli-width": "^2.0.0",
|
||||||
|
"external-editor": "^2.1.0",
|
||||||
|
"figures": "^2.0.0",
|
||||||
|
"lodash": "^4.3.0",
|
||||||
|
"mute-stream": "0.0.7",
|
||||||
|
"run-async": "^2.2.0",
|
||||||
|
"rxjs": "^5.5.2",
|
||||||
|
"string-width": "^2.1.0",
|
||||||
|
"strip-ansi": "^4.0.0",
|
||||||
|
"through": "^2.3.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"js-yaml": {
|
"js-yaml": {
|
||||||
"version": "3.12.0",
|
"version": "3.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
|
||||||
@@ -3272,6 +3366,12 @@
|
|||||||
"esprima": "^4.0.0"
|
"esprima": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"json-schema-traverse": {
|
||||||
|
"version": "0.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
|
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||||
@@ -3280,6 +3380,20 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^3.0.0"
|
"ansi-regex": "^3.0.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"table": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz",
|
||||||
|
"integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ajv": "^6.0.1",
|
||||||
|
"ajv-keywords": "^3.0.0",
|
||||||
|
"chalk": "^2.1.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"slice-ansi": "1.0.0",
|
||||||
|
"string-width": "^2.1.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3560,6 +3674,12 @@
|
|||||||
"estraverse": "^4.1.1"
|
"estraverse": "^4.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-utils": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"eslint-visitor-keys": {
|
"eslint-visitor-keys": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
|
||||||
@@ -4206,11 +4326,13 @@
|
|||||||
},
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@@ -4223,15 +4345,18 @@
|
|||||||
},
|
},
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -4334,7 +4459,8 @@
|
|||||||
},
|
},
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@@ -4344,6 +4470,7 @@
|
|||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -4356,17 +4483,20 @@
|
|||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@@ -4383,6 +4513,7 @@
|
|||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@@ -4455,7 +4586,8 @@
|
|||||||
},
|
},
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@@ -4465,6 +4597,7 @@
|
|||||||
"once": {
|
"once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@@ -4570,6 +4703,7 @@
|
|||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@@ -7374,6 +7508,12 @@
|
|||||||
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
|
||||||
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
|
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
|
||||||
},
|
},
|
||||||
|
"nice-try": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"no-case": {
|
"no-case": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
|
||||||
@@ -9152,12 +9292,100 @@
|
|||||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint": {
|
||||||
|
"version": "4.19.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz",
|
||||||
|
"integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ajv": "^5.3.0",
|
||||||
|
"babel-code-frame": "^6.22.0",
|
||||||
|
"chalk": "^2.1.0",
|
||||||
|
"concat-stream": "^1.6.0",
|
||||||
|
"cross-spawn": "^5.1.0",
|
||||||
|
"debug": "^3.1.0",
|
||||||
|
"doctrine": "^2.1.0",
|
||||||
|
"eslint-scope": "^3.7.1",
|
||||||
|
"eslint-visitor-keys": "^1.0.0",
|
||||||
|
"espree": "^3.5.4",
|
||||||
|
"esquery": "^1.0.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"file-entry-cache": "^2.0.0",
|
||||||
|
"functional-red-black-tree": "^1.0.1",
|
||||||
|
"glob": "^7.1.2",
|
||||||
|
"globals": "^11.0.1",
|
||||||
|
"ignore": "^3.3.3",
|
||||||
|
"imurmurhash": "^0.1.4",
|
||||||
|
"inquirer": "^3.0.6",
|
||||||
|
"is-resolvable": "^1.0.0",
|
||||||
|
"js-yaml": "^3.9.1",
|
||||||
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
|
"levn": "^0.3.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"minimatch": "^3.0.2",
|
||||||
|
"mkdirp": "^0.5.1",
|
||||||
|
"natural-compare": "^1.4.0",
|
||||||
|
"optionator": "^0.8.2",
|
||||||
|
"path-is-inside": "^1.0.2",
|
||||||
|
"pluralize": "^7.0.0",
|
||||||
|
"progress": "^2.0.0",
|
||||||
|
"regexpp": "^1.0.1",
|
||||||
|
"require-uncached": "^1.0.3",
|
||||||
|
"semver": "^5.3.0",
|
||||||
|
"strip-ansi": "^4.0.0",
|
||||||
|
"strip-json-comments": "~2.0.1",
|
||||||
|
"table": "4.0.2",
|
||||||
|
"text-table": "~0.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"version": "11.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
|
||||||
|
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"indent-string": {
|
"indent-string": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
|
||||||
"integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
|
"integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
|
||||||
|
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"pretty-format": {
|
"pretty-format": {
|
||||||
"version": "23.0.1",
|
"version": "23.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.0.1.tgz",
|
||||||
@@ -9167,6 +9395,15 @@
|
|||||||
"ansi-regex": "^3.0.0",
|
"ansi-regex": "^3.0.0",
|
||||||
"ansi-styles": "^3.2.0"
|
"ansi-styles": "^3.2.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^3.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -9266,6 +9503,12 @@
|
|||||||
"randombytes": "^2.0.1"
|
"randombytes": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"punycode": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"q": {
|
"q": {
|
||||||
"version": "1.5.1",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
|
||||||
@@ -10075,6 +10318,15 @@
|
|||||||
"safe-regex": "^1.1.0"
|
"safe-regex": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"regexp.prototype.flags": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"define-properties": "^1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"regexpp": {
|
"regexpp": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz",
|
||||||
@@ -10359,6 +10611,23 @@
|
|||||||
"rx-lite": "*"
|
"rx-lite": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rxjs": {
|
||||||
|
"version": "5.5.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz",
|
||||||
|
"integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"symbol-observable": "1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"symbol-observable": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
@@ -10970,6 +11239,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"string.prototype.matchall": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"define-properties": "^1.1.2",
|
||||||
|
"es-abstract": "^1.10.0",
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has-symbols": "^1.0.0",
|
||||||
|
"regexp.prototype.flags": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
@@ -11547,6 +11829,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
|
||||||
"integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg="
|
"integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg="
|
||||||
},
|
},
|
||||||
|
"uri-js": {
|
||||||
|
"version": "4.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
|
||||||
|
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"punycode": "^2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"urijs": {
|
"urijs": {
|
||||||
"version": "1.19.1",
|
"version": "1.19.1",
|
||||||
"resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.1.tgz",
|
||||||
|
|||||||
38
react/src/actions/defs.js
Normal file
38
react/src/actions/defs.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
export const ADD_LIST = 'ADD_LIST';
|
||||||
|
export const REMOVE_LIST = 'REMOVE_LIST';
|
||||||
|
export const EDIT_LIST_NAME = 'EDIT_LIST_NAME';
|
||||||
|
export const RECIEVE_LISTS = 'RECIEVE_LISTS';
|
||||||
|
export const REQUEST_LISTS = 'REQUEST_LISTS';
|
||||||
|
export const INVALIDATE_LISTS = 'INVALIDATE_LISTS';
|
||||||
|
export const VALIDATE_LISTS = 'VALIDATE_LISTS';
|
||||||
|
export const CHANGE_LIST = 'CHANGE_LIST';
|
||||||
|
export const START_CREATE_LIST = 'START_CREATE_LIST';
|
||||||
|
export const START_EDIT_LIST = 'START_EDIT_LIST';
|
||||||
|
export const STOP_CREATE_LIST = 'STOP_CREATE_LIST';
|
||||||
|
export const STOP_EDIT_LIST = 'STOP_EDIT_LIST';
|
||||||
|
|
||||||
|
export const ADD_TODO = 'ADD_TODO';
|
||||||
|
export const REMOVE_TODO = 'REMOVE_TODO';
|
||||||
|
export const TOGGLE_TODO = 'TOGGLE_TODO';
|
||||||
|
export const EDIT_TODO = 'EDIT_TODO';
|
||||||
|
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
|
||||||
|
export const RECIEVE_TODOS = 'RECIEVE_TODOS';
|
||||||
|
export const REQUEST_TODOS = 'REQUEST_TODOS';
|
||||||
|
export const INVALIDATE_TODOS = 'INVALIDATE_TODOS';
|
||||||
|
export const VALIDATE_TODOS = 'VALIDATE_TODOS';
|
||||||
|
|
||||||
|
export const VisibilityFilters = {
|
||||||
|
SHOW_ALL: 'SHOW_ALL',
|
||||||
|
SHOW_COMPLETED: 'SHOW_COMPLETED',
|
||||||
|
SHOW_ACTIVE: 'SHOW_ACTIVE',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
|
||||||
|
export const LOGIN_FAIL = 'LOGIN_FAIL';
|
||||||
|
export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS';
|
||||||
|
export const SIGNUP_FAIL = 'SIGNUP_FAIL';
|
||||||
|
export const LOGOUT = 'LOGOUT';
|
||||||
|
export const START_LOGIN = 'INVALIDATE_USER';
|
||||||
|
export const REQUEST_USER = 'REQUEST_USER';
|
||||||
|
export const VALIDATE_USER = 'VALIDATE_USER';
|
||||||
|
export const RESET_USER = 'RESET_USER';
|
||||||
@@ -1,18 +1,19 @@
|
|||||||
import { API_ROOT, getToken, mongoObjectId } from './util';
|
import {
|
||||||
import { RECIEVE_TODOS } from './todos';
|
REQUEST_LISTS,
|
||||||
|
RECIEVE_LISTS,
|
||||||
|
CHANGE_LIST,
|
||||||
|
START_CREATE_LIST,
|
||||||
|
START_EDIT_LIST,
|
||||||
|
STOP_CREATE_LIST,
|
||||||
|
STOP_EDIT_LIST,
|
||||||
|
ADD_LIST,
|
||||||
|
INVALIDATE_LISTS,
|
||||||
|
REMOVE_LIST,
|
||||||
|
EDIT_LIST_NAME,
|
||||||
|
RECIEVE_TODOS,
|
||||||
|
} from './defs';
|
||||||
|
|
||||||
export const ADD_LIST = 'ADD_LIST';
|
import { API_ROOT, getToken, mongoObjectId } from './util';
|
||||||
export const REMOVE_LIST = 'REMOVE_LIST';
|
|
||||||
export const EDIT_LIST_NAME = 'EDIT_LIST_NAME';
|
|
||||||
export const RECIEVE_LISTS = 'RECIEVE_LISTS';
|
|
||||||
export const REQUEST_LISTS = 'REQUEST_LISTS';
|
|
||||||
export const INVALIDATE_LISTS = 'INVALIDATE_LISTS';
|
|
||||||
export const VALIDATE_LISTS = 'VALIDATE_LISTS';
|
|
||||||
export const CHANGE_LIST = 'CHANGE_LIST';
|
|
||||||
export const START_CREATE_LIST = 'START_CREATE_LIST';
|
|
||||||
export const START_EDIT_LIST = 'START_EDIT_LIST';
|
|
||||||
export const STOP_CREATE_LIST = 'STOP_CREATE_LIST';
|
|
||||||
export const STOP_EDIT_LIST = 'STOP_EDIT_LIST';
|
|
||||||
|
|
||||||
function requestLists() {
|
function requestLists() {
|
||||||
return { type: REQUEST_LISTS };
|
return { type: REQUEST_LISTS };
|
||||||
|
|||||||
@@ -1,25 +1,14 @@
|
|||||||
|
import {
|
||||||
|
REQUEST_TODOS,
|
||||||
|
RECIEVE_TODOS,
|
||||||
|
ADD_TODO,
|
||||||
|
REMOVE_TODO,
|
||||||
|
TOGGLE_TODO,
|
||||||
|
EDIT_TODO,
|
||||||
|
INVALIDATE_LISTS,
|
||||||
|
} from './defs';
|
||||||
|
|
||||||
import { API_ROOT, getToken, mongoObjectId } from './util';
|
import { API_ROOT, getToken, mongoObjectId } from './util';
|
||||||
import { INVALIDATE_LISTS } from './lists';
|
|
||||||
|
|
||||||
export const ADD_TODO = 'ADD_TODO';
|
|
||||||
export const REMOVE_TODO = 'REMOVE_TODO';
|
|
||||||
export const TOGGLE_TODO = 'TOGGLE_TODO';
|
|
||||||
export const EDIT_TODO = 'EDIT_TODO';
|
|
||||||
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
|
|
||||||
export const RECIEVE_TODOS = 'RECIEVE_TODOS';
|
|
||||||
export const REQUEST_TODOS = 'REQUEST_TODOS';
|
|
||||||
export const INVALIDATE_TODOS = 'INVALIDATE_TODOS';
|
|
||||||
export const VALIDATE_TODOS = 'VALIDATE_TODOS';
|
|
||||||
|
|
||||||
export const VisibilityFilters = {
|
|
||||||
SHOW_ALL: 'SHOW_ALL',
|
|
||||||
SHOW_COMPLETED: 'SHOW_COMPLETED',
|
|
||||||
SHOW_ACTIVE: 'SHOW_ACTIVE',
|
|
||||||
};
|
|
||||||
|
|
||||||
export function setVisibilityFilter(filter) {
|
|
||||||
return { type: SET_VISIBILITY_FILTER, filter };
|
|
||||||
}
|
|
||||||
|
|
||||||
export function fetchTodos() {
|
export function fetchTodos() {
|
||||||
return async dispatch => {
|
return async dispatch => {
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
|
import {
|
||||||
|
START_LOGIN,
|
||||||
|
LOGIN_SUCCESS,
|
||||||
|
LOGIN_FAIL,
|
||||||
|
VALIDATE_USER,
|
||||||
|
SIGNUP_SUCCESS,
|
||||||
|
SIGNUP_FAIL,
|
||||||
|
RESET_USER,
|
||||||
|
LOGOUT,
|
||||||
|
} from './defs';
|
||||||
|
|
||||||
import { API_ROOT, getToken, setToken } from './util';
|
import { API_ROOT, getToken, setToken } from './util';
|
||||||
import { fetchLists } from './lists';
|
import { fetchLists } from './lists';
|
||||||
|
|
||||||
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
|
|
||||||
export const LOGIN_FAIL = 'LOGIN_FAIL';
|
|
||||||
export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS';
|
|
||||||
export const SIGNUP_FAIL = 'SIGNUP_FAIL';
|
|
||||||
export const LOGOUT = 'LOGOUT';
|
|
||||||
export const START_LOGIN = 'INVALIDATE_USER';
|
|
||||||
export const REQUEST_USER = 'REQUEST_USER';
|
|
||||||
export const VALIDATE_USER = 'VALIDATE_USER';
|
|
||||||
export const RESET_USER = 'RESET_USER';
|
|
||||||
|
|
||||||
function startLogin() {
|
function startLogin() {
|
||||||
return { type: START_LOGIN };
|
return { type: START_LOGIN };
|
||||||
}
|
}
|
||||||
|
|||||||
5
react/src/actions/visibilityFilter.js
Normal file
5
react/src/actions/visibilityFilter.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { SET_VISIBILITY_FILTER } from './defs';
|
||||||
|
|
||||||
|
export default function setVisibilityFilter(filter) {
|
||||||
|
return { type: SET_VISIBILITY_FILTER, filter };
|
||||||
|
}
|
||||||
@@ -7,12 +7,13 @@ import './Container.css';
|
|||||||
import './App.css';
|
import './App.css';
|
||||||
|
|
||||||
import TodosContainer from '../containers/TodosContainer';
|
import TodosContainer from '../containers/TodosContainer';
|
||||||
import LoginForm from '../components/user/LoginForm';
|
import LoginForm from './user/LoginForm';
|
||||||
import SignupForm from '../components/user/SignupForm';
|
import SignupForm from './user/SignupForm';
|
||||||
|
|
||||||
export default class App extends React.PureComponent {
|
export default class App extends React.PureComponent {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.loadUser();
|
const { loadUser } = this.props;
|
||||||
|
loadUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import FilterLink from '../containers/FilterLink';
|
import FilterLink from '../containers/FilterLink';
|
||||||
import { VisibilityFilters } from '../actions/todos';
|
import { VisibilityFilters } from '../actions/defs';
|
||||||
|
|
||||||
function Filters() {
|
function Filters() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import UserHeader from '../components/UserHeader';
|
import UserHeader from './UserHeader';
|
||||||
import ListsContainer from '../containers/ListsContainer';
|
import ListsContainer from '../containers/ListsContainer';
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
|
|||||||
@@ -28,28 +28,35 @@ class Todo extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMouseOver() {
|
onMouseOver() {
|
||||||
|
const { state } = this;
|
||||||
this.setState({
|
this.setState({
|
||||||
...this.state,
|
...state,
|
||||||
hover: true,
|
hover: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMouseOut() {
|
onMouseOut() {
|
||||||
|
const { state } = this;
|
||||||
this.setState({
|
this.setState({
|
||||||
...this.state,
|
...state,
|
||||||
hover: false,
|
hover: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
startEdit() {
|
startEdit() {
|
||||||
|
const { state } = this;
|
||||||
this.setState({
|
this.setState({
|
||||||
...this.state,
|
...state,
|
||||||
editing: true,
|
editing: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
stopEdit(value) {
|
stopEdit(value) {
|
||||||
this.props.editTodo(value);
|
const { editTodo } = this.props;
|
||||||
|
editTodo(value);
|
||||||
|
const { state } = this;
|
||||||
this.setState({
|
this.setState({
|
||||||
...this.state,
|
...state,
|
||||||
editing: false,
|
editing: false,
|
||||||
hover: false,
|
hover: false,
|
||||||
});
|
});
|
||||||
@@ -58,18 +65,20 @@ class Todo extends React.PureComponent {
|
|||||||
render() {
|
render() {
|
||||||
const deleteClasses = ['delete'];
|
const deleteClasses = ['delete'];
|
||||||
const editClasses = ['edit'];
|
const editClasses = ['edit'];
|
||||||
if (!this.state.hover) {
|
const { hover } = this.state;
|
||||||
|
const { editing, todo, removeTodo, toggleTodo, style } = this.props;
|
||||||
|
if (!hover) {
|
||||||
deleteClasses.push('disabled');
|
deleteClasses.push('disabled');
|
||||||
editClasses.push('disabled');
|
editClasses.push('disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
let input;
|
let input;
|
||||||
|
|
||||||
const text = this.state.editing ? (
|
const text = editing ? (
|
||||||
<div className="todo">
|
<div className="todo">
|
||||||
<textarea
|
<textarea
|
||||||
className="todo--input"
|
className="todo--input"
|
||||||
defaultValue={this.props.todo.text}
|
defaultValue={todo.text}
|
||||||
ref={node => {
|
ref={node => {
|
||||||
input = node;
|
input = node;
|
||||||
}}
|
}}
|
||||||
@@ -80,18 +89,18 @@ class Todo extends React.PureComponent {
|
|||||||
style={{
|
style={{
|
||||||
justifyContent: 'left',
|
justifyContent: 'left',
|
||||||
paddingLeft: '1rem',
|
paddingLeft: '1rem',
|
||||||
textDecoration: this.props.todo.completed ? 'line-through' : 'none',
|
textDecoration: todo.completed ? 'line-through' : 'none',
|
||||||
color: this.props.todo.completed ? '#888888' : 'black',
|
color: todo.completed ? '#888888' : 'black',
|
||||||
}}
|
}}
|
||||||
className="todo"
|
className="todo"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.props.toggleTodo();
|
toggleTodo();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{this.props.todo.text}
|
{todo.text}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
);
|
);
|
||||||
const ButtonBases = this.state.editing
|
const ButtonBases = editing
|
||||||
? [
|
? [
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
key="save"
|
key="save"
|
||||||
@@ -105,21 +114,15 @@ class Todo extends React.PureComponent {
|
|||||||
: [
|
: [
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
key="remove"
|
key="remove"
|
||||||
style={
|
style={hover ? { backgroundColor: 'pink' } : disabledAction}
|
||||||
this.state.hover ? { backgroundColor: 'pink' } : disabledAction
|
|
||||||
}
|
|
||||||
className={deleteClasses.join(' ')}
|
className={deleteClasses.join(' ')}
|
||||||
onClick={this.props.removeTodo}
|
onClick={removeTodo}
|
||||||
>
|
>
|
||||||
<DeleteIcon style={icon} />
|
<DeleteIcon style={icon} />
|
||||||
</ButtonBase>,
|
</ButtonBase>,
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
key="edit"
|
key="edit"
|
||||||
style={
|
style={hover ? { backgroundColor: 'lightcyan' } : disabledAction}
|
||||||
this.state.hover
|
|
||||||
? { backgroundColor: 'lightcyan' }
|
|
||||||
: disabledAction
|
|
||||||
}
|
|
||||||
className={editClasses.join(' ')}
|
className={editClasses.join(' ')}
|
||||||
onClick={this.startEdit}
|
onClick={this.startEdit}
|
||||||
>
|
>
|
||||||
@@ -129,7 +132,7 @@ class Todo extends React.PureComponent {
|
|||||||
return (
|
return (
|
||||||
<animated.li
|
<animated.li
|
||||||
style={{
|
style={{
|
||||||
...this.props.style,
|
...style,
|
||||||
borderTop: '1px solid #f0f0f0',
|
borderTop: '1px solid #f0f0f0',
|
||||||
}}
|
}}
|
||||||
onMouseOver={this.onMouseOver}
|
onMouseOver={this.onMouseOver}
|
||||||
@@ -153,6 +156,7 @@ Todo.propTypes = {
|
|||||||
removeTodo: PropTypes.func.isRequired,
|
removeTodo: PropTypes.func.isRequired,
|
||||||
toggleTodo: PropTypes.func.isRequired,
|
toggleTodo: PropTypes.func.isRequired,
|
||||||
editTodo: PropTypes.func.isRequired,
|
editTodo: PropTypes.func.isRequired,
|
||||||
|
editing: PropTypes.bool.isRequired,
|
||||||
style: PropTypes.shape({ height: PropTypes.object.isRequired }).isRequired,
|
style: PropTypes.shape({ height: PropTypes.object.isRequired }).isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ import Filters from './Filters';
|
|||||||
|
|
||||||
export default class Todos extends React.PureComponent {
|
export default class Todos extends React.PureComponent {
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
if (!this.props.user.user && !this.props.user.dirty) {
|
const { user, history } = this.props;
|
||||||
this.props.history.replace('/login');
|
if (!user.user && !user.dirty) {
|
||||||
|
history.replace('/login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div id="todos">
|
<div id="todos">
|
||||||
|
|||||||
@@ -14,20 +14,23 @@ import { login, reset, loginJWT } from '../../actions/user';
|
|||||||
|
|
||||||
class LoginForm extends React.PureComponent {
|
class LoginForm extends React.PureComponent {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
const { setJWT } = this.props;
|
||||||
const params = new URLSearchParams(new URL(window.location).search);
|
const params = new URLSearchParams(new URL(window.location).search);
|
||||||
if (params.has('jwt')) {
|
if (params.has('jwt')) {
|
||||||
const jwt = params.get('jwt');
|
const jwt = params.get('jwt');
|
||||||
this.props.setJWT(jwt);
|
setJWT(jwt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
if (this.props.user.user) {
|
const { user, history } = this.props;
|
||||||
this.props.history.push('/');
|
if (user.user) {
|
||||||
|
history.push('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { resetUser, history, handleSubmit, user, onLogin } = this.props;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div id="user-header">
|
<div id="user-header">
|
||||||
@@ -38,16 +41,16 @@ class LoginForm extends React.PureComponent {
|
|||||||
borderRadius: '7px',
|
borderRadius: '7px',
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.props.resetUser();
|
resetUser();
|
||||||
this.props.history.push('/signup');
|
history.push('/signup');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
signup
|
signup
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</div>
|
</div>
|
||||||
<div id="form">
|
<div id="form">
|
||||||
<form onSubmit={this.props.handleSubmit(this.props.onLogin)}>
|
<form onSubmit={handleSubmit(onLogin)}>
|
||||||
<UserErrors user={this.props.user} />
|
<UserErrors user={user} />
|
||||||
<Field
|
<Field
|
||||||
label="username"
|
label="username"
|
||||||
name="username"
|
name="username"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { connect } from 'react-redux';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { ButtonBase } from '@material-ui/core';
|
import { ButtonBase } from '@material-ui/core';
|
||||||
import { setVisibilityFilter } from '../actions/todos';
|
import setVisibilityFilter from '../actions/visibilityFilter';
|
||||||
|
|
||||||
function Link({ active, onClick, children }) {
|
function Link({ active, onClick, children }) {
|
||||||
const classes = ['filter'];
|
const classes = ['filter'];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { VisibilityFilters } from '../actions/todos';
|
import { VisibilityFilters } from '../actions/defs';
|
||||||
|
|
||||||
export default function getVisibleTodos(todos, filter) {
|
export default function getVisibleTodos(todos, filter) {
|
||||||
switch (filter) {
|
switch (filter) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { fetchLists, REQUEST_LISTS, INVALIDATE_LISTS } from '../actions/lists';
|
import { REQUEST_LISTS, INVALIDATE_LISTS } from '../actions/defs';
|
||||||
|
import { fetchLists } from '../actions/lists';
|
||||||
|
|
||||||
export default store => next => action => {
|
export default store => next => action => {
|
||||||
next(action);
|
next(action);
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ import {
|
|||||||
START_EDIT_LIST,
|
START_EDIT_LIST,
|
||||||
STOP_CREATE_LIST,
|
STOP_CREATE_LIST,
|
||||||
STOP_EDIT_LIST,
|
STOP_EDIT_LIST,
|
||||||
} from '../actions/lists';
|
REMOVE_TODO,
|
||||||
import { REMOVE_TODO, ADD_TODO } from '../actions/todos';
|
ADD_TODO,
|
||||||
import { LOGOUT } from '../actions/user';
|
LOGOUT,
|
||||||
|
} from '../actions/defs';
|
||||||
|
|
||||||
export default function lists(
|
export default function lists(
|
||||||
state = {
|
state = {
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import {
|
|||||||
INVALIDATE_TODOS,
|
INVALIDATE_TODOS,
|
||||||
VALIDATE_TODOS,
|
VALIDATE_TODOS,
|
||||||
EDIT_TODO,
|
EDIT_TODO,
|
||||||
} from '../actions/todos';
|
REMOVE_LIST,
|
||||||
import { REMOVE_LIST } from '../actions/lists';
|
LOGOUT,
|
||||||
import { LOGOUT } from '../actions/user';
|
} from '../actions/defs';
|
||||||
|
|
||||||
export default function todos(
|
export default function todos(
|
||||||
state = {
|
state = {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
SIGNUP_SUCCESS,
|
SIGNUP_SUCCESS,
|
||||||
VALIDATE_USER,
|
VALIDATE_USER,
|
||||||
RESET_USER,
|
RESET_USER,
|
||||||
} from '../actions/user';
|
} from '../actions/defs';
|
||||||
|
|
||||||
export default function user(
|
export default function user(
|
||||||
state = {
|
state = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { VisibilityFilters, SET_VISIBILITY_FILTER } from '../actions/todos';
|
import { VisibilityFilters, SET_VISIBILITY_FILTER } from '../actions/defs';
|
||||||
|
|
||||||
const { SHOW_ALL } = VisibilityFilters;
|
const { SHOW_ALL } = VisibilityFilters;
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,72 @@
|
|||||||
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
|
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
|
||||||
// This link also includes instructions on opting out of this behavior.
|
// This link also includes instructions on opting out of this behavior.
|
||||||
|
|
||||||
const isLocalhost = Boolean(window.location.hostname === 'localhost' ||
|
const isLocalhost = Boolean(
|
||||||
|
window.location.hostname === 'localhost' ||
|
||||||
// [::1] is the IPv6 localhost address.
|
// [::1] is the IPv6 localhost address.
|
||||||
window.location.hostname === '[::1]' ||
|
window.location.hostname === '[::1]' ||
|
||||||
// 127.0.0.1/8 is considered localhost for IPv4.
|
// 127.0.0.1/8 is considered localhost for IPv4.
|
||||||
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
window.location.hostname.match(
|
||||||
|
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
function registerValidSW(swUrl) {
|
||||||
|
navigator.serviceWorker
|
||||||
|
.register(swUrl)
|
||||||
|
.then(registration => {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
registration.onupdatefound = () => {
|
||||||
|
const installingWorker = registration.installing;
|
||||||
|
installingWorker.onstatechange = () => {
|
||||||
|
if (installingWorker.state === 'installed') {
|
||||||
|
if (navigator.serviceWorker.controller) {
|
||||||
|
// At this point, the old content will have been purged and
|
||||||
|
// the fresh content will have been added to the cache.
|
||||||
|
// It's the perfect time to display a "New content is
|
||||||
|
// available; please refresh." message in your web app.
|
||||||
|
console.log('New content is available; please refresh.');
|
||||||
|
} else {
|
||||||
|
// At this point, everything has been precached.
|
||||||
|
// It's the perfect time to display a
|
||||||
|
// "Content is cached for offline use." message.
|
||||||
|
console.log('Content is cached for offline use.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error during service worker registration:', error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkValidServiceWorker(swUrl) {
|
||||||
|
// Check if the service worker can be found. If it can't reload the page.
|
||||||
|
fetch(swUrl)
|
||||||
|
.then(response => {
|
||||||
|
// Ensure service worker exists, and that we really are getting a JS file.
|
||||||
|
if (
|
||||||
|
response.status === 404 ||
|
||||||
|
response.headers.get('content-type').indexOf('javascript') === -1
|
||||||
|
) {
|
||||||
|
// No service worker found. Probably a different app. Reload the page.
|
||||||
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
|
registration.unregister().then(() => {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Service worker found. Proceed as normal.
|
||||||
|
registerValidSW(swUrl);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
console.log(
|
||||||
|
'No internet connection found. App is running in offline mode.',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export default function register() {
|
export default function register() {
|
||||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||||
@@ -35,8 +96,10 @@ export default function register() {
|
|||||||
// Add some additional logging to localhost, pointing developers to the
|
// Add some additional logging to localhost, pointing developers to the
|
||||||
// service worker/PWA documentation.
|
// service worker/PWA documentation.
|
||||||
navigator.serviceWorker.ready.then(() => {
|
navigator.serviceWorker.ready.then(() => {
|
||||||
console.log('This web app is being served cache-first by a service ' +
|
console.log(
|
||||||
'worker. To learn more, visit https://goo.gl/SC7cgQ');
|
'This web app is being served cache-first by a service ' +
|
||||||
|
'worker. To learn more, visit https://goo.gl/SC7cgQ',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Is not local host. Just register service worker
|
// Is not local host. Just register service worker
|
||||||
@@ -46,63 +109,9 @@ export default function register() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function registerValidSW(swUrl) {
|
|
||||||
navigator.serviceWorker
|
|
||||||
.register(swUrl)
|
|
||||||
.then((registration) => {
|
|
||||||
registration.onupdatefound = () => {
|
|
||||||
const installingWorker = registration.installing;
|
|
||||||
installingWorker.onstatechange = () => {
|
|
||||||
if (installingWorker.state === 'installed') {
|
|
||||||
if (navigator.serviceWorker.controller) {
|
|
||||||
// At this point, the old content will have been purged and
|
|
||||||
// the fresh content will have been added to the cache.
|
|
||||||
// It's the perfect time to display a "New content is
|
|
||||||
// available; please refresh." message in your web app.
|
|
||||||
console.log('New content is available; please refresh.');
|
|
||||||
} else {
|
|
||||||
// At this point, everything has been precached.
|
|
||||||
// It's the perfect time to display a
|
|
||||||
// "Content is cached for offline use." message.
|
|
||||||
console.log('Content is cached for offline use.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error('Error during service worker registration:', error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkValidServiceWorker(swUrl) {
|
|
||||||
// Check if the service worker can be found. If it can't reload the page.
|
|
||||||
fetch(swUrl)
|
|
||||||
.then((response) => {
|
|
||||||
// Ensure service worker exists, and that we really are getting a JS file.
|
|
||||||
if (
|
|
||||||
response.status === 404 ||
|
|
||||||
response.headers.get('content-type').indexOf('javascript') === -1
|
|
||||||
) {
|
|
||||||
// No service worker found. Probably a different app. Reload the page.
|
|
||||||
navigator.serviceWorker.ready.then((registration) => {
|
|
||||||
registration.unregister().then(() => {
|
|
||||||
window.location.reload();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Service worker found. Proceed as normal.
|
|
||||||
registerValidSW(swUrl);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
console.log('No internet connection found. App is running in offline mode.');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function unregister() {
|
export function unregister() {
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.ready.then((registration) => {
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
registration.unregister();
|
registration.unregister();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user