@edx/frontend-app-subscription-learner-dashboard 1.17.0 → 1.19.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 (86) hide show
  1. package/dist/containers/CoursesPanel/index.js +2 -1
  2. package/dist/containers/CoursesPanel/index.js.map +1 -1
  3. package/dist/containers/CoursesPanel/index.scss +3 -3
  4. package/dist/containers/Dashboard/DashboardHeader.d.ts +3 -0
  5. package/dist/containers/Dashboard/DashboardHeader.js +10 -0
  6. package/dist/containers/Dashboard/DashboardHeader.js.map +1 -0
  7. package/dist/containers/Dashboard/index.js +8 -4
  8. package/dist/containers/Dashboard/index.js.map +1 -1
  9. package/dist/containers/Dashboard/index.scss +12 -1
  10. package/dist/containers/Dashboard/messages.d.ts +10 -0
  11. package/dist/containers/Dashboard/messages.js +10 -0
  12. package/dist/containers/Dashboard/messages.js.map +1 -1
  13. package/dist/containers/PopularCoursePanel/NoPopularCourseItems/index.d.ts +3 -0
  14. package/dist/containers/PopularCoursePanel/NoPopularCourseItems/index.js +9 -0
  15. package/dist/containers/PopularCoursePanel/NoPopularCourseItems/index.js.map +1 -0
  16. package/dist/containers/{RecentlyViewedPanel/NoRecentlyViewedItems → PopularCoursePanel/NoPopularCourseItems}/messages.d.ts +1 -1
  17. package/dist/containers/PopularCoursePanel/NoPopularCourseItems/messages.js +10 -0
  18. package/dist/containers/PopularCoursePanel/NoPopularCourseItems/messages.js.map +1 -0
  19. package/dist/containers/PopularCoursePanel/PopularCourses/index.d.ts +4 -0
  20. package/dist/containers/{RecentlyViewedPanel/RecentlyViewedCourseProgram → PopularCoursePanel/PopularCourses}/index.js +3 -3
  21. package/dist/containers/PopularCoursePanel/PopularCourses/index.js.map +1 -0
  22. package/dist/containers/PopularCoursePanel/index.d.ts +3 -0
  23. package/dist/containers/PopularCoursePanel/index.js +21 -0
  24. package/dist/containers/PopularCoursePanel/index.js.map +1 -0
  25. package/dist/containers/{RecentlyViewedPanel → PopularCoursePanel}/messages.d.ts +2 -2
  26. package/dist/containers/PopularCoursePanel/messages.js +15 -0
  27. package/dist/containers/PopularCoursePanel/messages.js.map +1 -0
  28. package/dist/containers/ProductCard/index.d.ts +1 -1
  29. package/dist/containers/ProductCard/index.js +7 -6
  30. package/dist/containers/ProductCard/index.js.map +1 -1
  31. package/dist/containers/ProductCard/index.scss +17 -6
  32. package/dist/containers/ProductCard/messages.d.ts +13 -0
  33. package/dist/containers/ProductCard/messages.js +15 -0
  34. package/dist/containers/ProductCard/messages.js.map +1 -0
  35. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/CreditFaqBanner/index.d.ts +3 -0
  36. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/CreditFaqBanner/index.js +10 -0
  37. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/CreditFaqBanner/index.js.map +1 -0
  38. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/CreditFaqBanner/index.scss +14 -0
  39. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/index.d.ts +2 -0
  40. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/index.js +24 -0
  41. package/dist/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/index.js.map +1 -0
  42. package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressTabs/index.js +2 -1
  43. package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressTabs/index.js.map +1 -1
  44. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.js +4 -4
  45. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.js.map +1 -1
  46. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCard/index.scss +13 -1
  47. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.js +6 -2
  48. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/ProgressCardButton.js.map +1 -1
  49. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/index.js +1 -1
  50. package/dist/containers/ProgramDashboard/ProgramProgress/ProgressCardActions/index.js.map +1 -1
  51. package/dist/containers/ProgramDashboard/ProgramProgress/index.scss +4 -0
  52. package/dist/containers/ProgramDashboard/ProgramProgress/messages.d.ts +30 -0
  53. package/dist/containers/ProgramDashboard/ProgramProgress/messages.js +30 -0
  54. package/dist/containers/ProgramDashboard/ProgramProgress/messages.js.map +1 -1
  55. package/dist/containers/SubscriptionBanner/components/SubscriptionBanner.js +24 -15
  56. package/dist/containers/SubscriptionBanner/components/SubscriptionBanner.js.map +1 -1
  57. package/dist/containers/SubscriptionBanner/messages.d.ts +15 -0
  58. package/dist/containers/SubscriptionBanner/messages.js +19 -4
  59. package/dist/containers/SubscriptionBanner/messages.js.map +1 -1
  60. package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.d.ts +1 -0
  61. package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.js +7 -7
  62. package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.js.map +1 -1
  63. package/dist/containers/SubscriptionInformation/index.scss +19 -0
  64. package/dist/containers/SubscriptionInformation/messages.d.ts +5 -0
  65. package/dist/containers/SubscriptionInformation/messages.js +6 -1
  66. package/dist/containers/SubscriptionInformation/messages.js.map +1 -1
  67. package/dist/data/constants/app.d.ts +1 -0
  68. package/dist/data/constants/app.js +1 -0
  69. package/dist/data/constants/app.js.map +1 -1
  70. package/dist/hooks/{useRecentlyViewedCoursesAndProgramsData.d.ts → usePopularCourses.d.ts} +1 -1
  71. package/dist/hooks/{useRecentlyViewedCoursesAndProgramsData.js → usePopularCourses.js} +7 -4
  72. package/dist/hooks/usePopularCourses.js.map +1 -0
  73. package/package.json +1 -1
  74. package/dist/containers/RecentlyViewedPanel/NoRecentlyViewedItems/index.d.ts +0 -3
  75. package/dist/containers/RecentlyViewedPanel/NoRecentlyViewedItems/index.js +0 -9
  76. package/dist/containers/RecentlyViewedPanel/NoRecentlyViewedItems/index.js.map +0 -1
  77. package/dist/containers/RecentlyViewedPanel/NoRecentlyViewedItems/messages.js +0 -10
  78. package/dist/containers/RecentlyViewedPanel/NoRecentlyViewedItems/messages.js.map +0 -1
  79. package/dist/containers/RecentlyViewedPanel/RecentlyViewedCourseProgram/index.d.ts +0 -4
  80. package/dist/containers/RecentlyViewedPanel/RecentlyViewedCourseProgram/index.js.map +0 -1
  81. package/dist/containers/RecentlyViewedPanel/index.d.ts +0 -3
  82. package/dist/containers/RecentlyViewedPanel/index.js +0 -21
  83. package/dist/containers/RecentlyViewedPanel/index.js.map +0 -1
  84. package/dist/containers/RecentlyViewedPanel/messages.js +0 -15
  85. package/dist/containers/RecentlyViewedPanel/messages.js.map +0 -1
  86. package/dist/hooks/useRecentlyViewedCoursesAndProgramsData.js.map +0 -1
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useMemo } from 'react';
3
3
  import { useIntl } from '@openedx/frontend-base';
4
4
  import { useInitializeSubsCourseDashboard } from '../../data/hooks';
5
+ import { CourseFilterControls } from '../../containers/CourseFilterControls';
5
6
  import CourseListSlot from '../../slots/CourseListSlot';
6
7
  import NoCoursesViewSlot from '../../slots/NoCoursesViewSlot';
7
8
  import { useFilters } from '../../data/context';
@@ -37,7 +38,7 @@ export const CoursesPanel = () => {
37
38
  visibleList,
38
39
  verifiedCourse: true,
39
40
  };
40
- return (_jsxs("div", { className: "course-list-container", children: [_jsxs("div", { className: "course-list-heading-container", children: [_jsx("h2", { className: "course-list-title", children: formatMessage(messages.myCourses) }), _jsx("p", { className: "mb-4.5", children: formatMessage(messages.lastSession) })] }), hasCourses ? _jsx(CourseListSlot, { courseListData: courseListData }) : _jsx(NoCoursesViewSlot, {})] }));
41
+ return (_jsxs("div", { className: "course-list-container", children: [_jsxs("div", { className: "course-list-heading-container mb-3", children: [_jsx("h2", { className: "course-list-title", children: formatMessage(messages.myCourses) }), _jsx("div", { className: "course-filter-controls-container", children: _jsx(CourseFilterControls, {}) })] }), hasCourses ? _jsx(CourseListSlot, { courseListData: courseListData }) : _jsx(NoCoursesViewSlot, {})] }));
41
42
  };
