@codecademy/brand 2.0.0-alpha.044ff6f33e.0 → 2.0.0-alpha.07623bd864.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/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +2 -3
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +0 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +2 -4
- package/dist/AppHeader/index.js +2 -5
- package/dist/AppHeader/shared/utils.d.ts +0 -1
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +5 -7
- package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js +6 -9
- package/dist/GlobalFooter/index.d.ts +0 -1
- package/dist/GlobalFooter/index.js +17 -25
- package/dist/GlobalHeader/GlobalHeaderVariants.d.ts +14 -14
- package/dist/GlobalHeader/GlobalHeaderVariants.js +33 -33
- package/dist/GlobalHeader/index.js +41 -49
- package/dist/GlobalHeader/types.d.ts +0 -1
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.d.ts +8 -0
- package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js +55 -0
- package/dist/LearningOutcomeAssessmentScores/index.d.ts +8 -0
- package/dist/LearningOutcomeAssessmentScores/index.js +24 -0
- package/dist/LearningOutcomeCard/index.d.ts +14 -11
- package/dist/LearningOutcomeCard/index.js +179 -126
- package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.d.ts +6 -0
- package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.js +23 -0
- package/dist/LearningOutcomeFlyout/index.d.ts +35 -0
- package/dist/LearningOutcomeFlyout/index.js +166 -0
- package/dist/LearningOutcomeTile/index.d.ts +2 -1
- package/dist/LearningOutcomeTile/index.js +2 -4
- package/dist/LearningOutcomeTile/types.d.ts +0 -1
- package/dist/PlanCardTeams/consts.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lib/resourcesList/index.d.ts +1 -1
- package/dist/lib/resourcesList/index.js +2 -11
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.d.ts +6 -0
- package/dist/stories/Molecules/LearningOutcomeAssessmentScores.stories.js +23 -0
- package/dist/stories/Molecules/LearningOutcomeCard.stories.d.ts +7 -1
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +169 -39
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.d.ts +5 -0
- package/dist/stories/Molecules/LearningOutcomeFlyout.stories.js +43 -0
- package/package.json +1 -1
|
@@ -2,15 +2,13 @@ import _styled from "@emotion/styled/base";
|
|
|
2
2
|
import { ContentContainer } from '@codecademy/gamut';
|
|
3
3
|
import { themed } from '@codecademy/gamut-styles';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { useContext } from 'react';
|
|
6
|
-
import { LiveLearningHubContext } from '../GlobalHeader';
|
|
7
5
|
import { FooterLegal } from './FooterLegal';
|
|
8
6
|
import { FooterNavLinks } from './FooterNavLinks';
|
|
9
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
8
|
const FooterContainer = /*#__PURE__*/_styled("footer", {
|
|
11
9
|
target: "e1xir4o10",
|
|
12
10
|
label: "FooterContainer"
|
|
13
|
-
})("border-top:1px solid ", themed('colors.secondary'), ";@media print{display:none;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
11
|
+
})("border-top:1px solid ", themed('colors.secondary'), ";@media print{display:none;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9HbG9iYWxGb290ZXIvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlDcUMiLCJmaWxlIjoiLi4vLi4vc3JjL0dsb2JhbEZvb3Rlci9pbmRleC50c3giL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biAgICAgICAgLz5cbiAgICAgICAgPEZvb3RlckxlZ2FsIG9uQ2xpY2s9e29uQ2xpY2t9IG9uTWFkZUluQ2xpY2s9e29uTWFkZUluQ2xpY2t9IC8+XG4gICAgICA8L0NvbnRlbnRDb250YWluZXI+XG4gICAgPC9Gb290ZXJDb250YWluZXI+XG4gICk7XG59O1xuIl19 */"));
|
|
14
12
|
export const GlobalFooter = ({
|
|
15
13
|
className,
|
|
16
14
|
hidePricing,
|
|
@@ -19,29 +17,23 @@ export const GlobalFooter = ({
|
|
|
19
17
|
userGeo,
|
|
20
18
|
referralRockUrls,
|
|
21
19
|
isBusinessUser,
|
|
22
|
-
isLoggedIn
|
|
23
|
-
isLiveLearningHubEnabled
|
|
20
|
+
isLoggedIn
|
|
24
21
|
}) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}), /*#__PURE__*/_jsx(FooterLegal, {
|
|
41
|
-
onClick: onClick,
|
|
42
|
-
onMadeInClick: onMadeInClick
|
|
43
|
-
})]
|
|
44
|
-
})
|
|
22
|
+
return /*#__PURE__*/_jsx(FooterContainer, {
|
|
23
|
+
className: className,
|
|
24
|
+
role: "contentinfo",
|
|
25
|
+
children: /*#__PURE__*/_jsxs(ContentContainer, {
|
|
26
|
+
children: [/*#__PURE__*/_jsx(FooterNavLinks, {
|
|
27
|
+
hidePricing: hidePricing,
|
|
28
|
+
onClick: onClick,
|
|
29
|
+
userGeo: userGeo,
|
|
30
|
+
referralRockUrls: referralRockUrls,
|
|
31
|
+
isBusinessUser: isBusinessUser,
|
|
32
|
+
isLoggedIn: isLoggedIn
|
|
33
|
+
}), /*#__PURE__*/_jsx(FooterLegal, {
|
|
34
|
+
onClick: onClick,
|
|
35
|
+
onMadeInClick: onMadeInClick
|
|
36
|
+
})]
|
|
45
37
|
})
|
|
46
38
|
});
|
|
47
39
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { AppHeaderItem, FormattedAppHeaderItems, FormattedMobileAppHeaderItems } from '../AppHeader/shared';
|
|
2
2
|
import { GlobalHeaderProps } from '.';
|
|
3
3
|
import { User } from './types';
|
|
4
|
-
export declare const anonDefaultHeaderItems: (hidePricing?: boolean, user?: User
|
|
5
|
-
export declare const anonDefaultMobileHeaderItems: (hidePricing?: boolean, user?: User
|
|
6
|
-
export declare const anonLandingHeaderItems: (hidePricing?: boolean, user?: User
|
|
7
|
-
export declare const anonLandingMobileHeaderItems: (hidePricing?: boolean, user?: User
|
|
8
|
-
export declare const anonLoginHeaderItems: (hidePricing?: boolean, user?: User
|
|
9
|
-
export declare const anonLoginMobileHeaderItems: (hidePricing?: boolean, user?: User
|
|
10
|
-
export declare const anonSignupHeaderItems: (hidePricing?: boolean, user?: User
|
|
11
|
-
export declare const anonSignupMobileHeaderItems: (hidePricing?: boolean, user?: User
|
|
12
|
-
export declare const freeHeaderItems: (user: User, hidePricing?: boolean
|
|
13
|
-
export declare const freeMobileHeaderItems: (user: User, hidePricing?: boolean
|
|
4
|
+
export declare const anonDefaultHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
5
|
+
export declare const anonDefaultMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
6
|
+
export declare const anonLandingHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
7
|
+
export declare const anonLandingMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
8
|
+
export declare const anonLoginHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
9
|
+
export declare const anonLoginMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
10
|
+
export declare const anonSignupHeaderItems: (hidePricing?: boolean, user?: User) => FormattedAppHeaderItems;
|
|
11
|
+
export declare const anonSignupMobileHeaderItems: (hidePricing?: boolean, user?: User) => FormattedMobileAppHeaderItems;
|
|
12
|
+
export declare const freeHeaderItems: (user: User, hidePricing?: boolean) => FormattedAppHeaderItems;
|
|
13
|
+
export declare const freeMobileHeaderItems: (user: User, hidePricing?: boolean) => FormattedMobileAppHeaderItems;
|
|
14
14
|
export declare const enterpriseHeaderItems: (user: User, props: GlobalHeaderProps) => {
|
|
15
15
|
left: AppHeaderItem[];
|
|
16
16
|
right: never[];
|
|
17
17
|
};
|
|
18
|
-
export declare const proHeaderItems: (user: User
|
|
19
|
-
export declare const teamsHeaderItems: (user: User
|
|
18
|
+
export declare const proHeaderItems: (user: User) => FormattedAppHeaderItems;
|
|
19
|
+
export declare const teamsHeaderItems: (user: User) => FormattedAppHeaderItems;
|
|
20
20
|
export declare const enterpriseMobileHeaderItems: (user: User, props: GlobalHeaderProps) => FormattedMobileAppHeaderItems;
|
|
21
|
-
export declare const proMobileHeaderItems: (user: User
|
|
22
|
-
export declare const teamsMobileHeaderItems: (user: User
|
|
21
|
+
export declare const proMobileHeaderItems: (user: User) => FormattedMobileAppHeaderItems;
|
|
22
|
+
export declare const teamsMobileHeaderItems: (user: User) => FormattedMobileAppHeaderItems;
|
|
23
23
|
export declare const loadingHeaderItems: FormattedAppHeaderItems;
|
|
24
24
|
export declare const loadingMobileHeaderItems: FormattedMobileAppHeaderItems;
|
|
25
25
|
export declare const simpleHeaderItems: FormattedAppHeaderItems;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addPayment, bootcampCta, businessSolutions,
|
|
1
|
+
import { addPayment, bootcampCta, businessSolutions, catalogDropdown, communityDropdown, enterpriseLogo, freeProfile, liveLearningHub, loading, login, logo, myHome, myPercipioHome, pricingDropdown, proProfile, resourcesDropdown, signUp, simpleResourcesDropdown, tryProForFree, unpausePro, upgradePlan, upgradeToPro } from './GlobalHeaderItems';
|
|
2
2
|
const transformSimpleResourcesDropdownlabels = resourcesLabel => ({
|
|
3
3
|
...simpleResourcesDropdown,
|
|
4
4
|
text: resourcesLabel?.title || simpleResourcesDropdown.text,
|
|
@@ -7,12 +7,12 @@ const transformSimpleResourcesDropdownlabels = resourcesLabel => ({
|
|
|
7
7
|
text: resourcesLabel?.[item.id] || item.text
|
|
8
8
|
}))
|
|
9
9
|
});
|
|
10
|
-
const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user
|
|
10
|
+
const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
|
|
11
11
|
const specialLogo = {
|
|
12
12
|
...logo,
|
|
13
13
|
checkMini: true
|
|
14
14
|
};
|
|
15
|
-
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
15
|
+
const leftItems = [specialLogo, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
16
16
|
const rightItems = [];
|
|
17
17
|
if (renderLogin) {
|
|
18
18
|
rightItems.push(login);
|
|
@@ -25,7 +25,7 @@ const anonHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isLiveLea
|
|
|
25
25
|
right: rightItems
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user
|
|
28
|
+
const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user) => {
|
|
29
29
|
const specialLogo = {
|
|
30
30
|
...logo,
|
|
31
31
|
checkMini: true
|
|
@@ -38,43 +38,43 @@ const anonMobileHeaderItems = (renderLogin, renderSignUp, hidePricing, user, isL
|
|
|
38
38
|
if (renderSignUp) {
|
|
39
39
|
rightItems.push(signUp);
|
|
40
40
|
}
|
|
41
|
-
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
41
|
+
const mainMenuItems = [catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
42
42
|
return {
|
|
43
43
|
left: leftItems,
|
|
44
44
|
right: rightItems,
|
|
45
45
|
mainMenu: mainMenuItems
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
export const anonDefaultHeaderItems = (hidePricing, user
|
|
49
|
-
return anonHeaderItems(true, true, hidePricing, user
|
|
48
|
+
export const anonDefaultHeaderItems = (hidePricing, user) => {
|
|
49
|
+
return anonHeaderItems(true, true, hidePricing, user);
|
|
50
50
|
};
|
|
51
|
-
export const anonDefaultMobileHeaderItems = (hidePricing, user
|
|
52
|
-
return anonMobileHeaderItems(true, true, hidePricing, user
|
|
51
|
+
export const anonDefaultMobileHeaderItems = (hidePricing, user) => {
|
|
52
|
+
return anonMobileHeaderItems(true, true, hidePricing, user);
|
|
53
53
|
};
|
|
54
|
-
export const anonLandingHeaderItems = (hidePricing, user
|
|
55
|
-
return anonHeaderItems(true, false, hidePricing, user
|
|
54
|
+
export const anonLandingHeaderItems = (hidePricing, user) => {
|
|
55
|
+
return anonHeaderItems(true, false, hidePricing, user);
|
|
56
56
|
};
|
|
57
|
-
export const anonLandingMobileHeaderItems = (hidePricing, user
|
|
58
|
-
return anonMobileHeaderItems(true, false, hidePricing, user
|
|
57
|
+
export const anonLandingMobileHeaderItems = (hidePricing, user) => {
|
|
58
|
+
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
59
59
|
};
|
|
60
|
-
export const anonLoginHeaderItems = (hidePricing, user
|
|
61
|
-
return anonHeaderItems(false, true, hidePricing, user
|
|
60
|
+
export const anonLoginHeaderItems = (hidePricing, user) => {
|
|
61
|
+
return anonHeaderItems(false, true, hidePricing, user);
|
|
62
62
|
};
|
|
63
|
-
export const anonLoginMobileHeaderItems = (hidePricing, user
|
|
64
|
-
return anonMobileHeaderItems(false, true, hidePricing, user
|
|
63
|
+
export const anonLoginMobileHeaderItems = (hidePricing, user) => {
|
|
64
|
+
return anonMobileHeaderItems(false, true, hidePricing, user);
|
|
65
65
|
};
|
|
66
|
-
export const anonSignupHeaderItems = (hidePricing, user
|
|
67
|
-
return anonHeaderItems(true, false, hidePricing, user
|
|
66
|
+
export const anonSignupHeaderItems = (hidePricing, user) => {
|
|
67
|
+
return anonHeaderItems(true, false, hidePricing, user);
|
|
68
68
|
};
|
|
69
|
-
export const anonSignupMobileHeaderItems = (hidePricing, user
|
|
70
|
-
return anonMobileHeaderItems(true, false, hidePricing, user
|
|
69
|
+
export const anonSignupMobileHeaderItems = (hidePricing, user) => {
|
|
70
|
+
return anonMobileHeaderItems(true, false, hidePricing, user);
|
|
71
71
|
};
|
|
72
|
-
export const freeHeaderItems = (user, hidePricing
|
|
72
|
+
export const freeHeaderItems = (user, hidePricing) => {
|
|
73
73
|
const specialLogo = {
|
|
74
74
|
...logo,
|
|
75
75
|
checkMini: true
|
|
76
76
|
};
|
|
77
|
-
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
77
|
+
const leftItems = [specialLogo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions];
|
|
78
78
|
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
79
79
|
const rightItems = [];
|
|
80
80
|
rightItems.push(freeProfile(user));
|
|
@@ -84,7 +84,7 @@ export const freeHeaderItems = (user, hidePricing, isLiveLearningHubEnabled) =>
|
|
|
84
84
|
right: rightItems
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
export const freeMobileHeaderItems = (user, hidePricing
|
|
87
|
+
export const freeMobileHeaderItems = (user, hidePricing) => {
|
|
88
88
|
const specialLogo = {
|
|
89
89
|
...logo,
|
|
90
90
|
checkMini: true
|
|
@@ -92,7 +92,7 @@ export const freeMobileHeaderItems = (user, hidePricing, isLiveLearningHubEnable
|
|
|
92
92
|
const leftItems = [specialLogo];
|
|
93
93
|
const rightItems = [];
|
|
94
94
|
const upgradeButton = upgradeToPro(user.proCheckoutUrl);
|
|
95
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]),
|
|
95
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(hidePricing ? [] : [pricingDropdown]), liveLearningHub, businessSolutions, freeProfile(user, true), user.showProUpgrade ? upgradeButton : tryProForFree(user.proCheckoutUrl)];
|
|
96
96
|
return {
|
|
97
97
|
left: leftItems,
|
|
98
98
|
right: rightItems,
|
|
@@ -112,8 +112,8 @@ export const enterpriseHeaderItems = (user, props) => {
|
|
|
112
112
|
right: []
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
export const proHeaderItems =
|
|
116
|
-
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []),
|
|
115
|
+
export const proHeaderItems = user => {
|
|
116
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), liveLearningHub, businessSolutions];
|
|
117
117
|
const rightItems = [];
|
|
118
118
|
rightItems.push(proProfile(user));
|
|
119
119
|
if (user.isPaused) {
|
|
@@ -124,8 +124,8 @@ export const proHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
|
124
124
|
right: rightItems
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
export const teamsHeaderItems =
|
|
128
|
-
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(),
|
|
127
|
+
export const teamsHeaderItems = user => {
|
|
128
|
+
const leftItems = [logo, myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub];
|
|
129
129
|
const rightItems = [];
|
|
130
130
|
if (user.isAccountManager && user.inBusinessTrial && !user.hasBusinessSubscription) {
|
|
131
131
|
rightItems.push(addPayment);
|
|
@@ -152,10 +152,10 @@ export const enterpriseMobileHeaderItems = (user, props) => {
|
|
|
152
152
|
mainMenu: mainMenuItems
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
-
export const proMobileHeaderItems =
|
|
155
|
+
export const proMobileHeaderItems = user => {
|
|
156
156
|
const leftItems = [logo];
|
|
157
157
|
const rightItems = [];
|
|
158
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []),
|
|
158
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), ...(user.isPlusUser ? [upgradePlan] : []), liveLearningHub, businessSolutions, proProfile(user)];
|
|
159
159
|
if (user.isPaused) {
|
|
160
160
|
mainMenuItems.push(unpausePro);
|
|
161
161
|
}
|
|
@@ -165,10 +165,10 @@ export const proMobileHeaderItems = (user, isLiveLearningHubEnabled) => {
|
|
|
165
165
|
mainMenu: mainMenuItems
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
|
-
export const teamsMobileHeaderItems =
|
|
168
|
+
export const teamsMobileHeaderItems = user => {
|
|
169
169
|
const leftItems = [logo];
|
|
170
170
|
const rightItems = [];
|
|
171
|
-
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(),
|
|
171
|
+
const mainMenuItems = [myHome, catalogDropdown(user?.hideCareerPaths), resourcesDropdown(), communityDropdown(), liveLearningHub, proProfile(user)];
|
|
172
172
|
if (user.isAccountManager && user.inBusinessTrial && !user.hasBusinessSubscription) {
|
|
173
173
|
mainMenuItems.push(addPayment);
|
|
174
174
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Box } from '@codecademy/gamut';
|
|
2
2
|
import { useTheme } from '@emotion/react';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { useCallback
|
|
4
|
+
import { useCallback } from 'react';
|
|
5
5
|
import { AppHeader, AppHeaderMobile, isAppHeaderItemWithHref } from '..';
|
|
6
6
|
import { anonDefaultHeaderItems, anonDefaultMobileHeaderItems, anonLandingHeaderItems, anonLandingMobileHeaderItems, anonLoginHeaderItems, anonLoginMobileHeaderItems, anonSignupHeaderItems, anonSignupMobileHeaderItems, enterpriseHeaderItems, enterpriseMobileHeaderItems, freeHeaderItems, freeMobileHeaderItems, loadingHeaderItems, loadingMobileHeaderItems, proHeaderItems, proMobileHeaderItems, simpleBootcampHeaderItems, simpleBootcampMobileHeaderItems, simpleHeaderItems, simpleMobileHeaderItems, teamsHeaderItems, teamsMobileHeaderItems } from './GlobalHeaderVariants';
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -16,29 +16,28 @@ export const HeaderQuizContext = /*#__PURE__*/React.createContext({
|
|
|
16
16
|
|
|
17
17
|
function getAppHeaderItems(props, mobile) {
|
|
18
18
|
const {
|
|
19
|
-
hidePricing
|
|
20
|
-
isLiveLearningHubEnabled
|
|
19
|
+
hidePricing
|
|
21
20
|
} = props;
|
|
22
21
|
switch (props.type) {
|
|
23
22
|
case 'anon':
|
|
24
23
|
switch (props.variant) {
|
|
25
24
|
case 'landing':
|
|
26
|
-
return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user
|
|
25
|
+
return mobile ? anonLandingMobileHeaderItems(hidePricing, props.user) : anonLandingHeaderItems(hidePricing, props.user);
|
|
27
26
|
case 'login':
|
|
28
|
-
return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user
|
|
27
|
+
return mobile ? anonLoginMobileHeaderItems(hidePricing, props.user) : anonLoginHeaderItems(hidePricing, props.user);
|
|
29
28
|
case 'signup':
|
|
30
|
-
return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user
|
|
29
|
+
return mobile ? anonSignupMobileHeaderItems(hidePricing, props.user) : anonSignupHeaderItems(hidePricing, props.user);
|
|
31
30
|
default:
|
|
32
|
-
return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user
|
|
31
|
+
return mobile ? anonDefaultMobileHeaderItems(hidePricing, props.user) : anonDefaultHeaderItems(hidePricing, props.user);
|
|
33
32
|
}
|
|
34
33
|
case 'enterprise':
|
|
35
34
|
return mobile ? enterpriseMobileHeaderItems(props.user, props) : enterpriseHeaderItems(props.user, props);
|
|
36
35
|
case 'free':
|
|
37
|
-
return mobile ? freeMobileHeaderItems(props.user, hidePricing
|
|
36
|
+
return mobile ? freeMobileHeaderItems(props.user, hidePricing) : freeHeaderItems(props.user, hidePricing);
|
|
38
37
|
case 'pro':
|
|
39
|
-
return mobile ? proMobileHeaderItems(props.user
|
|
38
|
+
return mobile ? proMobileHeaderItems(props.user) : proHeaderItems(props.user);
|
|
40
39
|
case 'teams':
|
|
41
|
-
return mobile ? teamsMobileHeaderItems(props.user
|
|
40
|
+
return mobile ? teamsMobileHeaderItems(props.user) : teamsHeaderItems(props.user);
|
|
42
41
|
case 'simple':
|
|
43
42
|
return mobile ? simpleMobileHeaderItems : simpleHeaderItems;
|
|
44
43
|
case 'bootcamp':
|
|
@@ -53,10 +52,6 @@ export const GlobalHeader = props => {
|
|
|
53
52
|
onLinkAction
|
|
54
53
|
} = props;
|
|
55
54
|
const theme = useTheme();
|
|
56
|
-
|
|
57
|
-
// Use context to get the live learning hub value, fallback to props for backward compatibility
|
|
58
|
-
const contextValue = useContext(LiveLearningHubContext);
|
|
59
|
-
const isLiveLearningHubEnabled = contextValue || !!props.isLiveLearningHubEnabled;
|
|
60
55
|
const combinedAction = useCallback((event, item) => {
|
|
61
56
|
action(event, item);
|
|
62
57
|
if (isAppHeaderItemWithHref(item)) onLinkAction?.(event, item);
|
|
@@ -69,41 +64,38 @@ export const GlobalHeader = props => {
|
|
|
69
64
|
showOnboardingQuiz,
|
|
70
65
|
showSortingQuiz
|
|
71
66
|
},
|
|
72
|
-
children: /*#__PURE__*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
|
|
105
|
-
}), props.children]
|
|
106
|
-
})
|
|
67
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
68
|
+
as: "header",
|
|
69
|
+
position: "sticky",
|
|
70
|
+
top: 0,
|
|
71
|
+
zIndex: theme.elements.headerZ,
|
|
72
|
+
children: [/*#__PURE__*/_jsx(AppHeader, {
|
|
73
|
+
action: combinedAction,
|
|
74
|
+
items: getAppHeaderItems(props, false),
|
|
75
|
+
search: props.search,
|
|
76
|
+
...(props.type === 'anon' ? {
|
|
77
|
+
redirectParam: props.redirectParam
|
|
78
|
+
} : hideNotification ? {} : {
|
|
79
|
+
notifications: props.notifications
|
|
80
|
+
}),
|
|
81
|
+
hideRightButtonDefaults: hideNotification,
|
|
82
|
+
isAnon: props.type === 'anon',
|
|
83
|
+
isTeams: props.type === 'teams',
|
|
84
|
+
type: hideNotification ? 'enterprise' : 'standard'
|
|
85
|
+
}), /*#__PURE__*/_jsx(AppHeaderMobile, {
|
|
86
|
+
action: combinedAction,
|
|
87
|
+
items: getAppHeaderItems(props, true),
|
|
88
|
+
...(props.type === 'anon' || hideNotification ? {} : {
|
|
89
|
+
notifications: props.notifications
|
|
90
|
+
}),
|
|
91
|
+
search: props.search,
|
|
92
|
+
redirectParam: props.type === 'anon' ? props.redirectParam : undefined,
|
|
93
|
+
isEnterprise: props.type === 'enterprise',
|
|
94
|
+
isAnon: props.type === 'anon',
|
|
95
|
+
isSimple: props.type === 'simple',
|
|
96
|
+
hideRightMenuButton: props.type === 'simple' || props.type === 'loading',
|
|
97
|
+
navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
|
|
98
|
+
}), props.children]
|
|
107
99
|
})
|
|
108
100
|
});
|
|
109
101
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Box, FlexBox, Text } from '@codecademy/gamut';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
export const AssessmentDetail = ({
|
|
5
|
+
isHighestScore,
|
|
6
|
+
score,
|
|
7
|
+
scoreAchievedAt
|
|
8
|
+
}) => {
|
|
9
|
+
const hasPassedAssessment = score && score >= 70;
|
|
10
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
11
|
+
borderColor: "background-hover",
|
|
12
|
+
borderRight: isHighestScore ? 1 : 'none',
|
|
13
|
+
width: "100%",
|
|
14
|
+
p: 16,
|
|
15
|
+
column: true,
|
|
16
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
17
|
+
fontWeight: 700,
|
|
18
|
+
children: isHighestScore ? 'Highest score' : 'Most recent'
|
|
19
|
+
}), score != null ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
20
|
+
children: [/*#__PURE__*/_jsxs(FlexBox, {
|
|
21
|
+
mt: 8,
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
24
|
+
variant: "title-sm",
|
|
25
|
+
"data-testid": "score-percent",
|
|
26
|
+
mr: 4,
|
|
27
|
+
color: hasPassedAssessment ? 'green-700' : undefined,
|
|
28
|
+
children: `${score}%`
|
|
29
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
30
|
+
children: !hasPassedAssessment && /*#__PURE__*/_jsx(Box, {
|
|
31
|
+
"data-testid": "failed-assessment-indicator",
|
|
32
|
+
borderRadius: "full",
|
|
33
|
+
dimensions: 16,
|
|
34
|
+
bg: "orange-500",
|
|
35
|
+
mb: 4
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
}), !!scoreAchievedAt && /*#__PURE__*/_jsx(Text, {
|
|
39
|
+
textColor: "text-secondary",
|
|
40
|
+
children: scoreAchievedAt
|
|
41
|
+
})]
|
|
42
|
+
}) : /*#__PURE__*/_jsxs(FlexBox, {
|
|
43
|
+
column: true,
|
|
44
|
+
color: "text-secondary",
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
46
|
+
fontWeight: 700,
|
|
47
|
+
my: 4,
|
|
48
|
+
"aria-hidden": true,
|
|
49
|
+
children: "-"
|
|
50
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
51
|
+
children: "Not tested yet"
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface AssessmentScoresProps {
|
|
2
|
+
highestScore: number | null | undefined;
|
|
3
|
+
highestScoreAchievedAt: string | null | undefined;
|
|
4
|
+
latestScore: number | null | undefined;
|
|
5
|
+
latestScoreAchievedAt: string | null | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const LearningOutcomeAssessmentScores: React.FC<AssessmentScoresProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FlexBox } from '@codecademy/gamut';
|
|
2
|
+
import { AssessmentDetail } from './AssessmentDetail';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export const LearningOutcomeAssessmentScores = ({
|
|
5
|
+
highestScore,
|
|
6
|
+
highestScoreAchievedAt,
|
|
7
|
+
latestScore,
|
|
8
|
+
latestScoreAchievedAt
|
|
9
|
+
}) => {
|
|
10
|
+
return /*#__PURE__*/_jsxs(FlexBox, {
|
|
11
|
+
borderColor: "background-hover",
|
|
12
|
+
border: 1,
|
|
13
|
+
borderRadius: "md",
|
|
14
|
+
width: "100%",
|
|
15
|
+
children: [/*#__PURE__*/_jsx(AssessmentDetail, {
|
|
16
|
+
isHighestScore: true,
|
|
17
|
+
score: highestScore,
|
|
18
|
+
scoreAchievedAt: highestScoreAchievedAt
|
|
19
|
+
}), /*#__PURE__*/_jsx(AssessmentDetail, {
|
|
20
|
+
score: latestScore,
|
|
21
|
+
scoreAchievedAt: latestScoreAchievedAt
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { HeadingTags } from '@codecademy/gamut';
|
|
2
|
-
|
|
3
|
-
One = 1,
|
|
4
|
-
Two = 2,
|
|
5
|
-
Three = 3
|
|
6
|
-
}
|
|
7
|
-
export declare const levelTagText: {
|
|
8
|
-
1: string;
|
|
9
|
-
2: string;
|
|
10
|
-
3: string;
|
|
11
|
-
};
|
|
2
|
+
import { LearningOutcomeLevels } from '../LearningOutcomeBadges';
|
|
12
3
|
interface LearningOutcomeSkill {
|
|
13
4
|
title?: string | null | undefined;
|
|
14
5
|
}
|
|
15
6
|
interface LearningOutcomeCardProps {
|
|
16
7
|
level: LearningOutcomeLevels | null | undefined;
|
|
17
8
|
outcome: string;
|
|
9
|
+
as?: 'li';
|
|
18
10
|
headingLevel?: HeadingTags;
|
|
19
|
-
|
|
11
|
+
isInteractive?: boolean;
|
|
12
|
+
mode?: 'emphasized' | 'base';
|
|
20
13
|
progress?: number;
|
|
21
14
|
skills?: LearningOutcomeSkill[] | null;
|
|
15
|
+
/**
|
|
16
|
+
* Optional prop for progress updates, used to animate the radial progress from a previous value to the current value.
|
|
17
|
+
* Need to provide previousProgress and progressDuraion to animate the radial progress.
|
|
18
|
+
* If progress is 100, completionDelay needs to be provided instead of progressDuration to delay the display of the completion icon.
|
|
19
|
+
*/
|
|
20
|
+
progressUpdateData?: {
|
|
21
|
+
previousProgress: number;
|
|
22
|
+
progressDuration?: number;
|
|
23
|
+
completionDelay?: number;
|
|
24
|
+
};
|
|
22
25
|
}
|
|
23
26
|
export declare const LearningOutcomeCard: React.FC<LearningOutcomeCardProps>;
|
|
24
27
|
export {};
|