@singi-labs/sifa-sdk 0.12.0 → 0.12.2
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/{adult-content-BO4nea-m.d.cts → adult-content-DDGP8W1e.d.cts} +1 -1
- package/dist/{adult-content-BO4nea-m.d.ts → adult-content-DDGP8W1e.d.ts} +1 -1
- package/dist/{index-BeAu_9VV.d.cts → index-BS7zO7KI.d.cts} +2 -2
- package/dist/{index-D6ZKjuEo.d.cts → index-CNh-GI9A.d.cts} +2 -2
- package/dist/{index-BjzvRGGZ.d.ts → index-IMvNS08M.d.ts} +2 -2
- package/dist/{index-DUSGkW3U.d.ts → index-iAzeLOcz.d.ts} +2 -2
- package/dist/index.cjs +219 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -3
- package/dist/index.d.ts +213 -3
- package/dist/index.js +199 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-Cy0T900D.d.ts → keys-5oyp950_.d.ts} +1 -1
- package/dist/{keys-B9_KrPw_.d.cts → keys-Bn36IA8Q.d.cts} +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/schemas/write/index.cjs +183 -0
- package/dist/schemas/write/index.cjs.map +1 -0
- package/dist/schemas/write/index.d.cts +274 -0
- package/dist/schemas/write/index.d.ts +274 -0
- package/dist/schemas/write/index.js +164 -0
- package/dist/schemas/write/index.js.map +1 -0
- package/package.json +11 -1
|
@@ -583,4 +583,4 @@ declare function hasAdultContent(item: {
|
|
|
583
583
|
labels?: ActivityLabel[];
|
|
584
584
|
}): boolean;
|
|
585
585
|
|
|
586
|
-
export { type AdultContentLabel as A, type PublicationContributor as B, type CoSpeaker as C, type SkillRef as D, type ExternalAccount as E, type FeedItem as F, hasAdultContent as G, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type ProfilePresentationDelivery as b, type PdsProviderInfo as c, type Profile as d,
|
|
586
|
+
export { type AdultContentLabel as A, type PublicationContributor as B, type CoSpeaker as C, type SkillRef as D, type ExternalAccount as E, type FeedItem as F, hasAdultContent as G, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type ProfilePresentationDelivery as b, type PdsProviderInfo as c, type Profile as d, type ProfilePosition as e, type ProfileCertification as f, type ProfileEducation as g, type ProfileHonor as h, type ProfileLanguage as i, type ProfileProject as j, type ProfilePublication as k, type ProfileInvolvement as l, ADULT_CONTENT_LABELS as m, type ActiveApp as n, type Endorsement as o, type EndorsementData as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type PresentationLinkView as s, type ProfileCourse as t, type ProfileIndustry as u, type ProfileInvolvementLink as v, type ProfileLocation as w, type ProfileOverrideSource as x, type ProfilePresentation as y, type ProfileVolunteering as z };
|
|
@@ -583,4 +583,4 @@ declare function hasAdultContent(item: {
|
|
|
583
583
|
labels?: ActivityLabel[];
|
|
584
584
|
}): boolean;
|
|
585
585
|
|
|
586
|
-
export { type AdultContentLabel as A, type PublicationContributor as B, type CoSpeaker as C, type SkillRef as D, type ExternalAccount as E, type FeedItem as F, hasAdultContent as G, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type ProfilePresentationDelivery as b, type PdsProviderInfo as c, type Profile as d,
|
|
586
|
+
export { type AdultContentLabel as A, type PublicationContributor as B, type CoSpeaker as C, type SkillRef as D, type ExternalAccount as E, type FeedItem as F, hasAdultContent as G, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type ProfilePresentationDelivery as b, type PdsProviderInfo as c, type Profile as d, type ProfilePosition as e, type ProfileCertification as f, type ProfileEducation as g, type ProfileHonor as h, type ProfileLanguage as i, type ProfileProject as j, type ProfilePublication as k, type ProfileInvolvement as l, ADULT_CONTENT_LABELS as m, type ActiveApp as n, type Endorsement as o, type EndorsementData as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type PresentationLinkView as s, type ProfileCourse as t, type ProfileIndustry as u, type ProfileInvolvementLink as v, type ProfileLocation as w, type ProfileOverrideSource as x, type ProfilePresentation as y, type ProfileVolunteering as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-Bn36IA8Q.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile,
|
|
6
|
+
import { d as Profile, e as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-DDGP8W1e.cjs';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.cjs';
|
|
8
8
|
|
|
9
9
|
interface SifaProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-
|
|
2
|
-
import { d as Profile,
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-Bn36IA8Q.cjs';
|
|
2
|
+
import { d as Profile, e as ProfilePosition, D as SkillRef } from './adult-content-DDGP8W1e.cjs';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-
|
|
2
|
-
import { d as Profile,
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-5oyp950_.js';
|
|
2
|
+
import { d as Profile, e as ProfilePosition, D as SkillRef } from './adult-content-DDGP8W1e.js';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-5oyp950_.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile,
|
|
6
|
+
import { d as Profile, e as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-DDGP8W1e.js';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.js';
|
|
8
8
|
|
|
9
9
|
interface SifaProviderProps {
|
package/dist/index.cjs
CHANGED
|
@@ -1707,6 +1707,25 @@ function formatPresentationDuration(duration) {
|
|
|
1707
1707
|
return `${minMinutes} min`;
|
|
1708
1708
|
}
|
|
1709
1709
|
|
|
1710
|
+
// src/format/timeline.ts
|
|
1711
|
+
var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
1712
|
+
function formatTimelineDate(dateStr) {
|
|
1713
|
+
if (dateStr.length === 4) return dateStr;
|
|
1714
|
+
const [year, month] = dateStr.split("-");
|
|
1715
|
+
if (!month) return year ?? dateStr;
|
|
1716
|
+
const idx = parseInt(month, 10) - 1;
|
|
1717
|
+
return `${MONTHS[idx]} ${year}`;
|
|
1718
|
+
}
|
|
1719
|
+
function formatDateRange(start, end, showPresent = true) {
|
|
1720
|
+
if (!start && !end) return "";
|
|
1721
|
+
if (!start) return end ? formatTimelineDate(end) : "";
|
|
1722
|
+
const formattedStart = formatTimelineDate(start);
|
|
1723
|
+
if (!end) return showPresent ? `${formattedStart} - Present` : formattedStart;
|
|
1724
|
+
const formattedEnd = formatTimelineDate(end);
|
|
1725
|
+
if (formattedStart === formattedEnd) return formattedStart;
|
|
1726
|
+
return `${formattedStart} - ${formattedEnd}`;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1710
1729
|
// src/format/summarize-deliveries.ts
|
|
1711
1730
|
var CANCELLED_STATUS = "community.lexicon.calendar.event#cancelled";
|
|
1712
1731
|
var KEYNOTE_ROLE = "id.sifa.defs#keynote";
|
|
@@ -2768,6 +2787,184 @@ function classifyEntityRef(entityRef) {
|
|
|
2768
2787
|
function isLinked(entityRef) {
|
|
2769
2788
|
return classifyEntityRef(entityRef) !== "unlinked";
|
|
2770
2789
|
}
|
|
2790
|
+
|
|
2791
|
+
// src/profile/section-model.ts
|
|
2792
|
+
var SECTION_GROUPS = [
|
|
2793
|
+
{ id: "overview", labelKey: "groupOverview" },
|
|
2794
|
+
{ id: "experience", labelKey: "groupExperience" },
|
|
2795
|
+
{ id: "qualifications", labelKey: "groupQualifications" },
|
|
2796
|
+
{ id: "more", labelKey: "groupMore" }
|
|
2797
|
+
];
|
|
2798
|
+
var ALL_SECTIONS = [
|
|
2799
|
+
{ id: "about", labelKey: "about", ns: "profile", group: "overview" },
|
|
2800
|
+
{ id: "career", labelKey: "career", ns: "sections", group: "experience" },
|
|
2801
|
+
{ id: "skills", labelKey: "skills", ns: "sections", group: "experience" },
|
|
2802
|
+
{ id: "projects", labelKey: "projects", ns: "sections", group: "experience" },
|
|
2803
|
+
{
|
|
2804
|
+
id: "presentations",
|
|
2805
|
+
labelKey: "talksAndSessions",
|
|
2806
|
+
ns: "sections",
|
|
2807
|
+
group: "experience"
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
id: "publications",
|
|
2811
|
+
labelKey: "publications",
|
|
2812
|
+
ns: "sections",
|
|
2813
|
+
group: "experience"
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
id: "credentials",
|
|
2817
|
+
labelKey: "credentials",
|
|
2818
|
+
ns: "sections",
|
|
2819
|
+
group: "qualifications"
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
id: "education",
|
|
2823
|
+
labelKey: "education",
|
|
2824
|
+
ns: "sections",
|
|
2825
|
+
group: "qualifications"
|
|
2826
|
+
},
|
|
2827
|
+
{ id: "courses", labelKey: "courses", ns: "sections", group: "qualifications" },
|
|
2828
|
+
{ id: "awards", labelKey: "awards", ns: "sections", group: "more" },
|
|
2829
|
+
{ id: "involvement", labelKey: "involvement", ns: "sections", group: "more" },
|
|
2830
|
+
{ id: "languages", labelKey: "languages", ns: "sections", group: "more" },
|
|
2831
|
+
{
|
|
2832
|
+
id: "other-profiles",
|
|
2833
|
+
labelKey: "otherProfiles",
|
|
2834
|
+
ns: "sections",
|
|
2835
|
+
group: "more"
|
|
2836
|
+
}
|
|
2837
|
+
];
|
|
2838
|
+
function isSectionPopulated(profile, id) {
|
|
2839
|
+
switch (id) {
|
|
2840
|
+
case "about":
|
|
2841
|
+
return Boolean(profile.about && profile.headline);
|
|
2842
|
+
case "career":
|
|
2843
|
+
return Boolean(profile.positions?.length);
|
|
2844
|
+
case "education":
|
|
2845
|
+
return Boolean(profile.education?.length);
|
|
2846
|
+
case "courses":
|
|
2847
|
+
return Boolean(profile.courses?.length);
|
|
2848
|
+
case "skills":
|
|
2849
|
+
return Boolean(profile.skills?.length);
|
|
2850
|
+
case "projects":
|
|
2851
|
+
return Boolean(profile.projects?.length);
|
|
2852
|
+
case "credentials":
|
|
2853
|
+
return Boolean(profile.certifications?.length);
|
|
2854
|
+
case "publications":
|
|
2855
|
+
return Boolean(profile.publications?.length);
|
|
2856
|
+
case "presentations":
|
|
2857
|
+
return Boolean(profile.presentations?.length) || Boolean(profile.presentationDeliveries?.length);
|
|
2858
|
+
case "involvement":
|
|
2859
|
+
return Boolean(profile.involvement?.length);
|
|
2860
|
+
case "awards":
|
|
2861
|
+
return Boolean(profile.honors?.length);
|
|
2862
|
+
case "languages":
|
|
2863
|
+
return Boolean(profile.languages?.length);
|
|
2864
|
+
case "other-profiles":
|
|
2865
|
+
return Boolean(profile.externalAccounts?.length);
|
|
2866
|
+
default:
|
|
2867
|
+
return false;
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
function getVisibleSectionIds(profile, isOwnProfile) {
|
|
2871
|
+
return ALL_SECTIONS.map((s) => s.id).filter(
|
|
2872
|
+
(id) => isOwnProfile || isSectionPopulated(profile, id)
|
|
2873
|
+
);
|
|
2874
|
+
}
|
|
2875
|
+
function filterHidden(items) {
|
|
2876
|
+
return (items ?? []).filter((i) => !i.hidden);
|
|
2877
|
+
}
|
|
2878
|
+
function visibleItems(items, isOwnProfile) {
|
|
2879
|
+
return isOwnProfile ? items ?? [] : filterHidden(items);
|
|
2880
|
+
}
|
|
2881
|
+
var SECTION_LABELS = {
|
|
2882
|
+
about: "About",
|
|
2883
|
+
career: "Career",
|
|
2884
|
+
skills: "Skills",
|
|
2885
|
+
projects: "Projects",
|
|
2886
|
+
presentations: "Talks & sessions",
|
|
2887
|
+
publications: "Publications",
|
|
2888
|
+
credentials: "Credentials",
|
|
2889
|
+
education: "Education",
|
|
2890
|
+
courses: "Courses",
|
|
2891
|
+
awards: "Awards",
|
|
2892
|
+
involvement: "Involvement",
|
|
2893
|
+
languages: "Languages",
|
|
2894
|
+
"other-profiles": "Links"
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
// src/profile/range-sort.ts
|
|
2898
|
+
var hasValue = (date) => !!date;
|
|
2899
|
+
function sortByActiveDateRange(items) {
|
|
2900
|
+
return sortByDateDesc(items, (p) => ({
|
|
2901
|
+
startDate: p.startDate,
|
|
2902
|
+
endDate: p.endDate,
|
|
2903
|
+
current: !hasValue(p.endDate) && hasValue(p.startDate)
|
|
2904
|
+
}));
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
// src/profile/language-sort.ts
|
|
2908
|
+
var PROFICIENCY_RANK = {
|
|
2909
|
+
native: 5,
|
|
2910
|
+
full_professional: 4,
|
|
2911
|
+
professional_working: 3,
|
|
2912
|
+
limited_working: 2,
|
|
2913
|
+
elementary: 1
|
|
2914
|
+
};
|
|
2915
|
+
function rank(proficiency) {
|
|
2916
|
+
if (!proficiency) return 0;
|
|
2917
|
+
return PROFICIENCY_RANK[proficiency] ?? 0;
|
|
2918
|
+
}
|
|
2919
|
+
function sortLanguagesByProficiency(items) {
|
|
2920
|
+
return [...items].sort((a, b) => {
|
|
2921
|
+
const diff = rank(b.proficiency) - rank(a.proficiency);
|
|
2922
|
+
if (diff !== 0) return diff;
|
|
2923
|
+
return (a.language ?? "").localeCompare(b.language ?? "");
|
|
2924
|
+
});
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
// src/profile/section-sorts.ts
|
|
2928
|
+
function hoistPrimary(positions) {
|
|
2929
|
+
const idx = positions.findIndex((p) => p.primary && !p.endedAt);
|
|
2930
|
+
if (idx <= 0) return positions;
|
|
2931
|
+
const primary = positions[idx];
|
|
2932
|
+
return [primary, ...positions.slice(0, idx), ...positions.slice(idx + 1)];
|
|
2933
|
+
}
|
|
2934
|
+
var sortPositions = (items) => hoistPrimary(sortByDateDesc(items, lexiconDateExtractor));
|
|
2935
|
+
var sortEducation = (items) => sortByDateDesc(items, lexiconDateExtractor);
|
|
2936
|
+
var sortProjects = (items) => sortByActiveDateRange(items);
|
|
2937
|
+
var sortPublications = (items) => sortByDateDesc(items, singleDateExtractor);
|
|
2938
|
+
var sortCertifications = (items) => sortByDateDesc(items, certDateExtractor);
|
|
2939
|
+
var sortHonors = (items) => sortByDateDesc(items, singleDateExtractor);
|
|
2940
|
+
var sortLanguages = (items) => sortLanguagesByProficiency(items);
|
|
2941
|
+
|
|
2942
|
+
// src/profile/involvement-grouping.ts
|
|
2943
|
+
var INVOLVEMENT_HEADING_ORDER = [
|
|
2944
|
+
"Open Source",
|
|
2945
|
+
"Community",
|
|
2946
|
+
"Volunteering",
|
|
2947
|
+
"Civic",
|
|
2948
|
+
"Other"
|
|
2949
|
+
];
|
|
2950
|
+
function groupInvolvementByHeading(items) {
|
|
2951
|
+
const byHeading = /* @__PURE__ */ new Map();
|
|
2952
|
+
for (const item of items) {
|
|
2953
|
+
const heading = getInvolvementKindHeading(item.kind);
|
|
2954
|
+
const bucket = byHeading.get(heading) ?? [];
|
|
2955
|
+
bucket.push(item);
|
|
2956
|
+
byHeading.set(heading, bucket);
|
|
2957
|
+
}
|
|
2958
|
+
const recency = (i) => i.endedAt ?? i.startedAt ?? "";
|
|
2959
|
+
const groups = [];
|
|
2960
|
+
for (const heading of INVOLVEMENT_HEADING_ORDER) {
|
|
2961
|
+
const bucket = byHeading.get(heading);
|
|
2962
|
+
if (!bucket?.length) continue;
|
|
2963
|
+
const sorted = [...bucket].sort((a, b) => recency(b).localeCompare(recency(a)));
|
|
2964
|
+
groups.push({ heading, items: sorted });
|
|
2965
|
+
}
|
|
2966
|
+
return groups;
|
|
2967
|
+
}
|
|
2771
2968
|
function maxGraphemes(max) {
|
|
2772
2969
|
return (value) => {
|
|
2773
2970
|
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -3169,11 +3366,12 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
3169
3366
|
});
|
|
3170
3367
|
|
|
3171
3368
|
// src/index.ts
|
|
3172
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
3369
|
+
var SIFA_SDK_VERSION = "0.12.2";
|
|
3173
3370
|
|
|
3174
3371
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
3175
3372
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
3176
3373
|
exports.ADULT_CONTENT_LABELS = ADULT_CONTENT_LABELS;
|
|
3374
|
+
exports.ALL_SECTIONS = ALL_SECTIONS;
|
|
3177
3375
|
exports.APP_CATEGORIES = APP_CATEGORIES;
|
|
3178
3376
|
exports.APP_CATEGORY_IDS = APP_CATEGORY_IDS;
|
|
3179
3377
|
exports.APP_CATEGORY_MAP = APP_CATEGORY_MAP;
|
|
@@ -3214,6 +3412,7 @@ exports.FollowProfilePageSchema = FollowProfilePageSchema;
|
|
|
3214
3412
|
exports.FollowProfileSchema = FollowProfileSchema;
|
|
3215
3413
|
exports.GraphFollowRecordSchema = GraphFollowRecordSchema;
|
|
3216
3414
|
exports.INDUSTRY_OPTIONS = INDUSTRY_OPTIONS;
|
|
3415
|
+
exports.INVOLVEMENT_HEADING_ORDER = INVOLVEMENT_HEADING_ORDER;
|
|
3217
3416
|
exports.INVOLVEMENT_KIND_HEADINGS = INVOLVEMENT_KIND_HEADINGS;
|
|
3218
3417
|
exports.INVOLVEMENT_KIND_LABELS = INVOLVEMENT_KIND_LABELS;
|
|
3219
3418
|
exports.INVOLVEMENT_KIND_OPTIONS = INVOLVEMENT_KIND_OPTIONS;
|
|
@@ -3248,6 +3447,8 @@ exports.ProfileSelfRecordSchema = ProfileSelfRecordSchema;
|
|
|
3248
3447
|
exports.ProfileSkillRecordSchema = ProfileSkillRecordSchema;
|
|
3249
3448
|
exports.ProfileVolunteeringRecordSchema = ProfileVolunteeringRecordSchema;
|
|
3250
3449
|
exports.PublicationAuthorSchema = PublicationAuthorSchema;
|
|
3450
|
+
exports.SECTION_GROUPS = SECTION_GROUPS;
|
|
3451
|
+
exports.SECTION_LABELS = SECTION_LABELS;
|
|
3251
3452
|
exports.SIFA_SDK_VERSION = SIFA_SDK_VERSION;
|
|
3252
3453
|
exports.SKILL_CATEGORIES = SKILL_CATEGORIES;
|
|
3253
3454
|
exports.STANDARD_PUBLISHER_ID = STANDARD_PUBLISHER_ID;
|
|
@@ -3277,12 +3478,15 @@ exports.encodeFeedCursor = encodeFeedCursor;
|
|
|
3277
3478
|
exports.entityDisambiguationLabel = entityDisambiguationLabel;
|
|
3278
3479
|
exports.entityResultKey = entityResultKey;
|
|
3279
3480
|
exports.externalRecordRefSchema = externalRecordRefSchema;
|
|
3481
|
+
exports.filterHidden = filterHidden;
|
|
3280
3482
|
exports.findIndustry = findIndustry;
|
|
3281
3483
|
exports.formatCompanyName = formatCompanyName;
|
|
3484
|
+
exports.formatDateRange = formatDateRange;
|
|
3282
3485
|
exports.formatDistanceToNow = formatDistanceToNow;
|
|
3283
3486
|
exports.formatLocation = formatLocation;
|
|
3284
3487
|
exports.formatPresentationDuration = formatPresentationDuration;
|
|
3285
3488
|
exports.formatRelativeTime = formatRelativeTime;
|
|
3489
|
+
exports.formatTimelineDate = formatTimelineDate;
|
|
3286
3490
|
exports.getActivityTaxonomyVersion = getActivityTaxonomyVersion;
|
|
3287
3491
|
exports.getActivityTier = getActivityTier;
|
|
3288
3492
|
exports.getAppCategoryIcon = getAppCategoryIcon;
|
|
@@ -3310,9 +3514,12 @@ exports.getPublisherById = getPublisherById;
|
|
|
3310
3514
|
exports.getPublisherFromSiteUrl = getPublisherFromSiteUrl;
|
|
3311
3515
|
exports.getTierMeta = getTierMeta;
|
|
3312
3516
|
exports.getVerificationProvider = getVerificationProvider;
|
|
3517
|
+
exports.getVisibleSectionIds = getVisibleSectionIds;
|
|
3313
3518
|
exports.getWorkplaceTypeLabel = getWorkplaceTypeLabel;
|
|
3519
|
+
exports.groupInvolvementByHeading = groupInvolvementByHeading;
|
|
3314
3520
|
exports.groupSkillsByCategory = groupSkillsByCategory;
|
|
3315
3521
|
exports.hasAdultContent = hasAdultContent;
|
|
3522
|
+
exports.hoistPrimary = hoistPrimary;
|
|
3316
3523
|
exports.isAppCategory = isAppCategory;
|
|
3317
3524
|
exports.isCompanyRequired = isCompanyRequired;
|
|
3318
3525
|
exports.isKnownAppId = isKnownAppId;
|
|
@@ -3320,6 +3527,7 @@ exports.isKnownPlatform = isKnownPlatform;
|
|
|
3320
3527
|
exports.isKnownVerificationProvider = isKnownVerificationProvider;
|
|
3321
3528
|
exports.isLinked = isLinked;
|
|
3322
3529
|
exports.isPseudoEmployer = isPseudoEmployer;
|
|
3530
|
+
exports.isSectionPopulated = isSectionPopulated;
|
|
3323
3531
|
exports.isValidRgbColor = isValidRgbColor;
|
|
3324
3532
|
exports.isVisibleActivityItem = isVisibleActivityItem;
|
|
3325
3533
|
exports.languageTagSchema = languageTagSchema;
|
|
@@ -3358,11 +3566,21 @@ exports.sanitizeHandleInput = sanitizeHandleInput;
|
|
|
3358
3566
|
exports.searchResultDisambiguation = searchResultDisambiguation;
|
|
3359
3567
|
exports.selfLabelsSchema = selfLabelsSchema;
|
|
3360
3568
|
exports.singleDateExtractor = singleDateExtractor;
|
|
3569
|
+
exports.sortByActiveDateRange = sortByActiveDateRange;
|
|
3361
3570
|
exports.sortByDateDesc = sortByDateDesc;
|
|
3571
|
+
exports.sortCertifications = sortCertifications;
|
|
3572
|
+
exports.sortEducation = sortEducation;
|
|
3573
|
+
exports.sortHonors = sortHonors;
|
|
3574
|
+
exports.sortLanguages = sortLanguages;
|
|
3575
|
+
exports.sortLanguagesByProficiency = sortLanguagesByProficiency;
|
|
3576
|
+
exports.sortPositions = sortPositions;
|
|
3577
|
+
exports.sortProjects = sortProjects;
|
|
3578
|
+
exports.sortPublications = sortPublications;
|
|
3362
3579
|
exports.stripHtmlToText = stripHtmlToText;
|
|
3363
3580
|
exports.strongRefSchema = strongRefSchema;
|
|
3364
3581
|
exports.summarizePresentationDeliveries = summarizePresentationDeliveries;
|
|
3365
3582
|
exports.truncateGraphemes = truncateGraphemes;
|
|
3366
3583
|
exports.uriSchema = uriSchema;
|
|
3584
|
+
exports.visibleItems = visibleItems;
|
|
3367
3585
|
//# sourceMappingURL=index.cjs.map
|
|
3368
3586
|
//# sourceMappingURL=index.cjs.map
|