42
43
  CoursesPanel.propTypes = {};
43
44
  export default CoursesPanel;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/CoursesPanel/index.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,cAAc,CAAC;AAEtB;;;;EAIE;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,GAAG,gCAAgC,EAAE,CAAC;IACpD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,0CAAE,MAAM,IAAG,CAAC,CAAA,EAAA,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhF,MAAM,EACJ,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,GAC3C,GAAG,UAAU,EAAE,CAAC;IACjB,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7C,MAAM,kBAAkB,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe;YAC9C,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;YACrC,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,cAAc,CACnB,kBAAkB,EAClB,OAAO,EACP,MAAM,EACN,UAAU,CACX,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAExC,uDAAuD;IACvD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,GAAG,CAAC,IAAI,UAAU,GAAG,QAAQ,EAAE,CAAC;YAC1C,aAAa,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1C,MAAM,cAAc,GAAG;QACrB,WAAW,EAAE,IAAI;QACjB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,cAAc,EAAE,IAAI;KACrB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAK,SAAS,EAAC,+BAA+B,aAC5C,aAAI,SAAS,EAAC,mBAAmB,YAAE,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAM,EAC1E,YAAG,SAAS,EAAC,QAAQ,YAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAK,IAC3D,EACL,UAAU,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,cAAc,EAAE,cAAc,GAAI,CAAC,CAAC,CAAC,KAAC,iBAAiB,KAAG,IACpF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG,EAAE,CAAC;AAE5B,eAAe,YAAY,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { useIntl } from '@openedx/frontend-base';\nimport { useInitializeSubsCourseDashboard } from '@src/data/hooks';\nimport CourseListSlot from '../../slots/CourseListSlot';\nimport NoCoursesViewSlot from '../../slots/NoCoursesViewSlot';\nimport { useFilters } from '@src/data/context';\n\nimport { getVisibleList } from '@src/utils/dataTransformers';\n\nimport messages from './messages';\n\nimport './index.scss';\n\n/**\n * Renders the list of CourseCards\n * Also houses the NoCoursesView to display if the user hasn't enrolled in any courses.\n * @returns List of courses as CourseCards or empty state\n*/\nexport const CoursesPanel = () => {\n const { formatMessage } = useIntl();\n const { data } = useInitializeSubsCourseDashboard();\n const hasCourses = useMemo(() => data?.subscriptionCourses?.length > 0, [data]);\n\n const {\n filters, sortBy, pageNumber, setPageNumber,\n } = useFilters();\n const { visibleList, numPages } = useMemo(() => {\n const transformedCourses = data?.coursesByCardId\n ? Object.values(data.coursesByCardId)\n : [];\n return getVisibleList(\n transformedCourses,\n filters,\n sortBy,\n pageNumber,\n );\n }, [data, filters, sortBy, pageNumber]);\n\n // Clamp page number when filtered/mutated list shrinks\n React.useEffect(() => {\n if (numPages > 0 && pageNumber > numPages) {\n setPageNumber(1);\n }\n }, [numPages, pageNumber, setPageNumber]);\n\n const courseListData = {\n showFilters: true,\n setPageNumber,\n numPages,\n visibleList,\n verifiedCourse: true,\n };\n\n return (\n <div className=\"course-list-container\">\n <div className=\"course-list-heading-container\">\n <h2 className=\"course-list-title\">{formatMessage(messages.myCourses)}</h2>\n <p className=\"mb-4.5\">{formatMessage(messages.lastSession)}</p>\n </div>\n {hasCourses ? <CourseListSlot courseListData={courseListData} /> : <NoCoursesViewSlot />}\n </div>\n );\n};\n\nCoursesPanel.propTypes = {};\n\nexport default CoursesPanel;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/CoursesPanel/index.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,cAAc,CAAC;AAEtB;;;;EAIE;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,GAAG,gCAAgC,EAAE,CAAC;IACpD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,0CAAE,MAAM,IAAG,CAAC,CAAA,EAAA,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhF,MAAM,EACJ,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,GAC3C,GAAG,UAAU,EAAE,CAAC;IACjB,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7C,MAAM,kBAAkB,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe;YAC9C,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;YACrC,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,cAAc,CACnB,kBAAkB,EAClB,OAAO,EACP,MAAM,EACN,UAAU,CACX,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAExC,uDAAuD;IACvD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,GAAG,CAAC,IAAI,UAAU,GAAG,QAAQ,EAAE,CAAC;YAC1C,aAAa,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1C,MAAM,cAAc,GAAG;QACrB,WAAW,EAAE,IAAI;QACjB,aAAa;QACb,QAAQ;QACR,WAAW;QACX,cAAc,EAAE,IAAI;KACrB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAK,SAAS,EAAC,oCAAoC,aACjD,aAAI,SAAS,EAAC,mBAAmB,YAAE,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAM,EAC1E,cAAK,SAAS,EAAC,kCAAkC,YAC/C,KAAC,oBAAoB,KAAG,GACpB,IACF,EACL,UAAU,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,cAAc,EAAE,cAAc,GAAI,CAAC,CAAC,CAAC,KAAC,iBAAiB,KAAG,IACpF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG,EAAE,CAAC;AAE5B,eAAe,YAAY,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { useIntl } from '@openedx/frontend-base';\nimport { useInitializeSubsCourseDashboard } from '@src/data/hooks';\nimport { CourseFilterControls } from '@src/containers/CourseFilterControls';\nimport CourseListSlot from '../../slots/CourseListSlot';\nimport NoCoursesViewSlot from '../../slots/NoCoursesViewSlot';\nimport { useFilters } from '@src/data/context';\n\nimport { getVisibleList } from '@src/utils/dataTransformers';\n\nimport messages from './messages';\n\nimport './index.scss';\n\n/**\n * Renders the list of CourseCards\n * Also houses the NoCoursesView to display if the user hasn't enrolled in any courses.\n * @returns List of courses as CourseCards or empty state\n*/\nexport const CoursesPanel = () => {\n const { formatMessage } = useIntl();\n const { data } = useInitializeSubsCourseDashboard();\n const hasCourses = useMemo(() => data?.subscriptionCourses?.length > 0, [data]);\n\n const {\n filters, sortBy, pageNumber, setPageNumber,\n } = useFilters();\n const { visibleList, numPages } = useMemo(() => {\n const transformedCourses = data?.coursesByCardId\n ? Object.values(data.coursesByCardId)\n : [];\n return getVisibleList(\n transformedCourses,\n filters,\n sortBy,\n pageNumber,\n );\n }, [data, filters, sortBy, pageNumber]);\n\n // Clamp page number when filtered/mutated list shrinks\n React.useEffect(() => {\n if (numPages > 0 && pageNumber > numPages) {\n setPageNumber(1);\n }\n }, [numPages, pageNumber, setPageNumber]);\n\n const courseListData = {\n showFilters: true,\n setPageNumber,\n numPages,\n visibleList,\n verifiedCourse: true,\n };\n\n return (\n <div className=\"course-list-container\">\n <div className=\"course-list-heading-container mb-3\">\n <h2 className=\"course-list-title\">{formatMessage(messages.myCourses)}</h2>\n <div className=\"course-filter-controls-container\">\n <CourseFilterControls />\n </div>\n </div>\n {hasCourses ? <CourseListSlot courseListData={courseListData} /> : <NoCoursesViewSlot />}\n </div>\n );\n};\n\nCoursesPanel.propTypes = {};\n\nexport default CoursesPanel;\n"]}
@@ -2,12 +2,13 @@
2
2
 
3
3
  .course-list-heading-container {
4
4
  display: flex;
5
- flex-direction: column;
5
+ flex-direction: row;
6
6
  justify-content: space-between;
7
+ align-items: center;
7
8
  }
8
9
 
9
10
  .course-list-title {
10
- font-size: var(--pgn-typography-font-size-h3-base);
11
+ font-size: var(--pgn-typography-font-size-h2-base);
11
12
  margin: var(--pgn-spacing-spacer-3) 0;
12
13
  }
13
14
 
@@ -25,7 +26,6 @@
25
26
 
26
27
  @media (--pgn-size-breakpoint-max-width-md) {
27
28
  .course-list-heading-container {
28
- flex-direction: column-reverse;
29
29
  align-items: flex-start;
30
30
  }
31
31
 
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import type { DashboardHeaderProps } from './data/types';
3
+ export declare const DashboardHeader: FC<DashboardHeaderProps>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useIntl } from '@openedx/frontend-base';
3
+ import messages from './messages';
4
+ import { dateFormatter } from '../../utils/dateFormatter';
5
+ export const DashboardHeader = ({ startDate }) => {
6
+ const { formatMessage, formatDate } = useIntl();
7
+ const formattedDate = startDate ? dateFormatter(formatDate, startDate, 'long') : '';
8
+ return (_jsxs("div", { className: "my-4.5", children: [_jsx("h2", { className: "font-weight-bold mb-3 dashboard-header-title", "data-testid": "dashboard-header-title", children: formatMessage(messages.dashboardHeaderWelcomeTitle) }), startDate ? (_jsx("p", { className: "mb-0 text-body dashboard-header-subtitle", "data-testid": "dashboard-header-subtitle", children: formatMessage(messages.dashboardHeaderWelcomeMessage, { startDate: formattedDate || '' }) })) : null] }));
9
+ };
10
+ //# sourceMappingURL=DashboardHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardHeader.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/DashboardHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IACzE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAC;IAChD,MAAM,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEpF,OAAO,CACL,eAAK,SAAS,EAAC,QAAQ,aACrB,aAAI,SAAS,EAAC,8CAA8C,iBAAa,wBAAwB,YAC9F,aAAa,CAAC,QAAQ,CAAC,2BAA2B,CAAC,GACjD,EACJ,SAAS,CAAC,CAAC,CAAC,CACX,YAAG,SAAS,EAAC,0CAA0C,iBAAa,2BAA2B,YAC5F,aAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,EAAE,SAAS,EAAE,aAAa,IAAI,EAAE,EAAE,CAAC,GACxF,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport messages from './messages';\nimport type { DashboardHeaderProps } from './data/types';\nimport { dateFormatter } from '@src/utils/dateFormatter';\n\nexport const DashboardHeader: FC<DashboardHeaderProps> = ({ startDate }) => {\n const { formatMessage, formatDate } = useIntl();\n const formattedDate = startDate ? dateFormatter(formatDate, startDate, 'long') : '';\n\n return (\n <div className=\"my-4.5\">\n <h2 className=\"font-weight-bold mb-3 dashboard-header-title\" data-testid=\"dashboard-header-title\">\n {formatMessage(messages.dashboardHeaderWelcomeTitle)}\n </h2>\n {startDate ? (\n <p className=\"mb-0 text-body dashboard-header-subtitle\" data-testid=\"dashboard-header-subtitle\">\n {formatMessage(messages.dashboardHeaderWelcomeMessage, { startDate: formattedDate || '' })}\n </p>\n ) : null}\n </div>\n );\n};\n"]}
@@ -1,28 +1,32 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
+ import { DashboardHeader } from './DashboardHeader';
3
4
  import { useSelectSessionModal } from '../../data/context';
4
5
  import { useInitializeSubsCourseDashboard } from '../../data/hooks';
5
6
  import SelectSessionModal from '../../containers/SelectSessionModal';
6
7
  import { DashboardContent } from './DashboardContent';
7
8
  import DashboardModalSlot from '../../slots/DashboardModalSlot';
8
- import RecentlyViewedPanel from '../RecentlyViewedPanel';
9
+ import PopularCoursePanel from '../PopularCoursePanel';
9
10
  import LoadingView from './LoadingView';
10
11
  import DashboardLayout from './DashboardLayout';
11
12
  import hooks from './hooks';
12
13
  import './index.scss';
13
14
  import { SubscriptionBanner } from '../SubscriptionBanner';
14
15
  import { DashboardTitle } from './DashboardTitle';
16
+ import { useInitializeSubsDashboard } from '../../data/hooks';
15
17
  export const Dashboard = () => {
16
- var _a, _b;
18
+ var _a, _b, _c;
17
19
  const { data, isPending } = useInitializeSubsCourseDashboard();
20
+ const { data: learnerData } = useInitializeSubsDashboard();
18
21
  const { pageTitle } = hooks.useDashboardMessages();
19
22
  const { selectSessionModal } = useSelectSessionModal();
20
23
  const showSelectSessionModal = selectSessionModal.cardId !== null;
24
+ const userSubscriptionStartDate = ((_a = learnerData === null || learnerData === void 0 ? void 0 : learnerData.userSubscription) === null || _a === void 0 ? void 0 : _a.subscriptionStartDate) || '';
21
25
  const hasCourses = useMemo(() => { var _a; return ((_a = data === null || data === void 0 ? void 0 : data.subscriptionCourses) === null || _a === void 0 ? void 0 : _a.length) > 0; }, [data]);
22
- const hasCourseHistory = ((_b = (_a = data === null || data === void 0 ? void 0 : data.nonUpgradeableCourses) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
26
+ const hasCourseHistory = ((_c = (_b = data === null || data === void 0 ? void 0 : data.nonUpgradeableCourses) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 0;
23
27
  return (_jsx("div", { id: "learnerdashboardroot", children: _jsx("main", { children: _jsxs("div", { id: "dashboard-container", className: "d-flex flex-column p-2 pt-0", children: [_jsx("h1", { className: "sr-only", children: pageTitle }), !isPending && (_jsxs(_Fragment, { children: [_jsx(DashboardModalSlot, {}), (hasCourses && showSelectSessionModal) && _jsx(SelectSessionModal, {})] })), _jsx("div", { id: "dashboard-content", "data-testid": "dashboard-content", children: isPending
24
28
  ? (_jsx(LoadingView, {}))
25
- : (_jsxs(DashboardLayout, { children: [_jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardContent, { hasCourseHistory: hasCourseHistory }), _jsx(RecentlyViewedPanel, {})] })) })] }) }) }));
29
+ : (_jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardContent, { hasCourseHistory: hasCourseHistory }), _jsx(PopularCoursePanel, {})] })) })] }) }) }));
26
30
  };
