diff --git a/lib/service/ReleaseService.js b/lib/service/ReleaseService.js index c1b629c6..fcda4aec 100644 --- a/lib/service/ReleaseService.js +++ b/lib/service/ReleaseService.js @@ -7,6 +7,7 @@ exports.default = exports.PROVISIONAL_RELEASE = exports.LATEST_AND_PROVISIONAL = var _NeonContextService = _interopRequireDefault(require("./NeonContextService")); var _typeUtil = require("../util/typeUtil"); var _internal = require("../types/internal"); +var _neonApi = require("../types/neonApi"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } const LATEST_AND_PROVISIONAL = exports.LATEST_AND_PROVISIONAL = 'LATEST_AND_PROVISIONAL'; @@ -126,7 +127,7 @@ const ReleaseService = { description: appliedDoiStatus.release, showCitation: true, showDoi: true, - showViz: false + showViz: (0, _typeUtil.exists)(appliedDoiStatus.status) && appliedDoiStatus.status === _neonApi.DoiStatusType.FINDABLE }; return transformed; }, diff --git a/package-lock.json b/package-lock.json index 33956ee3..da3ff36e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "portal-core-components", - "version": "2.9.1", + "version": "2.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "portal-core-components", - "version": "2.9.1", + "version": "2.9.2", "dependencies": { "@date-io/moment": "^1.3.13", "@fortawesome/fontawesome-svg-core": "^6.6.0", @@ -6570,9 +6570,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "20.14.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.12.tgz", + "integrity": "sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11365,9 +11365,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.832", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", - "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.0.tgz", + "integrity": "sha512-Vb3xHHYnLseK8vlMJQKJYXJ++t4u1/qJ3vykuVrVjvdiOEhYyT1AuP4x03G8EnPmYvYOhe9T+dADTmthjRQMkA==", "dev": true, "license": "ISC" }, @@ -11412,9 +11412,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 58685c3d..b0f9126c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "portal-core-components", - "version": "2.9.1", + "version": "2.9.2", "main": "./lib/index.js", "private": true, "homepage": "http://localhost:3010/core-components", diff --git a/src/lib_components/service/ReleaseService.ts b/src/lib_components/service/ReleaseService.ts index 4d9365ce..21f8f5de 100644 --- a/src/lib_components/service/ReleaseService.ts +++ b/src/lib_components/service/ReleaseService.ts @@ -2,7 +2,7 @@ import NeonContextService from './NeonContextService'; import { exists, existsNonEmpty, isStringNonEmpty } from '../util/typeUtil'; import { UserRelease } from '../types/neonContext'; import { Release as InternalRelease, IReleaseLike, ReleaseProps } from '../types/internal'; -import { DataProductDoiStatus, DataProductRelease } from '../types/neonApi'; +import { DataProductDoiStatus, DataProductRelease, DoiStatusType } from '../types/neonApi'; import { Nullable } from '../types/core'; export const LATEST_AND_PROVISIONAL = 'LATEST_AND_PROVISIONAL'; @@ -223,7 +223,8 @@ const ReleaseService: IReleaseService = { description: appliedDoiStatus.release, showCitation: true, showDoi: true, - showViz: false, + showViz: exists(appliedDoiStatus.status) + && (appliedDoiStatus.status === DoiStatusType.FINDABLE), }; return transformed as IReleaseLike; },