@edx/frontend-app-subscription-learner-dashboard 1.20.0 → 1.22.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 (37) hide show
  1. package/dist/containers/Dashboard/index.js +2 -1
  2. package/dist/containers/Dashboard/index.js.map +1 -1
  3. package/dist/providers.js +2 -0
  4. package/dist/providers.js.map +1 -1
  5. package/dist/slots/DashboardHeroSlot/index.d.ts +2 -0
  6. package/dist/slots/DashboardHeroSlot/index.js +5 -0
  7. package/dist/slots/DashboardHeroSlot/index.js.map +1 -0
  8. package/dist/slots.js +1 -1
  9. package/dist/slots.js.map +1 -1
  10. package/dist/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.d.ts +20 -0
  11. package/dist/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.js +43 -0
  12. package/dist/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.js.map +1 -0
  13. package/dist/widgets/ProgressiveProfilingQuiz/app.d.ts +3 -0
  14. package/dist/widgets/ProgressiveProfilingQuiz/app.js +9 -0
  15. package/dist/widgets/ProgressiveProfilingQuiz/app.js.map +1 -0
  16. package/dist/widgets/ProgressiveProfilingQuiz/data/api/fetchSkills.d.ts +11 -0
  17. package/dist/widgets/ProgressiveProfilingQuiz/data/api/fetchSkills.js +45 -0
  18. package/dist/widgets/ProgressiveProfilingQuiz/data/api/fetchSkills.js.map +1 -0
  19. package/dist/widgets/ProgressiveProfilingQuiz/data/index.d.ts +2 -0
  20. package/dist/widgets/ProgressiveProfilingQuiz/data/index.js +3 -0
  21. package/dist/widgets/ProgressiveProfilingQuiz/data/index.js.map +1 -0
  22. package/dist/widgets/ProgressiveProfilingQuiz/data/jobsList.d.ts +8 -0
  23. package/dist/widgets/ProgressiveProfilingQuiz/data/jobsList.js +102 -0
  24. package/dist/widgets/ProgressiveProfilingQuiz/data/jobsList.js.map +1 -0
  25. package/dist/widgets/ProgressiveProfilingQuiz/data/queryHooks.d.ts +7 -0
  26. package/dist/widgets/ProgressiveProfilingQuiz/data/queryHooks.js +18 -0
  27. package/dist/widgets/ProgressiveProfilingQuiz/data/queryHooks.js.map +1 -0
  28. package/dist/widgets/ProgressiveProfilingQuiz/data/queryKeys.d.ts +4 -0
  29. package/dist/widgets/ProgressiveProfilingQuiz/data/queryKeys.js +6 -0
  30. package/dist/widgets/ProgressiveProfilingQuiz/data/queryKeys.js.map +1 -0
  31. package/dist/widgets/ProgressiveProfilingQuiz/data/types.d.ts +5 -0
  32. package/dist/widgets/ProgressiveProfilingQuiz/data/types.js +2 -0
  33. package/dist/widgets/ProgressiveProfilingQuiz/data/types.js.map +1 -0
  34. package/dist/widgets/ProgressiveProfilingQuiz/index.d.ts +2 -0
  35. package/dist/widgets/ProgressiveProfilingQuiz/index.js +3 -0
  36. package/dist/widgets/ProgressiveProfilingQuiz/index.js.map +1 -0
  37. package/package.json +2 -2
@@ -14,6 +14,7 @@ import './index.scss';
14
14
  import { SubscriptionBanner } from '../SubscriptionBanner';
15
15
  import { DashboardTitle } from './DashboardTitle';
16
16
  import { useInitializeSubsDashboard } from '../../data/hooks';
17
+ import DashboardHeroSlot from '../../slots/DashboardHeroSlot';
17
18
  export const Dashboard = () => {
18
19
  var _a, _b, _c;
19
20
  const { data, isPending } = useInitializeSubsCourseDashboard();
@@ -26,7 +27,7 @@ export const Dashboard = () => {
26
27
  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;
27
28
  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
28
29
  ? (_jsx(LoadingView, {}))
29
- : (_jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardContent, { hasCourseHistory: hasCourseHistory }), _jsx(PopularCoursePanel, {})] })) })] }) }) }));
30
+ : (_jsxs(DashboardLayout, { children: [_jsx(DashboardHeader, { startDate: userSubscriptionStartDate }), _jsx(SubscriptionBanner, {}), _jsx(DashboardTitle, {}), _jsx(DashboardHeroSlot, {}), _jsx(DashboardContent, { hasCourseHistory: hasCourseHistory }), _jsx(PopularCoursePanel, {})] })) })] }) }) }));
30
31
  };
31
32
  export default Dashboard;
32
33
  //# 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,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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C,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
