@edx/frontend-plugin-advertisements 2.31.2 → 2.32.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/paywall/SubscriptionPaywall.js +6 -2
- package/dist/paywall/SubscriptionPaywall.js.map +1 -1
- package/dist/subscription-upsell/SubscriptionUpgradeCard.js +14 -4
- package/dist/subscription-upsell/SubscriptionUpgradeCard.js.map +1 -1
- package/dist/subscription-upsell/SubscriptionUpgradeCard.scss +77 -0
- package/dist/subscription-upsell/SubscriptionUpgradeProgressModal.js +140 -0
- package/dist/subscription-upsell/SubscriptionUpgradeProgressModal.js.map +1 -0
- package/dist/subscription-upsell/SubscriptionUpgradeProgressModal.scss +13 -0
- package/dist/subscription-upsell/SubscriptionUpsell.js +86 -29
- package/dist/subscription-upsell/SubscriptionUpsell.js.map +1 -1
- package/dist/subscription-upsell/messages.js +40 -0
- package/dist/subscription-upsell/messages.js.map +1 -1
- package/dist/subscription-upsell/reloadWhenUpgraded.js +56 -30
- package/dist/subscription-upsell/reloadWhenUpgraded.js.map +1 -1
- package/dist/upgrade-modal/UpgradeModal.js +6 -4
- package/dist/upgrade-modal/UpgradeModal.js.map +1 -1
- package/dist/upgrade-notification/UpgradeNotification.js +8 -2
- package/dist/upgrade-notification/UpgradeNotification.js.map +1 -1
- package/dist/upgrade-to-complete-alert/UpgradeToCompleteAlert.js +7 -1
- package/dist/upgrade-to-complete-alert/UpgradeToCompleteAlert.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
/* eslint import/no-unresolved: 0 */
|
|
20
20
|
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The locked graded content banner (Figma 3484-70965): Subscribe, or Upgrade with your subscription for a
|
|
23
|
+
* subscriber. Its upgraded pop-up's Resume course reloads the unit, which then shows the unlocked content.
|
|
24
|
+
*/const SubscriptionPaywall = _ref => {
|
|
22
25
|
let {
|
|
23
26
|
courseId,
|
|
24
27
|
offer,
|
|
@@ -70,7 +73,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
70
73
|
}), offer.canUpgradeInPlace ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_subscriptionUpsell.SubscriptionUpsell, {
|
|
71
74
|
courseId: courseId,
|
|
72
75
|
className: "flex-shrink-0",
|
|
73
|
-
onUpgradeEvent: onUpgradeEvent
|
|
76
|
+
onUpgradeEvent: onUpgradeEvent,
|
|
77
|
+
withUpgradeModal: true
|
|
74
78
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Button, {
|
|
75
79
|
variant: "primary",
|
|
76
80
|
size: "sm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionPaywall.js","names":["_react","_interopRequireDefault","require","_propTypes","_i18n","_paragon","_icons","_messages","_edX_locked_certificate","_upsellBullets","_subscriptionUpsell","_messages2","_jsxRuntime","e","__esModule","default","SubscriptionPaywall","_ref","courseId","offer","onSubscribeClick","onUpgradeEvent","formatMessage","useIntl","jsx","Alert","variant","icon","Locked","className","children","jsxs","Stack","direction","gap","Heading","as","lockPaywallMessages","Image","src","certificateLocked","alt","width","height","role","style","flex","VerifiedCertBullet","UnlockGradedBullet","FullAccessBullet","canUpgradeInPlace","SubscriptionUpsell","Button","size","href","subscribeUrl","onClick","subscriptionMessages","subscribe","propTypes","PropTypes","string","isRequired","shape","bool","func","defaultProps","undefined","_default","exports"],"sources":["../../src/paywall/SubscriptionPaywall.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n Alert, Button, Image, Stack,\n} from '@openedx/paragon';\nimport { Locked } from '@openedx/paragon/icons';\nimport lockPaywallMessages from '@src/courseware/course/sequence/lock-paywall/messages';\nimport certificateLocked from '@src/generic/assets/edX_locked_certificate.png';\n\nimport { VerifiedCertBullet, UnlockGradedBullet, FullAccessBullet } from '../generic/upsell-bullets';\nimport { SubscriptionUpsell } from '../subscription-upsell';\nimport subscriptionMessages from '../subscription-upsell/messages';\n\n
|
|
1
|
+
{"version":3,"file":"SubscriptionPaywall.js","names":["_react","_interopRequireDefault","require","_propTypes","_i18n","_paragon","_icons","_messages","_edX_locked_certificate","_upsellBullets","_subscriptionUpsell","_messages2","_jsxRuntime","e","__esModule","default","SubscriptionPaywall","_ref","courseId","offer","onSubscribeClick","onUpgradeEvent","formatMessage","useIntl","jsx","Alert","variant","icon","Locked","className","children","jsxs","Stack","direction","gap","Heading","as","lockPaywallMessages","Image","src","certificateLocked","alt","width","height","role","style","flex","VerifiedCertBullet","UnlockGradedBullet","FullAccessBullet","canUpgradeInPlace","SubscriptionUpsell","withUpgradeModal","Button","size","href","subscribeUrl","onClick","subscriptionMessages","subscribe","propTypes","PropTypes","string","isRequired","shape","bool","func","defaultProps","undefined","_default","exports"],"sources":["../../src/paywall/SubscriptionPaywall.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n Alert, Button, Image, Stack,\n} from '@openedx/paragon';\nimport { Locked } from '@openedx/paragon/icons';\nimport lockPaywallMessages from '@src/courseware/course/sequence/lock-paywall/messages';\nimport certificateLocked from '@src/generic/assets/edX_locked_certificate.png';\n\nimport { VerifiedCertBullet, UnlockGradedBullet, FullAccessBullet } from '../generic/upsell-bullets';\nimport { SubscriptionUpsell } from '../subscription-upsell';\nimport subscriptionMessages from '../subscription-upsell/messages';\n\n/**\n * The locked graded content banner (Figma 3484-70965): Subscribe, or Upgrade with your subscription for a\n * subscriber. Its upgraded pop-up's Resume course reloads the unit, which then shows the unlocked content.\n */\nconst SubscriptionPaywall = ({\n courseId, offer, onSubscribeClick, onUpgradeEvent,\n}) => {\n const { formatMessage } = useIntl();\n\n return (\n <Alert\n variant=\"light\"\n aria-live=\"off\"\n icon={Locked}\n className=\"bg-light-200 border-0 shadow-sm p-4\"\n data-testid=\"subscription-paywall\"\n >\n {/* The button is not in Alert's actions: elm-theme turns primary buttons there into brand (orange) buttons. */}\n <Stack\n direction=\"horizontal\"\n gap={4}\n className=\"flex-column flex-md-row align-items-start align-items-md-center\"\n >\n <Stack gap={2} className=\"flex-grow-1\">\n <Alert.Heading as=\"h3\" className=\"h6 font-weight-bold text-primary-500 mb-0\">\n {formatMessage(lockPaywallMessages['learn.lockPaywall.title'])}\n </Alert.Heading>\n <p className=\"mb-0\">{formatMessage(lockPaywallMessages['learn.lockPaywall.content'])}</p>\n <Stack direction=\"horizontal\" gap={3} className=\"flex-wrap\">\n <Image\n src={certificateLocked}\n alt={formatMessage(lockPaywallMessages['learn.lockPaywall.example.alt'])}\n width={175}\n height={128}\n />\n {/* Let the bullet text wrap before the whole list drops under the image. */}\n <Stack gap={2} role=\"list\" className=\"align-self-center upsell-bullets\" style={{ flex: '1 1 16rem' }}>\n <VerifiedCertBullet />\n <UnlockGradedBullet />\n <FullAccessBullet />\n </Stack>\n </Stack>\n </Stack>\n {offer.canUpgradeInPlace ? (\n <SubscriptionUpsell courseId={courseId} className=\"flex-shrink-0\" onUpgradeEvent={onUpgradeEvent} withUpgradeModal />\n ) : (\n <Button variant=\"primary\" size=\"sm\" className=\"rounded-pill\" href={offer.subscribeUrl} onClick={onSubscribeClick}>\n {formatMessage(subscriptionMessages.subscribe)}\n </Button>\n )}\n </Stack>\n </Alert>\n );\n};\n\nSubscriptionPaywall.propTypes = {\n courseId: PropTypes.string.isRequired,\n offer: PropTypes.shape({\n canUpgradeInPlace: PropTypes.bool,\n subscribeUrl: PropTypes.string,\n }).isRequired,\n onSubscribeClick: PropTypes.func,\n onUpgradeEvent: PropTypes.func,\n};\n\nSubscriptionPaywall.defaultProps = {\n onSubscribeClick: undefined,\n onUp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CACH,CAAC,EACP9B,KAAK,CAAC+B,iBAAiB,gBACtB,IAAAtC,WAAA,CAAAY,GAAA,EAACd,mBAAA,CAAAyC,kBAAkB;QAACjC,QAAQ,EAAEA,QAAS;QAACW,SAAS,EAAC,eAAe;QAACR,cAAc,EAAEA,cAAe;QAAC+B,gBAAgB;MAAA,CAAE,CAAC,gBAErH,IAAAxC,WAAA,CAAAY,GAAA,EAACnB,QAAA,CAAAgD,MAAM;QAAC3B,OAAO,EAAC,SAAS;QAAC4B,IAAI,EAAC,IAAI;QAACzB,SAAS,EAAC,cAAc;QAAC0B,IAAI,EAAEpC,KAAK,CAACqC,YAAa;QAACC,OAAO,EAAErC,gBAAiB;QAAAU,QAAA,EAC9GR,aAAa,CAACoC,kBAAoB,CAACC,SAAS;MAAC,CACxC,CACT;IAAA,CACI;EAAC,CACH,CAAC;AAEZ,CAAC;AAED3C,mBAAmB,CAAC4C,SAAS,GAAG;EAC9B1C,QAAQ,EAAE2C,kBAAS,CAACC,MAAM,CAACC,UAAU;EACrC5C,KAAK,EAAE0C,kBAAS,CAACG,KAAK,CAAC;IACrBd,iBAAiB,EAAEW,kBAAS,CAACI,IAAI;IACjCT,YAAY,EAAEK,kBAAS,CAACC;EAC1B,CAAC,CAAC,CAACC,UAAU;EACb3C,gBAAgB,EAAEyC,kBAAS,CAACK,IAAI;EAChC7C,cAAc,EAAEwC,kBAAS,CAACK;AAC5B,CAAC;AAEDlD,mBAAmB,CAACmD,YAAY,GAAG;EACjC/C,gBAAgB,EAAEgD,SAAS;EAC3B/C,cAAc,EAAE+C;AAClB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvD,OAAA,GAEaC,mBAAmB","ignoreList":[]}
|
|
@@ -30,6 +30,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
30
30
|
onPurchaseClick,
|
|
31
31
|
onUpgradeEvent,
|
|
32
32
|
onUpgraded,
|
|
33
|
+
withUpgradeModal,
|
|
34
|
+
resumeCourseUrl,
|
|
33
35
|
onClose,
|
|
34
36
|
banner
|
|
35
37
|
} = _ref;
|
|
@@ -49,6 +51,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
49
51
|
screenReaderText: formatMessage(_messages2.default.includedAlt)
|
|
50
52
|
});
|
|
51
53
|
const notIncluded = /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Icon, {
|
|
54
|
+
className: "not-included-icon",
|
|
52
55
|
src: _icons.CloseSmall,
|
|
53
56
|
screenReaderText: formatMessage(_messages2.default.notIncludedAlt)
|
|
54
57
|
});
|
|
@@ -93,7 +96,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
93
96
|
direction: "horizontal",
|
|
94
97
|
className: "align-items-start px-4 pt-4 mb-3",
|
|
95
98
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
96
|
-
className: "upgrade-notification-header
|
|
99
|
+
className: "upgrade-notification-header mb-0",
|
|
97
100
|
children: formatMessage(_messages2.default.cardHeader)
|
|
98
101
|
}), onClose && /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.IconButton, {
|
|
99
102
|
className: "ml-auto",
|
|
@@ -108,7 +111,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
108
111
|
}), banner, showTable && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
112
|
className: "px-4 small",
|
|
110
113
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
111
|
-
className: "mb-4
|
|
114
|
+
className: "mb-4",
|
|
112
115
|
children: formatMessage(_messages2.default.benefitsHeader)
|
|
113
116
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("table", {
|
|
114
117
|
className: "text-center subscription-comparison-table",
|
|
@@ -182,11 +185,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
182
185
|
})]
|
|
183
186
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SubscriptionUpsell.default, {
|
|
184
187
|
courseId: courseId,
|
|
185
|
-
className: "px-4 pb-4 pt-
|
|
188
|
+
className: "px-4 pb-4 pt-4",
|
|
186
189
|
onSubscribeClick: onSubscribeClick,
|
|
187
190
|
onPurchaseClick: onPurchaseClick,
|
|
188
191
|
onUpgradeEvent: onUpgradeEvent,
|
|
189
|
-
onUpgraded: onUpgraded
|
|
192
|
+
onUpgraded: onUpgraded,
|
|
193
|
+
withUpgradeModal: withUpgradeModal,
|
|
194
|
+
resumeCourseUrl: resumeCourseUrl
|
|
190
195
|
})]
|
|
191
196
|
});
|
|
192
197
|
};
|
|
@@ -197,6 +202,9 @@ SubscriptionUpgradeCard.propTypes = {
|
|
|
197
202
|
onPurchaseClick: _propTypes.default.func,
|
|
198
203
|
onUpgradeEvent: _propTypes.default.func,
|
|
199
204
|
onUpgraded: _propTypes.default.func,
|
|
205
|
+
// Passed to SubscriptionUpsell: Upgrade with your subscription and its pop-ups, and where Resume course goes.
|
|
206
|
+
withUpgradeModal: _propTypes.default.bool,
|
|
207
|
+
resumeCourseUrl: _propTypes.default.string,
|
|
200
208
|
// The courseware sidebar widget passes its toggle so the card can close it.
|
|
201
209
|
onClose: _propTypes.default.func,
|
|
202
210
|
// Host content shown under the certificate preview, such as the access expiration countdown.
|
|
@@ -208,6 +216,8 @@ SubscriptionUpgradeCard.defaultProps = {
|
|
|
208
216
|
onPurchaseClick: undefined,
|
|
209
217
|
onUpgradeEvent: undefined,
|
|
210
218
|
onUpgraded: undefined,
|
|
219
|
+
withUpgradeModal: false,
|
|
220
|
+
resumeCourseUrl: null,
|
|
211
221
|
onClose: undefined,
|
|
212
222
|
banner: undefined
|
|
213
223
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionUpgradeCard.js","names":["_react","_interopRequireDefault","require","_propTypes","_classnames","_frontendPlatform","_i18n","_paragon","_icons","_certificatePreview","_messages","_SubscriptionUpsell","_useSubscriptionOffer","_messages2","_jsxRuntime","e","__esModule","default","SubscriptionUpgradeCard","_ref","courseId","withBorder","onSubscribeClick","onPurchaseClick","onUpgradeEvent","onUpgraded","onClose","banner","formatMessage","useIntl","offer","useSubscriptionOffer","hasUpsell","coursePrice","subscribePrice","included","jsx","Icon","src","CheckCircle","screenReaderText","messages","includedAlt","notIncluded","CloseSmall","notIncludedAlt","showSubscribeColumn","canSubscribe","showBuyColumn","canPurchase","showTable","canUpgradeInPlace","rows","hasTrial","key","label","featureFreeTrial","buy","featureChangeCourses","featureCertificates","certificateLink","Hyperlink","destination","getConfig","MARKETING_SITE_BASE_URL","children","featureCertificatesLink","featureGradedAssignments","featureUnlimitedAccess","filter","Boolean","jsxs","className","classNames","id","Stack","direction","cardHeader","IconButton","Close","iconAs","size","alt","upgradeNotificationMessages","closeAlt","onClick","benefitsHeader","scope","featureColumn","buyColumn","subscribeColumn","map","row","index","last","length","propTypes","PropTypes","string","isRequired","bool","func","node","defaultProps","undefined","_default","exports"],"sources":["../../src/subscription-upsell/SubscriptionUpgradeCard.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { getConfig } from '@edx/frontend-platform';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n Hyperlink, Icon, IconButton, Stack,\n} from '@openedx/paragon';\nimport { CheckCircle, Close, CloseSmall } from '@openedx/paragon/icons';\n\nimport CertificatePreview from '../upgrade-notification/certificate-preview';\nimport upgradeNotificationMessages from '../upgrade-notification/messages';\nimport '../generic/upsell-bullets/UpsellTable.scss';\nimport SubscriptionUpsell from './SubscriptionUpsell';\nimport useSubscriptionOffer from './useSubscriptionOffer';\nimport messages from './messages';\nimport './SubscriptionUpgradeCard.scss';\n\n/** The sidebar card (Figma 3331-33999): certificate preview, Buy vs Subscribe table, buttons. */\nconst SubscriptionUpgradeCard = ({\n courseId,\n withBorder,\n onSubscribeClick,\n onPurchaseClick,\n onUpgradeEvent,\n onUpgraded,\n onClose,\n banner,\n}) => {\n const { formatMessage } = useIntl();\n const offer = useSubscriptionOffer(courseId);\n\n if (!offer?.hasUpsell) {\n return null;\n }\n\n const { coursePrice, subscribePrice } = offer;\n const included = <Icon src={CheckCircle} screenReaderText={formatMessage(messages.includedAlt)} />;\n const notIncluded = <Icon src={CloseSmall} screenReaderText={formatMessage(messages.notIncludedAlt)} />;\n\n // Columns follow the buttons; a subscriber gets Upgrade now and nothing to compare.\n const showSubscribeColumn = offer.canSubscribe;\n const showBuyColumn = offer.canPurchase;\n const showTable = !offer.canUpgradeInPlace && (showSubscribeColumn || showBuyColumn);\n\n const rows = [\n showSubscribeColumn && offer.hasTrial\n && { key: 'free-trial', label: formatMessage(messages.featureFreeTrial), buy: false },\n showSubscribeColumn\n && { key: 'change-courses', label: formatMessage(messages.featureChangeCourses), buy: false },\n {\n key: 'certificates',\n label: formatMessage(messages.featureCertificates, {\n certificateLink: (\n <Hyperlink destination={`${getConfig().MARKETING_SITE_BASE_URL}/verified-certificate`}>\n {formatMessage(messages.featureCertificatesLink)}\n </Hyperlink>\n ),\n }),\n buy: true,\n },\n { key: 'graded-assignments', label: formatMessage(messages.featureGradedAssignments), buy: true },\n { key: 'unlimited-access', label: formatMessage(messages.featureUnlimitedAccess), buy: true },\n ].filter(Boolean);\n\n return (\n <section\n className={classNames('upgrade-notification subscription-upgrade-card small', {\n 'pgn__card pgn__card-light card mb-4 rounded': withBorder,\n })}\n id=\"courseHome-upgradeNotification\"\n data-testid=\"subscription-upgrade-card\"\n >\n <Stack direction=\"horizontal\" className=\"align-items-start px-4 pt-4 mb-3\">\n <h2 className=\"upgrade-notification-header h4 mb-0\">{formatMessage(messages.cardHeader)}</h2>\n {onClose && (\n <IconButton\n className=\"ml-auto\"\n src={Close}\n iconAs={Icon}\n size=\"sm\"\n alt={formatMessage(upgradeNotificationMessages.closeAlt)}\n onClick={onClose}\n />\n )}\n </Stack>\n <CertificatePreview courseId={courseId} />\n {banner}\n {showTable && (\n <div className=\"px-4 small\">\n <h3 className=\"mb-4 primary-500\">{formatMessage(messages.benefitsHeader)}</h3>\n <table className=\"text-center subscription-comparison-table\" data-testid=\"subscription-card-table\">\n <thead>\n <tr>\n <th scope=\"col\"><span className=\"sr-only\">{formatMessage(messages.featureColumn)}</span></th>\n {showBuyColumn && (\n <th scope=\"col\" className=\"audit-cell top-audit-border font-weight-normal\" data-testid=\"subscription-card-buy-header\">\n <div className=\"center-items flex-column\">\n <span>{formatMessage(messages.buyColumn)}</span>\n {coursePrice && <span>{coursePrice}</span>}\n </div>\n </th>\n )}\n {showSubscribeColumn && (\n <th scope=\"col\" className=\"verified-cell top-verified-border\" data-testid=\"subscription-card-subscribe-header\">\n <div className=\"center-items flex-column\">\n <span>{formatMessage(messages.subscribeColumn)}</span>\n {subscribePrice && <span className=\"font-weight-normal\">{subscribePrice}</span>}\n </div>\n </th>\n )}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, index) => {\n const last = index === rows.length - 1;\n return (\n <tr key={row.key} data-testid={`subscription-card-row-${row.key}`}>\n <th scope=\"row\" className={classNames('feature-cell text-left font-weight-normal', { 'bottom-no-border': last })}>\n {row.label}\n </th>\n {showBuyColumn && (\n <td className={classNames('audit-cell', { 'bottom-audit-border': last })}>\n <div className=\"center-items\">{row.buy ? included : notIncluded}</div>\n </td>\n )}\n {showSubscribeColumn && (\n <td className={classNames('verified-cell', { 'bottom-verified-border': last })}>\n <div className=\"center-items\">{included}</div>\n </td>\n )}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n )}\n <SubscriptionUpsell\n courseId={courseId}\n className=\"px-4 pb-4 pt-3\"\n onSubscribeClick={onSubscribeClick}\n onPurchaseClick={onPurchaseClick}\n onUpgradeEvent={onUpgradeEvent}\n onUpgraded={onUpgraded}\n />\n </section>\n );\n};\n\nSubscriptionUpgradeCard.propTypes = {\n courseId: PropTypes.string.isRequired,\n withBorder: PropTypes.bool,\n onSubscribeClick: PropTypes.func,\n onPurchaseClick: PropTypes.func,\n onUpgradeEvent: PropTypes.func,\n onUpgraded: PropTypes.func,\n // The courseware sidebar widget passes its toggle so the card can close it.\n onClose: PropTypes.func,\n // Host content shown under the certificate preview, such as the access expiration countdown.\n banner: PropTypes.node,\n};\n\nSubscriptionUpgradeCard.defaultProps = {\n withBorder: false,\n onSubscribeClick: undefined,\n onPurchaseClick: undefined,\n onUpgradeEvent: undefined,\n onUpgraded: undefined,\n onClose: undefined,\n banner: undefined,\n};\n\nexport default SubscriptionUpgradeCard;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAGA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,mBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,SAAA,GAAAT,sBAAA,CAAAC,OAAA;AACAA,OAAA;AACA,IAAAS,mBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,qBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,UAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACAA,OAAA;AAAwC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAD,uBAAAc,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAjBxC;;AAmBA,iGACA,MAAMG,uBAAuB,GAAGC,IAAA,IAS1B;EAAA,IAT2B;IAC/BC,QAAQ;IACRC,UAAU;IACVC,gBAAgB;IAChBC,eAAe;IACfC,cAAc;IACdC,UAAU;IACVC,OAAO;IACPC;EACF,CAAC,GAAAR,IAAA;EACC,MAAM;IAAES;EA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C;AAEDpF,uBAAuB,CAACqF,YAAY,GAAG;EACrClF,UAAU,EAAE,KAAK;EACjBC,gBAAgB,EAAEkF,SAAS;EAC3BjF,eAAe,EAAEiF,SAAS;EAC1BhF,cAAc,EAAEgF,SAAS;EACzB/E,UAAU,EAAE+E,SAAS;EACrB9E,OAAO,EAAE8E,SAAS;EAClB7E,MAAM,EAAE6E;AACV,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzF,OAAA,GAEaC,uBAAuB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SubscriptionUpgradeCard.js","names":["_react","_interopRequireDefault","require","_propTypes","_classnames","_frontendPlatform","_i18n","_paragon","_icons","_certificatePreview","_messages","_SubscriptionUpsell","_useSubscriptionOffer","_messages2","_jsxRuntime","e","__esModule","default","SubscriptionUpgradeCard","_ref","courseId","withBorder","onSubscribeClick","onPurchaseClick","onUpgradeEvent","onUpgraded","withUpgradeModal","resumeCourseUrl","onClose","banner","formatMessage","useIntl","offer","useSubscriptionOffer","hasUpsell","coursePrice","subscribePrice","included","jsx","Icon","src","CheckCircle","screenReaderText","messages","includedAlt","notIncluded","className","CloseSmall","notIncludedAlt","showSubscribeColumn","canSubscribe","showBuyColumn","canPurchase","showTable","canUpgradeInPlace","rows","hasTrial","key","label","featureFreeTrial","buy","featureChangeCourses","featureCertificates","certificateLink","Hyperlink","destination","getConfig","MARKETING_SITE_BASE_URL","children","featureCertificatesLink","featureGradedAssignments","featureUnlimitedAccess","filter","Boolean","jsxs","classNames","id","Stack","direction","cardHeader","IconButton","Close","iconAs","size","alt","upgradeNotificationMessages","closeAlt","onClick","benefitsHeader","scope","featureColumn","buyColumn","subscribeColumn","map","row","index","last","length","propTypes","PropTypes","string","isRequired","bool","func","node","defaultProps","undefined","_default","exports"],"sources":["../../src/subscription-upsell/SubscriptionUpgradeCard.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { getConfig } from '@edx/frontend-platform';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n Hyperlink, Icon, IconButton, Stack,\n} from '@openedx/paragon';\nimport { CheckCircle, Close, CloseSmall } from '@openedx/paragon/icons';\n\nimport CertificatePreview from '../upgrade-notification/certificate-preview';\nimport upgradeNotificationMessages from '../upgrade-notification/messages';\nimport '../generic/upsell-bullets/UpsellTable.scss';\nimport SubscriptionUpsell from './SubscriptionUpsell';\nimport useSubscriptionOffer from './useSubscriptionOffer';\nimport messages from './messages';\nimport './SubscriptionUpgradeCard.scss';\n\n/** The sidebar card (Figma 3331-33999): certificate preview, Buy vs Subscribe table, buttons. */\nconst SubscriptionUpgradeCard = ({\n courseId,\n withBorder,\n onSubscribeClick,\n onPurchaseClick,\n onUpgradeEvent,\n onUpgraded,\n withUpgradeModal,\n resumeCourseUrl,\n onClose,\n banner,\n}) => {\n const { formatMessage } = useIntl();\n const offer = useSubscriptionOffer(courseId);\n\n if (!offer?.hasUpsell) {\n return null;\n }\n\n const { coursePrice, subscribePrice } = offer;\n const included = <Icon src={CheckCircle} screenReaderText={formatMessage(messages.includedAlt)} />;\n const notIncluded = <Icon className=\"not-included-icon\" src={CloseSmall} screenReaderText={formatMessage(messages.notIncludedAlt)} />;\n\n // Columns follow the buttons; a subscriber gets Upgrade now and nothing to compare.\n const showSubscribeColumn = offer.canSubscribe;\n const showBuyColumn = offer.canPurchase;\n const showTable = !offer.canUpgradeInPlace && (showSubscribeColumn || showBuyColumn);\n\n const rows = [\n showSubscribeColumn && offer.hasTrial\n && { key: 'free-trial', label: formatMessage(messages.featureFreeTrial), buy: false },\n showSubscribeColumn\n && { key: 'change-courses', label: formatMessage(messages.featureChangeCourses), buy: false },\n {\n key: 'certificates',\n label: formatMessage(messages.featureCertificates, {\n certificateLink: (\n <Hyperlink destination={`${getConfig().MARKETING_SITE_BASE_URL}/verified-certificate`}>\n {formatMessage(messages.featureCertificatesLink)}\n </Hyperlink>\n ),\n }),\n buy: true,\n },\n { key: 'graded-assignments', label: formatMessage(messages.featureGradedAssignments), buy: true },\n { key: 'unlimited-access', label: formatMessage(messages.featureUnlimitedAccess), buy: true },\n ].filter(Boolean);\n\n return (\n <section\n className={classNames('upgrade-notification subscription-upgrade-card small', {\n 'pgn__card pgn__card-light card mb-4 rounded': withBorder,\n })}\n id=\"courseHome-upgradeNotification\"\n data-testid=\"subscription-upgrade-card\"\n >\n <Stack direction=\"horizontal\" className=\"align-items-start px-4 pt-4 mb-3\">\n <h2 className=\"upgrade-notification-header mb-0\">{formatMessage(messages.cardHeader)}</h2>\n {onClose && (\n <IconButton\n className=\"ml-auto\"\n src={Close}\n iconAs={Icon}\n size=\"sm\"\n alt={formatMessage(upgradeNotificationMessages.closeAlt)}\n onClick={onClose}\n />\n )}\n </Stack>\n <CertificatePreview courseId={courseId} />\n {banner}\n {showTable && (\n <div className=\"px-4 small\">\n <h3 className=\"mb-4\">{formatMessage(messages.benefitsHeader)}</h3>\n <table className=\"text-center subscription-comparison-table\" data-testid=\"subscription-card-table\">\n <thead>\n <tr>\n <th scope=\"col\"><span className=\"sr-only\">{formatMessage(messages.featureColumn)}</span></th>\n {showBuyColumn && (\n <th scope=\"col\" className=\"audit-cell top-audit-border font-weight-normal\" data-testid=\"subscription-card-buy-header\">\n <div className=\"center-items flex-column\">\n <span>{formatMessage(messages.buyColumn)}</span>\n {coursePrice && <span>{coursePrice}</span>}\n </div>\n </th>\n )}\n {showSubscribeColumn && (\n <th scope=\"col\" className=\"verified-cell top-verified-border\" data-testid=\"subscription-card-subscribe-header\">\n <div className=\"center-items flex-column\">\n <span>{formatMessage(messages.subscribeColumn)}</span>\n {subscribePrice && <span className=\"font-weight-normal\">{subscribePrice}</span>}\n </div>\n </th>\n )}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, index) => {\n const last = index === rows.length - 1;\n return (\n <tr key={row.key} data-testid={`subscription-card-row-${row.key}`}>\n <th scope=\"row\" className={classNames('feature-cell text-left font-weight-normal', { 'bottom-no-border': last })}>\n {row.label}\n </th>\n {showBuyColumn && (\n <td className={classNames('audit-cell', { 'bottom-audit-border': last })}>\n <div className=\"center-items\">{row.buy ? included : notIncluded}</div>\n </td>\n )}\n {showSubscribeColumn && (\n <td className={classNames('verified-cell', { 'bottom-verified-border': last })}>\n <div className=\"center-items\">{included}</div>\n </td>\n )}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n )}\n <SubscriptionUpsell\n courseId={courseId}\n className=\"px-4 pb-4 pt-4\"\n onSubscribeClick={onSubscribeClick}\n onPurchaseClick={onPurchaseClick}\n onUpgradeEvent={onUpgradeEvent}\n onUpgraded={onUpgraded}\n withUpgradeModal={withUpgradeModal}\n resumeCourseUrl={resumeCourseUrl}\n />\n </section>\n );\n};\n\nSubscriptionUpgradeCard.propTypes = {\n courseId: PropTypes.string.isRequired,\n withBorder: PropTypes.bool,\n onSubscribeClick: PropTypes.func,\n onPurchaseClick: PropTypes.func,\n onUpgradeEvent: PropTypes.func,\n onUpgraded: PropTypes.func,\n // Passed to SubscriptionUpsell: Upgrade with your subscription and its pop-ups, and where Resume course goes.\n withUpgradeModal: PropTypes.bool,\n resumeCourseUrl: PropTypes.string,\n // The courseware sidebar widget passes its toggle so the card can close it.\n onClose: PropTypes.func,\n // Host content shown under the certificate preview, such as the access expiration countdown.\n banner: PropTypes.node,\n};\n\nSubscriptionUpgradeCard.defaultProps = {\n withBorder: false,\n onSubscribeClick: undefined,\n onPurchaseClick: undefined,\n onUpgradeEvent: undefined,\n onUpgraded: undefined,\n withUpgradeModal: false,\n resumeCourseUrl: null,\n onClose: undefined,\n banner: undefined,\n};\n\nexport default SubscriptionUpgradeCard;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI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;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA3F,OAAA,GAEaC,uBAAuB","ignoreList":[]}
|
|
@@ -4,7 +4,84 @@
|
|
|
4
4
|
$column-gap: 0.5rem;
|
|
5
5
|
$subscribe-border-width: 2px;
|
|
6
6
|
|
|
7
|
+
// The card's text (LP-1550, Figma 3327-31097, measured 2026-11-13): title Heading/H2 32px/36px above
|
|
8
|
+
// the benefits heading Heading/H3 22px/28px, both Primary/500.
|
|
9
|
+
.subscription-upgrade-card {
|
|
10
|
+
.upgrade-notification-header {
|
|
11
|
+
font-size: 32px;
|
|
12
|
+
line-height: 36px;
|
|
13
|
+
color: var(--pgn-color-primary-500);
|
|
14
|
+
// A long translated word breaks inside the card instead of pushing the close button out of it.
|
|
15
|
+
min-width: 0;
|
|
16
|
+
overflow-wrap: break-word;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
h3 {
|
|
20
|
+
font-size: 22px;
|
|
21
|
+
line-height: 28px;
|
|
22
|
+
color: var(--pgn-color-primary-500);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
7
26
|
.subscription-upgrade-card .subscription-comparison-table {
|
|
27
|
+
// Each plan column is as wide as its label and price (Figma: Buy 60px, Subscribe 86px), so the
|
|
28
|
+
// features take the rest of the row.
|
|
29
|
+
thead .audit-cell,
|
|
30
|
+
thead .verified-cell {
|
|
31
|
+
width: 1px;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
line-height: 18px;
|
|
35
|
+
// Figma leaves 28px between the price and the first row: 20px here plus the row's own 8px.
|
|
36
|
+
padding-bottom: 20px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Figma draws the outline inside the padding (16px for Buy, 8px for Subscribe); a cell's border is outside it.
|
|
40
|
+
.audit-cell {
|
|
41
|
+
color: var(--pgn-color-gray-700);
|
|
42
|
+
// Figma's fill is #FBFAF9; the theme's closest token is light-100 (#F9F8F6), not the shared light-200 (#F3F1ED).
|
|
43
|
+
background-color: var(--pgn-color-light-100);
|
|
44
|
+
padding-left: 15px;
|
|
45
|
+
padding-right: 15px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.verified-cell {
|
|
49
|
+
color: var(--pgn-color-gray-700);
|
|
50
|
+
padding-left: 6px;
|
|
51
|
+
padding-right: 6px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// The price under each plan's name: Figma Paragraph/P1, 11px at 140%.
|
|
55
|
+
thead .center-items span + span {
|
|
56
|
+
font-size: 11px;
|
|
57
|
+
line-height: 1.4;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.feature-cell {
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
line-height: 20px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 20px icons; the Subscribe ticks are Success/500 and the Buy ticks Gray/500.
|
|
66
|
+
.pgn__icon {
|
|
67
|
+
width: 20px;
|
|
68
|
+
height: 20px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.audit-cell .pgn__icon {
|
|
72
|
+
color: var(--pgn-color-gray-500);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.verified-cell .pgn__icon {
|
|
76
|
+
color: var(--pgn-color-success-500);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// The Buy crosses are lighter than the ticks. Figma's #9E9B99 is 2.6:1 on this fill; gray-400 (#8F8F8F)
|
|
80
|
+
// is the closest theme colour that reaches the 3:1 an icon needs.
|
|
81
|
+
.audit-cell .not-included-icon {
|
|
82
|
+
color: var(--pgn-color-gray-400);
|
|
83
|
+
}
|
|
84
|
+
|
|
8
85
|
// The shared cell classes draw each column's outline and its 0.375rem (6px) corners, which only
|
|
9
86
|
// show with separate borders, and a table cell takes no margin, so the gap between the columns is
|
|
10
87
|
// the border spacing.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.PROGRESS_STAGE = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _i18n = require("@edx/frontend-platform/i18n");
|
|
10
|
+
var _paragon = require("@openedx/paragon");
|
|
11
|
+
var _modelStore = require("@src/generic/model-store");
|
|
12
|
+
var _lms_api = require("../data/lms_api");
|
|
13
|
+
var _useSubscriptionOffer = require("./useSubscriptionOffer");
|
|
14
|
+
var _messages = _interopRequireDefault(require("./messages"));
|
|
15
|
+
require("./SubscriptionUpgradeProgressModal.scss");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
23
|
+
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); } /* eslint import/no-unresolved: 0 */
|
|
24
|
+
const PROGRESS_STAGE = exports.PROGRESS_STAGE = {
|
|
25
|
+
UPGRADING: 'upgrading',
|
|
26
|
+
UPGRADED: 'upgraded',
|
|
27
|
+
// Kept mounted after the learner closes it, so the partner name is still there when it reopens.
|
|
28
|
+
CLOSED: 'closed'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The pop-ups for a subscriber's Upgrade with your subscription (LP-1540): upgrading while the request
|
|
33
|
+
* and the enrollment poll run, then upgraded once the enrollment is verified. The upgrading one can
|
|
34
|
+
* be closed; the upgrade carries on. Resume course follows resumeUrl (course home); without it, it
|
|
35
|
+
* does what Close does, so in the courseware the learner carries on with the unit they are on.
|
|
36
|
+
*/
|
|
37
|
+
const SubscriptionUpgradeProgressModal = _ref => {
|
|
38
|
+
let {
|
|
39
|
+
courseId,
|
|
40
|
+
stage,
|
|
41
|
+
onClose,
|
|
42
|
+
resumeUrl
|
|
43
|
+
} = _ref;
|
|
44
|
+
const {
|
|
45
|
+
formatMessage
|
|
46
|
+
} = (0, _i18n.useIntl)();
|
|
47
|
+
const {
|
|
48
|
+
org,
|
|
49
|
+
title,
|
|
50
|
+
verifiedMode
|
|
51
|
+
} = (0, _modelStore.useModel)('courseHomeMeta', courseId) || {};
|
|
52
|
+
const [partnerName, setPartnerName] = (0, _react.useState)(null);
|
|
53
|
+
(0, _react.useEffect)(() => {
|
|
54
|
+
let cancelled = false;
|
|
55
|
+
setPartnerName(null);
|
|
56
|
+
if (org) {
|
|
57
|
+
(0, _lms_api.fetchOrg)(org).then(data => {
|
|
58
|
+
if (!cancelled) {
|
|
59
|
+
setPartnerName(data?.name || null);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return () => {
|
|
64
|
+
cancelled = true;
|
|
65
|
+
};
|
|
66
|
+
}, [org]);
|
|
67
|
+
const isUpgraded = stage === PROGRESS_STAGE.UPGRADED;
|
|
68
|
+
// The full verified price: the first-purchase discount is not what the subscriber saves.
|
|
69
|
+
const price = (0, _useSubscriptionOffer.formatCoursePrice)(verifiedMode);
|
|
70
|
+
const heading = isUpgraded ? formatMessage(_messages.default.upgradedTitle, {
|
|
71
|
+
courseName: title,
|
|
72
|
+
partnerName: partnerName || org
|
|
73
|
+
}) : formatMessage(_messages.default.upgradingTitle);
|
|
74
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_paragon.ModalDialog, {
|
|
75
|
+
title: heading,
|
|
76
|
+
isOpen: stage !== PROGRESS_STAGE.CLOSED,
|
|
77
|
+
onClose: onClose,
|
|
78
|
+
size: "md",
|
|
79
|
+
hasCloseButton: !isUpgraded,
|
|
80
|
+
isOverflowVisible: false,
|
|
81
|
+
className: "subscription-upgrade-progress-modal",
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.ModalDialog.Header, {
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.ModalDialog.Title, {
|
|
84
|
+
as: "h2",
|
|
85
|
+
children: heading
|
|
86
|
+
})
|
|
87
|
+
}), isUpgraded ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
88
|
+
children: [price && /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.ModalDialog.Body, {
|
|
89
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
90
|
+
className: "mb-0",
|
|
91
|
+
"data-testid": "subscription-upgraded-savings",
|
|
92
|
+
children: formatMessage(_messages.default.upgradedSavings, {
|
|
93
|
+
price
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.ModalDialog.Footer, {
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_paragon.ActionRow, {
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Button, {
|
|
99
|
+
variant: "tertiary",
|
|
100
|
+
onClick: onClose,
|
|
101
|
+
"data-testid": "subscription-upgraded-close",
|
|
102
|
+
children: formatMessage(_messages.default.upgradedClose)
|
|
103
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Button, _objectSpread(_objectSpread({}, resumeUrl ? {
|
|
104
|
+
as: 'a',
|
|
105
|
+
href: resumeUrl
|
|
106
|
+
} : {
|
|
107
|
+
onClick: onClose
|
|
108
|
+
}), {}, {
|
|
109
|
+
variant: "brand",
|
|
110
|
+
className: "rounded-pill",
|
|
111
|
+
"data-testid": "subscription-upgraded-resume",
|
|
112
|
+
children: formatMessage(_messages.default.upgradedResumeCourse)
|
|
113
|
+
}))]
|
|
114
|
+
})
|
|
115
|
+
})]
|
|
116
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_paragon.ModalDialog.Body, {
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
118
|
+
"data-testid": "subscription-upgrading-value-prop",
|
|
119
|
+
children: formatMessage(_messages.default.upgradingValueProp)
|
|
120
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
121
|
+
className: "d-flex justify-content-center pb-4",
|
|
122
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Spinner, {
|
|
123
|
+
animation: "border",
|
|
124
|
+
screenReaderText: formatMessage(_messages.default.upgradingScreenReader)
|
|
125
|
+
})
|
|
126
|
+
})]
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
SubscriptionUpgradeProgressModal.propTypes = {
|
|
131
|
+
courseId: _propTypes.default.string.isRequired,
|
|
132
|
+
stage: _propTypes.default.oneOf(Object.values(PROGRESS_STAGE)).isRequired,
|
|
133
|
+
onClose: _propTypes.default.func.isRequired,
|
|
134
|
+
resumeUrl: _propTypes.default.string
|
|
135
|
+
};
|
|
136
|
+
SubscriptionUpgradeProgressModal.defaultProps = {
|
|
137
|
+
resumeUrl: null
|
|
138
|
+
};
|
|
139
|
+
var _default = exports.default = SubscriptionUpgradeProgressModal;
|
|
140
|
+
//# sourceMappingURL=SubscriptionUpgradeProgressModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionUpgradeProgressModal.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_i18n","_paragon","_modelStore","_lms_api","_useSubscriptionOffer","_messages","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","PROGRESS_STAGE","exports","UPGRADING","UPGRADED","CLOSED","SubscriptionUpgradeProgressModal","_ref","courseId","stage","onClose","resumeUrl","formatMessage","useIntl","org","title","verifiedMode","useModel","partnerName","setPartnerName","useState","useEffect","cancelled","fetchOrg","then","data","name","isUpgraded","price","formatCoursePrice","heading","messages","upgradedTitle","courseName","upgradingTitle","jsxs","ModalDialog","isOpen","size","hasCloseButton","isOverflowVisible","className","children","jsx","Header","Title","as","Fragment","Body","upgradedSavings","Footer","ActionRow","Button","variant","onClick","upgradedClose","href","upgradedResumeCourse","upgradingValueProp","Spinner","animation","screenReaderText","upgradingScreenReader","propTypes","PropTypes","string","isRequired","oneOf","values","func","defaultProps","_default"],"sources":["../../src/subscription-upsell/SubscriptionUpgradeProgressModal.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n ActionRow, Button, ModalDialog, Spinner,\n} from '@openedx/paragon';\nimport { useModel } from '@src/generic/model-store';\n\nimport { fetchOrg } from '../data/lms_api';\nimport { formatCoursePrice } from './useSubscriptionOffer';\nimport messages from './messages';\nimport './SubscriptionUpgradeProgressModal.scss';\n\nexport const PROGRESS_STAGE = {\n UPGRADING: 'upgrading',\n UPGRADED: 'upgraded',\n // Kept mounted after the learner closes it, so the partner name is still there when it reopens.\n CLOSED: 'closed',\n};\n\n/**\n * The pop-ups for a subscriber's Upgrade with your subscription (LP-1540): upgrading while the request\n * and the enrollment poll run, then upgraded once the enrollment is verified. The upgrading one can\n * be closed; the upgrade carries on. Resume course follows resumeUrl (course home); without it, it\n * does what Close does, so in the courseware the learner carries on with the unit they are on.\n */\nconst SubscriptionUpgradeProgressModal = ({\n courseId, stage, onClose, resumeUrl,\n}) => {\n const { formatMessage } = useIntl();\n const { org, title, verifiedMode } = useModel('courseHomeMeta', courseId) || {};\n const [partnerName, setPartnerName] = useState(null);\n\n useEffect(() => {\n let cancelled = false;\n setPartnerName(null);\n if (org) {\n fetchOrg(org).then((data) => {\n if (!cancelled) {\n setPartnerName(data?.name || null);\n }\n });\n }\n return () => { cancelled = true; };\n }, [org]);\n\n const isUpgraded = stage === PROGRESS_STAGE.UPGRADED;\n // The full verified price: the first-purchase discount is not what the subscriber saves.\n const price = formatCoursePrice(verifiedMode);\n const heading = isUpgraded\n ? formatMessage(messages.upgradedTitle, { courseName: title, partnerName: partnerName || org })\n : formatMessage(messages.upgradingTitle);\n\n return (\n <ModalDialog\n title={heading}\n isOpen={stage !== PROGRESS_STAGE.CLOSED}\n onClose={onClose}\n size=\"md\"\n hasCloseButton={!isUpgraded}\n isOverflowVisible={false}\n className=\"subscription-upgrade-progress-modal\"\n >\n <ModalDialog.Header>\n <ModalDialog.Title as=\"h2\">{heading}</ModalDialog.Title>\n </ModalDialog.Header>\n {isUpgraded ? (\n <>\n {price && (\n <ModalDialog.Body>\n <p className=\"mb-0\" data-testid=\"subscription-upgraded-savings\">\n {formatMessage(messages.upgradedSavings, { price })}\n </p>\n </ModalDialog.Body>\n )}\n <ModalDialog.Footer>\n <ActionRow>\n <Button variant=\"tertiary\" onClick={onClose} data-testid=\"subscription-upgraded-close\">\n {formatMessage(messages.upgradedClose)}\n </Button>\n <Button\n {...(resumeUrl ? { as: 'a', href: resumeUrl } : { onClick: onClose })}\n variant=\"brand\"\n className=\"rounded-pill\"\n data-testid=\"subscription-upgraded-resume\"\n >\n {formatMessage(messages.upgradedResumeCourse)}\n </Button>\n </ActionRow>\n </ModalDialog.Footer>\n </>\n ) : (\n <ModalDialog.Body>\n <p data-testid=\"subscription-upgrading-value-prop\">{formatMessage(messages.upgradingValueProp)}</p>\n <div className=\"d-flex justify-content-center pb-4\">\n <Spinner animation=\"border\" screenReaderText={formatMessage(messages.upgradingScreenReader)} />\n </div>\n </ModalDialog.Body>\n )}\n </ModalDialog>\n );\n};\n\nSubscriptionUpgradeProgressModal.propTypes = {\n courseId: PropTypes.string.isRequired,\n stage: PropTypes.oneOf(Object.values(PROGRESS_STAGE)).isRequired,\n onClose: PropTypes.func.isRequired,\n resumeUrl: PropTypes.string,\n};\n\nSubscriptionUpgradeProgressModal.defaultProps = {\n resumeUrl: null,\n};\n\nexport default SubscriptionUpgradeProgressModal;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA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,QAAA,CAAAoF,WAAW,CAACY,IAAI;MAAAN,QAAA,gBACf,IAAArF,WAAA,CAAAsF,GAAA;QAAG,eAAY,mCAAmC;QAAAD,QAAA,EAAE9B,aAAa,CAACmB,iBAAQ,CAAC2B,kBAAkB;MAAC,CAAI,CAAC,eACnG,IAAArG,WAAA,CAAAsF,GAAA;QAAKF,SAAS,EAAC,oCAAoC;QAAAC,QAAA,eACjD,IAAArF,WAAA,CAAAsF,GAAA,EAAC3F,QAAA,CAAA2G,OAAO;UAACC,SAAS,EAAC,QAAQ;UAACC,gBAAgB,EAAEjD,aAAa,CAACmB,iBAAQ,CAAC+B,qBAAqB;QAAE,CAAE;MAAC,CAC5F,CAAC;IAAA,CACU,CACnB;EAAA,CACU,CAAC;AAElB,CAAC;AAEDxD,gCAAgC,CAACyD,SAAS,GAAG;EAC3CvD,QAAQ,EAAEwD,kBAAS,CAACC,MAAM,CAACC,UAAU;EACrCzD,KAAK,EAAEuD,kBAAS,CAACG,KAAK,CAAC7F,MAAM,CAAC8F,MAAM,CAACnE,cAAc,CAAC,CAAC,CAACiE,UAAU;EAChExD,OAAO,EAAEsD,kBAAS,CAACK,IAAI,CAACH,UAAU;EAClCvD,SAAS,EAAEqD,kBAAS,CAACC;AACvB,CAAC;AAED3D,gCAAgC,CAACgE,YAAY,GAAG;EAC9C3D,SAAS,EAAE;AACb,CAAC;AAAC,IAAA4D,QAAA,GAAArE,OAAA,CAAA1C,OAAA,GAEa8C,gCAAgC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Upgrading and upgraded pop-ups (LP-1540 mockups): white, rounded, heavy Primary/500 title, grey body.
|
|
2
|
+
.subscription-upgrade-progress-modal.pgn__modal {
|
|
3
|
+
--pgn-size-modal-content-border-radius: 12px;
|
|
4
|
+
|
|
5
|
+
.pgn__modal-title {
|
|
6
|
+
font-weight: 800;
|
|
7
|
+
color: var(--pgn-color-primary-500);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.pgn__modal-body {
|
|
11
|
+
color: var(--pgn-color-gray-700);
|
|
12
|
+
}
|
|
13
|
+
}
|