qlu-20-ui-library 1.9.1 → 1.9.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.
@@ -0,0 +1,8 @@
1
+ type ContentLockedProps = {
2
+ title?: string;
3
+ description?: string;
4
+ buttonText?: string;
5
+ onUpgradeClick?: () => void;
6
+ };
7
+ declare function ContentLocked({ title, description, buttonText, onUpgradeClick, }: ContentLockedProps): import("react/jsx-runtime").JSX.Element;
8
+ export default ContentLocked;
@@ -13,6 +13,8 @@ interface PersonViewBodyProps {
13
13
  scrollToEducation?: boolean;
14
14
  dataCy?: string;
15
15
  productsObject: IMultiTypeFilterPayload<IPillTypePayload<ProductData>>;
16
+ hasSubscription?: boolean;
17
+ onUpgradeClick?: () => void;
16
18
  }
17
19
  declare const PersonViewBody: React.FC<PersonViewBodyProps>;
18
20
  export default PersonViewBody;
@@ -13,6 +13,8 @@ interface PersonViewExperienceCardProps {
13
13
  isSummaryView?: boolean;
14
14
  dataCy?: string;
15
15
  productsObject?: IMultiTypeFilterPayload<IPillTypePayload<ProductData>>;
16
+ isBlurred?: boolean;
17
+ onUpgradeClick?: () => void;
16
18
  }
17
19
  declare const PersonViewExperienceCard: React.FC<PersonViewExperienceCardProps>;
18
20
  export default PersonViewExperienceCard;
@@ -16,6 +16,8 @@ interface PersonViewSummaryProps {
16
16
  dataCy?: string;
17
17
  isSummaryView?: boolean;
18
18
  productsObject?: IMultiTypeFilterPayload<IPillTypePayload<ProductData>>;
19
+ hasSubscription?: boolean;
20
+ onUpgradeClick?: () => void;
19
21
  }
20
- declare const PersonViewSummary: ({ about, experience, totalExperience, education, onCompanyNameClick, industries, isIndustryLoading, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading, scrollToEducation, dataCy, isSummaryView, productsObject, }: PersonViewSummaryProps) => import("react/jsx-runtime").JSX.Element;
22
+ declare const PersonViewSummary: ({ about, experience, totalExperience, education, onCompanyNameClick, industries, isIndustryLoading, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading, scrollToEducation, dataCy, isSummaryView, productsObject, hasSubscription, onUpgradeClick, }: PersonViewSummaryProps) => import("react/jsx-runtime").JSX.Element;
21
23
  export default PersonViewSummary;
@@ -55,6 +55,7 @@ export { default as PersonCompanyNameClickable } from "./PersonCompanyNameClicka
55
55
  export { default as PersonViewBody } from "./PersonView/PersonViewBody";
56
56
  export { default as PersonViewInfo } from "./PersonView/PersonViewInfo";
57
57
  export { default as PersonViewExperienceCard } from "./PersonView/PersonViewExperienceCard";
58
+ export { default as ContentLocked } from "./ContentLocked/ContentLocked";
58
59
  export { default as PersonViewExperienceDetails } from "./PersonView/PersonViewExperienceDetails";
59
60
  export { default as PersonViewHeader } from "./PersonView/PersonViewHeader";
60
61
  export { default as PersonViewSummary } from "./PersonView/PersonViewSummary";
