@edx/frontend-plugin-advertisements 2.3.0 → 2.4.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/data/index.js +0 -12
- package/dist/data/index.js.map +1 -1
- package/dist/data/optimizely.js +1 -22
- package/dist/data/optimizely.js.map +1 -1
- package/dist/paywall/LockPaywall.js +151 -11
- package/dist/paywall/LockPaywall.js.map +1 -1
- package/dist/upgrade-modal/NextUnitButton.js +2 -2
- package/dist/upgrade-modal/NextUnitButton.js.map +1 -1
- package/dist/upgrade-modal/{DefaultUpgradeModal.js → UpgradeModal.js} +8 -9
- package/dist/upgrade-modal/UpgradeModal.js.map +1 -0
- package/dist/upgrade-notification/UpgradeNotification.js +237 -16
- package/dist/upgrade-notification/UpgradeNotification.js.map +1 -1
- package/package.json +1 -1
- package/dist/optimizely/utils.js +0 -45
- package/dist/optimizely/utils.js.map +0 -1
- package/dist/paywall/DefaultLockPaywall.js +0 -164
- package/dist/paywall/DefaultLockPaywall.js.map +0 -1
- package/dist/paywall/ExperimentalLockPaywall.js +0 -197
- package/dist/paywall/ExperimentalLockPaywall.js.map +0 -1
- package/dist/upgrade-modal/DefaultUpgradeModal.js.map +0 -1
- package/dist/upgrade-modal/ExperimentalUpgradeModal.js +0 -188
- package/dist/upgrade-modal/ExperimentalUpgradeModal.js.map +0 -1
- package/dist/upgrade-modal/UpgradeModalWrapper.js +0 -22
- package/dist/upgrade-modal/UpgradeModalWrapper.js.map +0 -1
- package/dist/upgrade-notification/DefaultUpgradeNotification.js +0 -261
- package/dist/upgrade-notification/DefaultUpgradeNotification.js.map +0 -1
- package/dist/upgrade-notification/ExperimentalUpgradeNotification.js +0 -309
- package/dist/upgrade-notification/ExperimentalUpgradeNotification.js.map +0 -1
|
@@ -4,32 +4,253 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _i18n = require("@edx/frontend-platform/i18n");
|
|
11
|
+
var _analytics = require("@edx/frontend-platform/analytics");
|
|
12
|
+
var _paragon = require("@openedx/paragon");
|
|
13
|
+
var _icons = require("@openedx/paragon/icons");
|
|
14
|
+
var _upgradeButton = require("@src/generic/upgrade-button");
|
|
15
|
+
var _modelStore = require("@src/generic/model-store");
|
|
16
|
+
var _data = require("../data");
|
|
17
|
+
var _certificatePreview = _interopRequireDefault(require("./certificate-preview"));
|
|
18
|
+
var _generic = require("../generic");
|
|
19
|
+
var _utils = _interopRequireDefault(require("./utils"));
|
|
20
|
+
var _messages = _interopRequireDefault(require("./messages"));
|
|
13
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
22
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
25
|
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; }
|
|
16
26
|
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; }
|
|
17
27
|
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; }
|
|
18
28
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
-
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); }
|
|
20
|
-
const UpgradeNotification =
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
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 */
|
|
30
|
+
const UpgradeNotification = _ref => {
|
|
31
|
+
let {
|
|
32
|
+
id,
|
|
33
|
+
courseId,
|
|
34
|
+
model,
|
|
35
|
+
setNotificationCurrentState,
|
|
36
|
+
toggleSidebar
|
|
37
|
+
} = _ref;
|
|
38
|
+
const pluginLocationId = id;
|
|
39
|
+
const {
|
|
40
|
+
formatMessage
|
|
41
|
+
} = (0, _i18n.useIntl)();
|
|
42
|
+
const {
|
|
43
|
+
org,
|
|
44
|
+
userTimezone,
|
|
45
|
+
verifiedMode
|
|
46
|
+
} = (0, _modelStore.useModel)('courseHomeMeta', courseId);
|
|
47
|
+
const {
|
|
48
|
+
marketingUrl,
|
|
49
|
+
learningAssistantEnabled
|
|
50
|
+
} = (0, _modelStore.useModel)('coursewareMeta', courseId);
|
|
51
|
+
const {
|
|
52
|
+
accessExpiration,
|
|
53
|
+
datesBannerInfo,
|
|
54
|
+
offer,
|
|
55
|
+
timeOffsetMillis
|
|
56
|
+
} = (0, _modelStore.useModel)(model, courseId);
|
|
57
|
+
const dateNow = Date.now();
|
|
58
|
+
const timezoneFormatArgs = userTimezone ? {
|
|
59
|
+
timeZone: userTimezone
|
|
60
|
+
} : {};
|
|
61
|
+
const correctedTime = new Date(dateNow + timeOffsetMillis);
|
|
62
|
+
const accessExpirationDate = accessExpiration ? new Date(accessExpiration.upgradeDeadline) : null;
|
|
63
|
+
const pastExpirationDeadline = accessExpiration ? new Date(dateNow) > accessExpirationDate : false;
|
|
64
|
+
const shouldDisplayBorder = pluginLocationId.includes('outline');
|
|
65
|
+
const upsellPageName = (0, _utils.default)({
|
|
66
|
+
id: pluginLocationId
|
|
67
|
+
});
|
|
68
|
+
const setupgradeNotificationCurrentState = setNotificationCurrentState;
|
|
69
|
+
const isFBE = !!accessExpiration && !!datesBannerInfo?.contentTypeGatingEnabled;
|
|
70
|
+
const eventProperties = {
|
|
71
|
+
org_key: org,
|
|
72
|
+
courserun_key: courseId
|
|
73
|
+
};
|
|
74
|
+
const promotionEventProperties = _objectSpread({
|
|
75
|
+
creative: 'sidebarupsell',
|
|
76
|
+
name: 'In-Course Verification Prompt',
|
|
77
|
+
position: 'sidebar-message',
|
|
78
|
+
promotion_id: 'courseware_verified_certificate_upsell'
|
|
79
|
+
}, eventProperties);
|
|
80
|
+
(0, _react.useEffect)(() => {
|
|
81
|
+
(0, _analytics.sendTrackingLogEvent)('edx.bi.course.upgrade.sidebarupsell.displayed', eventProperties);
|
|
82
|
+
(0, _analytics.sendTrackEvent)('Promotion Viewed', promotionEventProperties);
|
|
83
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
|
+
}, []);
|
|
85
|
+
if (!verifiedMode) {
|
|
86
|
+
return null;
|
|
23
87
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
88
|
+
const logClick = () => {
|
|
89
|
+
(0, _analytics.sendTrackingLogEvent)('edx.bi.course.upgrade.sidebarupsell.clicked', eventProperties);
|
|
90
|
+
(0, _analytics.sendTrackingLogEvent)('edx.course.enrollment.upgrade.clicked', _objectSpread(_objectSpread({}, eventProperties), {}, {
|
|
91
|
+
location: 'sidebar-message'
|
|
92
|
+
}));
|
|
93
|
+
(0, _analytics.sendTrackEvent)('Promotion Clicked', promotionEventProperties);
|
|
94
|
+
(0, _analytics.sendTrackEvent)('edx.bi.ecommerce.upsell_links_clicked', _objectSpread(_objectSpread({}, eventProperties), {}, {
|
|
95
|
+
linkCategory: 'green_upgrade',
|
|
96
|
+
linkName: `${upsellPageName}_green`,
|
|
97
|
+
linkType: 'button',
|
|
98
|
+
pageName: upsellPageName
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
const logClickPastExpiration = () => {
|
|
102
|
+
(0, _analytics.sendTrackEvent)('edx.bi.ecommerce.upgrade_notification.past_expiration.button_clicked', _objectSpread(_objectSpread({}, eventProperties), {}, {
|
|
103
|
+
linkCategory: 'upgrade_notification',
|
|
104
|
+
linkName: `${upsellPageName}_course_details`,
|
|
105
|
+
linkType: 'button',
|
|
106
|
+
pageName: upsellPageName
|
|
107
|
+
}));
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
There are 5 parts that change in the upgrade card:
|
|
112
|
+
upgradeNotificationHeaderText
|
|
113
|
+
expirationBanner
|
|
114
|
+
upsellMessage
|
|
115
|
+
callToActionButton
|
|
116
|
+
offerCode
|
|
117
|
+
*/
|
|
118
|
+
let upgradeNotificationHeaderText;
|
|
119
|
+
let expirationBanner;
|
|
120
|
+
let callToActionButton;
|
|
121
|
+
let offerCode;
|
|
122
|
+
let upsellMessage = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.UpsellTable, {
|
|
123
|
+
isFBE,
|
|
124
|
+
learningAssistantEnabled
|
|
125
|
+
});
|
|
126
|
+
if (isFBE) {
|
|
127
|
+
const hoursToAccessExpiration = Math.floor((accessExpirationDate - correctedTime) / 1000 / 60 / 60);
|
|
128
|
+
if (hoursToAccessExpiration >= 7 * 24) {
|
|
129
|
+
if (offer) {
|
|
130
|
+
// countdown to the first purchase discount if there is one
|
|
131
|
+
const hoursToDiscountExpiration = Math.floor((new Date(offer.expirationDate) - correctedTime) / 1000 / 60 / 60);
|
|
132
|
+
upgradeNotificationHeaderText = formatMessage(_messages.default.firstTimeLearnerDiscountHeader, {
|
|
133
|
+
percentage: offer.percentage
|
|
134
|
+
});
|
|
135
|
+
expirationBanner = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.ExpirationCountdown, {
|
|
136
|
+
courseId: courseId,
|
|
137
|
+
hoursToExpiration: hoursToDiscountExpiration,
|
|
138
|
+
setupgradeNotificationCurrentState: setupgradeNotificationCurrentState,
|
|
139
|
+
type: "offer"
|
|
140
|
+
});
|
|
141
|
+
} else {
|
|
142
|
+
upgradeNotificationHeaderText = formatMessage(_messages.default.accessExpirationHeader);
|
|
143
|
+
expirationBanner = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.AccessExpirationDateBanner, {
|
|
144
|
+
courseId: courseId,
|
|
145
|
+
accessExpirationDate: accessExpirationDate,
|
|
146
|
+
timezoneFormatArgs: timezoneFormatArgs,
|
|
147
|
+
setupgradeNotificationCurrentState: setupgradeNotificationCurrentState
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
} else if (hoursToAccessExpiration < 7 * 24 && hoursToAccessExpiration >= 0) {
|
|
151
|
+
// more urgent messaging if there's less than 7 days left to access expiration
|
|
152
|
+
upgradeNotificationHeaderText = formatMessage(_messages.default.accessExpirationUrgentHeader);
|
|
153
|
+
expirationBanner = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.ExpirationCountdown, {
|
|
154
|
+
courseId: courseId,
|
|
155
|
+
hoursToExpiration: hoursToAccessExpiration,
|
|
156
|
+
setupgradeNotificationCurrentState: setupgradeNotificationCurrentState,
|
|
157
|
+
type: "access"
|
|
158
|
+
});
|
|
159
|
+
if (upsellPageName !== _data.PAGE_NAMES.PROGRESS) {
|
|
160
|
+
upsellMessage = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.UpsellFBESoonCardContent, {
|
|
161
|
+
accessExpirationDate: accessExpirationDate,
|
|
162
|
+
timezoneFormatArgs: timezoneFormatArgs
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
} else {
|
|
166
|
+
// access expiration deadline has passed
|
|
167
|
+
upgradeNotificationHeaderText = formatMessage(_messages.default.accessExpirationPastHeader);
|
|
168
|
+
expirationBanner = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.PastExpirationDateBanner, {
|
|
169
|
+
courseId: courseId,
|
|
170
|
+
accessExpirationDate: accessExpirationDate,
|
|
171
|
+
timezoneFormatArgs: timezoneFormatArgs,
|
|
172
|
+
setupgradeNotificationCurrentState: setupgradeNotificationCurrentState
|
|
173
|
+
});
|
|
174
|
+
upsellMessage = /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.PastExpirationCardContent, {});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (pastExpirationDeadline) {
|
|
178
|
+
callToActionButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Button, {
|
|
179
|
+
variant: "primary",
|
|
180
|
+
onClick: logClickPastExpiration,
|
|
181
|
+
href: marketingUrl,
|
|
182
|
+
block: true,
|
|
183
|
+
children: formatMessage(_messages.default.pastExpirationCallToActionLabel)
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
callToActionButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(_upgradeButton.UpgradeButton, {
|
|
187
|
+
offer: offer,
|
|
188
|
+
onClick: logClick,
|
|
189
|
+
verifiedMode: verifiedMode,
|
|
190
|
+
block: true
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (offer) {
|
|
194
|
+
// if there's a first purchase discount, message the code at the bottom
|
|
195
|
+
offerCode = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
196
|
+
className: "text-center discount-info",
|
|
197
|
+
children: formatMessage(_messages.default.discountCodeMessage, {
|
|
198
|
+
code: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
199
|
+
className: "font-weight-bold",
|
|
200
|
+
children: offer.code
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("section", {
|
|
206
|
+
className: (0, _classnames.default)('upgrade-notification small', {
|
|
207
|
+
'pgn__card pgn__card-light card mb-4 rounded': shouldDisplayBorder
|
|
208
|
+
}),
|
|
209
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
210
|
+
id: "courseHome-upgradeNotification",
|
|
211
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("h2", {
|
|
212
|
+
className: (0, _classnames.default)('upgrade-notification-header', {
|
|
213
|
+
'd-flex align-items-center mr-2 ml-4 my-1.5 font-size-18': !!toggleSidebar,
|
|
214
|
+
'm-4': !toggleSidebar
|
|
215
|
+
}),
|
|
216
|
+
id: "outline-sidebar-upgrade-header",
|
|
217
|
+
children: [formatMessage(_messages.default.pursueCertificateMessage), !!toggleSidebar && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
218
|
+
className: "d-inline-flex ml-auto",
|
|
219
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.IconButton, {
|
|
220
|
+
src: _icons.Close,
|
|
221
|
+
size: "sm",
|
|
222
|
+
iconAs: _paragon.Icon,
|
|
223
|
+
onClick: toggleSidebar,
|
|
224
|
+
className: "icon-hover",
|
|
225
|
+
alt: formatMessage(_messages.default.closeAlt)
|
|
226
|
+
})
|
|
227
|
+
})]
|
|
228
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_certificatePreview.default, {
|
|
229
|
+
courseId: courseId
|
|
230
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
231
|
+
className: "ml-4",
|
|
232
|
+
children: upgradeNotificationHeaderText
|
|
233
|
+
}), expirationBanner, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
234
|
+
className: "upgrade-notification-message",
|
|
235
|
+
children: upsellMessage
|
|
236
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
237
|
+
className: "upgrade-notification-button m-4",
|
|
238
|
+
children: callToActionButton
|
|
239
|
+
}), offerCode]
|
|
240
|
+
})
|
|
241
|
+
});
|
|
30
242
|
};
|
|
31
243
|
UpgradeNotification.propTypes = {
|
|
32
|
-
id: _propTypes.default.string.isRequired
|
|
244
|
+
id: _propTypes.default.string.isRequired,
|
|
245
|
+
courseId: _propTypes.default.string.isRequired,
|
|
246
|
+
model: _propTypes.default.string,
|
|
247
|
+
setNotificationCurrentState: _propTypes.default.func,
|
|
248
|
+
toggleSidebar: _propTypes.default.func
|
|
249
|
+
};
|
|
250
|
+
UpgradeNotification.defaultProps = {
|
|
251
|
+
setNotificationCurrentState: null,
|
|
252
|
+
toggleSidebar: null,
|
|
253
|
+
model: 'outline'
|
|
33
254
|
};
|
|
34
255
|
var _default = exports.default = UpgradeNotification;
|
|
35
256
|
//# sourceMappingURL=UpgradeNotification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpgradeNotification.js","names":["_propTypes","_interopRequireDefault","require","_DefaultUpgradeNotification","_ExperimentalUpgradeNotification","_optimizely","_optimizely2","_constants","_jsxRuntime","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","UpgradeNotification","props","id","includes","PAGE_NAMES","PROGRESS","jsx","defaultComponent","DefaultUpgradeNotification","experimentalComponent","ExperimentalUpgradeNotification","defaultVariationKey","experimentKey","OPTIMIZELY_AUDIT_TRIAL_EXPERIMENT","KEY","propTypes","PropTypes","string","isRequired","_default","exports"],"sources":["../../src/upgrade-notification/UpgradeNotification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport DefaultUpgradeNotification from './DefaultUpgradeNotification';\nimport ExperimentalUpgradeNotification from './ExperimentalUpgradeNotification';\n\nimport OptimizelyExperiment from '../optimizely';\nimport { OPTIMIZELY_AUDIT_TRIAL_EXPERIMENT } from '../data/optimizely';\nimport PAGE_NAMES from '../data/constants';\n\nconst UpgradeNotification = (props) => {\n if (props.id.includes(PAGE_NAMES.PROGRESS)) {\n return (\n <DefaultUpgradeNotification {...props} />\n );\n }\n\n return (\n <OptimizelyExperiment\n defaultComponent={DefaultUpgradeNotification}\n experimentalComponent={ExperimentalUpgradeNotification}\n defaultVariationKey=\"off\"\n experimentKey={OPTIMIZELY_AUDIT_TRIAL_EXPERIMENT.KEY}\n {...props}\n />\n );\n};\n\nUpgradeNotification.propTypes = {\n id: PropTypes.string.isRequired,\n};\n\nexport default UpgradeNotification;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,gCAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAN,sBAA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AACvB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArD,OAAA,GAEaiC,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"UpgradeNotification.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_i18n","_analytics","_paragon","_icons","_upgradeButton","_modelStore","_data","_certificatePreview","_generic","_utils","_messages","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","UpgradeNotification","_ref","id","courseId","model","setNotificationCurrentState","toggleSidebar","pluginLocationId","formatMessage","useIntl","org","userTimezone","verifiedMode","useModel","marketingUrl","learningAssistantEnabled","accessExpiration","datesBannerInfo","offer","timeOffsetMillis","dateNow","Date","now","timezoneFormatArgs","timeZone","correctedTime","accessExpirationDate","upgradeDeadline","pastExpirationDeadline","shouldDisplayBorder","includes","upsellPageName","getUpsellPageName","setupgradeNotificationCurrentState","isFBE","contentTypeGatingEnabled","eventProperties","org_key","courserun_key","promotionEventProperties","creative","name","position","promotion_id","useEffect","sendTrackingLogEvent","sendTrackEvent","logClick","location","linkCategory","linkName","linkType","pageName","logClickPastExpiration","upgradeNotificationHeaderText","expirationBanner","callToActionButton","offerCode","upsellMessage","jsx","UpsellTable","hoursToAccessExpiration","Math","floor","hoursToDiscountExpiration","expirationDate","messages","firstTimeLearnerDiscountHeader","percentage","ExpirationCountdown","hoursToExpiration","type","accessExpirationHeader","AccessExpirationDateBanner","accessExpirationUrgentHeader","PAGE_NAMES","PROGRESS","UpsellFBESoonCardContent","accessExpirationPastHeader","PastExpirationDateBanner","PastExpirationCardContent","Button","variant","onClick","href","block","children","pastExpirationCallToActionLabel","UpgradeButton","className","discountCodeMessage","code","classNames","jsxs","pursueCertificateMessage","IconButton","src","Close","size","iconAs","Icon","alt","closeAlt","propTypes","PropTypes","string","isRequired","func","defaultProps","_default","exports"],"sources":["../../src/upgrade-notification/UpgradeNotification.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport { sendTrackEvent, sendTrackingLogEvent } from '@edx/frontend-platform/analytics';\nimport { Button, Icon, IconButton } from '@openedx/paragon';\nimport { Close } from '@openedx/paragon/icons';\n\nimport { UpgradeButton } from '@src/generic/upgrade-button';\nimport { useModel } from '@src/generic/model-store';\n\nimport { PAGE_NAMES } from '../data';\nimport CertificatePreview from './certificate-preview';\nimport {\n ExpirationCountdown,\n AccessExpirationDateBanner,\n PastExpirationDateBanner,\n PastExpirationCardContent,\n UpsellFBESoonCardContent,\n UpsellTable,\n} from '../generic';\nimport getUpsellPageName from './utils';\nimport messages from './messages';\n\nconst UpgradeNotification = ({\n id,\n courseId,\n model,\n setNotificationCurrentState,\n toggleSidebar,\n}) => {\n const pluginLocationId = id;\n const { formatMessage } = useIntl();\n\n const {\n org,\n userTimezone,\n verifiedMode,\n } = useModel('courseHomeMeta', courseId);\n\n const {\n marketingUrl,\n learningAssistantEnabled,\n } = useModel('coursewareMeta', courseId);\n\n const {\n accessExpiration,\n datesBannerInfo,\n offer,\n timeOffsetMillis,\n } = useModel(model, courseId);\n\n const dateNow = Date.now();\n const timezoneFormatArgs = userTimezone ? { timeZone: userTimezone } : {};\n const correctedTime = new Date(dateNow + timeOffsetMillis);\n const accessExpirationDate = accessExpiration ? new Date(accessExpiration.upgradeDeadline) : null;\n const pastExpirationDeadline = accessExpiration ? new Date(dateNow) > accessExpirationDate : false;\n const shouldDisplayBorder = pluginLocationId.includes('outline');\n const upsellPageName = getUpsellPageName({ id: pluginLocationId });\n const setupgradeNotificationCurrentState = setNotificationCurrentState;\n const isFBE = !!accessExpiration && !!datesBannerInfo?.contentTypeGatingEnabled;\n\n const eventProperties = {\n org_key: org,\n courserun_key: courseId,\n };\n\n const promotionEventProperties = {\n creative: 'sidebarupsell',\n name: 'In-Course Verification Prompt',\n position: 'sidebar-message',\n promotion_id: 'courseware_verified_certificate_upsell',\n ...eventProperties,\n };\n\n useEffect(() => {\n sendTrackingLogEvent('edx.bi.course.upgrade.sidebarupsell.displayed', eventProperties);\n sendTrackEvent('Promotion Viewed', promotionEventProperties);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!verifiedMode) {\n return null;\n }\n\n const logClick = () => {\n sendTrackingLogEvent('edx.bi.course.upgrade.sidebarupsell.clicked', eventProperties);\n sendTrackingLogEvent('edx.course.enrollment.upgrade.clicked', {\n ...eventProperties,\n location: 'sidebar-message',\n });\n sendTrackEvent('Promotion Clicked', promotionEventProperties);\n sendTrackEvent('edx.bi.ecommerce.upsell_links_clicked', {\n ...eventProperties,\n linkCategory: 'green_upgrade',\n linkName: `${upsellPageName}_green`,\n linkType: 'button',\n pageName: upsellPageName,\n });\n };\n\n const logClickPastExpiration = () => {\n sendTrackEvent('edx.bi.ecommerce.upgrade_notification.past_expiration.button_clicked', {\n ...eventProperties,\n linkCategory: 'upgrade_notification',\n linkName: `${upsellPageName}_course_details`,\n linkType: 'button',\n pageName: upsellPageName,\n });\n };\n\n /*\n There are 5 parts that change in the upgrade card:\n upgradeNotificationHeaderText\n expirationBanner\n upsellMessage\n callToActionButton\n offerCode\n */\n let upgradeNotificationHeaderText;\n let expirationBanner;\n let callToActionButton;\n let offerCode;\n\n let upsellMessage = <UpsellTable {...{ isFBE, learningAssistantEnabled }} />;\n\n if (isFBE) {\n const hoursToAccessExpiration = Math.floor((accessExpirationDate - correctedTime) / 1000 / 60 / 60);\n\n if (hoursToAccessExpiration >= (7 * 24)) {\n if (offer) { // countdown to the first purchase discount if there is one\n const hoursToDiscountExpiration = Math.floor((new Date(offer.expirationDate) - correctedTime) / 1000 / 60 / 60);\n upgradeNotificationHeaderText = formatMessage(\n messages.firstTimeLearnerDiscountHeader,\n { percentage: (offer.percentage) },\n );\n expirationBanner = (\n <ExpirationCountdown\n courseId={courseId}\n hoursToExpiration={hoursToDiscountExpiration}\n setupgradeNotificationCurrentState={setupgradeNotificationCurrentState}\n type=\"offer\"\n />\n );\n } else {\n upgradeNotificationHeaderText = formatMessage(messages.accessExpirationHeader);\n expirationBanner = (\n <AccessExpirationDateBanner\n courseId={courseId}\n accessExpirationDate={accessExpirationDate}\n timezoneFormatArgs={timezoneFormatArgs}\n setupgradeNotificationCurrentState={setupgradeNotificationCurrentState}\n />\n );\n }\n } else if (hoursToAccessExpiration < (7 * 24) && hoursToAccessExpiration >= 0) {\n // more urgent messaging if there's less than 7 days left to access expiration\n upgradeNotificationHeaderText = formatMessage(messages.accessExpirationUrgentHeader);\n expirationBanner = (\n <ExpirationCountdown\n courseId={courseId}\n hoursToExpiration={hoursToAccessExpiration}\n setupgradeNotificationCurrentState={setupgradeNotificationCurrentState}\n type=\"access\"\n />\n );\n if (upsellPageName !== PAGE_NAMES.PROGRESS) {\n upsellMessage = (\n <UpsellFBESoonCardContent\n accessExpirationDate={accessExpirationDate}\n timezoneFormatArgs={timezoneFormatArgs}\n />\n );\n }\n } else { // access expiration deadline has passed\n upgradeNotificationHeaderText = formatMessage(messages.accessExpirationPastHeader);\n expirationBanner = (\n <PastExpirationDateBanner\n courseId={courseId}\n accessExpirationDate={accessExpirationDate}\n timezoneFormatArgs={timezoneFormatArgs}\n setupgradeNotificationCurrentState={setupgradeNotificationCurrentState}\n />\n );\n upsellMessage = (\n <PastExpirationCardContent />\n );\n }\n }\n\n if (pastExpirationDeadline) {\n callToActionButton = (\n <Button\n variant=\"primary\"\n onClick={logClickPastExpiration}\n href={marketingUrl}\n block\n >\n {formatMessage(messages.pastExpirationCallToActionLabel)}\n </Button>\n );\n } else {\n callToActionButton = (\n <UpgradeButton\n offer={offer}\n onClick={logClick}\n verifiedMode={verifiedMode}\n block\n />\n );\n }\n\n if (offer) { // if there's a first purchase discount, message the code at the bottom\n offerCode = (\n <div className=\"text-center discount-info\">\n {formatMessage(\n messages.discountCodeMessage,\n {\n code: (<span className=\"font-weight-bold\">{offer.code}</span>),\n },\n )}\n </div>\n );\n }\n\n return (\n <section className={classNames('upgrade-notification small', { 'pgn__card pgn__card-light card mb-4 rounded': shouldDisplayBorder })}>\n <div id=\"courseHome-upgradeNotification\">\n <h2\n className={classNames('upgrade-notification-header', {\n 'd-flex align-items-center mr-2 ml-4 my-1.5 font-size-18': !!toggleSidebar,\n 'm-4': !toggleSidebar,\n })}\n id=\"outline-sidebar-upgrade-header\"\n >\n {formatMessage(messages.pursueCertificateMessage)}\n {!!toggleSidebar && (\n <div className=\"d-inline-flex ml-auto\">\n <IconButton\n src={Close}\n size=\"sm\"\n iconAs={Icon}\n onClick={toggleSidebar}\n className=\"icon-hover\"\n alt={formatMessage(messages.closeAlt)}\n />\n </div>\n )}\n </h2>\n <CertificatePreview courseId={courseId} />\n <h3 className=\"ml-4\">\n {upgradeNotificationHeaderText}\n </h3>\n {expirationBanner}\n <div className=\"upgrade-notification-message\">\n {upsellMessage}\n </div>\n <div className=\"upgrade-notification-button m-4\">\n {callToActionButton}\n </div>\n {offerCode}\n </div>\n </section>\n );\n};\n\nUpgradeNotification.propTypes = {\n id: PropTypes.string.isRequired,\n courseId: PropTypes.string.isRequired,\n model: PropTypes.string,\n setNotificationCurrentState: PropTypes.func,\n toggleSidebar: PropTypes.func,\n};\n\nUpgradeNotification.defaultProps = {\n setNotificationCurrentState: null,\n toggleSidebar: null,\n model: 'outline',\n};\n\nexport default UpgradeNotification;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI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,CAACoC,QAAQ;UAAE,CACvC;QAAC,CACC,CACN;MAAA,CACC,CAAC,eACL,IAAApJ,WAAA,CAAAyG,GAAA,EAAC7G,mBAAA,CAAAO,OAAkB;QAAC8C,QAAQ,EAAEA;MAAS,CAAE,CAAC,eAC1C,IAAAjD,WAAA,CAAAyG,GAAA;QAAI8B,SAAS,EAAC,MAAM;QAAAH,QAAA,EACjBhC;MAA6B,CAC5B,CAAC,EACJC,gBAAgB,eACjB,IAAArG,WAAA,CAAAyG,GAAA;QAAK8B,SAAS,EAAC,8BAA8B;QAAAH,QAAA,EAC1C5B;MAAa,CACX,CAAC,eACN,IAAAxG,WAAA,CAAAyG,GAAA;QAAK8B,SAAS,EAAC,iCAAiC;QAAAH,QAAA,EAC7C9B;MAAkB,CAChB,CAAC,EACLC,SAAS;IAAA,CACP;EAAC,CACC,CAAC;AAEd,CAAC;AAEDzD,mBAAmB,CAACuG,SAAS,GAAG;EAC9BrG,EAAE,EAAEsG,kBAAS,CAACC,MAAM,CAACC,UAAU;EAC/BvG,QAAQ,EAAEqG,kBAAS,CAACC,MAAM,CAACC,UAAU;EACrCtG,KAAK,EAAEoG,kBAAS,CAACC,MAAM;EACvBpG,2BAA2B,EAAEmG,kBAAS,CAACG,IAAI;EAC3CrG,aAAa,EAAEkG,kBAAS,CAACG;AAC3B,CAAC;AAED3G,mBAAmB,CAAC4G,YAAY,GAAG;EACjCvG,2BAA2B,EAAE,IAAI;EACjCC,aAAa,EAAE,IAAI;EACnBF,KAAK,EAAE;AACT,CAAC;AAAC,IAAAyG,QAAA,GAAAC,OAAA,CAAAzJ,OAAA,GAEa2C,mBAAmB","ignoreList":[]}
|
package/package.json
CHANGED
package/dist/optimizely/utils.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _data = require("../data");
|
|
8
|
-
var _generic = require("../generic");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/*
|
|
11
|
-
getBulletVariation is used by both the sidebar and modal sidebar.
|
|
12
|
-
When making changes, remember to test the impact on both upsells.
|
|
13
|
-
*/const getBulletVariation = _ref => {
|
|
14
|
-
let {
|
|
15
|
-
isFBE,
|
|
16
|
-
learningAssistantEnabled,
|
|
17
|
-
variationKey,
|
|
18
|
-
enabled,
|
|
19
|
-
enabledVariation
|
|
20
|
-
} = _ref;
|
|
21
|
-
/*
|
|
22
|
-
Update the following two lines according to changes in ../data.
|
|
23
|
-
Make any changes necessary for the distinguishing of different components
|
|
24
|
-
for the modal and sidebar as necessary.
|
|
25
|
-
*/
|
|
26
|
-
const {
|
|
27
|
-
VARIATIONS
|
|
28
|
-
} = _data.OPTIMIZELY_VTR_BULLET_EXPERIMENT;
|
|
29
|
-
const showTestVariation = enabled && variationKey === VARIATIONS.EXPERIMENT;
|
|
30
|
-
if (showTestVariation) {
|
|
31
|
-
return enabledVariation;
|
|
32
|
-
}
|
|
33
|
-
if (variationKey === 'table') {
|
|
34
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.UpsellTable, {
|
|
35
|
-
isFBE,
|
|
36
|
-
learningAssistantEnabled
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_generic.UpsellBullets, {
|
|
40
|
-
isFBE,
|
|
41
|
-
learningAssistantEnabled
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var _default = exports.default = getBulletVariation;
|
|
45
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_data","require","_generic","_jsxRuntime","getBulletVariation","_ref","isFBE","learningAssistantEnabled","variationKey","enabled","enabledVariation","VARIATIONS","OPTIMIZELY_VTR_BULLET_EXPERIMENT","showTestVariation","EXPERIMENT","jsx","UpsellTable","UpsellBullets","_default","exports","default"],"sources":["../../src/optimizely/utils.jsx"],"sourcesContent":["import { OPTIMIZELY_VTR_BULLET_EXPERIMENT } from '../data';\n\nimport { UpsellBullets, UpsellTable } from '../generic';\n\n/*\n getBulletVariation is used by both the sidebar and modal sidebar.\n When making changes, remember to test the impact on both upsells.\n*/\nconst getBulletVariation = ({\n isFBE,\n learningAssistantEnabled,\n variationKey,\n enabled,\n enabledVariation,\n}) => {\n /*\n Update the following two lines according to changes in ../data.\n Make any changes necessary for the distinguishing of different components\n for the modal and sidebar as necessary.\n */\n const { VARIATIONS } = OPTIMIZELY_VTR_BULLET_EXPERIMENT;\n const showTestVariation = enabled && variationKey === VARIATIONS.EXPERIMENT;\n\n if (showTestVariation) {\n return enabledVariation;\n }\n\n if (variationKey === 'table') {\n return <UpsellTable {...{ isFBE, learningAssistantEnabled }} />;\n }\n\n return <UpsellBullets {...{ isFBE, learningAssistantEnabled }} />;\n};\n\nexport default getBulletVariation;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAAwD,IAAAE,WAAA,GAAAF,OAAA;AAExD;AACA;AACA;AACA,EACA,MAAMG,kBAAkB,GAAGC,IAAA,IAMrB;EAAA,IANsB;IAC1BC,KAAK;IACLC,wBAAwB;IACxBC,YAAY;IACZC,OAAO;IACPC;EACF,CAAC,GAAAL,IAAA;EACC;AACF;AACA;AACA;AACA;EACE,MAAM;IAAEM;EAAW,CAAC,GAAGC,sCAAgC;EACvD,MAAMC,iBAAiB,GAAGJ,OAAO,IAAID,YAAY,KAAKG,UAAU,CAACG,UAAU;EAE3E,IAAID,iBAAiB,EAAE;IACrB,OAAOH,gBAAgB;EACzB;EAEA,IAAIF,YAAY,KAAK,OAAO,EAAE;IAC5B,oBAAO,IAAAL,WAAA,CAAAY,GAAA,EAACb,QAAA,CAAAc,WAAW;MAAOV,KAAK;MAAEC;IAAwB,CAAK,CAAC;EACjE;EAEA,oBAAO,IAAAJ,WAAA,CAAAY,GAAA,EAACb,QAAA,CAAAe,aAAa;IAAOX,KAAK;IAAEC;EAAwB,CAAK,CAAC;AACnE,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahB,kBAAkB","ignoreList":[]}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var _analytics = require("@edx/frontend-platform/analytics");
|
|
11
|
-
var _i18n = require("@edx/frontend-platform/i18n");
|
|
12
|
-
var _paragon = require("@openedx/paragon");
|
|
13
|
-
var _icons = require("@openedx/paragon/icons");
|
|
14
|
-
var _SidebarContext = _interopRequireDefault(require("@src/courseware/course/sidebar/SidebarContext"));
|
|
15
|
-
var _messages = _interopRequireDefault(require("@src/courseware/course/sequence/lock-paywall/messages"));
|
|
16
|
-
var _edX_locked_certificate = _interopRequireDefault(require("@src/generic/assets/edX_locked_certificate.png"));
|
|
17
|
-
var _modelStore = require("@src/generic/model-store");
|
|
18
|
-
var _upgradeButton = require("@src/generic/upgrade-button");
|
|
19
|
-
var _UpsellBullets = require("@src/generic/upsell-bullets/UpsellBullets");
|
|
20
|
-
var _cohesion = require("../cohesion");
|
|
21
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
-
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; }
|
|
26
|
-
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; }
|
|
27
|
-
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; }
|
|
28
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
29
|
-
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 */
|
|
30
|
-
const DefaultLockPaywall = _ref => {
|
|
31
|
-
let {
|
|
32
|
-
courseId
|
|
33
|
-
} = _ref;
|
|
34
|
-
const intl = (0, _i18n.useIntl)();
|
|
35
|
-
const {
|
|
36
|
-
notificationTrayVisible
|
|
37
|
-
} = (0, _react.useContext)(_SidebarContext.default);
|
|
38
|
-
const course = (0, _modelStore.useModel)('coursewareMeta', courseId);
|
|
39
|
-
const {
|
|
40
|
-
accessExpiration,
|
|
41
|
-
marketingUrl,
|
|
42
|
-
offer
|
|
43
|
-
} = course;
|
|
44
|
-
const {
|
|
45
|
-
org,
|
|
46
|
-
verifiedMode
|
|
47
|
-
} = (0, _modelStore.useModel)('courseHomeMeta', courseId);
|
|
48
|
-
const {
|
|
49
|
-
conversion
|
|
50
|
-
} = (0, _cohesion.useCohesion)(courseId);
|
|
51
|
-
|
|
52
|
-
// the following variables are set and used for resposive layout to work with
|
|
53
|
-
// whether the NotificationTray is open or not and if there's an offer with longer text
|
|
54
|
-
const shouldDisplayBulletPointsBelowCertificate = (0, _paragon.useWindowSize)().width <= _paragon.breakpoints.large.minWidth;
|
|
55
|
-
const shouldDisplayGatedContentOneColumn = (0, _paragon.useWindowSize)().width <= _paragon.breakpoints.extraLarge.minWidth && notificationTrayVisible;
|
|
56
|
-
const shouldDisplayGatedContentTwoColumns = (0, _paragon.useWindowSize)().width < _paragon.breakpoints.large.minWidth && notificationTrayVisible;
|
|
57
|
-
const shouldDisplayGatedContentTwoColumnsHalf = (0, _paragon.useWindowSize)().width <= _paragon.breakpoints.large.minWidth && !notificationTrayVisible;
|
|
58
|
-
const shouldWrapTextOnButton = (0, _paragon.useWindowSize)().width > _paragon.breakpoints.extraSmall.minWidth;
|
|
59
|
-
const accessExpirationDate = accessExpiration ? new Date(accessExpiration.expirationDate) : null;
|
|
60
|
-
const pastExpirationDeadline = accessExpiration ? new Date(Date.now()) > accessExpirationDate : false;
|
|
61
|
-
if (!verifiedMode) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
const eventProperties = {
|
|
65
|
-
org_key: org,
|
|
66
|
-
courserun_key: courseId
|
|
67
|
-
};
|
|
68
|
-
const logClick = () => {
|
|
69
|
-
(0, _analytics.sendTrackEvent)('edx.bi.ecommerce.upsell_links_clicked', _objectSpread(_objectSpread({}, eventProperties), {}, {
|
|
70
|
-
linkCategory: '(none)',
|
|
71
|
-
linkName: 'in_course_upgrade',
|
|
72
|
-
linkType: 'link',
|
|
73
|
-
pageName: 'in_course'
|
|
74
|
-
}));
|
|
75
|
-
conversion('Upgraded');
|
|
76
|
-
};
|
|
77
|
-
const logClickPastExpiration = () => {
|
|
78
|
-
(0, _analytics.sendTrackEvent)('edx.bi.ecommerce.gated_content.past_expiration.link_clicked', _objectSpread(_objectSpread({}, eventProperties), {}, {
|
|
79
|
-
linkCategory: 'gated_content',
|
|
80
|
-
linkName: 'course_details',
|
|
81
|
-
linkType: 'link',
|
|
82
|
-
pageName: 'in_course'
|
|
83
|
-
}));
|
|
84
|
-
};
|
|
85
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Alert, {
|
|
86
|
-
variant: "light",
|
|
87
|
-
"aria-live": "off",
|
|
88
|
-
icon: _icons.Locked,
|
|
89
|
-
className: "lock-paywall-container",
|
|
90
|
-
"data-testId": "lock-paywall-test-id",
|
|
91
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
92
|
-
className: "row",
|
|
93
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
94
|
-
className: "col",
|
|
95
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h4", {
|
|
96
|
-
"aria-level": "3",
|
|
97
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
98
|
-
children: intl.formatMessage(_messages.default['learn.lockPaywall.title'])
|
|
99
|
-
})
|
|
100
|
-
}), pastExpirationDeadline ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
101
|
-
className: "mb-2 upgrade-intro",
|
|
102
|
-
children: [intl.formatMessage(_messages.default['learn.lockPaywall.content.pastExpiration']), /*#__PURE__*/(0, _jsxRuntime.jsx)(_paragon.Hyperlink, {
|
|
103
|
-
destination: marketingUrl,
|
|
104
|
-
onClick: logClickPastExpiration,
|
|
105
|
-
target: "_blank",
|
|
106
|
-
children: intl.formatMessage(_messages.default['learn.lockPaywall.courseDetails'])
|
|
107
|
-
})]
|
|
108
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
109
|
-
className: "mb-2 upgrade-intro",
|
|
110
|
-
children: intl.formatMessage(_messages.default['learn.lockPaywall.content'])
|
|
111
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
112
|
-
className: (0, _classnames.default)('d-inline-flex flex-row', {
|
|
113
|
-
'flex-wrap': notificationTrayVisible || shouldDisplayBulletPointsBelowCertificate
|
|
114
|
-
}),
|
|
115
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
116
|
-
style: {
|
|
117
|
-
float: 'left'
|
|
118
|
-
},
|
|
119
|
-
className: "mr-3 mb-2",
|
|
120
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
121
|
-
alt: intl.formatMessage(_messages.default['learn.lockPaywall.example.alt']),
|
|
122
|
-
src: _edX_locked_certificate.default,
|
|
123
|
-
className: "border-0 certificate-image-banner",
|
|
124
|
-
style: {
|
|
125
|
-
height: '128px',
|
|
126
|
-
width: '175px'
|
|
127
|
-
}
|
|
128
|
-
})
|
|
129
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
130
|
-
className: "mw-xs list-div",
|
|
131
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
132
|
-
className: "mb-2",
|
|
133
|
-
children: intl.formatMessage(_messages.default['learn.lockPaywall.list.intro'])
|
|
134
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
135
|
-
className: "fa-ul ml-4 pl-2",
|
|
136
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_UpsellBullets.VerifiedCertBullet, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UpsellBullets.UnlockGradedBullet, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UpsellBullets.FullAccessBullet, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UpsellBullets.SupportMissionBullet, {})]
|
|
137
|
-
})]
|
|
138
|
-
})]
|
|
139
|
-
})]
|
|
140
|
-
}), pastExpirationDeadline ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
141
|
-
className: (0, _classnames.default)('d-md-flex align-items-md-center text-right', {
|
|
142
|
-
'col-md-5 mx-md-0': notificationTrayVisible,
|
|
143
|
-
'col-md-4 mx-md-3 justify-content-center': !notificationTrayVisible && !shouldDisplayGatedContentTwoColumnsHalf,
|
|
144
|
-
'col-md-11 justify-content-end': shouldDisplayGatedContentOneColumn && !shouldDisplayGatedContentTwoColumns,
|
|
145
|
-
'col-md-6 justify-content-center': shouldDisplayGatedContentTwoColumnsHalf
|
|
146
|
-
}),
|
|
147
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_upgradeButton.UpgradeButton, {
|
|
148
|
-
offer: offer,
|
|
149
|
-
onClick: logClick,
|
|
150
|
-
verifiedMode: verifiedMode,
|
|
151
|
-
style: {
|
|
152
|
-
whiteSpace: shouldWrapTextOnButton ? 'nowrap' : null
|
|
153
|
-
},
|
|
154
|
-
"data-testid": "upgrade-button"
|
|
155
|
-
})
|
|
156
|
-
})]
|
|
157
|
-
})
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
DefaultLockPaywall.propTypes = {
|
|
161
|
-
courseId: _propTypes.default.string.isRequired
|
|
162
|
-
};
|
|
163
|
-
var _default = exports.default = DefaultLockPaywall;
|
|
164
|
-
//# sourceMappingURL=DefaultLockPaywall.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultLockPaywall.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_analytics","_i18n","_paragon","_icons","_SidebarContext","_messages","_edX_locked_certificate","_modelStore","_upgradeButton","_UpsellBullets","_cohesion","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","DefaultLockPaywall","_ref","courseId","intl","useIntl","notificationTrayVisible","useContext","SidebarContext","course","useModel","accessExpiration","marketingUrl","offer","org","verifiedMode","conversion","useCohesion","shouldDisplayBulletPointsBelowCertificate","useWindowSize","width","breakpoints","large","minWidth","shouldDisplayGatedContentOneColumn","extraLarge","shouldDisplayGatedContentTwoColumns","shouldDisplayGatedContentTwoColumnsHalf","shouldWrapTextOnButton","extraSmall","accessExpirationDate","Date","expirationDate","pastExpirationDeadline","now","eventProperties","org_key","courserun_key","logClick","sendTrackEvent","linkCategory","linkName","linkType","pageName","logClickPastExpiration","jsx","Alert","variant","icon","Locked","className","children","jsxs","formatMessage","messages","Hyperlink","destination","onClick","target","classNames","style","float","alt","src","certificateLocked","height","VerifiedCertBullet","UnlockGradedBullet","FullAccessBullet","SupportMissionBullet","UpgradeButton","whiteSpace","propTypes","PropTypes","string","isRequired","_default","exports"],"sources":["../../src/paywall/DefaultLockPaywall.jsx"],"sourcesContent":["/* eslint import/no-unresolved: 0 */\nimport React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { sendTrackEvent } from '@edx/frontend-platform/analytics';\nimport { useIntl } from '@edx/frontend-platform/i18n';\nimport {\n Alert, Hyperlink, breakpoints, useWindowSize,\n} from '@openedx/paragon';\nimport { Locked } from '@openedx/paragon/icons';\nimport SidebarContext from '@src/courseware/course/sidebar/SidebarContext';\nimport messages from '@src/courseware/course/sequence/lock-paywall/messages';\nimport certificateLocked from '@src/generic/assets/edX_locked_certificate.png';\nimport { useModel } from '@src/generic/model-store';\nimport { UpgradeButton } from '@src/generic/upgrade-button';\nimport {\n VerifiedCertBullet,\n UnlockGradedBullet,\n FullAccessBullet,\n SupportMissionBullet,\n} from '@src/generic/upsell-bullets/UpsellBullets';\nimport { useCohesion } from '../cohesion';\n\nconst DefaultLockPaywall = ({\n courseId,\n}) => {\n const intl = useIntl();\n const { notificationTrayVisible } = useContext(SidebarContext);\n const course = useModel('coursewareMeta', courseId);\n const {\n accessExpiration,\n marketingUrl,\n offer,\n } = course;\n\n const {\n org, verifiedMode,\n } = useModel('courseHomeMeta', courseId);\n\n const { conversion } = useCohesion(courseId);\n\n // the following variables are set and used for resposive layout to work with\n // whether the NotificationTray is open or not and if there's an offer with longer text\n const shouldDisplayBulletPointsBelowCertificate = useWindowSize().width <= breakpoints.large.minWidth;\n const shouldDisplayGatedContentOneColumn = useWindowSize().width <= breakpoints.extraLarge.minWidth\n && notificationTrayVisible;\n const shouldDisplayGatedContentTwoColumns = useWindowSize().width < breakpoints.large.minWidth\n && notificationTrayVisible;\n const shouldDisplayGatedContentTwoColumnsHalf = useWindowSize().width <= breakpoints.large.minWidth\n && !notificationTrayVisible;\n const shouldWrapTextOnButton = useWindowSize().width > breakpoints.extraSmall.minWidth;\n\n const accessExpirationDate = accessExpiration ? new Date(accessExpiration.expirationDate) : null;\n const pastExpirationDeadline = accessExpiration ? new Date(Date.now()) > accessExpirationDate : false;\n\n if (!verifiedMode) {\n return null;\n }\n\n const eventProperties = {\n org_key: org,\n courserun_key: courseId,\n };\n\n const logClick = () => {\n sendTrackEvent('edx.bi.ecommerce.upsell_links_clicked', {\n ...eventProperties,\n linkCategory: '(none)',\n linkName: 'in_course_upgrade',\n linkType: 'link',\n pageName: 'in_course',\n });\n\n conversion('Upgraded');\n };\n\n const logClickPastExpiration = () => {\n sendTrackEvent('edx.bi.ecommerce.gated_content.past_expiration.link_clicked', {\n ...eventProperties,\n linkCategory: 'gated_content',\n linkName: 'course_details',\n linkType: 'link',\n pageName: 'in_course',\n });\n };\n\n return (\n <Alert variant=\"light\" aria-live=\"off\" icon={Locked} className=\"lock-paywall-container\" data-testId=\"lock-paywall-test-id\">\n <div className=\"row\">\n <div className=\"col\">\n <h4 aria-level=\"3\">\n <span>{intl.formatMessage(messages['learn.lockPaywall.title'])}</span>\n </h4>\n {pastExpirationDeadline ? (\n <div className=\"mb-2 upgrade-intro\">\n {intl.formatMessage(messages['learn.lockPaywall.content.pastExpiration'])}\n <Hyperlink destination={marketingUrl} onClick={logClickPastExpiration} target=\"_blank\">{intl.formatMessage(messages['learn.lockPaywall.courseDetails'])}</Hyperlink>\n </div>\n ) : (\n <div className=\"mb-2 upgrade-intro\">\n {intl.formatMessage(messages['learn.lockPaywall.content'])}\n </div>\n )}\n\n <div className={classNames('d-inline-flex flex-row', { 'flex-wrap': notificationTrayVisible || shouldDisplayBulletPointsBelowCertificate })}>\n <div style={{ float: 'left' }} className=\"mr-3 mb-2\">\n <img\n alt={intl.formatMessage(messages['learn.lockPaywall.example.alt'])}\n src={certificateLocked}\n className=\"border-0 certificate-image-banner\"\n style={{ height: '128px', width: '175px' }}\n />\n </div>\n\n <div className=\"mw-xs list-div\">\n <div className=\"mb-2\">\n {intl.formatMessage(messages['learn.lockPaywall.list.intro'])}\n </div>\n <ul className=\"fa-ul ml-4 pl-2\">\n <VerifiedCertBullet />\n <UnlockGradedBullet />\n <FullAccessBullet />\n <SupportMissionBullet />\n </ul>\n </div>\n </div>\n </div>\n\n {pastExpirationDeadline\n ? null\n : (\n <div\n className={\n classNames('d-md-flex align-items-md-center text-right', {\n 'col-md-5 mx-md-0': notificationTrayVisible, 'col-md-4 mx-md-3 justify-content-center': !notificationTrayVisible && !shouldDisplayGatedContentTwoColumnsHalf, 'col-md-11 justify-content-end': shouldDisplayGatedContentOneColumn && !shouldDisplayGatedContentTwoColumns, 'col-md-6 justify-content-center': shouldDisplayGatedContentTwoColumnsHalf,\n })\n }\n >\n <UpgradeButton\n offer={offer}\n onClick={logClick}\n verifiedMode={verifiedMode}\n style={{ whiteSpace: shouldWrapTextOnButton ? 'nowrap' : null }}\n data-testid=\"upgrade-button\"\n />\n </div>\n )}\n </div>\n </Alert>\n );\n};\nDefaultLockPaywall.propTypes = {\n courseId: PropTypes.string.isRequired,\n};\nexport default DefaultLockPaywall;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAGA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,SAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,uBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,cAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAb,OAAA;AAMA,IAAAc,SAAA,GAAAd,OAAA;AAA0C,IAAAe,WAAA,GAAAf,OAAA;AAAA,SAAAE,uBAAAc,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAjB,wBAAAiB,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAA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