27
31
  export default Dashboard;
28
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,kBAAkB,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAEzD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;;IAC5B,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,gCAAgC,EAAE,CAAC;IAC/D,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,oBAAoB,EAAE,CAAC;IACnD,MAAM,EAAE,kBAAkB,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACvD,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,MAAM,KAAK,IAAI,CAAC;IAElE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,0CAAE,MAAM,IAAG,CAAC,CAAA,EAAA,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,MAAM,gBAAgB,GAAG,CAAC,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,qBAAqB,0CAAE,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAExE,OAAO,CACL,cAAK,EAAE,EAAC,sBAAsB,YAC5B,yBACE,eAAK,EAAE,EAAC,qBAAqB,EAAC,SAAS,EAAC,6BAA6B,aACnE,aAAI,SAAS,EAAC,SAAS,YAAE,SAAS,GAAM,EACvC,CAAC,SAAS,IAAI,CACb,8BACE,KAAC,kBAAkB,KAAG,EACrB,CAAC,UAAU,IAAI,sBAAsB,CAAC,IAAI,KAAC,kBAAkB,KAAG,IAChE,CACJ,EACD,cAAK,EAAE,EAAC,mBAAmB,iBAAa,mBAAmB,YACxD,SAAS;4BACR,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC;4BACnB,CAAC,CAAC,CACA,MAAC,eAAe,eACd,KAAC,kBAAkB,KAAG,EACtB,KAAC,cAAc,KAAG,EAClB,KAAC,gBAAgB,IAAC,gBAAgB,EAAE,gBAAgB,GAAI,EACxD,KAAC,mBAAmB,KAAG,IACP,CACnB,GACC,IACF,GACD,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { useSelectSessionModal } from '@src/data/context';\nimport { useInitializeSubsCourseDashboard } from '@src/data/hooks';\nimport SelectSessionModal from '../../containers/SelectSessionModal';\nimport { DashboardContent } from './DashboardContent';\nimport DashboardModalSlot from '../../slots/DashboardModalSlot';\nimport RecentlyViewedPanel from '../RecentlyViewedPanel';\n\nimport LoadingView from './LoadingView';\nimport DashboardLayout from './DashboardLayout';\n\nimport hooks from './hooks';\nimport './index.scss';\nimport { SubscriptionBanner } from '../SubscriptionBanner';\nimport { DashboardTitle } from './DashboardTitle';\n\nexport const Dashboard = () => {\n const { data, isPending } = useInitializeSubsCourseDashboard();\n const { pageTitle } = hooks.useDashboardMessages();\n const { selectSessionModal } = useSelectSessionModal();\n const showSelectSessionModal = selectSessionModal.cardId !== null;\n\n const hasCourses = useMemo(() => data?.subscriptionCourses?.length > 0, [data]);\n const hasCourseHistory = (data?.nonUpgradeableCourses?.length ?? 0) > 0;\n\n return (\n <div id=\"learnerdashboardroot\">\n <main>\n <div id=\"dashboard-container\" className=\"d-flex flex-column p-2 pt-0\">\n <h1 className=\"sr-only\">{pageTitle}</h1>\n {!isPending && (\n <>\n <DashboardModalSlot />\n {(hasCourses && showSelectSessionModal) && <SelectSessionModal />}\n </>\n )}\n <div id=\"dashboard-content\" data-testid=\"dashboard-content\">\n {isPending\n ? (<LoadingView />)\n : (\n <DashboardLayout>\n <SubscriptionBanner />\n <DashboardTitle />\n <DashboardContent hasCourseHistory={hasCourseHistory} />\n <RecentlyViewedPanel />\n </DashboardLayout>\n )}\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Dashboard;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,kBAAkB,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;;IAC5B,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,gCAAgC,EAAE,CAAC;IAC/D,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,0BAA0B,EAAE,CAAC;IAC3D,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,oBAAoB,EAAE,CAAC;IACnD,MAAM,EAAE,kBAAkB,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACvD,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,MAAM,KAAK,IAAI,CAAC;IAClE,MAAM,yBAAyB,GAAG,CAAA,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,gBAAgB,0CAAE,qBAAqB,KAAI,EAAE,CAAC;IAE7F,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,0CAAE,MAAM,IAAG,CAAC,CAAA,EAAA,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,MAAM,gBAAgB,GAAG,CAAC,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,qBAAqB,0CAAE,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAExE,OAAO,CACL,cAAK,EAAE,EAAC,sBAAsB,YAC5B,yBACE,eAAK,EAAE,EAAC,qBAAqB,EAAC,SAAS,EAAC,6BAA6B,aACnE,aAAI,SAAS,EAAC,SAAS,YAAE,SAAS,GAAM,EACvC,CAAC,SAAS,IAAI,CACb,8BACE,KAAC,kBAAkB,KAAG,EACrB,CAAC,UAAU,IAAI,sBAAsB,CAAC,IAAI,KAAC,kBAAkB,KAAG,IAChE,CACJ,EACD,cAAK,EAAE,EAAC,mBAAmB,iBAAa,mBAAmB,YACxD,SAAS;4BACR,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC;4BACnB,CAAC,CAAC,CACA,MAAC,eAAe,eACd,KAAC,eAAe,IAAC,SAAS,EAAE,yBAAyB,GAAI,EACzD,KAAC,kBAAkB,KAAG,EACtB,KAAC,cAAc,KAAG,EAClB,KAAC,gBAAgB,IAAC,gBAAgB,EAAE,gBAAgB,GAAI,EACxD,KAAC,kBAAkB,KAAG,IACN,CACnB,GACC,IACF,GACD,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport { DashboardHeader } from './DashboardHeader';\n\nimport { useSelectSessionModal } from '@src/data/context';\nimport { useInitializeSubsCourseDashboard } from '@src/data/hooks';\nimport SelectSessionModal from '../../containers/SelectSessionModal';\nimport { DashboardContent } from './DashboardContent';\nimport DashboardModalSlot from '../../slots/DashboardModalSlot';\nimport PopularCoursePanel from '../PopularCoursePanel';\n\nimport LoadingView from './LoadingView';\nimport DashboardLayout from './DashboardLayout';\n\nimport hooks from './hooks';\nimport './index.scss';\nimport { SubscriptionBanner } from '../SubscriptionBanner';\nimport { DashboardTitle } from './DashboardTitle';\nimport { useInitializeSubsDashboard } from '@src/data/hooks';\n\nexport const Dashboard = () => {\n const { data, isPending } = useInitializeSubsCourseDashboard();\n const { data: learnerData } = useInitializeSubsDashboard();\n const { pageTitle } = hooks.useDashboardMessages();\n const { selectSessionModal } = useSelectSessionModal();\n const showSelectSessionModal = selectSessionModal.cardId !== null;\n const userSubscriptionStartDate = learnerData?.userSubscription?.subscriptionStartDate || '';\n\n const hasCourses = useMemo(() => data?.subscriptionCourses?.length > 0, [data]);\n const hasCourseHistory = (data?.nonUpgradeableCourses?.length ?? 0) > 0;\n\n return (\n <div id=\"learnerdashboardroot\">\n <main>\n <div id=\"dashboard-container\" className=\"d-flex flex-column p-2 pt-0\">\n <h1 className=\"sr-only\">{pageTitle}</h1>\n {!isPending && (\n <>\n <DashboardModalSlot />\n {(hasCourses && showSelectSessionModal) && <SelectSessionModal />}\n </>\n )}\n <div id=\"dashboard-content\" data-testid=\"dashboard-content\">\n {isPending\n ? (<LoadingView />)\n : (\n <DashboardLayout>\n <DashboardHeader startDate={userSubscriptionStartDate} />\n <SubscriptionBanner />\n <DashboardTitle />\n <DashboardContent hasCourseHistory={hasCourseHistory} />\n <PopularCoursePanel />\n </DashboardLayout>\n )}\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Dashboard;\n"]}
@@ -1,5 +1,16 @@
1
1
  @use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css";
