@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.
Files changed (69) hide show
  1. package/dist/index.js +7 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/package.json +6 -3
  4. package/dist/progressive-profiling-dashboard/api/service.js +32 -0
  5. package/dist/progressive-profiling-dashboard/api/service.js.map +1 -0
  6. package/dist/progressive-profiling-dashboard/data/progressiveProfilingFields.js +60 -0
  7. package/dist/progressive-profiling-dashboard/data/progressiveProfilingFields.js.map +1 -0
  8. package/dist/progressive-profiling-dashboard/field-renderer/FieldRenderer.js +86 -0
  9. package/dist/progressive-profiling-dashboard/field-renderer/FieldRenderer.js.map +1 -0
  10. package/dist/progressive-profiling-dashboard/field-renderer/index.js +14 -0
  11. package/dist/progressive-profiling-dashboard/field-renderer/index.js.map +1 -0
  12. package/dist/progressive-profiling-dashboard/hooks/useProgressiveProfilingForm.js +58 -0
  13. package/dist/progressive-profiling-dashboard/hooks/useProgressiveProfilingForm.js.map +1 -0
  14. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfiling.js +157 -0
  15. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfiling.js.map +1 -0
  16. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfilingPageModal.js +62 -0
  17. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfilingPageModal.js.map +1 -0
  18. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/LargeLayout.js +101 -0
  19. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/LargeLayout.js.map +1 -0
  20. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/MediumLayout.js +125 -0
  21. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/MediumLayout.js.map +1 -0
  22. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/SmallLayout.js +106 -0
  23. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/SmallLayout.js.map +1 -0
  24. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/index.js +28 -0
  25. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/index.js.map +1 -0
  26. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/messages.js +40 -0
  27. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/messages.js.map +1 -0
  28. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/index.js +59 -0
  29. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/index.js.map +1 -0
  30. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.js +14 -0
  31. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.js.map +1 -0
  32. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.scss +269 -0
  33. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.js +68 -0
  34. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.js.map +1 -0
  35. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js +28 -0
  36. package/dist/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js.map +1 -0
  37. package/dist/progressive-profiling-dashboard/utils/constants.js +12 -0
  38. package/dist/progressive-profiling-dashboard/utils/constants.js.map +1 -0
  39. package/dist/tracking/constants.js +2 -1
  40. package/dist/tracking/constants.js.map +1 -1
  41. package/dist/tracking/trackers/progressiveProfiling.js +42 -0
  42. package/dist/tracking/trackers/progressiveProfiling.js.map +1 -0
  43. package/dist/tracking/utils.js +15 -2
  44. package/dist/tracking/utils.js.map +1 -1
  45. package/package.json +7 -4
  46. package/src/index.jsx +2 -0
  47. package/src/progressive-profiling-dashboard/api/service.js +24 -0
  48. package/src/progressive-profiling-dashboard/data/progressiveProfilingFields.js +85 -0
  49. package/src/progressive-profiling-dashboard/field-renderer/FieldRenderer.jsx +87 -0
  50. package/src/progressive-profiling-dashboard/field-renderer/index.jsx +1 -0
  51. package/src/progressive-profiling-dashboard/hooks/useProgressiveProfilingForm.jsx +55 -0
  52. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfiling.jsx +156 -0
  53. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/ProgressiveProfilingPageModal.jsx +59 -0
  54. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/LargeLayout.jsx +105 -0
  55. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/MediumLayout.jsx +95 -0
  56. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/SmallLayout.jsx +85 -0
  57. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/index.jsx +3 -0
  58. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/components/welcome-page-layout/messages.js +35 -0
  59. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/index.jsx +46 -0
  60. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/base-container/tests/BaseContainer.test.jsx +76 -0
  61. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.jsx +1 -0
  62. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/index.scss +269 -0
  63. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/messages.jsx +62 -0
  64. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/service/getThirdPartyAuthContext.js +24 -0
  65. package/src/progressive-profiling-dashboard/progressive-profiling-authn-replica/tests/ProgressiveProfiling.test.jsx +165 -0
  66. package/src/progressive-profiling-dashboard/utils/constants.jsx +5 -0
  67. package/src/tracking/constants.js +2 -0
  68. package/src/tracking/trackers/progressiveProfiling.js +38 -0
  69. package/src/tracking/utils.js +16 -2
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ import { getConfig } from '@edx/frontend-platform';
5
+ import { useIntl } from '@edx/frontend-platform/i18n';
6
+ import { Hyperlink, Image } from '@openedx/paragon';
7
+
8
+ import messages from './messages';
9
+
10
+ const SmallLayout = ({ enterpriseBranding }) => {
11
+ const { formatMessage } = useIntl();
12
+
13
+ const enterpriseLogoUrl = enterpriseBranding?.enterpriseLogoUrl || null;
14
+ const enterpriseName = enterpriseBranding?.enterpriseName || null;
15
+ const enterpriseWelcomeHtml = enterpriseBranding?.enterpriseBrandedWelcomeString
16
+ || enterpriseBranding?.platformWelcomeString
17
+ || '';
18
+
19
+ const siteName = getConfig().SITE_NAME;
20
+ const baseLogoSrc = getConfig().LOGO_WHITE_URL || getConfig().LOGO_URL;
21
+
22
+ return (
23
+ <div className="min-vw-100 bg-primary-400 auth-hero-left">
24
+ <div className="col-md-12 small-screen-top-stripe" />
25
+ <Hyperlink destination={getConfig().MARKETING_SITE_BASE_URL}>
26
+ <Image className="logo-small auth-hero-base-logo" alt={siteName} src={baseLogoSrc} />
27
+ </Hyperlink>
28
+
29
+ <div className="auth-hero-content d-flex flex-column">
30
+ <div className="d-flex align-items-center">
31
+ {enterpriseLogoUrl && (
32
+ <div className="auth-hero-enterprise-logo-wrapper mr-4">
33
+ <Image
34
+ alt={enterpriseName || 'Enterprise'}
35
+ src={enterpriseLogoUrl}
36
+ className="auth-hero-enterprise-logo"
37
+ />
38
+ </div>
39
+ )}
40
+
41
+ <div className="auth-hero-slash mr-4" aria-hidden="true">
42
+ <svg xmlns="http://www.w3.org/2000/svg" width="191" height="250" viewBox="0 0 191 250" fill="none" style={{ width: '100%', height: '100%' }}>
43
+ <line x1="69.8107" y1="33.833" x2="32.9503" y2="206.952" stroke="#F0CC00" strokeWidth="8" />
44
+ </svg>
45
+ </div>
46
+
47
+ <div className="auth-hero-heading">
48
+ <div className="auth-hero-heading-line text-white">
49
+ {formatMessage(messages['start.learning'])}
50
+ </div>
51
+ <div className="auth-hero-heading-line text-accent-a">
52
+ {formatMessage(messages['with.site.name'], { siteName })}
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ {enterpriseWelcomeHtml && (
58
+ <div
59
+ className="auth-hero-message mt-3"
60
+ // eslint-disable-next-line react/no-danger
61
+ // HTML is provided by trusted enterprise branding config (sanitized upstream).
62
+ dangerouslySetInnerHTML={{
63
+ __html: enterpriseWelcomeHtml,
64
+ }}
65
+ />
66
+ )}
67
+ </div>
68
+ </div>
69
+ );
70
+ };
71
+
72
+ SmallLayout.propTypes = {
73
+ enterpriseBranding: PropTypes.shape({
74
+ enterpriseLogoUrl: PropTypes.string,
75
+ enterpriseName: PropTypes.string,
76
+ enterpriseBrandedWelcomeString: PropTypes.string,
77
+ platformWelcomeString: PropTypes.string,
78
+ }),
79
+ };
80
+
81
+ SmallLayout.defaultProps = {
82
+ enterpriseBranding: null,
83
+ };
84
+
85
+ export default SmallLayout;
@@ -0,0 +1,3 @@
1
+ export { default as AuthLargeLayout } from './LargeLayout';
2
+ export { default as AuthMediumLayout } from './MediumLayout';
3
+ export { default as AuthSmallLayout } from './SmallLayout';
@@ -0,0 +1,35 @@
1
+ import { defineMessages } from '@edx/frontend-platform/i18n';
2
+
3
+ const messages = defineMessages({
4
+ 'welcome.to.platform': {
5
+ id: 'welcome.to.platform',
6
+ defaultMessage: 'Welcome to {siteName}, {fullName}!',
7
+ description: 'Welcome message that appears on progressive profile page',
8
+ },
9
+ 'start.learning': {
10
+ id: 'start.learning',
11
+ defaultMessage: 'Start learning',
12
+ description: 'Header text for logistration MFE pages',
13
+ },
14
+ 'with.site.name': {
15
+ id: 'with.site.name',
16
+ defaultMessage: 'with {siteName}',
17
+ description: 'Header text with site name for logistration MFE pages',
18
+ },
19
+ 'with.edx': {
20
+ id: 'with.edx',
21
+ defaultMessage: ' with edX',
22
+ },
23
+ 'complete.your.profile.1': {
24
+ id: 'complete.your.profile.1',
25
+ defaultMessage: 'Complete',
26
+ description: 'part of text "complete your profile"',
27
+ },
28
+ 'complete.your.profile.2': {
29
+ id: 'complete.your.profile.2',
30
+ defaultMessage: 'your profile',
31
+ description: 'part of text "complete your profile"',
32
+ },
33
+ });
34
+
35
+ export default messages;
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+
3
+ import { breakpoints } from '@openedx/paragon';
4
+ import PropTypes from 'prop-types';
5
+ import MediaQuery from 'react-responsive';
6
+
7
+ import { AuthLargeLayout, AuthMediumLayout, AuthSmallLayout } from './components/welcome-page-layout';
8
+
9
+ const BaseContainer = ({ children, enterpriseBranding }) => {
10
+ const brandingData = enterpriseBranding?.thirdPartyAuthContext?.enterpriseBranding;
11
+
12
+ return (
13
+ <>
14
+ <div className="col-md-12 extra-large-screen-top-stripe" />
15
+ <div className="layout">
16
+ <MediaQuery maxWidth={breakpoints.small.maxWidth - 1}>
17
+ <AuthSmallLayout enterpriseBranding={brandingData} />
18
+ </MediaQuery>
19
+ <MediaQuery minWidth={breakpoints.medium.minWidth} maxWidth={breakpoints.large.maxWidth - 1}>
20
+ <AuthMediumLayout enterpriseBranding={brandingData} />
21
+ </MediaQuery>
22
+ <MediaQuery minWidth={breakpoints.extraLarge.minWidth}>
23
+ <AuthLargeLayout enterpriseBranding={brandingData} />
24
+ </MediaQuery>
25
+ <div className="content">
26
+ {children}
27
+ </div>
28
+ </div>
29
+ </>
30
+ );
31
+ };
32
+
33
+ BaseContainer.defaultProps = {
34
+ enterpriseBranding: null,
35
+ };
36
+
37
+ BaseContainer.propTypes = {
38
+ children: PropTypes.node.isRequired,
39
+ enterpriseBranding: PropTypes.shape({
40
+ thirdPartyAuthContext: PropTypes.shape({
41
+ enterpriseBranding: PropTypes.shape({}),
42
+ }),
43
+ }),
44
+ };
45
+
46
+ export default BaseContainer;
@@ -0,0 +1,76 @@
1
+ import React from 'react';
2
+ import { IntlProvider } from '@edx/frontend-platform/i18n';
3
+ import { render, screen } from '@testing-library/react';
4
+
5
+ import BaseContainer from '../index';
6
+
7
+ jest.mock('../components/welcome-page-layout', () => ({
8
+ AuthSmallLayout: () => <div data-testid="auth-small-layout" />,
9
+ AuthMediumLayout: () => <div data-testid="auth-medium-layout" />,
10
+ AuthLargeLayout: () => <div data-testid="auth-large-layout" />,
11
+ }));
12
+
13
+ let mockWidth = 1400;
14
+
15
+ jest.mock('react-responsive', () => ({
16
+ __esModule: true,
17
+ // eslint-disable-next-line react/prop-types
18
+ default: ({ children, minWidth, maxWidth }) => {
19
+ const matches = (minWidth === undefined || mockWidth >= minWidth)
20
+ && (maxWidth === undefined || mockWidth <= maxWidth);
21
+ return matches ? children : null;
22
+ },
23
+ }));
24
+
25
+ const renderAtWidth = (width, props = {}) => {
26
+ mockWidth = width;
27
+ return render(
28
+ <IntlProvider locale="en">
29
+ <BaseContainer {...props}>
30
+ <div>Test Content</div>
31
+ </BaseContainer>
32
+ </IntlProvider>,
33
+ );
34
+ };
35
+
36
+ describe('BaseContainer', () => {
37
+ it('renders children', () => {
38
+ renderAtWidth(1400);
39
+ expect(screen.getByText('Test Content')).toBeInTheDocument();
40
+ });
41
+
42
+ it('renders the top stripe', () => {
43
+ const { container } = renderAtWidth(1400);
44
+ expect(container.querySelector('.extra-large-screen-top-stripe')).toBeInTheDocument();
45
+ });
46
+
47
+ it('renders AuthSmallLayout at small screen widths', () => {
48
+ renderAtWidth(400);
49
+ expect(screen.getByTestId('auth-small-layout')).toBeInTheDocument();
50
+ });
51
+
52
+ it('renders AuthMediumLayout at medium screen widths', () => {
53
+ renderAtWidth(800);
54
+ expect(screen.getByTestId('auth-medium-layout')).toBeInTheDocument();
55
+ });
56
+
57
+ it('renders AuthLargeLayout at extra-large screen widths', () => {
58
+ renderAtWidth(1400);
59
+ expect(screen.getByTestId('auth-large-layout')).toBeInTheDocument();
60
+ });
61
+
62
+ it('renders without enterpriseBranding prop', () => {
63
+ renderAtWidth(1400);
64
+ expect(screen.getByTestId('auth-large-layout')).toBeInTheDocument();
65
+ });
66
+
67
+ it('renders with enterpriseBranding prop without errors', () => {
68
+ const enterpriseBranding = {
69
+ thirdPartyAuthContext: {
70
+ enterpriseBranding: { enterpriseName: 'Test Corp', enterpriseLogoUrl: 'https://example.com/logo.png' },
71
+ },
72
+ };
73
+ renderAtWidth(1400, { enterpriseBranding });
74
+ expect(screen.getByTestId('auth-large-layout')).toBeInTheDocument();
75
+ });
76
+ });
@@ -0,0 +1 @@
1
+ export { default as ProgressiveProfiling } from './ProgressiveProfiling';
@@ -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,62 @@
1
+ import { defineMessages } from '@edx/frontend-platform/i18n';
2
+
3
+ const messages = defineMessages({
4
+ 'progressive.profiling.page.title': {
5
+ id: 'progressive.profiling.page.title',
6
+ defaultMessage: 'Welcome | {siteName}',
7
+ description: 'progressive profiling page title',
8
+ },
9
+ 'progressive.profiling.page.heading': {
10
+ id: 'progressive.profiling.page.heading',
11
+ defaultMessage: 'A few questions for you will help us get smarter.',
12
+ description: 'The page heading for the progressive profiling page.',
13
+ },
14
+ 'optional.fields.information.link': {
15
+ id: 'optional.fields.information.link',
16
+ defaultMessage: 'Learn more about how we use this information.',
17
+ description: 'Optional fields page information link',
18
+ },
19
+ 'optional.fields.submit.button': {
20
+ id: 'optional.fields.submit.button',
21
+ defaultMessage: 'Submit',
22
+ description: 'Submit button text',
23
+ },
24
+ 'optional.fields.skip.button': {
25
+ id: 'optional.fields.skip.button',
26
+ defaultMessage: 'Skip for now',
27
+ description: 'Skip button text',
28
+ },
29
+ 'optional.fields.next.button': {
30
+ id: 'optional.fields.next.button',
31
+ defaultMessage: 'Next',
32
+ description: 'Next button text',
33
+ },
34
+ // modal dialog box
35
+ 'continue.to.platform': {
36
+ id: 'continue.to.platform',
37
+ defaultMessage: 'Continue to {platformName}',
38
+ description: 'Button text for modal when user chooses "skip for now" option',
39
+ },
40
+ 'modal.title': {
41
+ id: 'modal.title',
42
+ defaultMessage: 'Thanks for letting us know.',
43
+ description: 'Heading for welcome page modal',
44
+ },
45
+ 'modal.description': {
46
+ id: 'modal.description',
47
+ defaultMessage: 'You can complete your profile in settings at any time if you change your mind.',
48
+ description: 'Modal body text',
49
+ },
50
+ // error message
51
+ 'welcome.page.error.heading': {
52
+ id: 'welcome.page.error.heading',
53
+ defaultMessage: 'We couldn\'t update your profile',
54
+ description: 'Error message heading',
55
+ },
56
+ 'welcome.page.error.message': {
57
+ id: 'welcome.page.error.message',
58
+ defaultMessage: 'An error occurred. You can complete your profile in settings at any time.',
59
+ description: 'Error message body',
60
+ },
61
+ });
62
+ export default messages;
@@ -0,0 +1,24 @@
1
+ import { getConfig } from '@edx/frontend-platform';
2
+ import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
3
+
4
+ export default async function getThirdPartyAuthContext(urlParams) {
5
+ const requestConfig = {
6
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
7
+ params: urlParams,
8
+ isPublic: true,
9
+ };
10
+
11
+ const { data } = await getAuthenticatedHttpClient()
12
+ .get(
13
+ `${getConfig().LMS_BASE_URL}/api/mfe_context`,
14
+ requestConfig,
15
+ )
16
+ .catch((e) => {
17
+ throw (e);
18
+ });
19
+ return {
20
+ fieldDescriptions: data.registrationFields || {},
21
+ optionalFields: data.optionalFields || {},
22
+ thirdPartyAuthContext: data.contextData || {},
23
+ };
24
+ }