From 45ce4982285e955388a0cf5148fe4a7266a71d78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 04:23:02 +0000 Subject: [PATCH 01/17] Bump url-parse from 1.5.7 to 1.5.10 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index dffd70e..39d6c22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17373,9 +17373,9 @@ } }, "url-parse": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.7.tgz", - "integrity": "sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "requires": { "querystringify": "^2.1.1", From 79415cb7f8f51c42f6dcd35a67657a349ea51724 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Apr 2022 17:16:51 +0000 Subject: [PATCH 02/17] Bump async from 2.6.3 to 2.6.4 Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index dffd70e..1524ff9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2956,9 +2956,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" From bba6eefd51ab17a33a8331d2d8298eca9488efa0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 22:39:51 +0000 Subject: [PATCH 03/17] Bump eventsource from 1.1.0 to 1.1.1 Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/EventSource/eventsource/releases) - [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md) - [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: eventsource dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index dffd70e..4ac9100 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6571,9 +6571,9 @@ "dev": true }, "eventsource": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", - "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.1.tgz", + "integrity": "sha512-qV5ZC0h7jYIAOhArFJgSfdyz6rALJyb270714o7ZtNnw2WSJ+eexhKtE0O8LYPRsHZHf2osHKZBxGPvm3kPkCA==", "dev": true, "requires": { "original": "^1.0.0" From 1cce76c29ffdde82147360ebbb6c700e11e7db65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Jul 2022 15:08:40 +0000 Subject: [PATCH 04/17] Bump moment from 2.29.1 to 2.29.4 Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index dffd70e..90467f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10969,9 +10969,9 @@ } }, "moment": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", - "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" }, "move-concurrently": { "version": "1.0.1", From f7955292bc24dd49f4b93ed75ccf9dbf0428429d Mon Sep 17 00:00:00 2001 From: Dert1129 Date: Fri, 15 Jul 2022 11:20:33 -0400 Subject: [PATCH 05/17] Implemented NotfoundPage --- package-lock.json | 64 ++++++++++++++++++++++++++++ package.json | 1 + src/App.js | 2 + src/components/Error/NotFoundPage.js | 55 ++++++++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 src/components/Error/NotFoundPage.js diff --git a/package-lock.json b/package-lock.json index dffd70e..88201a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1459,6 +1459,11 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==" }, + "@fortawesome/fontawesome-free": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.0.0.tgz", + "integrity": "sha512-6LB4PYBST1Rx40klypw1SmSDArjFOcfBf2LeX9Zg5EKJT2eXiyiJq+CyBYKeXyK0sXS2FsCJWSPr/luyhuvh0Q==" + }, "@fortawesome/fontawesome-svg-core": { "version": "1.2.25", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.25.tgz", @@ -1467,6 +1472,21 @@ "@fortawesome/fontawesome-common-types": "^0.2.25" } }, + "@fortawesome/free-brands-svg-icons": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.0.0.tgz", + "integrity": "sha512-BIhsy2YeGuk8+KQwpqmyayQDWo1lvGMHsMIE+z5ApPRgV7T+zGhmNzYVoBT4IrJMC6ep5WpGrxoHX+IvNxHnkw==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.3.0" + }, + "dependencies": { + "@fortawesome/fontawesome-common-types": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.3.0.tgz", + "integrity": "sha512-CA3MAZBTxVsF6SkfkHXDerkhcQs0QPofy43eFdbWJJkZiq3SfiaH1msOkac59rQaqto5EqWnASboY1dBuKen5w==" + } + } + }, "@fortawesome/free-regular-svg-icons": { "version": "5.11.2", "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.11.2.tgz", @@ -10195,6 +10215,50 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, + "kpmp-common-components": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/kpmp-common-components/-/kpmp-common-components-1.1.10.tgz", + "integrity": "sha512-aTC7ggrT0SyYS9/ef0hkS/DSuc1w7gcocbFroLk3XLK5YHcm9Gp/OEkkhzIaGVC8r/mg/GTCbs2aD0vFpzFZWw==", + "requires": { + "@fortawesome/fontawesome-free": "6.0.0", + "@fortawesome/fontawesome-svg-core": "1.3.0", + "@fortawesome/free-brands-svg-icons": "6.0.0", + "@fortawesome/free-regular-svg-icons": "6.0.0", + "@fortawesome/free-solid-svg-icons": "6.0.0", + "@fortawesome/react-fontawesome": "0.1.7" + }, + "dependencies": { + "@fortawesome/fontawesome-common-types": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.3.0.tgz", + "integrity": "sha512-CA3MAZBTxVsF6SkfkHXDerkhcQs0QPofy43eFdbWJJkZiq3SfiaH1msOkac59rQaqto5EqWnASboY1dBuKen5w==" + }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.3.0.tgz", + "integrity": "sha512-UIL6crBWhjTNQcONt96ExjUnKt1D68foe3xjEensLDclqQ6YagwCRYVQdrp/hW0ALRp/5Fv/VKw+MqTUWYYvPg==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.3.0" + } + }, + "@fortawesome/free-regular-svg-icons": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.0.0.tgz", + "integrity": "sha512-lYK6oyQL8HwZUAVWGqF7TGuwQBVfphNBVTdvPSD3h4gmQfGazm/xcwg3kmtcRycu3y6QspOC7hPXSoJbVqSYCw==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.3.0" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.0.0.tgz", + "integrity": "sha512-o4FZ1XbndcgeWNb8Wh0y+Hgf73CjmyOQowUSaqQCtgIIdS+XliSBSOwCl330wER+I6CGYE96hT27bHBPmzX2Gg==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.3.0" + } + } + } + }, "last-call-webpack-plugin": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz", diff --git a/package.json b/package.json index e4ccfc8..0340c4f 100755 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "es6-shim": "0.35.6", "history": "4.10.1", "jquery": "3.6.0", + "kpmp-common-components": "1.1.10", "lodash": "4.17.21", "openseadragon": "2.4.1", "prop-types": "15.8.1", diff --git a/src/App.js b/src/App.js index 4821d98..4a08abe 100755 --- a/src/App.js +++ b/src/App.js @@ -14,6 +14,7 @@ import Oops from './components/Error/Oops'; import ErrorBoundaryContainer from './components/Error/ErrorBoundaryContainer'; import PermissionDenied from './components/Error/PermissionDenied'; import NotRegistered from './components/Error/NotRegistered'; +import NotFoundPage from './components/Error/NotFoundPage.js'; const cacheStore = window.sessionStorage.getItem('dpr'); const initialState = cacheStore ? @@ -59,6 +60,7 @@ class App extends Component { + diff --git a/src/components/Error/NotFoundPage.js b/src/components/Error/NotFoundPage.js new file mode 100644 index 0000000..90d457c --- /dev/null +++ b/src/components/Error/NotFoundPage.js @@ -0,0 +1,55 @@ +import React, { Component } from 'react'; +import { Row, Col, Button } from 'reactstrap'; +import { isExpectedPath } from 'kpmp-common-components'; + +export function getBackToHomePath(pathname) { + if(isExpectedPath(pathname, 'explorer')) { + return '/explorer' + } else if(isExpectedPath(pathname, 'repository')) { + return '/repository' + } else { + return '/' + } +} + +export function getPageTitle(pathname) { + if(isExpectedPath(pathname, 'explorer')) { + return 'Explorer' + } else if (isExpectedPath(pathname, 'repository')) { + return 'Repository' + } else { + return 'Kidney Tissue Atlas' + } +} + +class NotFoundPage extends Component { + + render() { + document.title = getPageTitle(window.location.pathname) + return ( +
+ + + Page not found + + +

Sorry. We couldn't find the page you're looking for.

+

+ If you're still having problems, please contact admin@kpmp.org +

+

+ +

+ +
+
+ ); + } +} + +export default NotFoundPage; \ No newline at end of file From 2000b43e07917136a8de45ffd89c50d969e87d3c Mon Sep 17 00:00:00 2001 From: Dert1129 Date: Fri, 15 Jul 2022 11:20:46 -0400 Subject: [PATCH 06/17] Added styling for NotFoundPage --- public/img/404-img.svg | 1 + src/common-values.scss | 4 +++- src/index.scss | 28 +++++++++++++++++++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 public/img/404-img.svg diff --git a/public/img/404-img.svg b/public/img/404-img.svg new file mode 100644 index 0000000..1631ce9 --- /dev/null +++ b/public/img/404-img.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/common-values.scss b/src/common-values.scss index 78e7b4e..b350bb7 100644 --- a/src/common-values.scss +++ b/src/common-values.scss @@ -5,4 +5,6 @@ $standard-padding: 15px; $link-blue: #0275d8; $kpmp-blue: rgba(40, 60, 94, 1); $thumbnail-height: 70px; -$thumbnail-width: 70px; \ No newline at end of file +$thumbnail-width: 70px; +$kpmp-button: #1c7cd5; +$kpmp-gray: #FAFBFC; \ No newline at end of file diff --git a/src/index.scss b/src/index.scss index 3355a58..7c0c13a 100755 --- a/src/index.scss +++ b/src/index.scss @@ -333,7 +333,33 @@ canvas { height: 330px; } } - +#not-found-page { + padding: 20px; + background-color: $kpmp-gray; + + .not-found-image { + max-width: 90%; + margin-top: 30px; + margin-right: 40px; + } + + .not-found-container { + max-width: 60%; + margin: auto; + } + + .not-found-text { + padding-top: 30px; + + .not-found-regular { + font-size: 32px; + } + + .not-found-small { + font-size: 24px; + } + } +} #permissions { margin-top: 60px; } From ac69b81d079af714f831aa17673d3a13782170ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jul 2022 22:01:32 +0000 Subject: [PATCH 07/17] Bump terser from 4.8.0 to 4.8.1 Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88201a0..53ec0c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16758,9 +16758,9 @@ } }, "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", + "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", "dev": true, "requires": { "commander": "^2.20.0", From 78b2d2fbe3783bc52919a2f55530fa6cf5dd9b74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:22:46 +0000 Subject: [PATCH 08/17] Bump decode-uri-component from 0.2.0 to 0.2.2 Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88201a0..a6fdb4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5200,9 +5200,9 @@ "dev": true }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, "deep-equal": { From 899278c7a3ff6be93096812b469a52c04abc6c06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 7 Jan 2023 22:43:22 +0000 Subject: [PATCH 09/17] Bump json5 from 1.0.1 to 1.0.2 Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88201a0..a0499f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2569,9 +2569,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -10149,13 +10149,10 @@ "dev": true }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "jsonfile": { "version": "4.0.0", @@ -10384,9 +10381,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -14278,9 +14275,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -15118,9 +15115,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" From 2216b51edf798c9fb9321f8dc9a144d3d9f59dd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Jan 2023 10:38:02 +0000 Subject: [PATCH 10/17] Bump ua-parser-js from 0.7.31 to 0.7.33 Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33. - [Release notes](https://github.com/faisalman/ua-parser-js/releases) - [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md) - [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33) --- updated-dependencies: - dependency-name: ua-parser-js dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88201a0..b8d5732 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17237,9 +17237,9 @@ "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==" }, "ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==" + "version": "0.7.33", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz", + "integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==" }, "unbox-primitive": { "version": "1.0.1", From 52897b16e0ec82168f6b1f819f759e465d6642f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 09:49:11 +0000 Subject: [PATCH 11/17] Bump minimist from 1.2.5 to 1.2.8 Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8. - [Release notes](https://github.com/minimistjs/minimist/releases) - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88201a0..a3c067e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10917,9 +10917,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "minipass": { From e1c01878a67f8d1c5df0f599cff0edd38a8221ba Mon Sep 17 00:00:00 2001 From: Dert1129 Date: Thu, 20 Apr 2023 14:14:23 -0400 Subject: [PATCH 12/17] appd react-ga4 --- package-lock.json | 5 +++++ package.json | 1 + src/App.js | 5 ++--- src/components/Slides/Menu/Header.js | 8 ++++---- src/components/Summary/ParticipantSelect.js | 6 +++--- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88201a0..e1b66cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14427,6 +14427,11 @@ "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-2.7.0.tgz", "integrity": "sha512-AjC7UOZMvygrWTc2hKxTDvlMXEtbmA0IgJjmkhgmQQ3RkXrWR11xEagLGFGaNyaPnmg24oaIiaNPnEoftUhfXA==" }, + "react-ga4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-2.1.0.tgz", + "integrity": "sha512-ZKS7PGNFqqMd3PJ6+C2Jtz/o1iU9ggiy8Y8nUeksgVuvNISbmrQtJiZNvC/TjDsqD0QlU5Wkgs7i+w9+OjHhhQ==" + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index 0340c4f..9a5b2a6 100755 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "react-burger-menu": "2.6.11", "react-dom": "16.11.0", "react-ga": "2.7.0", + "react-ga4": "^2.1.0", "react-redux": "7.1.3", "react-router-dom": "5.1.2", "reactstrap": "8.1.1", diff --git a/src/App.js b/src/App.js index 4a08abe..d7cfdb1 100755 --- a/src/App.js +++ b/src/App.js @@ -8,7 +8,7 @@ import thunk from 'redux-thunk'; import loadedState from './initialState'; import rootReducer from './reducers'; import { Router, Route, Switch } from 'react-router-dom'; -import ReactGA from 'react-ga'; +import ReactGA from 'react-ga4'; import createHistory from 'history/createBrowserHistory'; import Oops from './components/Error/Oops'; import ErrorBoundaryContainer from './components/Error/ErrorBoundaryContainer'; @@ -28,8 +28,7 @@ const GA_TRACKING_ID = 'UA-124331187-9'; ReactGA.initialize(GA_TRACKING_ID); function logPageView(location, action) { - ReactGA.set({ page: location.pathname + location.search }); - ReactGA.pageview(location.pathname + location.search); + ReactGA.send({hitType: 'pageview', page: location.pathname + location.search}) } const history = createHistory(); history.listen((location, action) => { diff --git a/src/components/Slides/Menu/Header.js b/src/components/Slides/Menu/Header.js index f703b40..50a5ba3 100755 --- a/src/components/Slides/Menu/Header.js +++ b/src/components/Slides/Menu/Header.js @@ -10,7 +10,7 @@ import { faCaretDown } from '@fortawesome/free-solid-svg-icons'; import { Col, Row } from 'reactstrap'; -import ReactGA from 'react-ga'; +import ReactGA from 'react-ga4'; import { getNextSlide, getPreviousSlide, downloadSlide } from '../slideHelpers.js'; import GridProperties from './GridProperties.js'; import PropTypes from 'prop-types'; @@ -44,9 +44,9 @@ class Header extends Component { handleDownload() { ReactGA.event({ - category: 'Slide View', - action: 'Download Slide', - label: this.props.selectedParticipant.selectedSlide.slideName + category: 'DPR', + action: 'Download', + label: this.props.selectedParticipant.id + this.props.selectedParticipant.selectedSlide.slideName }); let downloadFileName = this.props.selectedParticipant.selectedSlide.slideName + ".jpg"; downloadSlide(downloadFileName); diff --git a/src/components/Summary/ParticipantSelect.js b/src/components/Summary/ParticipantSelect.js index 6b937ea..d959aee 100644 --- a/src/components/Summary/ParticipantSelect.js +++ b/src/components/Summary/ParticipantSelect.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { Button } from 'reactstrap'; import ParticipantListDropDown from './ParticipantListDropDown'; -import ReactGA from 'react-ga'; +import ReactGA from 'react-ga4'; import PropTypes from 'prop-types'; class ParticipantSelect extends Component { @@ -13,8 +13,8 @@ class ParticipantSelect extends Component { handleParticipantSelect = (participantId) => { ReactGA.event({ - category: 'Navigation', - action: 'View Slides', + category: 'DPR', + action: 'Navigation', label: participantId }); this.setState({participantId}); From 64da1b5f82797cc14a9c653b50586b2375022e37 Mon Sep 17 00:00:00 2001 From: Dert1129 Date: Fri, 21 Apr 2023 10:46:18 -0400 Subject: [PATCH 13/17] reduced app size and remove carat --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 9a5b2a6..701d377 100755 --- a/package.json +++ b/package.json @@ -26,8 +26,7 @@ "react": "16.11.0", "react-burger-menu": "2.6.11", "react-dom": "16.11.0", - "react-ga": "2.7.0", - "react-ga4": "^2.1.0", + "react-ga4": "2.1.0", "react-redux": "7.1.3", "react-router-dom": "5.1.2", "reactstrap": "8.1.1", From 503d1c30e32a012b5a1d440a7b74077480391317 Mon Sep 17 00:00:00 2001 From: Dert1129 Date: Thu, 11 May 2023 13:28:06 -0400 Subject: [PATCH 14/17] fixed tracking ID --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index d7cfdb1..92510e1 100755 --- a/src/App.js +++ b/src/App.js @@ -24,7 +24,7 @@ const store = applyMiddleware(thunk)(createStore)(rootReducer, initialState, win const saveState = () => { window.sessionStorage.setItem('dpr', JSON.stringify(store.getState())); }; -const GA_TRACKING_ID = 'UA-124331187-9'; +const GA_TRACKING_ID = 'G-D5ZPP3Z2K5'; ReactGA.initialize(GA_TRACKING_ID); function logPageView(location, action) { From 97d03a04ee7cc81837531b04ae622c1b3fa556a6 Mon Sep 17 00:00:00 2001 From: dert1129 Date: Fri, 19 May 2023 11:59:43 -0400 Subject: [PATCH 15/17] set pageview --- package-lock.json | 5 ----- src/App.js | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e1b66cf..b277782 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14422,11 +14422,6 @@ "integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==", "dev": true }, - "react-ga": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-2.7.0.tgz", - "integrity": "sha512-AjC7UOZMvygrWTc2hKxTDvlMXEtbmA0IgJjmkhgmQQ3RkXrWR11xEagLGFGaNyaPnmg24oaIiaNPnEoftUhfXA==" - }, "react-ga4": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-2.1.0.tgz", diff --git a/src/App.js b/src/App.js index 92510e1..dde9677 100755 --- a/src/App.js +++ b/src/App.js @@ -28,6 +28,7 @@ const GA_TRACKING_ID = 'G-D5ZPP3Z2K5'; ReactGA.initialize(GA_TRACKING_ID); function logPageView(location, action) { + ReactGA.set({page: location.pathname + location.search}); ReactGA.send({hitType: 'pageview', page: location.pathname + location.search}) } const history = createHistory(); From 18c8bac2494f4861a7c0db1412fd9b51d0655d62 Mon Sep 17 00:00:00 2001 From: dert1129 Date: Fri, 19 May 2023 14:47:54 -0400 Subject: [PATCH 16/17] Add testMode option --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index dde9677..4868a78 100755 --- a/src/App.js +++ b/src/App.js @@ -26,7 +26,7 @@ const saveState = () => { }; const GA_TRACKING_ID = 'G-D5ZPP3Z2K5'; -ReactGA.initialize(GA_TRACKING_ID); +ReactGA.initialize(GA_TRACKING_ID, { testMode: process.env.NODE_ENV === 'test'}); function logPageView(location, action) { ReactGA.set({page: location.pathname + location.search}); ReactGA.send({hitType: 'pageview', page: location.pathname + location.search}) From 1bc61299813a7c8bd2c7acb21fe1f9943b891518 Mon Sep 17 00:00:00 2001 From: dert1129 Date: Fri, 19 May 2023 15:18:58 -0400 Subject: [PATCH 17/17] implement GA helper --- src/App.js | 6 +++--- src/components/Slides/Menu/Header.js | 12 ++++++------ src/helpers/googleAnalyticsHelper.js | 9 +++++++++ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 src/helpers/googleAnalyticsHelper.js diff --git a/src/App.js b/src/App.js index 4868a78..212e481 100755 --- a/src/App.js +++ b/src/App.js @@ -26,10 +26,10 @@ const saveState = () => { }; const GA_TRACKING_ID = 'G-D5ZPP3Z2K5'; -ReactGA.initialize(GA_TRACKING_ID, { testMode: process.env.NODE_ENV === 'test'}); +ReactGA.initialize(GA_TRACKING_ID,{ testMode: process.env.NODE_ENV === 'test' ? true : false }); function logPageView(location, action) { - ReactGA.set({page: location.pathname + location.search}); - ReactGA.send({hitType: 'pageview', page: location.pathname + location.search}) + ReactGA.set({ page: location.pathname + location.search }); + ReactGA.send({ hitType: "pageview", page: location.pathname + location.search }); } const history = createHistory(); history.listen((location, action) => { diff --git a/src/components/Slides/Menu/Header.js b/src/components/Slides/Menu/Header.js index 50a5ba3..8830336 100755 --- a/src/components/Slides/Menu/Header.js +++ b/src/components/Slides/Menu/Header.js @@ -10,10 +10,10 @@ import { faCaretDown } from '@fortawesome/free-solid-svg-icons'; import { Col, Row } from 'reactstrap'; -import ReactGA from 'react-ga4'; import { getNextSlide, getPreviousSlide, downloadSlide } from '../slideHelpers.js'; import GridProperties from './GridProperties.js'; import PropTypes from 'prop-types'; +import { handleGoogleAnalyticsEvent } from '../../../helpers/googleAnalyticsHelper.js'; class Header extends Component { constructor(props) { @@ -43,11 +43,11 @@ class Header extends Component { } handleDownload() { - ReactGA.event({ - category: 'DPR', - action: 'Download', - label: this.props.selectedParticipant.id + this.props.selectedParticipant.selectedSlide.slideName - }); + + handleGoogleAnalyticsEvent('DPR', 'Download', + this.props.selectedParticipant.id + + this.props.selectedParticipant.selectedSlide.slideName); + let downloadFileName = this.props.selectedParticipant.selectedSlide.slideName + ".jpg"; downloadSlide(downloadFileName); } diff --git a/src/helpers/googleAnalyticsHelper.js b/src/helpers/googleAnalyticsHelper.js new file mode 100644 index 0000000..7e73743 --- /dev/null +++ b/src/helpers/googleAnalyticsHelper.js @@ -0,0 +1,9 @@ +import { default as ReactGA4 } from 'react-ga4'; + +export const handleGoogleAnalyticsEvent = (category, action, label) => { + ReactGA4.event({ + category: category, + action: action, + label: label + }); +} \ No newline at end of file