@@ -0,0 +1,8 @@
1
+ type ContentLockedProps = {
2
+ title?: string;
3
+ description?: string;
4
+ buttonText?: string;
5
+ onUpgradeClick?: () => void;
6
+ };
7
+ declare function ContentLocked({ title, description, buttonText, onUpgradeClick, }: ContentLockedProps): import("react/jsx-runtime").JSX.Element;
8
+ export default ContentLocked;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { GetSvgIcon, PrimaryButton } from "..";
3
+ import styles from "./styles.module.scss";
4
+ function ContentLocked({ title = "Content Locked", description = "Upgrade your plan to get access to this content", buttonText = "Upgrade Plan", onUpgradeClick, }) {
5
+ return (_jsx("div", { className: styles.contentLockedContainer, children: _jsxs("div", { className: styles.contentLockedContent, children: [_jsx("div", { className: styles.contentLockedIcon, children: _jsx(GetSvgIcon, { iconType: "lock", iconSize: "24" }) }), _jsxs("div", { children: [_jsx("h2", { className: styles.contentLockedTitle, children: title }), _jsx("p", { className: styles.contentLockedDescription, children: description })] }), _jsx(PrimaryButton, { sizeVariant: "base", colorVariant: "orange", onClick: onUpgradeClick, children: buttonText })] }) }));
6
+ }
7
+ export default ContentLocked;
@@ -0,0 +1,2 @@
1
+ import ContentLocked from "./ContentLocked";
2
+ export default ContentLocked;
@@ -0,0 +1,2 @@
1
+ import ContentLocked from "./ContentLocked";
2
+ export default ContentLocked;
@@ -13,6 +13,8 @@ interface PersonViewBodyProps {
13
13
  scrollToEducation?: boolean;
14
14
  dataCy?: string;
15
15
  productsObject: IMultiTypeFilterPayload<IPillTypePayload<ProductData>>;
16
+ hasSubscription?: boolean;
17
+ onUpgradeClick?: () => void;
16
18
  }
17
19
  declare const PersonViewBody: React.FC<PersonViewBodyProps>;
18
20
  export default PersonViewBody;
