@edx/frontend-app-subscription-learner-dashboard 1.50.0 → 1.51.1
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/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.d.ts +2 -1
- package/dist/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.js +3 -0
- package/dist/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/Banner.d.ts +8 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/Banner.js +6 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/Banner.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/BannerEntry.d.ts +6 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/BannerEntry.js +35 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/BannerEntry.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/index.d.ts +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/index.js +2 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/index.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/messages.d.ts +33 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/messages.js +35 -0
- package/dist/widgets/ProgressiveProfilingQuiz/SearchPageBanners/messages.js.map +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/app.js +8 -0
- package/dist/widgets/ProgressiveProfilingQuiz/app.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/data/constants.d.ts +5 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/constants.js +5 -0
- package/dist/widgets/ProgressiveProfilingQuiz/data/constants.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/index.js +1 -9
- package/dist/widgets/ProgressiveProfilingQuiz/modal/index.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/InterestsDeclaredAutosuggest.js +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/InterestsDeclaredAutosuggest.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.scss +14 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.scss +2 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.scss +1 -0
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js +3 -2
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js.map +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js +1 -1
- package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { StoredAnswerRecord } from './data/api/fetchAnswers';
|
|
2
|
+
import { StoredAnswerRecord, ProgressiveProfileStatus } from './data/api/fetchAnswers';
|
|
3
3
|
import { QuizAnswerRecord } from './data/types';
|
|
4
4
|
interface ProgressiveProfilingQuizContextType {
|
|
5
5
|
isModalOpen: boolean;
|
|
@@ -13,6 +13,7 @@ interface ProgressiveProfilingQuizContextType {
|
|
|
13
13
|
recordAnswer: (answer: QuizAnswerRecord) => void;
|
|
14
14
|
isComplete: boolean;
|
|
15
15
|
setIsComplete: (isComplete: boolean) => void;
|
|
16
|
+
progressiveProfileStatus: ProgressiveProfileStatus | undefined;
|
|
16
17
|
}
|
|
17
18
|
interface ProgressiveProfilingQuizProviderProps {
|
|
18
19
|
children: ReactNode;
|
|
@@ -9,6 +9,7 @@ export const ProgressiveProfilingQuizProvider = ({ children }) => {
|
|
|
9
9
|
const [isComplete, setIsComplete] = useState(false);
|
|
10
10
|
const { data: storedAnswers } = useAnswers();
|
|
11
11
|
const { mutate: saveAnswers } = useSaveAnswers();
|
|
12
|
+
const progressiveProfileStatus = storedAnswers === null || storedAnswers === void 0 ? void 0 : storedAnswers.progressiveProfileStatus;
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
if (storedAnswers === null || storedAnswers === void 0 ? void 0 : storedAnswers.answers) {
|
|
14
15
|
setAnswers(prev => (Object.assign(Object.assign({}, storedAnswers.answers), prev)));
|
|
@@ -38,11 +39,13 @@ export const ProgressiveProfilingQuizProvider = ({ children }) => {
|
|
|
38
39
|
recordAnswer,
|
|
39
40
|
isComplete,
|
|
40
41
|
setIsComplete,
|
|
42
|
+
progressiveProfileStatus,
|
|
41
43
|
}), [
|
|
42
44
|
isModalOpen, openModal, closeModal,
|
|
43
45
|
currentStep, goToNextStep, goToPreviousStep,
|
|
44
46
|
answers, recordAnswer,
|
|
45
47
|
isComplete,
|
|
48
|
+
progressiveProfileStatus,
|
|
46
49
|
]);
|
|
47
50
|
return (_jsx(ProgressiveProfilingQuizContext.Provider, { value: contextValue, children: children }));
|
|
48
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressiveProfilingQuizProvider.js","sourceRoot":"","sources":["../../../src/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAa,WAAW,GAChF,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB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AO,EAAE,YAAY;QACrB,UAAU;QACV,wBAAwB;KACzB,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, useEffect, useMemo, useState, ReactNode, useCallback,\n} from 'react';\n\nimport { StoredAnswerRecord, ProgressiveProfileStatus } from './data/api/fetchAnswers';\nimport { useAnswers, useSaveAnswers } from './data/queryHooks';\nimport { QuizAnswerRecord } from './data/types';\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, QuizAnswerRecord | StoredAnswerRecord>,\n recordAnswer: (answer: QuizAnswerRecord) => void,\n isComplete: boolean,\n setIsComplete: (isComplete: boolean) => void,\n progressiveProfileStatus: ProgressiveProfileStatus | undefined,\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, QuizAnswerRecord | StoredAnswerRecord>>({});\n const [isComplete, setIsComplete] = useState(false);\n\n const { data: storedAnswers } = useAnswers();\n const { mutate: saveAnswers } = useSaveAnswers();\n const progressiveProfileStatus = storedAnswers?.progressiveProfileStatus;\n\n useEffect(() => {\n if (storedAnswers?.answers) {\n setAnswers(prev => ({ ...storedAnswers.answers, ...prev }));\n }\n }, [storedAnswers]);\n\n const openModal = useCallback(() => setIsModalOpen(true), []);\n const closeModal = useCallback(() => {\n setIsModalOpen(false);\n if (Object.keys(answers).length > 0) {\n saveAnswers(answers);\n }\n }, [answers, saveAnswers]);\n\n const goToNextStep = useCallback(() => setCurrentStep(prev => prev + 1), []);\n const goToPreviousStep = useCallback(() => setCurrentStep(prev => Math.max(0, prev - 1)), []);\n\n const recordAnswer = useCallback((answer: QuizAnswerRecord) => {\n setAnswers(prev => ({ ...prev, [answer.questionId]: answer }));\n }, []);\n\n const contextValue = useMemo(() => ({\n isModalOpen,\n openModal,\n closeModal,\n currentStep,\n setCurrentStep,\n goToNextStep,\n goToPreviousStep,\n answers,\n recordAnswer,\n isComplete,\n setIsComplete,\n progressiveProfileStatus,\n }), [\n isModalOpen, openModal, closeModal,\n currentStep, goToNextStep, goToPreviousStep,\n answers, recordAnswer,\n isComplete,\n progressiveProfileStatus,\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,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@openedx/paragon';
|
|
3
|
+
export const Banner = ({ title, buttonText, isOpen }) => {
|
|
4
|
+
return (_jsx("div", { className: "rounded shadow-sm bg-light-200 px-4 py-3 mb-3", children: _jsxs("div", { className: "d-flex justify-content-center align-items-center gap-3 flex-wrap", children: [_jsx("p", { className: "mb-0 text-center text-md-left", "data-testid": "banner-title", children: title }), _jsx(Button, { variant: "outline-brand", onClick: isOpen, "data-testid": "banner-button", children: buttonText })] }) }));
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=Banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/SearchPageBanners/Banner.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAQ1C,MAAM,CAAC,MAAM,MAAM,GAAoB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE;IACvE,OAAO,CACL,cAAK,SAAS,EAAC,+CAA+C,YAC5D,eAAK,SAAS,EAAC,kEAAkE,aAC/E,YAAG,SAAS,EAAC,+BAA+B,iBAAa,cAAc,YAAE,KAAK,GAAK,EACnF,KAAC,MAAM,IAAC,OAAO,EAAC,eAAe,EAAC,OAAO,EAAE,MAAM,iBAAc,eAAe,YACzE,UAAU,GACJ,IACL,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { FC, ReactNode } from 'react';\nimport { Button } from '@openedx/paragon';\n\ninterface BannerProps {\n title: ReactNode,\n buttonText: string,\n isOpen: () => void,\n}\n\nexport const Banner: FC<BannerProps> = ({ title, buttonText, isOpen }) => {\n return (\n <div className=\"rounded shadow-sm bg-light-200 px-4 py-3 mb-3\">\n <div className=\"d-flex justify-content-center align-items-center gap-3 flex-wrap\">\n <p className=\"mb-0 text-center text-md-left\" data-testid=\"banner-title\">{title}</p>\n <Button variant=\"outline-brand\" onClick={isOpen} data-testid=\"banner-button\">\n {buttonText}\n </Button>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useProgressiveProfilingQuiz } from '../ProgressiveProfilingQuizProvider';
|
|
3
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
4
|
+
import { Banner } from './Banner';
|
|
5
|
+
import messages from './messages';
|
|
6
|
+
import { PROGRESSIVE_PROFILING_USER_STATUS } from '../data/constants';
|
|
7
|
+
/**
|
|
8
|
+
* Single slot entry point.
|
|
9
|
+
* Reads progressive profiling state from context and selects one CTA.
|
|
10
|
+
*/
|
|
11
|
+
export const BannerEntry = () => {
|
|
12
|
+
var _a, _b, _c, _d, _e;
|
|
13
|
+
const { openModal, answers, progressiveProfileStatus, } = useProgressiveProfilingQuiz();
|
|
14
|
+
const { formatMessage } = useIntl();
|
|
15
|
+
if (!progressiveProfileStatus)
|
|
16
|
+
return null;
|
|
17
|
+
const { status, remainingQuestions } = progressiveProfileStatus || {};
|
|
18
|
+
const learningGoal = (_c = (_b = (_a = answers === null || answers === void 0 ? void 0 : answers['learning-goal']) === null || _a === void 0 ? void 0 : _a.selectedValues) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.replaceAll('-', ' ');
|
|
19
|
+
const interests = (_e = (_d = answers === null || answers === void 0 ? void 0 : answers['interests-declared']) === null || _d === void 0 ? void 0 : _d.selectedValues) !== null && _e !== void 0 ? _e : [];
|
|
20
|
+
const formattedInterests = interests.length > 1
|
|
21
|
+
? `${interests.slice(0, -1).join(', ')} and ${interests.at(-1)}`
|
|
22
|
+
: interests[0];
|
|
23
|
+
let title = formatMessage(messages.notStartedTitle);
|
|
24
|
+
let buttonText = formatMessage(messages.notStartedButtonText);
|
|
25
|
+
if (status === PROGRESSIVE_PROFILING_USER_STATUS.COMPLETE) {
|
|
26
|
+
title = formatMessage(messages.completeTitle, { learningGoal, interests: formattedInterests, bold: chunks => _jsx("strong", { children: chunks }) });
|
|
27
|
+
buttonText = formatMessage(messages.completeButtonText);
|
|
28
|
+
}
|
|
29
|
+
if (status === PROGRESSIVE_PROFILING_USER_STATUS.INCOMPLETE) {
|
|
30
|
+
title = formatMessage(messages.incompleteTitle, { remainingQuestions });
|
|
31
|
+
buttonText = formatMessage(messages.incompleteButtonText);
|
|
32
|
+
}
|
|
33
|
+
return _jsx(Banner, { isOpen: openModal, title: title, buttonText: buttonText });
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=BannerEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerEntry.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/SearchPageBanners/BannerEntry.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAEtE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAO,GAAG,EAAE;;IAClC,MAAM,EACJ,SAAS,EACT,OAAO,EACP,wBAAwB,GACzB,GAAG,2BAA2B,EAAE,CAAC;IAClC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,IAAI,CAAC,wBAAwB;QAAE,OAAO,IAAI,CAAC;IAE3C,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,IAAI,EAAE,CAAC;IAEtE,MAAM,YAAY,GAAG,MAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,eAAe,CAAC,0CAAE,cAAc,0CAAG,CAAC,CAAC,0CAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3F,MAAM,SAAS,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,oBAAoB,CAAC,0CAAE,cAAc,mCAAI,EAAE,CAAC;IACxE,MAAM,kBAAkB,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC;QAC7C,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAChE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEjB,IAAI,KAAK,GAAc,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC/D,IAAI,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAE9D,IAAI,MAAM,KAAK,iCAAiC,CAAC,QAAQ,EAAE,CAAC;QAC1D,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,2BAAS,MAAM,GAAU,EAAE,CAAC,CAAC;QAC1I,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,MAAM,KAAK,iCAAiC,CAAC,UAAU,EAAE,CAAC;QAC5D,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,kBAAkB,EAAE,CAAC,CAAC;QACxE,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,KAAC,MAAM,IAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,CAAC;AAC7E,CAAC,CAAC","sourcesContent":["import { FC, ReactNode } from 'react';\nimport { useProgressiveProfilingQuiz } from '../ProgressiveProfilingQuizProvider';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { Banner } from './Banner';\nimport messages from './messages';\nimport { PROGRESSIVE_PROFILING_USER_STATUS } from '../data/constants';\n\n/**\n * Single slot entry point.\n * Reads progressive profiling state from context and selects one CTA.\n */\nexport const BannerEntry: FC = () => {\n const {\n openModal,\n answers,\n progressiveProfileStatus,\n } = useProgressiveProfilingQuiz();\n const { formatMessage } = useIntl();\n\n if (!progressiveProfileStatus) return null;\n\n const { status, remainingQuestions } = progressiveProfileStatus || {};\n\n const learningGoal = answers?.['learning-goal']?.selectedValues?.[0]?.replaceAll('-', ' ');\n const interests = answers?.['interests-declared']?.selectedValues ?? [];\n const formattedInterests = interests.length > 1\n ? `${interests.slice(0, -1).join(', ')} and ${interests.at(-1)}`\n : interests[0];\n\n let title: ReactNode = formatMessage(messages.notStartedTitle);\n let buttonText = formatMessage(messages.notStartedButtonText);\n\n if (status === PROGRESSIVE_PROFILING_USER_STATUS.COMPLETE) {\n title = formatMessage(messages.completeTitle, { learningGoal, interests: formattedInterests, bold: chunks => <strong>{chunks}</strong> });\n buttonText = formatMessage(messages.completeButtonText);\n }\n\n if (status === PROGRESSIVE_PROFILING_USER_STATUS.INCOMPLETE) {\n title = formatMessage(messages.incompleteTitle, { remainingQuestions });\n buttonText = formatMessage(messages.incompleteButtonText);\n }\n\n return <Banner isOpen={openModal} title={title} buttonText={buttonText} />;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BannerEntry } from './BannerEntry';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/SearchPageBanners/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { BannerEntry } from './BannerEntry';\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
notStartedTitle: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
notStartedButtonText: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
incompleteTitle: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
incompleteButtonText: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
completeTitle: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
completeButtonText: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default messages;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineMessages } from '@openedx/frontend-base';
|
|
2
|
+
const messages = defineMessages({
|
|
3
|
+
notStartedTitle: {
|
|
4
|
+
id: 'progressiveProfiling.searchPage.banner.notStarted.title',
|
|
5
|
+
defaultMessage: 'What do you want to learn?',
|
|
6
|
+
description: 'Title to be shown on banner when the progressive profiling quiz has not been started',
|
|
7
|
+
},
|
|
8
|
+
notStartedButtonText: {
|
|
9
|
+
id: 'progressiveProfiling.searchPage.banner.notStarted.buttonText',
|
|
10
|
+
defaultMessage: 'Share my goals',
|
|
11
|
+
description: 'Button text to be shown on banner when the progressive profiling quiz has not been started',
|
|
12
|
+
},
|
|
13
|
+
incompleteTitle: {
|
|
14
|
+
id: 'progressiveProfiling.searchPage.banner.incomplete.title',
|
|
15
|
+
defaultMessage: 'Answer {remainingQuestions} more question(s) and get better course recommendations.',
|
|
16
|
+
description: 'Title to be shown on banner when the progressive profiling quiz is incomplete',
|
|
17
|
+
},
|
|
18
|
+
incompleteButtonText: {
|
|
19
|
+
id: 'progressiveProfiling.searchPage.banner.incomplete.buttonText',
|
|
20
|
+
defaultMessage: 'Finish sharing my goals',
|
|
21
|
+
description: 'Button text to be shown on banner when the progressive profiling quiz is incomplete',
|
|
22
|
+
},
|
|
23
|
+
completeTitle: {
|
|
24
|
+
id: 'progressiveProfiling.searchPage.banner.complete.title',
|
|
25
|
+
defaultMessage: 'Your learning on edX to <bold>{learningGoal}</bold> and you\'re interested in {interests}.',
|
|
26
|
+
description: 'Title to be shown on banner when the progressive profiling quiz is complete',
|
|
27
|
+
},
|
|
28
|
+
completeButtonText: {
|
|
29
|
+
id: 'progressiveProfiling.searchPage.banner.complete.buttonText',
|
|
30
|
+
defaultMessage: 'Share my goals',
|
|
31
|
+
description: 'Button text to be shown on banner when the progressive profiling quiz is complete',
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
export default messages;
|
|
35
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/SearchPageBanners/messages.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,eAAe,EAAE;QACf,EAAE,EAAE,yDAAyD;QAC7D,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,sFAAsF;KACpG;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,8DAA8D;QAClE,cAAc,EAAE,gBAAgB;QAChC,WAAW,EAAE,4FAA4F;KAC1G;IACD,eAAe,EAAE;QACf,EAAE,EAAE,yDAAyD;QAC7D,cAAc,EAAE,qFAAqF;QACrG,WAAW,EAAE,+EAA+E;KAC7F;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,8DAA8D;QAClE,cAAc,EAAE,yBAAyB;QACzC,WAAW,EAAE,qFAAqF;KACnG;IACD,aAAa,EAAE;QACb,EAAE,EAAE,uDAAuD;QAC3D,cAAc,EAAE,4FAA4F;QAC5G,WAAW,EAAE,6EAA6E;KAC3F;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,4DAA4D;QAChE,cAAc,EAAE,gBAAgB;QAChC,WAAW,EAAE,mFAAmF;KACjG;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n notStartedTitle: {\n id: 'progressiveProfiling.searchPage.banner.notStarted.title',\n defaultMessage: 'What do you want to learn?',\n description: 'Title to be shown on banner when the progressive profiling quiz has not been started',\n },\n notStartedButtonText: {\n id: 'progressiveProfiling.searchPage.banner.notStarted.buttonText',\n defaultMessage: 'Share my goals',\n description: 'Button text to be shown on banner when the progressive profiling quiz has not been started',\n },\n incompleteTitle: {\n id: 'progressiveProfiling.searchPage.banner.incomplete.title',\n defaultMessage: 'Answer {remainingQuestions} more question(s) and get better course recommendations.',\n description: 'Title to be shown on banner when the progressive profiling quiz is incomplete',\n },\n incompleteButtonText: {\n id: 'progressiveProfiling.searchPage.banner.incomplete.buttonText',\n defaultMessage: 'Finish sharing my goals',\n description: 'Button text to be shown on banner when the progressive profiling quiz is incomplete',\n },\n completeTitle: {\n id: 'progressiveProfiling.searchPage.banner.complete.title',\n defaultMessage: 'Your learning on edX to <bold>{learningGoal}</bold> and you\\'re interested in {interests}.',\n description: 'Title to be shown on banner when the progressive profiling quiz is complete',\n },\n completeButtonText: {\n id: 'progressiveProfiling.searchPage.banner.complete.buttonText',\n defaultMessage: 'Share my goals',\n description: 'Button text to be shown on banner when the progressive profiling quiz is complete',\n },\n});\n\nexport default messages;\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WidgetOperationTypes } from '@openedx/frontend-base';
|
|
2
2
|
import { ProgressiveProfilingQuizProvider } from './ProgressiveProfilingQuizProvider';
|
|
3
3
|
import ProgressiveProfilingQuizModal from './modal';
|
|
4
|
+
import { BannerEntry } from './SearchPageBanners';
|
|
4
5
|
const app = {
|
|
5
6
|
appId: 'org.2u-edx.frontend.app.progressiveProfiling',
|
|
6
7
|
providers: [
|
|
@@ -13,6 +14,13 @@ const app = {
|
|
|
13
14
|
op: WidgetOperationTypes.PREPEND,
|
|
14
15
|
component: ProgressiveProfilingQuizModal,
|
|
15
16
|
},
|
|
17
|
+
{
|
|
18
|
+
// This is the entry-point CTA injected into search page slot
|
|
19
|
+
slotId: 'org.edx.frontend.widget.progressiveProfiling.search.cta.v1',
|
|
20
|
+
id: 'org.edx.frontend.widget.progressiveProfiling.search.cta.entry.v1',
|
|
21
|
+
op: WidgetOperationTypes.APPEND,
|
|
22
|
+
component: BannerEntry,
|
|
23
|
+
},
|
|
16
24
|
]
|
|
17
25
|
};
|
|
18
26
|
export default app;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/ProgressiveProfilingQuiz/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,6BAA6B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/ProgressiveProfilingQuiz/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,6BAA6B,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,GAAG,GAAQ;IACf,KAAK,EAAE,8CAA8C;IACrD,SAAS,EAAE;QACT,gCAAgC;KACjC;IACD,KAAK,EAAE;QACL;YACE,MAAM,EAAE,0CAA0C;YAClD,EAAE,EAAE,uDAAuD;YAC3D,EAAE,EAAE,oBAAoB,CAAC,OAAO;YAChC,SAAS,EAAE,6BAA6B;SACzC;QACD;YACE,6DAA6D;YAC7D,MAAM,EAAE,4DAA4D;YACpE,EAAE,EAAE,kEAAkE;YACtE,EAAE,EAAE,oBAAoB,CAAC,MAAM;YAC/B,SAAS,EAAE,WAAW;SACvB;KACF;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App, WidgetOperationTypes } from '@openedx/frontend-base';\nimport { ProgressiveProfilingQuizProvider } from './ProgressiveProfilingQuizProvider';\nimport ProgressiveProfilingQuizModal from './modal';\nimport { BannerEntry } from './SearchPageBanners';\n\nconst app: App = {\n appId: 'org.2u-edx.frontend.app.progressiveProfiling',\n providers: [\n ProgressiveProfilingQuizProvider,\n ],\n slots: [\n {\n slotId: 'org.openedx.frontend.slot.header.main.v1',\n id: 'org.edx.frontend.widget.progressiveProfiling.modal.v1',\n op: WidgetOperationTypes.PREPEND,\n component: ProgressiveProfilingQuizModal,\n },\n {\n // This is the entry-point CTA injected into search page slot\n slotId: 'org.edx.frontend.widget.progressiveProfiling.search.cta.v1',\n id: 'org.edx.frontend.widget.progressiveProfiling.search.cta.entry.v1',\n op: WidgetOperationTypes.APPEND,\n component: BannerEntry,\n },\n ]\n};\n\nexport default app;\n"]}
|
|
@@ -5,3 +5,8 @@ export declare const PROGRESSIVE_PROFILING_QUIZ_STEPS: {
|
|
|
5
5
|
readonly WORK_STATUS: "work-status";
|
|
6
6
|
};
|
|
7
7
|
export type ProgressiveProfilingQuizStepKey = typeof PROGRESSIVE_PROFILING_QUIZ_STEPS[keyof typeof PROGRESSIVE_PROFILING_QUIZ_STEPS];
|
|
8
|
+
export declare const PROGRESSIVE_PROFILING_USER_STATUS: {
|
|
9
|
+
readonly INCOMPLETE: "incomplete";
|
|
10
|
+
readonly COMPLETE: "complete";
|
|
11
|
+
readonly NOT_STARTED: "not-started";
|
|
12
|
+
};
|
|
@@ -4,4 +4,9 @@ export const PROGRESSIVE_PROFILING_QUIZ_STEPS = {
|
|
|
4
4
|
INTERESTS_DECLARED: 'interests-declared',
|
|
5
5
|
WORK_STATUS: 'work-status',
|
|
6
6
|
};
|
|
7
|
+
export const PROGRESSIVE_PROFILING_USER_STATUS = {
|
|
8
|
+
INCOMPLETE: 'incomplete',
|
|
9
|
+
COMPLETE: 'complete',
|
|
10
|
+
NOT_STARTED: 'not-started',
|
|
11
|
+
};
|
|
7
12
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/data/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;IACxC,WAAW,EAAE,aAAa;CAClB,CAAC","sourcesContent":["export const PROGRESSIVE_PROFILING_QUIZ_STEPS = {\n LEARNING_GOAL: 'learning-goal',\n LEARNING_MOTIVATION: 'learning-motivation',\n INTERESTS_DECLARED: 'interests-declared',\n WORK_STATUS: 'work-status',\n} as const;\n\nexport type ProgressiveProfilingQuizStepKey =\n typeof PROGRESSIVE_PROFILING_QUIZ_STEPS[keyof typeof PROGRESSIVE_PROFILING_QUIZ_STEPS];\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/data/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;IACxC,WAAW,EAAE,aAAa;CAClB,CAAC;AAKX,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;CAClB,CAAC","sourcesContent":["export const PROGRESSIVE_PROFILING_QUIZ_STEPS = {\n LEARNING_GOAL: 'learning-goal',\n LEARNING_MOTIVATION: 'learning-motivation',\n INTERESTS_DECLARED: 'interests-declared',\n WORK_STATUS: 'work-status',\n} as const;\n\nexport type ProgressiveProfilingQuizStepKey =\n typeof PROGRESSIVE_PROFILING_QUIZ_STEPS[keyof typeof PROGRESSIVE_PROFILING_QUIZ_STEPS];\n\nexport const PROGRESSIVE_PROFILING_USER_STATUS = {\n INCOMPLETE: 'incomplete',\n COMPLETE: 'complete',\n NOT_STARTED: 'not-started',\n} as const;\n"]}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
2
|
import { ModalDialog } from '@openedx/paragon';
|
|
4
3
|
import { useIntl } from '@openedx/frontend-base';
|
|
5
|
-
import { useSearchParams } from 'react-router-dom';
|
|
6
4
|
import { useProgressiveProfilingQuiz } from '../ProgressiveProfilingQuizProvider';
|
|
7
5
|
import ProgressiveProfilingQuizStepper from './stepper';
|
|
8
6
|
import messages from './messages';
|
|
9
7
|
import './index.scss';
|
|
10
8
|
const ProgressiveProfilingQuizModal = () => {
|
|
11
|
-
const { isModalOpen,
|
|
9
|
+
const { isModalOpen, closeModal } = useProgressiveProfilingQuiz();
|
|
12
10
|
const { formatMessage } = useIntl();
|
|
13
|
-
const [searchParams] = useSearchParams();
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (searchParams.get('progressive_profiling') === 'active') {
|
|
16
|
-
openModal();
|
|
17
|
-
}
|
|
18
|
-
}, [searchParams, openModal]);
|
|
19
11
|
return (_jsx(ModalDialog, { title: formatMessage(messages.modalTitle), isOpen: isModalOpen, onClose: closeModal, hasCloseButton: true, isFullscreenOnMobile: true, isOverflowVisible: false, className: "progressive-profiling-modal p-5 bg-light-400", children: _jsx(ModalDialog.Body, { children: _jsx(ProgressiveProfilingQuizStepper, {}) }) }));
|
|
20
12
|
};
|
|
21
13
|
export default ProgressiveProfilingQuizModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/modal/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/widgets/ProgressiveProfilingQuiz/modal/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,+BAA+B,MAAM,WAAW,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,cAAc,CAAC;AAEtB,MAAM,6BAA6B,GAAa,GAAG,EAAE;IACnD,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,2BAA2B,EAAE,CAAC;IAClE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,OAAO,CACL,KAAC,WAAW,IACV,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,EACzC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,EACnB,cAAc,QACd,oBAAoB,QACpB,iBAAiB,EAAE,KAAK,EACxB,SAAS,EAAC,8CAA8C,YAExD,KAAC,WAAW,CAAC,IAAI,cACf,KAAC,+BAA+B,KAAG,GAClB,GACP,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,6BAA6B,CAAC","sourcesContent":["import React from 'react';\nimport { ModalDialog } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { useProgressiveProfilingQuiz } from '../ProgressiveProfilingQuizProvider';\nimport ProgressiveProfilingQuizStepper from './stepper';\nimport messages from './messages';\n\nimport './index.scss';\n\nconst ProgressiveProfilingQuizModal: React.FC = () => {\n const { isModalOpen, closeModal } = useProgressiveProfilingQuiz();\n const { formatMessage } = useIntl();\n\n return (\n <ModalDialog\n title={formatMessage(messages.modalTitle)}\n isOpen={isModalOpen}\n onClose={closeModal}\n hasCloseButton\n isFullscreenOnMobile\n isOverflowVisible={false}\n className=\"progressive-profiling-modal p-5 bg-light-400\"\n >\n <ModalDialog.Body>\n <ProgressiveProfilingQuizStepper />\n </ModalDialog.Body>\n </ModalDialog>\n );\n};\n\nexport default ProgressiveProfilingQuizModal;\n"]}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Form, Icon } from '@openedx/paragon';
|
|
3
3
|
import { Search } from '@openedx/paragon/icons';
|
|
4
4
|
const InterestsDeclaredAutosuggest = ({ inputValue, skills, onChange, }) => {
|
|
5
|
-
return (_jsx(Form.Autosuggest, { value: inputValue, onChange: onChange, name: "interests-declared-autosuggest", trailingElement: (_jsx(Icon, { src: Search })), className: "container-mw-xs", children: skills === null || skills === void 0 ? void 0 : skills.map(skill => (_jsx(Form.AutosuggestOption, { id: skill.value.replaceAll(' ', '-').toLowerCase(), children: skill.value }, skill.value))) }));
|
|
5
|
+
return (_jsx(Form.Autosuggest, { value: inputValue, onChange: onChange, name: "interests-declared-autosuggest", placeholder: "Search for a skill or subject", trailingElement: (_jsx(Icon, { src: Search })), className: "container-mw-xs", children: skills === null || skills === void 0 ? void 0 : skills.map(skill => (_jsx(Form.AutosuggestOption, { id: skill.value.replaceAll(' ', '-').toLowerCase(), children: skill.value }, skill.value))) }));
|
|
6
6
|
};
|
|
7
7
|
export default InterestsDeclaredAutosuggest;
|
|
8
8
|
//# sourceMappingURL=InterestsDeclaredAutosuggest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InterestsDeclaredAutosuggest.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/InterestsDeclaredAutosuggest.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAUhD,MAAM,4BAA4B,GAAgD,CAAC,EACjF,UAAU,EACV,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,IAAI,CAAC,WAAW,IACf,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,gCAAgC,EACrC,eAAe,EAAE,CACf,KAAC,IAAI,IACH,GAAG,EAAE,MAAM,GACX,CACH,EACD,SAAS,EAAC,iBAAiB,YAE1B,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACpB,KAAC,IAAI,CAAC,iBAAiB,IAAmB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,YACzF,KAAK,CAAC,KAAK,IADe,KAAK,CAAC,KAAK,CAEf,CAC1B,CAAC,GACe,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import React from 'react';\nimport { Form, Icon } from '@openedx/paragon';\nimport { Search } from '@openedx/paragon/icons';\n\nimport { SkillWithCount, AutosuggestValue } from '@src/widgets/ProgressiveProfilingQuiz/data';\n\ninterface InterestsDeclaredAutosuggestProps {\n inputValue: AutosuggestValue,\n skills?: SkillWithCount[],\n onChange: (value: AutosuggestValue) => void,\n}\n\nconst InterestsDeclaredAutosuggest: React.FC<InterestsDeclaredAutosuggestProps> = ({\n inputValue,\n skills,\n onChange,\n}) => {\n return (\n <Form.Autosuggest\n value={inputValue}\n onChange={onChange}\n name=\"interests-declared-autosuggest\"\n trailingElement={(\n <Icon\n src={Search}\n />\n )}\n className=\"container-mw-xs\"\n >\n {skills?.map(skill => (\n <Form.AutosuggestOption key={skill.value} id={skill.value.replaceAll(' ', '-').toLowerCase()}>\n {skill.value}\n </Form.AutosuggestOption>\n ))}\n </Form.Autosuggest>\n );\n};\n\nexport default InterestsDeclaredAutosuggest;\n"]}
|
|
1
|
+
{"version":3,"file":"InterestsDeclaredAutosuggest.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/InterestsDeclaredAutosuggest.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAUhD,MAAM,4BAA4B,GAAgD,CAAC,EACjF,UAAU,EACV,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,IAAI,CAAC,WAAW,IACf,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,gCAAgC,EACrC,WAAW,EAAC,+BAA+B,EAC3C,eAAe,EAAE,CACf,KAAC,IAAI,IACH,GAAG,EAAE,MAAM,GACX,CACH,EACD,SAAS,EAAC,iBAAiB,YAE1B,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACpB,KAAC,IAAI,CAAC,iBAAiB,IAAmB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,YACzF,KAAK,CAAC,KAAK,IADe,KAAK,CAAC,KAAK,CAEf,CAC1B,CAAC,GACe,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import React from 'react';\nimport { Form, Icon } from '@openedx/paragon';\nimport { Search } from '@openedx/paragon/icons';\n\nimport { SkillWithCount, AutosuggestValue } from '@src/widgets/ProgressiveProfilingQuiz/data';\n\ninterface InterestsDeclaredAutosuggestProps {\n inputValue: AutosuggestValue,\n skills?: SkillWithCount[],\n onChange: (value: AutosuggestValue) => void,\n}\n\nconst InterestsDeclaredAutosuggest: React.FC<InterestsDeclaredAutosuggestProps> = ({\n inputValue,\n skills,\n onChange,\n}) => {\n return (\n <Form.Autosuggest\n value={inputValue}\n onChange={onChange}\n name=\"interests-declared-autosuggest\"\n placeholder=\"Search for a skill or subject\"\n trailingElement={(\n <Icon\n src={Search}\n />\n )}\n className=\"container-mw-xs\"\n >\n {skills?.map(skill => (\n <Form.AutosuggestOption key={skill.value} id={skill.value.replaceAll(' ', '-').toLowerCase()}>\n {skill.value}\n </Form.AutosuggestOption>\n ))}\n </Form.Autosuggest>\n );\n};\n\nexport default InterestsDeclaredAutosuggest;\n"]}
|
package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js
CHANGED
|
@@ -49,7 +49,7 @@ const InterestsDeclaredStep = () => {
|
|
|
49
49
|
: interestInput.filter((interest) => interest !== value);
|
|
50
50
|
recordAnswer(buildAnswerRecord(schema, nextValues, formatMessage));
|
|
51
51
|
};
|
|
52
|
-
return (_jsxs(_Fragment, { children: [_jsxs(BaseStep, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.INTERESTS_DECLARED, title: formatMessage(messages.title), index: 2, children: [_jsx("h4", { children: formatMessage(messages.question) }), _jsx("p", { children: formatMessage(messages.subtitle) }), _jsxs("div", { className: "d-flex flex-column gap-2", children: [_jsx(InterestsDeclaredAutosuggest, { inputValue: inputValue, onChange: handleAutosuggestChange, skills: skills }), _jsx("div", { children: interestInput.map(interest => (_jsx(Chip, { iconAfter: Close, iconAfterAlt: formatMessage(messages.removeInterestIconAlt), variant: "dark", onIconAfterClick: () => removeInterest(interest), children: interest }, interest))) }), _jsx("p", { className: "font-weight-bold", children: formatMessage(messages.popularTopicsLabel) }), _jsx(Form.CheckboxSet, { name: "interests-declared-topics", isInline: true, value: interestInput, onChange: handleCheckboxTopicToggle, className: "interests-declared-checkbox-set", children: skills === null || skills === void 0 ? void 0 : skills.slice(0, 10).map(skill => (_jsx(Form.Checkbox, { value: skill.value, className: "ml-0 mr-3", children: skill.value }, skill.value))) })] })] }), _jsxs(Stepper.ActionRow, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.INTERESTS_DECLARED, children: [_jsx(Button, { variant: "outline-primary", onClick: goToPreviousStep, children: formatMessage(stepMessages.backButton) }), _jsx(Button, { onClick: goToNextStep, children: formatMessage(stepMessages.nextButton) })] })] }));
|
|
52
|
+
return (_jsxs(_Fragment, { children: [_jsxs(BaseStep, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.INTERESTS_DECLARED, title: formatMessage(messages.title), index: 2, children: [_jsx("h4", { children: formatMessage(messages.question) }), _jsx("p", { children: formatMessage(messages.subtitle) }), _jsxs("div", { className: "d-flex flex-column gap-2", children: [_jsx(InterestsDeclaredAutosuggest, { inputValue: inputValue, onChange: handleAutosuggestChange, skills: skills }), _jsx("div", { children: interestInput.map(interest => (_jsx(Chip, { iconAfter: Close, iconAfterAlt: formatMessage(messages.removeInterestIconAlt), variant: "dark", onIconAfterClick: () => removeInterest(interest), className: "interest-chip-checkbox", children: interest }, interest))) }), _jsx("p", { className: "font-weight-bold", children: formatMessage(messages.popularTopicsLabel) }), _jsx(Form.CheckboxSet, { name: "interests-declared-topics", isInline: true, value: interestInput, onChange: handleCheckboxTopicToggle, className: "interests-declared-checkbox-set", children: skills === null || skills === void 0 ? void 0 : skills.slice(0, 10).map(skill => (_jsx(Form.Checkbox, { value: skill.value, className: "ml-0 mr-3", children: skill.value }, skill.value))) })] })] }), _jsxs(Stepper.ActionRow, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.INTERESTS_DECLARED, children: [_jsx(Button, { variant: "outline-primary", onClick: goToPreviousStep, children: formatMessage(stepMessages.backButton) }), _jsx(Button, { onClick: goToNextStep, children: formatMessage(stepMessages.nextButton) })] })] }));
|
|
53
53
|
};
|
|
54
54
|
export default InterestsDeclaredStep;
|
|
55
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../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MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC;IAEF,OAAO,CACL,8BACE,MAAC,QAAQ,IACP,QAAQ,EAAE,gCAAgC,CAAC,kBAAkB,EAC7D,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpC,KAAK,EAAE,CAAC,aAER,uBAAK,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAM,EAC3C,sBAAI,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAK,EACzC,eAAK,SAAS,EAAC,0BAA0B,aACvC,KAAC,4BAA4B,IAC3B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,uBAAuB,EACjC,MAAM,EAAE,MAAM,GACd,EACF,wBACG,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAC7B,KAAC,IAAI,IAEH,SAAS,EAAE,KAAK,EAChB,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAC3D,OAAO,EAAC,MAAM,EACd,gBAAgB,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AACxG,OAAO,QAAQ,MAAM,aAAa,CAAC;AACn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'react';\nimport { Stepper, Button, Form, Chip } from '@openedx/paragon';\nimport { Close } from '@openedx/paragon/icons';\nimport { useIntl } from '@openedx/frontend-base';\nimport { useProgressiveProfilingQuiz } from '@src/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider';\nimport { PROGRESSIVE_PROFILING_QUIZ_STEPS } from '@src/widgets/ProgressiveProfilingQuiz/data/constants';\nimport BaseStep from '../BaseStep';\nimport InterestsDeclaredAutosuggest from './InterestsDeclaredAutosuggest';\nimport { useSkills, AutosuggestValue } from '@src/widgets/ProgressiveProfilingQuiz/data';\nimport { buildAnswerRecord } from '@src/widgets/ProgressiveProfilingQuiz/data/schemaUtils';\nimport buildInterestsDeclaredSchema from './schema';\n\nconst EMPTY_AUTOSUGGEST_VALUE: AutosuggestValue = {\n userProvidedText: '',\n selectionValue: '',\n selectionId: '',\n};\n\nimport stepMessages from '../messages';\nimport messages from './messages';\n\nimport './index.scss';\n\nconst InterestsDeclaredStep: React.FC = () => {\n const {\n goToPreviousStep, goToNextStep, answers, recordAnswer,\n } = useProgressiveProfilingQuiz();\n const { formatMessage } = useIntl();\n\n const [inputValue, setInputValue] = useState<AutosuggestValue>(EMPTY_AUTOSUGGEST_VALUE);\n\n const { data: skills } = useSkills();\n const schema = buildInterestsDeclaredSchema(skills ?? []);\n const interestInput = answers[schema.questionId]?.selectedValues ?? [];\n\n const addInterest = (value: string) => {\n if (interestInput.includes(value)) {\n return;\n }\n recordAnswer(buildAnswerRecord(schema, [...interestInput, value], formatMessage));\n };\n\n const removeInterest = (value: string) => {\n const newInterestInput = interestInput.filter(item => value !== item);\n recordAnswer(buildAnswerRecord(schema, newInterestInput, formatMessage));\n };\n\n const handleAutosuggestChange = (value: AutosuggestValue) => {\n setInputValue(value);\n\n if (value.selectionValue) {\n addInterest(value.selectionValue);\n }\n };\n\n const handleCheckboxTopicToggle = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { value, checked } = event.target;\n\n const nextValues = checked\n ? [...interestInput, value]\n : interestInput.filter((interest) => interest !== value);\n recordAnswer(buildAnswerRecord(schema, nextValues, formatMessage));\n };\n\n return (\n <>\n <BaseStep\n eventKey={PROGRESSIVE_PROFILING_QUIZ_STEPS.INTERESTS_DECLARED}\n title={formatMessage(messages.title)}\n index={2}\n >\n <h4>{formatMessage(messages.question)}</h4>\n <p>{formatMessage(messages.subtitle)}</p>\n <div className=\"d-flex flex-column gap-2\">\n <InterestsDeclaredAutosuggest\n inputValue={inputValue}\n onChange={handleAutosuggestChange}\n skills={skills}\n />\n <div>\n {interestInput.map(interest => (\n <Chip\n key={interest}\n iconAfter={Close}\n iconAfterAlt={formatMessage(messages.removeInterestIconAlt)}\n variant=\"dark\"\n onIconAfterClick={() => removeInterest(interest)}\n className=\"interest-chip-checkbox\"\n >\n {interest}\n </Chip>\n ))}\n </div>\n <p className=\"font-weight-bold\">{formatMessage(messages.popularTopicsLabel)}</p>\n <Form.CheckboxSet\n name=\"interests-declared-topics\"\n isInline\n value={interestInput}\n onChange={handleCheckboxTopicToggle}\n className=\"interests-declared-checkbox-set\"\n >\n {skills?.slice(0, 10).map(skill => (\n <Form.Checkbox key={skill.value} value={skill.value} className=\"ml-0 mr-3\">\n {skill.value}\n </Form.Checkbox>\n ))}\n </Form.CheckboxSet>\n </div>\n </BaseStep>\n <Stepper.ActionRow eventKey={PROGRESSIVE_PROFILING_QUIZ_STEPS.INTERESTS_DECLARED}>\n <Button variant=\"outline-primary\" onClick={goToPreviousStep}>\n {formatMessage(stepMessages.backButton)}\n </Button>\n <Button onClick={goToNextStep}>\n {formatMessage(stepMessages.nextButton)}\n </Button>\n </Stepper.ActionRow>\n </>\n );\n};\n\nexport default InterestsDeclaredStep;\n"]}
|
package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.scss
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
.interests-declared-checkbox-set {
|
|
2
2
|
line-height: 2;
|
|
3
|
-
}
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.interest-chip-checkbox {
|
|
6
|
+
background-color: var(--pgn-color-light-500);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.interest-chip-checkbox > .pgn__chip__label {
|
|
10
|
+
color: var(--pgn-color-dark-500);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.interest-chip-checkbox > .btn-icon > .btn-icon__icon-container {
|
|
14
|
+
background: var(--pgn-color-light-500);
|
|
15
|
+
color: var(--pgn-color-dark-500);
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { Stepper, Button, Form } from '@openedx/paragon';
|
|
3
|
+
import { Stepper, Button, Form, Icon } from '@openedx/paragon';
|
|
4
4
|
import { useIntl } from '@openedx/frontend-base';
|
|
5
5
|
import { useProgressiveProfilingQuiz } from '../../../../../../widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider';
|
|
6
6
|
import { PROGRESSIVE_PROFILING_QUIZ_STEPS } from '../../../../../../widgets/ProgressiveProfilingQuiz/data/constants';
|
|
@@ -11,6 +11,7 @@ import stepMessages from '../messages';
|
|
|
11
11
|
import messages from './messages';
|
|
12
12
|
import schema, { NOT_EMPLOYED_VALUE } from './schema';
|
|
13
13
|
import ViewResultsButton from './ViewResultsButton';
|
|
14
|
+
import { Search } from '@openedx/paragon/icons';
|
|
14
15
|
const EMPTY_AUTOSUGGEST_VALUE = {
|
|
15
16
|
userProvidedText: '',
|
|
16
17
|
selectionValue: '',
|
|
@@ -36,7 +37,7 @@ const WorkStatusStep = () => {
|
|
|
36
37
|
}
|
|
37
38
|
recordAnswer(buildAnswerRecord(schema, checked ? [NOT_EMPLOYED_VALUE] : [], formatMessage));
|
|
38
39
|
};
|
|
39
|
-
return (_jsxs(_Fragment, { children: [_jsxs(BaseStep, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.WORK_STATUS, title: formatMessage(messages.title), index: 3, children: [_jsx("h4", { children: formatMessage(messages.question) }), _jsx("p", { children: formatMessage(messages.subtitle) }), _jsx(Form.Autosuggest, { name: "work-status-autosuggest", value: inputValue, onChange: handleJobSelect, className: "h-50", children: jobsList === null || jobsList === void 0 ? void 0 : jobsList.map(job => (_jsx(Form.AutosuggestOption, { id: job.jobTitle.replaceAll(' ', '-').toLowerCase(), children: job.jobTitle }, job.jobTitle))) }), _jsx(Form.Checkbox, { className: "mt-6", checked: isNotEmployed, onChange: handleNotEmployedToggle, children: formatMessage(messages.notEmployedOption) })] }), _jsxs(Stepper.ActionRow, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.WORK_STATUS, children: [_jsx(Button, { variant: "outline-primary", onClick: goToPreviousStep, children: formatMessage(stepMessages.backButton) }), _jsx(ViewResultsButton, {})] })] }));
|
|
40
|
+
return (_jsxs(_Fragment, { children: [_jsxs(BaseStep, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.WORK_STATUS, title: formatMessage(messages.title), index: 3, children: [_jsx("h4", { children: formatMessage(messages.question) }), _jsx("p", { children: formatMessage(messages.subtitle) }), _jsx(Form.Autosuggest, { name: "work-status-autosuggest", value: inputValue, onChange: handleJobSelect, className: "h-50", placeholder: "Search for a job title", trailingElement: (_jsx(Icon, { src: Search })), children: jobsList === null || jobsList === void 0 ? void 0 : jobsList.map(job => (_jsx(Form.AutosuggestOption, { id: job.jobTitle.replaceAll(' ', '-').toLowerCase(), children: job.jobTitle }, job.jobTitle))) }), _jsx(Form.Checkbox, { className: "mt-6", checked: isNotEmployed, onChange: handleNotEmployedToggle, children: _jsxs("span", { className: !isNotEmployed ? 'text-muted' : '', children: [" ", formatMessage(messages.notEmployedOption), " "] }) })] }), _jsxs(Stepper.ActionRow, { eventKey: PROGRESSIVE_PROFILING_QUIZ_STEPS.WORK_STATUS, children: [_jsx(Button, { variant: "outline-primary", onClick: goToPreviousStep, children: formatMessage(stepMessages.backButton) }), _jsx(ViewResultsButton, {})] })] }));
|
|
40
41
|
};
|
|
41
42
|
export default WorkStatusStep;
|
|
42
43
|
//# sourceMappingURL=index.js.map
|
package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AAExG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,EAAE,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,MAAM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CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Stepper, Button, Form, Icon } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\nimport { useProgressiveProfilingQuiz } from '@src/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider';\nimport { PROGRESSIVE_PROFILING_QUIZ_STEPS } from '@src/widgets/ProgressiveProfilingQuiz/data/constants';\nimport { AutosuggestValue } from '@src/widgets/ProgressiveProfilingQuiz/data';\nimport { buildAnswerRecord } from '@src/widgets/ProgressiveProfilingQuiz/data/schemaUtils';\nimport jobsList from '@src/widgets/ProgressiveProfilingQuiz/data/jobsList';\nimport BaseStep from '../BaseStep';\nimport stepMessages from '../messages';\nimport messages from './messages';\nimport schema, { NOT_EMPLOYED_VALUE } from './schema';\nimport ViewResultsButton from './ViewResultsButton';\nimport { Search } from '@openedx/paragon/icons';\n\nconst EMPTY_AUTOSUGGEST_VALUE: AutosuggestValue = {\n userProvidedText: '',\n selectionValue: '',\n selectionId: '',\n};\n\nconst WorkStatusStep: React.FC = () => {\n const {\n goToPreviousStep, answers, recordAnswer,\n } = useProgressiveProfilingQuiz();\n const { formatMessage } = useIntl();\n\n const [inputValue, setInputValue] = useState<AutosuggestValue>(EMPTY_AUTOSUGGEST_VALUE);\n\n const selectedValue = answers[schema.questionId]?.selectedValues[0] ?? '';\n const isNotEmployed = selectedValue === NOT_EMPLOYED_VALUE;\n\n const handleJobSelect = (value: AutosuggestValue) => {\n setInputValue(value);\n\n if (value.selectionValue) {\n recordAnswer(buildAnswerRecord(schema, [value.selectionValue], formatMessage));\n }\n };\n\n const handleNotEmployedToggle = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { checked } = event.target;\n\n if (checked) {\n setInputValue(EMPTY_AUTOSUGGEST_VALUE);\n }\n recordAnswer(buildAnswerRecord(schema, checked ? [NOT_EMPLOYED_VALUE] : [], formatMessage));\n };\n\n return (\n <>\n <BaseStep\n eventKey={PROGRESSIVE_PROFILING_QUIZ_STEPS.WORK_STATUS}\n title={formatMessage(messages.title)}\n index={3}\n >\n <h4>\n {formatMessage(messages.question)}\n </h4>\n <p>\n {formatMessage(messages.subtitle)}\n </p>\n <Form.Autosuggest\n name=\"work-status-autosuggest\"\n value={inputValue}\n onChange={handleJobSelect}\n className=\"h-50\"\n placeholder=\"Search for a job title\"\n trailingElement={(\n <Icon\n src={Search}\n />\n )}\n >\n {jobsList?.map(job => (\n <Form.AutosuggestOption\n key={job.jobTitle}\n id={job.jobTitle.replaceAll(' ', '-').toLowerCase()}\n >\n {job.jobTitle}\n </Form.AutosuggestOption>\n ))}\n </Form.Autosuggest>\n <Form.Checkbox\n className=\"mt-6\"\n checked={isNotEmployed}\n onChange={handleNotEmployedToggle}\n >\n <span className={!isNotEmployed ? 'text-muted' : ''}> {formatMessage(messages.notEmployedOption)} </span>\n </Form.Checkbox>\n </BaseStep>\n <Stepper.ActionRow eventKey={PROGRESSIVE_PROFILING_QUIZ_STEPS.WORK_STATUS}>\n <Button variant=\"outline-primary\" onClick={goToPreviousStep}>\n {formatMessage(stepMessages.backButton)}\n </Button>\n <ViewResultsButton />\n </Stepper.ActionRow>\n </>\n );\n};\n\nexport default WorkStatusStep;\n"]}
|
package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js
CHANGED
|
@@ -17,7 +17,7 @@ const messages = defineMessages({
|
|
|
17
17
|
},
|
|
18
18
|
notEmployedOption: {
|
|
19
19
|
id: 'progressiveProfilingQuiz.stepper.workStatus.notEmployedOption',
|
|
20
|
-
defaultMessage: '
|
|
20
|
+
defaultMessage: 'I’m not employed',
|
|
21
21
|
description: 'Checkbox label for indicating the user is not currently employed, in the work status step of the progressive profiling quiz',
|
|
22
22
|
},
|
|
23
23
|
viewResultsButton: {
|
package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,KAAK,EAAE;QACL,EAAE,EAAE,mDAAmD;QACvD,cAAc,EAAE,aAAa;QAC7B,WAAW,EAAE,kEAAkE;KAChF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sDAAsD;QAC1D,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,0EAA0E;KACxF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sDAAsD;QAC1D,cAAc,EAAE,iDAAiD;QACjE,WAAW,EAAE,kGAAkG;KAChH;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,+DAA+D;QACnE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,KAAK,EAAE;QACL,EAAE,EAAE,mDAAmD;QACvD,cAAc,EAAE,aAAa;QAC7B,WAAW,EAAE,kEAAkE;KAChF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sDAAsD;QAC1D,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,0EAA0E;KACxF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sDAAsD;QAC1D,cAAc,EAAE,iDAAiD;QACjE,WAAW,EAAE,kGAAkG;KAChH;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,+DAA+D;QACnE,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,6HAA6H;KAC3I;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,+DAA+D;QACnE,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,sFAAsF;KACpG;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n title: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.title',\n defaultMessage: 'Work Status',\n description: 'Title for the work status step of the progressive profiling quiz',\n },\n question: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.question',\n defaultMessage: 'What is your current role?',\n description: 'Question asked in the work status step of the progressive profiling quiz',\n },\n subtitle: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.subtitle',\n defaultMessage: 'Find the job title that best matches your role.',\n description: 'Subtitle text shown below the question in the work status step of the progressive profiling quiz',\n },\n notEmployedOption: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.notEmployedOption',\n defaultMessage: 'I’m not employed',\n description: 'Checkbox label for indicating the user is not currently employed, in the work status step of the progressive profiling quiz',\n },\n viewResultsButton: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.viewResultsButton',\n defaultMessage: 'View Results',\n description: 'Label for the button to complete the quiz and view results from the work status step',\n },\n});\n\nexport default messages;\n"]}
|