@singi-labs/sifa-sdk 0.18.17 → 0.18.18

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.js CHANGED
@@ -5458,7 +5458,13 @@ function pickTalk(presentations, deliveries, today, self) {
5458
5458
  const date = dated.reduce((max, d) => d.date && d.date > max ? d.date : max, "");
5459
5459
  const delivery2 = dated.find((d) => d.date === date);
5460
5460
  if (!delivery2) continue;
5461
- occasions.push({ date, title: p.title, delivery: delivery2, imageUrl: p.coverImageUrl ?? void 0 });
5461
+ occasions.push({
5462
+ date,
5463
+ title: p.title,
5464
+ delivery: delivery2,
5465
+ imageUrl: p.coverImageUrl ?? void 0,
5466
+ primary: p.primary === true
5467
+ });
5462
5468
  }
5463
5469
  for (const d of deliveries) {
5464
5470
  const standalone = !d.presentationRkey || !talkRkeys.has(d.presentationRkey);
@@ -5466,7 +5472,9 @@ function pickTalk(presentations, deliveries, today, self) {
5466
5472
  occasions.push({ date: d.date, title: d.title || d.eventName || "Talk", delivery: d });
5467
5473
  }
5468
5474
  if (!occasions.length) return void 0;
5469
- const best = occasions.reduce((a, b) => b.date > a.date ? b : a);
5475
+ const primaryOccasions = occasions.filter((o) => o.primary);
5476
+ const pool = primaryOccasions.length ? primaryOccasions : occasions;
5477
+ const best = pool.reduce((a, b) => b.date > a.date ? b : a);
5470
5478
  const { delivery } = best;
5471
5479
  return {
5472
5480
  section: "talk",
@@ -5495,7 +5503,8 @@ function buildProfileHighlights(profile, { today }) {
5495
5503
  self
5496
5504
  );
5497
5505
  if (talk) row1.push(talk);
5498
- const publication = sortByDateDesc(visible(profile.publications), singleDateExtractor)[0];
5506
+ const visiblePublications = visible(profile.publications);
5507
+ const publication = pickPrimaryFlagged(visiblePublications) ?? sortByDateDesc(visiblePublications, singleDateExtractor)[0];
5499
5508
  if (publication) {
5500
5509
  const venue = publication.publicationName ?? publication.publisher;
5501
5510
  const coAuthors = coPeopleLabel(publication.contributors, self);
@@ -5522,7 +5531,8 @@ function buildProfileHighlights(profile, { today }) {
5522
5531
  status: career.endedAt ? "recent" : "current"
5523
5532
  });
5524
5533
  }
5525
- const education = sortByDateDesc(visible(profile.education), lexiconDateExtractor)[0];
5534
+ const visibleEducation = visible(profile.education);
5535
+ const education = pickPrimaryFlagged(visibleEducation) ?? sortByDateDesc(visibleEducation, lexiconDateExtractor)[0];
5526
5536
  if (education) {
5527
5537
  const institution = education.entityName ?? education.institution;
5528
5538
  const title = education.degree || education.fieldOfStudy || institution || "Education";
@@ -5548,7 +5558,7 @@ function buildProfileHighlights(profile, { today }) {
5548
5558
  }
5549
5559
  }
5550
5560
  const ongoingProjects = visible(profile.projects).filter((p) => !p.endDate);
5551
- const project = sortByDateDesc(ongoingProjects, dateRangeExtractor)[0];
5561
+ const project = pickPrimaryFlagged(ongoingProjects) ?? sortByDateDesc(ongoingProjects, dateRangeExtractor)[0];
5552
5562
  if (project) {
5553
5563
  row2.push({
5554
5564
  section: "project",
@@ -5560,7 +5570,7 @@ function buildProfileHighlights(profile, { today }) {
5560
5570
  });
5561
5571
  }
5562
5572
  const ongoingInvolvement = visible(profile.involvement).filter((i) => !i.endedAt);
5563
- const involvement = sortByDateDesc(ongoingInvolvement, lexiconDateExtractor)[0];
5573
+ const involvement = pickPrimaryFlagged(ongoingInvolvement) ?? sortByDateDesc(ongoingInvolvement, lexiconDateExtractor)[0];
5564
5574
  if (involvement) {
5565
5575
  row2.push({
5566
5576
  section: "involvement",
@@ -6405,7 +6415,7 @@ function describeSifaRecord(collection, value) {
6405
6415
  }
6406
6416
 
6407
6417
  // src/index.ts
6408
- var SIFA_SDK_VERSION = "0.18.17";
6418
+ var SIFA_SDK_VERSION = "0.18.18";
6409
6419
 
6410
6420
  export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, SECTION_GROUPS, SECTION_LABELS, SELF_APP_ID, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, actorShowsIdentity, agentRefSchema, atUriSchema, buildMetaDescription, buildProfileHighlights, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, excludeSelfApp, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatEventDate, formatLocation, formatPresentationDuration, formatRelativeTime, formatSingleDate, formatSpanDate, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isRoleLineRedundant, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryFlagged, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveAgentRef, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, shouldRenderHighlights, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
6411
6421
  //# sourceMappingURL=index.js.map