@cuemath/leap 2.8.37-rj-beta-0.2 → 2.8.37-rj-beta-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/assets/line-icons/icons/sheet.js +54 -0
- package/dist/assets/line-icons/icons/sheet.js.map +1 -0
- package/dist/features/analytics-events/whitelist-events.js +15 -13
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js +8 -3
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js +2 -2
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +22 -17
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +2 -1
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js +11 -9
- package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
- package/dist/features/milestone/edit/comps/milestone-edit-loader/milestone-edit-loader-styled.js +6 -8
- package/dist/features/milestone/edit/comps/milestone-edit-loader/milestone-edit-loader-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +130 -117
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js +205 -0
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js +11 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +9 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js +9 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js +19 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +47 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js +22 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js +60 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js +6 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/constant.js +6 -0
- package/dist/features/milestone/milestone-resources/resources-assign/constant.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-analytics-events.js +19 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-analytics-events.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js +32 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js +19 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js +85 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js +65 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +233 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/utils.js +12 -0
- package/dist/features/milestone/milestone-resources/resources-assign/utils.js.map +1 -0
- package/dist/features/post-game-stats/digital-meter/constants.js +1 -1
- package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +105 -99
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/post-game-stats/number-count-animation/number-count-animation.js +23 -16
- package/dist/features/post-game-stats/number-count-animation/number-count-animation.js.map +1 -1
- package/dist/features/trial-session/comps/about-cuemath/about-cuemath-constants.js +1 -1
- package/dist/features/trial-session/comps/about-cuemath/about-cuemath-constants.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +10 -10
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js +7 -7
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +23 -21
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +5 -5
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +37 -39
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +11 -11
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/left-panel/index.js +1 -1
- package/dist/features/trial-session/left-panel/index.js.map +1 -1
- package/dist/features/ui/grade-selector/grade-tab.js +15 -15
- package/dist/features/ui/grade-selector/grade-tab.js.map +1 -1
- package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js +28 -0
- package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js.map +1 -0
- package/dist/features/ui/inputs/searchable-input/searchable-input.js +101 -0
- package/dist/features/ui/inputs/searchable-input/searchable-input.js.map +1 -0
- package/dist/features/ui/tab/tab-styled.js +7 -8
- package/dist/features/ui/tab/tab-styled.js.map +1 -1
- package/dist/features/ui/tab/tab.js +36 -31
- package/dist/features/ui/tab/tab.js.map +1 -1
- package/dist/features/ui/theme/tab.js +3 -3
- package/dist/features/ui/theme/tab.js.map +1 -1
- package/dist/index.d.ts +49 -2
- package/dist/index.js +345 -341
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/post-game-stats/number-count-animation/number-count-animation-styled.js +0 -29
- package/dist/features/post-game-stats/number-count-animation/number-count-animation-styled.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"student-enrichment.js","sources":["../../../../../src/features/trial-session/comps/student-enrichment/student-enrichment.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-enrichment-styled';\n\nconst StudentEnrichment = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n const { grade, goals } = formData || {};\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream } = demoInfo || {};\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode: 'US',\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.ENRICHMENT,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n }),\n [milestoneConfig, grade, stream],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.ENRICHMENT) ?? {},\n [goals],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutEnrichment = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.ENRICHMENT,\n );\n\n updateSlideConfig({ goals: goalsWithoutEnrichment });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.ENRICHMENT, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={750} $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.ENRICHMENT} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={24}\n $justifyContent=\"center\"\n $background=\"PURPLE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Goal\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default StudentEnrichment;\n"],"names":["StudentEnrichment","memo","formData","milestoneConfig","updateSlideConfig","trialHomeData","useTrialSessionContext","grade","goals","demoInfo","stream","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutEnrichment","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,IAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAClE,EAAE,OAAAC,GAAO,OAAAC,MAAUN,KAAY,CAAA,GAE/B,EAAE,WAAWO,EAAa,IAAAJ,GAC1B,EAAE,QAAAK,EAAA,IAAWD,KAAY,IACzBE,IAAYC;AAAA,IAChB,MACEC,EAAmBV,GAAiB;AAAA,MAClC,aAAa;AAAA,MACb,OAAOI,KAAS;AAAA,MAChB,cAAcO,EAAc;AAAA,MAC5B,cAAcJ;AAAA,MACd,gBAAgB;AAAA,IAAA,CACjB;AAAA,IACH,CAACP,GAAiBI,GAAOG,CAAM;AAAA,EAAA,GAG3B,EAAE,WAAWK,EAAA,IAAiBH;AAAA,IAClC,OAAMJ,KAAA,gBAAAA,EAAO,KAAK,CAAAQ,MAAQA,EAAK,kBAAkBF,EAAc,gBAAe,CAAC;AAAA,IAC/E,CAACN,CAAK;AAAA,EAAA,GAGFS,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACzD,UAAI,CAACD,GAAO;AACV,cAAME,IAAyBb,KAAA,gBAAAA,EAAO;AAAA,UACpC,CAAAQ,MAAQA,EAAK,kBAAkBF,EAAc;AAAA;AAG7B,QAAAV,EAAA,EAAE,OAAOiB,EAAA,CAAwB;AAEnD;AAAA,MACF;AAEM,YAAA,EAAE,OAAAC,EAAU,IAAAF,GAEZG,IAAeC,EAAqBhB,GAAOM,EAAc,YAAY;AAAA,QACzE,WAAWK;AAAA,QACX,gBAAgBG;AAAA,QAChB,mBAAmBG,EAA2B;AAAA,MAAA,CAC/C;AAEiB,MAAArB,EAAA,EAAE,OAAOmB,EAAA,CAAc;AAAA,IAC3C;AAAA,IACA,CAACf,GAAOJ,CAAiB;AAAA,EAAA;AAIzB,SAAA,gBAAAsB,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,IACb,gBAAAJ,EAACK,GAAA,EAAsB,QAAQ,KAAK,gBAAe,OAAM,iBAAgB,UACvE,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EAAM,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKC,EAAI,YAAY,WAAU,QAAQ,CAAA,GACpF;AAAA,MACA,gBAAAN;AAAA,QAACO;AAAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAgB;AAAA,UAChB,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,OAAO;AAAA,UACP,UAAU;AAAA,UAEV,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,OAAM;AAAA,cACN,OAAOrB;AAAA,cACP,SAASJ;AAAA,cACT,OAAM;AAAA,cACN,OAAM;AAAA,cACN,UAAUM;AAAA,cACV,eAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAW,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
1
|
+
{"version":3,"file":"student-enrichment.js","sources":["../../../../../src/features/trial-session/comps/student-enrichment/student-enrichment.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-enrichment-styled';\n\nconst StudentEnrichment = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n const { grade, goals } = formData || {};\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream } = demoInfo || {};\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode: 'US',\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.ENRICHMENT,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n }),\n [milestoneConfig, grade, stream],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.ENRICHMENT) ?? {},\n [goals],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutEnrichment = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.ENRICHMENT,\n );\n\n updateSlideConfig({ goals: goalsWithoutEnrichment });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.ENRICHMENT, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={750} $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.ENRICHMENT} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={24}\n $justifyContent=\"center\"\n $background=\"PURPLE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Select a Goal\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default StudentEnrichment;\n"],"names":["StudentEnrichment","memo","formData","milestoneConfig","updateSlideConfig","trialHomeData","useTrialSessionContext","grade","goals","demoInfo","stream","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutEnrichment","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,IAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAClE,EAAE,OAAAC,GAAO,OAAAC,MAAUN,KAAY,CAAA,GAE/B,EAAE,WAAWO,EAAa,IAAAJ,GAC1B,EAAE,QAAAK,EAAA,IAAWD,KAAY,IACzBE,IAAYC;AAAA,IAChB,MACEC,EAAmBV,GAAiB;AAAA,MAClC,aAAa;AAAA,MACb,OAAOI,KAAS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AA,UACC,UAAU;AAAA,UACV,iBAAgB;AAAA,UAChB,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,OAAO;AAAA,UACP,UAAU;AAAA,UAEV,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,OAAM;AAAA,cACN,OAAOrB;AAAA,cACP,SAASJ;AAAA,cACT,OAAM;AAAA,cACN,OAAM;AAAA,cACN,UAAUM;AAAA,cACV,eAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAW,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,48 +1,48 @@
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
2
|
-
import { memo as b, useMemo as
|
3
|
-
import { GOAL_CATEGORY as
|
4
|
-
import
|
2
|
+
import { memo as b, useMemo as A, useCallback as E, useEffect as s } from "react";
|
3
|
+
import { GOAL_CATEGORY as g } from "../../../milestone/constants.js";
|
4
|
+
import w from "../../../ui/error/error.js";
|
5
5
|
import G from "../../../ui/image/image.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import { useGetStudentProfileSummary as
|
11
|
-
import { useTrialSessionContext as
|
12
|
-
import
|
13
|
-
import { Container as
|
14
|
-
import { getMilestoneGoalName as P, getDummyProfileImage as
|
6
|
+
import h from "../../../ui/layout/flex-view.js";
|
7
|
+
import L from "../../../ui/loader/app-loader/app-loader.js";
|
8
|
+
import D from "../../../ui/separator/separator.js";
|
9
|
+
import S from "../../../ui/text/text.js";
|
10
|
+
import { useGetStudentProfileSummary as X } from "../../api/student-profile-summary.js";
|
11
|
+
import { useTrialSessionContext as M } from "../../context/use-trial-session-context.js";
|
12
|
+
import O from "../slide-header/index.js";
|
13
|
+
import { Container as k, ContentWrapper as B, AbsoluteImage as H, ImageWrapper as R } from "./student-profile-styled.js";
|
14
|
+
import { getMilestoneGoalName as P, getDummyProfileImage as W } from "./student-profile-utils.js";
|
15
15
|
const re = b(() => {
|
16
|
-
const { isTeacher: t, studentId:
|
17
|
-
school_success_goal: P(r,
|
18
|
-
test_prep_goal: P(r,
|
16
|
+
const { isTeacher: t, studentId: l, formData: $, updateSlideConfig: d, updateButtonState: f } = M(), { name: y, goals: r, studentProfile: o } = $ || {}, { dummyProfileImageIndex: I, profileSummary: x } = o || {}, C = W(I), m = A(() => r && r.length > 0 ? {
|
17
|
+
school_success_goal: P(r, g.SCHOOL_SUCCESS),
|
18
|
+
test_prep_goal: P(r, g.TEST_PREP)
|
19
19
|
} : null, [r]), {
|
20
|
-
get:
|
21
|
-
data:
|
22
|
-
isProcessing:
|
23
|
-
isProcessed:
|
20
|
+
get: u,
|
21
|
+
data: _,
|
22
|
+
isProcessing: a,
|
23
|
+
isProcessed: c,
|
24
24
|
isProcessingFailed: T
|
25
|
-
} =
|
26
|
-
|
27
|
-
}, [
|
25
|
+
} = X(), { profile_summary: p } = _ || {}, n = E(() => {
|
26
|
+
m && u(l, m);
|
27
|
+
}, [u, m, l]);
|
28
28
|
return s(() => {
|
29
|
-
|
30
|
-
}, [
|
29
|
+
f("right", { isDisabled: a, isLoading: !1 });
|
30
|
+
}, [a, f]), s(() => {
|
31
31
|
t && !o && n();
|
32
32
|
}, [n, t, o]), s(() => {
|
33
|
-
t &&
|
33
|
+
t && c && d({
|
34
34
|
studentProfile: {
|
35
|
-
profileSummary:
|
35
|
+
profileSummary: p || "",
|
36
36
|
dummyProfileImageIndex: Math.floor(Math.random() * 6)
|
37
37
|
}
|
38
38
|
});
|
39
|
-
}, [
|
40
|
-
/* @__PURE__ */ e(
|
41
|
-
/* @__PURE__ */ e(
|
42
|
-
/* @__PURE__ */ i(
|
43
|
-
/* @__PURE__ */ e(
|
39
|
+
}, [c, t, p, d]), T ? /* @__PURE__ */ e(w, { height: "70vh", onTryAgain: n }) : a || !o ? /* @__PURE__ */ e(L, { height: "100vh" }) : /* @__PURE__ */ i(k, { children: [
|
40
|
+
/* @__PURE__ */ e(D, { height: 60 }),
|
41
|
+
/* @__PURE__ */ e(O, { marginBottom: 100 }),
|
42
|
+
/* @__PURE__ */ i(B, { $widthX: 46.875, children: [
|
43
|
+
/* @__PURE__ */ e(H, {}),
|
44
44
|
/* @__PURE__ */ i(
|
45
|
-
|
45
|
+
h,
|
46
46
|
{
|
47
47
|
$width: "100%",
|
48
48
|
$heightX: 21.875,
|
@@ -54,16 +54,14 @@ const re = b(() => {
|
|
54
54
|
$borderColor: "BLACK_T_87",
|
55
55
|
$borderRadiusX: 0.5,
|
56
56
|
children: [
|
57
|
-
/* @__PURE__ */ e(
|
58
|
-
/* @__PURE__ */ i(
|
59
|
-
/* @__PURE__ */ e(
|
60
|
-
/* @__PURE__ */ e(
|
57
|
+
/* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(G, { withLoader: !0, height: 200, width: 200, src: C }) }),
|
58
|
+
/* @__PURE__ */ i(h, { $flexGap: 16, children: [
|
59
|
+
/* @__PURE__ */ e(S, { $renderAs: "ac2-black", children: y }),
|
60
|
+
/* @__PURE__ */ e(S, { $renderAs: "ab1", children: x || "" })
|
61
61
|
] })
|
62
62
|
]
|
63
63
|
}
|
64
|
-
)
|
65
|
-
/* @__PURE__ */ e($, { heightX: 1 }),
|
66
|
-
/* @__PURE__ */ e(l, { $renderAs: "ub2", $align: "right", $color: "BLACK_T_60", children: "We can always update this later" })
|
64
|
+
)
|
67
65
|
] })
|
68
66
|
] });
|
69
67
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\nconst StudentProfile = memo(() => {\n const { isTeacher, studentId, formData, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { name, goals, studentProfile } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile]);\n\n useEffect(() => {\n if (isTeacher && isProcessed) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, studentProfileSummary, updateSlideConfig]);\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !studentProfile) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={100} />\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n
|
1
|
+
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\nconst StudentProfile = memo(() => {\n const { isTeacher, studentId, formData, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { name, goals, studentProfile } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile]);\n\n useEffect(() => {\n if (isTeacher && isProcessed) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, studentProfileSummary, updateSlideConfig]);\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !studentProfile) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={100} />\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","updateSlideConfig","updateButtonState","useTrialSessionContext","name","goals","studentProfile","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,KAAiBC,EAAK,MAAM;AAChC,QAAM,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,mBAAAC,GAAmB,mBAAAC,EAAA,IACzDC,KAEI,EAAE,MAAAC,GAAM,OAAAC,GAAO,gBAAAC,EAAe,IAAIN,KAAY,CAAA,GAC9C,EAAE,wBAAAO,GAAwB,gBAAAC,MAAmBF,KAAkB,CAAA,GAC/DG,IAAoBC,EAAqBH,CAAsB,GAE/DI,IAAUC,EAA+C,MACzDP,KAASA,EAAM,SAAS,IACnB;AAAA,IACL,qBAAqBQ,EAAqBR,GAAOS,EAAc,cAAc;AAAA,IAC7E,gBAAgBD,EAAqBR,GAAOS,EAAc,SAAS;AAAA,EAAA,IAIhE,MACN,CAACT,CAAK,CAAC,GAEJ;AAAA,IACJ,KAAKU;AAAA,IACL,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAA4B,GAC1B,EAAE,iBAAiBC,MAA0BL,KAAQ,CAAA,GAErDM,IAAYC,EAAY,MAAM;AAClC,IAAIZ,KACFI,EAAy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V,EAACW,GAAM,EAAA,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAK3B,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAmB,EAACM,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAT,EAAAY,GAAA,EAAK,WAAU,aAAa,UAAKjC,GAAA;AAAA,cACjC,gBAAAqB,EAAAY,GAAA,EAAK,WAAU,OAAO,eAAkB,IAAG;AAAA,YAAA,GAC9C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
2
|
+
import { memo as E, useCallback as P } from "react";
|
3
3
|
import { GIF as $ } from "../../../../assets/gif/gif.js";
|
4
|
-
import { GOAL_CATEGORY as
|
4
|
+
import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
|
5
5
|
import { getGoalsFromConfig as b } from "../../../milestone/create/milestone-create-helpers.js";
|
6
6
|
import G from "../../../ui/image/image.js";
|
7
7
|
import y from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
@@ -12,24 +12,24 @@ import { useTrialSessionContext as L } from "../../context/use-trial-session-con
|
|
12
12
|
import { updateGoalInFormData as A } from "../../helper.js";
|
13
13
|
import R from "../slide-header/index.js";
|
14
14
|
import { Container as j, ContentWrapper as k, ImageWrapper as D, InputContainer as O } from "./test-prep-styled.js";
|
15
|
-
const M =
|
15
|
+
const M = E(() => {
|
16
16
|
const { milestoneConfig: m, formData: s, updateSlideConfig: a, trialHomeData: l } = L(), { demo_info: p } = l, { stream: c } = p || {}, { grade: d, goals: e } = s || {}, f = b(m, {
|
17
17
|
countryCode: "US",
|
18
18
|
grade: d ?? "",
|
19
|
-
goalCategory:
|
19
|
+
goalCategory: r.TEST_PREP,
|
20
20
|
courseStream: c,
|
21
21
|
enrollmentType: "ONLINE"
|
22
|
-
}), { goal_code: g } = (e == null ? void 0 : e.find((
|
23
|
-
(
|
24
|
-
if (!
|
22
|
+
}), { goal_code: g } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, h = P(
|
23
|
+
(t, u) => {
|
24
|
+
if (!t) {
|
25
25
|
const _ = e == null ? void 0 : e.filter(
|
26
|
-
(
|
26
|
+
(S) => S.goal_category !== r.TEST_PREP
|
27
27
|
);
|
28
28
|
a({ goals: _ });
|
29
29
|
return;
|
30
30
|
}
|
31
|
-
const { label: T } = u, C = A(e,
|
32
|
-
goal_code:
|
31
|
+
const { label: T } = u, C = A(e, r.TEST_PREP, {
|
32
|
+
goal_code: t,
|
33
33
|
milestone_name: T,
|
34
34
|
milestone_date_ts: x()
|
35
35
|
});
|
@@ -55,7 +55,7 @@ const M = S(() => {
|
|
55
55
|
y,
|
56
56
|
{
|
57
57
|
renderAs: "primary",
|
58
|
-
label: "Test",
|
58
|
+
label: "Select a Test",
|
59
59
|
value: g,
|
60
60
|
options: f,
|
61
61
|
shape: "borderLess",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(() => {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream } = demoInfo || {};\n const { grade, goals } = formData || {};\n const goalsList = getGoalsFromConfig(milestoneConfig, {\n countryCode: 'US',\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.TEST_PREP,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n });\n const { goal_code: selectedGoal } =\n goals?.find(goal => goal.goal_category === GOAL_CATEGORY.TEST_PREP) ?? {};\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutTestPrep = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.TEST_PREP,\n );\n\n updateSlideConfig({ goals: goalsWithoutTestPrep });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.TEST_PREP, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.TEST_PREP} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={40}\n $justifyContent=\"center\"\n $background=\"BLUE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Test\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default TestPrep;\n"],"names":["TestPrep","memo","milestoneConfig","formData","updateSlideConfig","trialHomeData","useTrialSessionContext","demoInfo","stream","grade","goals","goalsList","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutTestPrep","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,IAAWC,EAAK,MAAM;AAC1B,QAAM,EAAE,iBAAAC,GAAiB,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAElE,EAAE,WAAWC,EAAa,IAAAF,GAC1B,EAAE,QAAAG,EAAA,IAAWD,KAAY,IACzB,EAAE,OAAAE,GAAO,OAAAC,MAAUP,KAAY,CAAA,GAC/BQ,IAAYC,EAAmBV,GAAiB;AAAA,IACpD,aAAa;AAAA,IACb,OAAOO,KAAS;AAAA,IAChB,cAAcI,EAAc;AAAA,IAC5B,cAAcL;AAAA,IACd,gBAAgB;AAAA,EAAA,CACjB,GACK,EAAE,WAAWM,OACjBJ,KAAA,gBAAAA,EAAO,KAAK,CAAQK,MAAAA,EAAK,kBAAkBF,EAAc,eAAc,CAAA,GAEnEG,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACzD,UAAI,CAACD,GAAO;AACV,cAAME,IAAuBV,KAAA,gBAAAA,EAAO;AAAA,UAClC,CAAAK,MAAQA,EAAK,kBAAkBF,EAAc;AAAA;AAG7B,QAAAT,EAAA,EAAE,OAAOgB,EAAA,CAAsB;AAEjD;AAAA,MACF;AAEM,YAAA,EAAE,OAAAC,EAAU,IAAAF,GAEZG,IAAeC,EAAqBb,GAAOG,EAAc,WAAW;AAAA,QACxE,WAAWK;AAAA,QACX,gBAAgBG;AAAA,QAChB,mBAAmBG,EAA2B;AAAA,MAAA,CAC/C;AAEiB,MAAApB,EAAA,EAAE,OAAOkB,EAAA,CAAc;AAAA,IAC3C;AAAA,IACA,CAACZ,GAAON,CAAiB;AAAA,EAAA;AAIzB,SAAA,gBAAAqB,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,sBACZC,GAAA,EAAsB,gBAAe,OAAM,iBAAgB,UAC1D,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EAAM,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKC,EAAI,WAAW,WAAU,QAAQ,CAAA,GACnF;AAAA,MACA,gBAAAN;AAAA,QAACO;AAAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAgB;AAAA,UAChB,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,OAAO;AAAA,UACP,UAAU;AAAA,UAEV,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,OAAM;AAAA,cACN,OAAOrB;AAAA,cACP,SAASH;AAAA,cACT,OAAM;AAAA,cACN,OAAM;AAAA,cACN,UAAUK;AAAA,cACV,eAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAW,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
1
|
+
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(() => {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream } = demoInfo || {};\n const { grade, goals } = formData || {};\n const goalsList = getGoalsFromConfig(milestoneConfig, {\n countryCode: 'US',\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.TEST_PREP,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n });\n const { goal_code: selectedGoal } =\n goals?.find(goal => goal.goal_category === GOAL_CATEGORY.TEST_PREP) ?? {};\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutTestPrep = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.TEST_PREP,\n );\n\n updateSlideConfig({ goals: goalsWithoutTestPrep });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.TEST_PREP, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.TEST_PREP} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={40}\n $justifyContent=\"center\"\n $background=\"BLUE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Select a Test\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default TestPrep;\n"],"names":["TestPrep","memo","milestoneConfig","formData","updateSlideConfig","trialHomeData","useTrialSessionContext","demoInfo","stream","grade","goals","goalsList","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutTestPrep","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,IAAWC,EAAK,MAAM;AAC1B,QAAM,EAAE,iBAAAC,GAAiB,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAElE,EAAE,WAAWC,EAAa,IAAAF,GAC1B,EAAE,QAAAG,EAAA,IAAWD,KAAY,IACzB,EAAE,OAAAE,GAAO,OAAAC,MAAUP,KAAY,CAAA,GAC/BQ,IAAYC,EAAmBV,GAAiB;AAAA,IACpD,aAAa;AAAA,IACb,OAAOO,KAAS;AAAA,IAChB,cAAcI,EAAc;AAAA,IAC5B,cAAcL;AAAA,IACd,gBAAgB;AAAA,EAAA,CACjB,GACK,EAAE,WAAWM,OACjBJ,KAAA,gBAAAA,EAAO,KAAK,CAAQK,MAAAA,EAAK,kBAAkBF,EAAc,eAAc,CAAA,GAEnEG,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACzD,UAAI,CAACD,GAAO;A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AA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -33,7 +33,7 @@ const q = () => {
|
|
33
33
|
!r && /* @__PURE__ */ t(o, { $gutterX: 0.5, $gapX: 1, $flexRowGapX: 0.5, children: [
|
34
34
|
/* @__PURE__ */ e(u, { width: 108, height: 16, color: _().colors.BLACK }),
|
35
35
|
/* @__PURE__ */ t(o, { $flexDirection: "row", $alignItems: "center", children: [
|
36
|
-
/* @__PURE__ */ e(s, { $renderAs: "ub3-bold", $color: "BLACK_T_60", children: "4.
|
36
|
+
/* @__PURE__ */ e(s, { $renderAs: "ub3-bold", $color: "BLACK_T_60", children: "4.8+ Rating on" }),
|
37
37
|
/* @__PURE__ */ e($, { withLoader: !0, src: T.STAR_WITH_GREEN_FILL, width: 20, height: 20 }),
|
38
38
|
/* @__PURE__ */ e(s, { $renderAs: "ub3-bold", $color: "BLACK_T_60", children: "Trustpilot" })
|
39
39
|
] })
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/features/trial-session/left-panel/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport CuemathLogo from '../../../assets/line-icons/icons/cuemath-logo';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getTheme } from '../../ui/theme/get-theme';\nimport StudentAVPanel from '../comps/av-panels/student-av-panel/student-av-panel';\nimport TeacherAVPanel from '../comps/av-panels/teacher-av-panel/teacher-av-panel';\nimport Cues from '../comps/cue-tips/cues';\nimport Tips from '../comps/cue-tips/tips';\nimport NavigationBar from '../comps/navigation-bar';\nimport Solutions from '../comps/solutions';\nimport { useTrialSessionContext } from '../context/use-trial-session-context';\nimport {\n STUDENT_LEFT_PANEL_MAX_WIDTH,\n TEACHER_LEFT_PANEL_MAX_WIDTH,\n TrialPageId,\n} from '../trial-session-constants';\nimport * as Styled from './left-panel-styled';\n\nconst LeftPanel: React.FC = () => {\n const { isTeacher, slideConfig, worksheetNavigationPanel, questionsRatingPanel } =\n useTrialSessionContext();\n const { cues = [], dos = [], donts = [], renderAVIn, id, solutions } = slideConfig || {};\n\n if (!isTeacher && renderAVIn !== 'left') {\n return null;\n }\n\n return (\n <Styled.Container\n $maxWidth={isTeacher ? TEACHER_LEFT_PANEL_MAX_WIDTH : STUDENT_LEFT_PANEL_MAX_WIDTH}\n >\n {renderAVIn === 'left' && (\n <FlexView\n $width=\"100%\"\n $flexDirection={isTeacher ? 'row' : 'column'}\n $gutterX={isTeacher ? 0.25 : 0.5}\n $gapX={isTeacher ? 0.25 : 0.5}\n $flexGapX={isTeacher ? 0.25 : 0.5}\n >\n {!isTeacher && (\n <FlexView $gutterX={0.5} $gapX={1} $flexRowGapX={0.5}>\n <CuemathLogo width={108} height={16} color={getTheme().colors.BLACK} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_T_60\">\n 4.
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/features/trial-session/left-panel/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport CuemathLogo from '../../../assets/line-icons/icons/cuemath-logo';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getTheme } from '../../ui/theme/get-theme';\nimport StudentAVPanel from '../comps/av-panels/student-av-panel/student-av-panel';\nimport TeacherAVPanel from '../comps/av-panels/teacher-av-panel/teacher-av-panel';\nimport Cues from '../comps/cue-tips/cues';\nimport Tips from '../comps/cue-tips/tips';\nimport NavigationBar from '../comps/navigation-bar';\nimport Solutions from '../comps/solutions';\nimport { useTrialSessionContext } from '../context/use-trial-session-context';\nimport {\n STUDENT_LEFT_PANEL_MAX_WIDTH,\n TEACHER_LEFT_PANEL_MAX_WIDTH,\n TrialPageId,\n} from '../trial-session-constants';\nimport * as Styled from './left-panel-styled';\n\nconst LeftPanel: React.FC = () => {\n const { isTeacher, slideConfig, worksheetNavigationPanel, questionsRatingPanel } =\n useTrialSessionContext();\n const { cues = [], dos = [], donts = [], renderAVIn, id, solutions } = slideConfig || {};\n\n if (!isTeacher && renderAVIn !== 'left') {\n return null;\n }\n\n return (\n <Styled.Container\n $maxWidth={isTeacher ? TEACHER_LEFT_PANEL_MAX_WIDTH : STUDENT_LEFT_PANEL_MAX_WIDTH}\n >\n {renderAVIn === 'left' && (\n <FlexView\n $width=\"100%\"\n $flexDirection={isTeacher ? 'row' : 'column'}\n $gutterX={isTeacher ? 0.25 : 0.5}\n $gapX={isTeacher ? 0.25 : 0.5}\n $flexGapX={isTeacher ? 0.25 : 0.5}\n >\n {!isTeacher && (\n <FlexView $gutterX={0.5} $gapX={1} $flexRowGapX={0.5}>\n <CuemathLogo width={108} height={16} color={getTheme().colors.BLACK} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_T_60\">\n 4.8+ Rating on\n </Text>\n <Image withLoader src={ILLUSTRATIONS.STAR_WITH_GREEN_FILL} width={20} height={20} />\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_T_60\">\n Trustpilot\n </Text>\n </FlexView>\n </FlexView>\n )}\n <FlexView $width={isTeacher ? 'calc(50% - 2px)' : '100%'}>\n <TeacherAVPanel />\n </FlexView>\n <FlexView $width={isTeacher ? 'calc(50% - 2px)' : '100%'}>\n <StudentAVPanel insideLeftPanel />\n </FlexView>\n </FlexView>\n )}\n {isTeacher && (\n <>\n <Styled.ContentWrapper\n $background=\"WHITE_3\"\n $justifyContent={renderAVIn === 'left' ? 'flex-start' : 'center'}\n >\n <FlexView $gutterX={0.75} $gapX={1.5} $flexGapX={1.5}>\n {cues.length > 0 && <Cues cues={cues} />}\n {solutions && solutions.length > 0 && <Solutions solutions={solutions} />}\n {dos.length + donts.length > 0 && <Tips dos={dos} donts={donts} />}\n {id === TrialPageId.LEARNING_WORKSHEET && questionsRatingPanel}\n </FlexView>\n </Styled.ContentWrapper>\n {id === TrialPageId.LEARNING_WORKSHEET && worksheetNavigationPanel ? (\n worksheetNavigationPanel\n ) : (\n <NavigationBar />\n )}\n </>\n )}\n </Styled.Container>\n );\n};\n\nexport default LeftPanel;\n"],"names":["LeftPanel","isTeacher","slideConfig","worksheetNavigationPanel","questionsRatingPanel","useTrialSessionContext","cues","dos","donts","renderAVIn","id","solutions","jsxs","Styled.Container","TEACHER_LEFT_PANEL_MAX_WIDTH","STUDENT_LEFT_PANEL_MAX_WIDTH","FlexView","jsx","CuemathLogo","getTheme","Text","Image","ILLUSTRATIONS","TeacherAVPanel","StudentAVPanel","Fragment","Styled.ContentWrapper","Cues","Solutions","Tips","TrialPageId","NavigationBar"],"mappings":";;;;;;;;;;;;;;;;AAsBA,MAAMA,IAAsB,MAAM;AAChC,QAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,0BAAAC,GAA0B,sBAAAC,EAAA,IACxDC,KACI,EAAE,MAAAC,IAAO,CAAA,GAAI,KAAAC,IAAM,CAAC,GAAG,OAAAC,IAAQ,IAAI,YAAAC,GAAY,IAAAC,GAAI,WAAAC,MAAcT,KAAe,CAAA;AAElF,SAAA,CAACD,KAAaQ,MAAe,SACxB,OAIP,gBAAAG;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWZ,IAAYa,IAA+BC;AAAA,MAErD,UAAA;AAAA,QAAAN,MAAe,UACd,gBAAAG;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,QAAO;AAAA,YACP,gBAAgBf,IAAY,QAAQ;AAAA,YACpC,UAAUA,IAAY,OAAO;AAAA,YAC7B,OAAOA,IAAY,OAAO;AAAA,YAC1B,WAAWA,IAAY,OAAO;AAAA,YAE7B,UAAA;AAAA,cAAC,CAAAA,uBACCe,GAAS,EAAA,UAA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AAAC,GAAc;AAAA,gBAC/DE,MAAOoB,EAAY,sBAAsB1B;AAAA,cAAA,GAC5C;AAAA,YAAA;AAAA,UACF;AAAA,UACCM,MAAOoB,EAAY,sBAAsB3B,IACxCA,sBAEC4B,GAAc,EAAA;AAAA,QAAA,GAEnB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useCallback as
|
3
|
-
import
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
2
|
+
import { useCallback as n } from "react";
|
3
|
+
import p from "../tab/tab.js";
|
4
4
|
const u = ({
|
5
|
-
renderAs:
|
6
|
-
size:
|
7
|
-
label:
|
5
|
+
renderAs: o = "primary",
|
6
|
+
size: t = "regular",
|
7
|
+
label: a,
|
8
8
|
selected: i,
|
9
|
-
width:
|
9
|
+
width: m,
|
10
10
|
onSelect: r,
|
11
11
|
grade: e
|
12
12
|
}) => {
|
13
|
-
const
|
13
|
+
const s = n(() => {
|
14
14
|
r(e);
|
15
15
|
}, [e, r]);
|
16
|
-
return /* @__PURE__ */
|
17
|
-
|
16
|
+
return /* @__PURE__ */ l(
|
17
|
+
p,
|
18
18
|
{
|
19
|
-
label:
|
19
|
+
label: a,
|
20
20
|
$selected: i,
|
21
|
-
$width:
|
22
|
-
$renderAs:
|
23
|
-
$size:
|
24
|
-
onClick:
|
21
|
+
$width: m,
|
22
|
+
$renderAs: o,
|
23
|
+
$size: t,
|
24
|
+
onClick: s
|
25
25
|
}
|
26
26
|
);
|
27
27
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grade-tab.js","sources":["../../../../src/features/ui/grade-selector/grade-tab.tsx"],"sourcesContent":["import type { IGradeTabProps } from './grade-selector-types';\n\nimport React, { useCallback } from 'react';\n\nimport Tab from '../tab/tab';\n\nconst GradeTab: React.FC<IGradeTabProps> = ({\n renderAs = 'primary',\n size = 'regular',\n label,\n selected,\n width,\n onSelect,\n grade,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(grade);\n }, [grade, onSelect]);\n\n return (\n <Tab\n label={label}\n $selected={selected}\n $width={width}\n $renderAs={renderAs}\n $size={size}\n onClick={handleClick}\n />\n );\n};\n\nexport default GradeTab;\n"],"names":["GradeTab","renderAs","size","label","selected","width","onSelect","grade","handleClick","useCallback","jsx","Tab"],"mappings":";;;AAMA,MAAMA,IAAqC,CAAC;AAAA,EAC1C,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACE,QAAAC,IAAcC,EAAY,MAAM;AACpC,IAAAH,EAASC,CAAK;AAAA,EAAA,GACb,CAACA,GAAOD,CAAQ,CAAC;AAGlB,SAAA,gBAAAI;AAAA,IAACC;
|
1
|
+
{"version":3,"file":"grade-tab.js","sources":["../../../../src/features/ui/grade-selector/grade-tab.tsx"],"sourcesContent":["import type { IGradeTabProps } from './grade-selector-types';\n\nimport React, { useCallback } from 'react';\n\nimport Tab from '../tab/tab';\n\nconst GradeTab: React.FC<IGradeTabProps> = ({\n renderAs = 'primary',\n size = 'regular',\n label,\n selected,\n width,\n onSelect,\n grade,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(grade);\n }, [grade, onSelect]);\n\n return (\n <Tab\n label={label}\n $selected={selected}\n $width={width}\n $renderAs={renderAs}\n $size={size}\n onClick={handleClick}\n />\n );\n};\n\nexport default GradeTab;\n"],"names":["GradeTab","renderAs","size","label","selected","width","onSelect","grade","handleClick","useCallback","jsx","Tab"],"mappings":";;;AAMA,MAAMA,IAAqC,CAAC;AAAA,EAC1C,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACE,QAAAC,IAAcC,EAAY,MAAM;AACpC,IAAAH,EAASC,CAAK;AAAA,EAAA,GACb,CAACA,GAAOD,CAAQ,CAAC;AAGlB,SAAA,gBAAAI;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAAR;AAAA,MACA,WAAWC;AAAA,MACX,QAAQC;AAAA,MACR,WAAWJ;AAAA,MACX,OAAOC;AAAA,MACP,SAASM;AAAA,IAAA;AAAA,EAAA;AAGf;"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import r from "styled-components";
|
2
|
+
import p from "../../../../assets/line-icons/icons/cross.js";
|
3
|
+
const h = r.div(
|
4
|
+
({ theme: n, $size: s, $disabled: o, $inputRenderAs: i }) => {
|
5
|
+
const { colors: c, input: t } = n, { iconsize: e } = t.sizes[s], { labelColorName: l } = t.variants[i];
|
6
|
+
return `
|
7
|
+
cursor: pointer;
|
8
|
+
width: ${e}px;
|
9
|
+
height: ${e}px;
|
10
|
+
|
11
|
+
align-self: center;
|
12
|
+
color: ${c[l[o ? "disabled" : "inactive"]]};
|
13
|
+
pointer-events: ${o ? "none" : "auto"};
|
14
|
+
|
15
|
+
& svg {
|
16
|
+
width: 100%;
|
17
|
+
height: 100%;
|
18
|
+
}
|
19
|
+
`;
|
20
|
+
}
|
21
|
+
), m = r(p)`
|
22
|
+
cursor: pointer;
|
23
|
+
`;
|
24
|
+
export {
|
25
|
+
m as StyledCrossIcon,
|
26
|
+
h as StyledPrefixElementWrapper
|
27
|
+
};
|
28
|
+
//# sourceMappingURL=searchable-input-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"searchable-input-styled.js","sources":["../../../../../src/features/ui/inputs/searchable-input/searchable-input-styled.tsx"],"sourcesContent":["import type { IBaseInputProps } from '../base-input/base-input-types';\n\nimport styled from 'styled-components';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\n\ninterface IStyledBackIconProps {\n $inputRenderAs: IBaseInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $disabled?: boolean;\n}\n\nconst StyledPrefixElementWrapper = styled.div<IStyledBackIconProps>(\n ({ theme, $size, $disabled, $inputRenderAs }) => {\n const { colors, input } = theme;\n const { iconsize } = input.sizes[$size];\n const { labelColorName } = input.variants[$inputRenderAs];\n\n return `\n cursor: pointer;\n width: ${iconsize}px;\n height: ${iconsize}px;\n\n align-self: center;\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n pointer-events: ${$disabled ? 'none' : 'auto'};\n\n & svg {\n width: 100%;\n height: 100%;\n }\n `;\n },\n);\n\nconst StyledCrossIcon = styled(CrossIcon)`\n cursor: pointer;\n`;\n\nexport { StyledPrefixElementWrapper, StyledCrossIcon };\n"],"names":["StyledPrefixElementWrapper","styled","theme","$size","$disabled","$inputRenderAs","colors","input","iconsize","labelColorName","StyledCrossIcon","CrossIcon"],"mappings":";;AAYA,MAAMA,IAA6BC,EAAO;AAAA,EACxC,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAC,GAAW,gBAAAC,QAAqB;AACzC,UAAA,EAAE,QAAAC,GAAQ,OAAAC,EAAU,IAAAL,GACpB,EAAE,UAAAM,EAAa,IAAAD,EAAM,MAAMJ,CAAK,GAChC,EAAE,gBAAAM,EAAmB,IAAAF,EAAM,SAASF,CAAc;AAEjD,WAAA;AAAA;AAAA,iBAEMG,CAAQ;AAAA,kBACPA,CAAQ;AAAA;AAAA;AAAA,iBAGTF,EAAOG,EAAeL,IAAY,aAAa,UAAU,CAAC,CAAC;AAAA,0BAClDA,IAAY,SAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnD;AACF,GAEMM,IAAkBT,EAAOU,CAAS;AAAA;AAAA;"}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { jsx as r, jsxs as I } from "react/jsx-runtime";
|
2
|
+
import { useRef as O, useCallback as i } from "react";
|
3
|
+
import v from "../../buttons/clickable/clickable.js";
|
4
|
+
import S from "../../layout/flex-view.js";
|
5
|
+
import z from "../base-input/base-input.js";
|
6
|
+
import { Input as A } from "../text-input/text-input-styled.js";
|
7
|
+
import { StyledPrefixElementWrapper as D, StyledCrossIcon as R } from "./searchable-input-styled.js";
|
8
|
+
const G = (u) => {
|
9
|
+
const {
|
10
|
+
renderAs: s,
|
11
|
+
value: h,
|
12
|
+
disabled: t,
|
13
|
+
label: o,
|
14
|
+
width: f,
|
15
|
+
widthX: $,
|
16
|
+
shape: b = "curved",
|
17
|
+
size: c = "regular",
|
18
|
+
onSearchTextChange: a,
|
19
|
+
onPrefixElementClick: l,
|
20
|
+
onEnter: e,
|
21
|
+
searchOnClear: d,
|
22
|
+
analyticsLabel: C,
|
23
|
+
analyticsProps: x,
|
24
|
+
prefixElement: p
|
25
|
+
} = u, m = O(null), g = i(
|
26
|
+
(n) => {
|
27
|
+
a(n.target.value);
|
28
|
+
},
|
29
|
+
[a]
|
30
|
+
), w = i(
|
31
|
+
(n) => {
|
32
|
+
n.key === "Enter" && (e == null || e());
|
33
|
+
},
|
34
|
+
[e]
|
35
|
+
), y = i(() => {
|
36
|
+
l == null || l();
|
37
|
+
}, [l]), k = i(() => {
|
38
|
+
var n;
|
39
|
+
a(""), d && (e == null || e(d)), (n = m.current) == null || n.focus();
|
40
|
+
}, [a, d, e]);
|
41
|
+
return /* @__PURE__ */ r(
|
42
|
+
v,
|
43
|
+
{
|
44
|
+
label: o ?? "searchable_input",
|
45
|
+
analyticsLabel: C,
|
46
|
+
analyticsProps: x,
|
47
|
+
disabled: t,
|
48
|
+
children: /* @__PURE__ */ r(
|
49
|
+
z,
|
50
|
+
{
|
51
|
+
renderAs: s,
|
52
|
+
size: c,
|
53
|
+
shape: b,
|
54
|
+
disabled: t,
|
55
|
+
label: o,
|
56
|
+
inputElement: /* @__PURE__ */ I(
|
57
|
+
S,
|
58
|
+
{
|
59
|
+
$flexDirection: "row",
|
60
|
+
$alignItems: "center",
|
61
|
+
$height: "100%",
|
62
|
+
$flexGap: 12,
|
63
|
+
$width: f,
|
64
|
+
$widthX: $,
|
65
|
+
children: [
|
66
|
+
l && p && /* @__PURE__ */ r(
|
67
|
+
D,
|
68
|
+
{
|
69
|
+
$inputRenderAs: s,
|
70
|
+
$disabled: t,
|
71
|
+
$size: c,
|
72
|
+
onClick: y,
|
73
|
+
children: p
|
74
|
+
}
|
75
|
+
),
|
76
|
+
/* @__PURE__ */ r(
|
77
|
+
A,
|
78
|
+
{
|
79
|
+
$renderAs: s,
|
80
|
+
placeholder: o,
|
81
|
+
ref: m,
|
82
|
+
$size: c,
|
83
|
+
value: h ?? "",
|
84
|
+
disabled: t,
|
85
|
+
onChange: g,
|
86
|
+
onKeyDown: w
|
87
|
+
}
|
88
|
+
)
|
89
|
+
]
|
90
|
+
}
|
91
|
+
),
|
92
|
+
siblingElement: h && /* @__PURE__ */ r(R, { onClick: k })
|
93
|
+
}
|
94
|
+
)
|
95
|
+
}
|
96
|
+
);
|
97
|
+
};
|
98
|
+
export {
|
99
|
+
G as default
|
100
|
+
};
|
101
|
+
//# sourceMappingURL=searchable-input.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"searchable-input.js","sources":["../../../../../src/features/ui/inputs/searchable-input/searchable-input.tsx"],"sourcesContent":["import type { ISearchableInputProps } from './searchable-input-types';\nimport type { ChangeEvent } from 'react';\n\nimport { useCallback, useRef } from 'react';\n\nimport Clickable from '../../buttons/clickable/clickable';\nimport FlexView from '../../layout/flex-view';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './searchable-input-styled';\n\nconst SearchableInput = <IDType extends string>(props: ISearchableInputProps<IDType>) => {\n const {\n renderAs,\n value,\n disabled,\n label,\n width,\n widthX,\n shape = 'curved',\n size = 'regular',\n onSearchTextChange,\n onPrefixElementClick,\n onEnter,\n searchOnClear,\n analyticsLabel,\n analyticsProps,\n prefixElement,\n } = props;\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleOnChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onSearchTextChange(e.target.value);\n },\n [onSearchTextChange],\n );\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const handleOnPrefixElementClick = useCallback(() => {\n onPrefixElementClick?.();\n }, [onPrefixElementClick]);\n\n const handleOnClear = useCallback(() => {\n onSearchTextChange('');\n\n if (searchOnClear) {\n onEnter?.(searchOnClear);\n }\n\n inputRef.current?.focus();\n }, [onSearchTextChange, searchOnClear, onEnter]);\n\n return (\n <Clickable\n label={label ?? 'searchable_input'}\n analyticsLabel={analyticsLabel}\n analyticsProps={analyticsProps}\n disabled={disabled}\n >\n <BaseInput\n renderAs={renderAs}\n size={size}\n shape={shape}\n disabled={disabled}\n label={label}\n inputElement={\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $height=\"100%\"\n $flexGap={12}\n $width={width}\n $widthX={widthX}\n >\n {onPrefixElementClick && prefixElement && (\n <Styled.StyledPrefixElementWrapper\n $inputRenderAs={renderAs}\n $disabled={disabled}\n $size={size}\n onClick={handleOnPrefixElementClick}\n >\n {prefixElement}\n </Styled.StyledPrefixElementWrapper>\n )}\n <Input\n $renderAs={renderAs}\n placeholder={label}\n ref={inputRef}\n $size={size}\n value={value ?? ''}\n disabled={disabled}\n onChange={handleOnChange}\n onKeyDown={handleOnKeyDown}\n />\n </FlexView>\n }\n siblingElement={value && <Styled.StyledCrossIcon onClick={handleOnClear} />}\n />\n </Clickable>\n );\n};\n\nexport default SearchableInput;\n"],"names":["SearchableInput","props","renderAs","value","disabled","label","width","widthX","shape","size","onSearchTextChange","onPrefixElementClick","onEnter","searchOnClear","analyticsLabel","analyticsProps","prefixElement","inputRef","useRef","handleOnChange","useCallback","e","handleOnKeyDown","handleOnPrefixElementClick","handleOnClear","_a","jsx","Clickable","BaseInput","jsxs","FlexView","Styled.StyledPrefixElementWrapper","Input","Styled.StyledCrossIcon"],"mapp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B;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,gBAAe;AAAA,cACf,aAAY;AAAA,cACZ,SAAQ;AAAA,cACR,UAAU;AAAA,cACV,QAAQxB;AAAA,cACR,SAASC;AAAA,cAER,UAAA;AAAA,gBAAAI,KAAwBK,KACvB,gBAAAU;AAAA,kBAACK;AAAAA,kBAAA;AAAA,oBACC,gBAAgB7B;AAAA,oBAChB,WAAWE;AAAA,oBACX,OAAOK;AAAA,oBACP,SAASc;AAAA,oBAER,UAAAP;AAAA,kBAAA;AAAA,gBACH;AAAA,gBAEF,gBAAAU;AAAA,kBAACM;AAAA,kBAAA;AAAA,oBACC,WAAW9B;AAAA,oBACX,aAAaG;AAAA,oBACb,KAAKY;AAAA,oBACL,OAAOR;AAAA,oBACP,OAAON,KAAS;AAAA,oBAChB,UAAAC;AAAA,oBACA,UAAUe;AAAA,oBACV,WAAWG;AAAA,kBAAA;AAAA,gBACb;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,UAEF,gBAAgBnB,KAAS,gBAAAuB,EAACO,GAAA,EAAuB,SAAST,GAAe;AAAA,QAAA;AAAA,MAC3E;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
@@ -2,20 +2,19 @@ import x from "styled-components";
|
|
2
2
|
import s from "../layout/flex-view.js";
|
3
3
|
const k = x(s)(({
|
4
4
|
theme: v,
|
5
|
-
$width: e,
|
6
5
|
$selected: i,
|
7
6
|
$size: p,
|
8
|
-
$renderAs:
|
9
|
-
$disabled: r
|
7
|
+
$renderAs: d,
|
8
|
+
$disabled: r,
|
9
|
+
$shape: e
|
10
10
|
}) => {
|
11
|
-
const { colors: o, tab:
|
11
|
+
const { colors: o, tab: g, layout: h } = v, { sizes: l, variants: u } = g, { height: b, paddingHorizontal: m } = l[p], { backgroundColorName: t, colorName: a, borderColorName: n, fontWeight: c } = u[d];
|
12
12
|
return `
|
13
|
-
|
14
|
-
height:${u}px;
|
13
|
+
height:${b}px;
|
15
14
|
padding:0 ${m}px;
|
16
|
-
border-radius:8px;
|
17
15
|
cursor:${r ? "not-allowed" : "pointer"};
|
18
|
-
margin:${
|
16
|
+
margin:${e === "square" ? h.gutter * 0.5 : 0}px;
|
17
|
+
border-radius: ${e === "curved" ? "50px" : "8px"};
|
19
18
|
border:1px solid ${r ? o[n.disabled] : i ? o[n.active] : o[n.inactive]};
|
20
19
|
background-color: ${r ? o[t.disabled] : i ? o[t.active] : o[t.inactive]};
|
21
20
|
& div{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-styled.js","sources":["../../../../src/features/ui/tab/tab-styled.tsx"],"sourcesContent":["import type { ITabWrapperProps } from './tab-types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\nconst TabWrapper = styled(FlexView)<ITabWrapperProps>(({\n theme,\n $
|
1
|
+
{"version":3,"file":"tab-styled.js","sources":["../../../../src/features/ui/tab/tab-styled.tsx"],"sourcesContent":["import type { ITabWrapperProps } from './tab-types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\nconst TabWrapper = styled(FlexView)<ITabWrapperProps>(({\n theme,\n $selected,\n $size,\n $renderAs,\n $disabled,\n $shape,\n}) => {\n const { colors, tab, layout } = theme;\n const { sizes, variants } = tab;\n const { height, paddingHorizontal } = sizes[$size];\n const { backgroundColorName, colorName, borderColorName, fontWeight } = variants[$renderAs];\n\n return `\n height:${height}px;\n padding:0 ${paddingHorizontal}px;\n cursor:${$disabled ? 'not-allowed' : 'pointer'};\n margin:${$shape === 'square' ? layout.gutter * 0.5 : 0}px;\n border-radius: ${$shape === 'curved' ? '50px' : '8px'};\n border:1px solid ${\n $disabled\n ? colors[borderColorName.disabled]\n : $selected\n ? colors[borderColorName.active]\n : colors[borderColorName.inactive]\n };\n background-color: ${\n $disabled\n ? colors[backgroundColorName.disabled]\n : $selected\n ? colors[backgroundColorName.active]\n : colors[backgroundColorName.inactive]\n };\n & div{\n font-weight:${\n $disabled ? fontWeight.disabled : $selected ? fontWeight.active : fontWeight.inactive\n };\n color: ${\n $disabled\n ? colors[colorName.disabled]\n : $selected\n ? colors[colorName.active]\n : colors[colorName.inactive]\n };\n }\n &:hover {\n background-color:${\n $disabled\n ? colors[backgroundColorName.disabled]\n : $selected\n ? colors[backgroundColorName.active]\n : colors[backgroundColorName.hover]\n };\n border-color: ${\n $disabled\n ? colors[borderColorName.disabled]\n : $selected\n ? colors[borderColorName.active]\n : colors[borderColorName.hover]\n };\n & div{\n font-weight:${fontWeight.hover};\n color:${\n $disabled\n ? colors[colorName.disabled]\n : $selected\n ? colors[colorName.active]\n : colors[colorName.hover]\n };\n } \n }\n `;\n});\n\nexport { TabWrapper };\n"],"names":["TabWrapper","styled","FlexView","theme","$selected","$size","$renderAs","$disabled","$shape","colors","tab","layout","sizes","variants","height","paddingHorizontal","backgroundColorName","colorName","borderColorName","fontWeight"],"mappings":";;AAMA,MAAMA,IAAaC,EAAOC,CAAQ,EAAoB,CAAC;AAAA,EACrD,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AACF,MAAM;AACJ,QAAM,EAAE,QAAAC,GAAQ,KAAAC,GAAK,QAAAC,EAAA,IAAWR,GAC1B,EAAE,OAAAS,GAAO,UAAAC,EAAa,IAAAH,GACtB,EAAE,QAAAI,GAAQ,mBAAAC,EAAkB,IAAIH,EAAMP,CAAK,GAC3C,EAAE,qBAAAW,GAAqB,WAAAC,GAAW,iBAAAC,GAAiB,YAAAC,MAAeN,EAASP,CAAS;AAEnF,SAAA;AAAA,eACMQ,CAAM;AAAA,kBACHC,CAAiB;AAAA,eACpBR,IAAY,gBAAgB,SAAS;AAAA,eACrCC,MAAW,WAAWG,EAAO,SAAS,MAAM,CAAC;AAAA,uBACrCH,MAAW,WAAW,SAAS,KAAK;AAAA,yBAEnDD,IACIE,EAAOS,EAAgB,QAAQ,IAC/Bd,IACEK,EAAOS,EAAgB,MAAM,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