@codecademy/brand 0.17.2-alpha.1d365c33a1.0 → 0.17.2-alpha.295a7a5d08.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.
@@ -8,4 +8,5 @@ export type CompanyLinksProps = {
8
8
  referralRockUrls?: ReferralRockUrls;
9
9
  isBusinessUser?: boolean;
10
10
  };
11
+ export declare const STUDENT_BEANS_BASE_URL = "https://connect.studentbeans.com/v4/hosted/codecademy/";
11
12
  export declare const CompanyLinks: React.FC<CompanyLinksProps>;
@@ -7,6 +7,14 @@ import { FooterLinkItem, FooterLinkItems, FooterLinkItemWithAnchor } from '../Fo
7
7
  import { ReferAFriendLinkWithModal } from './ReferralRock/ReferAFriendLinkWithModal';
8
8
  import { SocialMediaLinks } from './SocialMediaLinks';
9
9
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
+ export const STUDENT_BEANS_BASE_URL = 'https://connect.studentbeans.com/v4/hosted/codecademy/';
11
+ const STUDENT_BEANS_GEOS = ['US', 'GB', 'CA'];
12
+ const getStudentBeansUrlByGeo = geo => {
13
+ if (geo === 'GB') {
14
+ return STUDENT_BEANS_BASE_URL + 'UK';
15
+ }
16
+ return STUDENT_BEANS_BASE_URL + geo;
17
+ };
10
18
  export const CompanyLinks = _ref => {
11
19
  let {
12
20
  hidePricing,
@@ -65,7 +73,18 @@ export const CompanyLinks = _ref => {
65
73
  }), referralRockUrls && userGeo === 'US' ? /*#__PURE__*/_jsx(ReferAFriendLinkWithModal, {
66
74
  referralRockUrls: referralRockUrls,
67
75
  onClick: onClick
68
- }) : null]
76
+ }) : null, userGeo && STUDENT_BEANS_GEOS.includes(userGeo) && /*#__PURE__*/_jsx(FooterLinkItem, {
77
+ children: /*#__PURE__*/_jsx(Anchor, {
78
+ href: getStudentBeansUrlByGeo(userGeo),
79
+ onClick: event => onClick({
80
+ event,
81
+ target: 'student-beans'
82
+ }),
83
+ target: "_blank",
84
+ variant: "interface",
85
+ children: "Student Beans"
86
+ })
87
+ })]
69
88
  })]
70
89
  });
71
90
  const company = /*#__PURE__*/_jsxs(_Fragment, {
@@ -102,16 +121,6 @@ export const CompanyLinks = _ref => {
102
121
  variant: "interface",
103
122
  children: "Affiliates"
104
123
  })
105
- }), /*#__PURE__*/_jsx(FooterLinkItem, {
106
- children: /*#__PURE__*/_jsx(Anchor, {
107
- href: "/pages/partnerships",
108
- onClick: event => onClick({
109
- event,
110
- target: 'partnerships'
111
- }),
112
- variant: "interface",
113
- children: "Partnerships"
114
- })
115
124
  }), /*#__PURE__*/_jsx(FooterLinkItem, {
116
125
  children: /*#__PURE__*/_jsx(SocialMediaLinks, {})
117
126
  })]
@@ -250,7 +250,6 @@ export interface AssessmentCodeSnippet {
250
250
  text: string;
251
251
  language: string;
252
252
  }
253
- export type TesterType = 'activeBatsTest' | 'batsTest' | 'codexSCT' | 'componentTest' | 'dartTest' | 'defaultFail' | 'defaultPass' | 'executeFileTest' | 'goTest' | 'junitTest' | 'junitMavenTest' | 'jestTest' | 'mochaTest' | 'passiveBatsTest' | 'phpunitTest' | 'pythonTest' | 'pythonUnitTest' | 'rScriptTest' | 'rspecTest' | 'webSCT';
254
253
  export interface ContentTestOptions {
255
254
  command?: string;
256
255
  failure_message?: string;
@@ -258,16 +257,6 @@ export interface ContentTestOptions {
258
257
  withBabel?: boolean;
259
258
  includeFiles?: string[];
260
259
  }
261
- export interface Test {
262
- /**
263
- * @property Some tests, like Checkpoints, have an id
264
- */
265
- id?: string;
266
- test_type: TesterType;
267
- test_code: string;
268
- test_options: ContentTestOptions;
269
- test_notes?: string;
270
- }
271
260
  export interface BaseAssessment {
272
261
  id: string;
273
262
  published: boolean;
@@ -280,7 +269,6 @@ export interface BaseAssessment {
280
269
  url: string;
281
270
  alt: string;
282
271
  } | null;
283
- test?: Test;
284
272
  sourceId: string;
285
273
  }
286
274
  export type AssessmentFillInTheCode = BaseAssessment & {
@@ -5,4 +5,5 @@ export default meta;
5
5
  type Story = StoryObj<typeof GlobalFooter>;
6
6
  export declare const Default: Story;
7
7
  export declare const HidePricing: Story;
8
+ export declare const StudentBeans: Story;
8
9
  export declare const ClickableMadeIn: Story;
@@ -17,6 +17,13 @@ export const HidePricing = {
17
17
  }),
18
18
  name: 'Hide Pricing'
19
19
  };
20
+ export const StudentBeans = {
21
+ render: args => /*#__PURE__*/_jsx(GlobalFooter, {
22
+ ...args,
23
+ userGeo: "US"
24
+ }),
25
+ name: 'Student Beans'
26
+ };
20
27
  export const ClickableMadeIn = {
21
28
  render: args => /*#__PURE__*/_jsx(GlobalFooter, {
22
29
  ...args,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "0.17.2-alpha.1d365c33a1.0",
4
+ "version": "0.17.2-alpha.295a7a5d08.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "1.2.1",