@@ -6,10 +6,18 @@ const PersonViewBody = ({ personViewActiveTab = "Experience", personViewSummaryP
6
6
  experience: dummyExpPayload,
7
7
  education: dummyEduPayload,
8
8
  totalExperience: "",
9
- }, onCompanyNameClick, industries = [], isIndustryLoading = false, filterIndustries = [], filterSkills = [], filterProducts = [], isExpIndustriesLoading = false, scrollToEducation = false, dataCy, productsObject, }) => {
9
+ }, onCompanyNameClick, industries = [], isIndustryLoading = false, filterIndustries = [], filterSkills = [], filterProducts = [], isExpIndustriesLoading = false, scrollToEducation = false, dataCy, productsObject, hasSubscription, onUpgradeClick, }) => {
10
+ // Filter data based on subscription status
11
+ const filteredExperience = hasSubscription
12
+ ? personViewSummaryPayload.experience
13
+ : personViewSummaryPayload.experience?.slice(0, 3);
14
+ // For free users, don't pass education data since the section is hidden
15
+ const filteredEducation = hasSubscription
16
+ ? personViewSummaryPayload.education
17
+ : undefined;
10
18
  switch (personViewActiveTab) {
11
19
  case "Experience":
12
- return (_jsx(PersonViewSummary, { about: personViewSummaryPayload.about, experience: personViewSummaryPayload.experience, education: personViewSummaryPayload.education, onCompanyNameClick: onCompanyNameClick ? onCompanyNameClick : () => { }, totalExperience: personViewSummaryPayload.totalExperience, industries: industries, isIndustryLoading: isIndustryLoading, filterIndustries: filterIndustries, filterSkills: filterSkills, filterProducts: filterProducts, isExpIndustriesLoading: isExpIndustriesLoading, scrollToEducation: scrollToEducation, dataCy: dataCy, productsObject: productsObject }));
20
+ return (_jsx(PersonViewSummary, { about: personViewSummaryPayload.about, experience: filteredExperience, education: filteredEducation, onCompanyNameClick: onCompanyNameClick ? onCompanyNameClick : () => { }, totalExperience: personViewSummaryPayload.totalExperience, industries: industries, isIndustryLoading: isIndustryLoading, filterIndustries: filterIndustries, filterSkills: filterSkills, filterProducts: filterProducts, isExpIndustriesLoading: isExpIndustriesLoading, scrollToEducation: scrollToEducation, dataCy: dataCy, productsObject: productsObject, hasSubscription: hasSubscription, onUpgradeClick: onUpgradeClick }));
13
21
  default:
14
22
  return _jsx(_Fragment, {});
15
23
  }
@@ -14,6 +14,8 @@ interface PersonViewExperienceCardProps {
14
14
  isSummaryView?: boolean;
15
15
  dataCy?: string;
16
16
  productsObject?: IMultiTypeFilterPayload<IPillTypePayload<ProductData>>;
17
+ isBlurred?: boolean;
18
+ onUpgradeClick?: () => void;
17
19
  }
18
20
  declare const PersonViewExperienceCard: React.FC<PersonViewExperienceCardProps>;
19
21
  export default PersonViewExperienceCard;
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "./style.scss";
3
3
  import RectangularIcon from "../../RectangularIcon";
4
4
  import PersonViewExperienceDetails from "../PersonViewExperienceDetails";
5
+ import { ContentLocked } from "../..";
5
6
  import clsx from "clsx";
6
- const PersonViewExperienceCard = ({ companyLogo = "", experienceDetails = [], onCompanyNameClick, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading = false, companyExp, isSummaryView = false, dataCy, productsObject, }) => {
7
+ const PersonViewExperienceCard = ({ companyLogo = "", experienceDetails = [], onCompanyNameClick, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading = false, companyExp, isSummaryView = false, dataCy, productsObject, isBlurred = false, onUpgradeClick, }) => {
7
8
  const groupedExperiences = {};
8
9
  experienceDetails.forEach((experience) => {
9
10
  const { companyName } = experience;
@@ -12,16 +13,19 @@ const PersonViewExperienceCard = ({ companyLogo = "", experienceDetails = [], on
12
13
  }
13
14
  groupedExperiences[companyName].push(experience);
14
15
  });
15
- return (_jsx("div", { className: "personViewExperienceCard--Generic", children: Object.entries(groupedExperiences).map(([companyName, experiences]) => {
16
- const hasMultipleExperiences = experiences.length > 1;
17
- return (_jsx("div", { children: experiences.map((experience, key) => {
18
- return (_jsxs("div", { className: "parentDiv", children: [_jsxs("div", { className: "leftDiv", children: [key === 0 && (_jsx(RectangularIcon, { iconPath: companyLogo, altImageType: "company", iconSize: "48", placeholderSize: 40 })), hasMultipleExperiences && key < experiences.length - 1 && (_jsx("div", { className: "divider" }))] }), _jsx("div", { className: clsx("experienceItem", {
19
- withBullet: hasMultipleExperiences,
20
- }), children: _jsx(PersonViewExperienceDetails, { showCompanyName: hasMultipleExperiences && key === 0, experienceDetails: {
21
- ...experience,
22
- location: experience.location,
23
- }, onCompanyNameClick: onCompanyNameClick, filterIndustries: filterIndustries, filterSkills: filterSkills, filterProducts: filterProducts, isExpIndustriesLoading: isExpIndustriesLoading, singleExperience: !hasMultipleExperiences, companyExp: companyExp, isSummaryView: isSummaryView, dataCy: dataCy, productsObject: productsObject }) })] }, key));
24
- }) }, companyName));
25
- }) }));
16
+ const blurClass = clsx("personViewExperienceCard--Generic", {
17
+ "personViewExperienceCard--Blurred": isBlurred,
18
+ });
19
+ return (_jsxs("div", { className: blurClass, children: [Object.entries(groupedExperiences).map(([companyName, experiences]) => {
20
+ const hasMultipleExperiences = experiences.length > 1;
21
+ return (_jsx("div", { children: experiences.map((experience, key) => {
22
+ return (_jsxs("div", { className: "parentDiv", children: [_jsxs("div", { className: "leftDiv", children: [key === 0 && (_jsx(RectangularIcon, { iconPath: companyLogo, altImageType: "company", iconSize: "48", placeholderSize: 40 })), hasMultipleExperiences && key < experiences.length - 1 && (_jsx("div", { className: "divider" }))] }), _jsx("div", { className: clsx("experienceItem", {
23
+ withBullet: hasMultipleExperiences,
24
+ }), children: _jsx(PersonViewExperienceDetails, { showCompanyName: hasMultipleExperiences && key === 0, experienceDetails: {
25
+ ...experience,
26
+ location: experience.location,
27
+ }, onCompanyNameClick: onCompanyNameClick, filterIndustries: filterIndustries, filterSkills: filterSkills, filterProducts: filterProducts, isExpIndustriesLoading: isExpIndustriesLoading, singleExperience: !hasMultipleExperiences, companyExp: companyExp, isSummaryView: isSummaryView, dataCy: dataCy, productsObject: productsObject }) })] }, key));
28
+ }) }, companyName));
29
+ }), isBlurred && onUpgradeClick && (_jsx("div", { className: "personViewExperienceCard--ContentLockedOverlay", children: _jsx(ContentLocked, { title: "Unlock full profile experience", description: "Upgrade to explore the full career journey and experience details of this profile", buttonText: "Upgrade Plan", onUpgradeClick: onUpgradeClick }) }))] }));
26
30
  };
27
31
  export default PersonViewExperienceCard;
@@ -17,6 +17,8 @@ interface PersonViewSummaryProps {
17
17
  dataCy?: string;
18
18
  isSummaryView?: boolean;
19
19
  productsObject?: IMultiTypeFilterPayload<IPillTypePayload<ProductData>>;
20
+ hasSubscription?: boolean;
21
+ onUpgradeClick?: () => void;
20
22
  }
21
- declare const PersonViewSummary: ({ about, experience, totalExperience, education, onCompanyNameClick, industries, isIndustryLoading, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading, scrollToEducation, dataCy, isSummaryView, productsObject, }: PersonViewSummaryProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const PersonViewSummary: ({ about, experience, totalExperience, education, onCompanyNameClick, industries, isIndustryLoading, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading, scrollToEducation, dataCy, isSummaryView, productsObject, hasSubscription, onUpgradeClick, }: PersonViewSummaryProps) => import("react/jsx-runtime").JSX.Element;
22
24
  export default PersonViewSummary;
@@ -6,7 +6,7 @@ import PersonViewEducationCard from "../PersonViewEducationCard";
6
6
  import { ClickableText, Loader, SkillIndustryBadge, Tooltip } from "../..";
7
7
  import { detectEntitiesInDescription, detectEntitiesInDescriptionWithSlop, highlightRichTextWithSlop, splitTruncatedTextByKeyWordsWithSlop, } from "../../../utils";
8
8
  import { useEffect, useState, useRef } from "react";
9
- const PersonViewSummary = ({ about = "", experience = [], totalExperience = "", education = [], onCompanyNameClick, industries, isIndustryLoading = false, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading = false, scrollToEducation = false, dataCy, isSummaryView, productsObject, }) => {
9
+ const PersonViewSummary = ({ about = "", experience = [], totalExperience = "", education = [], onCompanyNameClick, industries, isIndustryLoading = false, filterIndustries, filterSkills, filterProducts, isExpIndustriesLoading = false, scrollToEducation = false, dataCy, isSummaryView, productsObject, hasSubscription, onUpgradeClick, }) => {
10
10
  const [hoveredPill, setHoveredPill] = useState(null);
11
11
  const [showMore, setShowMore] = useState(false);
12
12
  const educationRef = useRef(null);
@@ -55,7 +55,8 @@ const PersonViewSummary = ({ about = "", experience = [], totalExperience = "",
55
55
  onCompanyNameClick &&
56
56
  experience?.length !== 0;
57
57
  return (_jsx("div", { className: "personViewSummary--Generic", children: _jsxs("div", { className: isAboutNA, children: [about.toLowerCase() !== "not available" && !isSummaryView && (_jsx("h2", { children: "About" })), about.toLowerCase() !== "not available" && (_jsxs("div", { id: "personViewSummary-About-Text", "data-cy": `${dataCy}-about-section`, children: [_jsxs("span", { children: [showMore ? highlightedText : truncatedTextHighlighted, !showMore && isTruncated && "..."] }), isTruncated && (_jsx("div", { className: "clickableTextWrapper", children: _jsx(ClickableText, { text: showMore ? "‎ See less" : "See more", onClick: handleToggleShowMore, sizeVariant: "base" }) })), shouldShowMatchedKeywords && (_jsx("div", { className: "personViewExperienceDetails--MatchedKeywordsAbout", children: isIndustryLoading ? (_jsx(Loader, { width: "24", height: "24" })) : (_jsxs(_Fragment, { children: [aboutSectionProducts.length > 0 && (_jsxs("span", { className: "personViewExperienceDetails--SkillsAndIndustries", children: [_jsx("h2", { children: "COMPANY PRODUCT:" }), _jsx("span", { children: aboutSectionProducts.map((product, key) => (_jsx(Tooltip, { content: 'Extracted from "About"', toolTipPosition: "bottom", children: _jsx(SkillIndustryBadge, { highlight: handleHoverPill, highlightPill: false, text: product }) }, `industry-${key}`))) })] })), industries.length > 0 && (_jsxs("span", { className: "personViewExperienceDetails--SkillsAndIndustries", children: [_jsx("h2", { children: "INDUSTRIES MATCHED:" }), _jsx("span", { children: industries.map((industry, key) => (_jsx(Tooltip, { content: 'Extracted from "About"', toolTipPosition: "bottom", children: _jsx(SkillIndustryBadge, { highlight: handleHoverPill, highlightPill: true, text: industry, type: "industry" }) }, `industry-${key}`))) })] })), aboutSectionSkills.length > 0 && (_jsxs("span", { className: "personViewExperienceDetails--SkillsAndIndustries", children: [_jsx("h2", { children: "KEYWORDS/SKILLS:" }), _jsx("span", { children: aboutSectionSkills.map((skill, key) => (_jsx(Tooltip, { content: 'Extracted from "About"', toolTipPosition: "bottom", children: _jsx(SkillIndustryBadge, { highlight: handleHoverPill, highlightPill: true, text: skill, type: "skill" }) }, `skill-${key}`))) })] }))] })) }))] })), showExperience && (_jsxs("div", { className: "personViewSummary-Experience", "data-cy": `${dataCy}-experience-section`, children: [_jsx("h2", { children: "Work Experience" }), totalExperience && (_jsxs("span", { className: "totalExperience", children: ["Total: ", totalExperience] })), experience?.map((companyExp, key) => {
58
- return (_jsx(PersonViewExperienceCard, { companyLogo: companyExp?.companyLogo, experienceDetails: companyExp?.experienceDetails, onCompanyNameClick: onCompanyNameClick, filterIndustries: filterIndustries, filterSkills: filterSkills, filterProducts: filterProducts, isExpIndustriesLoading: isExpIndustriesLoading, companyExp: companyExp, isNoSkillsOrIndustries: false, dataCy: `${dataCy}-experience-section`, productsObject: productsObject }, key));
58
+ const isBlurred = !hasSubscription && key === 2;
59
+ return (_jsx(PersonViewExperienceCard, { companyLogo: companyExp?.companyLogo, experienceDetails: companyExp?.experienceDetails, onCompanyNameClick: onCompanyNameClick, filterIndustries: filterIndustries, filterSkills: filterSkills, filterProducts: filterProducts, isExpIndustriesLoading: isExpIndustriesLoading, companyExp: companyExp, isNoSkillsOrIndustries: false, dataCy: `${dataCy}-experience-section`, productsObject: productsObject, isBlurred: isBlurred, onUpgradeClick: onUpgradeClick }, key));
59
60
  })] })), !isSummaryView && education?.length !== 0 && (_jsxs("div", { ref: educationRef, className: "personViewSummary-Education", "data-cy": `${dataCy}-education-section`, children: [_jsx("h2", { children: "Education" }), education?.map((edu) => {
60
61
  return (_jsx(PersonViewEducationCard, { education: edu }, edu?.index));
61
62
  })] }))] }) }));
@@ -55,6 +55,7 @@ export { default as PersonCompanyNameClickable } from "./PersonCompanyNameClicka
55
55
  export { default as PersonViewBody } from "./PersonView/PersonViewBody";
56
56
  export { default as PersonViewInfo } from "./PersonView/PersonViewInfo";
57
57
  export { default as PersonViewExperienceCard } from "./PersonView/PersonViewExperienceCard";
58
+ export { default as ContentLocked } from "./ContentLocked/ContentLocked";
58
59
  export { default as PersonViewExperienceDetails } from "./PersonView/PersonViewExperienceDetails";
59
60
  export { default as PersonViewHeader } from "./PersonView/PersonViewHeader";
60
61
  export { default as PersonViewSummary } from "./PersonView/PersonViewSummary";
@@ -55,6 +55,7 @@ export { default as PersonCompanyNameClickable } from "./PersonCompanyNameClicka
55
55
  export { default as PersonViewBody } from "./PersonView/PersonViewBody";
56
56
  export { default as PersonViewInfo } from "./PersonView/PersonViewInfo";
57
57
  export { default as PersonViewExperienceCard } from "./PersonView/PersonViewExperienceCard";
58
+ export { default as ContentLocked } from "./ContentLocked/ContentLocked";
58
59
  export { default as PersonViewExperienceDetails } from "./PersonView/PersonViewExperienceDetails";
59
60
  export { default as PersonViewHeader } from "./PersonView/PersonViewHeader";
60
61
  export { default as PersonViewSummary } from "./PersonView/PersonViewSummary";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlu-20-ui-library",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",