Skip to content

Commit 9aefb0b

Browse files
authored
v2.6.0 (#70)
* update product, dataset citations * prepare v2.6.0 * update prov, release citations
1 parent 78da765 commit 9aefb0b

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

lib/components/DownloadDataContext/DownloadDataContext.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,6 @@ var regenerateS3FilesFiltersAndValidValues = function regenerateS3FilesFiltersAn
732732
}
733733
});
734734
});
735-
// If cachedValues and validValues differ in size then rebuild valueLookups for
736-
// filters, adjust filter selections to suit, and regenerate filtered file count.
737735
var filterKeys = Object.keys(updated.s3Files.valueLookups || {});
738736
filterKeys.forEach(function (key) {
739737
updated.s3Files.valueLookups[key] = {};

lib/service/CitationService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ var CitationService = {
2222
var hasDoi = hasRelease && (0, _typeUtil.exists)(productReleaseObject.productDoi) && (0, _typeUtil.isStringNonEmpty)(productReleaseObject.productDoi.url);
2323
var citationDoi = hasDoi ? productReleaseObject.productDoi.url : null;
2424
var today = CitationService.getDateFormatted();
25-
var productName = !hasRelease ? "".concat(product.productName, " (").concat(product.productCode, ")") : "".concat(product.productName, " (").concat(product.productCode, "), ") + "".concat(productReleaseObject.release);
25+
var productName = !hasRelease ? "".concat(product.productName, " (").concat(product.productCode, "), provisional data") : "".concat(product.productName, " (").concat(product.productCode, "), ") + "".concat(productReleaseObject.release);
2626
var doiText = citationDoi ? ". ".concat(citationDoi) : '';
27-
var url = _RouteService.default.getDataProductCitationDownloadUrl();
28-
var accessed = !hasRelease ? "".concat(url, " (accessed ").concat(today, ")") : "Dataset accessed from ".concat(url, " on ").concat(today);
27+
var url = _RouteService.default.getProductDetailPath(product.productCode, hasRelease ? productReleaseObject.release : undefined);
28+
var accessed = !hasRelease ? "Dataset accessed from ".concat(url, " on ").concat(today, ". Data archived at [your DOI].") : "Dataset accessed from ".concat(url, " on ").concat(today, ".");
2929
return "".concat(NEON, ". ").concat(productName).concat(doiText, ". ").concat(accessed);
3030
},
3131
buildPrototypeDatasetCitationText: function buildPrototypeDatasetCitationText(dataset) {
@@ -40,7 +40,7 @@ var CitationService = {
4040
var today = CitationService.getDateFormatted();
4141
var doiId = hasDoi ? doi.url.split('/').slice(-2).join('/') : uuid;
4242
var url = hasDoi ? "".concat(doi.url, ".") : "".concat(_RouteService.default.getPrototypeDatasetDetailPath(uuid));
43-
var accessed = hasDoi ? "Dataset accessed from ".concat(_RouteService.default.getDataProductCitationDownloadUrl(), " on ").concat(today) : "(accessed ".concat(today, ")");
43+
var accessed = 'Dataset accessed from ' + "".concat(_RouteService.default.getPrototypeDatasetDetailPath(uuid), " on ").concat(today, ".");
4444
var title = version ? "".concat(projectTitle, ", ").concat(version) : projectTitle;
4545
return "".concat(NEON, ". ").concat(title, " (").concat(doiId, "). ").concat(url, " ").concat(accessed);
4646
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "portal-core-components",
3-
"version": "2.5.2",
3+
"version": "2.6.0",
44
"main": "./lib/index.js",
55
"private": true,
66
"homepage": "http://localhost:3010/core-components",

src/lib_components/components/DownloadDataContext/DownloadDataContext.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,6 @@ const regenerateS3FilesFiltersAndValidValues = (state) => {
742742
...file,
743743
tableData: { checked: updated.s3Files.valueMap[file.url] || false },
744744
}));
745-
// If cachedValues and validValues differ in size then rebuild valueLookups for
746-
// filters, adjust filter selections to suit, and regenerate filtered file count.
747745
const filterKeys = Object.keys(updated.s3Files.valueLookups || {});
748746
filterKeys.forEach((key) => {
749747
updated.s3Files.valueLookups[key] = {};

src/lib_components/service/CitationService.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ const CitationService: ICitationService = {
3737
: null;
3838
const today = CitationService.getDateFormatted();
3939
const productName = !hasRelease
40-
? `${product.productName} (${product.productCode})`
40+
? `${product.productName} (${product.productCode}), provisional data`
4141
: `${product.productName} (${product.productCode}), `
4242
+ `${(productReleaseObject as DataProductRelease).release}`;
4343
const doiText = citationDoi ? `. ${citationDoi}` : '';
44-
const url = RouteService.getDataProductCitationDownloadUrl();
44+
const url = RouteService.getProductDetailPath(
45+
product.productCode,
46+
hasRelease ? (productReleaseObject as DataProductRelease).release : undefined,
47+
);
4548
const accessed = !hasRelease
46-
? `${url} (accessed ${today})`
47-
: `Dataset accessed from ${url} on ${today}`;
49+
? `Dataset accessed from ${url} on ${today}. Data archived at [your DOI].`
50+
: `Dataset accessed from ${url} on ${today}.`;
4851
return `${NEON}. ${productName}${doiText}. ${accessed}`;
4952
},
5053
buildPrototypeDatasetCitationText: (dataset: any): string => {
@@ -63,9 +66,8 @@ const CitationService: ICitationService = {
6366
const url = hasDoi
6467
? `${doi.url}.`
6568
: `${RouteService.getPrototypeDatasetDetailPath(uuid)}`;
66-
const accessed = hasDoi
67-
? `Dataset accessed from ${RouteService.getDataProductCitationDownloadUrl()} on ${today}`
68-
: `(accessed ${today})`;
69+
const accessed = 'Dataset accessed from '
70+
+ `${RouteService.getPrototypeDatasetDetailPath(uuid)} on ${today}.`;
6971
const title = version
7072
? `${projectTitle}, ${version}`
7173
: projectTitle;

0 commit comments

Comments
 (0)