From 66651135fae11225231934bf2099ca976763d525 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Mon, 13 Dec 2021 17:01:40 +0100 Subject: [PATCH] - moment.js for date transformations - npm updates - search detail page --- package-lock.json | 330 +++++++++--------- package.json | 1 + src/models/dataset.ts | 120 +++++-- src/notes.txt | 6 +- src/router/index.ts | 3 +- src/services/dataset.service.ts | 17 +- .../dataset-detail.component.ts | 11 +- .../dataset-detail.component.vue | 121 ++++++- 8 files changed, 414 insertions(+), 195 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5dec2ac..86104cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "axios": "^0.24.0", "class-transformer": "^0.5.1", "core-js": "^3.6.5", + "moment": "^2.29.1", "qs": "^6.10.1", "rxjs": "^6.6.0", "vue": "^3.0.0", @@ -3077,12 +3078,12 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.24.tgz", - "integrity": "sha512-A0SxB2HAggKzP57LDin5gfgWOTwFyGCtQ5MTMNBADnfQYALWnYuC8kMI0DhRSplGTWRvn9Z2DAnG8f35BnojuA==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.26.tgz", + "integrity": "sha512-N5XNBobZbaASdzY9Lga2D9Lul5vdCIOXvUMd6ThcN8zgqQhPKfCV+wfAJNNJKQkSHudnYRO2gEB+lp0iN3g2Tw==", "dependencies": { - "@babel/parser": "^7.15.0", - "@vue/shared": "3.2.24", + "@babel/parser": "^7.16.4", + "@vue/shared": "3.2.26", "estree-walker": "^2.0.2", "source-map": "^0.6.1" } @@ -3096,25 +3097,25 @@ } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.24.tgz", - "integrity": "sha512-KQEm8r0JFsrNNIfbD28pcwMvHpcJcwjVR1XWFcD0yyQ8eREd7IXhT7J6j7iNCSE/TIo78NOvkwbyX+lnIm836w==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.26.tgz", + "integrity": "sha512-smBfaOW6mQDxcT3p9TKT6mE22vjxjJL50GFVJiI0chXYGU/xzC05QRGrW3HHVuJrmLTLx5zBhsZ2dIATERbarg==", "dependencies": { - "@vue/compiler-core": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-core": "3.2.26", + "@vue/shared": "3.2.26" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.24.tgz", - "integrity": "sha512-YGPcIvVJp2qTPkuT6kT43Eo1xjstyY4bmuiSV31my4bQMBFVR26ANmifUSt759Blok71gK0WzfIZHbcOKYOeKA==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.26.tgz", + "integrity": "sha512-ePpnfktV90UcLdsDQUh2JdiTuhV0Skv2iYXxfNMOK/F3Q+2BO0AulcVcfoksOpTJGmhhfosWfMyEaEf0UaWpIw==", "dependencies": { - "@babel/parser": "^7.15.0", - "@vue/compiler-core": "3.2.24", - "@vue/compiler-dom": "3.2.24", - "@vue/compiler-ssr": "3.2.24", - "@vue/ref-transform": "3.2.24", - "@vue/shared": "3.2.24", + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.26", + "@vue/compiler-dom": "3.2.26", + "@vue/compiler-ssr": "3.2.26", + "@vue/reactivity-transform": "3.2.26", + "@vue/shared": "3.2.26", "estree-walker": "^2.0.2", "magic-string": "^0.25.7", "postcss": "^8.1.10", @@ -3127,9 +3128,9 @@ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/@vue/compiler-sfc/node_modules/postcss": { - "version": "8.4.4", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.4.tgz", - "integrity": "sha512-joU6fBsN6EIer28Lj6GDFoC/5yOZzLCfn0zHAn/MYXI7aPt4m4hK5KC5ovEZXy+lnCjmYIbQWngvju2ddyEr8Q==", + "version": "8.4.5", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", + "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==", "dependencies": { "nanoid": "^3.1.30", "picocolors": "^1.0.0", @@ -3152,12 +3153,12 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.24.tgz", - "integrity": "sha512-E1HHShNsGVWXxs68LDOUuI+Bzak9W/Ier/366aKDBFuwvfwgruwq6abhMfj6pSDZpwZ/PXnfliyl/m7qBSq6gw==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.26.tgz", + "integrity": "sha512-2mywLX0ODc4Zn8qBoA2PDCsLEZfpUGZcyoFRLSOjyGGK6wDy2/5kyDOWtf0S0UvtoyVq95OTSGIALjZ4k2q/ag==", "dependencies": { - "@vue/compiler-dom": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-dom": "3.2.26", + "@vue/shared": "3.2.26" } }, "node_modules/@vue/component-compiler-utils": { @@ -3318,60 +3319,60 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.24.tgz", - "integrity": "sha512-5eVsO9wfQ5erCMSRBjpqLkkI+LglJS7E0oLZJs2gsChpvOjH2Uwt3Hk1nVv0ywStnWg71Ykn3SyQwtnl7PknOQ==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.26.tgz", + "integrity": "sha512-h38bxCZLW6oFJVDlCcAiUKFnXI8xP8d+eO0pcDxx+7dQfSPje2AO6M9S9QO6MrxQB7fGP0DH0dYQ8ksf6hrXKQ==", "dependencies": { - "@vue/shared": "3.2.24" + "@vue/shared": "3.2.26" } }, - "node_modules/@vue/ref-transform": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.24.tgz", - "integrity": "sha512-j6oNbsGLvea2rF8GQB9w6q7UFL1So7J+t6ducaMeWPSyjYZ+slWpwPVK6mmyghg5oGqC41R+HC5BV036Y0KhXQ==", + "node_modules/@vue/reactivity-transform": { + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.26.tgz", + "integrity": "sha512-XKMyuCmzNA7nvFlYhdKwD78rcnmPb7q46uoR00zkX6yZrUmcCQ5OikiwUEVbvNhL5hBJuvbSO95jB5zkUon+eQ==", "dependencies": { - "@babel/parser": "^7.15.0", - "@vue/compiler-core": "3.2.24", - "@vue/shared": "3.2.24", + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.26", + "@vue/shared": "3.2.26", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.24.tgz", - "integrity": "sha512-ReI06vGgYuW0G8FlOcAOzMklVDJSxKuRhYzT8j+a8BTfs1945kxo1Th28BPvasyYx8J+LMeZ0HqpPH9yGXvWvg==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.26.tgz", + "integrity": "sha512-BcYi7qZ9Nn+CJDJrHQ6Zsmxei2hDW0L6AB4vPvUQGBm2fZyC0GXd/4nVbyA2ubmuhctD5RbYY8L+5GUJszv9mQ==", "dependencies": { - "@vue/reactivity": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/reactivity": "3.2.26", + "@vue/shared": "3.2.26" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.24.tgz", - "integrity": "sha512-piqsabtIEUKkMGSJlOyKUonZEDtdwOpR6teQ8EKbH8PX9sxfAt9snLnFJldUhhyYrLIyDtnjwajfJ7/XtpD4JA==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.26.tgz", + "integrity": "sha512-dY56UIiZI+gjc4e8JQBwAifljyexfVCkIAu/WX8snh8vSOt/gMSEGwPRcl2UpYpBYeyExV8WCbgvwWRNt9cHhQ==", "dependencies": { - "@vue/runtime-core": "3.2.24", - "@vue/shared": "3.2.24", + "@vue/runtime-core": "3.2.26", + "@vue/shared": "3.2.26", "csstype": "^2.6.8" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.24.tgz", - "integrity": "sha512-DqiCRDxTbv67Hw5ImiqnLIQbPGtIwWLLfEcVHoEnu1f21EMTB6LfoS69EQddd8VyfN5kfX3Fmz27/hrFPpRaMQ==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.26.tgz", + "integrity": "sha512-Jp5SggDUvvUYSBIvYEhy76t4nr1vapY/FIFloWmQzn7UxqaHrrBpbxrqPcTrSgGrcaglj0VBp22BKJNre4aA1w==", "dependencies": { - "@vue/compiler-ssr": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-ssr": "3.2.26", + "@vue/shared": "3.2.26" }, "peerDependencies": { - "vue": "3.2.24" + "vue": "3.2.26" } }, "node_modules/@vue/shared": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.24.tgz", - "integrity": "sha512-BUgRiZCkCrqDps5aQ9av05xcge3rn092ztKIh17tHkeEFgP4zfXMQWBA2zfdoCdCEdBL26xtOv+FZYiOp9RUDA==" + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.26.tgz", + "integrity": "sha512-vPV6Cq+NIWbH5pZu+V+2QHE9y1qfuTq49uNWw4f7FDEeZaDU2H2cx5jcUZOAKW7qTrUS4k6qZPbMy1x4N96nbA==" }, "node_modules/@vue/web-component-wrapper": { "version": "1.3.0", @@ -6632,9 +6633,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.15.tgz", - "integrity": "sha512-WDw2IUL3k4QpbzInV3JZK+Zd1NjWJPDZ28oUSchWb/kf6AVj7/niaAlgcJlvojFa1d7pJSyQ/KSZsEtq5W7aGQ==", + "version": "1.4.16", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.16.tgz", + "integrity": "sha512-BQb7FgYwnu6haWLU63/CdVW+9xhmHls3RCQUFiV4lvw3wimEHTVcUk2hkuZo76QhR8nnDdfZE7evJIZqijwPdA==", "dev": true }, "node_modules/elliptic": { @@ -9597,9 +9598,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -9790,12 +9791,12 @@ "dev": true }, "node_modules/is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10695,6 +10696,14 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", + "engines": { + "node": "*" + } + }, "node_modules/move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -13257,13 +13266,14 @@ "dev": true }, "node_modules/sass": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.44.0.tgz", - "integrity": "sha512-0hLREbHFXGQqls/K8X+koeP+ogFRPF4ZqetVB19b7Cst9Er8cOR0rc6RU7MaI4W1JmUShd1BPgPoeqmmgMMYFw==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.45.0.tgz", + "integrity": "sha512-ONy5bjppoohtNkFJRqdz1gscXamMzN3wQy1YH9qO2FiNpgjLhpz/IPRGg0PpCjyz/pWfCOaNEaiEGCcjOFAjqw==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0" + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { "sass": "sass.js" @@ -15636,15 +15646,15 @@ "dev": true }, "node_modules/vue": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.24.tgz", - "integrity": "sha512-PvCklXNfcUMyeP/a9nME27C32IipwUDoS45rDyKn5+RQrWyjL+0JAJtf98HL6y9bfqQRTlYjSowWEB1nXxvG5Q==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.26.tgz", + "integrity": "sha512-KD4lULmskL5cCsEkfhERVRIOEDrfEL9CwAsLYpzptOGjaGFNWo3BQ9g8MAb7RaIO71rmVOziZ/uEN/rHwcUIhg==", "dependencies": { - "@vue/compiler-dom": "3.2.24", - "@vue/compiler-sfc": "3.2.24", - "@vue/runtime-dom": "3.2.24", - "@vue/server-renderer": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-dom": "3.2.26", + "@vue/compiler-sfc": "3.2.26", + "@vue/runtime-dom": "3.2.26", + "@vue/server-renderer": "3.2.26", + "@vue/shared": "3.2.26" } }, "node_modules/vue-class-component": { @@ -19383,12 +19393,12 @@ } }, "@vue/compiler-core": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.24.tgz", - "integrity": "sha512-A0SxB2HAggKzP57LDin5gfgWOTwFyGCtQ5MTMNBADnfQYALWnYuC8kMI0DhRSplGTWRvn9Z2DAnG8f35BnojuA==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.26.tgz", + "integrity": "sha512-N5XNBobZbaASdzY9Lga2D9Lul5vdCIOXvUMd6ThcN8zgqQhPKfCV+wfAJNNJKQkSHudnYRO2gEB+lp0iN3g2Tw==", "requires": { - "@babel/parser": "^7.15.0", - "@vue/shared": "3.2.24", + "@babel/parser": "^7.16.4", + "@vue/shared": "3.2.26", "estree-walker": "^2.0.2", "source-map": "^0.6.1" }, @@ -19401,25 +19411,25 @@ } }, "@vue/compiler-dom": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.24.tgz", - "integrity": "sha512-KQEm8r0JFsrNNIfbD28pcwMvHpcJcwjVR1XWFcD0yyQ8eREd7IXhT7J6j7iNCSE/TIo78NOvkwbyX+lnIm836w==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.26.tgz", + "integrity": "sha512-smBfaOW6mQDxcT3p9TKT6mE22vjxjJL50GFVJiI0chXYGU/xzC05QRGrW3HHVuJrmLTLx5zBhsZ2dIATERbarg==", "requires": { - "@vue/compiler-core": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-core": "3.2.26", + "@vue/shared": "3.2.26" } }, "@vue/compiler-sfc": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.24.tgz", - "integrity": "sha512-YGPcIvVJp2qTPkuT6kT43Eo1xjstyY4bmuiSV31my4bQMBFVR26ANmifUSt759Blok71gK0WzfIZHbcOKYOeKA==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.26.tgz", + "integrity": "sha512-ePpnfktV90UcLdsDQUh2JdiTuhV0Skv2iYXxfNMOK/F3Q+2BO0AulcVcfoksOpTJGmhhfosWfMyEaEf0UaWpIw==", "requires": { - "@babel/parser": "^7.15.0", - "@vue/compiler-core": "3.2.24", - "@vue/compiler-dom": "3.2.24", - "@vue/compiler-ssr": "3.2.24", - "@vue/ref-transform": "3.2.24", - "@vue/shared": "3.2.24", + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.26", + "@vue/compiler-dom": "3.2.26", + "@vue/compiler-ssr": "3.2.26", + "@vue/reactivity-transform": "3.2.26", + "@vue/shared": "3.2.26", "estree-walker": "^2.0.2", "magic-string": "^0.25.7", "postcss": "^8.1.10", @@ -19432,9 +19442,9 @@ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "postcss": { - "version": "8.4.4", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.4.tgz", - "integrity": "sha512-joU6fBsN6EIer28Lj6GDFoC/5yOZzLCfn0zHAn/MYXI7aPt4m4hK5KC5ovEZXy+lnCjmYIbQWngvju2ddyEr8Q==", + "version": "8.4.5", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz", + "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==", "requires": { "nanoid": "^3.1.30", "picocolors": "^1.0.0", @@ -19449,12 +19459,12 @@ } }, "@vue/compiler-ssr": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.24.tgz", - "integrity": "sha512-E1HHShNsGVWXxs68LDOUuI+Bzak9W/Ier/366aKDBFuwvfwgruwq6abhMfj6pSDZpwZ/PXnfliyl/m7qBSq6gw==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.26.tgz", + "integrity": "sha512-2mywLX0ODc4Zn8qBoA2PDCsLEZfpUGZcyoFRLSOjyGGK6wDy2/5kyDOWtf0S0UvtoyVq95OTSGIALjZ4k2q/ag==", "requires": { - "@vue/compiler-dom": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-dom": "3.2.26", + "@vue/shared": "3.2.26" } }, "@vue/component-compiler-utils": { @@ -19575,57 +19585,57 @@ "requires": {} }, "@vue/reactivity": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.24.tgz", - "integrity": "sha512-5eVsO9wfQ5erCMSRBjpqLkkI+LglJS7E0oLZJs2gsChpvOjH2Uwt3Hk1nVv0ywStnWg71Ykn3SyQwtnl7PknOQ==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.26.tgz", + "integrity": "sha512-h38bxCZLW6oFJVDlCcAiUKFnXI8xP8d+eO0pcDxx+7dQfSPje2AO6M9S9QO6MrxQB7fGP0DH0dYQ8ksf6hrXKQ==", "requires": { - "@vue/shared": "3.2.24" + "@vue/shared": "3.2.26" } }, - "@vue/ref-transform": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.24.tgz", - "integrity": "sha512-j6oNbsGLvea2rF8GQB9w6q7UFL1So7J+t6ducaMeWPSyjYZ+slWpwPVK6mmyghg5oGqC41R+HC5BV036Y0KhXQ==", + "@vue/reactivity-transform": { + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.26.tgz", + "integrity": "sha512-XKMyuCmzNA7nvFlYhdKwD78rcnmPb7q46uoR00zkX6yZrUmcCQ5OikiwUEVbvNhL5hBJuvbSO95jB5zkUon+eQ==", "requires": { - "@babel/parser": "^7.15.0", - "@vue/compiler-core": "3.2.24", - "@vue/shared": "3.2.24", + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.26", + "@vue/shared": "3.2.26", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, "@vue/runtime-core": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.24.tgz", - "integrity": "sha512-ReI06vGgYuW0G8FlOcAOzMklVDJSxKuRhYzT8j+a8BTfs1945kxo1Th28BPvasyYx8J+LMeZ0HqpPH9yGXvWvg==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.26.tgz", + "integrity": "sha512-BcYi7qZ9Nn+CJDJrHQ6Zsmxei2hDW0L6AB4vPvUQGBm2fZyC0GXd/4nVbyA2ubmuhctD5RbYY8L+5GUJszv9mQ==", "requires": { - "@vue/reactivity": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/reactivity": "3.2.26", + "@vue/shared": "3.2.26" } }, "@vue/runtime-dom": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.24.tgz", - "integrity": "sha512-piqsabtIEUKkMGSJlOyKUonZEDtdwOpR6teQ8EKbH8PX9sxfAt9snLnFJldUhhyYrLIyDtnjwajfJ7/XtpD4JA==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.26.tgz", + "integrity": "sha512-dY56UIiZI+gjc4e8JQBwAifljyexfVCkIAu/WX8snh8vSOt/gMSEGwPRcl2UpYpBYeyExV8WCbgvwWRNt9cHhQ==", "requires": { - "@vue/runtime-core": "3.2.24", - "@vue/shared": "3.2.24", + "@vue/runtime-core": "3.2.26", + "@vue/shared": "3.2.26", "csstype": "^2.6.8" } }, "@vue/server-renderer": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.24.tgz", - "integrity": "sha512-DqiCRDxTbv67Hw5ImiqnLIQbPGtIwWLLfEcVHoEnu1f21EMTB6LfoS69EQddd8VyfN5kfX3Fmz27/hrFPpRaMQ==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.26.tgz", + "integrity": "sha512-Jp5SggDUvvUYSBIvYEhy76t4nr1vapY/FIFloWmQzn7UxqaHrrBpbxrqPcTrSgGrcaglj0VBp22BKJNre4aA1w==", "requires": { - "@vue/compiler-ssr": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-ssr": "3.2.26", + "@vue/shared": "3.2.26" } }, "@vue/shared": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.24.tgz", - "integrity": "sha512-BUgRiZCkCrqDps5aQ9av05xcge3rn092ztKIh17tHkeEFgP4zfXMQWBA2zfdoCdCEdBL26xtOv+FZYiOp9RUDA==" + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.26.tgz", + "integrity": "sha512-vPV6Cq+NIWbH5pZu+V+2QHE9y1qfuTq49uNWw4f7FDEeZaDU2H2cx5jcUZOAKW7qTrUS4k6qZPbMy1x4N96nbA==" }, "@vue/web-component-wrapper": { "version": "1.3.0", @@ -22287,9 +22297,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.15.tgz", - "integrity": "sha512-WDw2IUL3k4QpbzInV3JZK+Zd1NjWJPDZ28oUSchWb/kf6AVj7/niaAlgcJlvojFa1d7pJSyQ/KSZsEtq5W7aGQ==", + "version": "1.4.16", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.16.tgz", + "integrity": "sha512-BQb7FgYwnu6haWLU63/CdVW+9xhmHls3RCQUFiV4lvw3wimEHTVcUk2hkuZo76QhR8nnDdfZE7evJIZqijwPdA==", "dev": true }, "elliptic": { @@ -24572,9 +24582,9 @@ } }, "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, "is-number": { @@ -24704,12 +24714,12 @@ "dev": true }, "is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "requires": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" } }, "is-windows": { @@ -25457,6 +25467,11 @@ "minimist": "^1.2.5" } }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -27554,13 +27569,14 @@ "dev": true }, "sass": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.44.0.tgz", - "integrity": "sha512-0hLREbHFXGQqls/K8X+koeP+ogFRPF4ZqetVB19b7Cst9Er8cOR0rc6RU7MaI4W1JmUShd1BPgPoeqmmgMMYFw==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.45.0.tgz", + "integrity": "sha512-ONy5bjppoohtNkFJRqdz1gscXamMzN3wQy1YH9qO2FiNpgjLhpz/IPRGg0PpCjyz/pWfCOaNEaiEGCcjOFAjqw==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0" + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" } }, "sass-loader": { @@ -29497,15 +29513,15 @@ "dev": true }, "vue": { - "version": "3.2.24", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.24.tgz", - "integrity": "sha512-PvCklXNfcUMyeP/a9nME27C32IipwUDoS45rDyKn5+RQrWyjL+0JAJtf98HL6y9bfqQRTlYjSowWEB1nXxvG5Q==", + "version": "3.2.26", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.26.tgz", + "integrity": "sha512-KD4lULmskL5cCsEkfhERVRIOEDrfEL9CwAsLYpzptOGjaGFNWo3BQ9g8MAb7RaIO71rmVOziZ/uEN/rHwcUIhg==", "requires": { - "@vue/compiler-dom": "3.2.24", - "@vue/compiler-sfc": "3.2.24", - "@vue/runtime-dom": "3.2.24", - "@vue/server-renderer": "3.2.24", - "@vue/shared": "3.2.24" + "@vue/compiler-dom": "3.2.26", + "@vue/compiler-sfc": "3.2.26", + "@vue/runtime-dom": "3.2.26", + "@vue/server-renderer": "3.2.26", + "@vue/shared": "3.2.26" } }, "vue-class-component": { diff --git a/package.json b/package.json index a03e9ee..54d6d6c 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "axios": "^0.24.0", "class-transformer": "^0.5.1", "core-js": "^3.6.5", + "moment": "^2.29.1", "qs": "^6.10.1", "rxjs": "^6.6.0", "vue": "^3.0.0", diff --git a/src/models/dataset.ts b/src/models/dataset.ts index 35b2395..1f03ed9 100644 --- a/src/models/dataset.ts +++ b/src/models/dataset.ts @@ -31,31 +31,85 @@ export enum SearchType { Subject = "subject", } -export interface DbDataset { - id: number; - contributing_corporation: string; - creating_corporation: string; - publisher_name: string; - embargo_date: string; - publish_id: number; - project_id: number; - type: string; - language: string; - server_state: string; - belongs_to_bibliography: boolean; - created_at: string; - server_date_modified: string; - server_date_published: string; - account_id: number; - editor_id: number; - reviewer_id: number; - preferred_reviewer: number; - preferred_reviewer_email: string; - reject_editor_note: string; - reject_reviewer_note: string; - reviewer_note_visible: string; - titles: Array; - authors: Array<Author>; +export class DbDataset { + public id!: number; + public url!: string; + public contributing_corporation!: string; + public creating_corporation!: string; + public publisher_name!: string; + public embargo_date!: string; + public publish_id!: number; + public project_id!: number; + public type!: string; + public language!: string; + public server_state!: string; + public belongs_to_bibliography!: boolean; + public created_at!: string; + public server_date_modified!: string; + public server_date_published!: string; + public account_id!: number; + public editor_id!: number; + public reviewer_id!: number; + public preferred_reviewer!: number; + public preferred_reviewer_email!: string; + public reject_editor_note!: string; + public reject_reviewer_note!: string; + public reviewer_note_visible!: string; + public titles!: Array<Title>; + public abstracts!: Array<Abstract>; + public authors!: Array<Author>; + public contributors!: Array<Author>; + public user!: Person; + + public hasTranslatedAbstract(): boolean { + if (this.abstracts.some((e) => e.type === "Translated")) { + return true; + } else { + return false; + } + } + + public hasSeriesInformationAbstract(): boolean { + if (this.abstracts.some((e) => e.type === AbstractType.Series_information)) { + return true; + } else { + return false; + } + } + + public hasMethodsAbtract(): boolean { + if (this.abstracts.some((e) => e.type === AbstractType.Methods)) { + return true; + } else { + return false; + } + } + + public get MainAbstract(): Nullable<Abstract> { + return this.abstracts.find((e) => e.type === AbstractType.Abstract); + } + + public get TranslatedAbtract(): Nullable<Abstract> { + return this.abstracts.find((e) => e.type === AbstractType.Translated); + } + + public get SeriesInformationAbtract(): Nullable<Abstract> { + return this.abstracts.find((e) => e.type === AbstractType.Series_information); + } + + public get MethodsAbtract(): Nullable<Abstract> { + return this.abstracts.find((e) => e.type === AbstractType.Methods); + } +} +type Nullable<T> = T | undefined; + +export enum AbstractType { + Abstract = "Abstract", + Methods = "Methods", + Series_information = "Series_information", + Technical_info = "Technical_info", + Translated = "Translated", + Other = " Other", } export interface Title { @@ -65,6 +119,13 @@ export interface Title { language: string; } +export interface Abstract { + id: number; + type: string; + value: string; + language: string; +} + export interface Author { id: number; academic_title: string; @@ -74,3 +135,12 @@ export interface Author { last_name: string; name_type: string; } + +export interface Person { + id: number; + login: string; + email: string; + first_name: string; + last_name: string; + created_at: string; +} diff --git a/src/notes.txt b/src/notes.txt index 0b5f738..98fcb5f 100644 --- a/src/notes.txt +++ b/src/notes.txt @@ -59,4 +59,8 @@ import "@fortawesome/fontawesome-free/css/all.css"; ======================= router ================================ https://www.vuemastery.com/blog/vue-router-a-tutorial-for-vue-3/ -npm install --save vue-router@next \ No newline at end of file +npm install --save vue-router@next + +========================== moment,js ================================ +npm install --save moment@latest + diff --git a/src/router/index.ts b/src/router/index.ts index f3c5167..7cf4d83 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -67,7 +67,8 @@ const routes = [ const router = createRouter({ history: createWebHistory(), routes, - scrollBehavior(to, from, savedPosition) { + // scrollBehavior(to, from, savedPosition) { + scrollBehavior() { // return desired position document.getElementById("app")?.scrollIntoView(); }, diff --git a/src/services/dataset.service.ts b/src/services/dataset.service.ts index 294883e..0bacaf2 100644 --- a/src/services/dataset.service.ts +++ b/src/services/dataset.service.ts @@ -5,6 +5,7 @@ import { Dataset, DbDataset, Suggestion } from "@/models/dataset"; import { SolrResponse } from "@/models/headers"; import { ActiveFilterCategories } from "@/models/solr"; import { VUE_APP_PORTAL } from "@/constants"; +import { deserialize, instanceToInstance } from "class-transformer"; class DatasetService { // for the autocomplete search @@ -163,12 +164,24 @@ class DatasetService { public getDataset(id: number): Observable<DbDataset> { const host = "https:" + VUE_APP_PORTAL; const path = "/api/dataset/" + id; - const base = host + path; + const apiUrl = host + path; + + const dataset = api.get<DbDataset>(apiUrl).pipe(map((res) => this.prepareDataset(res, apiUrl))); - const dataset = api.get<DbDataset>(base); // this.messageService.add('HeroService: fetched heroes'); return dataset; } + + private prepareDataset(datasetObj: DbDataset, apiUrl: string) { + const dataset = deserialize<DbDataset>(DbDataset, JSON.stringify(datasetObj)); + dataset.url = document.documentURI; + // this.internalDatasetId.generateInternalId(dataset); + // if (dataset.seriesParameters) { + // dataset.parameters = dataset.seriesParameters; + // delete dataset.seriesParameters; + // } + return dataset; + } } export default new DatasetService(); diff --git a/src/views/dataset-detail.component.ts/dataset-detail.component.ts b/src/views/dataset-detail.component.ts/dataset-detail.component.ts index e67638b..335b057 100644 --- a/src/views/dataset-detail.component.ts/dataset-detail.component.ts +++ b/src/views/dataset-detail.component.ts/dataset-detail.component.ts @@ -1,9 +1,9 @@ import { Options, Vue } from "vue-class-component"; -// import DatasetService from "../../services/dataset.service"; import { DbDataset } from "@/models/dataset"; import { Prop } from "vue-property-decorator"; import DatasetService from "../../services/dataset.service"; import { Subscription } from "rxjs"; +import moment from "moment"; @Options({ name: "DatasetDetailComponent", @@ -14,7 +14,7 @@ export default class DatasetDetailComponent extends Vue { datasetId!: number; private subscriptions: Array<Subscription> = []; - private dataset = {}; + private dataset = {} as DbDataset; private error = ""; beforeMount(): void { @@ -30,7 +30,7 @@ export default class DatasetDetailComponent extends Vue { } private getDataset(id: number): void { - const newSub = DatasetService.getDataset(this.datasetId).subscribe( + const newSub = DatasetService.getDataset(id).subscribe( (res: DbDataset) => { this.dataset = res; }, @@ -49,4 +49,9 @@ export default class DatasetDetailComponent extends Vue { // router.go(-1); this.$router.go(-1); } + + public getHumanDate(date: string): string { + return moment(date).format("DD.MM.YYYY HH:mm"); + // return moment(date).format("MMM Do YYYY"); + } } diff --git a/src/views/dataset-detail.component.ts/dataset-detail.component.vue b/src/views/dataset-detail.component.ts/dataset-detail.component.vue index a54d783..5a2e864 100644 --- a/src/views/dataset-detail.component.ts/dataset-detail.component.vue +++ b/src/views/dataset-detail.component.ts/dataset-detail.component.vue @@ -1,13 +1,119 @@ <template v-if="datasetId"> - <div class="container" v-if="dataset != undefined"> - <section class="section"> - <h2>{{ dataset.titles[0].value }} details!</h2> - <div class="dataset__blog-meta">published: {{ dataset.server_date_published }}</div> - <p class="dataset__abstract">{{ dataset.abstracts[0].value }}</p> + <!-- <div class="container"> + <section class="section" v-if="dataset != undefined"> + <h2 v-if="dataset.hasOwnProperty('titles')">{{ dataset.titles[0].value }} details!</h2> + <div v-if="dataset" class="dataset__blog-meta">published: {{ getHumanDate(dataset.server_date_published) }}</div> + <p v-if="dataset.hasOwnProperty('abstracts')" class="dataset__abstract">{{ dataset.abstracts[0].value }}</p> <div><label>id: </label>{{ dataset.id }}</div> <button v-on:click="goBack">Back</button> </section> - </div> + </div> --> + <section class="section" v-if="dataset"> + <div class="container"> + <!-- <span class="is-size-5"> Basic Table </span> + <br /> --> + + <div class="columns"> + <div class="column is-8 results_column" style="padding-top: 1.2rem; padding-right: 1rem; padding-left: 1rem"> + <div class="card"> + <div class="column dataset__blog-meta">published: {{ getHumanDate(dataset.server_date_published) }}</div> + </div> + + <div class="card record-elem"> + <div class="columns" v-if="dataset.hasOwnProperty('titles')"> + <div class="column is-3-desktop is-4-tablet">Title/<br />title:</div> + <div class="column is-9-desktop is-8-tablet">{{ dataset.titles[0].value }}</div> + </div> + <div class="columns" v-if="dataset.hasOwnProperty('abstracts')"> + <div class="column is-3-desktop is-4-tablet"> + Zusammenfassung/<br /> + abstract: + </div> + <div class="column is-9-desktop is-8-tablet"> + <p>{{ dataset.MainAbstract.value }}</p> + <br /> + <p v-if="dataset.hasTranslatedAbstract()"> + {{ dataset.TranslatedAbtract.value }} + </p> + </div> + </div> + <div class="columns" v-if="dataset.hasOwnProperty('abstracts')"> + <div class="column is-3-desktop is-4-tablet">Serieninformation/<br />series information:</div> + <div class="column is-9-desktop is-8-tablet" v-if="dataset.hasSeriesInformationAbstract()"> + {{ dataset.SeriesInformationAbstract.value }} + </div> + <div class="column is-9-desktop is-8-tablet" v-else>-</div> + </div> + <div class="columns" v-if="dataset.hasOwnProperty('abstracts')"> + <div class="column is-3-desktop is-4-tablet">Methodik/<br />method:</div> + <div class="column is-9-desktop is-8-tablet" v-if="dataset.hasMethodsAbtract()"> + {{ dataset.MethodsAbtract.value }} + </div> + <div class="column is-9-desktop is-8-tablet" v-else>-</div> + </div> + <div class="columns"> + <div class="column is-3-desktop is-4-tablet">Technische Metadaten/<br />technical metadata:</div> + <div class="column is-9-desktop is-8-tablet"> + <p>Persistenter Identifikator: {{ dataset.url }}</p> + <p>Status: {{ dataset.server_state }}</p> + <p v-if="dataset.hasOwnProperty('user')">Eingestellt von: {{ dataset.user.login }}</p> + <p>Herausgeber: {{ dataset.creating_corporation }}</p> + <p>Publisher: {{ dataset.publisher_name }}</p> + </div> + </div> + </div> + </div> + + <div id="id-side-bar" class="column is-4 sidebar_column" style="padding-top: 1.2rem; padding-right: 1.5rem; padding-left: 1.5rem"> + <div class="card"> + <div class="column"> + <h2>Details</h2> + </div> + </div> + <div class="card"> + <div class="column"> + <h2 v-if="dataset.hasOwnProperty('contributors')">{{ dataset.contributors.map((u) => u.full_name).join(", ") }}</h2> + </div> + </div> + </div> + </div> + + <!-- <table v-if="dataset != undefined" class="table"> + <thead> + <tr> + <th>Title</th> + <th>Abstract</th> + <th>Country</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <h2 v-if="dataset.hasOwnProperty('titles')">{{ dataset.titles[0].value }} details!</h2> + </td> + <td> + <p v-if="dataset.hasOwnProperty('abstracts')" class="dataset__abstract">{{ dataset.abstracts[0].value }}</p> + </td> + <td>India</td> + </tr> + </tbody> + </table> --> + </div> + + <div class="container-fluid" style="padding-top: 3.8em"> + <div class="columns is-mobile partner-logos"> + <div class="column col-sm text-center"> + <img src="@/assets/site/img/re3-data-logo-mono.jpg" alt="re3 data logo" /> + </div> + <div class="column col-sm text-center mobile-space"> + <img src="@/assets/site/img/geosphere-austria-logo.jpg" class="pb-3" alt="logo geosphere austria" /> + </div> + <div class="column col-sm text-center"> + <img src="@/assets/site/img/placeholder-logo.jpg" alt="logo placeholder" /> + </div> + </div> + </div> + </section> </template> <script lang="ts"> @@ -16,6 +122,9 @@ export default DatasetDetailComponent; </script> <style scoped lang="scss"> +.section { + font-size: 0.8rem; +} label { display: inline-block; width: 3em;