2
+ $title-color: #002B2B !default;
3
+ $subtitle-color: #454545 !default;
2
4
 
3
5
  .course-list-column {
4
6
  padding: 0 var(--pgn-spacing-spacer-4);
5
- }
7
+ }
8
+
9
+ .dashboard-header-title {
10
+ color: $title-color;
11
+ font-size: var(--pgn-typography-font-size-h3-base);
12
+ }
13
+
14
+ .dashboard-header-subtitle {
15
+ color: $subtitle-color;
16
+ }
@@ -9,5 +9,15 @@ declare const messages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ dashboardHeaderWelcomeTitle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ dashboardHeaderWelcomeMessage: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
12
22
  };
13
23
  export default messages;
@@ -10,6 +10,16 @@ const messages = defineMessages({
10
10
  defaultMessage: 'Your home for all of your future learning with edX Unlimited.',
11
11
  description: 'Subtitle for the subscriber dashboard',
12
12
  },
13
+ dashboardHeaderWelcomeTitle: {
14
+ id: 'Dashboard.Header.Welcome.Title',
15
+ defaultMessage: 'Welcome to your learning home.',
16
+ description: 'Welcome message for the subscriber dashboard',
17
+ },
18
+ dashboardHeaderWelcomeMessage: {
19
+ id: 'Dashboard.Header.Welcome.Message',
20
+ defaultMessage: 'Subscriber since {startDate}.',
21
+ description: 'Additional content for the subscriber dashboard',
22
+ },
13
23
  });
14
24
  export default messages;