+ {"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;AAC7D,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAG7D,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;;IAC5B,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,gCAAgC,EAAE,CAAC;IAC/D,MAAM,EAAE,I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EAClB,KAAC,iBAAiB,KAAG,EACrB,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';\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 </DashboardLayout>\n )}\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Dashboard;\n"]}
package/dist/providers.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import GlobalDataProvider from './data/contexts/GlobalDataProvider';
2
2
  import { MasqueradeProvider } from './data/context/MasqueradeProvider';
3
+ import { ProgressiveProfilingQuizProvider } from './widgets/ProgressiveProfilingQuiz';
3
4
  const providers = [
4
5
  GlobalDataProvider,
5
6
  MasqueradeProvider,
7
+ ProgressiveProfilingQuizProvider,
6
8
  ];
7
9
  export default providers;
8
10
  //# sourceMappingURL=providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,SAAS,GAAkB;IAC/B,kBAAkB;IAClB,kBAAkB;CACnB,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { AppProvider } from '@openedx/frontend-base';\n\nimport GlobalDataProvider from './data/contexts/GlobalDataProvider';\nimport { MasqueradeProvider } from './data/context/MasqueradeProvider';\n\nconst providers: AppProvider[] = [\n GlobalDataProvider,\n MasqueradeProvider,\n];\n\nexport default providers;\n"]}
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,MAAM,SAAS,GAAkB;IAC/B,kBAAkB;IAClB,kBAAkB;IAClB,gCAAgC;CACjC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { AppProvider } from '@openedx/frontend-base';\n\nimport GlobalDataProvider from './data/contexts/GlobalDataProvider';\nimport { MasqueradeProvider } from './data/context/MasqueradeProvider';\nimport { ProgressiveProfilingQuizProvider } from './widgets/ProgressiveProfilingQuiz';\n\nconst providers: AppProvider[] = [\n GlobalDataProvider,\n MasqueradeProvider,\n ProgressiveProfilingQuizProvider,\n];\n\nexport default providers;\n"]}
@@ -0,0 +1,2 @@
1
+ declare const DashboardHeroSlot: () => import("react/jsx-runtime").JSX.Element;
2
+ export default DashboardHeroSlot;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from '@openedx/frontend-base';
3
+ const DashboardHeroSlot = () => (_jsx(Slot, { id: "org.2u-edx.subscriptionLearnerDashboard.hero.slot" }));
4
+ export default DashboardHeroSlot;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/DashboardHeroSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,CAC9B,KAAC,IAAI,IAAC,EAAE,EAAC,mDAAmD,GAAG,CAChE,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nconst DashboardHeroSlot = () => (\n <Slot id=\"org.2u-edx.subscriptionLearnerDashboard.hero.slot\" />\n);\n\nexport default DashboardHeroSlot;\n"]}
package/dist/slots.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { learnerDashboardHeaderApp } from './widgets/LearnerDashboardHeader';
2
2
  const slots = [
3
- ...learnerDashboardHeaderApp.slots
3
+ ...learnerDashboardHeaderApp.slots,
4
4
  ];
5
5
  export default slots;
6
6
  //# sourceMappingURL=slots.js.map
