@edx/frontend-plugin-learner-dashboard 3.3.5 → 3.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/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +6 -3
- package/dist/progressive-profiling-dashboard/api/service.js +32 -0
- package/dist/progressive-profiling-dashboard/api/service.js.map +1 -0
- package/dist/progressive-profiling-dashboard/data/progressiveProfilingFields.js +60 -0
- package/dist/progressive-profiling-dashboard/data/progressiveProfilingFields.js.map +1 -0
- package/dist/progressive-profiling-dashboard/field-renderer/FieldRenderer.js +86 -0
- package/dist/progressive-profiling-dashboard/field-renderer/FieldRenderer.js.map +1 -0
- package/dist/progressive-profiling-dashboard/field-renderer/index.js +14 -0
- package/dist/progressive-profiling-dashboard/field-renderer/index.js.map +1 -0
- package/dist/progressive-profiling-dashboard/hooks/useProgressiveProfilingForm.js +58 -0
- package/dist/progressive-profiling-dashboard/hooks/useProgressiveProfilingForm.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfiling.js +157 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfiling.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfilingPageModal.js +62 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfilingPageModal.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/LargeLayout.js +101 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/LargeLayout.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/MediumLayout.js +125 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/MediumLayout.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/SmallLayout.js +106 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/SmallLayout.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/index.js +28 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/index.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/messages.js +40 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/messages.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/index.js +59 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/index.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.js +14 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.scss +269 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.js +68 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.js.map +1 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js +28 -0
- package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js.map +1 -0
- package/dist/progressive-profiling-dashboard/utils/constants.js +12 -0
- package/dist/progressive-profiling-dashboard/utils/constants.js.map +1 -0
- package/dist/tracking/constants.js +2 -1
- package/dist/tracking/constants.js.map +1 -1
- package/dist/tracking/trackers/progressiveProfiling.js +42 -0
- package/dist/tracking/trackers/progressiveProfiling.js.map +1 -0
- package/dist/tracking/utils.js +15 -2
- package/dist/tracking/utils.js.map +1 -1
- package/package.json +7 -4
- package/src/index.jsx +2 -0
- package/src/progressive-profiling-dashboard/api/service.js +24 -0
- package/src/progressive-profiling-dashboard/data/progressiveProfilingFields.js +85 -0
- package/src/progressive-profiling-dashboard/field-renderer/FieldRenderer.jsx +87 -0
- package/src/progressive-profiling-dashboard/field-renderer/index.jsx +1 -0
- package/src/progressive-profiling-dashboard/hooks/useProgressiveProfilingForm.jsx +55 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfiling.jsx +156 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfilingPageModal.jsx +59 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/LargeLayout.jsx +105 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/MediumLayout.jsx +95 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/SmallLayout.jsx +85 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/index.jsx +3 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/messages.js +35 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/index.jsx +46 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/tests/BaseContainer.test.jsx +76 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.jsx +1 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.scss +269 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.jsx +62 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js +24 -0
- package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/tests/ProgressiveProfiling.test.jsx +165 -0
- package/src/progressive-profiling-dashboard/utils/constants.jsx +5 -0
- package/src/tracking/constants.js +2 -0
- package/src/tracking/trackers/progressiveProfiling.js +38 -0
- package/src/tracking/utils.js +16 -2
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints;
|
|
2
|
+
|
|
3
|
+
.pp-page__button-width{
|
|
4
|
+
min-width: 6rem;
|
|
5
|
+
}
|
|
6
|
+
.pp-page__support-link {
|
|
7
|
+
font-size: 0.875rem;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
}
|
|
10
|
+
.pp-page__heading {
|
|
11
|
+
line-height: 1.75rem;
|
|
12
|
+
font-size: 1.375rem;
|
|
13
|
+
margin-bottom: 0.5rem;
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
|
|
16
|
+
@media (--pgn-size-breakpoint-max-width-md) {
|
|
17
|
+
line-height: 1.5rem;
|
|
18
|
+
font-size: 1.125rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
@media (max-width: 464px) {
|
|
22
|
+
.pp-page__support-link {
|
|
23
|
+
font-size: 0.688rem;
|
|
24
|
+
font-weight: normal;
|
|
25
|
+
line-height: 0.938rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.logo-small {
|
|
30
|
+
width: 44.67px;
|
|
31
|
+
margin-top: 1.25rem;
|
|
32
|
+
margin-left: 1.5rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.welcome-page-logo {
|
|
36
|
+
width: 71px;
|
|
37
|
+
margin-top: 2rem;
|
|
38
|
+
margin-left: 1.5rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.main-heading {
|
|
42
|
+
position: relative;
|
|
43
|
+
z-index: 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.small-screen-top-stripe {
|
|
47
|
+
height: 0.25rem;
|
|
48
|
+
background-image: linear-gradient(102.02deg,
|
|
49
|
+
var(--pgn-color-brand-700),
|
|
50
|
+
var(--pgn-color-brand-700) 20%,
|
|
51
|
+
var(--pgn-color-brand-base) 20%,
|
|
52
|
+
);
|
|
53
|
+
background-repeat: no-repeat;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (--pgn-size-breakpoint-min-width-md) and (--pgn-size-breakpoint-max-width-md) {
|
|
57
|
+
.medium-screen-top-stripe {
|
|
58
|
+
display: flex;
|
|
59
|
+
height: 0.5rem;
|
|
60
|
+
background-image: linear-gradient(102.02deg,
|
|
61
|
+
var(--pgn-color-brand-700),
|
|
62
|
+
var(--pgn-color-brand-700) 10%,
|
|
63
|
+
var(--pgn-color-brand-base) 10%,
|
|
64
|
+
var(--pgn-color-brand-base) 90%,
|
|
65
|
+
var(--pgn-color-primary-700) 90%,
|
|
66
|
+
var(--pgn-color-primary-700) 100%,
|
|
67
|
+
);
|
|
68
|
+
background-repeat: no-repeat;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (--pgn-size-breakpoint-min-width-lg) and (--pgn-size-breakpoint-max-width-lg) {
|
|
73
|
+
.medium-screen-top-stripe {
|
|
74
|
+
display: flex;
|
|
75
|
+
height: 0.5rem;
|
|
76
|
+
background-image: linear-gradient(102.02deg,
|
|
77
|
+
var(--pgn-color-brand-700) 10%,
|
|
78
|
+
var(--pgn-color-brand-base) 10%,
|
|
79
|
+
var(--pgn-color-brand-base) 65%,
|
|
80
|
+
var(--pgn-color-primary-700) 65%,
|
|
81
|
+
var(--pgn-color-primary-700) 75%,
|
|
82
|
+
var(--pgn-color-accent-a) 75%,
|
|
83
|
+
var(--pgn-color-accent-a) 75%);
|
|
84
|
+
background-repeat: no-repeat;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.extra-large-screen-top-stripe {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (--pgn-size-breakpoint-min-width-xl) {
|
|
93
|
+
.extra-large-screen-top-stripe {
|
|
94
|
+
display: flex;
|
|
95
|
+
height: 0.5rem;
|
|
96
|
+
background-image: linear-gradient(102.02deg,
|
|
97
|
+
var(--pgn-color-brand-700) 10%,
|
|
98
|
+
var(--pgn-color-brand-base) 10%,
|
|
99
|
+
var(--pgn-color-brand-base) 45%,
|
|
100
|
+
var(--pgn-color-primary-700) 45%,
|
|
101
|
+
var(--pgn-color-primary-700) 55%,
|
|
102
|
+
var(--pgn-color-accent-a) 55%,
|
|
103
|
+
var(--pgn-color-accent-a) 75%,
|
|
104
|
+
var(--pgn-color-info-200) 75%,
|
|
105
|
+
);
|
|
106
|
+
background-repeat: no-repeat;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.large-screen-svg-primary {
|
|
111
|
+
fill: var(--pgn-color-primary-400);
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
position: absolute;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.medium-screen-svg-primary {
|
|
117
|
+
fill: var(--pgn-color-primary-400);
|
|
118
|
+
overflow: inherit;
|
|
119
|
+
position: absolute;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[dir=rtl] {
|
|
123
|
+
.medium-screen-svg-primary,
|
|
124
|
+
.large-screen-svg-primary {
|
|
125
|
+
transform: scaleX(-1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.small-yellow-line {
|
|
130
|
+
width: 80px;
|
|
131
|
+
height: 0;
|
|
132
|
+
border: 2px solid var(--pgn-color-accent-b);
|
|
133
|
+
transform: rotate(102.02deg);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.medium-yellow-line {
|
|
137
|
+
width: 120px;
|
|
138
|
+
height: 0;
|
|
139
|
+
border: 3px solid var(--pgn-color-accent-b);
|
|
140
|
+
transform: rotate(102.02deg);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.large-yellow-line {
|
|
144
|
+
width: 240px;
|
|
145
|
+
height: 0;
|
|
146
|
+
border: 3px solid var(--pgn-color-accent-b);
|
|
147
|
+
transform: rotate(102.02deg);
|
|
148
|
+
}
|
|
149
|
+
.auth-hero-left {
|
|
150
|
+
padding-left: 3.5rem;
|
|
151
|
+
padding-right: 3.5rem;
|
|
152
|
+
min-height: 100vh;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.auth-hero-base-logo {
|
|
158
|
+
// reuse existing .logo sizes, just ensure it sits above everything
|
|
159
|
+
position: relative;
|
|
160
|
+
z-index: 2;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.auth-hero-content {
|
|
164
|
+
// distance from top stripe & logo to hero block (matches Figma visually)
|
|
165
|
+
margin-top: 7rem;
|
|
166
|
+
max-width: 560px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* enterprise logo in white card */
|
|
170
|
+
.auth-hero-enterprise-logo-wrapper {
|
|
171
|
+
background: #ffffff;
|
|
172
|
+
border-radius: 6px;
|
|
173
|
+
padding: 0.75rem 1rem;
|
|
174
|
+
display: inline-flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.auth-hero-enterprise-logo {
|
|
180
|
+
max-width: 145px;
|
|
181
|
+
max-height: 74px;
|
|
182
|
+
object-fit: contain;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* yellow slanted line */
|
|
186
|
+
.auth-hero-slash {
|
|
187
|
+
width: 0; // only height+border matters
|
|
188
|
+
height: 110px; // tune this to match logo/heading height
|
|
189
|
+
border-left: 6px solid #F0CC00; // Figma yellow
|
|
190
|
+
border-radius: 999px;
|
|
191
|
+
transform: skewX(-12deg); // gives that forward slash look
|
|
192
|
+
transform-origin: center;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* heading text: "Start learning" + "with edX" */
|
|
196
|
+
.auth-hero-heading {
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.auth-hero-heading-line {
|
|
202
|
+
font-family: 'Inter', sans-serif;
|
|
203
|
+
font-size: 60px;
|
|
204
|
+
font-weight: 700;
|
|
205
|
+
line-height: 60px;
|
|
206
|
+
letter-spacing: -1.2px;
|
|
207
|
+
color: #FFFFFF; // for "Start learning"
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.auth-hero-heading-line.text-accent-a {
|
|
211
|
+
color: #03C7E8 !important; // for "with edX"
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* enterprise message aligned under heading, same left edge */
|
|
215
|
+
.auth-hero-message {
|
|
216
|
+
max-width: 492px;
|
|
217
|
+
color: #fff;
|
|
218
|
+
font-family: 'Inter', sans-serif;
|
|
219
|
+
font-size: 22px;
|
|
220
|
+
font-weight: 400;
|
|
221
|
+
line-height: 36px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.auth-hero-message p {
|
|
225
|
+
margin: 0;
|
|
226
|
+
color: inherit;
|
|
227
|
+
font-size: inherit;
|
|
228
|
+
line-height: inherit;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.auth-hero-message a {
|
|
232
|
+
color: #03c7e8;
|
|
233
|
+
text-decoration: underline;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* simple responsive tweaks */
|
|
237
|
+
@media (max-width: 1199.98px) {
|
|
238
|
+
.auth-hero-heading-line {
|
|
239
|
+
font-size: 2.5rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.auth-hero-content {
|
|
243
|
+
margin-top: 4rem;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.layout {
|
|
248
|
+
display: flex;
|
|
249
|
+
|
|
250
|
+
@media (--pgn-size-breakpoint-max-width-lg) {
|
|
251
|
+
flex-direction: column;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
align-items: center;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@media (--pgn-size-breakpoint-min-width-xl) {
|
|
257
|
+
justify-content: space-between;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.content {
|
|
262
|
+
@media (--pgn-size-breakpoint-min-width-xl) {
|
|
263
|
+
display: flex;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
width: 50vw;
|
|
266
|
+
margin-top: 4rem;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
'progressive.profiling.page.title': {
|
|
10
|
+
id: 'progressive.profiling.page.title',
|
|
11
|
+
defaultMessage: 'Welcome | {siteName}',
|
|
12
|
+
description: 'progressive profiling page title'
|
|
13
|
+
},
|
|
14
|
+
'progressive.profiling.page.heading': {
|
|
15
|
+
id: 'progressive.profiling.page.heading',
|
|
16
|
+
defaultMessage: 'A few questions for you will help us get smarter.',
|
|
17
|
+
description: 'The page heading for the progressive profiling page.'
|
|
18
|
+
},
|
|
19
|
+
'optional.fields.information.link': {
|
|
20
|
+
id: 'optional.fields.information.link',
|
|
21
|
+
defaultMessage: 'Learn more about how we use this information.',
|
|
22
|
+
description: 'Optional fields page information link'
|
|
23
|
+
},
|
|
24
|
+
'optional.fields.submit.button': {
|
|
25
|
+
id: 'optional.fields.submit.button',
|
|
26
|
+
defaultMessage: 'Submit',
|
|
27
|
+
description: 'Submit button text'
|
|
28
|
+
},
|
|
29
|
+
'optional.fields.skip.button': {
|
|
30
|
+
id: 'optional.fields.skip.button',
|
|
31
|
+
defaultMessage: 'Skip for now',
|
|
32
|
+
description: 'Skip button text'
|
|
33
|
+
},
|
|
34
|
+
'optional.fields.next.button': {
|
|
35
|
+
id: 'optional.fields.next.button',
|
|
36
|
+
defaultMessage: 'Next',
|
|
37
|
+
description: 'Next button text'
|
|
38
|
+
},
|
|
39
|
+
// modal dialog box
|
|
40
|
+
'continue.to.platform': {
|
|
41
|
+
id: 'continue.to.platform',
|
|
42
|
+
defaultMessage: 'Continue to {platformName}',
|
|
43
|
+
description: 'Button text for modal when user chooses "skip for now" option'
|
|
44
|
+
},
|
|
45
|
+
'modal.title': {
|
|
46
|
+
id: 'modal.title',
|
|
47
|
+
defaultMessage: 'Thanks for letting us know.',
|
|
48
|
+
description: 'Heading for welcome page modal'
|
|
49
|
+
},
|
|
50
|
+
'modal.description': {
|
|
51
|
+
id: 'modal.description',
|
|
52
|
+
defaultMessage: 'You can complete your profile in settings at any time if you change your mind.',
|
|
53
|
+
description: 'Modal body text'
|
|
54
|
+
},
|
|
55
|
+
// error message
|
|
56
|
+
'welcome.page.error.heading': {
|
|
57
|
+
id: 'welcome.page.error.heading',
|
|
58
|
+
defaultMessage: 'We couldn\'t update your profile',
|
|
59
|
+
description: 'Error message heading'
|
|
60
|
+
},
|
|
61
|
+
'welcome.page.error.message': {
|
|
62
|
+
id: 'welcome.page.error.message',
|
|
63
|
+
defaultMessage: 'An error occurred. You can complete your profile in settings at any time.',
|
|
64
|
+
description: 'Error message body'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
var _default = exports.default = messages;
|
|
68
|
+
//# sourceMappingURL=messages.js.map
|
package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","names":["_i18n","require","messages","defineMessages","id","defaultMessage","description","_default","exports","default"],"sources":["../../../src/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.jsx"],"sourcesContent":["import { defineMessages } from '@edx/frontend-platform/i18n';\n\nconst messages = defineMessages({\n 'progressive.profiling.page.title': {\n id: 'progressive.profiling.page.title',\n defaultMessage: 'Welcome | {siteName}',\n description: 'progressive profiling page title',\n },\n 'progressive.profiling.page.heading': {\n id: 'progressive.profiling.page.heading',\n defaultMessage: 'A few questions for you will help us get smarter.',\n description: 'The page heading for the progressive profiling page.',\n },\n 'optional.fields.information.link': {\n id: 'optional.fields.information.link',\n defaultMessage: 'Learn more about how we use this information.',\n description: 'Optional fields page information link',\n },\n 'optional.fields.submit.button': {\n id: 'optional.fields.submit.button',\n defaultMessage: 'Submit',\n description: 'Submit button text',\n },\n 'optional.fields.skip.button': {\n id: 'optional.fields.skip.button',\n defaultMessage: 'Skip for now',\n description: 'Skip button text',\n },\n 'optional.fields.next.button': {\n id: 'optional.fields.next.button',\n defaultMessage: 'Next',\n description: 'Next button text',\n },\n // modal dialog box\n 'continue.to.platform': {\n id: 'continue.to.platform',\n defaultMessage: 'Continue to {platformName}',\n description: 'Button text for modal when user chooses \"skip for now\" option',\n },\n 'modal.title': {\n id: 'modal.title',\n defaultMessage: 'Thanks for letting us know.',\n description: 'Heading for welcome page modal',\n },\n 'modal.description': {\n id: 'modal.description',\n defaultMessage: 'You can complete your profile in settings at any time if you change your mind.',\n description: 'Modal body text',\n },\n // error message\n 'welcome.page.error.heading': {\n id: 'welcome.page.error.heading',\n defaultMessage: 'We couldn\\'t update your profile',\n description: 'Error message heading',\n },\n 'welcome.page.error.message': {\n id: 'welcome.page.error.message',\n defaultMessage: 'An error occurred. You can complete your profile in settings at any time.',\n description: 'Error message body',\n },\n});\nexport default messages;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,MAAMC,QAAQ,GAAG,IAAAC,oBAAc,EAAC;EAC9B,kCAAkC,EAAE;IAClCC,EAAE,EAAE,kCAAkC;IACtCC,cAAc,EAAE,sBAAsB;IACtCC,WAAW,EAAE;EACf,CAAC;EACD,oCAAoC,EAAE;IACpCF,EAAE,EAAE,oCAAoC;IACxCC,cAAc,EAAE,mDAAmD;IACnEC,WAAW,EAAE;EACf,CAAC;EACD,kCAAkC,EAAE;IAClCF,EAAE,EAAE,kCAAkC;IACtCC,cAAc,EAAE,+CAA+C;IAC/DC,WAAW,EAAE;EACf,CAAC;EACD,+BAA+B,EAAE;IAC/BF,EAAE,EAAE,+BAA+B;IACnCC,cAAc,EAAE,QAAQ;IACxBC,WAAW,EAAE;EACf,CAAC;EACD,6BAA6B,EAAE;IAC7BF,EAAE,EAAE,6BAA6B;IACjCC,cAAc,EAAE,cAAc;IAC9BC,WAAW,EAAE;EACf,CAAC;EACD,6BAA6B,EAAE;IAC7BF,EAAE,EAAE,6BAA6B;IACjCC,cAAc,EAAE,MAAM;IACtBC,WAAW,EAAE;EACf,CAAC;EACD;EACA,sBAAsB,EAAE;IACtBF,EAAE,EAAE,sBAAsB;IAC1BC,cAAc,EAAE,4BAA4B;IAC5CC,WAAW,EAAE;EACf,CAAC;EACD,aAAa,EAAE;IACbF,EAAE,EAAE,aAAa;IACjBC,cAAc,EAAE,6BAA6B;IAC7CC,WAAW,EAAE;EACf,CAAC;EACD,mBAAmB,EAAE;IACnBF,EAAE,EAAE,mBAAmB;IACvBC,cAAc,EAAE,gFAAgF;IAChGC,WAAW,EAAE;EACf,CAAC;EACD;EACA,4BAA4B,EAAE;IAC5BF,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,kCAAkC;IAClDC,WAAW,EAAE;EACf,CAAC;EACD,4BAA4B,EAAE;IAC5BF,EAAE,EAAE,4BAA4B;IAChCC,cAAc,EAAE,2EAA2E;IAC3FC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACYP,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getThirdPartyAuthContext;
|
|
7
|
+
var _frontendPlatform = require("@edx/frontend-platform");
|
|
8
|
+
var _auth = require("@edx/frontend-platform/auth");
|
|
9
|
+
async function getThirdPartyAuthContext(urlParams) {
|
|
10
|
+
const requestConfig = {
|
|
11
|
+
headers: {
|
|
12
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
13
|
+
},
|
|
14
|
+
params: urlParams,
|
|
15
|
+
isPublic: true
|
|
16
|
+
};
|
|
17
|
+
const {
|
|
18
|
+
data
|
|
19
|
+
} = await (0, _auth.getAuthenticatedHttpClient)().get(`${(0, _frontendPlatform.getConfig)().LMS_BASE_URL}/api/mfe_context`, requestConfig).catch(e => {
|
|
20
|
+
throw e;
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
fieldDescriptions: data.registrationFields || {},
|
|
24
|
+
optionalFields: data.optionalFields || {},
|
|
25
|
+
thirdPartyAuthContext: data.contextData || {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=getThirdPartyAuthContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getThirdPartyAuthContext.js","names":["_frontendPlatform","require","_auth","getThirdPartyAuthContext","urlParams","requestConfig","headers","params","isPublic","data","getAuthenticatedHttpClient","get","getConfig","LMS_BASE_URL","catch","e","fieldDescriptions","registrationFields","optionalFields","thirdPartyAuthContext","contextData"],"sources":["../../../../src/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js"],"sourcesContent":["import { getConfig } from '@edx/frontend-platform';\nimport { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';\n\nexport default async function getThirdPartyAuthContext(urlParams) {\n const requestConfig = {\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n params: urlParams,\n isPublic: true,\n };\n\n const { data } = await getAuthenticatedHttpClient()\n .get(\n `${getConfig().LMS_BASE_URL}/api/mfe_context`,\n requestConfig,\n )\n .catch((e) => {\n throw (e);\n });\n return {\n fieldDescriptions: data.registrationFields || {},\n optionalFields: data.optionalFields || {},\n thirdPartyAuthContext: data.contextData || {},\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEe,eAAeE,wBAAwBA,CAACC,SAAS,EAAE;EAChE,MAAMC,aAAa,GAAG;IACpBC,OAAO,EAAE;MAAE,cAAc,EAAE;IAAoC,CAAC;IAChEC,MAAM,EAAEH,SAAS;IACjBI,QAAQ,EAAE;EACZ,CAAC;EAED,MAAM;IAAEC;EAAK,CAAC,GAAG,MAAM,IAAAC,gCAA0B,EAAC,CAAC,CAChDC,GAAG,CACF,GAAG,IAAAC,2BAAS,EAAC,CAAC,CAACC,YAAY,kBAAkB,EAC7CR,aACF,CAAC,CACAS,KAAK,CAAEC,CAAC,IAAK;IACZ,MAAOA,CAAC;EACV,CAAC,CAAC;EACJ,OAAO;IACLC,iBAAiB,EAAEP,IAAI,CAACQ,kBAAkB,IAAI,CAAC,CAAC;IAChDC,cAAc,EAAET,IAAI,CAACS,cAAc,IAAI,CAAC,CAAC;IACzCC,qBAAqB,EAAEV,IAAI,CAACW,WAAW,IAAI,CAAC;EAC9C,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PROGRESSIVE_PROFILING_QUERY_PARAM = exports.PENDING_STATE = exports.FAILURE_STATE = exports.DEFAULT_STATE = exports.COMPLETE_STATE = void 0;
|
|
7
|
+
const PROGRESSIVE_PROFILING_QUERY_PARAM = exports.PROGRESSIVE_PROFILING_QUERY_PARAM = 'progressiveProfiling';
|
|
8
|
+
const DEFAULT_STATE = exports.DEFAULT_STATE = 'default';
|
|
9
|
+
const PENDING_STATE = exports.PENDING_STATE = 'pending';
|
|
10
|
+
const COMPLETE_STATE = exports.COMPLETE_STATE = 'complete';
|
|
11
|
+
const FAILURE_STATE = exports.FAILURE_STATE = 'failure';
|
|
12
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":["PROGRESSIVE_PROFILING_QUERY_PARAM","exports","DEFAULT_STATE","PENDING_STATE","COMPLETE_STATE","FAILURE_STATE"],"sources":["../../../src/progressive-profiling-dashboard/utils/constants.jsx"],"sourcesContent":["export const PROGRESSIVE_PROFILING_QUERY_PARAM = 'progressiveProfiling';\nexport const DEFAULT_STATE = 'default';\nexport const PENDING_STATE = 'pending';\nexport const COMPLETE_STATE = 'complete';\nexport const FAILURE_STATE = 'failure';\n"],"mappings":";;;;;;AAAO,MAAMA,iCAAiC,GAAAC,OAAA,CAAAD,iCAAA,GAAG,sBAAsB;AAChE,MAAME,aAAa,GAAAD,OAAA,CAAAC,aAAA,GAAG,SAAS;AAC/B,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAG,SAAS;AAC/B,MAAMC,cAAc,GAAAH,OAAA,CAAAG,cAAA,GAAG,UAAU;AACjC,MAAMC,aAAa,GAAAJ,OAAA,CAAAI,aAAA,GAAG,SAAS","ignoreList":[]}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.eventNames = exports.categories = exports.LOCATION_LEARNER_HOME = exports.EXPLORE_COURSES_HTML_ID = exports.EXPLORE_COURSES_EVENT_TEXT = exports.EXPLORE_COURSES_EVENT_NAME = exports.BUTTON_ELEMENT_TYPE = void 0;
|
|
6
|
+
exports.eventNames = exports.categories = exports.LOCATION_LEARNER_HOME = exports.LEARNER_HOME_APP_NAME = exports.EXPLORE_COURSES_HTML_ID = exports.EXPLORE_COURSES_EVENT_TEXT = exports.EXPLORE_COURSES_EVENT_NAME = exports.BUTTON_ELEMENT_TYPE = void 0;
|
|
7
|
+
const LEARNER_HOME_APP_NAME = exports.LEARNER_HOME_APP_NAME = 'learner-home';
|
|
7
8
|
const learnerPortal = 'edx.ui.enterprise.lms.dashboard.learner_portal_modal';
|
|
8
9
|
const eventNames = exports.eventNames = {
|
|
9
10
|
dashboardModalOpened: `${learnerPortal}.opened`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["
|
|
1
|
+
{"version":3,"file":"constants.js","names":["LEARNER_HOME_APP_NAME","exports","learnerPortal","eventNames","dashboardModalOpened","dashboardModalCTAClicked","dashboardModalClosed","upgradeButtonClicked","upgradeButtonClickedEnrollment","upgradeButtonClickedUpsell","categories","upgrade","BUTTON_ELEMENT_TYPE","LOCATION_LEARNER_HOME","EXPLORE_COURSES_HTML_ID","EXPLORE_COURSES_EVENT_NAME","EXPLORE_COURSES_EVENT_TEXT"],"sources":["../../src/tracking/constants.js"],"sourcesContent":["export const LEARNER_HOME_APP_NAME = 'learner-home';\n\nconst learnerPortal = 'edx.ui.enterprise.lms.dashboard.learner_portal_modal';\n\nexport const eventNames = {\n dashboardModalOpened: `${learnerPortal}.opened`,\n dashboardModalCTAClicked: `${learnerPortal}.dashboard_cta.clicked`,\n dashboardModalClosed: `${learnerPortal}.closed`,\n upgradeButtonClicked: 'edx.bi.dashboard.upgrade_button.clicked',\n upgradeButtonClickedEnrollment: 'edx.course.enrollment.upgrade.clicked',\n upgradeButtonClickedUpsell: 'edx.bi.ecommerce.upsell_links_clicked',\n};\n\nexport const categories = {\n upgrade: 'upgrade',\n};\n\n// Cohesion event properties\nexport const BUTTON_ELEMENT_TYPE = 'BUTTON';\nexport const LOCATION_LEARNER_HOME = 'learner-home-legacy';\nexport const EXPLORE_COURSES_HTML_ID = 'explore-courses';\nexport const EXPLORE_COURSES_EVENT_NAME = 'explore-courses-LD-cta';\nexport const EXPLORE_COURSES_EVENT_TEXT = 'Explore courses';\n"],"mappings":";;;;;;AAAO,MAAMA,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,cAAc;AAEnD,MAAME,aAAa,GAAG,sDAAsD;AAErE,MAAMC,UAAU,GAAAF,OAAA,CAAAE,UAAA,GAAG;EACxBC,oBAAoB,EAAE,GAAGF,aAAa,SAAS;EAC/CG,wBAAwB,EAAE,GAAGH,aAAa,wBAAwB;EAClEI,oBAAoB,EAAE,GAAGJ,aAAa,SAAS;EAC/CK,oBAAoB,EAAE,yCAAyC;EAC/DC,8BAA8B,EAAE,uCAAuC;EACvEC,0BAA0B,EAAE;AAC9B,CAAC;AAEM,MAAMC,UAAU,GAAAT,OAAA,CAAAS,UAAA,GAAG;EACxBC,OAAO,EAAE;AACX,CAAC;;AAED;AACO,MAAMC,mBAAmB,GAAAX,OAAA,CAAAW,mBAAA,GAAG,QAAQ;AACpC,MAAMC,qBAAqB,GAAAZ,OAAA,CAAAY,qBAAA,GAAG,qBAAqB;AACnD,MAAMC,uBAAuB,GAAAb,OAAA,CAAAa,uBAAA,GAAG,iBAAiB;AACjD,MAAMC,0BAA0B,GAAAd,OAAA,CAAAc,0BAAA,GAAG,wBAAwB;AAC3D,MAAMC,0BAA0B,GAAAf,OAAA,CAAAe,0BAAA,GAAG,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.trackProgressiveProfilingSupportLinkClick = exports.trackProgressiveProfilingSubmitClick = exports.trackProgressiveProfilingSkipLinkClick = exports.trackProgressiveProfilingPageViewed = exports.trackDisablePostRegistrationRecommendations = exports.eventNames = void 0;
|
|
7
|
+
var _utils = require("../utils");
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
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-disable function-paren-newline */
|
|
13
|
+
const eventNames = exports.eventNames = {
|
|
14
|
+
progressiveProfilingSubmitClick: 'edx.bi.welcome.page.submit.clicked',
|
|
15
|
+
progressiveProfilingSkipLinkClick: 'edx.bi.welcome.page.skip.link.clicked',
|
|
16
|
+
disablePostRegistrationRecommendations: 'edx.bi.user.recommendations.not.enabled',
|
|
17
|
+
progressiveProfilingSupportLinkClick: 'edx.bi.welcome.page.support.link.clicked',
|
|
18
|
+
loginAndRegistration: 'login_and_registration'
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Event link tracker for Progressive profiling skip button click
|
|
22
|
+
const trackProgressiveProfilingSkipLinkClick = evenProperties => (0, _utils.createEventTracker)(eventNames.progressiveProfilingSkipLinkClick, _objectSpread({}, evenProperties))();
|
|
23
|
+
|
|
24
|
+
// Event tracker for progressive profiling submit button click
|
|
25
|
+
exports.trackProgressiveProfilingSkipLinkClick = trackProgressiveProfilingSkipLinkClick;
|
|
26
|
+
const trackProgressiveProfilingSubmitClick = evenProperties => (0, _utils.createEventTracker)(eventNames.progressiveProfilingSubmitClick, _objectSpread({}, evenProperties))();
|
|
27
|
+
|
|
28
|
+
// Event tracker for progressive profiling submit button click
|
|
29
|
+
exports.trackProgressiveProfilingSubmitClick = trackProgressiveProfilingSubmitClick;
|
|
30
|
+
const trackDisablePostRegistrationRecommendations = evenProperties => (0, _utils.createEventTracker)(eventNames.disablePostRegistrationRecommendations, _objectSpread({}, evenProperties))();
|
|
31
|
+
|
|
32
|
+
// Tracks the progressive profiling page event.
|
|
33
|
+
exports.trackDisablePostRegistrationRecommendations = trackDisablePostRegistrationRecommendations;
|
|
34
|
+
const trackProgressiveProfilingPageViewed = () => {
|
|
35
|
+
(0, _utils.createPageEventTracker)(eventNames.loginAndRegistration, 'welcome')();
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Tracks the progressive profiling support link click.
|
|
39
|
+
exports.trackProgressiveProfilingPageViewed = trackProgressiveProfilingPageViewed;
|
|
40
|
+
const trackProgressiveProfilingSupportLinkClick = () => (0, _utils.createEventTracker)(eventNames.progressiveProfilingSupportLinkClick, {})();
|
|
41
|
+
exports.trackProgressiveProfilingSupportLinkClick = trackProgressiveProfilingSupportLinkClick;
|
|
42
|
+
//# sourceMappingURL=progressiveProfiling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressiveProfiling.js","names":["_utils","require","ownKeys","e","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","eventNames","exports","progressiveProfilingSubmitClick","progressiveProfilingSkipLinkClick","disablePostRegistrationRecommendations","progressiveProfilingSupportLinkClick","loginAndRegistration","trackProgressiveProfilingSkipLinkClick","evenProperties","createEventTracker","trackProgressiveProfilingSubmitClick","trackDisablePostRegistrationRecommendations","trackProgressiveProfilingPageViewed","createPageEventTracker","trackProgressiveProfilingSupportLinkClick"],"sources":["../../../src/tracking/trackers/progressiveProfiling.js"],"sourcesContent":["/* eslint-disable function-paren-newline */\nimport { createEventTracker, createPageEventTracker } from '../utils';\n\nexport const eventNames = {\n progressiveProfilingSubmitClick: 'edx.bi.welcome.page.submit.clicked',\n progressiveProfilingSkipLinkClick: 'edx.bi.welcome.page.skip.link.clicked',\n disablePostRegistrationRecommendations: 'edx.bi.user.recommendations.not.enabled',\n progressiveProfilingSupportLinkClick: 'edx.bi.welcome.page.support.link.clicked',\n loginAndRegistration: 'login_and_registration',\n};\n\n// Event link tracker for Progressive profiling skip button click\nexport const trackProgressiveProfilingSkipLinkClick = evenProperties => createEventTracker(\n eventNames.progressiveProfilingSkipLinkClick, { ...evenProperties },\n)();\n\n// Event tracker for progressive profiling submit button click\nexport const trackProgressiveProfilingSubmitClick = (evenProperties) => createEventTracker(\n eventNames.progressiveProfilingSubmitClick,\n { ...evenProperties },\n)();\n\n// Event tracker for progressive profiling submit button click\nexport const trackDisablePostRegistrationRecommendations = (evenProperties) => createEventTracker(\n eventNames.disablePostRegistrationRecommendations,\n { ...evenProperties },\n)();\n\n// Tracks the progressive profiling page event.\nexport const trackProgressiveProfilingPageViewed = () => {\n createPageEventTracker(eventNames.loginAndRegistration, 'welcome')();\n};\n\n// Tracks the progressive profiling support link click.\nexport const trackProgressiveProfilingSupportLinkClick = () => createEventTracker(\n eventNames.progressiveProfilingSupportLinkClick,\n {},\n)();\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAsE,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAA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C,CACH,CAAC,CAAC,CAAC;AAACJ,OAAA,CAAAa,yCAAA,GAAAA,yCAAA","ignoreList":[]}
|
package/dist/tracking/utils.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.logEvent = exports.createLinkTracker = exports.createEventTracker = void 0;
|
|
6
|
+
exports.logEvent = exports.createPageEventTracker = exports.createLinkTracker = exports.createEventTracker = void 0;
|
|
7
7
|
var _frontendPlatform = require("@edx/frontend-platform");
|
|
8
8
|
var _auth = require("@edx/frontend-platform/auth");
|
|
9
9
|
var _analytics = require("@edx/frontend-platform/analytics");
|
|
10
|
+
var _constants = require("./constants");
|
|
10
11
|
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; }
|
|
11
12
|
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; }
|
|
12
13
|
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,9 +29,21 @@ const logEvent = ({
|
|
|
28
29
|
});
|
|
29
30
|
exports.logEvent = logEvent;
|
|
30
31
|
const createEventTracker = (name, options = {}) => () => (0, _analytics.sendTrackEvent)(name, _objectSpread(_objectSpread({}, options), {}, {
|
|
31
|
-
app_name:
|
|
32
|
+
app_name: _constants.LEARNER_HOME_APP_NAME
|
|
32
33
|
}));
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Creates an event tracker function that sends a tracking event with the given name and options.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} name - The name of the event to be tracked.
|
|
39
|
+
* @param {object} [options={}] - Additional options to be included with the event.
|
|
40
|
+
* @returns {function} - A function that, when called, sends the tracking event.
|
|
41
|
+
*/
|
|
33
42
|
exports.createEventTracker = createEventTracker;
|
|
43
|
+
const createPageEventTracker = (name, options = null) => () => (0, _analytics.sendPageEvent)(name, options, {
|
|
44
|
+
app_name: _constants.LEARNER_HOME_APP_NAME
|
|
45
|
+
});
|
|
46
|
+
exports.createPageEventTracker = createPageEventTracker;
|
|
34
47
|
const createLinkTracker = (tracker, href) => e => {
|
|
35
48
|
e.preventDefault();
|
|
36
49
|
tracker();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_frontendPlatform","require","_auth","_analytics","ownKeys","e","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","LINK_TIMEOUT","eventUrl","getConfig","LMS_BASE_URL","logEvent","eventName","data","courseId","getAuthenticatedHttpClient","post","courserun_key","event_type","page","window","location","href","event","JSON","stringify","exports","createEventTracker","name","options","sendTrackEvent","app_name","createLinkTracker","tracker","preventDefault","setTimeout","global"],"sources":["../../src/tracking/utils.js"],"sourcesContent":["import { getConfig } from '@edx/frontend-platform';\nimport { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';\nimport { sendTrackEvent } from '@edx/frontend-platform/analytics';\n\nconst LINK_TIMEOUT = 300;\n\nconst eventUrl = `${getConfig().LMS_BASE_URL}/event`;\n\n// Utils/Helpers\nexport const logEvent = ({ eventName, data, courseId }) => getAuthenticatedHttpClient().post(eventUrl, {\n courserun_key: courseId,\n event_type: eventName,\n page: window.location.href,\n event: JSON.stringify(data),\n});\n\nexport const createEventTracker = (name, options = {}) => () => sendTrackEvent(\n name,\n { ...options, app_name:
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_frontendPlatform","require","_auth","_analytics","_constants","ownKeys","e","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","LINK_TIMEOUT","eventUrl","getConfig","LMS_BASE_URL","logEvent","eventName","data","courseId","getAuthenticatedHttpClient","post","courserun_key","event_type","page","window","location","href","event","JSON","stringify","exports","createEventTracker","name","options","sendTrackEvent","app_name","LEARNER_HOME_APP_NAME","createPageEventTracker","sendPageEvent","createLinkTracker","tracker","preventDefault","setTimeout","global"],"sources":["../../src/tracking/utils.js"],"sourcesContent":["import { getConfig } from '@edx/frontend-platform';\nimport { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';\nimport { sendTrackEvent, sendPageEvent } from '@edx/frontend-platform/analytics';\nimport { LEARNER_HOME_APP_NAME } from './constants';\n\nconst LINK_TIMEOUT = 300;\n\nconst eventUrl = `${getConfig().LMS_BASE_URL}/event`;\n\n// Utils/Helpers\nexport const logEvent = ({ eventName, data, courseId }) => getAuthenticatedHttpClient().post(eventUrl, {\n courserun_key: courseId,\n event_type: eventName,\n page: window.location.href,\n event: JSON.stringify(data),\n});\n\nexport const createEventTracker = (name, options = {}) => () => sendTrackEvent(\n name,\n { ...options, app_name: LEARNER_HOME_APP_NAME },\n);\n\n/**\n * Creates an event tracker function that sends a tracking event with the given name and options.\n *\n * @param {string} name - The name of the event to be tracked.\n * @param {object} [options={}] - Additional options to be included with the event.\n * @returns {function} - A function that, when called, sends the tracking event.\n */\nexport const createPageEventTracker = (name, options = null) => () => sendPageEvent(\n name,\n options,\n { app_name: LEARNER_HOME_APP_NAME },\n);\n\nexport const createLinkTracker = (tracker, href) => (e) => {\n e.preventDefault();\n tracker();\n return setTimeout(() => { global.location.href = href; }, LINK_TIMEOUT);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAoD,SAAAI,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,CAAAf,CAAA,KAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAa,OAAA,WAAAd,CAAA,IAAAE,MAAA,CAAAgB,cAAA,CAAAnB,CAAA,EAAAC,CAAA,EAAAE,MA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OAAA,CAAAf,QAAA,GAAAA,QAAA;AAEI,MAAMgB,kBAAkB,GAAGA,CAACC,IAAI,EAAEC,OAAO,GAAG,CAAC,CAAC,KAAK,MAAM,IAAAC,yBAAc,EAC5EF,IAAI,EAAAzC,aAAA,CAAAA,aAAA,KACC0C,OAAO;EAAEE,QAAQ,EAAEC;AAAqB,EAC/C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANAN,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAOO,MAAMM,sBAAsB,GAAGA,CAACL,IAAI,EAAEC,OAAO,GAAG,IAAI,KAAK,MAAM,IAAAK,wBAAa,EACjFN,IAAI,EACJC,OAAO,EACP;EAAEE,QAAQ,EAAEC;AAAsB,CACpC,CAAC;AAACN,OAAA,CAAAO,sBAAA,GAAAA,sBAAA;AAEK,MAAME,iBAAiB,GAAGA,CAACC,OAAO,EAAEd,IAAI,KAAM/C,CAAC,IAAK;EACzDA,CAAC,CAAC8D,cAAc,CAAC,CAAC;EAClBD,OAAO,CAAC,CAAC;EACT,OAAOE,UAAU,CAAC,MAAM;IAAEC,MAAM,CAAClB,QAAQ,CAACC,IAAI,GAAGA,IAAI;EAAE,CAAC,EAAEf,YAAY,CAAC;AACzE,CAAC;AAACmB,OAAA,CAAAS,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edx/frontend-plugin-learner-dashboard",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Repository for Learner Dashboard MFE frontend plugins",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@edx/browserslist-config": "^1.1.1",
|
|
46
46
|
"@edx/react-unit-test-utils": "^4.0.0",
|
|
47
47
|
"@edx/reactifex": "^2.1.1",
|
|
48
|
-
"@openedx/frontend-build": "14.6.
|
|
48
|
+
"@openedx/frontend-build": "14.6.6",
|
|
49
49
|
"@testing-library/jest-dom": "^6.6.3",
|
|
50
50
|
"@testing-library/react": "^16.2.0",
|
|
51
|
-
"jest": "30.
|
|
51
|
+
"jest": "30.4.2",
|
|
52
52
|
"react-error-boundary": "^6.1.0",
|
|
53
53
|
"rosie": "2.1.1",
|
|
54
54
|
"semantic-release": "^25.0.0",
|
|
@@ -57,9 +57,12 @@
|
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@edx/frontend-platform": "^8.3.1",
|
|
59
59
|
"@openedx/paragon": "^23.0.0",
|
|
60
|
+
"classnames": "^2.5.1",
|
|
60
61
|
"moment": "^2.30.1",
|
|
61
62
|
"prop-types": "15.8.1",
|
|
62
63
|
"react": "^18.3.1",
|
|
63
|
-
"react-dom": "^18.3.1"
|
|
64
|
+
"react-dom": "^18.3.1",
|
|
65
|
+
"react-helmet": "^6.1.0",
|
|
66
|
+
"react-router-dom": "^6.30.2"
|
|
64
67
|
}
|
|
65
68
|
}
|
package/src/index.jsx
CHANGED
|
@@ -9,6 +9,7 @@ import NoticesRedirect from './notices-redirect/index';
|
|
|
9
9
|
import UpgradeButton from './upgrade-button';
|
|
10
10
|
import UserCareerMenu from './career-menu/index';
|
|
11
11
|
import UserDashboardMenu from './dashboard-menu/index';
|
|
12
|
+
import { ProgressiveProfiling } from './progressive-profiling-dashboard/progressive-profiling-authn-replica';
|
|
12
13
|
|
|
13
14
|
export {
|
|
14
15
|
CohesionWrapper,
|
|
@@ -22,4 +23,5 @@ export {
|
|
|
22
23
|
UpgradeButton,
|
|
23
24
|
UserCareerMenu,
|
|
24
25
|
UserDashboardMenu,
|
|
26
|
+
ProgressiveProfiling,
|
|
25
27
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getConfig, snakeCaseObject } from '@edx/frontend-platform';
|
|
2
|
+
|
|
3
|
+
export async function saveProgressiveProfiling(username, client, values, extendedProfileFieldNames = []) {
|
|
4
|
+
const payload = { ...values, extendedProfile: [] };
|
|
5
|
+
|
|
6
|
+
extendedProfileFieldNames.forEach((fieldName) => {
|
|
7
|
+
if (payload[fieldName] !== undefined && payload[fieldName] !== '') {
|
|
8
|
+
payload.extendedProfile.push({
|
|
9
|
+
fieldName,
|
|
10
|
+
fieldValue: payload[fieldName],
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
delete payload[fieldName];
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
await client.patch(
|
|
18
|
+
`${getConfig().LMS_BASE_URL}/api/user/v1/accounts/${username}`,
|
|
19
|
+
snakeCaseObject(payload),
|
|
20
|
+
{
|
|
21
|
+
headers: { 'Content-Type': 'application/merge-patch+json' },
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
}
|