@edx/track-selection-plugin 1.1.1 → 1.2.1
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/AuditCard.js +101 -0
- package/dist/AuditCard.js.map +1 -0
- package/dist/EarnCertificateCard.js +152 -0
- package/dist/EarnCertificateCard.js.map +1 -0
- package/dist/EarnCertificateModal.js +155 -0
- package/dist/EarnCertificateModal.js.map +1 -0
- package/dist/EarnCertificateModal.scss +112 -0
- package/dist/EdxLogo.js +42 -0
- package/dist/EdxLogo.js.map +1 -0
- package/dist/OdysseyParts.js +135 -0
- package/dist/OdysseyParts.js.map +1 -0
- package/dist/ProgramCard.js +230 -0
- package/dist/ProgramCard.js.map +1 -0
- package/dist/TrackSelection.js +15 -5
- package/dist/TrackSelection.js.map +1 -1
- package/dist/TrackSelectionOdyssey.js +317 -0
- package/dist/TrackSelectionOdyssey.js.map +1 -0
- package/dist/TrackSelectionOdyssey.scss +15 -0
- package/dist/assets/certificate-sample.png +0 -0
- package/dist/data/api.js +16 -7
- package/dist/data/api.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/messages.js +300 -0
- package/dist/messages.js.map +1 -1
- package/dist/trackCards.js +48 -0
- package/dist/trackCards.js.map +1 -0
- package/dist/useTrackSelectionActions.js +129 -0
- package/dist/useTrackSelectionActions.js.map +1 -0
- package/dist/utils.js +205 -0
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
package/dist/messages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","names":["_i18n","require","messages","defineMessages","pageTitle","id","defaultMessage","description","earnCertificate","accessCourse","free","upgradeNow","verifiedCertificateLinkLabel","verifiedBulletCertificateLead","verifiedBulletCertificateTrail","verifiedBulletMissionLead","mission","verifiedBulletMissionTrail","auditBulletMaterials","engagementNoteLead","engagementNoteEmphasis","engagementNoteTrail","auditAccessExpires","loading","loadError","submitError","_default","exports"],"sources":["../src/messages.js"],"sourcesContent":["import { defineMessages } from '@edx/frontend-platform/i18n';\n\nconst messages = defineMessages({\n pageTitle: {\n id: 'trackSelection.pageTitle',\n defaultMessage: 'Choose a path for your course in {courseName}',\n description: 'Track selection page heading',\n },\n earnCertificate: {\n id: 'trackSelection.earn-certificate',\n defaultMessage: 'Earn a certificate',\n description: 'Verified track card title on track selection',\n },\n accessCourse: {\n id: 'trackSelection.access-course',\n defaultMessage: 'Access this course',\n description: 'Audit track card title on track selection',\n },\n free: {\n id: 'trackSelection.free',\n defaultMessage: 'FREE',\n description: 'Audit track price label',\n },\n upgradeNow: {\n id: 'trackSelection.upgrade-now',\n defaultMessage: 'Upgrade Now',\n description: 'Verified track CTA on track selection',\n },\n continue: {\n id: 'trackSelection.continue',\n defaultMessage: 'Continue',\n description: 'Audit track CTA on track selection',\n },\n verifiedCertificateLinkLabel: {\n id: 'trackSelection.verified-certificate-link-label',\n defaultMessage: 'verified certificate',\n description: 'Linked phrase in verified track bullet',\n },\n verifiedBulletCertificateLead: {\n id: 'trackSelection.verified-bullet-certificate-lead',\n defaultMessage: 'Showcase a',\n description: 'Start of verified track certificate bullet',\n },\n verifiedBulletCertificateTrail: {\n id: 'trackSelection.verified-bullet-certificate-trail',\n defaultMessage: 'of completion on your resumé to advance your career',\n description: 'End of verified track certificate bullet',\n },\n verifiedBulletMissionLead: {\n id: 'trackSelection.verified-bullet-mission-lead',\n defaultMessage: 'Support our',\n description: 'Start of verified track mission bullet',\n },\n mission: {\n id: 'trackSelection.mission',\n defaultMessage: 'mission',\n description: 'Bold mission word in verified track bullet',\n },\n verifiedBulletMissionTrail: {\n id: 'trackSelection.verified-bullet-mission-trail',\n defaultMessage: 'to increase access to high-quality education for everyone, everywhere',\n description: 'End of verified track mission bullet',\n },\n auditBulletMaterials: {\n id: 'trackSelection.audit-bullet-materials',\n defaultMessage: 'Get access to the course material, including videos and readings',\n description: 'Audit track bullet on track selection',\n },\n engagementNoteLead: {\n id: 'trackSelection.engagement-note-lead',\n defaultMessage: 'Studies show that those who choose this option are',\n description: 'Start of engagement note under verified card',\n },\n engagementNoteEmphasis: {\n id: 'trackSelection.engagement-note-emphasis',\n defaultMessage: 'more engaged and motivated',\n description: 'Bold phrase in engagement note',\n },\n engagementNoteTrail: {\n id: 'trackSelection.engagement-note-trail',\n defaultMessage: 'to complete their courses',\n description: 'End of engagement note under verified card',\n },\n auditAccessExpires: {\n id: 'trackSelection.audit-access-expires',\n defaultMessage: 'Access expires and all progress will be lost on {date}',\n description: 'FBE audit access expiration message on track selection',\n },\n loading: {\n id: 'trackSelection.loading',\n defaultMessage: 'Loading course enrollment options',\n description: 'Screen reader text while track selection data is loading',\n },\n loadError: {\n id: 'trackSelection.load-error',\n defaultMessage: 'We could not load your course enrollment options. Please try again.',\n description: 'Error shown when track selection data cannot be loaded',\n },\n submitError: {\n id: 'trackSelection.submit-error',\n defaultMessage: 'We could not complete your enrollment selection. Please try again.',\n description: 'Error shown when track selection submission fails',\n },\n});\n\nexport default messages;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAMC,QAAQ,GAAG,IAAAC,oBAAc,EAAC;EAC9BC,SAAS,EAAE;IACTC,EAAE,EAAE,0BAA0B;IAC9BC,cAAc,EAAE,+CAA+C;IAC/DC,WAAW,EAAE;EACf,CAAC;EACDC,eAAe,EAAE;IACfH,EAAE,EAAE,iCAAiC;IACrCC,cAAc,EAAE,oBAAoB;IACpCC,WAAW,EAAE;EACf,CAAC;EACDE,YAAY,EAAE;IACZJ,EAAE,EAAE,8BAA8B;IAClCC,cAAc,EAAE,oBAAoB;IACpCC,WAAW,EAAE;EACf,CAAC;EACDG,IAAI,EAAE;IACJL,EAAE,EAAE,qBAAqB;IACzBC,cAAc,EAAE,MAAM;IACtBC,WAAW,EAAE;EACf,CAAC;EACDI,UAAU,EAAE;IACVN,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,aAAa;IAC7BC,WAAW,EAAE;E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,EAAE,wDAAwD;IACxEC,WAAW,EAAE;EACf,CAAC;EACDgB,OAAO,EAAE;IACPlB,EAAE,EAAE,wBAAwB;IAC5BC,cAAc,EAAE,mCAAmC;IACnDC,WAAW,EAAE;EACf,CAAC;EACDiB,SAAS,EAAE;IACTnB,EAAE,EAAE,2BAA2B;IAC/BC,cAAc,EAAE,qEAAqE;IACrFC,WAAW,EAAE;EACf,CAAC;EACDkB,WAAW,EAAE;IACXpB,EAAE,EAAE,6BAA6B;IACjCC,cAAc,EAAE,oEAAoE;IACpFC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,cAEYzB,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"messages.js","names":["_i18n","require","messages","defineMessages","pageTitle","id","defaultMessage","description","earnCertificate","accessCourse","free","upgradeNow","verifiedCertificateLinkLabel","verifiedBulletCertificateLead","verifiedBulletCertificateTrail","verifiedBulletMissionLead","mission","verifiedBulletMissionTrail","auditBulletMaterials","engagementNoteLead","engagementNoteEmphasis","engagementNoteTrail","auditAccessExpires","loading","loadError","submitError","earnModalTitle","earnModalSubtitle","earnBenefitsOf","earnBrandPlus","earnFeaturePricingTitle","earnFeaturePricingText","earnFeatureCertificatesTitle","earnFeatureCertificatesText","earnFeatureChangeTitle","earnFeatureChangeText","earnFeatureTrialTitle","earnFeatureTrialText","earnContinueToCheckout","earnBuyCertificate","odysseyTitle","odysseyPlusTitle","odysseyPlusPrice","odysseyPlusBadge","odysseyPlusImageAlt","odysseyPlusValueAccess","odysseyPlusValueAssignments","odysseyPlusValueCertificates","odysseyPlusValueCareer","odysseyPlusDetailChange","odysseyPlusDetailLinkedIn","odysseyPlusDetailCredit","odysseyPlusDetailLife","odysseyPlusDetailSupport","odysseyPlusCta","odysseyPlusSubscribeCta","odysseyPlusRenewCta","odysseyAuditTitle","odysseyAuditSubtitle","odysseyAuditIncluded","odysseyAuditNoCertificate","odysseyAuditNoGraded","odysseyAuditExpires","odysseyAuditDetailExplore","odysseyAuditDetailPace","odysseyAuditDetailUpgrade","odysseyAuditCta","odysseySeeDetails","earnTitle","earnBadge","earnDiscount","earnOriginalPrice","earnValueCertificate","earnCta","programTitle","programChoose","programCourses","programCertificates","programEnroll","programEnrollDiscounted","programEnrollNoPrice","programDurationMonths","programDurationWeeks","programDiscount","programDiscountUpTo","infoLabel","_default","exports"],"sources":["../src/messages.js"],"sourcesContent":["import { defineMessages } from '@edx/frontend-platform/i18n';\n\nconst messages = defineMessages({\n pageTitle: {\n id: 'trackSelection.pageTitle',\n defaultMessage: 'Choose a path for your course in {courseName}',\n description: 'Track selection page heading',\n },\n earnCertificate: {\n id: 'trackSelection.earn-certificate',\n defaultMessage: 'Earn a certificate',\n description: 'Verified track card title on track selection',\n },\n accessCourse: {\n id: 'trackSelection.access-course',\n defaultMessage: 'Access this course',\n description: 'Audit track card title on track selection',\n },\n free: {\n id: 'trackSelection.free',\n defaultMessage: 'FREE',\n description: 'Audit track price label',\n },\n upgradeNow: {\n id: 'trackSelection.upgrade-now',\n defaultMessage: 'Upgrade Now',\n description: 'Verified track CTA on track selection',\n },\n continue: {\n id: 'trackSelection.continue',\n defaultMessage: 'Continue',\n description: 'Audit track CTA on track selection',\n },\n verifiedCertificateLinkLabel: {\n id: 'trackSelection.verified-certificate-link-label',\n defaultMessage: 'verified certificate',\n description: 'Linked phrase in verified track bullet',\n },\n verifiedBulletCertificateLead: {\n id: 'trackSelection.verified-bullet-certificate-lead',\n defaultMessage: 'Showcase a',\n description: 'Start of verified track certificate bullet',\n },\n verifiedBulletCertificateTrail: {\n id: 'trackSelection.verified-bullet-certificate-trail',\n defaultMessage: 'of completion on your resumé to advance your career',\n description: 'End of verified track certificate bullet',\n },\n verifiedBulletMissionLead: {\n id: 'trackSelection.verified-bullet-mission-lead',\n defaultMessage: 'Support our',\n description: 'Start of verified track mission bullet',\n },\n mission: {\n id: 'trackSelection.mission',\n defaultMessage: 'mission',\n description: 'Bold mission word in verified track bullet',\n },\n verifiedBulletMissionTrail: {\n id: 'trackSelection.verified-bullet-mission-trail',\n defaultMessage: 'to increase access to high-quality education for everyone, everywhere',\n description: 'End of verified track mission bullet',\n },\n auditBulletMaterials: {\n id: 'trackSelection.audit-bullet-materials',\n defaultMessage: 'Get access to the course material, including videos and readings',\n description: 'Audit track bullet on track selection',\n },\n engagementNoteLead: {\n id: 'trackSelection.engagement-note-lead',\n defaultMessage: 'Studies show that those who choose this option are',\n description: 'Start of engagement note under verified card',\n },\n engagementNoteEmphasis: {\n id: 'trackSelection.engagement-note-emphasis',\n defaultMessage: 'more engaged and motivated',\n description: 'Bold phrase in engagement note',\n },\n engagementNoteTrail: {\n id: 'trackSelection.engagement-note-trail',\n defaultMessage: 'to complete their courses',\n description: 'End of engagement note under verified card',\n },\n auditAccessExpires: {\n id: 'trackSelection.audit-access-expires',\n defaultMessage: 'Access expires and all progress will be lost on {date}',\n description: 'FBE audit access expiration message on track selection',\n },\n loading: {\n id: 'trackSelection.loading',\n defaultMessage: 'Loading course enrollment options',\n description: 'Screen reader text while track selection data is loading',\n },\n loadError: {\n id: 'trackSelection.load-error',\n defaultMessage: 'We could not load your course enrollment options. Please try again.',\n description: 'Error shown when track selection data cannot be loaded',\n },\n submitError: {\n id: 'trackSelection.submit-error',\n defaultMessage: 'We could not complete your enrollment selection. Please try again.',\n description: 'Error shown when track selection submission fails',\n },\n earnModalTitle: {\n id: 'trackSelection.earn-modal.title',\n defaultMessage: 'Buy a professional certificate',\n description: 'Heading of the buy-or-subscribe pop-up',\n },\n earnModalSubtitle: {\n id: 'trackSelection.earn-modal.subtitle',\n defaultMessage: 'Or try our subscription plan.',\n description: 'Subheading of the buy-or-subscribe pop-up',\n },\n earnBenefitsOf: {\n id: 'trackSelection.earn-modal.benefits-of',\n defaultMessage: 'Benefits of',\n description: 'Start of the subscription benefits heading, followed by the edX logo and \"Plus\"',\n },\n earnBrandPlus: {\n id: 'trackSelection.earn-modal.brand-plus',\n defaultMessage: 'Plus',\n description: 'Subscription product name shown after the edX logo',\n },\n earnFeaturePricingTitle: {\n id: 'trackSelection.earn-modal.feature-pricing-title',\n defaultMessage: '{introPrice}/month for the first {introMonths, plural, one {month} other {# months}}',\n description: 'Subscription introductory pricing benefit title',\n },\n earnFeaturePricingText: {\n id: 'trackSelection.earn-modal.feature-pricing-text',\n defaultMessage: 'Then pay {monthlyPrice}/month for the rest of your subscription for instant access to {courseCount} courses and programs. ⓘ',\n description: 'Subscription standard pricing and catalog size benefit',\n },\n earnFeatureCertificatesTitle: {\n id: 'trackSelection.earn-modal.feature-certificates-title',\n defaultMessage: 'Earn certificates',\n description: 'Subscription certificates benefit title',\n },\n earnFeatureCertificatesText: {\n id: 'trackSelection.earn-modal.feature-certificates-text',\n defaultMessage: 'There’s no limit to the certificates you can earn and add to your resume.',\n description: 'Subscription certificates benefit description',\n },\n earnFeatureChangeTitle: {\n id: 'trackSelection.earn-modal.feature-change-title',\n defaultMessage: 'Change your course or program at any time',\n description: 'Subscription flexibility benefit title',\n },\n earnFeatureChangeText: {\n id: 'trackSelection.earn-modal.feature-change-text',\n defaultMessage: 'This subscription offers unlimited flexibility. Change topics or courses anytime.',\n description: 'Subscription flexibility benefit description',\n },\n earnFeatureTrialTitle: {\n id: 'trackSelection.earn-modal.feature-trial-title',\n defaultMessage: 'Get your 7-day free trial',\n description: 'Subscription free trial benefit title',\n },\n earnFeatureTrialText: {\n id: 'trackSelection.earn-modal.feature-trial-text',\n defaultMessage: 'Try for free for 7 days to see if a subscription is right for you.',\n description: 'Subscription free trial benefit description',\n },\n earnContinueToCheckout: {\n id: 'trackSelection.earn-modal.continue-to-checkout',\n defaultMessage: 'Continue to checkout',\n description: 'Button leading to the monthly subscription checkout',\n },\n earnBuyCertificate: {\n id: 'trackSelection.earn-modal.buy-certificate',\n defaultMessage: 'Buy certificate for {price}',\n description: 'Button leading to the one-time purchase checkout of the verified certificate of the course',\n },\n odysseyTitle: {\n id: 'trackSelection.odyssey.title',\n defaultMessage: 'Choose your learning path',\n description: 'Heading of the redesigned track selection page',\n },\n odysseyPlusTitle: {\n id: 'trackSelection.odyssey.plus.title',\n defaultMessage: 'Subscribe to edX Plus',\n description: 'Title of the subscription card',\n },\n odysseyPlusPrice: {\n id: 'trackSelection.odyssey.plus.price',\n defaultMessage: '{price}/month',\n description: 'Monthly subscription price on the subscription card',\n },\n odysseyPlusBadge: {\n id: 'trackSelection.odyssey.plus.badge',\n defaultMessage: 'Deep mastery',\n description: 'Badge on the subscription card',\n },\n odysseyPlusImageAlt: {\n id: 'trackSelection.odyssey.plus.image-alt',\n defaultMessage: 'Sample verified certificate',\n description: 'Alt text for the sample certificate image',\n },\n odysseyPlusValueAccess: {\n id: 'trackSelection.odyssey.plus.value.access',\n defaultMessage: '<b>Unlimited access</b> to course materials',\n description: 'Subscription value proposition',\n },\n odysseyPlusValueAssignments: {\n id: 'trackSelection.odyssey.plus.value.assignments',\n defaultMessage: 'Graded and non-graded <b>assignments</b>',\n description: 'Subscription value proposition',\n },\n odysseyPlusValueCertificates: {\n id: 'trackSelection.odyssey.plus.value.certificates',\n defaultMessage: 'Earn <b>multiple</b> verified certificates',\n description: 'Subscription value proposition',\n },\n odysseyPlusValueCareer: {\n id: 'trackSelection.odyssey.plus.value.career',\n defaultMessage: 'Unlock <b>career opportunities</b>',\n description: 'Subscription value proposition',\n },\n odysseyPlusDetailChange: {\n id: 'trackSelection.odyssey.plus.detail.change',\n defaultMessage: 'Change courses at any time',\n description: 'Subscription detail bullet',\n },\n odysseyPlusDetailLinkedIn: {\n id: 'trackSelection.odyssey.plus.detail.linkedin',\n defaultMessage: 'Certificate can be shared on LinkedIn',\n description: 'Subscription detail bullet',\n },\n odysseyPlusDetailCredit: {\n id: 'trackSelection.odyssey.plus.detail.credit',\n defaultMessage: 'Eligible for professional credit',\n description: 'Subscription detail bullet',\n },\n odysseyPlusDetailLife: {\n id: 'trackSelection.odyssey.plus.detail.life',\n defaultMessage: 'Access all course materials for life',\n description: 'Subscription detail bullet',\n },\n odysseyPlusDetailSupport: {\n id: 'trackSelection.odyssey.plus.detail.support',\n defaultMessage: 'Receive instructor support',\n description: 'Subscription detail bullet',\n },\n odysseyPlusCta: {\n id: 'trackSelection.odyssey.plus.cta',\n defaultMessage: 'Start 7-day free trial',\n description: 'Button on the subscription card that opens the buy-or-subscribe pop-up',\n },\n odysseyPlusSubscribeCta: {\n id: 'trackSelection.odyssey.plus.cta.subscribe',\n defaultMessage: 'Subscribe',\n description: 'Button on the subscription card when the learner has no free trial. It opens the buy-or-subscribe pop-up',\n },\n odysseyPlusRenewCta: {\n id: 'trackSelection.odyssey.plus.cta.renew',\n defaultMessage: 'Renew your subscription',\n description: 'Button on the subscription card for a learner whose edX Plus subscription ended. There is no free trial. It opens the buy-or-subscribe pop-up',\n },\n odysseyAuditTitle: {\n id: 'trackSelection.odyssey.audit.title',\n defaultMessage: 'Audit this course',\n description: 'Title of the audit card',\n },\n odysseyAuditSubtitle: {\n id: 'trackSelection.odyssey.audit.subtitle',\n defaultMessage: 'No proof of completion',\n description: 'Subtitle of the audit card',\n },\n odysseyAuditIncluded: {\n id: 'trackSelection.odyssey.audit.included',\n defaultMessage: 'Access <b>non-graded course materials</b>, including videos and supplemental reading.',\n description: 'Audit card included item',\n },\n odysseyAuditNoCertificate: {\n id: 'trackSelection.odyssey.audit.no-certificate',\n defaultMessage: 'You will not receive a certificate of completion or official verification when you complete this course.',\n description: 'Audit card limitation',\n },\n odysseyAuditNoGraded: {\n id: 'trackSelection.odyssey.audit.no-graded',\n defaultMessage: 'You will not be able to access <b>graded course materials.</b>',\n description: 'Audit card limitation',\n },\n odysseyAuditExpires: {\n id: 'trackSelection.odyssey.audit.expires',\n defaultMessage: 'Access will expire on {date}.',\n description: 'Audit card access expiration limitation',\n },\n odysseyAuditDetailExplore: {\n id: 'trackSelection.odyssey.audit.detail.explore',\n defaultMessage: 'Great for exploring new topics',\n description: 'Audit detail bullet',\n },\n odysseyAuditDetailPace: {\n id: 'trackSelection.odyssey.audit.detail.pace',\n defaultMessage: 'Learn at your own pace',\n description: 'Audit detail bullet',\n },\n odysseyAuditDetailUpgrade: {\n id: 'trackSelection.odyssey.audit.detail.upgrade',\n defaultMessage: 'Upgrade to verified track at any time',\n description: 'Audit detail bullet',\n },\n odysseyAuditCta: {\n id: 'trackSelection.odyssey.audit.cta',\n defaultMessage: 'Audit',\n description: 'Button that enrolls the learner in the audit track',\n },\n odysseySeeDetails: {\n id: 'trackSelection.odyssey.see-details',\n defaultMessage: 'See details',\n description: 'Toggle that expands the details of a card',\n },\n earnTitle: {\n id: 'trackSelection.earn.title',\n defaultMessage: 'Earn a certificate',\n description: 'Title of the card that buys a verified certificate',\n },\n earnBadge: {\n id: 'trackSelection.earn.badge',\n defaultMessage: 'Verified track',\n description: 'Badge on the card that buys a verified certificate',\n },\n earnDiscount: {\n id: 'trackSelection.earn.discount',\n defaultMessage: '{percent}% off',\n description: 'Badge on the card that buys a verified certificate: the first purchase discount',\n },\n earnOriginalPrice: {\n id: 'trackSelection.earn.original-price',\n defaultMessage: 'Original price:',\n description: 'Screen reader text before the crossed-out verified certificate price, when a discount lowers it',\n },\n earnValueCertificate: {\n id: 'trackSelection.earn.value.certificate',\n defaultMessage: 'Earn a <b>verified certificate</b>',\n description: 'Verified certificate value proposition',\n },\n earnCta: {\n id: 'trackSelection.earn.cta',\n defaultMessage: 'Earn a certificate',\n description: 'Button that starts the verified certificate purchase',\n },\n programTitle: {\n id: 'trackSelection.program.title',\n defaultMessage: 'Enroll in a program',\n description: 'Title of the card listing programs that include the course',\n },\n programChoose: {\n id: 'trackSelection.program.choose',\n defaultMessage: 'Choose a program:',\n description: 'Heading above the list of programs',\n },\n programCourses: {\n id: 'trackSelection.program.courses',\n defaultMessage: '{count, plural, one {# course} other {# courses}}',\n description: 'Number of courses in a program',\n },\n programCertificates: {\n id: 'trackSelection.program.certificates',\n defaultMessage: 'Earn {count, plural, one {# certificate} other {# certificates}}, one per course:',\n description: 'Heading above the list of program courses that award certificates',\n },\n programEnroll: {\n id: 'trackSelection.program.enroll',\n defaultMessage: 'Enroll for {price}',\n description: 'Button that buys an entire program',\n },\n programEnrollDiscounted: {\n id: 'trackSelection.program.enroll-discounted',\n defaultMessage: 'Enroll for <s>{originalPrice}</s> {price}',\n description: 'Button that buys an entire program, with the original price struck through',\n },\n programEnrollNoPrice: {\n id: 'trackSelection.program.enroll-no-price',\n defaultMessage: 'Enroll in this program',\n description: 'Button that buys an entire program, when its price is not known',\n },\n programDurationMonths: {\n id: 'trackSelection.program.duration-months',\n defaultMessage: '{count, plural, one {# month} other {# months}}',\n description: 'How long a program takes, in months',\n },\n programDurationWeeks: {\n id: 'trackSelection.program.duration-weeks',\n defaultMessage: '{count, plural, one {# week} other {# weeks}}',\n description: 'How long a program takes, in weeks, for a program that takes less than a month',\n },\n programDiscount: {\n id: 'trackSelection.program.discount',\n defaultMessage: '{percent}% off all programs',\n description: 'Badge of the program card: the discount of its programs',\n },\n programDiscountUpTo: {\n id: 'trackSelection.program.discount-up-to',\n defaultMessage: 'Up to {percent}% off',\n description: 'Badge of the program card, when its programs have different discounts',\n },\n infoLabel: {\n id: 'trackSelection.info.label',\n defaultMessage: 'More information',\n description: 'Accessible label of the button that opens an information pop-up',\n },\n});\n\nexport default messages;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAMC,QAAQ,GAAG,IAAAC,oBAAc,EAAC;EAC9BC,SAAS,EAAE;IACTC,EAAE,EAAE,0BAA0B;IAC9BC,cAAc,EAAE,+CAA+C;IAC/DC,WAAW,EAAE;EACf,CAAC;EACDC,eAAe,EAAE;IACfH,EAAE,EAAE,iCAAiC;IACrCC,cAAc,EAAE,oBAAoB;IACpCC,WAAW,EAAE;EACf,CAAC;EACDE,YAAY,EAAE;IACZJ,EAAE,EAAE,8BAA8B;IAClCC,cAAc,EAAE,oBAAoB;IACpCC,WAAW,EAAE;EACf,CAAC;EACDG,IAAI,EAAE;IACJL,EAAE,EAAE,qBAAq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AE,EAAE,+BAA+B;IACnCC,cAAc,EAAE,oBAAoB;IACpCC,WAAW,EAAE;EACf,CAAC;EACDwE,uBAAuB,EAAE;IACvB1E,EAAE,EAAE,0CAA0C;IAC9CC,cAAc,EAAE,2CAA2C;IAC3DC,WAAW,EAAE;EACf,CAAC;EACDyE,oBAAoB,EAAE;IACpB3E,EAAE,EAAE,wCAAwC;IAC5CC,cAAc,EAAE,wBAAwB;IACxCC,WAAW,EAAE;EACf,CAAC;EACD0E,qBAAqB,EAAE;IACrB5E,EAAE,EAAE,wCAAwC;IAC5CC,cAAc,EAAE,iDAAiD;IACjEC,WAAW,EAAE;EACf,CAAC;EACD2E,oBAAoB,EAAE;IACpB7E,EAAE,EAAE,uCAAuC;IAC3CC,cAAc,EAAE,+CAA+C;IAC/DC,WAAW,EAAE;EACf,CAAC;EACD4E,eAAe,EAAE;IACf9E,EAAE,EAAE,iCAAiC;IACrCC,cAAc,EAAE,6BAA6B;IAC7CC,WAAW,EAAE;EACf,CAAC;EACD6E,mBAAmB,EAAE;IACnB/E,EAAE,EAAE,uCAAuC;IAC3CC,cAAc,EAAE,sBAAsB;IACtCC,WAAW,EAAE;EACf,CAAC;EACD8E,SAAS,EAAE;IACThF,EAAE,EAAE,2BAA2B;IAC/BC,cAAc,EAAE,kBAAkB;IAClCC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAAC,IAAA+E,QAAA,GAAAC,OAAA,cAEYrF,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTrackCards = exports.TRACK_CARDS = void 0;
|
|
7
|
+
var _utils = require("./utils");
|
|
8
|
+
var TRACK_CARDS = exports.TRACK_CARDS = {
|
|
9
|
+
EARN: 'earn',
|
|
10
|
+
PROGRAM: 'program',
|
|
11
|
+
PLUS: 'plus',
|
|
12
|
+
AUDIT: 'audit'
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Ordered cards to show for the course state in the track selection data.
|
|
17
|
+
* The API `options` pick Purchase (Earn), Program, Subscribe (Plus) and Audit. An API without
|
|
18
|
+
* `options` offers no subscription, so the page keeps today's Purchase vs Audit.
|
|
19
|
+
*/
|
|
20
|
+
var getTrackCards = exports.getTrackCards = function getTrackCards(data) {
|
|
21
|
+
var _data$options, _data$programs;
|
|
22
|
+
var slugs = (_data$options = data.options) === null || _data$options === void 0 ? void 0 : _data$options.map(function (_ref) {
|
|
23
|
+
var slug = _ref.slug;
|
|
24
|
+
return slug;
|
|
25
|
+
});
|
|
26
|
+
var isOffered = function isOffered(slug, withoutOptions) {
|
|
27
|
+
return slugs ? slugs.includes(slug) : withoutOptions;
|
|
28
|
+
};
|
|
29
|
+
var cards = [];
|
|
30
|
+
|
|
31
|
+
// the Earn card buys the verified mode, so it needs it too
|
|
32
|
+
if (data.verifiedMode && isOffered('purchase', true)) {
|
|
33
|
+
cards.push(TRACK_CARDS.EARN);
|
|
34
|
+
}
|
|
35
|
+
// the card lists the programs of the API, so it needs them too
|
|
36
|
+
if (isOffered('program', true) && (_data$programs = data.programs) !== null && _data$programs !== void 0 && _data$programs.length) {
|
|
37
|
+
cards.push(TRACK_CARDS.PROGRAM);
|
|
38
|
+
}
|
|
39
|
+
// the Plus card leads to the checkout, so it needs a web link to it
|
|
40
|
+
if (isOffered('subscribe', false) && (0, _utils.getOptionUrl)(data.options, 'subscribe')) {
|
|
41
|
+
cards.push(TRACK_CARDS.PLUS);
|
|
42
|
+
}
|
|
43
|
+
if (isOffered('audit', Boolean(data.auditMode))) {
|
|
44
|
+
cards.push(TRACK_CARDS.AUDIT);
|
|
45
|
+
}
|
|
46
|
+
return cards;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=trackCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackCards.js","names":["_utils","require","TRACK_CARDS","exports","EARN","PROGRAM","PLUS","AUDIT","getTrackCards","data","_data$options","_data$programs","slugs","options","map","_ref","slug","isOffered","withoutOptions","includes","cards","verifiedMode","push","programs","length","getOptionUrl","Boolean","auditMode"],"sources":["../src/trackCards.js"],"sourcesContent":["import { getOptionUrl } from './utils';\n\nexport const TRACK_CARDS = {\n EARN: 'earn',\n PROGRAM: 'program',\n PLUS: 'plus',\n AUDIT: 'audit',\n};\n\n/**\n * Ordered cards to show for the course state in the track selection data.\n * The API `options` pick Purchase (Earn), Program, Subscribe (Plus) and Audit. An API without\n * `options` offers no subscription, so the page keeps today's Purchase vs Audit.\n */\nexport const getTrackCards = (data) => {\n const slugs = data.options?.map(({ slug }) => slug);\n const isOffered = (slug, withoutOptions) => (slugs ? slugs.includes(slug) : withoutOptions);\n const cards = [];\n\n // the Earn card buys the verified mode, so it needs it too\n if (data.verifiedMode && isOffered('purchase', true)) {\n cards.push(TRACK_CARDS.EARN);\n }\n // the card lists the programs of the API, so it needs them too\n if (isOffered('program', true) && data.programs?.length) {\n cards.push(TRACK_CARDS.PROGRAM);\n }\n // the Plus card leads to the checkout, so it needs a web link to it\n if (isOffered('subscribe', false) && getOptionUrl(data.options, 'subscribe')) {\n cards.push(TRACK_CARDS.PLUS);\n }\n if (isOffered('audit', Boolean(data.auditMode))) {\n cards.push(TRACK_CARDS.AUDIT);\n }\n\n return cards;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,IAAMC,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA;AACA;AACO,IAAMC,aAAa,GAAAL,OAAA,CAAAK,aAAA,GAAG,SAAhBA,aAAaA,CAAIC,IAAI,EAAK;EAAA,IAAAC,aAAA,EAAAC,cAAA;EACrC,IAA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|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _analytics = require("@edx/frontend-platform/analytics");
|
|
9
|
+
var _i18n = require("@edx/frontend-platform/i18n");
|
|
10
|
+
var _logging = require("@edx/frontend-platform/logging");
|
|
11
|
+
var _api = require("./data/api");
|
|
12
|
+
var _messages = _interopRequireDefault(require("./messages"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
15
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
16
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
17
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
18
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
19
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
21
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
24
|
+
/**
|
|
25
|
+
* Submit handlers shared by track selection layouts.
|
|
26
|
+
* Each choice sends the event of the Learning MFE upgrade buttons, with the option as linkName.
|
|
27
|
+
* Segment adds the user id, so the event joins subscription_created on user and course run.
|
|
28
|
+
*/
|
|
29
|
+
var useTrackSelectionActions = function useTrackSelectionActions(_ref) {
|
|
30
|
+
var courseId = _ref.courseId,
|
|
31
|
+
org = _ref.org,
|
|
32
|
+
verifiedMode = _ref.verifiedMode,
|
|
33
|
+
purchaseUrl = _ref.purchaseUrl;
|
|
34
|
+
var intl = (0, _i18n.useIntl)();
|
|
35
|
+
var _useState = (0, _react.useState)(null),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
submittingMode = _useState2[0],
|
|
38
|
+
setSubmittingMode = _useState2[1];
|
|
39
|
+
var _useState3 = (0, _react.useState)(null),
|
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
+
submitError = _useState4[0],
|
|
42
|
+
setSubmitError = _useState4[1];
|
|
43
|
+
var logChoice = function logChoice(option) {
|
|
44
|
+
(0, _analytics.sendTrackEvent)('edx.bi.ecommerce.upsell_links_clicked', {
|
|
45
|
+
org_key: org,
|
|
46
|
+
courserun_key: courseId,
|
|
47
|
+
linkCategory: 'track_selection',
|
|
48
|
+
linkName: option,
|
|
49
|
+
linkType: 'button',
|
|
50
|
+
pageName: 'track_selection'
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
var submitChoice = /*#__PURE__*/function () {
|
|
54
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(mode, contribution) {
|
|
55
|
+
var _t;
|
|
56
|
+
return _regenerator().w(function (_context) {
|
|
57
|
+
while (1) switch (_context.p = _context.n) {
|
|
58
|
+
case 0:
|
|
59
|
+
setSubmitError(null);
|
|
60
|
+
setSubmittingMode(mode);
|
|
61
|
+
_context.p = 1;
|
|
62
|
+
_context.n = 2;
|
|
63
|
+
return (0, _api.submitTrackSelectionChoice)({
|
|
64
|
+
courseId: courseId,
|
|
65
|
+
mode: mode,
|
|
66
|
+
contribution: contribution
|
|
67
|
+
});
|
|
68
|
+
case 2:
|
|
69
|
+
_context.n = 4;
|
|
70
|
+
break;
|
|
71
|
+
case 3:
|
|
72
|
+
_context.p = 3;
|
|
73
|
+
_t = _context.v;
|
|
74
|
+
(0, _logging.logError)(_t);
|
|
75
|
+
setSubmitError(_t.message || intl.formatMessage(_messages["default"].submitError));
|
|
76
|
+
setSubmittingMode(null);
|
|
77
|
+
case 4:
|
|
78
|
+
return _context.a(2);
|
|
79
|
+
}
|
|
80
|
+
}, _callee, null, [[1, 3]]);
|
|
81
|
+
}));
|
|
82
|
+
return function submitChoice(_x, _x2) {
|
|
83
|
+
return _ref2.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
}();
|
|
86
|
+
var onAudit = function onAudit() {
|
|
87
|
+
logChoice('audit');
|
|
88
|
+
return submitChoice(_api.TRACK_SELECTION_MODES.AUDIT);
|
|
89
|
+
};
|
|
90
|
+
var onVerifiedUpgrade = /*#__PURE__*/function () {
|
|
91
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
92
|
+
return _regenerator().w(function (_context2) {
|
|
93
|
+
while (1) switch (_context2.n) {
|
|
94
|
+
case 0:
|
|
95
|
+
logChoice('purchase');
|
|
96
|
+
if (!purchaseUrl) {
|
|
97
|
+
_context2.n = 1;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
global.location.href = purchaseUrl;
|
|
101
|
+
return _context2.a(2);
|
|
102
|
+
case 1:
|
|
103
|
+
_context2.n = 2;
|
|
104
|
+
return submitChoice(_api.TRACK_SELECTION_MODES.VERIFIED, verifiedMode.minPrice);
|
|
105
|
+
case 2:
|
|
106
|
+
return _context2.a(2);
|
|
107
|
+
}
|
|
108
|
+
}, _callee2);
|
|
109
|
+
}));
|
|
110
|
+
return function onVerifiedUpgrade() {
|
|
111
|
+
return _ref3.apply(this, arguments);
|
|
112
|
+
};
|
|
113
|
+
}();
|
|
114
|
+
return {
|
|
115
|
+
isSubmitting: Boolean(submittingMode),
|
|
116
|
+
submitError: submitError,
|
|
117
|
+
onAudit: onAudit,
|
|
118
|
+
onVerifiedUpgrade: onVerifiedUpgrade,
|
|
119
|
+
// Subscribe and program are links, so these only log the choice.
|
|
120
|
+
onSubscribe: function onSubscribe() {
|
|
121
|
+
return logChoice('subscribe');
|
|
122
|
+
},
|
|
123
|
+
onProgram: function onProgram() {
|
|
124
|
+
return logChoice('program');
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
var _default = exports["default"] = useTrackSelectionActions;
|
|
129
|
+
//# sourceMappingURL=useTrackSelectionActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTrackSelectionActions.js","names":["_react","require","_analytics","_i18n","_logging","_api","_messages","_interopRequireDefault","e","__esModule","_regenerator","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","next","push","isArray","useTrackSelectionActions","_ref","courseId","org","verifiedMode","purchaseUrl","intl","useIntl","_useState","useState","_useState2","submittingMode","setSubmittingMode","_useState3","_useState4","submitError","setSubmitError","logChoice","option","sendTrackEvent","org_key","courserun_key","linkCategory","linkName","linkType","pageName","submitChoice","_ref2","_callee","mode","contribution","_t","_context","submitTrackSelectionChoice","logError","message","formatMessage","messages","_x","_x2","onAudit","TRACK_SELECTION_MODES","AUDIT","onVerifiedUpgrade","_ref3","_callee2","_context2","global","location","href","VERIFIED","minPrice","isSubmitting","Boolean","onSubscribe","onProgram","_default","exports"],"sources":["../src/useTrackSelectionActions.js"],"sourcesContent":["import { useState } from 'react';\nimport { sendTrackEvent } from '@edx/frontend-platform/analytics';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport { logError } from '@edx/frontend-platform/logging';\n\nimport { TRACK_SELECTION_MODES, submitTrackSelectionChoice } from './data/api';\nimport messages from './messages';\n\n/**\n * Submit handlers shared by track selection layouts.\n * Each choice sends the event of the Learning MFE upgrade buttons, with the option as linkName.\n * Segment adds the user id, so the event joins subscription_created on user and course run.\n */\nconst useTrackSelectionActions = ({\n courseId,\n org,\n verifiedMode,\n purchaseUrl,\n}) => {\n const intl = useIntl();\n const [submittingMode, setSubmittingMode] = useState(null);\n const [submitError, setSubmitError] = useState(null);\n\n const logChoice = (option) => {\n sendTrackEvent('edx.bi.ecommerce.upsell_links_clicked', {\n org_key: org,\n courserun_key: courseId,\n linkCategory: 'track_selection',\n linkName: option,\n linkType: 'button',\n pageName: 'track_selection',\n });\n };\n\n const submitChoice = async (mode, contribution) => {\n setSubmitError(null);\n setSubmittingMode(mode);\n\n try {\n await submitTrackSelectionChoice({ courseId, mode, contribution });\n } catch (error) {\n logError(error);\n setSubmitError(error.message || intl.formatMessage(messages.submitError));\n setSubmittingMode(null);\n }\n };\n\n const onAudit = () => {\n logChoice('audit');\n return submitChoice(TRACK_SELECTION_MODES.AUDIT);\n };\n\n const onVerifiedUpgrade = async () => {\n logChoice('purchase');\n if (purchaseUrl) {\n global.location.href = purchaseUrl;\n return;\n }\n\n await submitChoice(TRACK_SELECTION_MODES.VERIFIED, verifiedMode.minPrice);\n };\n\n return {\n isSubmitting: Boolean(submittingMode),\n submitError,\n onAudit,\n onVerifiedUpgrade,\n // Subscribe and program are links, so these only log the choice.\n onSubscribe: () => logChoice('subscribe'),\n onProgram: () => logChoice('program'),\n };\n};\n\nexport default useTrackSelectionActions;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OA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AAA,GAAAqC,CAAA,CAAG,SAAA6E,SAAA;MAAA,OAAAlH,YAAA,GAAAoC,CAAA,WAAA+E,SAAA;QAAA,kBAAAA,SAAA,CAAA/G,CAAA;UAAA;YACxBkF,SAAS,CAAC,UAAU,CAAC;YAAC,KAClBZ,WAAW;cAAAyC,SAAA,CAAA/G,CAAA;cAAA;YAAA;YACbgH,MAAM,CAACC,QAAQ,CAACC,IAAI,GAAG5C,WAAW;YAAC,OAAAyC,SAAA,CAAA9F,CAAA;UAAA;YAAA8F,SAAA,CAAA/G,CAAA;YAAA,OAI/B2F,YAAY,CAACe,0BAAqB,CAACS,QAAQ,EAAE9C,YAAY,CAAC+C,QAAQ,CAAC;UAAA;YAAA,OAAAL,SAAA,CAAA9F,CAAA;QAAA;MAAA,GAAA6F,QAAA;IAAA,CAC1E;IAAA,gBARKF,iBAAiBA,CAAA;MAAA,OAAAC,KAAA,CAAA/D,KAAA,OAAAD,SAAA;IAAA;EAAA,GAQtB;EAED,OAAO;IACLwE,YAAY,EAAEC,OAAO,CAAC1C,cAAc,CAAC;IACrCI,WAAW,EAAXA,WAAW;IACXyB,OAAO,EAAPA,OAAO;IACPG,iBAAiB,EAAjBA,iBAAiB;IACjB;IACAW,WAAW,EAAE,SAAbA,WAAWA,CAAA;MAAA,OAAQrC,SAAS,CAAC,WAAW,CAAC;IAAA;IACzCsC,SAAS,EAAE,SAAXA,SAASA,CAAA;MAAA,OAAQtC,SAAS,CAAC,SAAS,CAAC;IAAA;EACvC,CAAC;AACH,CAAC;AAAC,IAAAuC,QAAA,GAAAC,OAAA,cAEazD,wBAAwB","ignoreList":[]}
|
package/dist/utils.js
CHANGED
|
@@ -3,10 +3,34 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.formatAuditDeadline = formatAuditDeadline;
|
|
7
|
+
exports.formatOfferPrice = formatOfferPrice;
|
|
8
|
+
exports.formatProgramDuration = formatProgramDuration;
|
|
6
9
|
exports.formatVerifiedPriceDisplay = formatVerifiedPriceDisplay;
|
|
10
|
+
exports.getOptionUrl = getOptionUrl;
|
|
11
|
+
exports.getProgramCards = getProgramCards;
|
|
12
|
+
exports.getProgramDiscountLabel = getProgramDiscountLabel;
|
|
13
|
+
exports.getPurchaseUrl = getPurchaseUrl;
|
|
7
14
|
exports.getVerifiedCertificateUrl = getVerifiedCertificateUrl;
|
|
15
|
+
exports.getVerifiedPrices = getVerifiedPrices;
|
|
16
|
+
exports.parseLmsDate = parseLmsDate;
|
|
8
17
|
var _frontendPlatform = require("@edx/frontend-platform");
|
|
18
|
+
var _messages = _interopRequireDefault(require("./messages"));
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
20
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
21
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
22
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
24
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
25
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
26
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
27
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
31
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
32
|
var VERIFIED_CERTIFICATE_PATH = '/verified-certificate';
|
|
33
|
+
var WEEKS_PER_MONTH = 4.345;
|
|
10
34
|
function buildUrlFromBase(baseUrl, path) {
|
|
11
35
|
if (!baseUrl) {
|
|
12
36
|
return path;
|
|
@@ -28,6 +52,157 @@ function formatVerifiedPriceDisplay(verifiedMode) {
|
|
|
28
52
|
return "".concat(currencySymbol).concat(minPrice, " ").concat(currencyLabel).trim();
|
|
29
53
|
}
|
|
30
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Verified track prices of the Earn card: `price` is what the learner pays. With the first purchase `offer` of
|
|
57
|
+
* the API, `originalPrice` is the list price and `percentage` the discount; without it, both are null.
|
|
58
|
+
*/
|
|
59
|
+
function getVerifiedPrices(verifiedMode, offer) {
|
|
60
|
+
if (!(offer !== null && offer !== void 0 && offer.originalPrice) || !(offer !== null && offer !== void 0 && offer.discountedPrice)) {
|
|
61
|
+
return {
|
|
62
|
+
price: formatVerifiedPriceDisplay(verifiedMode),
|
|
63
|
+
originalPrice: null,
|
|
64
|
+
percentage: null
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
var currencyLabel = ((verifiedMode === null || verifiedMode === void 0 ? void 0 : verifiedMode.currency) || '').toUpperCase();
|
|
68
|
+
return {
|
|
69
|
+
price: "".concat(offer.discountedPrice, " ").concat(currencyLabel).trim(),
|
|
70
|
+
originalPrice: "".concat(offer.originalPrice, " ").concat(currencyLabel).trim(),
|
|
71
|
+
percentage: offer.percentage || null
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** "$39" from a price of the API ({ amount, currency }), as the subscription upsells show it, or null. */
|
|
76
|
+
function formatOfferPrice(intl, price) {
|
|
77
|
+
if ((price === null || price === void 0 ? void 0 : price.amount) === undefined || (price === null || price === void 0 ? void 0 : price.amount) === null) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
var amount = Number(price.amount);
|
|
81
|
+
return intl.formatNumber(amount, _objectSpread({
|
|
82
|
+
style: 'currency',
|
|
83
|
+
currency: price.currency || 'USD'
|
|
84
|
+
}, Number.isInteger(amount) ? {
|
|
85
|
+
minimumFractionDigits: 0
|
|
86
|
+
} : {}));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* A link of the track selection API, made absolute, or null.
|
|
91
|
+
* Only web links are kept, so a link from the API can never run script.
|
|
92
|
+
*/
|
|
93
|
+
function toWebUrl(url) {
|
|
94
|
+
if (!url) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
var _URL = new URL(url, (0, _frontendPlatform.getConfig)().LMS_BASE_URL),
|
|
99
|
+
href = _URL.href,
|
|
100
|
+
protocol = _URL.protocol;
|
|
101
|
+
return ['http:', 'https:'].includes(protocol) ? href : null;
|
|
102
|
+
} catch (_unused) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Link of an option in the track selection API `options`, made absolute, or null. */
|
|
108
|
+
function getOptionUrl(options, slug) {
|
|
109
|
+
var _options$find;
|
|
110
|
+
return toWebUrl(options === null || options === void 0 || (_options$find = options.find(function (option) {
|
|
111
|
+
return option.slug === slug;
|
|
112
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.url);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** "5 months" from the weeks that a program takes ("3 weeks" under a month), or undefined without weeks. */
|
|
116
|
+
function formatProgramDuration(intl, weeks) {
|
|
117
|
+
if (!weeks) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
var months = Math.round(weeks / WEEKS_PER_MONTH);
|
|
121
|
+
return months >= 1 ? intl.formatMessage(_messages["default"].programDurationMonths, {
|
|
122
|
+
count: months
|
|
123
|
+
}) : intl.formatMessage(_messages["default"].programDurationWeeks, {
|
|
124
|
+
count: weeks
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Percent that a program of the API is discounted by, 0 without a price or a discount. */
|
|
129
|
+
function getDiscountPercent(_ref) {
|
|
130
|
+
var price = _ref.price,
|
|
131
|
+
discountedPrice = _ref.discountedPrice;
|
|
132
|
+
var full = Number(price);
|
|
133
|
+
var discounted = Number(discountedPrice);
|
|
134
|
+
if (price == null || discountedPrice == null || !(full > 0) || !(discounted < full)) {
|
|
135
|
+
return 0;
|
|
136
|
+
}
|
|
137
|
+
return Math.round((1 - discounted / full) * 100);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** "40% off" for the programs of the API, "Up to 40% off" when they differ, or undefined without a discount. */
|
|
141
|
+
function getProgramDiscountLabel(intl, programs) {
|
|
142
|
+
var percents = (programs || []).map(getDiscountPercent);
|
|
143
|
+
var percent = Math.max.apply(Math, [0].concat(_toConsumableArray(percents)));
|
|
144
|
+
if (!percent) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
return intl.formatMessage(new Set(percents).size > 1 ? _messages["default"].programDiscountUpTo : _messages["default"].programDiscount, {
|
|
148
|
+
percent: percent
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The programs of the track selection API as the Program card shows them, with the prices and the duration
|
|
154
|
+
* formatted. Only web links are kept, for the programs and for their courses.
|
|
155
|
+
*/
|
|
156
|
+
function getProgramCards(intl, programs) {
|
|
157
|
+
return (programs || []).map(function (program) {
|
|
158
|
+
var _program$discountedPr;
|
|
159
|
+
return {
|
|
160
|
+
title: program.title,
|
|
161
|
+
logoUrl: toWebUrl(program.logoUrl) || undefined,
|
|
162
|
+
courseCount: program.numberOfCourses,
|
|
163
|
+
duration: formatProgramDuration(intl, program.weeksToComplete),
|
|
164
|
+
description: program.description || undefined,
|
|
165
|
+
certificates: (program.courses || []).map(function (_ref2) {
|
|
166
|
+
var title = _ref2.title,
|
|
167
|
+
url = _ref2.url;
|
|
168
|
+
return {
|
|
169
|
+
title: title,
|
|
170
|
+
url: toWebUrl(url) || undefined
|
|
171
|
+
};
|
|
172
|
+
}),
|
|
173
|
+
originalPrice: getDiscountPercent(program) > 0 ? formatOfferPrice(intl, {
|
|
174
|
+
amount: program.price,
|
|
175
|
+
currency: program.currency
|
|
176
|
+
}) : undefined,
|
|
177
|
+
price: formatOfferPrice(intl, {
|
|
178
|
+
amount: (_program$discountedPr = program.discountedPrice) !== null && _program$discountedPr !== void 0 ? _program$discountedPr : program.price,
|
|
179
|
+
currency: program.currency
|
|
180
|
+
}) || undefined,
|
|
181
|
+
enrollUrl: toWebUrl(program.url) || undefined
|
|
182
|
+
};
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Purchase checkout link: the API's link, or for an API without `options`, the ecommerce basket link.
|
|
188
|
+
* Null when the verified track is bought by posting the choice.
|
|
189
|
+
*/
|
|
190
|
+
function getPurchaseUrl(_ref3) {
|
|
191
|
+
var courseId = _ref3.courseId,
|
|
192
|
+
options = _ref3.options,
|
|
193
|
+
verifiedMode = _ref3.verifiedMode;
|
|
194
|
+
if (options) {
|
|
195
|
+
return getOptionUrl(options, 'purchase');
|
|
196
|
+
}
|
|
197
|
+
if (!(verifiedMode !== null && verifiedMode !== void 0 && verifiedMode.useEcommercePaymentFlow)) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
var paymentUrl = new URL(verifiedMode.ecommercePaymentPage, (0, _frontendPlatform.getConfig)().LMS_BASE_URL);
|
|
201
|
+
paymentUrl.searchParams.set('sku', verifiedMode.sku);
|
|
202
|
+
paymentUrl.searchParams.set('course_run_key', courseId);
|
|
203
|
+
return paymentUrl.toString();
|
|
204
|
+
}
|
|
205
|
+
|
|
31
206
|
/**
|
|
32
207
|
* Verified certificate URL: track selection API trackLinks first, then MFE marketing base URL.
|
|
33
208
|
*/
|
|
@@ -42,4 +217,34 @@ function getVerifiedCertificateUrl(trackLinks) {
|
|
|
42
217
|
}
|
|
43
218
|
return buildUrlFromBase((0, _frontendPlatform.getConfig)().MARKETING_SITE_BASE_URL, VERIFIED_CERTIFICATE_PATH);
|
|
44
219
|
}
|
|
220
|
+
var ISO_DATE_RE = /^\d{4}-\d{2}-\d{2}T/;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* The LMS sends the audit access deadline as strftime_localized_html output, for the legacy pages:
|
|
224
|
+
* `<span class="localized-datetime" data-datetime="2026-12-02T09:27:40+00:00">Dec 02, 2026</span>`.
|
|
225
|
+
* Return its ISO datetime, or else its text without tags, or null when empty.
|
|
226
|
+
*/
|
|
227
|
+
function parseLmsDate(html) {
|
|
228
|
+
var _exec;
|
|
229
|
+
if (!html || typeof html !== 'string') {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
var iso = (_exec = /data-datetime="([^"]+)"/.exec(html)) === null || _exec === void 0 ? void 0 : _exec[1];
|
|
233
|
+
if (iso) {
|
|
234
|
+
return iso;
|
|
235
|
+
}
|
|
236
|
+
return html.replace(/<[^>]*>/g, '').trim() || null;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** Format an ISO deadline in the learner's language. Any other text is shown as it is. */
|
|
240
|
+
function formatAuditDeadline(intl, value) {
|
|
241
|
+
if (value && ISO_DATE_RE.test(value) && !Number.isNaN(Date.parse(value))) {
|
|
242
|
+
return intl.formatDate(value, {
|
|
243
|
+
year: 'numeric',
|
|
244
|
+
month: 'short',
|
|
245
|
+
day: '2-digit'
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return value;
|
|
249
|
+
}
|
|
45
250
|
//# sourceMappingURL=utils.js.map
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_frontendPlatform","require","VERIFIED_CERTIFICATE_PATH","buildUrlFromBase","baseUrl","path","normalizedBase","replace","concat","startsWith","formatVerifiedPriceDisplay","verifiedMode","_verifiedMode$currenc","currencySymbol","minPrice","currency","currencyLabel","toUpperCase","trim","getVerifiedCertificateUrl","trackLinks","fromApi","verifiedCertificate","verified_certificate","marketingRoot","getConfig","MARKETING_SITE_BASE_URL"],"sources":["../src/utils.js"],"sourcesContent":["import { getConfig } from '@edx/frontend-platform';\n\nconst VERIFIED_CERTIFICATE_PATH = '/verified-certificate';\n\nfunction buildUrlFromBase(baseUrl, path) {\n if (!baseUrl) {\n return path;\n }\n\n const normalizedBase = baseUrl.replace(/\\/$/, '');\n return `${normalizedBase}${path.startsWith('/') ? path : `/${path}`}`;\n}\n\n/** Uses track selection API fields on verifiedMode (currencySymbol, minPrice, currency). */\nexport function formatVerifiedPriceDisplay(verifiedMode) {\n if (!verifiedMode) {\n return '';\n }\n const { currencySymbol = '', minPrice, currency } = verifiedMode;\n const currencyLabel = (currency || '').toUpperCase();\n return `${currencySymbol}${minPrice} ${currencyLabel}`.trim();\n}\n\n/**\n * Verified certificate URL: track selection API trackLinks first, then MFE marketing base URL.\n */\nexport function getVerifiedCertificateUrl(trackLinks) {\n const fromApi = trackLinks?.verifiedCertificate || trackLinks?.verified_certificate;\n if (fromApi) {\n return fromApi;\n }\n const marketingRoot = getConfig().MARKETING_SITE_BASE_URL;\n if (marketingRoot) {\n return `${marketingRoot.replace(/\\/$/, '')}${VERIFIED_CERTIFICATE_PATH}`;\n }\n\n return buildUrlFromBase(getConfig().MARKETING_SITE_BASE_URL, VERIFIED_CERTIFICATE_PATH);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAMC,yBAAyB,GAAG,uBAAuB;AAEzD,SAASC,gBAAgBA,CAACC,OAAO,EAAEC,IAAI,EAAE;EACvC,IAAI,CAACD,OAAO,EAAE;IACZ,OAAOC,IAAI;EACb;EAEA,IAAMC,cAAc,GAAGF,OAAO,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EACjD,UAAAC,MAAA,CAAUF,cAAc,EAAAE,MAAA,CAAGH,IAAI,CAACI,UAAU,CAAC,GAAG,CAAC,GAAGJ,IAAI,OAAAG,MAAA,CAAOH,IAAI,CAAE;AACrE;;AAEA;AACO,SAASK,0BAA0BA,CAACC,YAAY,EAAE;EACvD,IAAI,CAACA,YAAY,EAAE;IACjB,OAAO,EAAE;EACX;EACA,IAAAC,qBAAA,GAAoDD,YAAY,CAAxDE,cAAc;IAAdA,cAAc,GAAAD,qBAAA,cAAG,EAAE,GAAAA,qBAAA;IAAEE,QAAQ,GAAeH,YAAY,CAAnCG,QAAQ;IAAEC,QAAQ,GAAKJ,YAAY,CAAzBI,QAAQ;EAC/C,IAAMC,aAAa,GAAG,CAACD,QAAQ,IAAI,EAAE,EAAEE,WAAW,CAAC,CAAC;EACpD,OAAO,GAAAT,MAAA,CAAGK,cAAc,EAAAL,MAAA,CAAGM,QAAQ,OAAAN,MAAA,CAAIQ,aAAa,EAAGE,IAAI,CAAC,CAAC;AAC/D;;AAEA;AACA;AACA;AACO,SAASC,yBAAyBA,CAACC,UAAU,EAAE;EACpD,IAAMC,OAAO,GAAG,CAAAD,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEE,mBAAmB,MAAIF,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,oBAAoB;EACnF,IAAIF,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EACA,IAAMG,aAAa,GAAG,IAAAC,2BAAS,EAAC,CAAC,CAACC,uBAAuB;EACzD,IAAIF,aAAa,EAAE;IACjB,UAAAhB,MAAA,CAAUgB,aAAa,CAACjB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAAC,MAAA,CAAGN,yBAAyB;EACxE;EAEA,OAAOC,gBAAgB,CAAC,IAAAsB,2BAAS,EAAC,CAAC,CAACC,uBAAuB,EAAExB,yBAAyB,CAAC;AACzF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_frontendPlatform","require","_messages","_interopRequireDefault","e","__esModule","_typeof","o","Symbol","iterator","constructor","prototype","_toConsumableArray","r","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","a","_arrayLikeToArray","t","toString","call","slice","name","Array","from","test","isArray","length","n","ownKeys","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","toPrimitive","String","Number","VERIFIED_CERTIFICATE_PATH","WEEKS_PER_MONTH","buildUrlFromBase","baseUrl","path","normalizedBase","replace","concat","startsWith","formatVerifiedPriceDisplay","verifiedMode","_verifiedMode$currenc","currencySymbol","minPrice","currency","currencyLabel","toUpperCase","trim","getVerifiedPrices","offer","originalPrice","discountedPrice","price","percentage","formatOfferPrice","intl","amount","undefined","formatNumber","style","isInteger","minimumFractionDigits","toWebUrl","url","_URL","URL","getConfig","LMS_BASE_URL","href","protocol","includes","_unused","getOptionUrl","options","slug","_options$find","find","option","formatProgramDuration","weeks","months","Math","round","formatMessage","messages","programDurationMonths","count","programDurationWeeks","getDiscountPercent","_ref","full","discounted","getProgramDiscountLabel","programs","percents","map","percent","max","Set","size","programDiscountUpTo","programDiscount","getProgramCards","program","_program$discountedPr","title","logoUrl","courseCount","numberOfCourses","duration","weeksToComplete","description","certificates","courses","_ref2","enrollUrl","getPurchaseUrl","_ref3","courseId","useEcommercePaymentFlow","paymentUrl","ecommercePaymentPage","searchParams","set","sku","getVerifiedCertificateUrl","trackLinks","fromApi","verifiedCertificate","verified_certificate","marketingRoot","MARKETING_SITE_BASE_URL","ISO_DATE_RE","parseLmsDate","html","_exec","iso","exec","formatAuditDeadline","isNaN","Date","parse","formatDate","year","month","day"],"sources":["../src/utils.js"],"sourcesContent":["import { getConfig } from '@edx/frontend-platform';\n\nimport messages from './messages';\n\nconst VERIFIED_CERTIFICATE_PATH = '/verified-certificate';\nconst WEEKS_PER_MONTH = 4.345;\n\nfunction buildUrlFromBase(baseUrl, path) {\n if (!baseUrl) {\n return path;\n }\n\n const normalizedBase = baseUrl.replace(/\\/$/, '');\n return `${normalizedBase}${path.startsWith('/') ? path : `/${path}`}`;\n}\n\n/** Uses track selection API fields on verifiedMode (currencySymbol, minPrice, currency). */\nexport function formatVerifiedPriceDisplay(verifiedMode) {\n if (!verifiedMode) {\n return '';\n }\n const { currencySymbol = '', minPrice, currency } = verifiedMode;\n const currencyLabel = (currency || '').toUpperCase();\n return `${currencySymbol}${minPrice} ${currencyLabel}`.trim();\n}\n\n/**\n * Verified track prices of the Earn card: `price` is what the learner pays. With the first purchase `offer` of\n * the API, `originalPrice` is the list price and `percentage` the discount; without it, both are null.\n */\nexport function getVerifiedPrices(verifiedMode, offer) {\n if (!offer?.originalPrice || !offer?.discountedPrice) {\n return { price: formatVerifiedPriceDisplay(verifiedMode), originalPrice: null, percentage: null };\n }\n const currencyLabel = (verifiedMode?.currency || '').toUpperCase();\n return {\n price: `${offer.discountedPrice} ${currencyLabel}`.trim(),\n originalPrice: `${offer.originalPrice} ${currencyLabel}`.trim(),\n percentage: offer.percentage || null,\n };\n}\n\n/** \"$39\" from a price of the API ({ amount, currency }), as the subscription upsells show it, or null. */\nexport function formatOfferPrice(intl, price) {\n if (price?.amount === undefined || price?.amount === null) {\n return null;\n }\n const amount = Number(price.amount);\n return intl.formatNumber(amount, {\n style: 'currency',\n currency: price.currency || 'USD',\n // Whole amounts show as \"$39\"; otherwise the currency's own precision applies.\n ...(Number.isInteger(amount) ? { minimumFractionDigits: 0 } : {}),\n });\n}\n\n/**\n * A link of the track selection API, made absolute, or null.\n * Only web links are kept, so a link from the API can never run script.\n */\nfunction toWebUrl(url) {\n if (!url) {\n return null;\n }\n try {\n const { href, protocol } = new URL(url, getConfig().LMS_BASE_URL);\n return ['http:', 'https:'].includes(protocol) ? href : null;\n } catch {\n return null;\n }\n}\n\n/** Link of an option in the track selection API `options`, made absolute, or null. */\nexport function getOptionUrl(options, slug) {\n return toWebUrl(options?.find((option) => option.slug === slug)?.url);\n}\n\n/** \"5 months\" from the weeks that a program takes (\"3 weeks\" under a month), or undefined without weeks. */\nexport function formatProgramDuration(intl, weeks) {\n if (!weeks) {\n return undefined;\n }\n const months = Math.round(weeks / WEEKS_PER_MONTH);\n return months >= 1\n ? intl.formatMessage(messages.programDurationMonths, { count: months })\n : intl.formatMessage(messages.programDurationWeeks, { count: weeks });\n}\n\n/** Percent that a program of the API is discounted by, 0 without a price or a discount. */\nfunction getDiscountPercent({ price, discountedPrice }) {\n const full = Number(price);\n const discounted = Number(discountedPrice);\n if (price == null || discountedPrice == null || !(full > 0) || !(discounted < full)) {\n return 0;\n }\n return Math.round((1 - discounted / full) * 100);\n}\n\n/** \"40% off\" for the programs of the API, \"Up to 40% off\" when they differ, or undefined without a discount. */\nexport function getProgramDiscountLabel(intl, programs) {\n const percents = (programs || []).map(getDiscountPercent);\n const percent = Math.max(0, ...percents);\n if (!percent) {\n return undefined;\n }\n return intl.formatMessage(\n new Set(percents).size > 1 ? messages.programDiscountUpTo : messages.programDiscount,\n { percent },\n );\n}\n\n/**\n * The programs of the track selection API as the Program card shows them, with the prices and the duration\n * formatted. Only web links are kept, for the programs and for their courses.\n */\nexport function getProgramCards(intl, programs) {\n return (programs || []).map((program) => ({\n title: program.title,\n logoUrl: toWebUrl(program.logoUrl) || undefined,\n courseCount: program.numberOfCourses,\n duration: formatProgramDuration(intl, program.weeksToComplete),\n description: program.description || undefined,\n certificates: (program.courses || []).map(({ title, url }) => ({ title, url: toWebUrl(url) || undefined })),\n originalPrice: getDiscountPercent(program) > 0\n ? formatOfferPrice(intl, { amount: program.price, currency: program.currency })\n : undefined,\n price: formatOfferPrice(intl, { amount: program.discountedPrice ?? program.price, currency: program.currency })\n || undefined,\n enrollUrl: toWebUrl(program.url) || undefined,\n }));\n}\n\n/**\n * Purchase checkout link: the API's link, or for an API without `options`, the ecommerce basket link.\n * Null when the verified track is bought by posting the choice.\n */\nexport function getPurchaseUrl({ courseId, options, verifiedMode }) {\n if (options) {\n return getOptionUrl(options, 'purchase');\n }\n if (!verifiedMode?.useEcommercePaymentFlow) {\n return null;\n }\n const paymentUrl = new URL(verifiedMode.ecommercePaymentPage, getConfig().LMS_BASE_URL);\n paymentUrl.searchParams.set('sku', verifiedMode.sku);\n paymentUrl.searchParams.set('course_run_key', courseId);\n return paymentUrl.toString();\n}\n\n/**\n * Verified certificate URL: track selection API trackLinks first, then MFE marketing base URL.\n */\nexport function getVerifiedCertificateUrl(trackLinks) {\n const fromApi = trackLinks?.verifiedCertificate || trackLinks?.verified_certificate;\n if (fromApi) {\n return fromApi;\n }\n const marketingRoot = getConfig().MARKETING_SITE_BASE_URL;\n if (marketingRoot) {\n return `${marketingRoot.replace(/\\/$/, '')}${VERIFIED_CERTIFICATE_PATH}`;\n }\n\n return buildUrlFromBase(getConfig().MARKETING_SITE_BASE_URL, VERIFIED_CERTIFICATE_PATH);\n}\n\nconst ISO_DATE_RE = /^\\d{4}-\\d{2}-\\d{2}T/;\n\n/**\n * The LMS sends the audit access deadline as strftime_localized_html output, for the legacy pages:\n * `<span class=\"localized-datetime\" data-datetime=\"2026-12-02T09:27:40+00:00\">Dec 02, 2026</span>`.\n * Return its ISO datetime, or else its text without tags, or null when empty.\n */\nexport function parseLmsDate(html) {\n if (!html || typeof html !== 'string') {\n return null;\n }\n const iso = /data-datetime=\"([^\"]+)\"/.exec(html)?.[1];\n if (iso) {\n return iso;\n }\n return html.replace(/<[^>]*>/g, '').trim() || null;\n}\n\n/** Format an ISO deadline in the learner's language. Any other text is shown as it is. */\nexport function formatAuditDeadline(intl, value) {\n if (value && ISO_DATE_RE.test(value) && !Number.isNaN(Date.parse(value))) {\n return intl.formatDate(value, { year: 'numeric', month: 'short', day: '2-digit' });\n }\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAkC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAAA,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC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,CAAC,IAAAkC,2BAAS,EAAC,CAAC,CAACiE,uBAAuB,EAAErG,yBAAyB,CAAC;AACzF;AAEA,IAAMsG,WAAW,GAAG,qBAAqB;;AAEzC;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAACC,IAAI,EAAE;EAAA,IAAAC,KAAA;EACjC,IAAI,CAACD,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACrC,OAAO,IAAI;EACb;EACA,IAAME,GAAG,IAAAD,KAAA,GAAG,yBAAyB,CAACE,IAAI,CAACH,IAAI,CAAC,cAAAC,KAAA,uBAApCA,KAAA,CAAuC,CAAC,CAAC;EACrD,IAAIC,GAAG,EAAE;IACP,OAAOA,GAAG;EACZ;EACA,OAAOF,IAAI,CAAClG,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAACW,IAAI,CAAC,CAAC,IAAI,IAAI;AACpD;;AAEA;AACO,SAAS2F,mBAAmBA,CAACnF,IAAI,EAAEjC,KAAK,EAAE;EAC/C,IAAIA,KAAK,IAAI8G,WAAW,CAACnI,IAAI,CAACqB,KAAK,CAAC,IAAI,CAACO,MAAM,CAAC8G,KAAK,CAACC,IAAI,CAACC,KAAK,CAACvH,KAAK,CAAC,CAAC,EAAE;IACxE,OAAOiC,IAAI,CAACuF,UAAU,CAACxH,KAAK,EAAE;MAAEyH,IAAI,EAAE,SAAS;MAAEC,KAAK,EAAE,OAAO;MAAEC,GAAG,EAAE;IAAU,CAAC,CAAC;EACpF;EACA,OAAO3H,KAAK;AACd","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edx/track-selection-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "FBE track selection UI for frontend-app-learning",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"author": "edX",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"react": "*",
|
|
50
50
|
"react-helmet": "*"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "056efcb24c19eadee634d299f2a9dcf444a0e8ba"
|
|
53
53
|
}
|