Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.6.0 #70

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/components/DownloadDataContext/DownloadDataContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,6 @@ var regenerateS3FilesFiltersAndValidValues = function regenerateS3FilesFiltersAn
}
});
});
// If cachedValues and validValues differ in size then rebuild valueLookups for
// filters, adjust filter selections to suit, and regenerate filtered file count.
var filterKeys = Object.keys(updated.s3Files.valueLookups || {});
filterKeys.forEach(function (key) {
updated.s3Files.valueLookups[key] = {};
Expand Down
8 changes: 4 additions & 4 deletions lib/service/CitationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ var CitationService = {
var hasDoi = hasRelease && (0, _typeUtil.exists)(productReleaseObject.productDoi) && (0, _typeUtil.isStringNonEmpty)(productReleaseObject.productDoi.url);
var citationDoi = hasDoi ? productReleaseObject.productDoi.url : null;
var today = CitationService.getDateFormatted();
var productName = !hasRelease ? "".concat(product.productName, " (").concat(product.productCode, ")") : "".concat(product.productName, " (").concat(product.productCode, "), ") + "".concat(productReleaseObject.release);
var productName = !hasRelease ? "".concat(product.productName, " (").concat(product.productCode, "), provisional data") : "".concat(product.productName, " (").concat(product.productCode, "), ") + "".concat(productReleaseObject.release);
var doiText = citationDoi ? ". ".concat(citationDoi) : '';
var url = _RouteService.default.getDataProductCitationDownloadUrl();
var accessed = !hasRelease ? "".concat(url, " (accessed ").concat(today, ")") : "Dataset accessed from ".concat(url, " on ").concat(today);
var url = _RouteService.default.getProductDetailPath(product.productCode, hasRelease ? productReleaseObject.release : undefined);
var accessed = !hasRelease ? "Dataset accessed from ".concat(url, " on ").concat(today, ". Data archived at [your DOI].") : "Dataset accessed from ".concat(url, " on ").concat(today, ".");
return "".concat(NEON, ". ").concat(productName).concat(doiText, ". ").concat(accessed);
},
buildPrototypeDatasetCitationText: function buildPrototypeDatasetCitationText(dataset) {
Expand All @@ -40,7 +40,7 @@ var CitationService = {
var today = CitationService.getDateFormatted();
var doiId = hasDoi ? doi.url.split('/').slice(-2).join('/') : uuid;
var url = hasDoi ? "".concat(doi.url, ".") : "".concat(_RouteService.default.getPrototypeDatasetDetailPath(uuid));
var accessed = hasDoi ? "Dataset accessed from ".concat(_RouteService.default.getDataProductCitationDownloadUrl(), " on ").concat(today) : "(accessed ".concat(today, ")");
var accessed = 'Dataset accessed from ' + "".concat(_RouteService.default.getPrototypeDatasetDetailPath(uuid), " on ").concat(today, ".");
var title = version ? "".concat(projectTitle, ", ").concat(version) : projectTitle;
return "".concat(NEON, ". ").concat(title, " (").concat(doiId, "). ").concat(url, " ").concat(accessed);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "portal-core-components",
"version": "2.5.2",
"version": "2.6.0",
"main": "./lib/index.js",
"private": true,
"homepage": "http://localhost:3010/core-components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,6 @@ const regenerateS3FilesFiltersAndValidValues = (state) => {
...file,
tableData: { checked: updated.s3Files.valueMap[file.url] || false },
}));
// If cachedValues and validValues differ in size then rebuild valueLookups for
// filters, adjust filter selections to suit, and regenerate filtered file count.
const filterKeys = Object.keys(updated.s3Files.valueLookups || {});
filterKeys.forEach((key) => {
updated.s3Files.valueLookups[key] = {};
Expand Down
16 changes: 9 additions & 7 deletions src/lib_components/service/CitationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ const CitationService: ICitationService = {
: null;
const today = CitationService.getDateFormatted();
const productName = !hasRelease
? `${product.productName} (${product.productCode})`
? `${product.productName} (${product.productCode}), provisional data`
: `${product.productName} (${product.productCode}), `
+ `${(productReleaseObject as DataProductRelease).release}`;
const doiText = citationDoi ? `. ${citationDoi}` : '';
const url = RouteService.getDataProductCitationDownloadUrl();
const url = RouteService.getProductDetailPath(
product.productCode,
hasRelease ? (productReleaseObject as DataProductRelease).release : undefined,
);
const accessed = !hasRelease
? `${url} (accessed ${today})`
: `Dataset accessed from ${url} on ${today}`;
? `Dataset accessed from ${url} on ${today}. Data archived at [your DOI].`
: `Dataset accessed from ${url} on ${today}.`;
return `${NEON}. ${productName}${doiText}. ${accessed}`;
},
buildPrototypeDatasetCitationText: (dataset: any): string => {
Expand All @@ -63,9 +66,8 @@ const CitationService: ICitationService = {
const url = hasDoi
? `${doi.url}.`
: `${RouteService.getPrototypeDatasetDetailPath(uuid)}`;
const accessed = hasDoi
? `Dataset accessed from ${RouteService.getDataProductCitationDownloadUrl()} on ${today}`
: `(accessed ${today})`;
const accessed = 'Dataset accessed from '
+ `${RouteService.getPrototypeDatasetDetailPath(uuid)} on ${today}.`;
const title = version
? `${projectTitle}, ${version}`
: projectTitle;
Expand Down
Loading