diff --git a/package-lock.json b/package-lock.json index 6cd7291..75910bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,17 +14,17 @@ } }, "@babel/core": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", - "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.2.tgz", + "integrity": "sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ==", "dev": true, "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.0", - "@babel/helpers": "^7.6.0", - "@babel/parser": "^7.6.0", + "@babel/generator": "^7.6.2", + "@babel/helpers": "^7.6.2", + "@babel/parser": "^7.6.2", "@babel/template": "^7.6.0", - "@babel/traverse": "^7.6.0", + "@babel/traverse": "^7.6.2", "@babel/types": "^7.6.0", "convert-source-map": "^1.1.0", "debug": "^4.1.0", @@ -1595,6 +1595,14 @@ "react-sizeme": "^2.5.2", "redux": "^4.0.1", "util-deprecate": "^1.0.2" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + } } }, "@storybook/addon-actions": { @@ -1617,6 +1625,14 @@ "react": "^16.8.3", "react-inspector": "^3.0.2", "uuid": "^3.3.2" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + } } }, "@storybook/addon-knobs": { @@ -1643,6 +1659,11 @@ "react-select": "^3.0.0" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + }, "react-select": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/react-select/-/react-select-3.0.5.tgz", @@ -1676,6 +1697,14 @@ "global": "^4.3.2", "prop-types": "^15.7.2", "qs": "^6.6.0" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + } } }, "@storybook/addon-viewport": { @@ -1695,6 +1724,14 @@ "memoizerific": "^1.11.3", "prop-types": "^15.7.2", "util-deprecate": "^1.0.2" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + } } }, "@storybook/addons": { @@ -1709,6 +1746,13 @@ "core-js": "^3.0.1", "global": "^4.3.2", "util-deprecate": "^1.0.2" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/api": { @@ -1735,6 +1779,11 @@ "util-deprecate": "^1.0.2" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1752,6 +1801,13 @@ "core-js": "^3.0.1", "global": "^4.3.2", "telejson": "^2.2.2" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/channels": { @@ -1760,6 +1816,13 @@ "integrity": "sha512-AsF/Hwx91SDOgiOGOBSWS8EJAgqVm939n2nkfdLSJQQmX5EdPRAc3EIE3f13tyQub2yNx0OR4UzQDWgjwfVsEQ==", "requires": { "core-js": "^3.0.1" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/client-api": { @@ -1784,6 +1847,11 @@ "util-deprecate": "^1.0.2" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + }, "is-plain-object": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", @@ -1805,6 +1873,13 @@ "integrity": "sha512-wzxSE9t3DaLCdd/gnGFnjevmYRZ92F3TEwhUP/QDXM9cZkNsRKHkjE61qjiO5aQPaZQG6Ea9ayWEQEMgZXDucg==", "requires": { "core-js": "^3.0.1" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/components": { @@ -1830,6 +1905,13 @@ "react-syntax-highlighter": "^8.0.1", "react-textarea-autosize": "^7.1.0", "simplebar-react": "^1.0.0-alpha.6" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/core": { @@ -1908,6 +1990,12 @@ "webpack-hot-middleware": "^2.25.0" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1922,6 +2010,13 @@ "integrity": "sha512-AIYV/I+baQ0KxvEM7QAKqUedLn2os0XU9HTdtfZJTC3U9wjmR2ah2ScD6T0n7PBz3MderkvZG6dNjs9h8gRquQ==", "requires": { "core-js": "^3.0.1" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/node-logger": { @@ -1935,6 +2030,14 @@ "npmlog": "^4.1.2", "pretty-hrtime": "^1.0.3", "regenerator-runtime": "^0.12.1" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + } } }, "@storybook/react": { @@ -1966,6 +2069,12 @@ "webpack": "^4.33.0" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1986,6 +2095,13 @@ "lodash": "^4.17.11", "memoizerific": "^1.11.3", "qs": "^6.6.0" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/theming": { @@ -2005,6 +2121,13 @@ "polished": "^3.3.1", "prop-types": "^15.7.2", "resolve-from": "^5.0.0" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "@storybook/ui": { @@ -2050,6 +2173,12 @@ "util-deprecate": "^1.0.2" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + }, "regenerator-runtime": { "version": "0.13.3", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", @@ -3596,6 +3725,51 @@ "babel-plugin-dynamic-import-node": "2.3.0", "babel-plugin-macros": "2.6.1", "babel-plugin-transform-react-remove-prop-types": "0.4.24" + }, + "dependencies": { + "@babel/core": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", + "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.0", + "@babel/helpers": "^7.6.0", + "@babel/parser": "^7.6.0", + "@babel/template": "^7.6.0", + "@babel/traverse": "^7.6.0", + "@babel/types": "^7.6.0", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, "babel-runtime": { @@ -4673,11 +4847,6 @@ "toggle-selection": "^1.0.6" } }, - "core-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", - "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" - }, "core-js-compat": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.2.1.tgz", @@ -6886,25 +7055,29 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true, "optional": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, "optional": true, "requires": { @@ -6914,13 +7087,15 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": false, + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "optional": true, "requires": { @@ -6930,37 +7105,43 @@ }, "chownr": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "optional": true, "requires": { @@ -6969,25 +7150,29 @@ }, "deep-extend": { "version": "0.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -6996,13 +7181,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -7018,7 +7205,8 @@ }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "optional": true, "requires": { @@ -7032,13 +7220,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "bundled": true, + "resolved": false, + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "optional": true, "requires": { @@ -7047,7 +7237,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -7056,7 +7247,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -7066,19 +7258,22 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true, "optional": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "optional": true, "requires": { @@ -7087,13 +7282,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "optional": true, "requires": { @@ -7102,13 +7299,15 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true, "optional": true }, "minipass": { "version": "2.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, "optional": true, "requires": { @@ -7118,7 +7317,8 @@ }, "minizlib": { "version": "1.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "dev": true, "optional": true, "requires": { @@ -7127,7 +7327,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "optional": true, "requires": { @@ -7136,13 +7337,15 @@ }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, "optional": true }, "needle": { "version": "2.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "dev": true, "optional": true, "requires": { @@ -7153,7 +7356,8 @@ }, "node-pre-gyp": { "version": "0.12.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "dev": true, "optional": true, "requires": { @@ -7171,7 +7375,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -7181,13 +7386,15 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, "requires": { @@ -7197,7 +7404,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -7209,19 +7417,22 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "optional": true, "requires": { @@ -7230,19 +7441,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -7252,19 +7466,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "optional": true, "requires": { @@ -7276,7 +7493,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -7284,7 +7502,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -7299,7 +7518,8 @@ }, "rimraf": { "version": "2.6.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "optional": true, "requires": { @@ -7308,43 +7528,50 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.7.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "optional": true, "requires": { @@ -7355,7 +7582,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -7364,7 +7592,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "optional": true, "requires": { @@ -7373,13 +7602,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, "optional": true, "requires": { @@ -7394,13 +7625,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "optional": true, "requires": { @@ -7409,13 +7642,15 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true, "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true, "optional": true } @@ -9550,6 +9785,12 @@ "dotenv-expand": "^5.1.0" }, "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", + "dev": true + }, "dotenv": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.1.0.tgz", @@ -13514,6 +13755,13 @@ "lodash.memoize": "^4.1.2", "lodash.throttle": "^4.1.1", "resize-observer-polyfill": "^1.5.1" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + } } }, "simplebar-react": { diff --git a/package.json b/package.json index 033f140..8a9dd59 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "videocontext": "^0.53.0" }, "devDependencies": { - "@babel/core": "^7.6.0", "@babel/plugin-proposal-class-properties": "^7.5.5", "@babel/plugin-proposal-object-rest-spread": "^7.5.5", "@babel/preset-env": "^7.6.0", diff --git a/packages/components/Breadcrumb/index.js b/packages/components/Breadcrumb/index.js index 3b538a7..944e115 100644 --- a/packages/components/Breadcrumb/index.js +++ b/packages/components/Breadcrumb/index.js @@ -35,11 +35,15 @@ CustomBreadcrumb.propTypes = { }; CustomBreadcrumb.defaultProps = { - items: [ { - name: 'Projects', - link: '/projects', - }, { - name: 'Sample Project Name' - } ] }; + items: [ + { + name: 'Projects', + link: '/projects', + }, + { + name: 'Sample Project Name' + } + ] +}; export default CustomBreadcrumb; diff --git a/packages/components/Breadcrumb/stories/index.stories.js b/packages/components/Breadcrumb/stories/index.stories.js index 449ecab..5cadff7 100644 --- a/packages/components/Breadcrumb/stories/index.stories.js +++ b/packages/components/Breadcrumb/stories/index.stories.js @@ -4,23 +4,31 @@ import StoryRouter from 'storybook-react-router'; import Breadcrumb from '../index.js'; export const breadcrumbItems = { - projects: [ { - name: 'Projects', - link: '/projects', - }, { - name: 'Example project name' - } ], - paperEdits: [ { - name: 'Projects', - link: '/projects' - }, { - name: 'Project: The Sample', - link: '/projects/the-sample' - }, { - name: 'PaperEdits', - }, { - name: 'Example programme title' - } ] + projects: [ + { + name: 'Projects', + link: '/projects', + }, + { + name: 'Example project name' + } + ], + paperEdits: [ + { + name: 'Projects', + link: '/projects' + }, + { + name: 'Project: The Sample', + link: '/projects/the-sample' + }, + { + name: 'PaperEdits', + }, + { + name: 'Example programme title' + } + ] }; storiesOf('Breadcrumb', module) diff --git a/packages/components/FormModal/index.js b/packages/components/FormModal/index.js index 2dd4f91..ac81d7b 100644 --- a/packages/components/FormModal/index.js +++ b/packages/components/FormModal/index.js @@ -1,5 +1,4 @@ import React, { useState } from 'react'; -import { withKnobs, text, boolean, number } from '@storybook/addon-knobs'; import PropTypes from 'prop-types'; import Modal from 'react-bootstrap/Modal'; import ItemForm from '../ItemForm/index.js'; @@ -8,8 +7,9 @@ import TranscriptForm from '../TranscriptForm/index.js'; const ItemFormModal = (props) => { const [ showModal, toggleShowModal ] = useState(props.showModal); + const type = props.type.toLowerCase(); - const form = (props.type === 'transcript') ? : ; + const form = (type === 'transcript') ? : ; return ( toggleShowModal(!showModal) }> @@ -24,21 +24,21 @@ const ItemFormModal = (props) => { }; ItemFormModal.propTypes = { - id: PropTypes.number.isRequired, - title: PropTypes.string, description: PropTypes.string, - showModal: PropTypes.bool.isRequired, - modalTitle: PropTypes.string.isRequired, handleSaveForm: PropTypes.func.isRequired, + id: PropTypes.number.isRequired, + showModal: PropTypes.bool, + modalTitle: PropTypes.string.isRequired, + showModal: PropTypes.bool.isRequired, + title: PropTypes.string, + type: PropTypes.any }; ItemFormModal.defaultProps = { - handleSaveForm: () => { - console.log('Handling a project save'); - }, id: 1, - isNewItemModalShow: false, + showModal: false, modalTitle: 'New Project', + type: 'Project' }; export default ItemFormModal; diff --git a/packages/components/FormModal/stories/index.stories.js b/packages/components/FormModal/stories/index.stories.js index 746eb04..c6a11b8 100644 --- a/packages/components/FormModal/stories/index.stories.js +++ b/packages/components/FormModal/stories/index.stories.js @@ -4,28 +4,33 @@ import { actions } from '@storybook/addon-actions'; import StoryRouter from 'storybook-react-router'; import FormModal from '../index.js'; -const modalItems = [ { - id: 1, - itemType: 'project', - showModal: true, - title: 'Example Project Title', - description: 'This is a sample card description. This is fun!', - url: '/projects/1/transcripts/1234', - modalTitle: 'Edit Project', -}, { - showModal: true, - modalTitle: 'New Project', - id: 2 -}, { - projectId: 123, - title: '', - description: '', - uploadCompleted: true, - showModal: true, - modalTitle: 'New Transcript', - id: 3, - type: 'transcript' -} ]; +const modalItems = [ + { + id: 1, + type: 'Project', + showModal: true, + title: 'Example Project Title', + description: 'This is a sample card description. This is fun!', + url: '/projects/1/transcripts/1234', + modalTitle: 'Edit Project', + }, + { + showModal: true, + modalTitle: 'New Project', + id: 2, + type: 'Project' + }, + { + projectId: 123, + title: '', + description: '', + uploadCompleted: true, + showModal: true, + modalTitle: 'New Transcript', + id: 3, + type: 'Transcript' + } +]; const modalActions = actions({ handleSaveForm: 'Form saved' }); diff --git a/packages/components/ItemForm/stories/index.stories.js b/packages/components/ItemForm/stories/index.stories.js index 4230bd0..3de2d08 100644 --- a/packages/components/ItemForm/stories/index.stories.js +++ b/packages/components/ItemForm/stories/index.stories.js @@ -6,7 +6,7 @@ import { actions } from '@storybook/addon-actions'; const modalItems = [ { id: 1, - itemType: 'project', + type: 'project', showModal: true, title: 'Example Project Title', description: 'This is a sample card description. This is fun!', diff --git a/packages/components/List/index.js b/packages/components/List/index.js index 4e3a2d7..be7715d 100644 --- a/packages/components/List/index.js +++ b/packages/components/List/index.js @@ -1,50 +1,30 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import SimpleCard from '../SimpleCard'; -import SearchBar from './SearchBar'; import TranscriptCard from '../TranscriptCard'; const List = (props) => { const [ items, setItems ] = useState(props.items); - const includesText = (text, subsetText) => { - return text.toLowerCase().includes(subsetText.toLowerCase().trim()); - }; - - const handleDeleteItem = (itemId) => { - const updatedList = items.filter((item) => { - return item.id !== itemId; - }); - props.handleDelete(itemId); - setItems(updatedList); - }; - - const handleDisplay = (item, searchText) => { - if ( - includesText(item.title, searchText) || - includesText(item.description, searchText) - ) { - item.display = true; - } else { - item.display = false; + useEffect(() => { + if (items.length === 0) { + setItems(props.items); } - return item; - }; + return () => { - const handleSearchItem = searchText => { - const results = items.filter(item => handleDisplay(item, searchText)); - setItems(results); - }; + }; + }, [ props.items ]); const listItems = items.map((item) => { if (item.display && item.status) { return ( ); } @@ -52,19 +32,17 @@ const List = (props) => { return ( );} return null; - }).filter(item => { - return item !== null; }); return (
- {items !== null && items.length !== 0 ? : null} {listItems}
); @@ -72,27 +50,8 @@ const List = (props) => { List.propTypes = { items: PropTypes.array.isRequired, - handleEdit: PropTypes.func.isRequired, - handleDelete: PropTypes.func.isRequired, -}; - -List.defaultProps = { - items: [ - { - id: '1234', - key: 'abc123', - title: 'Sample Simple Card Title One', - description: 'This is a sample card description. This is fun!', - display: true, - url: '/projects/1/transcripts/5678' - } - ], - handleEdit: () => { - console.log('Edit button clicked'); - }, - handleDelete: () => { - console.log('Delete button clicked'); - }, + handleEditItem: PropTypes.func.isRequired, + handleDeleteItem: PropTypes.func.isRequired, }; export default List; diff --git a/packages/components/List/stories/index.stories.js b/packages/components/List/stories/index.stories.js index a15bd00..c66d8d7 100644 --- a/packages/components/List/stories/index.stories.js +++ b/packages/components/List/stories/index.stories.js @@ -4,15 +4,12 @@ import { storiesOf } from '@storybook/react'; import { actions } from '@storybook/addon-actions'; import StoryRouter from 'storybook-react-router'; import List from '../index.js'; -import SearchBar from '../SearchBar'; const cardActions = actions({ - handleEdit: 'Edit button clicked', - handleDelete: 'Delete button clicked' + handleEditItem: 'Edit button clicked', + handleDeleteItem: 'Delete button clicked' }); -const searchActions = actions({ handleSearch: 'Handle search' }); - const items = [ { id: '1234', key: 'abc123', @@ -67,9 +64,8 @@ storiesOf('List', module)
); @@ -78,21 +74,8 @@ storiesOf('List', module)
- ); - -storiesOf('List/Search Bar', module) - .addDecorator(StoryRouter()) - .add('Default', () => { - return ( -
- -
- ); - }); + ); \ No newline at end of file diff --git a/packages/components/PageView/index.js b/packages/components/PageView/index.js index d8716e9..96933b2 100644 --- a/packages/components/PageView/index.js +++ b/packages/components/PageView/index.js @@ -1,16 +1,124 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect, useReducer } from 'react'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import Button from 'react-bootstrap/Button'; import PropTypes from 'prop-types'; -import { includesText } from '../../utils'; +import { anyInText } from '../../utils'; import List from '../List'; +import Breadcrumb from '../Breadcrumb'; +import SearchBar from '../SearchBar'; +import FormModal from '../FormModal'; + +const initialFormState = { + title: '', + description: '', + id: null +}; + +const formReducer = (state = initialFormState, { type, payload }) => { + switch (type) { + case 'update': + return { ...state, ...payload }; + case 'reset': { + return { initialFormState }; + } + default: + return state; + } +}; const PageView = (props) => { const [ items, setItems ] = useState(); + const [ showModal, setShowModal ] = useState(false); + const [ formData, dispatchForm ] = useReducer(formReducer, initialFormState); + + const Api = props.Api; + console.log('page', items); + // The form works both for new/create and edit/update + const handleSaveItem = async (item) => { + if (!item.id) { + + const response = await Api.createProject(item); + + if (response.status === 'ok') { + // Server returns project with UID generated server side + // need to add display true attribute for search to the new project + const newProject = response.project; + newProject.display = true; + + setShowModal(false); + dispatchForm({ type: 'reset' }); + } + } + else { + const response = await Api.updateProject(item.id, item); + if (response.status === 'ok') { + const project = response.project; + // need to add display true attribute for search to the new project + project.display = true; + // // Server returns project with UID generated server side + const index = items.findIndex(element => element.id === project.id); + + const projects = items; + projects[index] = project; + setItems(projects); + setShowModal(false); + dispatchForm({ type: 'reset' }); + } + } + }; + + const findItemById = (list, id) => { + const result = list.filter((p) => { + return p.id === id; + }); + + return result[0]; + }; + + const handleEditItem = (id) => { + const item = findItemById(items, id); + dispatchForm({ + type: 'update', + payload: item + }); + setShowModal(true); + }; + + const handleDeleteItem = async (id) => { + const result = await Api.deleteProject(id); + if (result.ok) { + const newItemsList = items.filter((p) => { + return p.id !== id; + }); + setItems(newItemsList); + } else { + // TODO: some error handling, error message saying something went wrong + } + }; + + const handleDisplay = (item, text) => { + if (anyInText([ item.title, item.description ], text)) { + item.display = true; + } else { + item.display = false; + } + + return item; + }; + + const handleSearch = text => { + const results = items.filter(item => handleDisplay(item, text)); + setItems(results); + }; + + const handleShowModal = () => { + setShowModal(!showModal); + }; + useEffect(() => { if (!items) { setItems(props.items); @@ -20,52 +128,50 @@ const PageView = (props) => { return () => { }; - }, [ items, props.items ]); - - const handleSearch = searchText => { - const results = items.filter(project => { - if ( - includesText(project.title, searchText) || - includesText(project.description, searchText) - ) { - project.display = true; - - return project; - } else { - project.display = false; - - return project; - } - }); - props.handleUpdateList(results); - }; + }, [ props.items ]); let searchEl; let showItems; + const breadcrumbItems = [ + { + name: `${ props.model }s`, + link: `/${ props.model }s` + } + ]; + if (items && items.length !== 0) { + searchEl = ; showItems = ( props.handleEdit } - handleDelete={ () => props.handleDelete } - handleSearch={ handleSearch } + handleEditItem={ () => handleEditItem } + handleDeleteItem={ () => handleDeleteItem } /> ); + } else { showItems = (There are no {props.model}s, create a new one to get started.); } + if (props.model === 'Project') { + + } else if (props.model === 'Transcript') { + + } + return ( <> + + + {searchEl} - -