15
25
  //# sourceMappingURL=messages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,cAAc,EAAE;QACd,EAAE,EAAE,iBAAiB;QACrB,cAAc,EAAE,sBAAsB;QACtC,WAAW,EAAE,oCAAoC;KAClD;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,oBAAoB;QACxB,cAAc,EAAE,+DAA+D;QAC/E,WAAW,EAAE,uCAAuC;KACrD;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n dashboardTitle: {\n id: 'Dashboard.Title',\n defaultMessage: 'Subscriber Dashboard',\n description: 'Title for the subscriber dashboard',\n },\n dashboardSubtitle: {\n id: 'Dashboard.Subtitle',\n defaultMessage: 'Your home for all of your future learning with edX Unlimited.',\n description: 'Subtitle for the subscriber dashboard',\n },\n});\n\nexport default messages;\n"]}
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/Dashboard/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,cAAc,EAAE;QACd,EAAE,EAAE,iBAAiB;QACrB,cAAc,EAAE,sBAAsB;QACtC,WAAW,EAAE,oCAAoC;KAClD;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,oBAAoB;QACxB,cAAc,EAAE,+DAA+D;QAC/E,WAAW,EAAE,uCAAuC;KACrD;IACD,2BAA2B,EAAE;QAC3B,EAAE,EAAE,gCAAgC;QACpC,cAAc,EAAE,gCAAgC;QAChD,WAAW,EAAE,8CAA8C;KAC5D;IACD,6BAA6B,EAAE;QAC7B,EAAE,EAAE,kCAAkC;QACtC,cAAc,EAAE,+BAA+B;QAC/C,WAAW,EAAE,iDAAiD;KAC/D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n dashboardTitle: {\n id: 'Dashboard.Title',\n defaultMessage: 'Subscriber Dashboard',\n description: 'Title for the subscriber dashboard',\n },\n dashboardSubtitle: {\n id: 'Dashboard.Subtitle',\n defaultMessage: 'Your home for all of your future learning with edX Unlimited.',\n description: 'Subtitle for the subscriber dashboard',\n },\n dashboardHeaderWelcomeTitle: {\n id: 'Dashboard.Header.Welcome.Title',\n defaultMessage: 'Welcome to your learning home.',\n description: 'Welcome message for the subscriber dashboard',\n },\n dashboardHeaderWelcomeMessage: {\n id: 'Dashboard.Header.Welcome.Message',\n defaultMessage: 'Subscriber since {startDate}.',\n description: 'Additional content for the subscriber dashboard',\n },\n});\n\nexport default messages;\n"]}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const NoPopularCourseItems: FC;
3
+ export default NoPopularCourseItems;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useIntl } from '@openedx/frontend-base';
3
+ import messages from './messages';
4
+ const NoPopularCourseItems = () => {
5
+ const { formatMessage } = useIntl();
6
+ return (_jsx("div", { "data-testid": "no-popular-course-items", children: _jsx("p", { className: "mb-0", children: formatMessage(messages.popularCourseEmptyState) }) }));
7
+ };
8
+ export default NoPopularCourseItems;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularCoursePanel/NoPopularCourseItems/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,oBAAoB,GAAO,GAAG,EAAE;IACpC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,OAAO,CACL,6BAAiB,yBAAyB,YACxC,YAAG,SAAS,EAAC,MAAM,YAAE,aAAa,CAAC,QAAQ,CAAC,uBAAuB,CAAC,GAAK,GACrE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport messages from './messages';\n\nconst NoPopularCourseItems: FC = () => {\n const { formatMessage } = useIntl();\n\n return (\n <div data-testid=\"no-popular-course-items\">\n <p className=\"mb-0\">{formatMessage(messages.popularCourseEmptyState)}</p>\n </div>\n );\n};\n\nexport default NoPopularCourseItems;\n"]}
@@ -1,5 +1,5 @@
1
1
  declare const messages: {
2
- recentlyViewedEmptyState: {
2
+ popularCourseEmptyState: {
3
3
  id: string;
4
4
  defaultMessage: string;
5
5
  description: string;
@@ -0,0 +1,10 @@
1
+ import { defineMessages } from '@openedx/frontend-base';
2
+ const messages = defineMessages({
3
+ popularCourseEmptyState: {
4
+ id: 'subs-dash.popularCoursePanel.emptyState',
5
+ defaultMessage: 'When you browse the edX Unlimited catalog, we\'ll show popular courses here.',
6
+ description: 'Placeholder text for popular courses section',
7
+ }
8
+ });
9
+ export default messages;
10
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/containers/PopularCoursePanel/NoPopularCourseItems/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,uBAAuB,EAAE;QACvB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,8EAA8E;QAC9F,WAAW,EAAE,8CAA8C;KAC5D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularCourseEmptyState: {\n id: 'subs-dash.popularCoursePanel.emptyState',\n defaultMessage: 'When you browse the edX Unlimited catalog, we\\'ll show popular courses here.',\n description: 'Placeholder text for popular courses section',\n }\n});\n\nexport default messages;\n"]}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { PopularCoursesProps } from './data/types';
3
+ export declare const PopularCourses: FC<PopularCoursesProps>;
4
+ export default PopularCourses;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ProductCard } from '../../ProductCard';
3
- export const RecentlyViewedCourseProgram = ({ items, isLoading }) => {
4
- return (_jsx("div", { "data-testid": "recently-viewed-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item, isLoading: isLoading }) }, item.objectID))) }) }));
3
+ export const PopularCourses = ({ items, isLoading }) => {
4
+ return (_jsx("div", { "data-testid": "popular-courses-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item, isLoading: isLoading }) }, item.objectID))) }) }));
5
5
  };
6
- export default RecentlyViewedCourseProgram;
6
+ export default PopularCourses;
7
7
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularCoursePanel/PopularCourses/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;IAC9E,OAAO,CACL,6BAAiB,uBAAuB,YACtC,cAAK,SAAS,EAAC,gDAAgD,YAC5D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,cAAyB,SAAS,EAAC,sCAAsC,YACvE,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,IADzC,IAAI,CAAC,QAAQ,CAEjB,CACP,CAAC,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { FC } from 'react';\n\nimport { ProductCard } from '../../ProductCard';\nimport { PopularCoursesProps } from './data/types';\n\nexport const PopularCourses: FC<PopularCoursesProps> = ({ items, isLoading }) => {\n return (\n <div data-testid=\"popular-courses-items\">\n <div className=\"row g-3 flex-nowrap flex-md-wrap overflow-auto\">\n {items.map((item) => (\n <div key={item.objectID} className=\"col-12 col-md-6 col-xl-3 d-flex mb-2\">\n <ProductCard item={item} isLoading={isLoading} />\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default PopularCourses;\n"]}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ export declare const PopularCoursePanel: FC;
3
+ export default PopularCoursePanel;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { Alert } from '@openedx/paragon';
4
+ import { useIntl } from '@openedx/frontend-base';
5
+ import { usePopularCoursesData } from '../../hooks/usePopularCourses';
6
+ import { useAlgoliaSearch } from '../../utils/algoliaUtils';
7
+ import messages from './messages';
8
+ import NoPopularCourseItems from './NoPopularCourseItems';
9
+ import PopularCourses from './PopularCourses';
10
+ export const PopularCoursePanel = () => {
11
+ const { formatMessage } = useIntl();
12
+ const [searchClient] = useAlgoliaSearch();
13
+ const { data: popularCoursesData = [], isError, isLoading, } = usePopularCoursesData(searchClient, true);
14
+ const hasPopularCoursesData = useMemo(() => popularCoursesData.length > 0, [popularCoursesData]);
15
+ if (isError) {
16
+ return (_jsx("div", { className: "popular-courses-container mt-5 mb-3", "data-testid": "popular-courses-panel", children: _jsx(Alert, { variant: "danger", "data-testid": "popular-courses-error", children: formatMessage(messages.popularCoursesErrorText) }) }));
17
+ }
18
+ return (_jsxs("div", { className: "popular-courses-container mt-5 mb-3", "data-testid": "popular-courses-panel", children: [_jsx("div", { className: "popular-courses-heading-container mb-4", children: _jsx("h2", { children: formatMessage(messages.popularCoursesHeader) }) }), (isLoading || hasPopularCoursesData) ? (_jsx(PopularCourses, { items: popularCoursesData, isLoading: isLoading })) : (_jsx(NoPopularCourseItems, {}))] }));
19
+ };
20
+ export default PopularCoursePanel;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/PopularCoursePanel/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,OAAO,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAAO,GAAG,EAAE;IACzC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,CAAC,YAAY,CAAC,GAAG,gBAAgB,EAAE,CAAC;IAC1C,MAAM,EACJ,IAAI,EAAE,kBAAkB,GAAG,EAAE,EAC7B,OAAO,EACP,SAAS,GACV,GAAG,qBAAqB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAC9C,MAAM,qBAAqB,GAAG,OAAO,CACnC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EACnC,CAAC,kBAAkB,CAAC,CACrB,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,cAAK,SAAS,EAAC,qCAAqC,iBAAa,uBAAuB,YACtF,KAAC,KAAK,IAAC,OAAO,EAAC,QAAQ,iBAAa,uBAAuB,YACxD,aAAa,CAAC,QAAQ,CAAC,uBAAuB,CAAC,GAC1C,GACJ,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,qCAAqC,iBAAa,uBAAuB,aACtF,cAAK,SAAS,EAAC,wCAAwC,YACrD,uBAAK,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAM,GACnD,EACL,CAAC,SAAS,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC,CACtC,KAAC,cAAc,IACb,KAAK,EAAE,kBAAkB,EACzB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,oBAAoB,KAAG,CACzB,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { FC, useMemo } from 'react';\nimport { Alert } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { usePopularCoursesData } from '@src/hooks/usePopularCourses';\nimport { useAlgoliaSearch } from '@src/utils/algoliaUtils';\nimport messages from './messages';\nimport NoPopularCourseItems from './NoPopularCourseItems';\nimport PopularCourses from './PopularCourses';\n\nexport const PopularCoursePanel: FC = () => {\n const { formatMessage } = useIntl();\n const [searchClient] = useAlgoliaSearch();\n const {\n data: popularCoursesData = [],\n isError,\n isLoading,\n } = usePopularCoursesData(searchClient, true);\n const hasPopularCoursesData = useMemo(\n () => popularCoursesData.length > 0,\n [popularCoursesData]\n );\n\n if (isError) {\n return (\n <div className=\"popular-courses-container mt-5 mb-3\" data-testid=\"popular-courses-panel\">\n <Alert variant=\"danger\" data-testid=\"popular-courses-error\">\n {formatMessage(messages.popularCoursesErrorText)}\n </Alert>\n </div>\n );\n }\n\n return (\n <div className=\"popular-courses-container mt-5 mb-3\" data-testid=\"popular-courses-panel\">\n <div className=\"popular-courses-heading-container mb-4\">\n <h2>{formatMessage(messages.popularCoursesHeader)}</h2>\n </div>\n {(isLoading || hasPopularCoursesData) ? (\n <PopularCourses\n items={popularCoursesData}\n isLoading={isLoading}\n />\n ) : (\n <NoPopularCourseItems />\n )}\n </div>\n );\n};\n\nexport default PopularCoursePanel;\n"]}
@@ -1,10 +1,10 @@
1
1
  declare const messages: {
2
- recentlyViewedHeader: {
2
+ popularCoursesHeader: {
3
3
  id: string;
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
- recentlyViewedErrorText: {
7
+ popularCoursesErrorText: {
8
8
  id: string;
9
9
  defaultMessage: string;
10
10
  description: string;
@@ -0,0 +1,15 @@
1
+ import { defineMessages } from '@openedx/frontend-base';
2
+ const messages = defineMessages({
3
+ popularCoursesHeader: {
4
+ id: 'subs-dash.popularCoursesPanel.header',
5
+ defaultMessage: 'Popular courses',
6
+ description: 'Label for the popular courses section',
7
+ },
8
+ popularCoursesErrorText: {
9
+ id: 'subs-dash.popularCoursesPanel.errorText',
10
+ defaultMessage: 'Failed to load popular courses. Please try again later.',
11
+ description: 'Error text for failing to load popular courses',
12
+ },
13
+ });
14
+ export default messages;
15
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/PopularCoursePanel/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,oBAAoB,EAAE;QACpB,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,uCAAuC;KACrD;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,yDAAyD;QACzE,WAAW,EAAE,gDAAgD;KAC9D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularCoursesHeader: {\n id: 'subs-dash.popularCoursesPanel.header',\n defaultMessage: 'Popular courses',\n description: 'Label for the popular courses section',\n },\n popularCoursesErrorText: {\n id: 'subs-dash.popularCoursesPanel.errorText',\n defaultMessage: 'Failed to load popular courses. Please try again later.',\n description: 'Error text for failing to load popular courses',\n },\n});\n\nexport default messages;\n"]}
@@ -1,4 +1,4 @@
1
1
  import { FC } from 'react';
2
- import { ProductCardProps } from './data/types';
3
2
  import './index.scss';
3
+ import { ProductCardProps } from './data/types';
4
4
  export declare const ProductCard: FC<ProductCardProps>;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card, Badge, Icon } from '@openedx/paragon';
3
- import { School } from '@openedx/paragon/icons';
2
+ import { useIntl } from '@openedx/frontend-base';
3
+ import { Card, Icon } from '@openedx/paragon';
4
+ import { Timelapse, Speed } from '@openedx/paragon/icons';
4
5
  import './index.scss';
5
- const DESCRIPTION_MAX_LENGTH = 130;
6
- const getPlainText = (value) => value.replace(/<[^>]*>/g, ' ').replace(/\s+/g, ' ').trim();
7
- const truncateText = (value, maxLength) => (value.length > maxLength ? `${value.slice(0, maxLength).trimEnd()}...` : value);
6
+ import cardFallbackImg from '@openedx/brand-openedx/paragon/images/card-imagecap-fallback.png';
7
+ import messages from './messages';
8
8
  export const ProductCard = ({ item, isLoading }) => {
9
- return (_jsxs(Card, { className: "shadow-sm d-flex flex-column rounded w-100 overflow-hidden", variant: item.product === 'Course' ? 'light' : 'dark', "data-testid": "product-card", isLoading: isLoading, children: [_jsx("div", { className: "position-relative", children: _jsx(Card.ImageCap, { src: item.url, srcAlt: `${item.title} main-image`, "data-testid": "product-card-image", logoSrc: item.thumbnail || '', logoAlt: `${item.title} thumbnail-image` }) }), _jsx(Card.Header, { title: item.title }), _jsxs(Card.Section, { className: "d-flex flex-column flex-grow-1 overflow-hidden", children: [_jsx("div", { className: "flex-grow-1 min-h-0", children: _jsx("p", { className: "text-truncate-3 mb-2", children: truncateText(getPlainText(item.primary_description), DESCRIPTION_MAX_LENGTH) }) }), (item.product === 'Program' && item.tagText) && (_jsxs(Badge, { variant: "light", className: "d-inline-flex align-items-center px-2 py-1 align-self-start", children: [_jsx(Icon, { src: School, className: "mr-2" }), item.tagText] }))] }), _jsx(Card.Footer, { className: "d-flex justify-content-between align-items-center", children: _jsx("span", { className: `small ${item.product === 'Program' ? 'text-white' : 'text-muted'}`, children: item.footerLabel }) })] }));
9
+ const { formatMessage } = useIntl();
10
+ return (_jsxs(Card, { className: "shadow-sm d-flex flex-column rounded w-100 overflow-hidden card-container", variant: item.product === 'Course' ? 'light' : 'dark', "data-testid": "product-card", isLoading: isLoading, children: [_jsx(Card.Header, { title: item.content_type, className: "pb-2 pt-2 bg-light-500 text-primary-500 content-type", size: "xs" }), _jsx("div", { className: "position-relative image-container", children: _jsx(Card.ImageCap, { src: item.url || cardFallbackImg, srcAlt: `${item.title} main-image`, "data-testid": "product-card-image", logoSrc: item.thumbnail || '', logoAlt: `${item.title} thumbnail-image` }) }), _jsx(Card.Header, { title: item.title, size: "sm", className: "product-card-title" }), item.partner ? (_jsx(Card.Header, { title: item.partner, className: "d-flex justify-content-between align-items-center", size: "xs" })) : null, _jsxs(Card.Section, { className: "d-flex flex-column flex-grow-1 overflow-hidden mt-5", children: [typeof item.weeks_to_complete === 'number' && (_jsxs("span", { className: "d-flex align-items-center", children: [_jsx(Icon, { src: Timelapse, className: "mr-2" }), _jsx("span", { children: formatMessage(messages.weeksToComplete, { count: item.weeks_to_complete }) })] })), item.level ? (_jsxs("span", { className: `d-flex align-items-center${typeof item.weeks_to_complete === 'number' ? ' mt-3' : ''}`, children: [_jsx(Icon, { src: Speed, className: "mr-2" }), _jsx("span", { children: formatMessage(messages.level, { level: item.level }) })] })) : null] })] }));
10
11
  };
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/ProductCard/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAIhD,OAAO,cAAc,CAAC;AAEtB,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAEnC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAEnG,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,SAAiB,EAAE,EAAE,CAAC,CACzD,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAC/E,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;IACvE,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAC,4DAA4D,EACtE,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,iBACzC,cAAc,EAC1B,SAAS,EAAE,SAAS,aAEpB,cAAK,SAAS,EAAC,mBAAmB,YAChC,KAAC,IAAI,CAAC,QAAQ,IACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,aAAa,iBACtB,oBAAoB,EAChC,OAAO,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE,EAC7B,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,kBAAkB,GACxC,GACE,EAEN,KAAC,IAAI,CAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI,EAElC,MAAC,IAAI,CAAC,OAAO,IAAC,SAAS,EAAC,gDAAgD,aACtE,cAAK,SAAS,EAAC,qBAAqB,YAClC,YAAG,SAAS,EAAC,sBAAsB,YAChC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,sBAAsB,CAAC,GAC3E,GACA,EAEL,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAC/C,MAAC,KAAK,IACJ,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,6DAA6D,aAEvE,KAAC,IAAI,IAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,GAAG,EACrC,IAAI,CAAC,OAAO,IACP,CACT,IACY,EAEf,KAAC,IAAI,CAAC,MAAM,IAAC,SAAS,EAAC,mDAAmD,YACxE,eAAM,SAAS,EAAE,SAAS,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,EAAE,YAAG,IAAI,CAAC,WAAW,GAAQ,GACnG,IACT,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Card, Badge, Icon } from '@openedx/paragon';\nimport { School } from '@openedx/paragon/icons';\n\nimport { ProductCardProps } from './data/types';\n\nimport './index.scss';\n\nconst DESCRIPTION_MAX_LENGTH = 130;\n\nconst getPlainText = (value: string) => value.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim();\n\nconst truncateText = (value: string, maxLength: number) => (\n value.length > maxLength ? `${value.slice(0, maxLength).trimEnd()}...` : value\n);\n\nexport const ProductCard: FC<ProductCardProps> = ({ item, isLoading }) => {\n return (\n <Card\n className=\"shadow-sm d-flex flex-column rounded w-100 overflow-hidden\"\n variant={item.product === 'Course' ? 'light' : 'dark'}\n data-testid=\"product-card\"\n isLoading={isLoading}\n >\n <div className=\"position-relative\">\n <Card.ImageCap\n src={item.url}\n srcAlt={`${item.title} main-image`}\n data-testid=\"product-card-image\"\n logoSrc={item.thumbnail || ''}\n logoAlt={`${item.title} thumbnail-image`}\n />\n </div>\n\n <Card.Header title={item.title} />\n\n <Card.Section className=\"d-flex flex-column flex-grow-1 overflow-hidden\">\n <div className=\"flex-grow-1 min-h-0\">\n <p className=\"text-truncate-3 mb-2\">\n {truncateText(getPlainText(item.primary_description), DESCRIPTION_MAX_LENGTH)}\n </p>\n </div>\n\n {(item.product === 'Program' && item.tagText) && (\n <Badge\n variant=\"light\"\n className=\"d-inline-flex align-items-center px-2 py-1 align-self-start\"\n >\n <Icon src={School} className=\"mr-2\" />\n {item.tagText}\n </Badge>\n )}\n </Card.Section>\n\n <Card.Footer className=\"d-flex justify-content-between align-items-center\">\n <span className={`small ${item.product === 'Program' ? 'text-white' : 'text-muted'}`}>{item.footerLabel}</span>\n </Card.Footer>\n </Card>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/ProductCard/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,MAAM,kEAAkE,CAAC;AAE/F,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;IACvE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAC,2EAA2E,EACrF,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,iBACzC,cAAc,EAC1B,SAAS,EAAE,SAAS,aAEpB,KAAC,IAAI,CAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAC,sDAAsD,EAAC,IAAI,EAAC,IAAI,GAAG,EAEpH,cAAK,SAAS,EAAC,mCAAmC,YAChD,KAAC,IAAI,CAAC,QAAQ,IACZ,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,eAAe,EAChC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,aAAa,iBACtB,oBAAoB,EAChC,OAAO,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE,EAC7B,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,kBAAkB,GACxC,GACE,EAEN,KAAC,IAAI,CAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,oBAAoB,GAAG,EAE1E,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CACd,KAAC,IAAI,CAAC,MAAM,IAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAC,mDAAmD,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7G,CAAC,CAAC,CAAC,IAAI,EAER,MAAC,IAAI,CAAC,OAAO,IAAC,SAAS,EAAC,qDAAqD,aAC1E,OAAO,IAAI,CAAC,iBAAiB,KAAK,QAAQ,IAAI,CAC7C,gBAAM,SAAS,EAAC,2BAA2B,aACzC,KAAC,IAAI,IAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,GAAG,EACzC,yBAAO,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,GAAQ,IACpF,CACR,EACA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACZ,gBAAM,SAAS,EAAE,4BAA4B,OAAO,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,aACtG,KAAC,IAAI,IAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,EACrC,yBAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,GAAQ,IAC9D,CACR,CAAC,CAAC,CAAC,IAAI,IACK,IAEV,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport { Card, Icon } from '@openedx/paragon';\nimport { Timelapse, Speed } from '@openedx/paragon/icons';\nimport './index.scss';\nimport cardFallbackImg from '@openedx/brand-openedx/paragon/images/card-imagecap-fallback.png';\nimport { ProductCardProps } from './data/types';\nimport messages from './messages';\n\nexport const ProductCard: FC<ProductCardProps> = ({ item, isLoading }) => {\n const { formatMessage } = useIntl();\n return (\n <Card\n className=\"shadow-sm d-flex flex-column rounded w-100 overflow-hidden card-container\"\n variant={item.product === 'Course' ? 'light' : 'dark'}\n data-testid=\"product-card\"\n isLoading={isLoading}\n >\n <Card.Header title={item.content_type} className=\"pb-2 pt-2 bg-light-500 text-primary-500 content-type\" size=\"xs\" />\n\n <div className=\"position-relative image-container\">\n <Card.ImageCap\n src={item.url || cardFallbackImg}\n srcAlt={`${item.title} main-image`}\n data-testid=\"product-card-image\"\n logoSrc={item.thumbnail || ''}\n logoAlt={`${item.title} thumbnail-image`}\n />\n </div>\n\n <Card.Header title={item.title} size=\"sm\" className=\"product-card-title\" />\n\n {item.partner ? (\n <Card.Header title={item.partner} className=\"d-flex justify-content-between align-items-center\" size=\"xs\" />\n ) : null}\n\n <Card.Section className=\"d-flex flex-column flex-grow-1 overflow-hidden mt-5\">\n {typeof item.weeks_to_complete === 'number' && (\n <span className=\"d-flex align-items-center\">\n <Icon src={Timelapse} className=\"mr-2\" />\n <span>{formatMessage(messages.weeksToComplete, { count: item.weeks_to_complete })}</span>\n </span>\n )}\n {item.level ? (\n <span className={`d-flex align-items-center${typeof item.weeks_to_complete === 'number' ? ' mt-3' : ''}`}>\n <Icon src={Speed} className=\"mr-2\" />\n <span>{formatMessage(messages.level, { level: item.level })}</span>\n </span>\n ) : null}\n </Card.Section>\n\n </Card>\n );\n};\n"]}
@@ -1,6 +1,17 @@
1
- .text-truncate-3 {
2
- display: -webkit-box;
3
- -webkit-line-clamp: 3;
4
- -webkit-box-orient: vertical;
5
- overflow: hidden;
6
- }
1
+ .product-card-title {
2
+ min-height: 6.4rem;
3
+ }
4
+
5
+ .card-container > .content-type > .pgn__card-header-content {
6
+ margin-top: 0;
7
+ }
8
+
9
+ .card-container .pgn__card-logo-cap {
10
+ position: absolute;
11
+ top: 50%;
12
+ transform: translateY(-50%);
13
+ }
14
+
15
+ .card-container .pgn__card-image-cap {
16
+ border-radius: 0 !important;
17
+ }
@@ -0,0 +1,13 @@
1
+ declare const messages: {
2
+ weeksToComplete: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ level: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ };
13
+ export default messages;
@@ -0,0 +1,15 @@
1
+ import { defineMessages } from '@openedx/frontend-base';
2
+ const messages = defineMessages({
3
+ weeksToComplete: {
4
+ id: 'subs-dash.weeksToComplete.label',
5
+ defaultMessage: '{count, plural, one {# week to complete} other {# weeks to complete}}',
6
+ description: 'Label for the weeks to complete field',
7
+ },
8
+ level: {
9
+ id: 'subs-dash.level.label',
10
+ defaultMessage: '{level} level',
11
+ description: 'Label for the level field',
12
+ },
13
+ });
14
+ export default messages;
15
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/ProductCard/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,eAAe,EAAE;QACf,EAAE,EAAE,iCAAiC;QACrC,cAAc,EAAE,uEAAuE;QACvF,WAAW,EAAE,uCAAuC;KACrD;IACD,KAAK,EAAE;QACL,EAAE,EAAE,uBAAuB;QAC3B,cAAc,EAAE,eAAe;QAC/B,WAAW,EAAE,2BAA2B;KACzC;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n weeksToComplete: {\n id: 'subs-dash.weeksToComplete.label',\n defaultMessage: '{count, plural, one {# week to complete} other {# weeks to complete}}',\n description: 'Label for the weeks to complete field',\n },\n level: {\n id: 'subs-dash.level.label',\n defaultMessage: '{level} level',\n description: 'Label for the level field',\n },\n});\n\nexport default messages;\n"]}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import './index.scss';
3
+ export declare const CreditFaqBanner: FC;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useIntl } from '@openedx/frontend-base';
3
+ import { Card, Button, Row, Col } from '@openedx/paragon';
4
+ import messages from '../../messages';
5
+ import './index.scss';
6
+ export const CreditFaqBanner = () => {
7
+ const { formatMessage } = useIntl();
8
+ return (_jsx(Card, { className: "mb-3 mt-4 credit-faq-banner-card", "data-testid": "credit-faq-banner-card", children: _jsxs(Card.Section, { className: "p-4", children: [_jsx(Row, { children: _jsxs(Col, { xs: 12, children: [_jsx("h5", { className: "mb-1 font-weight-bold", "data-testid": "credit-faq-banner-title", children: formatMessage(messages.programProgressPathwaysCreditPathwayFaqTitle) }), _jsx("div", { className: "card-description", "data-testid": "credit-faq-banner-description", children: formatMessage(messages.programProgressPathwaysCreditPathwayFaqDescription) })] }) }), _jsx(Row, { className: "mt-3", children: _jsx(Col, { xs: 12, className: "d-flex justify-content-end", children: _jsx(Button, { variant: "primary", className: "mr-2 d-flex align-items-center", children: formatMessage(messages.programProgressPathwaysCreditPathwayFaqButton) }) }) })] }) }));
9
+ };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/CreditFaqBanner/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,eAAe,GAAO,GAAG,EAAE;IACtC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAC,kCAAkC,iBAAa,wBAAwB,YACrF,MAAC,IAAI,CAAC,OAAO,IAAC,SAAS,EAAC,KAAK,aAC3B,KAAC,GAAG,cACF,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,aACT,aAAI,SAAS,EAAC,uBAAuB,iBAAa,yBAAyB,YAAE,aAAa,CAAC,QAAQ,CAAC,4CAA4C,CAAC,GAAM,EACvJ,cAAK,SAAS,EAAC,kBAAkB,iBAAa,+BAA+B,YAC1E,aAAa,CAAC,QAAQ,CAAC,kDAAkD,CAAC,GACvE,IACF,GACF,EAEN,KAAC,GAAG,IAAC,SAAS,EAAC,MAAM,YACnB,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,4BAA4B,YAKjD,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,SAAS,EAAC,gCAAgC,YACjE,aAAa,CAAC,QAAQ,CAAC,6CAA6C,CAAC,GAC/D,GACL,GACF,IACO,GACV,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport { Card, Button, Row, Col } from '@openedx/paragon';\n\nimport messages from '../../messages';\nimport './index.scss';\n\nexport const CreditFaqBanner: FC = () => {\n const { formatMessage } = useIntl();\n\n return (\n <Card className=\"mb-3 mt-4 credit-faq-banner-card\" data-testid=\"credit-faq-banner-card\">\n <Card.Section className=\"p-4\">\n <Row>\n <Col xs={12}>\n <h5 className=\"mb-1 font-weight-bold\" data-testid=\"credit-faq-banner-title\">{formatMessage(messages.programProgressPathwaysCreditPathwayFaqTitle)}</h5>\n <div className=\"card-description\" data-testid=\"credit-faq-banner-description\">\n {formatMessage(messages.programProgressPathwaysCreditPathwayFaqDescription)}\n </div>\n </Col>\n </Row>\n\n <Row className=\"mt-3\">\n <Col xs={12} className=\"d-flex justify-content-end\">\n {/**\n * TODO: The button shown here does not do anything at the moment.\n * ACTION ITEM: Wire this button to the appropriate URL when the FAQ page/link is known.\n */}\n <Button variant=\"primary\" className=\"mr-2 d-flex align-items-center\">\n {formatMessage(messages.programProgressPathwaysCreditPathwayFaqButton)}\n </Button>\n </Col>\n </Row>\n </Card.Section>\n </Card>\n );\n};\n"]}
@@ -0,0 +1,14 @@
1
+ $title-color: #00262B !default;
2
+ $subtitle-color: #454545 !default;
3
+
4
+ .credit-faq-banner-card{
5
+ background-color: var(--pgn-color-light-200);
6
+
7
+ .h5{
8
+ color: $title-color;
9
+ }
10
+
11
+ .card-description{
12
+ color: $subtitle-color;
13
+ }
14
+ }
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const PathwaysTabData: FC;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useIntl } from '@openedx/frontend-base';
3
+ import { ProgressCard } from '../ProgressCard';
4
+ import messages from '../messages';
5
+ import { useProgressData } from '../../../../hooks/useProgressData';
6
+ import { CreditFaqBanner } from './CreditFaqBanner';
7
+ export const PathwaysTabData = () => {
8
+ const { programProgressData, isLoading } = useProgressData();
9
+ const creditPathwayData = programProgressData === null || programProgressData === void 0 ? void 0 : programProgressData.creditPathways;
10
+ const { formatMessage } = useIntl();
11
+ const progressCards = creditPathwayData === null || creditPathwayData === void 0 ? void 0 : creditPathwayData.map((pathway) => {
12
+ const { name: title, description, destinationUrl, uuid } = pathway;
13
+ const progressCardData = {
14
+ title: title,
15
+ description: description,
16
+ destinationUrl: destinationUrl,
17
+ };
18
+ return (_jsx(ProgressCard, { progressCardData: progressCardData, isLoading: isLoading, tabType: formatMessage(messages.programProgressPathwaysTab).toLowerCase() }, uuid));
19
+ });
20
+ return (_jsxs("div", { children: [_jsx("h5", { className: "pathways-tab-title", children: formatMessage(messages.programProgressPathwaysCreditPathwayTitle) }), _jsx("p", { className: "pb-3 mb-4 pathways-tab-description", children: formatMessage(messages.programProgressPathwaysCreditPathwayDescription, {
21
+ br: '\n',
22
+ }) }), progressCards, _jsx(CreditFaqBanner, {})] }));
23
+ };
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/containers/ProgramDashboard/ProgramProgress/PathwaysTabData/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAO,GAAG,EAAE;IACtC,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,CAAC;IAC7D,MAAM,iBAAiB,GAAG,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,cAAc,CAAC;IAC9D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,MAAM,aAAa,GAAG,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACvD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAEnE,MAAM,gBAAgB,GAAG;YACvB,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,WAAW;YACxB,cAAc,EAAE,cAAc;SAC/B,CAAC;QAEF,OAAO,CACL,KAAC,YAAY,IAEX,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC,WAAW,EAAE,IAHpE,IAAI,CAIT,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,0BACE,aAAI,SAAS,EAAC,oBAAoB,YAAE,aAAa,CAAC,QAAQ,CAAC,yCAAyC,CAAC,GAAM,EAC3G,YAAG,SAAS,EAAC,oCAAoC,YAAE,aAAa,CAAC,QAAQ,CAAC,+CAA+C,EAAE;oBACzH,EAAE,EAAE,IAAI;iBACT,CAAC,GACE,EACH,aAAa,EACd,KAAC,eAAe,KAAG,IACf,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport { ProgressCard } from '../ProgressCard';\nimport messages from '../messages';\nimport { useProgressData } from '@src/hooks/useProgressData';\nimport { CreditFaqBanner } from './CreditFaqBanner';\n\nexport const PathwaysTabData: FC = () => {\n const { programProgressData, isLoading } = useProgressData();\n const creditPathwayData = programProgressData?.creditPathways;\n const { formatMessage } = useIntl();\n\n const progressCards = creditPathwayData?.map((pathway) => {\n const { name: title, description, destinationUrl, uuid } = pathway;\n\n const progressCardData = {\n title: title,\n description: description,\n destinationUrl: destinationUrl,\n };\n\n return (\n <ProgressCard\n key={uuid}\n progressCardData={progressCardData}\n isLoading={isLoading}\n tabType={formatMessage(messages.programProgressPathwaysTab).toLowerCase()}\n />\n );\n });\n\n return (\n <div>\n <h5 className=\"pathways-tab-title\">{formatMessage(messages.programProgressPathwaysCreditPathwayTitle)}</h5>\n <p className=\"pb-3 mb-4 pathways-tab-description\">{formatMessage(messages.programProgressPathwaysCreditPathwayDescription, {\n br: '\\n',\n })}\n </p>\n {progressCards}\n <CreditFaqBanner />\n </div>\n );\n};\n"]}
@@ -6,6 +6,7 @@ import messages from '../messages';
6
6
  import { RemainingTabData } from '../RemainingTabData';
7
7
  import { CompletedTabData } from '../CompletedTabData';
8
8
  import { InProgressTabData } from '../InProgressTabData';
9
+ import { PathwaysTabData } from '../PathwaysTabData';
9
10
  export const ProgramProgressTabs = ({ type, counts }) => {
10
11
  const { inProgress, remaining, completed } = counts;
11
12
  const { formatMessage } = useIntl();
@@ -32,7 +33,7 @@ export const ProgramProgressTabs = ({ type, counts }) => {
32
33
  ? [{
33
34
  key: 'pathways',
34
35
  title: formatMessage(messages.programProgressPathwaysTab),
35
- panel: _jsx("span", { children: "Pathways tab data will be available soon." }),
36
+ panel: _jsx(PathwaysTabData, {}),
36
37
  }]
37
38
  : []),
38
39
  ];