@edx/frontend-plugin-advertisements 2.13.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/upgrade-modal/NextUnitButton.js +27 -13
- package/dist/upgrade-modal/NextUnitButton.js.map +1 -1
- package/dist/upgrade-to-complete-alert/UpgradeToCompleteAlert.js +69 -0
- package/dist/upgrade-to-complete-alert/UpgradeToCompleteAlert.js.map +1 -0
- package/dist/upgrade-to-complete-alert/index.js +10 -0
- package/dist/upgrade-to-complete-alert/index.js.map +1 -0
- package/dist/upgrade-to-complete-alert/messages.js +26 -0
- package/dist/upgrade-to-complete-alert/messages.js.map +1 -0
- package/dist/upgrade-to-complete-alert/track.js +25 -0
- package/dist/upgrade-to-complete-alert/track.js.map +1 -0
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "UpgradeNotification", {
|
|
|
45
45
|
return _upgradeNotification.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "UpgradeToCompleteAlert", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _upgradeToCompleteAlert.default;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
48
54
|
Object.defineProperty(exports, "UpsellBullets", {
|
|
49
55
|
enumerable: true,
|
|
50
56
|
get: function () {
|
|
@@ -55,6 +61,7 @@ var _upgradeNotification = _interopRequireDefault(require("./upgrade-notificatio
|
|
|
55
61
|
var _paywall = _interopRequireDefault(require("./paywall"));
|
|
56
62
|
var _upgradeModal = _interopRequireDefault(require("./upgrade-modal"));
|
|
57
63
|
var _accessExpirationAlert = _interopRequireDefault(require("./access-expiration-alert"));
|
|
64
|
+
var _upgradeToCompleteAlert = _interopRequireDefault(require("./upgrade-to-complete-alert"));
|
|
58
65
|
var _generic = require("./generic");
|
|
59
66
|
var _sectionOutline = _interopRequireDefault(require("./section-outline"));
|
|
60
67
|
var _dynamicExperienceSlot = _interopRequireDefault(require("./dynamic-experience-slot"));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_upgradeNotification","_interopRequireDefault","require","_paywall","_upgradeModal","_accessExpirationAlert","_generic","_sectionOutline","_dynamicExperienceSlot","_uclWrapper","e","__esModule","default"],"sources":["../src/index.jsx"],"sourcesContent":["import UpgradeNotification from './upgrade-notification';\nimport LockPaywall from './paywall';\nimport NextUnitButton from './upgrade-modal';\nimport AccessExpirationAlert from './access-expiration-alert';\nimport { UpsellBullets } from './generic';\nimport SectionList from './section-outline';\nimport DynamicExperienceSlot from './dynamic-experience-slot';\nimport UclWrapper from './ucl-wrapper';\nimport './index.scss';\n\nexport {\n UpgradeNotification,\n LockPaywall,\n NextUnitButton,\n AccessExpirationAlert,\n UpsellBullets,\n SectionList,\n DynamicExperienceSlot,\n UclWrapper,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_upgradeNotification","_interopRequireDefault","require","_paywall","_upgradeModal","_accessExpirationAlert","_upgradeToCompleteAlert","_generic","_sectionOutline","_dynamicExperienceSlot","_uclWrapper","e","__esModule","default"],"sources":["../src/index.jsx"],"sourcesContent":["import UpgradeNotification from './upgrade-notification';\nimport LockPaywall from './paywall';\nimport NextUnitButton from './upgrade-modal';\nimport AccessExpirationAlert from './access-expiration-alert';\nimport UpgradeToCompleteAlert from './upgrade-to-complete-alert';\nimport { UpsellBullets } from './generic';\nimport SectionList from './section-outline';\nimport DynamicExperienceSlot from './dynamic-experience-slot';\nimport UclWrapper from './ucl-wrapper';\nimport './index.scss';\n\nexport {\n UpgradeNotification,\n LockPaywall,\n NextUnitButton,\n AccessExpirationAlert,\n UpgradeToCompleteAlert,\n UpsellBullets,\n SectionList,\n DynamicExperienceSlot,\n UclWrapper,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,sBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,uBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,sBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,WAAA,GAAAT,sBAAA,CAAAC,OAAA;AACAA,OAAA;AAAsB,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -7,16 +7,21 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _paragon = require("@openedx/paragon");
|
|
10
|
+
var _react2 = require("@edx/frontend-platform/react");
|
|
10
11
|
var _modelStore = require("@src/generic/model-store");
|
|
11
12
|
var _hooks = require("@src/data/hooks");
|
|
12
13
|
var _NextButton = _interopRequireDefault(require("@src/courseware/course/sequence/sequence-navigation/generic/NextButton"));
|
|
13
14
|
var _hooks2 = require("./hooks");
|
|
14
15
|
var _UpgradeModal = _interopRequireDefault(require("./UpgradeModal"));
|
|
16
|
+
var _dynamicExperienceSlot = _interopRequireDefault(require("../dynamic-experience-slot"));
|
|
15
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
19
|
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); }
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
+
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 */
|
|
20
25
|
const NextUnitButton = _ref => {
|
|
21
26
|
let {
|
|
22
27
|
disabled,
|
|
@@ -55,6 +60,18 @@ const NextUnitButton = _ref => {
|
|
|
55
60
|
handleModal();
|
|
56
61
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
57
62
|
}, [sequenceId]);
|
|
63
|
+
const modalProps = (0, _react.useMemo)(() => ({
|
|
64
|
+
isOpen,
|
|
65
|
+
close,
|
|
66
|
+
verifiedMode,
|
|
67
|
+
org,
|
|
68
|
+
courseId,
|
|
69
|
+
offer,
|
|
70
|
+
marketingUrl,
|
|
71
|
+
accessExpiration,
|
|
72
|
+
datesBannerInfo,
|
|
73
|
+
learningAssistantEnabled
|
|
74
|
+
}), [isOpen, close, verifiedMode, org, courseId, offer, marketingUrl, accessExpiration, datesBannerInfo, learningAssistantEnabled]);
|
|
58
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
59
76
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NextButton.default, {
|
|
60
77
|
onClickHandler: onClickHandler,
|
|
@@ -64,17 +81,14 @@ const NextUnitButton = _ref => {
|
|
|
64
81
|
buttonText: buttonText,
|
|
65
82
|
disabled: disabled,
|
|
66
83
|
isAtTop: isAtTop
|
|
67
|
-
}), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
accessExpiration,
|
|
76
|
-
datesBannerInfo,
|
|
77
|
-
learningAssistantEnabled
|
|
84
|
+
}), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.ErrorBoundary, {
|
|
85
|
+
fallbackComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UpgradeModal.default, _objectSpread({}, modalProps)),
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dynamicExperienceSlot.default, {
|
|
87
|
+
widgetName: "MonarchResolvedDynamicExperience",
|
|
88
|
+
placement: "org.2u.edx.frontend.learning.upgrade.modal.v1",
|
|
89
|
+
tenantId: "2u-edx-learning",
|
|
90
|
+
pluginProps: modalProps
|
|
91
|
+
})
|
|
78
92
|
})]
|
|
79
93
|
});
|
|
80
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextUnitButton.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_paragon","_modelStore","_hooks","_NextButton","_hooks2","_UpgradeModal","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NextUnitButton","_ref","disabled","buttonText","sequenceId","onClickHandler","nextLink","variant","buttonStyle","isAtTop","courseId","useContextId","isOpen","open","close","useToggle","verifiedMode","org","useModel","offer","marketingUrl","accessExpiration","datesBannerInfo","learningAssistantEnabled","isEnabled","useIsModalEnabled","shouldShowModalOnClick","countNextClick","useInCourseUpgradeModal","handleModal","useEffect","jsxs","Fragment","children","jsx","defaultProps","propTypes","PropTypes","bool","isRequired","string","unitId","func","_default","exports"],"sources":["../../src/upgrade-modal/NextUnitButton.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useToggle } from '@openedx/paragon';\n\nimport { useModel } from '@src/generic/model-store';\nimport { useContextId } from '@src/data/hooks';\nimport NextButton from '@src/courseware/course/sequence/sequence-navigation/generic/NextButton';\nimport { useInCourseUpgradeModal, useIsModalEnabled } from './hooks';\nimport UpgradeModal from './UpgradeModal';\n\nconst NextUnitButton = ({\n disabled,\n buttonText,\n sequenceId,\n onClickHandler,\n nextLink,\n variant,\n buttonStyle,\n isAtTop,\n}) => {\n const courseId = useContextId();\n const [isOpen, open, close] = useToggle(false);\n const {\n verifiedMode,\n org,\n } = useModel('courseHomeMeta', courseId);\n\n const {\n offer,\n marketingUrl,\n accessExpiration,\n datesBannerInfo,\n learningAssistantEnabled,\n } = useModel('coursewareMeta', courseId);\n\n const isEnabled = useIsModalEnabled(courseId);\n const [shouldShowModalOnClick, countNextClick] = useInCourseUpgradeModal();\n\n const handleModal = () => {\n if (isEnabled) {\n countNextClick();\n if (shouldShowModalOnClick) {\n open();\n }\n }\n };\n\n useEffect(() => {\n handleModal();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [sequenceId]);\n\n return (\n <>\n <NextButton\n onClickHandler={onClickHandler}\n nextLink={nextLink}\n variant={variant}\n buttonStyle={buttonStyle}\n buttonText={buttonText}\n disabled={disabled}\n isAtTop={isAtTop}\n />\n {isOpen && (\n <UpgradeModal
|
|
1
|
+
{"version":3,"file":"NextUnitButton.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_paragon","_react2","_modelStore","_hooks","_NextButton","_hooks2","_UpgradeModal","_dynamicExperienceSlot","_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","NextUnitButton","_ref","disabled","buttonText","sequenceId","onClickHandler","nextLink","variant","buttonStyle","isAtTop","courseId","useContextId","isOpen","open","close","useToggle","verifiedMode","org","useModel","offer","marketingUrl","accessExpiration","datesBannerInfo","learningAssistantEnabled","isEnabled","useIsModalEnabled","shouldShowModalOnClick","countNextClick","useInCourseUpgradeModal","handleModal","useEffect","modalProps","useMemo","jsxs","Fragment","children","jsx","ErrorBoundary","fallbackComponent","widgetName","placement","tenantId","pluginProps","defaultProps","propTypes","PropTypes","bool","isRequired","string","unitId","func","_default","exports"],"sources":["../../src/upgrade-modal/NextUnitButton.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React, { useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { useToggle } from '@openedx/paragon';\nimport { ErrorBoundary } from '@edx/frontend-platform/react';\n\nimport { useModel } from '@src/generic/model-store';\nimport { useContextId } from '@src/data/hooks';\nimport NextButton from '@src/courseware/course/sequence/sequence-navigation/generic/NextButton';\nimport { useInCourseUpgradeModal, useIsModalEnabled } from './hooks';\nimport UpgradeModal from './UpgradeModal';\nimport DynamicExperienceSlot from '../dynamic-experience-slot';\n\nconst NextUnitButton = ({\n disabled,\n buttonText,\n sequenceId,\n onClickHandler,\n nextLink,\n variant,\n buttonStyle,\n isAtTop,\n}) => {\n const courseId = useContextId();\n const [isOpen, open, close] = useToggle(false);\n const {\n verifiedMode,\n org,\n } = useModel('courseHomeMeta', courseId);\n\n const {\n offer,\n marketingUrl,\n accessExpiration,\n datesBannerInfo,\n learningAssistantEnabled,\n } = useModel('coursewareMeta', courseId);\n\n const isEnabled = useIsModalEnabled(courseId);\n const [shouldShowModalOnClick, countNextClick] = useInCourseUpgradeModal();\n\n const handleModal = () => {\n if (isEnabled) {\n countNextClick();\n if (shouldShowModalOnClick) {\n open();\n }\n }\n };\n\n useEffect(() => {\n handleModal();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [sequenceId]);\n\n const modalProps = useMemo(() => ({\n isOpen,\n close,\n verifiedMode,\n org,\n courseId,\n offer,\n marketingUrl,\n accessExpiration,\n datesBannerInfo,\n learningAssistantEnabled,\n }), [\n isOpen,\n close,\n verifiedMode,\n org,\n courseId,\n offer,\n marketingUrl,\n accessExpiration,\n datesBannerInfo,\n learningAssistantEnabled,\n ]);\n\n return (\n <>\n <NextButton\n onClickHandler={onClickHandler}\n nextLink={nextLink}\n variant={variant}\n buttonStyle={buttonStyle}\n buttonText={buttonText}\n disabled={disabled}\n isAtTop={isAtTop}\n />\n\n {isOpen && (\n <ErrorBoundary fallbackComponent={<UpgradeModal {...modalProps} />}>\n <DynamicExperienceSlot\n widgetName=\"MonarchResolvedDynamicExperience\"\n placement=\"org.2u.edx.frontend.learning.upgrade.modal.v1\"\n tenantId=\"2u-edx-learning\"\n pluginProps={modalProps}\n />\n </ErrorBoundary>\n )}\n </>\n );\n};\n\nNextUnitButton.defaultProps = {\n isAtTop: false,\n};\n\nNextUnitButton.propTypes = {\n disabled: PropTypes.bool.isRequired,\n buttonText: PropTypes.string.isRequired,\n nextLink: PropTypes.string.isRequired,\n sequenceId: PropTypes.string.isRequired,\n // eslint-disable-next-line react/no-unused-prop-types\n unitId: PropTypes.string.isRequired,\n onClickHandler: PropTypes.func.isRequired,\n // eslint-disable-next-line react/no-unused-prop-types\n courseId: PropTypes.string.isRequired,\n variant: PropTypes.string.isRequired,\n buttonStyle: PropTypes.string.isRequired,\n isAtTop: PropTypes.bool,\n};\n\nexport default NextUnitButton;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,sBAAA,GAAAR,sBAAA,CAAAF,OAAA;AAA+D,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAjB,uBAAA,YAAAA,CAAAa,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAA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,kBAAS,CAACK,IAAI,CAACH,UAAU;EACzC;EACArC,QAAQ,EAAEmC,kBAAS,CAACG,MAAM,CAACD,UAAU;EACrCxC,OAAO,EAAEsC,kBAAS,CAACG,MAAM,CAACD,UAAU;EACpCvC,WAAW,EAAEqC,kBAAS,CAACG,MAAM,CAACD,UAAU;EACxCtC,OAAO,EAAEoC,kBAAS,CAACC;AACrB,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAA7F,OAAA,GAEayC,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _i18n = require("@edx/frontend-platform/i18n");
|
|
10
|
+
var _paragon = require("@openedx/paragon");
|
|
11
|
+
var _modelStore = require("@src/generic/model-store");
|
|
12
|
+
var _messages = _interopRequireDefault(require("./messages"));
|
|
13
|
+
var _track = require("./track");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
// eslint-disable-line import/no-unresolved
|
|
17
|
+
|
|
18
|
+
const UpgradeToCompleteAlert = () => {
|
|
19
|
+
const intl = (0, _i18n.useIntl)();
|
|
20
|
+
const {
|
|
21
|
+
courseId
|
|
22
|
+
} = (0, _reactRedux.useSelector)(state => state.courseHome);
|
|
23
|
+
const {
|
|
24
|
+
datesBannerInfo,
|
|
25
|
+
hasEnded
|
|
26
|
+
} = (0, _modelStore.useModel)('dates', courseId);
|
|
27
|
+
const {
|
|
28
|
+
org
|
|
29
|
+
} = (0, _modelStore.useModel)('courseHomeMeta', courseId);
|
|
30
|
+
const {
|
|
31
|
+
contentTypeGatingEnabled,
|
|
32
|
+
missedDeadlines,
|
|
33
|
+
verifiedUpgradeLink
|
|
34
|
+
} = datesBannerInfo || {};
|
|
35
|
+
if (!contentTypeGatingEnabled || missedDeadlines || hasEnded || !verifiedUpgradeLink) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Alert, {
|
|
39
|
+
id: "upgrade-complete-alert",
|
|
40
|
+
className: "bg-light-200",
|
|
41
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_paragon.Row, {
|
|
42
|
+
className: "w-100 m-0",
|
|
43
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_paragon.Col, {
|
|
44
|
+
xs: 12,
|
|
45
|
+
md: 9,
|
|
46
|
+
className: "small p-0 pr-md-2",
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Alert.Heading, {
|
|
48
|
+
children: intl.formatMessage(_messages.default.upgradeToCompleteHeader)
|
|
49
|
+
}), intl.formatMessage(_messages.default.upgradeToCompleteBody)]
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Col, {
|
|
51
|
+
xs: 12,
|
|
52
|
+
md: 3,
|
|
53
|
+
className: "align-self-center text-right mt-3 mt-md-0 p-0",
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Button, {
|
|
55
|
+
variant: "brand",
|
|
56
|
+
size: "sm",
|
|
57
|
+
className: "w-xs-100 w-md-auto",
|
|
58
|
+
onClick: () => {
|
|
59
|
+
(0, _track.logUpgradeLinkClick)(org, courseId);
|
|
60
|
+
global.location.replace(verifiedUpgradeLink);
|
|
61
|
+
},
|
|
62
|
+
children: intl.formatMessage(_messages.default.upgradeToCompleteButton)
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var _default = exports.default = UpgradeToCompleteAlert;
|
|
69
|
+
//# sourceMappingURL=UpgradeToCompleteAlert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpgradeToCompleteAlert.js","names":["_react","_interopRequireDefault","require","_reactRedux","_i18n","_paragon","_modelStore","_messages","_track","_jsxRuntime","e","__esModule","default","UpgradeToCompleteAlert","intl","useIntl","courseId","useSelector","state","courseHome","datesBannerInfo","hasEnded","useModel","org","contentTypeGatingEnabled","missedDeadlines","verifiedUpgradeLink","jsx","Alert","id","className","children","jsxs","Row","Col","xs","md","Heading","formatMessage","messages","upgradeToCompleteHeader","upgradeToCompleteBody","Button","variant","size","onClick","logUpgradeLinkClick","global","location","replace","upgradeToCompleteButton","_default","exports"],"sources":["../../src/upgrade-to-complete-alert/UpgradeToCompleteAlert.jsx"],"sourcesContent":["import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n Alert,\n Button,\n Col,\n Row,\n} from '@openedx/paragon';\n\nimport { useModel } from '@src/generic/model-store'; // eslint-disable-line import/no-unresolved\nimport messages from './messages';\nimport { logUpgradeLinkClick } from './track';\n\nconst UpgradeToCompleteAlert = () => {\n const intl = useIntl();\n const {\n courseId,\n } = useSelector(state => state.courseHome);\n\n const {\n datesBannerInfo,\n hasEnded,\n } = useModel('dates', courseId);\n\n const {\n org,\n } = useModel('courseHomeMeta', courseId);\n\n const {\n contentTypeGatingEnabled,\n missedDeadlines,\n verifiedUpgradeLink,\n } = datesBannerInfo || {};\n\n if (!contentTypeGatingEnabled || missedDeadlines || hasEnded || !verifiedUpgradeLink) {\n return null;\n }\n\n return (\n <Alert id=\"upgrade-complete-alert\" className=\"bg-light-200\">\n <Row className=\"w-100 m-0\">\n <Col xs={12} md={9} className=\"small p-0 pr-md-2\">\n <Alert.Heading>{intl.formatMessage(messages.upgradeToCompleteHeader)}</Alert.Heading>\n {intl.formatMessage(messages.upgradeToCompleteBody)}\n </Col>\n <Col xs={12} md={3} className=\"align-self-center text-right mt-3 mt-md-0 p-0\">\n <Button\n variant=\"brand\"\n size=\"sm\"\n className=\"w-xs-100 w-md-auto\"\n onClick={() => {\n logUpgradeLinkClick(org, courseId);\n global.location.replace(verifiedUpgradeLink);\n }}\n >\n {intl.formatMessage(messages.upgradeToCompleteButton)}\n </Button>\n </Col>\n </Row>\n </Alert>\n );\n};\n\nexport default UpgradeToCompleteAlert;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAOA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA8C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFO;;AAIrD,MAAMG,sBAAsB,GAAGA,CAAA,KAAM;EACnC,MAAMC,IAAI,GAAG,IAAAC,aAAO,EAAC,CAAC;EACtB,MAAM;IACJC;EACF,CAAC,GAAG,IAAAC,uBAAW,EAACC,KAAK,IAAIA,KAAK,CAACC,UAAU,CAAC;EAE1C,MAAM;IACJC,eAAe;IACfC;EACF,CAAC,GAAG,IAAAC,oBAAQ,EAAC,OAAO,EAAEN,QAAQ,CAAC;EAE/B,MAAM;IACJO;EACF,CAAC,GAAG,IAAAD,oBAAQ,EAAC,gBAAgB,EAAEN,QAAQ,CAAC;EAExC,MAAM;IACJQ,wBAAwB;IACxBC,eAAe;IACfC;EACF,CAAC,GAAGN,eAAe,IAAI,CAAC,CAAC;EAEzB,IAAI,CAACI,wBAAwB,IAAIC,eAAe,IAAIJ,QAAQ,IAAI,CAACK,mBAAmB,EAAE;IACpF,OAAO,IAAI;EACb;EAEA,oBACE,I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AAC,OAAA,CAAAxC,OAAA,GAEaC,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _UpgradeToCompleteAlert = _interopRequireDefault(require("./UpgradeToCompleteAlert"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _UpgradeToCompleteAlert.default;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_UpgradeToCompleteAlert","_interopRequireDefault","require","e","__esModule","default","_default","exports","UpgradeToCompleteAlert"],"sources":["../../src/upgrade-to-complete-alert/index.jsx"],"sourcesContent":["import UpgradeToCompleteAlert from './UpgradeToCompleteAlert';\n\nexport default UpgradeToCompleteAlert;\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8D,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAE/CG,+BAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _i18n = require("@edx/frontend-platform/i18n");
|
|
8
|
+
const messages = (0, _i18n.defineMessages)({
|
|
9
|
+
upgradeToCompleteHeader: {
|
|
10
|
+
id: 'datesBanner.upgradeToCompleteGradedBanner.header',
|
|
11
|
+
defaultMessage: 'Upgrade to unlock',
|
|
12
|
+
description: 'Messaging that prompts users to upgrade their course status in order to access locked course content'
|
|
13
|
+
},
|
|
14
|
+
upgradeToCompleteBody: {
|
|
15
|
+
id: 'datesBanner.upgradeToCompleteGradedBanner.body',
|
|
16
|
+
defaultMessage: 'You are auditing this course, which means that you are unable to participate in graded' + ' assignments. To complete graded assignments as part of this course, you can upgrade today.',
|
|
17
|
+
description: 'It explains the effect of upgrading the course'
|
|
18
|
+
},
|
|
19
|
+
upgradeToCompleteButton: {
|
|
20
|
+
id: 'datesBanner.upgradeToCompleteGradedBanner.button',
|
|
21
|
+
defaultMessage: 'Upgrade now',
|
|
22
|
+
description: 'Button that prompts users to upgrade their course status'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var _default = exports.default = messages;
|
|
26
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","names":["_i18n","require","messages","defineMessages","upgradeToCompleteHeader","id","defaultMessage","description","upgradeToCompleteBody","upgradeToCompleteButton","_default","exports","default"],"sources":["../../src/upgrade-to-complete-alert/messages.js"],"sourcesContent":["import { defineMessages } from '@edx/frontend-platform/i18n';\n\nconst messages = defineMessages({\n upgradeToCompleteHeader: {\n id: 'datesBanner.upgradeToCompleteGradedBanner.header',\n defaultMessage: 'Upgrade to unlock',\n description: 'Messaging that prompts users to upgrade their course status in order to access locked course content',\n },\n upgradeToCompleteBody: {\n id: 'datesBanner.upgradeToCompleteGradedBanner.body',\n defaultMessage: 'You are auditing this course, which means that you are unable to participate in graded'\n + ' assignments. To complete graded assignments as part of this course, you can upgrade today.',\n description: 'It explains the effect of upgrading the course',\n },\n upgradeToCompleteButton: {\n id: 'datesBanner.upgradeToCompleteGradedBanner.button',\n defaultMessage: 'Upgrade now',\n description: 'Button that prompts users to upgrade their course status',\n },\n});\n\nexport default messages;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,MAAMC,QAAQ,GAAG,IAAAC,oBAAc,EAAC;EAC9BC,uBAAuB,EAAE;IACvBC,EAAE,EAAE,kDAAkD;IACtDC,cAAc,EAAE,mBAAmB;IACnCC,WAAW,EAAE;EACf,CAAC;EACDC,qBAAqB,EAAE;IACrBH,EAAE,EAAE,gDAAgD;IACpDC,cAAc,EAAE,wFAAwF,GACpG,6FAA6F;IACjGC,WAAW,EAAE;EACf,CAAC;EACDE,uBAAuB,EAAE;IACvBJ,EAAE,EAAE,kDAAkD;IACtDC,cAAc,EAAE,aAAa;IAC7BC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEYV,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.logUpgradeLinkClick = void 0;
|
|
7
|
+
var _analytics = require("@edx/frontend-platform/analytics");
|
|
8
|
+
/**
|
|
9
|
+
* Logs an upgrade link click event for the upgrade to complete alert.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} org - The organization key
|
|
12
|
+
* @param {string} courseId - The course run key
|
|
13
|
+
*/
|
|
14
|
+
const logUpgradeLinkClick = (org, courseId) => {
|
|
15
|
+
(0, _analytics.sendTrackEvent)('edx.bi.ecommerce.upsell_links_clicked', {
|
|
16
|
+
org_key: org,
|
|
17
|
+
courserun_key: courseId,
|
|
18
|
+
linkCategory: 'personalized_learner_schedules',
|
|
19
|
+
linkName: 'dates_upgrade',
|
|
20
|
+
linkType: 'button',
|
|
21
|
+
pageName: 'dates_tab'
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.logUpgradeLinkClick = logUpgradeLinkClick;
|
|
25
|
+
//# sourceMappingURL=track.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track.js","names":["_analytics","require","logUpgradeLinkClick","org","courseId","sendTrackEvent","org_key","courserun_key","linkCategory","linkName","linkType","pageName","exports"],"sources":["../../src/upgrade-to-complete-alert/track.js"],"sourcesContent":["import { sendTrackEvent } from '@edx/frontend-platform/analytics';\n\n/**\n * Logs an upgrade link click event for the upgrade to complete alert.\n *\n * @param {string} org - The organization key\n * @param {string} courseId - The course run key\n */\nexport const logUpgradeLinkClick = (org, courseId) => {\n sendTrackEvent('edx.bi.ecommerce.upsell_links_clicked', {\n org_key: org,\n courserun_key: courseId,\n linkCategory: 'personalized_learner_schedules',\n linkName: 'dates_upgrade',\n linkType: 'button',\n pageName: 'dates_tab',\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,GAAGA,CAACC,GAAG,EAAEC,QAAQ,KAAK;EACpD,IAAAC,yBAAc,EAAC,uCAAuC,EAAE;IACtDC,OAAO,EAAEH,GAAG;IACZI,aAAa,EAAEH,QAAQ;IACvBI,YAAY,EAAE,gCAAgC;IAC9CC,QAAQ,EAAE,eAAe;IACzBC,QAAQ,EAAE,QAAQ;IAClBC,QAAQ,EAAE;EACZ,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAAV,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edx/frontend-plugin-advertisements",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Frontend plugin for edX in course advertisements",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@optimizely/react-sdk": "^3.1.0",
|
|
44
44
|
"react-dom": "^18.3.1",
|
|
45
|
-
"react-error-boundary": "^6.1.1",
|
|
46
45
|
"universal-cookie": "^8.0.1",
|
|
47
46
|
"uuid": "^11.1.0"
|
|
48
47
|
},
|
|
@@ -57,13 +56,15 @@
|
|
|
57
56
|
"husky": "7.0.4",
|
|
58
57
|
"jest": "29.7.0",
|
|
59
58
|
"rosie": "2.1.1",
|
|
60
|
-
"semantic-release": "^21.0.7"
|
|
59
|
+
"semantic-release": "^21.0.7",
|
|
60
|
+
"react-error-boundary": "^6.1.1"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@edx/frontend-platform": "^8.0.0",
|
|
64
64
|
"@openedx/paragon": "^23.0.0",
|
|
65
65
|
"classnames": "^2.3.1",
|
|
66
66
|
"prop-types": "15.8.1",
|
|
67
|
-
"react": "18.3.1"
|
|
67
|
+
"react": "18.3.1",
|
|
68
|
+
"react-redux": "^7.2.9"
|
|
68
69
|
}
|
|
69
70
|
}
|