@singi-labs/sifa-sdk 0.14.4 → 0.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +69 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -1
- package/dist/index.d.ts +52 -1
- package/dist/index.js +65 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2005,6 +2005,55 @@ function getPresentationRoleLabel(value) {
|
|
|
2005
2005
|
return PRESENTATION_ROLE_LABELS[value] ?? value;
|
|
2006
2006
|
}
|
|
2007
2007
|
|
|
2008
|
+
// src/taxonomy/publication-type.ts
|
|
2009
|
+
var PUBLICATION_TYPE_OPTIONS = [
|
|
2010
|
+
{ value: "journal-article", label: "Journal Article" },
|
|
2011
|
+
{ value: "conference-paper", label: "Conference Paper" },
|
|
2012
|
+
{ value: "conference-abstract", label: "Conference Abstract" },
|
|
2013
|
+
{ value: "conference-poster", label: "Conference Poster" },
|
|
2014
|
+
{ value: "book", label: "Book" },
|
|
2015
|
+
{ value: "book-chapter", label: "Book Chapter" },
|
|
2016
|
+
{ value: "book-review", label: "Book Review" },
|
|
2017
|
+
{ value: "edited-book", label: "Edited Book" },
|
|
2018
|
+
{ value: "dissertation", label: "Dissertation" },
|
|
2019
|
+
{ value: "preprint", label: "Preprint" },
|
|
2020
|
+
{ value: "dataset", label: "Dataset" },
|
|
2021
|
+
{ value: "report", label: "Report" },
|
|
2022
|
+
{ value: "review", label: "Review" },
|
|
2023
|
+
{ value: "patent", label: "Patent" },
|
|
2024
|
+
{ value: "software", label: "Software" },
|
|
2025
|
+
{ value: "working-paper", label: "Working Paper" },
|
|
2026
|
+
{ value: "artistic-performance", label: "Artistic Performance" },
|
|
2027
|
+
{ value: "lecture-speech", label: "Lecture/Speech" },
|
|
2028
|
+
{ value: "online-resource", label: "Online Resource" },
|
|
2029
|
+
{ value: "newspaper-article", label: "Newspaper Article" },
|
|
2030
|
+
{ value: "research-technique", label: "Research Technique" },
|
|
2031
|
+
{ value: "standards-and-policy", label: "Standards & Policy" },
|
|
2032
|
+
{ value: "technical-standard", label: "Technical Standard" },
|
|
2033
|
+
{ value: "registered-copyright", label: "Registered Copyright" },
|
|
2034
|
+
{ value: "translation", label: "Translation" },
|
|
2035
|
+
{ value: "dictionary-entry", label: "Dictionary Entry" },
|
|
2036
|
+
{ value: "encyclopedia-entry", label: "Encyclopedia Entry" },
|
|
2037
|
+
{ value: "supervised-student-publication", label: "Supervised Student Publication" },
|
|
2038
|
+
{ value: "annotation", label: "Annotation" },
|
|
2039
|
+
{ value: "test", label: "Test" },
|
|
2040
|
+
{ value: "spin-off-company", label: "Spin-off Company" },
|
|
2041
|
+
{ value: "disclosure", label: "Disclosure" },
|
|
2042
|
+
{ value: "license", label: "License" },
|
|
2043
|
+
{ value: "trademark", label: "Trademark" },
|
|
2044
|
+
{ value: "design", label: "Design" },
|
|
2045
|
+
// ORCID's catch-all. Labelled "Publication" rather than "Other" because it is
|
|
2046
|
+
// what shows on the card, and a badge reading "Other" tells a reader nothing.
|
|
2047
|
+
{ value: "other", label: "Publication" }
|
|
2048
|
+
];
|
|
2049
|
+
var PUBLICATION_TYPE_LABELS = Object.fromEntries(
|
|
2050
|
+
PUBLICATION_TYPE_OPTIONS.map((o) => [o.value, o.label])
|
|
2051
|
+
);
|
|
2052
|
+
function getPublicationTypeLabel(value) {
|
|
2053
|
+
if (!value) return void 0;
|
|
2054
|
+
return PUBLICATION_TYPE_LABELS[value] ?? "Publication";
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2008
2057
|
// src/taxonomy/presentation-link-type.ts
|
|
2009
2058
|
var PRESENTATION_LINK_TYPE_OPTIONS = [
|
|
2010
2059
|
{ value: "id.sifa.defs#linkSlides", label: "Slides" },
|
|
@@ -2445,6 +2494,11 @@ function certDateExtractor(item) {
|
|
|
2445
2494
|
return { startDate: item.issueDate, endDate: item.expiryDate ?? item.issueDate };
|
|
2446
2495
|
}
|
|
2447
2496
|
|
|
2497
|
+
// src/format/doi.ts
|
|
2498
|
+
function normalizeDoi(value) {
|
|
2499
|
+
return value.trim().replace(/^https?:\/\/(dx\.)?doi\.org\//i, "").replace(/^doi:\s*/i, "");
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2448
2502
|
// src/format/handle-utils.ts
|
|
2449
2503
|
function sanitizeHandleInput(raw) {
|
|
2450
2504
|
let identifier = raw.trim().replace(/^https?:\/\/bsky\.app\/profile\//i, "").replace(/^at:\/\//i, "").replace(/^@/, "").replace(/^https?:\/\//i, "");
|
|
@@ -5032,6 +5086,15 @@ var sortCertifications = (items) => sortByDateDesc(items, certDateExtractor);
|
|
|
5032
5086
|
var sortHonors = (items) => sortByDateDesc(items, singleDateExtractor);
|
|
5033
5087
|
var sortLanguages = (items) => sortLanguagesByProficiency(items);
|
|
5034
5088
|
|
|
5089
|
+
// src/profile/headline-role-dedupe.ts
|
|
5090
|
+
function normalize(value) {
|
|
5091
|
+
return value.trim().replace(/\s+/g, " ").replace(/[.,;:·|]+$/, "").trim().toLowerCase();
|
|
5092
|
+
}
|
|
5093
|
+
function isRoleLineRedundant(headline, roleLine) {
|
|
5094
|
+
if (!headline || !roleLine) return false;
|
|
5095
|
+
return normalize(headline) === normalize(roleLine);
|
|
5096
|
+
}
|
|
5097
|
+
|
|
5035
5098
|
// src/profile/involvement-grouping.ts
|
|
5036
5099
|
var INVOLVEMENT_HEADING_ORDER = [
|
|
5037
5100
|
"Open Source",
|
|
@@ -5879,7 +5942,7 @@ function describeSifaRecord(collection, value) {
|
|
|
5879
5942
|
}
|
|
5880
5943
|
|
|
5881
5944
|
// src/index.ts
|
|
5882
|
-
var SIFA_SDK_VERSION = "0.14.
|
|
5945
|
+
var SIFA_SDK_VERSION = "0.14.6";
|
|
5883
5946
|
|
|
5884
5947
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
5885
5948
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -5956,6 +6019,8 @@ exports.PRESENTATION_ROLE_OPTIONS = PRESENTATION_ROLE_OPTIONS;
|
|
|
5956
6019
|
exports.PROFILE_INVESTMENT_NSID = PROFILE_INVESTMENT_NSID;
|
|
5957
6020
|
exports.PROFILE_INVOLVEMENT_NSID = PROFILE_INVOLVEMENT_NSID;
|
|
5958
6021
|
exports.PROJECT_ROLES = PROJECT_ROLES;
|
|
6022
|
+
exports.PUBLICATION_TYPE_LABELS = PUBLICATION_TYPE_LABELS;
|
|
6023
|
+
exports.PUBLICATION_TYPE_OPTIONS = PUBLICATION_TYPE_OPTIONS;
|
|
5959
6024
|
exports.PUBLISHERS = PUBLISHERS;
|
|
5960
6025
|
exports.PresentationDurationSchema = PresentationDurationSchema;
|
|
5961
6026
|
exports.PresentationLinkSchema = PresentationLinkSchema;
|
|
@@ -6051,6 +6116,7 @@ exports.getPdsDisplayName = getPdsDisplayName;
|
|
|
6051
6116
|
exports.getPlatformLabel = getPlatformLabel;
|
|
6052
6117
|
exports.getPresentationLinkTypeLabel = getPresentationLinkTypeLabel;
|
|
6053
6118
|
exports.getPresentationRoleLabel = getPresentationRoleLabel;
|
|
6119
|
+
exports.getPublicationTypeLabel = getPublicationTypeLabel;
|
|
6054
6120
|
exports.getPublisherByHost = getPublisherByHost;
|
|
6055
6121
|
exports.getPublisherById = getPublisherById;
|
|
6056
6122
|
exports.getPublisherFromSiteUrl = getPublisherFromSiteUrl;
|
|
@@ -6075,6 +6141,7 @@ exports.isLinked = isLinked;
|
|
|
6075
6141
|
exports.isOnBehalfOfApplicable = isOnBehalfOfApplicable;
|
|
6076
6142
|
exports.isPseudoEmployer = isPseudoEmployer;
|
|
6077
6143
|
exports.isRegistrableDomainHandle = isRegistrableDomainHandle;
|
|
6144
|
+
exports.isRoleLineRedundant = isRoleLineRedundant;
|
|
6078
6145
|
exports.isSectionPopulated = isSectionPopulated;
|
|
6079
6146
|
exports.isValidRgbColor = isValidRgbColor;
|
|
6080
6147
|
exports.isVisibleActivityItem = isVisibleActivityItem;
|
|
@@ -6087,6 +6154,7 @@ exports.makeGraphFollowRecordSchema = makeGraphFollowRecordSchema;
|
|
|
6087
6154
|
exports.maxGraphemes = maxGraphemes;
|
|
6088
6155
|
exports.meetsContrastAA = meetsContrastAA;
|
|
6089
6156
|
exports.normalizeCompanyKey = normalizeCompanyKey;
|
|
6157
|
+
exports.normalizeDoi = normalizeDoi;
|
|
6090
6158
|
exports.normalizeLegalForm = normalizeLegalForm;
|
|
6091
6159
|
exports.normalizeOpenTo = normalizeOpenTo;
|
|
6092
6160
|
exports.normalizePlatformId = normalizePlatformId;
|