@singi-labs/sifa-sdk 0.19.39 → 0.19.41
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 +27 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +27 -18
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.cjs +49 -2
- package/dist/jsonld/index.cjs.map +1 -1
- package/dist/jsonld/index.d.cts +14 -0
- package/dist/jsonld/index.d.ts +14 -0
- package/dist/jsonld/index.js +49 -2
- package/dist/jsonld/index.js.map +1 -1
- package/dist/resume/index.cjs.map +1 -1
- package/dist/resume/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1091,6 +1091,12 @@ function normalizeSkillCategory(value) {
|
|
|
1091
1091
|
return token === "" ? void 0 : token;
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
|
+
// src/format/compare-text.ts
|
|
1095
|
+
var COLLATOR = new Intl.Collator("en");
|
|
1096
|
+
function compareText(a, b) {
|
|
1097
|
+
return COLLATOR.compare(a, b);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1094
1100
|
// src/taxonomy/skill-grouping.ts
|
|
1095
1101
|
function dedupeSkills(skills) {
|
|
1096
1102
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -1135,7 +1141,7 @@ function groupSkillsByCategory(skills) {
|
|
|
1135
1141
|
groupSkills.sort((a, b) => {
|
|
1136
1142
|
const countDiff = (b.endorsementCount ?? 0) - (a.endorsementCount ?? 0);
|
|
1137
1143
|
if (countDiff !== 0) return countDiff;
|
|
1138
|
-
return a.name
|
|
1144
|
+
return compareText(a.name, b.name);
|
|
1139
1145
|
});
|
|
1140
1146
|
}
|
|
1141
1147
|
const ordered = [];
|
|
@@ -1161,10 +1167,10 @@ function groupSkillsBySubCategory(skills) {
|
|
|
1161
1167
|
const sortByRank = (groupSkills) => [...groupSkills].sort((a, b) => {
|
|
1162
1168
|
const countDiff = (b.endorsementCount ?? 0) - (a.endorsementCount ?? 0);
|
|
1163
1169
|
if (countDiff !== 0) return countDiff;
|
|
1164
|
-
return a.name
|
|
1170
|
+
return compareText(a.name, b.name);
|
|
1165
1171
|
});
|
|
1166
1172
|
const ordered = [];
|
|
1167
|
-
for (const key of [...labels.keys()].sort(
|
|
1173
|
+
for (const key of [...labels.keys()].sort(compareText)) {
|
|
1168
1174
|
const label = labels.get(key);
|
|
1169
1175
|
const group = grouped.get(key);
|
|
1170
1176
|
if (label && group?.length) ordered.push([label, sortByRank(group)]);
|
|
@@ -3286,35 +3292,36 @@ var ALL_SECTIONS = [
|
|
|
3286
3292
|
}
|
|
3287
3293
|
];
|
|
3288
3294
|
function isSectionPopulated(profile, id) {
|
|
3295
|
+
const hasVisible = (items) => filterHidden(items).length > 0;
|
|
3289
3296
|
switch (id) {
|
|
3290
3297
|
case "about":
|
|
3291
3298
|
return Boolean(profile.about && profile.headline);
|
|
3292
3299
|
case "career":
|
|
3293
|
-
return
|
|
3300
|
+
return hasVisible(profile.positions);
|
|
3294
3301
|
case "education":
|
|
3295
|
-
return
|
|
3302
|
+
return hasVisible(profile.education);
|
|
3296
3303
|
case "courses":
|
|
3297
|
-
return
|
|
3304
|
+
return hasVisible(profile.courses);
|
|
3298
3305
|
case "skills":
|
|
3299
3306
|
return Boolean(profile.skills?.length);
|
|
3300
3307
|
case "projects":
|
|
3301
|
-
return
|
|
3308
|
+
return hasVisible(profile.projects);
|
|
3302
3309
|
case "credentials":
|
|
3303
|
-
return
|
|
3310
|
+
return hasVisible(profile.certifications);
|
|
3304
3311
|
case "publications":
|
|
3305
|
-
return
|
|
3312
|
+
return hasVisible(profile.publications);
|
|
3306
3313
|
case "presentations":
|
|
3307
|
-
return
|
|
3314
|
+
return hasVisible(profile.presentations) || hasVisible(profile.presentationDeliveries);
|
|
3308
3315
|
case "involvement":
|
|
3309
|
-
return
|
|
3316
|
+
return hasVisible(profile.involvement);
|
|
3310
3317
|
case "investments":
|
|
3311
|
-
return
|
|
3318
|
+
return hasVisible(profile.investments);
|
|
3312
3319
|
case "awards":
|
|
3313
|
-
return
|
|
3320
|
+
return hasVisible(profile.honors);
|
|
3314
3321
|
case "languages":
|
|
3315
|
-
return
|
|
3322
|
+
return hasVisible(profile.languages);
|
|
3316
3323
|
case "other-profiles":
|
|
3317
|
-
return
|
|
3324
|
+
return hasVisible(profile.externalAccounts);
|
|
3318
3325
|
default:
|
|
3319
3326
|
return false;
|
|
3320
3327
|
}
|
|
@@ -5859,7 +5866,7 @@ function sortLanguagesByProficiency(items) {
|
|
|
5859
5866
|
return [...items].sort((a, b) => {
|
|
5860
5867
|
const diff = rank(b.proficiency) - rank(a.proficiency);
|
|
5861
5868
|
if (diff !== 0) return diff;
|
|
5862
|
-
return (a.language ?? ""
|
|
5869
|
+
return compareText(a.language ?? "", b.language ?? "");
|
|
5863
5870
|
});
|
|
5864
5871
|
}
|
|
5865
5872
|
|
|
@@ -6161,7 +6168,9 @@ function buildProfileHighlights(profile, { today }) {
|
|
|
6161
6168
|
row2.push({
|
|
6162
6169
|
section: "involvement",
|
|
6163
6170
|
href: "#involvement",
|
|
6164
|
-
|
|
6171
|
+
// No role: the kind's readable heading ("Volunteering"), never the raw
|
|
6172
|
+
// lexicon token (`id.sifa.defs#involvementCharity`).
|
|
6173
|
+
title: involvement.role || getInvolvementKindHeading(involvement.kind),
|
|
6165
6174
|
meta: metaLine([
|
|
6166
6175
|
involvement.entityName ?? involvement.upstream,
|
|
6167
6176
|
coPeopleLabel(involvement.collaborators, self)
|
|
@@ -7037,7 +7046,7 @@ function describeSifaRecord(collection, value) {
|
|
|
7037
7046
|
}
|
|
7038
7047
|
|
|
7039
7048
|
// src/index.ts
|
|
7040
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
7049
|
+
var SIFA_SDK_VERSION = "0.19.41";
|
|
7041
7050
|
|
|
7042
7051
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
7043
7052
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|