package/dist/slots.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"slots.js","sourceRoot":"","sources":["../src/slots.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,KAAK,GAAoB;IAC7B,GAAI,yBAAyB,CAAC,KAAY;CAC3C,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import { SlotOperation } from '@openedx/frontend-base';\n\nimport { learnerDashboardHeaderApp } from './widgets/LearnerDashboardHeader';\n\nconst slots: SlotOperation[] = [\n ...(learnerDashboardHeaderApp.slots as [])\n];\n\nexport default slots;\n"]}
1
+ {"version":3,"file":"slots.js","sourceRoot":"","sources":["../src/slots.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,KAAK,GAAoB;IAC7B,GAAI,yBAAyB,CAAC,KAAY;CAC3C,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import { SlotOperation } from '@openedx/frontend-base';\n\nimport { learnerDashboardHeaderApp } from './widgets/LearnerDashboardHeader';\n\nconst slots: SlotOperation[] = [\n ...(learnerDashboardHeaderApp.slots as []),\n];\n\nexport default slots;\n"]}
@@ -0,0 +1,20 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface ProgressiveProfilingQuizContextType {
3
+ isModalOpen: boolean;
4
+ openModal: () => void;
5
+ closeModal: () => void;
6
+ currentStep: number;
7
+ setCurrentStep: (step: number) => void;
8
+ goToNextStep: () => void;
9
+ goToPreviousStep: () => void;
10
+ answers: Record<string, string>;
11
+ setAnswer: (question: string, answer: string) => void;
12
+ isComplete: boolean;
13
+ setIsComplete: (isComplete: boolean) => void;
14
+ }
15
+ interface ProgressiveProfilingQuizProviderProps {
16
+ children: ReactNode;
17
+ }
18
+ export declare const ProgressiveProfilingQuizProvider: React.FC<ProgressiveProfilingQuizProviderProps>;
19
+ export declare const useProgressiveProfilingQuiz: () => ProgressiveProfilingQuizContextType;
20
+ export {};
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, useMemo, useState, useCallback, } from 'react';
3
+ const ProgressiveProfilingQuizContext = createContext(null);
4
+ export const ProgressiveProfilingQuizProvider = ({ children }) => {
5
+ const [isModalOpen, setIsModalOpen] = useState(false);
6
+ const [currentStep, setCurrentStep] = useState(0);
7
+ const [answers, setAnswers] = useState({});
8
+ const [isComplete, setIsComplete] = useState(false);
9
+ const openModal = useCallback(() => setIsModalOpen(true), []);
10
+ const closeModal = useCallback(() => setIsModalOpen(false), []);
11
+ const goToNextStep = useCallback(() => setCurrentStep(prev => prev + 1), []);
12
+ const goToPreviousStep = useCallback(() => setCurrentStep(prev => Math.max(0, prev - 1)), []);
13
+ const setAnswer = useCallback((question, answer) => {
14
+ setAnswers(prev => (Object.assign(Object.assign({}, prev), { [question]: answer })));
15
+ }, []);
16
+ const contextValue = useMemo(() => ({
17
+ isModalOpen,
18
+ openModal,
19
+ closeModal,
20
+ currentStep,
21
+ setCurrentStep,
22
+ goToNextStep,
23
+ goToPreviousStep,
24
+ answers,
25
+ setAnswer,
26
+ isComplete,
27
+ setIsComplete,
28
+ }), [
29
+ isModalOpen, openModal, closeModal,
30
+ currentStep, goToNextStep, goToPreviousStep,
31
+ answers, setAnswer,
32
+ isComplete,
33
+ ]);
34
+ return (_jsx(ProgressiveProfilingQuizContext.Provider, { value: contextValue, children: children }));
35
+ };
36
+ export const useProgressiveProfilingQuiz = () => {
37
+ const context = useContext(ProgressiveProfilingQuizContext);
38
+ if (!context) {
39
+ throw new Error('useProgressiveProfilingQuiz must be used within a ProgressiveProfilingQuizProvider');
40
+ }
41
+ return context;
42
+ };
43
+ //# sourceMappingURL=ProgressiveProfilingQuizProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressiveProfilingQuizProvider.js","sourceRoot":"","sources":["../../../src/widgets/ProgressiveProfilingQuiz/ProgressiveProfil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AAM,IAAI,KAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAG,CAAC,CAAC;IACxD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAClC,WAAW;QACX,SAAS;QACT,UAAU;QACV,WAAW;QACX,cAAc;QACd,YAAY;QACZ,gBAAgB;QAChB,OAAO;QACP,SAAS;QACT,UAAU;QACV,aAAa;KACd,CAAC,EAAE;QACF,WAAW,EAAE,SAAS,EAAE,UAAU;QAClC,WAAW,EAAE,YAAY,EAAE,gBAAgB;QAC3C,OAAO,EAAE,SAAS;QAClB,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,+BAA+B,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAC1D,QAAQ,GACgC,CAC5C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAwC,EAAE;IACnF,MAAM,OAAO,GAAG,UAAU,CAAC,+BAA+B,CAAC,CAAC;IAC5D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import React, {\n createContext, useContext, useMemo, useState, ReactNode, useCallback,\n} from 'react';\n\ninterface ProgressiveProfilingQuizContextType {\n isModalOpen: boolean,\n openModal: () => void,\n closeModal: () => void,\n currentStep: number,\n setCurrentStep: (step: number) => void,\n goToNextStep: () => void,\n goToPreviousStep: () => void,\n answers: Record<string, string>,\n setAnswer: (question: string, answer: string) => void,\n isComplete: boolean,\n setIsComplete: (isComplete: boolean) => void,\n}\n\nconst ProgressiveProfilingQuizContext = createContext<ProgressiveProfilingQuizContextType | null>(null);\n\ninterface ProgressiveProfilingQuizProviderProps {\n children: ReactNode,\n}\n\nexport const ProgressiveProfilingQuizProvider: React.FC<ProgressiveProfilingQuizProviderProps> = ({ children }) => {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [currentStep, setCurrentStep] = useState(0);\n const [answers, setAnswers] = useState<Record<string, string>>({});\n const [isComplete, setIsComplete] = useState(false);\n\n const openModal = useCallback(() => setIsModalOpen(true), []);\n const closeModal = useCallback(() => setIsModalOpen(false), []);\n\n const goToNextStep = useCallback(() => setCurrentStep(prev => prev + 1), []);\n const goToPreviousStep = useCallback(() => setCurrentStep(prev => Math.max(0, prev - 1)), []);\n\n const setAnswer = useCallback((question: string, answer: string) => {\n setAnswers(prev => ({ ...prev, [question]: answer }));\n }, []);\n\n const contextValue = useMemo(() => ({\n isModalOpen,\n openModal,\n closeModal,\n currentStep,\n setCurrentStep,\n goToNextStep,\n goToPreviousStep,\n answers,\n setAnswer,\n isComplete,\n setIsComplete,\n }), [\n isModalOpen, openModal, closeModal,\n currentStep, goToNextStep, goToPreviousStep,\n answers, setAnswer,\n isComplete,\n ]);\n\n return (\n <ProgressiveProfilingQuizContext.Provider value={contextValue}>\n {children}\n </ProgressiveProfilingQuizContext.Provider>\n );\n};\n\nexport const useProgressiveProfilingQuiz = (): ProgressiveProfilingQuizContextType => {\n const context = useContext(ProgressiveProfilingQuizContext);\n if (!context) {\n throw new Error('useProgressiveProfilingQuiz must be used within a ProgressiveProfilingQuizProvider');\n }\n return context;\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import { App } from '@openedx/frontend-base';
2
+ declare const app: App;
3
+ export default app;
@@ -0,0 +1,9 @@
1
+ import { ProgressiveProfilingQuizProvider } from './ProgressiveProfilingQuizProvider';
2
+ const app = {
3
+ appId: 'org.2u-edx.frontend.app.progressiveProfiling',
4
+ providers: [
5
+ ProgressiveProfilingQuizProvider,
6
+ ],
7
+ };
8
+ export default app;
9
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/ProgressiveProfilingQuiz/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,MAAM,GAAG,GAAQ;IACf,KAAK,EAAE,8CAA8C;IACrD,SAAS,EAAE;QACT,gCAAgC;KACjC;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App } from '@openedx/frontend-base';\nimport { ProgressiveProfilingQuizProvider } from './ProgressiveProfilingQuizProvider';\n\nconst app: App = {\n appId: 'org.2u-edx.frontend.app.progressiveProfiling',\n providers: [\n ProgressiveProfilingQuizProvider,\n ],\n};\n\nexport default app;\n"]}
@@ -0,0 +1,11 @@
1
+ import { SearchClient } from 'algoliasearch';
2
+ import { SkillWithCount } from '../types';
3
+ /**
4
+ * Fetches every distinct skill value present across the whole product index
5
+ * (programs and courses combined), with each skill's matching record count.
6
+ * Used to populate the quiz's skills-based question options.
7
+ *
8
+ * @param searchClient Algolia client from useAlgoliaSearch()
9
+ * @returns Skill values with counts, sorted by descending count
10
+ */
11
+ export declare const fetchSkills: (searchClient: SearchClient) => Promise<SkillWithCount[]>;
@@ -0,0 +1,45 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { getAppConfig, logError } from '@openedx/frontend-base';
11
+ import { appId } from '../../../../constants';
12
+ // Facet attribute name in ALGOLIA_PRODUCT_INDEX_NAME — update if the index changes.
13
+ const FACET_SKILLS = 'skills.skill';
14
+ /**
15
+ * Fetches every distinct skill value present across the whole product index
16
+ * (programs and courses combined), with each skill's matching record count.
17
+ * Used to populate the quiz's skills-based question options.
18
+ *
19
+ * @param searchClient Algolia client from useAlgoliaSearch()
20
+ * @returns Skill values with counts, sorted by descending count
21
+ */
22
+ export const fetchSkills = (searchClient) => __awaiter(void 0, void 0, void 0, function* () {
23
+ var _a;
24
+ const indexName = getAppConfig(appId).ALGOLIA_PRODUCT_INDEX_NAME;
25
+ try {
26
+ const { facets } = yield searchClient.searchSingleIndex({
27
+ indexName,
28
+ searchParams: {
29
+ query: '',
30
+ facets: [FACET_SKILLS],
31
+ hitsPerPage: 0,
32
+ },
33
+ });
34
+ const skillCounts = (_a = facets === null || facets === void 0 ? void 0 : facets[FACET_SKILLS]) !== null && _a !== void 0 ? _a : {};
35
+ return Object.entries(skillCounts)
36
+ .map(([value, count]) => ({ value, count }))
37
+ .sort((a, b) => b.count - a.count);
38
+ }
39
+ catch (error) {
40
+ const err = error instanceof Error ? error : new Error(String(error));
41
+ logError(err);
42
+ return [];
43
+ }
44
+ });
45
+ //# sourceMappingURL=fetchSkills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchSkills.js","sourceRoot":"","sources":["../../../../../src/widgets/ProgressiveProfilingQuiz/data/api/fetchSkills.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,oFAAoF;AACpF,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,YAA0B,EACC,EAAE;;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,0BAAoC,CAAC;IAE3E,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC;YACtD,SAAS;YACT,YAAY,EAAE;gBACZ,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE,CAAC,YAAY,CAAC;gBACtB,WAAW,EAAE,CAAC;aACf;SACF,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,YAAY,CAAC,mCAAI,EAAE,CAAC;QACjD,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;aAC/B,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;aAC3C,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,QAAQ,CAAC,GAAG,CAAC,CAAC;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC,CAAA,CAAC","sourcesContent":["import { getAppConfig, logError } from '@openedx/frontend-base';\nimport { SearchClient } from 'algoliasearch';\n\nimport { appId } from '@src/constants';\n\nimport { SkillWithCount } from '../types';\n\n// Facet attribute name in ALGOLIA_PRODUCT_INDEX_NAME — update if the index changes.\nconst FACET_SKILLS = 'skills.skill';\n\n/**\n * Fetches every distinct skill value present across the whole product index\n * (programs and courses combined), with each skill's matching record count.\n * Used to populate the quiz's skills-based question options.\n *\n * @param searchClient Algolia client from useAlgoliaSearch()\n * @returns Skill values with counts, sorted by descending count\n */\nexport const fetchSkills = async (\n searchClient: SearchClient,\n): Promise<SkillWithCount[]> => {\n const indexName = getAppConfig(appId).ALGOLIA_PRODUCT_INDEX_NAME as string;\n\n try {\n const { facets } = await searchClient.searchSingleIndex({\n indexName,\n searchParams: {\n query: '',\n facets: [FACET_SKILLS],\n hitsPerPage: 0,\n },\n });\n\n const skillCounts = facets?.[FACET_SKILLS] ?? {};\n return Object.entries(skillCounts)\n .map(([value, count]) => ({ value, count }))\n .sort((a, b) => b.count - a.count);\n } catch (error) {\n const err = error instanceof Error ? error : new Error(String(error));\n logError(err);\n return [];\n }\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export { useSkills } from './queryHooks';
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export { useSkills } from './queryHooks';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export * from './types';\nexport { useSkills } from './queryHooks';\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This is a list of hardcoded jobs to use for the job select dropdown. The list returned from the `prod_taxonomy` index contains results that are unnecessarily specific (i.e. Bike Mechanic) so we have them listed out here instead.
3
+ */
4
+ interface Job {
5
+ jobTitle: string;
6
+ }
7
+ export declare const jobsList: Job[];
8
+ export default jobsList;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * This is a list of hardcoded jobs to use for the job select dropdown. The list returned from the `prod_taxonomy` index contains results that are unnecessarily specific (i.e. Bike Mechanic) so we have them listed out here instead.
3
+ */
4
+ export const jobsList = [
5
+ { jobTitle: 'Android Developer' },
6
+ { jobTitle: 'Application Developer' },
7
+ { jobTitle: 'Back End Developer' },
8
+ { jobTitle: 'Business Systems Analyst' },
9
+ { jobTitle: 'Cybersecurity Analyst' },
10
+ { jobTitle: 'DevOps Engineer' },
11
+ { jobTitle: 'Front End Developer' },
12
+ { jobTitle: 'Front End Software Engineer' },
13
+ { jobTitle: 'Full Stack Developer' },
14
+ { jobTitle: 'Full Stack Software Engineer' },
15
+ { jobTitle: 'IT Support Specialist' },
16
+ { jobTitle: 'Java Developer' },
17
+ { jobTitle: 'Lead Software Engineer' },
18
+ { jobTitle: 'Mobile Developer' },
19
+ { jobTitle: 'Principal Software Engineer' },
20
+ { jobTitle: 'Quality Assurance Analyst' },
21
+ { jobTitle: 'Software Developer' },
22
+ { jobTitle: 'Software Development Engineer' },
23
+ { jobTitle: 'Software Engineer' },
24
+ { jobTitle: 'Software Engineering Intern' },
25
+ { jobTitle: 'Technical Program Manager' },
26
+ { jobTitle: 'UI Designer' },
27
+ { jobTitle: 'UX Designer' },
28
+ { jobTitle: 'Web Developer' },
29
+ { jobTitle: 'iOS Developer' },
30
+ { jobTitle: 'Account Executive' },
31
+ { jobTitle: 'Account Manager' },
32
+ { jobTitle: 'Accountant' },
33
+ { jobTitle: 'Administrative Assistant' },
34
+ { jobTitle: 'Agile Coach' },
35
+ { jobTitle: 'Agile Project Manager' },
36
+ { jobTitle: 'Appraiser' },
37
+ { jobTitle: 'Bookkeeper' },
38
+ { jobTitle: 'Budget Analyst' },
39
+ { jobTitle: 'Business Analyst' },
40
+ { jobTitle: 'Business Development Manager' },
41
+ { jobTitle: 'Business Risk Manager' },
42
+ { jobTitle: 'Business Support Analyst' },
43
+ { jobTitle: 'Business Systems Administrator' },
44
+ { jobTitle: 'Buyer' },
45
+ { jobTitle: 'Chief Executive Officer' },
46
+ { jobTitle: 'Chief Financial Officer' },
47
+ { jobTitle: 'Chief Operations Officer/General Manager' },
48
+ { jobTitle: 'Commercial Insurance Broker' },
49
+ { jobTitle: 'Compensation Analyst' },
50
+ { jobTitle: 'Finance Manager' },
51
+ { jobTitle: 'Financial Analyst' },
52
+ { jobTitle: 'Fundraiser' },
53
+ { jobTitle: 'Growth Marketing Manager' },
54
+ { jobTitle: 'Human Resources Consultant' },
55
+ { jobTitle: 'Human Resources Project Manager' },
56
+ { jobTitle: 'IT Project Manager' },
57
+ { jobTitle: 'Investment Banking Analyst' },
58
+ { jobTitle: 'Loan Officer' },
59
+ { jobTitle: 'Procurement Specialist' },
60
+ { jobTitle: 'Program Manager' },
61
+ { jobTitle: 'Project Manager' },
62
+ { jobTitle: 'Senior Business Analyst' },
63
+ { jobTitle: 'Senior Project Manager' },
64
+ { jobTitle: 'Student Success Coach' },
65
+ { jobTitle: 'Technical Project Manager' },
66
+ { jobTitle: 'Technology Consultant' },
67
+ { jobTitle: 'Associate Product Manager' },
68
+ { jobTitle: 'Digital Product Manager' },
69
+ { jobTitle: 'Director of Product Management' },
70
+ { jobTitle: 'Lead Product Manager' },
71
+ { jobTitle: 'Marketing Product Manager' },
72
+ { jobTitle: 'Product Analyst' },
73
+ { jobTitle: 'Product Owner' },
74
+ { jobTitle: 'Analytics Manager' },
75
+ { jobTitle: 'Business Intelligence Analyst' },
76
+ { jobTitle: 'Data Analyst' },
77
+ { jobTitle: 'Data Analytics Scientist' },
78
+ { jobTitle: 'Data Architect' },
79
+ { jobTitle: 'Data Engineer' },
80
+ { jobTitle: 'Data Entry Clerk' },
81
+ { jobTitle: 'Data Science Manager' },
82
+ { jobTitle: 'Data Scientist' },
83
+ { jobTitle: 'Database Developer' },
84
+ { jobTitle: 'Director of Data Science' },
85
+ { jobTitle: 'Machine Learning Engineer' },
86
+ { jobTitle: 'Manager/Data Scientist' },
87
+ { jobTitle: 'Research Scientist' },
88
+ { jobTitle: 'Artificial Intelligence Engineer' },
89
+ { jobTitle: 'Communications Coordinator' },
90
+ { jobTitle: 'Director of Communications' },
91
+ { jobTitle: 'Marketing Analyst' },
92
+ { jobTitle: 'Marketing Manager' },
93
+ { jobTitle: 'Media Planner' },
94
+ { jobTitle: 'Public Relations Specialist' },
95
+ { jobTitle: 'Sales Development Representative' },
96
+ { jobTitle: 'Sales Operations Specialist' },
97
+ { jobTitle: 'Sales Representative' },
98
+ { jobTitle: 'Social Media Manager' },
99
+ { jobTitle: 'Technical Writer' }
100
+ ];
101
+ export default jobsList;
102
+ //# sourceMappingURL=jobsList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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AAE,6BAA6B,EAAE;IAC3C,EAAE,QAAQ,EAAE,kCAAkC,EAAE;IAChD,EAAE,QAAQ,EAAE,6BAA6B,EAAE;IAC3C,EAAE,QAAQ,EAAE,sBAAsB,EAAE;IACpC,EAAE,QAAQ,EAAE,sBAAsB,EAAE;IACpC,EAAE,QAAQ,EAAE,kBAAkB,EAAE;CACjC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["/**\n * This is a list of hardcoded jobs to use for the job select dropdown. The list returned from the `prod_taxonomy` index contains results that are unnecessarily specific (i.e. Bike Mechanic) so we have them listed out here instead.\n */\n\ninterface Job {\n jobTitle: string,\n}\n\nexport const jobsList: Job[] = [\n { jobTitle: 'Android Developer' },\n { jobTitle: 'Application Developer' },\n { jobTitle: 'Back End Developer' },\n { jobTitle: 'Business Systems Analyst' },\n { jobTitle: 'Cybersecurity Analyst' },\n { jobTitle: 'DevOps Engineer' },\n { jobTitle: 'Front End Developer' },\n { jobTitle: 'Front End Software Engineer' },\n { jobTitle: 'Full Stack Developer' },\n { jobTitle: 'Full Stack Software Engineer' },\n { jobTitle: 'IT Support Specialist' },\n { jobTitle: 'Java Developer' },\n { jobTitle: 'Lead Software Engineer' },\n { jobTitle: 'Mobile Developer' },\n { jobTitle: 'Principal Software Engineer' },\n { jobTitle: 'Quality Assurance Analyst' },\n { jobTitle: 'Software Developer' },\n { jobTitle: 'Software Development Engineer' },\n { jobTitle: 'Software Engineer' },\n { jobTitle: 'Software Engineering Intern' },\n { jobTitle: 'Technical Program Manager' },\n { jobTitle: 'UI Designer' },\n { jobTitle: 'UX Designer' },\n { jobTitle: 'Web Developer' },\n { jobTitle: 'iOS Developer' },\n { jobTitle: 'Account Executive' },\n { jobTitle: 'Account Manager' },\n { jobTitle: 'Accountant' },\n { jobTitle: 'Administrative Assistant' },\n { jobTitle: 'Agile Coach' },\n { jobTitle: 'Agile Project Manager' },\n { jobTitle: 'Appraiser' },\n { jobTitle: 'Bookkeeper' },\n { jobTitle: 'Budget Analyst' },\n { jobTitle: 'Business Analyst' },\n { jobTitle: 'Business Development Manager' },\n { jobTitle: 'Business Risk Manager' },\n { jobTitle: 'Business Support Analyst' },\n { jobTitle: 'Business Systems Administrator' },\n { jobTitle: 'Buyer' },\n { jobTitle: 'Chief Executive Officer' },\n { jobTitle: 'Chief Financial Officer' },\n { jobTitle: 'Chief Operations Officer/General Manager' },\n { jobTitle: 'Commercial Insurance Broker' },\n { jobTitle: 'Compensation Analyst' },\n { jobTitle: 'Finance Manager' },\n { jobTitle: 'Financial Analyst' },\n { jobTitle: 'Fundraiser' },\n { jobTitle: 'Growth Marketing Manager' },\n { jobTitle: 'Human Resources Consultant' },\n { jobTitle: 'Human Resources Project Manager' },\n { jobTitle: 'IT Project Manager' },\n { jobTitle: 'Investment Banking Analyst' },\n { jobTitle: 'Loan Officer' },\n { jobTitle: 'Procurement Specialist' },\n { jobTitle: 'Program Manager' },\n { jobTitle: 'Project Manager' },\n { jobTitle: 'Senior Business Analyst' },\n { jobTitle: 'Senior Project Manager' },\n { jobTitle: 'Student Success Coach' },\n { jobTitle: 'Technical Project Manager' },\n { jobTitle: 'Technology Consultant' },\n { jobTitle: 'Associate Product Manager' },\n { jobTitle: 'Digital Product Manager' },\n { jobTitle: 'Director of Product Management' },\n { jobTitle: 'Lead Product Manager' },\n { jobTitle: 'Marketing Product Manager' },\n { jobTitle: 'Product Analyst' },\n { jobTitle: 'Product Owner' },\n { jobTitle: 'Analytics Manager' },\n { jobTitle: 'Business Intelligence Analyst' },\n { jobTitle: 'Data Analyst' },\n { jobTitle: 'Data Analytics Scientist' },\n { jobTitle: 'Data Architect' },\n { jobTitle: 'Data Engineer' },\n { jobTitle: 'Data Entry Clerk' },\n { jobTitle: 'Data Science Manager' },\n { jobTitle: 'Data Scientist' },\n { jobTitle: 'Database Developer' },\n { jobTitle: 'Director of Data Science' },\n { jobTitle: 'Machine Learning Engineer' },\n { jobTitle: 'Manager/Data Scientist' },\n { jobTitle: 'Research Scientist' },\n { jobTitle: 'Artificial Intelligence Engineer' },\n { jobTitle: 'Communications Coordinator' },\n { jobTitle: 'Director of Communications' },\n { jobTitle: 'Marketing Analyst' },\n { jobTitle: 'Marketing Manager' },\n { jobTitle: 'Media Planner' },\n { jobTitle: 'Public Relations Specialist' },\n { jobTitle: 'Sales Development Representative' },\n { jobTitle: 'Sales Operations Specialist' },\n { jobTitle: 'Sales Representative' },\n { jobTitle: 'Social Media Manager' },\n { jobTitle: 'Technical Writer' }\n];\n\nexport default jobsList;\n"]}
@@ -0,0 +1,7 @@
1
+ import { UseQueryResult } from '@tanstack/react-query';
2
+ import { SkillWithCount } from './types';
3
+ /**
4
+ * Fetches every skill value in the Algolia product index, cached for reuse by any
5
+ * question whose options are the skills list (e.g. 'preferred-subject').
6
+ */
7
+ export declare const useSkills: () => UseQueryResult<SkillWithCount[]>;
@@ -0,0 +1,18 @@
1
+ import { useQuery } from '@tanstack/react-query';
2
+ import { useAlgoliaSearch } from '../../../utils/algoliaUtils';
3
+ import { fetchSkills } from './api/fetchSkills';
4
+ import { progressiveProfilingQuizQueryKeys } from './queryKeys';
5
+ /**
6
+ * Fetches every skill value in the Algolia product index, cached for reuse by any
7
+ * question whose options are the skills list (e.g. 'preferred-subject').
8
+ */
9
+ export const useSkills = () => {
10
+ const [searchClient] = useAlgoliaSearch();
11
+ return useQuery({
12
+ queryKey: progressiveProfilingQuizQueryKeys.skills(),
13
+ queryFn: () => fetchSkills(searchClient),
14
+ enabled: !!searchClient,
15
+ staleTime: 10 * 60 * 1000,
16
+ });
17
+ };
18
+ //# sourceMappingURL=queryHooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryHooks.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/data/queryHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAGhE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,GAAqC,EAAE;IAC9D,MAAM,CAAC,YAAY,CAAC,GAAG,gBAAgB,EAAE,CAAC;IAE1C,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,iCAAiC,CAAC,MAAM,EAAE;QACpD,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,YAAa,CAAC;QACzC,OAAO,EAAE,CAAC,CAAC,YAAY;QACvB,SAAS,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { useQuery, UseQueryResult } from '@tanstack/react-query';\n\nimport { useAlgoliaSearch } from '@src/utils/algoliaUtils';\n\nimport { fetchSkills } from './api/fetchSkills';\nimport { progressiveProfilingQuizQueryKeys } from './queryKeys';\nimport { SkillWithCount } from './types';\n\n/**\n * Fetches every skill value in the Algolia product index, cached for reuse by any\n * question whose options are the skills list (e.g. 'preferred-subject').\n */\nexport const useSkills = (): UseQueryResult<SkillWithCount[]> => {\n const [searchClient] = useAlgoliaSearch();\n\n return useQuery({\n queryKey: progressiveProfilingQuizQueryKeys.skills(),\n queryFn: () => fetchSkills(searchClient!),\n enabled: !!searchClient,\n staleTime: 10 * 60 * 1000,\n });\n};\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const progressiveProfilingQuizQueryKeys: {
2
+ all: readonly ["progressive-profiling-quiz"];
3
+ skills: () => readonly ["progressive-profiling-quiz", "skills"];
4
+ };
@@ -0,0 +1,6 @@
1
+ const BASE_KEY = ['progressive-profiling-quiz'];
2
+ export const progressiveProfilingQuizQueryKeys = {
3
+ all: BASE_KEY,
4
+ skills: () => [...BASE_KEY, 'skills'],
5
+ };
6
+ //# sourceMappingURL=queryKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryKeys.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/data/queryKeys.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,CAAC,4BAA4B,CAAU,CAAC;AAEzD,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,QAAQ,CAAU;CAC/C,CAAC","sourcesContent":["const BASE_KEY = ['progressive-profiling-quiz'] as const;\n\nexport const progressiveProfilingQuizQueryKeys = {\n all: BASE_KEY,\n skills: () => [...BASE_KEY, 'skills'] as const,\n};\n"]}
@@ -0,0 +1,5 @@
1
+ /** A single Algolia facet value with its matching record count, e.g. from fetchSkills. */
2
+ export interface SkillWithCount {
3
+ value: string;
4
+ count: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/data/types.ts"],"names":[],"mappings":"","sourcesContent":["/** A single Algolia facet value with its matching record count, e.g. from fetchSkills. */\nexport interface SkillWithCount {\n value: string,\n count: number,\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { default as progressiveProfilingApp } from './app';
2
+ export { ProgressiveProfilingQuizProvider, useProgressiveProfilingQuiz } from './ProgressiveProfilingQuizProvider';
@@ -0,0 +1,3 @@
1
+ export { default as progressiveProfilingApp } from './app';
2
+ export { ProgressiveProfilingQuizProvider, useProgressiveProfilingQuiz } from './ProgressiveProfilingQuizProvider';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/widgets/ProgressiveProfilingQuiz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,gCAAgC,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["export { default as progressiveProfilingApp } from './app';\nexport { ProgressiveProfilingQuizProvider, useProgressiveProfilingQuiz } from './ProgressiveProfilingQuizProvider';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-subscription-learner-dashboard",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,7 +71,7 @@
71
71
  "tsc-alias": "^1.8.16"
72
72
  },
73
73
  "peerDependencies": {
74
- "@openedx/frontend-base": "^1.0.0-alpha.39",
74
+ "@openedx/frontend-base": "^1.0.0-alpha || 0.0.0-dev",
75
75
  "@openedx/paragon": "^23",
76
76
  "@tanstack/react-query": "^5",
77
77
  "@types/react": "^18",