@edx/frontend-app-subscription-learner-dashboard 1.22.0 → 1.24.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/containers/Dashboard/index.js +2 -1
- package/dist/containers/Dashboard/index.js.map +1 -1
- package/dist/containers/PopularCoursePanel/index.js +3 -2
- package/dist/containers/PopularCoursePanel/index.js.map +1 -1
- package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/index.d.ts +3 -0
- package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/index.js +9 -0
- package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/index.js.map +1 -0
- package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/messages.d.ts +8 -0
- package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/messages.js +10 -0
- package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/messages.js.map +1 -0
- package/dist/containers/PopularProgramsPanel/PopularPrograms/index.d.ts +4 -0
- package/dist/containers/PopularProgramsPanel/PopularPrograms/index.js +7 -0
- package/dist/containers/PopularProgramsPanel/PopularPrograms/index.js.map +1 -0
- package/dist/containers/PopularProgramsPanel/index.d.ts +3 -0
- package/dist/containers/PopularProgramsPanel/index.js +22 -0
- package/dist/containers/PopularProgramsPanel/index.js.map +1 -0
- package/dist/containers/PopularProgramsPanel/messages.d.ts +13 -0
- package/dist/containers/PopularProgramsPanel/messages.js +15 -0
- package/dist/containers/PopularProgramsPanel/messages.js.map +1 -0
- package/dist/containers/ProductCard/index.js +1 -1
- package/dist/containers/ProductCard/index.js.map +1 -1
- package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.js +56 -9
- package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.js.map +1 -1
- package/dist/containers/SubscriptionInformation/index.scss +24 -3
- package/dist/containers/SubscriptionInformation/messages.d.ts +30 -0
- package/dist/containers/SubscriptionInformation/messages.js +30 -0
- package/dist/containers/SubscriptionInformation/messages.js.map +1 -1
- package/dist/hooks/{usePopularCourses.d.ts → usePopularCoursesAndPrograms.d.ts} +1 -1
- package/dist/hooks/{usePopularCourses.js → usePopularCoursesAndPrograms.js} +6 -6
- package/dist/hooks/usePopularCoursesAndPrograms.js.map +1 -0
- package/dist/slots.js +2 -0
- package/dist/slots.js.map +1 -1
- package/dist/widgets/LearnerDashboardHeader/app.js +0 -14
- package/dist/widgets/LearnerDashboardHeader/app.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/app.js +10 -0
- package/dist/widgets/ProgressiveProfilingQuiz/app.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/data/constants.d.ts +7 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/constants.js +7 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/constants.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/index.d.ts +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/index.js +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/index.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/index.d.ts +4 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/index.js +14 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/index.scss +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/messages.d.ts +8 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/messages.js +10 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/index.d.ts +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/index.js +22 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/BaseStep.d.ts +10 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/BaseStep.js +24 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/BaseStep.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/messages.d.ts +18 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/messages.js +20 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.d.ts +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js +15 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/messages.d.ts +13 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/messages.js +15 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.d.ts +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.js +14 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/messages.d.ts +23 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/messages.js +25 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.d.ts +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.js +15 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/messages.d.ts +13 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/messages.js +15 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.d.ts +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js +15 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.d.ts +18 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js +20 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.d.ts +2 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.js +7 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/hooks/usePopularCourses.js.map +0 -1
|
@@ -7,6 +7,7 @@ import SelectSessionModal from '../../containers/SelectSessionModal';
|
|
|
7
7
|
import { DashboardContent } from './DashboardContent';
|
|
8
8
|
import DashboardModalSlot from '../../slots/DashboardModalSlot';
|
|
9
9
|
import PopularCoursePanel from '../PopularCoursePanel';
|
|
10
|
+
import PopularProgramsPanel from '../PopularProgramsPanel';
|
|
10
11
|
import LoadingView from './LoadingView';
|
|
11
12
|
import DashboardLayout from './DashboardLayout';
|
|
12
13
|
import hooks from './hooks';
|
|
@@ -27,7 +28,7 @@ export const Dashboard = () => {
|
|
|
27
28
|
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;
|
|
28
29
|
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
|
|
29
30
|
? (_jsx(LoadingView, {}))
|
|
30
|
-
: (_jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardHeroSlot, {}), _jsx(DashboardContent, { hasCourseHistory: hasCourseHistory }), _jsx(PopularCoursePanel, {})] })) })] }) }) }));
|
|
31
|
+
: (_jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardHeroSlot, {}), _jsx(DashboardContent, { hasCourseHistory: hasCourseHistory }), _jsx(PopularCoursePanel, {}), _jsx(PopularProgramsPanel, {})] })) })] }) }) }));
|
|
31
32
|
};
|
|
32
33
|
export default Dashboard;
|
|
33
34
|
//# 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;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,oB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ACF,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';\nimport PopularProgramsPanel from '../PopularProgramsPanel';\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';\nimport DashboardHeroSlot from '@src/slots/DashboardHeroSlot';\n\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 <DashboardHeroSlot />\n <DashboardContent hasCourseHistory={hasCourseHistory} />\n <PopularCoursePanel />\n <PopularProgramsPanel />\n </DashboardLayout>\n )}\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Dashboard;\n"]}
|
|
@@ -2,15 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { Alert } from '@openedx/paragon';
|
|
4
4
|
import { useIntl } from '@openedx/frontend-base';
|
|
5
|
-
import {
|
|
5
|
+
import { usePopularCoursesAndProgramsData } from '../../hooks/usePopularCoursesAndPrograms';
|
|
6
6
|
import { useAlgoliaSearch } from '../../utils/algoliaUtils';
|
|
7
7
|
import messages from './messages';
|
|
8
8
|
import NoPopularCourseItems from './NoPopularCourseItems';
|
|
9
9
|
import PopularCourses from './PopularCourses';
|
|
10
|
+
import { PRODUCT_TYPE_COURSE } from '../../constants';
|
|
10
11
|
export const PopularCoursePanel = () => {
|
|
11
12
|
const { formatMessage } = useIntl();
|
|
12
13
|
const [searchClient] = useAlgoliaSearch();
|
|
13
|
-
const { data: popularCoursesData = [], isError, isLoading, } =
|
|
14
|
+
const { data: popularCoursesData = [], isError, isLoading, } = usePopularCoursesAndProgramsData(searchClient, true, PRODUCT_TYPE_COURSE);
|
|
14
15
|
const hasPopularCoursesData = useMemo(() => popularCoursesData.length > 0, [popularCoursesData]);
|
|
15
16
|
if (isError) {
|
|
16
17
|
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) }) }));
|
|
@@ -1 +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,CAA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,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 { usePopularCoursesAndProgramsData } from '@src/hooks/usePopularCoursesAndPrograms';\nimport { useAlgoliaSearch } from '@src/utils/algoliaUtils';\nimport messages from './messages';\nimport NoPopularCourseItems from './NoPopularCourseItems';\nimport PopularCourses from './PopularCourses';\nimport { PRODUCT_TYPE_COURSE } from '@src/constants';\n\nexport const PopularCoursePanel: FC = () => {\n const { formatMessage } = useIntl();\n const [searchClient] = useAlgoliaSearch();\n const {\n data: popularCoursesData = [],\n isError,\n isLoading,\n } = usePopularCoursesAndProgramsData(searchClient, true, PRODUCT_TYPE_COURSE);\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"]}
|
|
@@ -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 NoPopularProgramItems = () => {
|
|
5
|
+
const { formatMessage } = useIntl();
|
|
6
|
+
return (_jsx("div", { "data-testid": "no-popular-program-items", children: _jsx("p", { className: "mb-0", children: formatMessage(messages.popularProgramEmptyState) }) }));
|
|
7
|
+
};
|
|
8
|
+
export default NoPopularProgramItems;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularProgramsPanel/NoPopularProgramItems/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,qBAAqB,GAAO,GAAG,EAAE;IACrC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,OAAO,CACL,6BAAiB,0BAA0B,YACzC,YAAG,SAAS,EAAC,MAAM,YAAE,aAAa,CAAC,QAAQ,CAAC,wBAAwB,CAAC,GAAK,GACtE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import { FC } from 'react';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport messages from './messages';\n\nconst NoPopularProgramItems: FC = () => {\n const { formatMessage } = useIntl();\n\n return (\n <div data-testid=\"no-popular-program-items\">\n <p className=\"mb-0\">{formatMessage(messages.popularProgramEmptyState)}</p>\n </div>\n );\n};\n\nexport default NoPopularProgramItems;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineMessages } from '@openedx/frontend-base';
|
|
2
|
+
const messages = defineMessages({
|
|
3
|
+
popularProgramEmptyState: {
|
|
4
|
+
id: 'subs-dash.popularProgramPanel.emptyState',
|
|
5
|
+
defaultMessage: 'When you browse the edX Unlimited catalog, we\'ll show popular programs here.',
|
|
6
|
+
description: 'Placeholder text for popular programs 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/PopularProgramsPanel/NoPopularProgramItems/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,wBAAwB,EAAE;QACxB,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,+EAA+E;QAC/F,WAAW,EAAE,+CAA+C;KAC7D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularProgramEmptyState: {\n id: 'subs-dash.popularProgramPanel.emptyState',\n defaultMessage: 'When you browse the edX Unlimited catalog, we\\'ll show popular programs here.',\n description: 'Placeholder text for popular programs section',\n }\n});\n\nexport default messages;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ProductCard } from '../../ProductCard';
|
|
3
|
+
export const PopularPrograms = ({ items, isLoading }) => {
|
|
4
|
+
return (_jsx("div", { "data-testid": "popular-programs-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
|
+
};
|
|
6
|
+
export default PopularPrograms;
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/PopularProgramsPanel/PopularPrograms/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;IAChF,OAAO,CACL,6BAAiB,wBAAwB,YACvC,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,eAAe,CAAC","sourcesContent":["import { FC } from 'react';\n\nimport { ProductCard } from '../../ProductCard';\nimport { PopularProgramsProps } from './data/types';\n\nexport const PopularPrograms: FC<PopularProgramsProps> = ({ items, isLoading }) => {\n return (\n <div data-testid=\"popular-programs-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 PopularPrograms;\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { usePopularCoursesAndProgramsData } from '../../hooks/usePopularCoursesAndPrograms';
|
|
6
|
+
import { useAlgoliaSearch } from '../../utils/algoliaUtils';
|
|
7
|
+
import messages from './messages';
|
|
8
|
+
import NoPopularProgramItems from './NoPopularProgramItems';
|
|
9
|
+
import PopularPrograms from './PopularPrograms';
|
|
10
|
+
import { PRODUCT_TYPE_PROGRAM } from '../../constants';
|
|
11
|
+
export const PopularProgramsPanel = () => {
|
|
12
|
+
const { formatMessage } = useIntl();
|
|
13
|
+
const [searchClient] = useAlgoliaSearch();
|
|
14
|
+
const { data: popularProgramsData = [], isError, isLoading, } = usePopularCoursesAndProgramsData(searchClient, true, PRODUCT_TYPE_PROGRAM);
|
|
15
|
+
const hasPopularProgramsData = useMemo(() => popularProgramsData.length > 0, [popularProgramsData]);
|
|
16
|
+
if (isError) {
|
|
17
|
+
return (_jsx("div", { className: "popular-programs-container mt-5 mb-3", "data-testid": "popular-programs-panel", children: _jsx(Alert, { variant: "danger", "data-testid": "popular-programs-error", children: formatMessage(messages.popularProgramsErrorText) }) }));
|
|
18
|
+
}
|
|
19
|
+
return (_jsxs("div", { className: "popular-programs-container mt-5 mb-3", "data-testid": "popular-programs-panel", children: [_jsx("div", { className: "popular-programs-heading-container mb-4", children: _jsx("h2", { children: formatMessage(messages.popularProgramsHeader) }) }), (isLoading || hasPopularProgramsData) ? (_jsx(PopularPrograms, { items: popularProgramsData, isLoading: isLoading })) : (_jsx(NoPopularProgramItems, {}))] }));
|
|
20
|
+
};
|
|
21
|
+
export default PopularProgramsPanel;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/PopularProgramsPanel/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,E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AC,CAAC,CACF,KAAC,qBAAqB,KAAG,CAC1B,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { FC, useMemo } from 'react';\nimport { Alert } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { usePopularCoursesAndProgramsData } from '@src/hooks/usePopularCoursesAndPrograms';\nimport { useAlgoliaSearch } from '@src/utils/algoliaUtils';\nimport messages from './messages';\nimport NoPopularProgramItems from './NoPopularProgramItems';\nimport PopularPrograms from './PopularPrograms';\nimport { PRODUCT_TYPE_PROGRAM } from '@src/constants';\n\nexport const PopularProgramsPanel: FC = () => {\n const { formatMessage } = useIntl();\n const [searchClient] = useAlgoliaSearch();\n const {\n data: popularProgramsData = [],\n isError,\n isLoading,\n } = usePopularCoursesAndProgramsData(searchClient, true, PRODUCT_TYPE_PROGRAM);\n const hasPopularProgramsData = useMemo(\n () => popularProgramsData.length > 0,\n [popularProgramsData]\n );\n\n if (isError) {\n return (\n <div className=\"popular-programs-container mt-5 mb-3\" data-testid=\"popular-programs-panel\">\n <Alert variant=\"danger\" data-testid=\"popular-programs-error\">\n {formatMessage(messages.popularProgramsErrorText)}\n </Alert>\n </div>\n );\n }\n\n return (\n <div className=\"popular-programs-container mt-5 mb-3\" data-testid=\"popular-programs-panel\">\n <div className=\"popular-programs-heading-container mb-4\">\n <h2>{formatMessage(messages.popularProgramsHeader)}</h2>\n </div>\n {(isLoading || hasPopularProgramsData) ? (\n <PopularPrograms\n items={popularProgramsData}\n isLoading={isLoading}\n />\n ) : (\n <NoPopularProgramItems />\n )}\n </div>\n );\n};\n\nexport default PopularProgramsPanel;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineMessages } from '@openedx/frontend-base';
|
|
2
|
+
const messages = defineMessages({
|
|
3
|
+
popularProgramsHeader: {
|
|
4
|
+
id: 'subs-dash.popularProgramsPanel.header',
|
|
5
|
+
defaultMessage: 'Popular programs',
|
|
6
|
+
description: 'Label for the popular programs section',
|
|
7
|
+
},
|
|
8
|
+
popularProgramsErrorText: {
|
|
9
|
+
id: 'subs-dash.popularProgramsPanel.errorText',
|
|
10
|
+
defaultMessage: 'Failed to load popular programs. Please try again later.',
|
|
11
|
+
description: 'Error text for failing to load popular programs',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
export default messages;
|
|
15
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/PopularProgramsPanel/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,qBAAqB,EAAE;QACrB,EAAE,EAAE,uCAAuC;QAC3C,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,wCAAwC;KACtD;IACD,wBAAwB,EAAE;QACxB,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,0DAA0D;QAC1E,WAAW,EAAE,iDAAiD;KAC/D;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n popularProgramsHeader: {\n id: 'subs-dash.popularProgramsPanel.header',\n defaultMessage: 'Popular programs',\n description: 'Label for the popular programs section',\n },\n popularProgramsErrorText: {\n id: 'subs-dash.popularProgramsPanel.errorText',\n defaultMessage: 'Failed to load popular programs. Please try again later.',\n description: 'Error text for failing to load popular programs',\n },\n});\n\nexport default messages;\n"]}
|
|
@@ -7,6 +7,6 @@ import cardFallbackImg from '@openedx/brand-openedx/paragon/images/card-imagecap
|
|
|
7
7
|
import messages from './messages';
|
|
8
8
|
export const ProductCard = ({ item, isLoading }) => {
|
|
9
9
|
const { formatMessage } = useIntl();
|
|
10
|
-
return (_jsxs(Card, { className: "shadow-sm d-flex flex-column rounded w-100 overflow-hidden card-container", variant:
|
|
10
|
+
return (_jsxs(Card, { className: "shadow-sm d-flex flex-column rounded w-100 overflow-hidden card-container", variant: "light", "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] })] }));
|
|
11
11
|
};
|
|
12
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,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,M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,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=\"light\"\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,32 +1,79 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
2
3
|
import { Alert, Button, Icon } from '@openedx/paragon';
|
|
3
4
|
import { useIntl } from '@openedx/frontend-base';
|
|
4
5
|
import { utilHooks } from '../../../hooks';
|
|
5
6
|
import messages from '../messages';
|
|
6
7
|
import { manageSubscriptionURL } from '../../../data/constants/app';
|
|
7
8
|
import '../index.scss';
|
|
8
|
-
import { Cached } from '@openedx/paragon/icons';
|
|
9
|
+
import { Cached, WarningFilled, Cancel } from '@openedx/paragon/icons';
|
|
10
|
+
import { subscriptionRenewalURL } from '../../../data/constants/app';
|
|
9
11
|
// TODO: We can replace the below hardcoded subscriptionInformationData with the actual data from the API once we have the API ready.
|
|
10
12
|
// For now, we can use this hardcoded data to test the SubscriptionInformation component.
|
|
11
13
|
const subscriptionInformationData = {
|
|
12
14
|
isSubscribed: true,
|
|
13
|
-
|
|
15
|
+
status: 'Active', // can be 'active', 'cancelled', 'renewalFailed'
|
|
14
16
|
subscriptionStartDate: '05/22/25',
|
|
15
17
|
subscriptionEndDate: '05/22/26',
|
|
16
18
|
subscriptionRenewalDate: '05/22/26',
|
|
17
19
|
subscriptionRenewalPrice: '$36',
|
|
18
20
|
numberOfCoursesEnrolled: 5,
|
|
19
21
|
totalSavings: '$120',
|
|
20
|
-
planName: 'Monthly
|
|
22
|
+
planName: 'Monthly plan',
|
|
21
23
|
};
|
|
22
24
|
export const SubscriptionInformation = () => {
|
|
25
|
+
var _a;
|
|
23
26
|
const { formatMessage } = useIntl();
|
|
24
27
|
const formatDate = utilHooks.useFormatDate();
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const [infoBody, setInfoBody] = useState('');
|
|
29
|
+
const [infoTitle, setInfoTitle] = useState('');
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
switch (subscriptionInformationData.status.toLowerCase()) {
|
|
32
|
+
case 'active':
|
|
33
|
+
case 'trialactive':
|
|
34
|
+
setInfoTitle(formatMessage(messages.activeSubscriptionTitle, {
|
|
35
|
+
subscriptionStatus: subscriptionInformationData.status.charAt(0).toUpperCase() + subscriptionInformationData.status.slice(1),
|
|
36
|
+
planName: subscriptionInformationData.planName,
|
|
37
|
+
}));
|
|
38
|
+
setInfoBody(formatMessage(messages.renewalMessage, {
|
|
39
|
+
subscriptionRenewalDate: formatDate(subscriptionInformationData.subscriptionRenewalDate),
|
|
40
|
+
}));
|
|
41
|
+
break;
|
|
42
|
+
case 'cancelled':
|
|
43
|
+
setInfoTitle(formatMessage(messages.cancelledSubscriptionTitle, {
|
|
44
|
+
subscriptionStatus: subscriptionInformationData.status.charAt(0).toUpperCase() + subscriptionInformationData.status.slice(1),
|
|
45
|
+
planName: subscriptionInformationData.planName,
|
|
46
|
+
}));
|
|
47
|
+
setInfoBody(formatMessage(messages.cancelledSubscriptionBody, {
|
|
48
|
+
subscriptionEndDate: formatDate(subscriptionInformationData.subscriptionEndDate),
|
|
49
|
+
}));
|
|
50
|
+
break;
|
|
51
|
+
case 'renewalfailed': // also known as 'Payment Error' in figma designs
|
|
52
|
+
setInfoTitle(formatMessage(messages.renewalFailedTitle));
|
|
53
|
+
setInfoBody(formatMessage(messages.renewalFailedBody, {
|
|
54
|
+
subscriptionRenewalDate: formatDate(subscriptionInformationData.subscriptionRenewalDate),
|
|
55
|
+
}));
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}, [formatDate, formatMessage]);
|
|
59
|
+
const getSubscriptionAction = useMemo(() => {
|
|
60
|
+
if (subscriptionInformationData.status.toLowerCase() === 'cancelled') {
|
|
61
|
+
return ([
|
|
62
|
+
_jsx(Button, { "data-testid": "renew-button", className: "renew-button", variant: "tertiary", href: subscriptionRenewalURL, target: "_blank", rel: "noopener noreferrer", role: "link", children: formatMessage(messages.renewSubscriptionButton) }, "renew-subscription"),
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
else
|
|
66
|
+
return ([
|
|
67
|
+
_jsx(Button, { variant: "tertiary", "data-testid": "manage-button", href: manageSubscriptionURL, target: "_blank", rel: "noopener noreferrer", role: "link", children: formatMessage(messages.manageSubscriptionMessage) }, "manage-subscription"),
|
|
68
|
+
]);
|
|
69
|
+
}, [formatMessage]);
|
|
70
|
+
const subscriptionStatusIcons = {
|
|
71
|
+
active: Cached,
|
|
72
|
+
trialactive: Cached,
|
|
73
|
+
cancelled: Cancel,
|
|
74
|
+
renewalfailed: WarningFilled,
|
|
75
|
+
};
|
|
76
|
+
const bannerIcon = (_a = subscriptionStatusIcons[subscriptionInformationData.status.toLowerCase()]) !== null && _a !== void 0 ? _a : undefined;
|
|
77
|
+
return (_jsxs("div", { className: "container subscription-information py-5 px-4", children: [_jsx("h2", { className: "mb-4 my-subscription-heading", children: formatMessage(messages.mySubscriptionHeading) }), _jsxs(Alert, { dismissible: false, show: true, actions: getSubscriptionAction, className: "subscription-status-alert bg-white", children: [_jsxs(Alert.Heading, { as: "h6", children: [_jsx(Icon, { src: bannerIcon, className: `icon mr-1 ${bannerIcon === WarningFilled ? 'warning-icon text-warning-500' : ''}`, "data-testid": "subscription-status-icon" }), infoTitle] }), _jsx("p", { children: infoBody })] })] }));
|
|
31
78
|
};
|
|
32
79
|
//# sourceMappingURL=SubscriptionInformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionInformation.js","sourceRoot":"","sources":["../../../../src/containers/SubscriptionInformation/components/SubscriptionInformation.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SubscriptionInformation.js","sourceRoot":"","sources":["../../../../src/containers/SubscriptionInformation/components/SubscriptionInformation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,a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AC,IAT5C,oBAAoB,CAUjB;aACV,CACF,CAAC;QACJ,CAAC;;YACC,OAAO,CACL;gBACE,KAAC,MAAM,IAEL,OAAO,EAAC,UAAU,iBACN,eAAe,EAC3B,IAAI,EAAE,qBAAqB,EAC3B,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,IAAI,EAAC,MAAM,YAEV,aAAa,CAAC,QAAQ,CAAC,yBAAyB,CAAC,IAR9C,qBAAqB,CASlB;aACV,CACF,CAAC;IACN,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,uBAAuB,GAA4C;QACvE,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,MAAM;QACjB,aAAa,EAAE,aAAa;KAC7B,CAAC;IAEF,MAAM,UAAU,GAAG,MAAA,uBAAuB,CAAC,2BAA2B,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,mCAAI,SAAS,CAAC;IAE1G,OAAO,CACL,eAAK,SAAS,EAAC,8CAA8C,aAC3D,aAAI,SAAS,EAAC,8BAA8B,YAAE,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAM,EACjG,MAAC,KAAK,IACJ,WAAW,EAAE,KAAK,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAC,oCAAoC,aAE9C,MAAC,KAAK,CAAC,OAAO,IAAC,EAAE,EAAC,IAAI,aACpB,KAAC,IAAI,IAAC,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,EAAE,iBAAc,0BAA0B,GAAG,EAC9J,SAAS,IACI,EAChB,sBACG,QAAQ,GACP,IACE,IACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC, useEffect, useMemo, useState } from 'react';\nimport { Alert, Button, Icon } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\nimport { utilHooks } from '@src/hooks';\nimport messages from '../messages';\nimport { manageSubscriptionURL } from '@src/data/constants/app';\nimport '../index.scss';\nimport { Cached, WarningFilled, Cancel, Info } from '@openedx/paragon/icons';\nimport { subscriptionRenewalURL } from '@src/data/constants/app';\n\n// TODO: We can replace the below hardcoded subscriptionInformationData with the actual data from the API once we have the API ready.\n// For now, we can use this hardcoded data to test the SubscriptionInformation component.\nconst subscriptionInformationData = {\n isSubscribed: true,\n status: 'Active', // can be 'active', 'cancelled', 'renewalFailed'\n subscriptionStartDate: '05/22/25',\n subscriptionEndDate: '05/22/26',\n subscriptionRenewalDate: '05/22/26',\n subscriptionRenewalPrice: '$36',\n numberOfCoursesEnrolled: 5,\n totalSavings: '$120',\n planName: 'Monthly plan',\n};\n\nexport const SubscriptionInformation: FC = () => {\n const { formatMessage } = useIntl();\n const formatDate = utilHooks.useFormatDate();\n const [infoBody, setInfoBody] = useState('');\n const [infoTitle, setInfoTitle] = useState('');\n\n useEffect(() => {\n switch (subscriptionInformationData.status.toLowerCase()) {\n case 'active':\n case 'trialactive':\n setInfoTitle(formatMessage(messages.activeSubscriptionTitle, {\n subscriptionStatus: subscriptionInformationData.status.charAt(0).toUpperCase() + subscriptionInformationData.status.slice(1),\n planName: subscriptionInformationData.planName,\n }));\n setInfoBody(formatMessage(messages.renewalMessage, {\n subscriptionRenewalDate: formatDate(subscriptionInformationData.subscriptionRenewalDate),\n }));\n break;\n case 'cancelled':\n setInfoTitle(formatMessage(messages.cancelledSubscriptionTitle, {\n subscriptionStatus: subscriptionInformationData.status.charAt(0).toUpperCase() + subscriptionInformationData.status.slice(1),\n planName: subscriptionInformationData.planName,\n }));\n setInfoBody(formatMessage(messages.cancelledSubscriptionBody, {\n subscriptionEndDate: formatDate(subscriptionInformationData.subscriptionEndDate),\n }));\n break;\n case 'renewalfailed': // also known as 'Payment Error' in figma designs\n setInfoTitle(formatMessage(messages.renewalFailedTitle));\n setInfoBody(formatMessage(messages.renewalFailedBody, {\n subscriptionRenewalDate: formatDate(subscriptionInformationData.subscriptionRenewalDate),\n }));\n break;\n }\n }, [formatDate, formatMessage]);\n\n const getSubscriptionAction = useMemo(() => {\n if (subscriptionInformationData.status.toLowerCase() === 'cancelled') {\n return (\n [\n <Button\n key=\"renew-subscription\"\n data-testid=\"renew-button\"\n className=\"renew-button\"\n variant=\"tertiary\"\n href={subscriptionRenewalURL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n role=\"link\"\n >\n {formatMessage(messages.renewSubscriptionButton)}\n </Button>,\n ]\n );\n } else\n return (\n [\n <Button\n key=\"manage-subscription\"\n variant=\"tertiary\"\n data-testid=\"manage-button\"\n href={manageSubscriptionURL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n role=\"link\"\n >\n {formatMessage(messages.manageSubscriptionMessage)}\n </Button>,\n ]\n );\n }, [formatMessage]);\n\n const subscriptionStatusIcons: Record<string, typeof Info | undefined> = {\n active: Cached,\n trialactive: Cached,\n cancelled: Cancel,\n renewalfailed: WarningFilled,\n };\n\n const bannerIcon = subscriptionStatusIcons[subscriptionInformationData.status.toLowerCase()] ?? undefined;\n\n return (\n <div className=\"container subscription-information py-5 px-4\">\n <h2 className=\"mb-4 my-subscription-heading\">{formatMessage(messages.mySubscriptionHeading)}</h2>\n <Alert\n dismissible={false}\n show={true}\n actions={getSubscriptionAction}\n className=\"subscription-status-alert bg-white\"\n >\n <Alert.Heading as=\"h6\">\n <Icon src={bannerIcon} className={`icon mr-1 ${bannerIcon === WarningFilled ? 'warning-icon text-warning-500' : ''}`} data-testid=\"subscription-status-icon\" />\n {infoTitle}\n </Alert.Heading>\n <p>\n {infoBody}\n </p>\n </Alert>\n </div>\n );\n};\n"]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
$text-color: #002B2B !default;
|
|
2
|
+
$link-color: #00262B !default;
|
|
2
3
|
|
|
3
|
-
.subscription-information
|
|
4
|
+
.subscription-information{
|
|
4
5
|
background: var(--pgn-color-light-200);
|
|
5
6
|
|
|
6
|
-
.my-subscription-heading
|
|
7
|
+
.my-subscription-heading{
|
|
7
8
|
color: $text-color;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
.subscription-status-alert
|
|
11
|
+
.subscription-status-alert{
|
|
11
12
|
h6 {
|
|
12
13
|
margin-bottom: 0;
|
|
13
14
|
}
|
|
@@ -16,4 +17,24 @@ $text-color: #002B2B !default;
|
|
|
16
17
|
color: var(--pgn-color-black);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
20
|
+
|
|
21
|
+
.alert-heading{
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
color: $text-color;
|
|
25
|
+
|
|
26
|
+
.warning-icon {
|
|
27
|
+
color: var(--pgn-color-warning-500);
|
|
28
|
+
|
|
29
|
+
svg {
|
|
30
|
+
background-color: black;
|
|
31
|
+
clip-path: polygon(50% 8%, 4% 88%, 92% 88%);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.renew-button, .manage-button {
|
|
37
|
+
text-decoration: underline;
|
|
38
|
+
color: $link-color;
|
|
39
|
+
}
|
|
19
40
|
}
|
|
@@ -29,5 +29,35 @@ declare const messages: {
|
|
|
29
29
|
description: string;
|
|
30
30
|
defaultMessage: string;
|
|
31
31
|
};
|
|
32
|
+
activeSubscriptionTitle: {
|
|
33
|
+
id: string;
|
|
34
|
+
description: string;
|
|
35
|
+
defaultMessage: string;
|
|
36
|
+
};
|
|
37
|
+
renewalFailedTitle: {
|
|
38
|
+
id: string;
|
|
39
|
+
description: string;
|
|
40
|
+
defaultMessage: string;
|
|
41
|
+
};
|
|
42
|
+
renewalFailedBody: {
|
|
43
|
+
id: string;
|
|
44
|
+
description: string;
|
|
45
|
+
defaultMessage: string;
|
|
46
|
+
};
|
|
47
|
+
cancelledSubscriptionTitle: {
|
|
48
|
+
id: string;
|
|
49
|
+
description: string;
|
|
50
|
+
defaultMessage: string;
|
|
51
|
+
};
|
|
52
|
+
cancelledSubscriptionBody: {
|
|
53
|
+
id: string;
|
|
54
|
+
description: string;
|
|
55
|
+
defaultMessage: string;
|
|
56
|
+
};
|
|
57
|
+
renewSubscriptionButton: {
|
|
58
|
+
id: string;
|
|
59
|
+
description: string;
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
};
|
|
32
62
|
};
|
|
33
63
|
export default messages;
|
|
@@ -30,6 +30,36 @@ const messages = defineMessages({
|
|
|
30
30
|
description: 'My Subscription Heading',
|
|
31
31
|
defaultMessage: 'My subscription',
|
|
32
32
|
},
|
|
33
|
+
activeSubscriptionTitle: {
|
|
34
|
+
id: 'learner-dash.subscriptionInformation.information.activeSubscriptionTitle',
|
|
35
|
+
description: 'Message title to learners with an active subscription',
|
|
36
|
+
defaultMessage: '{subscriptionStatus}, {planName}',
|
|
37
|
+
},
|
|
38
|
+
renewalFailedTitle: {
|
|
39
|
+
id: 'learner-dash.subscriptionInformation.information.renewalFailedTitle',
|
|
40
|
+
description: 'Message title to learners when renewal fails',
|
|
41
|
+
defaultMessage: 'Subscription may expire',
|
|
42
|
+
},
|
|
43
|
+
renewalFailedBody: {
|
|
44
|
+
id: 'learner-dash.subscriptionInformation.information.renewalFailedBody',
|
|
45
|
+
description: 'Message body to learners when renewal fails',
|
|
46
|
+
defaultMessage: 'Update your payment method by {subscriptionRenewalDate} to keep your subscription active.',
|
|
47
|
+
},
|
|
48
|
+
cancelledSubscriptionTitle: {
|
|
49
|
+
id: 'learner-dash.subscriptionInformation.information.cancelledSubscriptionTitle',
|
|
50
|
+
description: 'Message to learners when subscription is cancelled',
|
|
51
|
+
defaultMessage: '{subscriptionStatus}, {planName}',
|
|
52
|
+
},
|
|
53
|
+
cancelledSubscriptionBody: {
|
|
54
|
+
id: 'learner-dash.subscriptionInformation.information.cancelledSubscriptionBody',
|
|
55
|
+
description: 'Message to learners when subscription is cancelled',
|
|
56
|
+
defaultMessage: 'You have no upcoming payments. You canceled your subscription on {subscriptionEndDate}.',
|
|
57
|
+
},
|
|
58
|
+
renewSubscriptionButton: {
|
|
59
|
+
id: 'learner-dash.subscriptionInformation.information.renewSubscriptionButton',
|
|
60
|
+
description: 'Renew Subscription',
|
|
61
|
+
defaultMessage: 'Renew Subscription',
|
|
62
|
+
},
|
|
33
63
|
});
|
|
34
64
|
export default messages;
|
|
35
65
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/SubscriptionInformation/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,aAAa,EAAE;QACb,EAAE,EAAE,qEAAqE;QACzE,WAAW,EAAE,gBAAgB;QAC7B,cAAc,EAAE,qBAAqB;KACtC;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,oEAAoE;QACxE,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,8DAA8D;KAC/E;IACD,wBAAwB,EAAE;QACxB,EAAE,EAAE,wEAAwE;QAC5E,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,iGAAiG;KAClH;IACD,cAAc,EAAE;QACd,EAAE,EAAE,uEAAuE;QAC3E,WAAW,EAAE,uBAAuB;QACpC,cAAc,EAAE,iDAAiD;KAClE;IACD,yBAAyB,EAAE;QACzB,EAAE,EAAE,qEAAqE;QACzE,WAAW,EAAE,qBAAqB;QAClC,cAAc,EAAE,wBAAwB;KACzC;IACD,qBAAqB,EAAE;QACrB,EAAE,EAAE,wEAAwE;QAC5E,WAAW,EAAE,yBAAyB;QACtC,cAAc,EAAE,iBAAiB;KAClC;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n statusMessage: {\n id: 'learner-dash.subscriptionInformation.information.subscriptionStatus',\n description: 'Status Message',\n defaultMessage: 'Subscription Status',\n },\n cancelledMessage: {\n id: 'learner-dash.subscriptionInformation.information.courseInformation',\n description: 'Information of courses enrolled and savings',\n defaultMessage: `You have saved {totalSavings} with your subscription so far!`,\n },\n coursesEnrollmentMessage: {\n id: 'learner-dash.subscriptionInformation.information.enrollmentInformation',\n description: 'Information of courses enrolled and savings',\n defaultMessage: `As a subscriber, you've enrolled in {numberOfCoursesEnrolled} courses and saved {totalSavings}.`,\n },\n renewalMessage: {\n id: 'learner-dash.subscriptionInformation.information.subscriptionSchedule',\n description: 'Subscription Schedule',\n defaultMessage: 'Your next payment is {subscriptionRenewalDate}.',\n },\n manageSubscriptionMessage: {\n id: 'learner-dash.subscriptionInformation.information.manageSubscription',\n description: 'Manage Subscription',\n defaultMessage: 'Manage my subscription',\n },\n mySubscriptionHeading: {\n id: 'learner-dash.subscriptionInformation.information.mySubscriptionHeading',\n description: 'My Subscription Heading',\n defaultMessage: 'My subscription',\n },\n});\n\nexport default messages;\n"]}
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/containers/SubscriptionInformation/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,aAAa,EAAE;QACb,EAAE,EAAE,qEAAqE;QACzE,WAAW,EAAE,gBAAgB;QAC7B,cAAc,EAAE,qBAAqB;KACtC;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,oEAAoE;QACxE,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,8DAA8D;KAC/E;IACD,wBAAwB,EAAE;QACxB,EAAE,EAAE,wEAAwE;QAC5E,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,iGAAiG;KAClH;IACD,cAAc,EAAE;QACd,EAAE,EAAE,uEAAuE;QAC3E,WAAW,EAAE,uBAAuB;QACpC,cAAc,EAAE,iDAAiD;KAClE;IACD,yBAAyB,EAAE;QACzB,EAAE,EAAE,qEAAqE;QACzE,WAAW,EAAE,qBAAqB;QAClC,cAAc,EAAE,wBAAwB;KACzC;IACD,qBAAqB,EAAE;QACrB,EAAE,EAAE,wEAAwE;QAC5E,WAAW,EAAE,yBAAyB;QACtC,cAAc,EAAE,iBAAiB;KAClC;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,0EAA0E;QAC9E,WAAW,EAAE,uDAAuD;QACpE,cAAc,EAAE,kCAAkC;KACnD;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,qEAAqE;QACzE,WAAW,EAAE,8CAA8C;QAC3D,cAAc,EAAE,yBAAyB;KAC1C;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,oEAAoE;QACxE,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,2FAA2F;KAC5G;IACD,0BAA0B,EAAE;QAC1B,EAAE,EAAE,6EAA6E;QACjF,WAAW,EAAE,oDAAoD;QACjE,cAAc,EAAE,kCAAkC;KACnD;IACD,yBAAyB,EAAE;QACzB,EAAE,EAAE,4EAA4E;QAChF,WAAW,EAAE,oDAAoD;QACjE,cAAc,EAAE,yFAAyF;KAC1G;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,0EAA0E;QAC9E,WAAW,EAAE,oBAAoB;QACjC,cAAc,EAAE,oBAAoB;KACrC;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n statusMessage: {\n id: 'learner-dash.subscriptionInformation.information.subscriptionStatus',\n description: 'Status Message',\n defaultMessage: 'Subscription Status',\n },\n cancelledMessage: {\n id: 'learner-dash.subscriptionInformation.information.courseInformation',\n description: 'Information of courses enrolled and savings',\n defaultMessage: `You have saved {totalSavings} with your subscription so far!`,\n },\n coursesEnrollmentMessage: {\n id: 'learner-dash.subscriptionInformation.information.enrollmentInformation',\n description: 'Information of courses enrolled and savings',\n defaultMessage: `As a subscriber, you've enrolled in {numberOfCoursesEnrolled} courses and saved {totalSavings}.`,\n },\n renewalMessage: {\n id: 'learner-dash.subscriptionInformation.information.subscriptionSchedule',\n description: 'Subscription Schedule',\n defaultMessage: 'Your next payment is {subscriptionRenewalDate}.',\n },\n manageSubscriptionMessage: {\n id: 'learner-dash.subscriptionInformation.information.manageSubscription',\n description: 'Manage Subscription',\n defaultMessage: 'Manage my subscription',\n },\n mySubscriptionHeading: {\n id: 'learner-dash.subscriptionInformation.information.mySubscriptionHeading',\n description: 'My Subscription Heading',\n defaultMessage: 'My subscription',\n },\n activeSubscriptionTitle: {\n id: 'learner-dash.subscriptionInformation.information.activeSubscriptionTitle',\n description: 'Message title to learners with an active subscription',\n defaultMessage: '{subscriptionStatus}, {planName}',\n },\n renewalFailedTitle: {\n id: 'learner-dash.subscriptionInformation.information.renewalFailedTitle',\n description: 'Message title to learners when renewal fails',\n defaultMessage: 'Subscription may expire',\n },\n renewalFailedBody: {\n id: 'learner-dash.subscriptionInformation.information.renewalFailedBody',\n description: 'Message body to learners when renewal fails',\n defaultMessage: 'Update your payment method by {subscriptionRenewalDate} to keep your subscription active.',\n },\n cancelledSubscriptionTitle: {\n id: 'learner-dash.subscriptionInformation.information.cancelledSubscriptionTitle',\n description: 'Message to learners when subscription is cancelled',\n defaultMessage: '{subscriptionStatus}, {planName}',\n },\n cancelledSubscriptionBody: {\n id: 'learner-dash.subscriptionInformation.information.cancelledSubscriptionBody',\n description: 'Message to learners when subscription is cancelled',\n defaultMessage: 'You have no upcoming payments. You canceled your subscription on {subscriptionEndDate}.',\n },\n renewSubscriptionButton: {\n id: 'learner-dash.subscriptionInformation.information.renewSubscriptionButton',\n description: 'Renew Subscription',\n defaultMessage: 'Renew Subscription',\n },\n});\n\nexport default messages;\n"]}
|
|
@@ -8,4 +8,4 @@ export declare const searchKeys: {
|
|
|
8
8
|
courses: (query: string, tags: string[], page: number) => readonly ["search", "courses", string, string[], number];
|
|
9
9
|
popular: (productType: ProductType, limit: number) => readonly ["search", "popular", ProductType, number];
|
|
10
10
|
};
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const usePopularCoursesAndProgramsData: (searchClient: SearchClient | null, enabled: boolean, productType?: ProductType) => UseQueryResult<ProductCardItem[]>;
|
|
@@ -18,10 +18,10 @@ export const searchKeys = {
|
|
|
18
18
|
courses: (query, tags, page) => [...searchKeys.all, 'courses', query, tags, page],
|
|
19
19
|
popular: (productType, limit) => [...searchKeys.all, 'popular', productType, limit],
|
|
20
20
|
};
|
|
21
|
-
export const
|
|
22
|
-
queryKey: searchKeys.popular(
|
|
21
|
+
export const usePopularCoursesAndProgramsData = (searchClient, enabled, productType = PRODUCT_TYPE_COURSE) => useQuery({
|
|
22
|
+
queryKey: searchKeys.popular(productType, 4),
|
|
23
23
|
queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
-
const hits = yield fetchPopularProducts(searchClient,
|
|
24
|
+
const hits = yield fetchPopularProducts(searchClient, productType, 4);
|
|
25
25
|
return hits.map((hit) => {
|
|
26
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
27
27
|
const hitDetails = hit;
|
|
@@ -31,8 +31,8 @@ export const usePopularCoursesData = (searchClient, enabled) => useQuery({
|
|
|
31
31
|
primary_description: (_e = (_d = (_c = hitDetails.primary_description) !== null && _c !== void 0 ? _c : hitDetails.short_description) !== null && _d !== void 0 ? _d : hitDetails.description) !== null && _e !== void 0 ? _e : '',
|
|
32
32
|
url: (_h = (_g = (_f = hitDetails.card_image_url) !== null && _f !== void 0 ? _f : hitDetails.image_url) !== null && _g !== void 0 ? _g : hitDetails.marketing_url) !== null && _h !== void 0 ? _h : '',
|
|
33
33
|
thumbnail: (_j = hitDetails.organization_logo_override) !== null && _j !== void 0 ? _j : '',
|
|
34
|
-
content_type: (_l = (_k = hitDetails.content_type) !== null && _k !== void 0 ? _k : hitDetails.
|
|
35
|
-
product:
|
|
34
|
+
content_type: (_l = (_k = hitDetails.content_type) !== null && _k !== void 0 ? _k : hitDetails.product) !== null && _l !== void 0 ? _l : 'Course',
|
|
35
|
+
product: productType,
|
|
36
36
|
partner: (_m = hitDetails.partner) !== null && _m !== void 0 ? _m : '',
|
|
37
37
|
weeks_to_complete: (_o = hitDetails.weeks_to_complete) !== null && _o !== void 0 ? _o : undefined,
|
|
38
38
|
level: (_p = hitDetails.level) !== null && _p !== void 0 ? _p : undefined,
|
|
@@ -42,4 +42,4 @@ export const usePopularCoursesData = (searchClient, enabled) => useQuery({
|
|
|
42
42
|
enabled: !!searchClient && enabled,
|
|
43
43
|
staleTime: 1000 * 60 * 10,
|
|
44
44
|
});
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=usePopularCoursesAndPrograms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopularCoursesAndPrograms.js","sourceRoot":"","sources":["../../src/hooks/usePopularCoursesAndPrograms.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,iFAAiF;AACjF,oDAAoD;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE,CAAC,QAAQ,CAAU;IACxB,QAAQ,EAAE,CAAC,KAAa,EAAE,IAAc,EAAE,EAAE,CAC1C,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAU;IACvD,OAAO,EAAE,CAAC,KAAa,EAAE,IAAc,EAAE,IAAY,EAAE,EAAE,CACvD,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAU;IAC5D,OAAO,EAAE,CAAC,WAAwB,EAAE,KAAa,EAAE,E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ACrC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAA;IACD,OAAO,EAAE,CAAC,CAAC,YAAY,IAAI,OAAO;IAClC,SAAS,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE;CAC1B,CAAC,CAAC","sourcesContent":["import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { SearchClient } from 'algoliasearch';\nimport { ProductType } from '@src/types/types';\nimport { PRODUCT_TYPE_COURSE } from '@src/constants';\nimport { fetchPopularProducts } from '@src/utils/algoliaUtils';\nimport { ProductCardItem } from '@src/containers/ProductCard/data/types';\n\n// ─── Query key factories ──────────────────────────────────────────────────────\n// Centralised so cache invalidation is never a typo\n\nexport const searchKeys = {\n all: ['search'] as const,\n programs: (query: string, tags: string[]) =>\n [...searchKeys.all, 'programs', query, tags] as const,\n courses: (query: string, tags: string[], page: number) =>\n [...searchKeys.all, 'courses', query, tags, page] as const,\n popular: (productType: ProductType, limit: number) =>\n [...searchKeys.all, 'popular', productType, limit] as const,\n};\n\nexport const usePopularCoursesAndProgramsData = (\n searchClient: SearchClient | null,\n enabled: boolean,\n productType: ProductType = PRODUCT_TYPE_COURSE\n): UseQueryResult<ProductCardItem[]> =>\n useQuery({\n queryKey: searchKeys.popular(productType, 4),\n queryFn: async () => {\n const hits = await fetchPopularProducts(searchClient!, productType, 4);\n return hits.map((hit): ProductCardItem => {\n const hitDetails = hit as {\n short_description?: string,\n primary_description?: string,\n description?: string,\n marketing_url?: string,\n image_url?: string,\n card_image_url?: string,\n organization_logo_override?: string,\n content_type?: string,\n product?: string,\n partner?: string,\n weeks_to_complete?: number,\n level?: string,\n };\n\n return {\n objectID: hit.objectID,\n title: hit.title ?? hit.name ?? 'Untitled',\n primary_description: hitDetails.primary_description ?? hitDetails.short_description ?? hitDetails.description ?? '',\n url: hitDetails.card_image_url ?? hitDetails.image_url ?? hitDetails.marketing_url ?? '',\n thumbnail: hitDetails.organization_logo_override ?? '',\n content_type: hitDetails.content_type ?? hitDetails.product ?? 'Course',\n product: productType,\n partner: hitDetails.partner ?? '',\n weeks_to_complete: hitDetails.weeks_to_complete ?? undefined,\n level: hitDetails.level ?? undefined,\n };\n });\n },\n enabled: !!searchClient && enabled,\n staleTime: 1000 * 60 * 10,\n });\n"]}
|
package/dist/slots.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { learnerDashboardHeaderApp } from './widgets/LearnerDashboardHeader';
|
|
2
|
+
import { progressiveProfilingApp } from './widgets/ProgressiveProfilingQuiz';
|
|
2
3
|
const slots = [
|
|
3
4
|
...learnerDashboardHeaderApp.slots,
|
|
5
|
+
...progressiveProfilingApp.slots,
|
|
4
6
|
];
|
|
5
7
|
export default slots;
|
|
6
8
|
//# sourceMappingURL=slots.js.map
|