@cuemath/leap 3.5.59 → 3.5.60-link0
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/features/chapters-v2/utils/node-card-utils.js +24 -24
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/sidebar.js +4 -4
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/toolbar.js +21 -17
- package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js +23 -13
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +43 -43
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -46
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +39 -41
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/journey/tracking-id/tracking-id-student.js +1 -1
- package/dist/features/journey/tracking-id/tracking-id-student.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js +43 -43
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js.map +1 -1
- package/dist/features/milestone/create/api/milestone-config.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -1
- package/dist/features/sheets/constants/sheet.js +1 -0
- package/dist/features/sheets/constants/sheet.js.map +1 -1
- package/dist/features/sheets/utils/is-v3-worksheet.js +3 -2
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -1
- package/dist/features/trial-session/api/trial-home.js +10 -16
- package/dist/features/trial-session/api/trial-home.js.map +1 -1
- package/dist/features/trial-session/api/trial-session-report.js +16 -0
- package/dist/features/trial-session/api/trial-session-report.js.map +1 -0
- package/dist/features/trial-session/api/trial-topics.js +9 -0
- package/dist/features/trial-session/api/trial-topics.js.map +1 -0
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +62 -50
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js +5 -14
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +55 -53
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js +3 -2
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js.map +1 -1
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js +27 -27
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js +19 -18
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session.js +34 -43
- package/dist/features/trial-session/comps/learning-session/learning-session.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +56 -58
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +29 -6
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information.js +74 -64
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js +10 -9
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js +40 -39
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +39 -37
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js +12 -20
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights.js +64 -63
- package/dist/features/trial-session/comps/session-insights/session-insights.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js +13 -12
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js +21 -5
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview.js +20 -20
- package/dist/features/trial-session/comps/session-overview/session-overview.js.map +1 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js +61 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js +5 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js +135 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js +53 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js +15 -16
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +35 -33
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js +9 -16
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +39 -37
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js +10 -9
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info-constants.js +35 -0
- package/dist/features/trial-session/comps/student-info/student-info-constants.js.map +1 -0
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js +12 -0
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/student-info/student-info-styled.js +26 -11
- package/dist/features/trial-session/comps/student-info/student-info-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info.js +113 -78
- package/dist/features/trial-session/comps/student-info/student-info.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +3 -12
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js +34 -33
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +45 -44
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +9 -8
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js +11 -19
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +31 -29
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js +42 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js.map +1 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js +84 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js.map +1 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js +21 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js.map +1 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js +99 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js.map +1 -0
- package/dist/features/trial-session/comps/worksheet/worksheet.js +35 -33
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/context/trial-session-context.js +2 -0
- package/dist/features/trial-session/context/trial-session-context.js.map +1 -1
- package/dist/features/trial-session/helper.js +70 -64
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +201 -164
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/right-panel/right-panel-styled.js +8 -8
- package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
- package/dist/features/trial-session/right-panel/slide-components-map.js +42 -36
- package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
- package/dist/features/trial-session/trial-session-constants.js +22 -18
- package/dist/features/trial-session/trial-session-constants.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +82 -77
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/trial-session/trial-session.js +38 -38
- package/dist/features/trial-session/trial-session.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +12 -12
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +1 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/mocks/activity.js +6 -0
- package/dist/features/worksheet/worksheet/mocks/activity.js.map +1 -0
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js +5 -0
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +57 -0
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +263 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js +177 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +267 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +2 -6
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +38 -37
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js +36 -35
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js +61 -58
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +35 -28
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.js +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/types/models/worksheet.js +1 -1
- package/dist/types/models/worksheet.js.map +1 -1
- package/package.json +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-grid-utils.js","sources":["../../../../../src/features/trial-session/comps/background-grid/background-grid-utils.ts"],"sourcesContent":["import { getTheme } from '../../../ui/theme/get-theme';\nimport { TrialPageId } from '../../trial-session-constants';\nimport type { TColoredBox } from './background-grid-types';\n\nconst theme = getTheme();\nconst {\n BLACK_T_08,\n WHITE_3,\n WHITE_4,\n WHITE_5,\n GREEN_1,\n GREEN_2,\n ORANGE_1,\n ORANGE_2,\n BLUE_1,\n BLUE_2,\n BLUE_3,\n PURPLE_1,\n PURPLE_2,\n YELLOW_1,\n YELLOW_2,\n} = theme.colors;\n\nexport const getColoredBoxPosition = (slideId?: TrialPageId): TColoredBox[] | undefined => {\n if (!slideId) return;\n\n const positions: Partial<Record<TrialPageId, TColoredBox[]>> = {\n [TrialPageId.SESSION_OVERVIEW]: [\n { xAxis: 2, yAxis: 1, bgColor: YELLOW_2 },\n { xAxis: 14, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 3, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 16, yAxis: 6, bgColor: ORANGE_1 },\n ],\n [TrialPageId.STUDENT_INFORMATION]: [\n { xAxis: 2, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 17, yAxis: 3, bgColor: BLUE_1 },\n { xAxis: 1, yAxis: 9, bgColor: BLUE_1 },\n { xAxis: 16, yAxis: 8, bgColor: BLUE_2 },\n ],\n [TrialPageId.LEARNING_LEVEL]: [\n { xAxis: 3, yAxis: 0, bgColor: GREEN_2 },\n { xAxis: 16, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 2, yAxis: 9, bgColor: GREEN_1 },\n { xAxis: 17, yAxis: 6, bgColor: GREEN_1 },\n ],\n [TrialPageId.STUDENT_LEVEL]: [\n { xAxis: 2, yAxis: 0, bgColor: GREEN_2 },\n { xAxis: 16, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 2, yAxis: 9, bgColor: GREEN_1 },\n { xAxis: 17, yAxis: 6, bgColor: GREEN_1 },\n ],\n [TrialPageId.SCHOOL_GOALS]: [\n { xAxis: 2, yAxis: 1, bgColor: PURPLE_2 },\n { xAxis: 16, yAxis: 0, bgColor: PURPLE_1 },\n { xAxis: 1, yAxis: 8, bgColor: PURPLE_1 },\n { xAxis: 17, yAxis: 10, bgColor: PURPLE_2 },\n ],\n [TrialPageId.TEST_PREP]: [\n { xAxis: 3, yAxis: 0, bgColor: BLUE_1 },\n { xAxis: 16, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 0, yAxis: 9, bgColor: BLUE_2 },\n { xAxis: 18, yAxis: 8, bgColor: BLUE_1 },\n ],\n [TrialPageId.STUDENT_ENRICHMENT]: [\n { xAxis: 0, yAxis: 1, bgColor: ORANGE_1 },\n { xAxis: 14, yAxis: 1, bgColor: ORANGE_2 },\n { xAxis: 3, yAxis: 11, bgColor: ORANGE_2 },\n { xAxis: 12, yAxis: 12, bgColor: ORANGE_1 },\n ],\n [TrialPageId.STUDENT_PERSONALIZATION]: [\n { xAxis: 1, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 14, yAxis: 0, bgColor: GREEN_2 },\n { xAxis: 0, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 12, yAxis: 12, bgColor: GREEN_1 },\n ],\n [TrialPageId.ADDITIONAL_INFO]: [\n { xAxis: 2, yAxis: 1, bgColor: BLACK_T_08 },\n { xAxis: 13, yAxis: 0, bgColor: WHITE_3 },\n { xAxis: 2, yAxis: 12, bgColor: BLACK_T_08 },\n { xAxis: 13, yAxis: 11, bgColor: WHITE_3 },\n ],\n [TrialPageId.STUDENT_PROFILE]: [\n { xAxis: 3, yAxis: 1, bgColor: WHITE_3 },\n { xAxis: 14, yAxis: 1, bgColor: BLACK_T_08 },\n { xAxis: 1, yAxis: 7, bgColor: BLACK_T_08 },\n { xAxis: 17, yAxis: 9, bgColor: WHITE_3 },\n ],\n [TrialPageId.PARENT_APP]: [\n { xAxis: 1, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 14, yAxis: 0, bgColor: ORANGE_1 },\n { xAxis: 1, yAxis: 10, bgColor: BLUE_3 },\n { xAxis: 17, yAxis: 9, bgColor: YELLOW_1 },\n ],\n [TrialPageId.SESSION_SUMMARY]: [\n { xAxis: 2, yAxis: 1, bgColor: YELLOW_2 },\n { xAxis: 14, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 2, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 16, yAxis: 8, bgColor: ORANGE_1 },\n ],\n [TrialPageId.PRICING]: [\n { xAxis: 2, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 16, yAxis: 2, bgColor: GREEN_1 },\n { xAxis: 2, yAxis: 9, bgColor: GREEN_1 },\n { xAxis: 17, yAxis: 8, bgColor: GREEN_2 },\n ],\n [TrialPageId.SESSION_INSIGHTS]: [\n { xAxis: 1, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 16, yAxis: 1, bgColor: YELLOW_1 },\n { xAxis: 1, yAxis: 9, bgColor: ORANGE_1 },\n { xAxis: 17, yAxis: 8, bgColor: PURPLE_1 },\n ],\n [TrialPageId.SESSION_REPORT]: [\n { xAxis: 1, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 16, yAxis: 1, bgColor: YELLOW_1 },\n { xAxis: 1, yAxis: 9, bgColor: ORANGE_1 },\n { xAxis: 17, yAxis: 8, bgColor: PURPLE_1 },\n ],\n [TrialPageId.CLASS_PREFERENCE]: [\n { xAxis: 2, yAxis: 1, bgColor: YELLOW_1 },\n { xAxis: 16, yAxis: 1, bgColor: YELLOW_2 },\n { xAxis: 2, yAxis: 9, bgColor: YELLOW_1 },\n { xAxis: 17, yAxis: 8, bgColor: YELLOW_1 },\n ],\n [TrialPageId.WELCOME_CUEMATH]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.TEACHER_INTRO]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.STUDENT_INTRO]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.COMPLETED_WORKSHEET]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.WELCOME_BACK]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.THANK_YOU]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n };\n\n return positions[slideId];\n};\n"],"names":["theme","getTheme","BLACK_T_08","WHITE_3","WHITE_4","WHITE_5","GREEN_1","GREEN_2","ORANGE_1","ORANGE_2","BLUE_1","BLUE_2","BLUE_3","PURPLE_1","PURPLE_2","YELLOW_1","YELLOW_2","getColoredBoxPosition","slideId","TrialPageId"],"mappings":";;AAIA,MAAMA,IAAQC,EAAS,GACjB;AAAA,EACJ,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AACF,IAAIhB,EAAM,QAEGiB,IAAwB,CAACC,MAC/BA,IAE0D;AAAA,EAC7D,CAACC,EAAY,gBAAgB,GAAG;AAAA,IAC9B,EAAE,OAAO,GAAG,OAAO,GAAG,SAASH,EAAS;AAAA,IACxC,EAAE,OAAO,IAAI,OAAO,GAAG,SAASV,EAAQ;AAAA,IACxC,EAAE,OAAO,GAAG,OAAO,IAAI,SAASA,EAAQ;AAAA,IACxC,EAAE,OAAO,IAAI,OAAO,GAAG,SAASE,EAAS;AAAA,EAC3C;AAAA,EACA,CAACW,EAAY,mBAAmB,GAAG;AAAA,IACjC,EAAE,OAAO,GAAG,OAAO,GAAG,SAASR,EAAO;AAAA,IAC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AO,GAAG,SAASA,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,IAAI,SAASD,EAAQ;AAAA,EAC3C;AAAA,EACA,CAACe,EAAY,YAAY,GAAG;AAAA,IAC1B,EAAE,OAAO,GAAG,OAAO,GAAG,SAASf,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,GAAG,SAASC,EAAQ;AAAA,IACxC,EAAE,OAAO,GAAG,OAAO,GAAG,SAASA,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,IAAI,SAASD,EAAQ;AAAA,EAC3C;AAAA,EACA,CAACe,EAAY,SAAS,GAAG;AAAA,IACvB,EAAE,OAAO,GAAG,OAAO,GAAG,SAASf,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,GAAG,SAASC,EAAQ;AAAA,IACxC,EAAE,OAAO,GAAG,OAAO,GAAG,SAASA,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,IAAI,SAASD,EAAQ;AAAA,EAC3C;AAAA,EAGec,CAAO,IAzIV;"}
|
|
1
|
+
{"version":3,"file":"background-grid-utils.js","sources":["../../../../../src/features/trial-session/comps/background-grid/background-grid-utils.ts"],"sourcesContent":["import { getTheme } from '../../../ui/theme/get-theme';\nimport { TrialPageId } from '../../trial-session-constants';\nimport type { TColoredBox } from './background-grid-types';\n\nconst theme = getTheme();\nconst {\n BLACK_T_08,\n WHITE_3,\n WHITE_4,\n WHITE_5,\n GREEN_1,\n GREEN_2,\n ORANGE_1,\n ORANGE_2,\n BLUE_1,\n BLUE_2,\n BLUE_3,\n PURPLE_1,\n PURPLE_2,\n YELLOW_1,\n YELLOW_2,\n} = theme.colors;\n\nexport const getColoredBoxPosition = (slideId?: TrialPageId): TColoredBox[] | undefined => {\n if (!slideId) return;\n\n const positions: Partial<Record<TrialPageId, TColoredBox[]>> = {\n [TrialPageId.SESSION_OVERVIEW]: [\n { xAxis: 2, yAxis: 1, bgColor: YELLOW_2 },\n { xAxis: 14, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 3, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 16, yAxis: 6, bgColor: ORANGE_1 },\n ],\n [TrialPageId.STUDENT_INFORMATION]: [\n { xAxis: 3, yAxis: 1, bgColor: WHITE_3 },\n { xAxis: 14, yAxis: 1, bgColor: BLACK_T_08 },\n { xAxis: 1, yAxis: 7, bgColor: BLACK_T_08 },\n { xAxis: 17, yAxis: 9, bgColor: WHITE_3 },\n ],\n [TrialPageId.LEARNING_LEVEL]: [\n { xAxis: 3, yAxis: 0, bgColor: GREEN_2 },\n { xAxis: 16, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 2, yAxis: 9, bgColor: GREEN_1 },\n { xAxis: 17, yAxis: 6, bgColor: GREEN_1 },\n ],\n [TrialPageId.STUDENT_LEVEL]: [\n { xAxis: 2, yAxis: 0, bgColor: GREEN_2 },\n { xAxis: 16, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 2, yAxis: 9, bgColor: GREEN_1 },\n { xAxis: 17, yAxis: 6, bgColor: GREEN_1 },\n ],\n [TrialPageId.SCHOOL_GOALS]: [\n { xAxis: 2, yAxis: 1, bgColor: PURPLE_2 },\n { xAxis: 16, yAxis: 0, bgColor: PURPLE_1 },\n { xAxis: 0, yAxis: 8, bgColor: PURPLE_1 },\n { xAxis: 17, yAxis: 10, bgColor: PURPLE_2 },\n ],\n [TrialPageId.TEST_PREP]: [\n { xAxis: 3, yAxis: 0, bgColor: BLUE_1 },\n { xAxis: 16, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 0, yAxis: 9, bgColor: BLUE_2 },\n { xAxis: 18, yAxis: 8, bgColor: BLUE_1 },\n ],\n [TrialPageId.STUDENT_ENRICHMENT]: [\n { xAxis: 0, yAxis: 1, bgColor: ORANGE_1 },\n { xAxis: 14, yAxis: 1, bgColor: ORANGE_2 },\n { xAxis: 3, yAxis: 11, bgColor: ORANGE_2 },\n { xAxis: 12, yAxis: 12, bgColor: ORANGE_1 },\n ],\n [TrialPageId.STUDENT_PERSONALIZATION]: [\n { xAxis: 1, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 14, yAxis: 0, bgColor: GREEN_2 },\n { xAxis: 0, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 12, yAxis: 12, bgColor: GREEN_1 },\n ],\n [TrialPageId.TOPIC_SELECTION]: [\n { xAxis: 1, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 13, yAxis: 2, bgColor: GREEN_2 },\n { xAxis: 0, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 12, yAxis: 12, bgColor: GREEN_1 },\n ],\n [TrialPageId.ADDITIONAL_INFO]: [\n { xAxis: 2, yAxis: 1, bgColor: BLACK_T_08 },\n { xAxis: 13, yAxis: 0, bgColor: WHITE_3 },\n { xAxis: 2, yAxis: 12, bgColor: BLACK_T_08 },\n { xAxis: 13, yAxis: 11, bgColor: WHITE_3 },\n ],\n [TrialPageId.STUDENT_PROFILE]: [\n { xAxis: 3, yAxis: 1, bgColor: WHITE_3 },\n { xAxis: 14, yAxis: 1, bgColor: BLACK_T_08 },\n { xAxis: 1, yAxis: 7, bgColor: BLACK_T_08 },\n { xAxis: 17, yAxis: 9, bgColor: WHITE_3 },\n ],\n [TrialPageId.PARENT_APP]: [\n { xAxis: 1, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 14, yAxis: 0, bgColor: ORANGE_1 },\n { xAxis: 1, yAxis: 10, bgColor: BLUE_3 },\n { xAxis: 17, yAxis: 9, bgColor: YELLOW_1 },\n ],\n [TrialPageId.SESSION_PROGRESS_SUMMARY]: [\n { xAxis: 1, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 13, yAxis: 0, bgColor: ORANGE_1 },\n { xAxis: 3, yAxis: 13, bgColor: BLUE_3 },\n { xAxis: 15, yAxis: 9, bgColor: YELLOW_1 },\n ],\n [TrialPageId.SESSION_SUMMARY]: [\n { xAxis: 2, yAxis: 1, bgColor: YELLOW_2 },\n { xAxis: 14, yAxis: 1, bgColor: GREEN_1 },\n { xAxis: 2, yAxis: 10, bgColor: GREEN_1 },\n { xAxis: 16, yAxis: 8, bgColor: ORANGE_1 },\n ],\n [TrialPageId.PRICING]: [\n { xAxis: 2, yAxis: 1, bgColor: GREEN_2 },\n { xAxis: 16, yAxis: 2, bgColor: GREEN_1 },\n { xAxis: 2, yAxis: 9, bgColor: GREEN_1 },\n { xAxis: 17, yAxis: 8, bgColor: GREEN_2 },\n ],\n [TrialPageId.SESSION_INSIGHTS]: [\n { xAxis: 1, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 16, yAxis: 1, bgColor: YELLOW_1 },\n { xAxis: 1, yAxis: 9, bgColor: ORANGE_1 },\n { xAxis: 17, yAxis: 8, bgColor: PURPLE_1 },\n ],\n [TrialPageId.SESSION_REPORT]: [\n { xAxis: 1, yAxis: 1, bgColor: BLUE_2 },\n { xAxis: 16, yAxis: 1, bgColor: YELLOW_1 },\n { xAxis: 1, yAxis: 9, bgColor: ORANGE_1 },\n { xAxis: 17, yAxis: 8, bgColor: PURPLE_1 },\n ],\n [TrialPageId.CLASS_PREFERENCE]: [\n { xAxis: 2, yAxis: 1, bgColor: YELLOW_1 },\n { xAxis: 16, yAxis: 1, bgColor: YELLOW_2 },\n { xAxis: 2, yAxis: 9, bgColor: YELLOW_1 },\n { xAxis: 17, yAxis: 8, bgColor: YELLOW_1 },\n ],\n [TrialPageId.WELCOME_CUEMATH]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.TEACHER_INTRO]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.STUDENT_INTRO]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.COMPLETED_WORKSHEET]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.WELCOME_BACK]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n [TrialPageId.THANK_YOU]: [\n { xAxis: 2, yAxis: 0, bgColor: WHITE_4 },\n { xAxis: 16, yAxis: 1, bgColor: WHITE_5 },\n { xAxis: 3, yAxis: 9, bgColor: WHITE_5 },\n { xAxis: 17, yAxis: 10, bgColor: WHITE_4 },\n ],\n };\n\n return positions[slideId];\n};\n"],"names":["theme","getTheme","BLACK_T_08","WHITE_3","WHITE_4","WHITE_5","GREEN_1","GREEN_2","ORANGE_1","ORANGE_2","BLUE_1","BLUE_2","BLUE_3","PURPLE_1","PURPLE_2","YELLOW_1","YELLOW_2","getColoredBoxPosition","slideId","TrialPageId"],"mappings":";;AAIA,MAAMA,IAAQC,EAAS,GACjB;AAAA,EACJ,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAA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E,OAAO,IAAI,OAAO,GAAG,SAASC,EAAQ;AAAA,IACxC,EAAE,OAAO,GAAG,OAAO,GAAG,SAASA,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,IAAI,SAASD,EAAQ;AAAA,EAC3C;AAAA,EACA,CAACe,EAAY,SAAS,GAAG;AAAA,IACvB,EAAE,OAAO,GAAG,OAAO,GAAG,SAASf,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,GAAG,SAASC,EAAQ;AAAA,IACxC,EAAE,OAAO,GAAG,OAAO,GAAG,SAASA,EAAQ;AAAA,IACvC,EAAE,OAAO,IAAI,OAAO,IAAI,SAASD,EAAQ;AAAA,EAC3C;AAAA,EAGec,CAAO,IArJV;"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: 100%;
|
|
6
|
-
`, n = r(o)`
|
|
7
|
-
width: 650px;
|
|
8
|
-
margin: auto;
|
|
9
|
-
position: relative;
|
|
10
|
-
`, p = r.div(
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import { RIGHT_PANEL_CONTENT_WIDTH as r } from "../../trial-session-constants.js";
|
|
3
|
+
const i = o.div(
|
|
11
4
|
({ theme: t }) => `
|
|
12
|
-
width:
|
|
5
|
+
width: ${r - 150}px;
|
|
13
6
|
height: ${t.layout.gutter * 2.25}px;
|
|
14
7
|
position: absolute;
|
|
15
8
|
top: -${t.layout.gutter * 1.25}px;
|
|
@@ -19,8 +12,6 @@ const e = r.div`
|
|
|
19
12
|
`
|
|
20
13
|
);
|
|
21
14
|
export {
|
|
22
|
-
|
|
23
|
-
p as FixedLineSeparator,
|
|
24
|
-
n as PreferenceWrapper
|
|
15
|
+
i as FixedLineSeparator
|
|
25
16
|
};
|
|
26
17
|
//# sourceMappingURL=class-preference-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-preference-styled.js","sources":["../../../../../src/features/trial-session/comps/class-preference/class-preference-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport
|
|
1
|
+
{"version":3,"file":"class-preference-styled.js","sources":["../../../../../src/features/trial-session/comps/class-preference/class-preference-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { RIGHT_PANEL_CONTENT_WIDTH } from '../../trial-session-constants';\n\nconst FixedLineSeparator = styled.div(\n ({ theme }) => `\n width: ${RIGHT_PANEL_CONTENT_WIDTH - 150}px;\n height: ${theme.layout.gutter * 2.25}px;\n position: absolute;\n top: -${theme.layout.gutter * 1.25}px;\n background-image: none, linear-gradient(90deg, ${theme.colors.BLACK_1} 1px, transparent 1px);\n background-size: ${theme.layout.gutter * 3.125}px ${theme.layout.gutter * 3.125}px;\n transform: translateX(-${theme.layout.gutter * 1.625}px)\n `,\n);\n\nexport { FixedLineSeparator };\n"],"names":["FixedLineSeparator","styled","theme","RIGHT_PANEL_CONTENT_WIDTH"],"mappings":";;AAIA,MAAMA,IAAqBC,EAAO;AAAA,EAChC,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA,WACNC,IAA4B,GAAG;AAAA,YAC9BD,EAAM,OAAO,SAAS,IAAI;AAAA;AAAA,UAE5BA,EAAM,OAAO,SAAS,IAAI;AAAA,mDACeA,EAAM,OAAO,OAAO;AAAA,qBAClDA,EAAM,OAAO,SAAS,KAAK,MAAMA,EAAM,OAAO,SAAS,KAAK;AAAA,2BACtDA,EAAM,OAAO,SAAS,KAAK;AAAA;AAEtD;"}
|
|
@@ -1,65 +1,67 @@
|
|
|
1
1
|
import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { DAYS as
|
|
4
|
-
import { getTimeUnits as
|
|
2
|
+
import { memo as F, useMemo as N, useCallback as W, useEffect as x } from "react";
|
|
3
|
+
import { DAYS as T } from "../../../../constants/date-time.js";
|
|
4
|
+
import { getTimeUnits as z, getOffsetBetweenTimezone as M, convertEpochToDateTime as b, convertToMilliseconds as R } from "../../../../helpers/date-time.js";
|
|
5
5
|
import A from "../../../ui/inputs/select-input/select-input.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useTrialSessionContext as
|
|
10
|
-
import { isPLASource as
|
|
11
|
-
import { TEACHER_TIMEZONE as L } from "../../trial-session-constants.js";
|
|
12
|
-
import
|
|
13
|
-
import { timeSlots as
|
|
14
|
-
import {
|
|
15
|
-
import { extractDayAndTimeFromEpoch as
|
|
6
|
+
import l from "../../../ui/layout/flex-view.js";
|
|
7
|
+
import Y from "../../../ui/separator/separator.js";
|
|
8
|
+
import G from "../../../ui/text/text.js";
|
|
9
|
+
import { useTrialSessionContext as K } from "../../context/use-trial-session-context.js";
|
|
10
|
+
import { isPLASource as q } from "../../helper.js";
|
|
11
|
+
import { TEACHER_TIMEZONE as L, RIGHT_PANEL_CONTENT_WIDTH as U } from "../../trial-session-constants.js";
|
|
12
|
+
import Z from "../slide-header/index.js";
|
|
13
|
+
import { timeSlots as J } from "./class-preference-constants.js";
|
|
14
|
+
import { FixedLineSeparator as Q } from "./class-preference-styled.js";
|
|
15
|
+
import { extractDayAndTimeFromEpoch as V } from "./helpers.js";
|
|
16
16
|
const y = [
|
|
17
17
|
{ id: 1, selectedDay: "", selectedTime: "" },
|
|
18
18
|
{ id: 2, selectedDay: "", selectedTime: "" }
|
|
19
|
-
],
|
|
20
|
-
const { isTeacher:
|
|
21
|
-
() =>
|
|
22
|
-
[
|
|
23
|
-
), C = !!(!
|
|
24
|
-
|
|
25
|
-
preferences: (
|
|
19
|
+
], ge = F(function({ miniScreenDevice: E }) {
|
|
20
|
+
const { isTeacher: r, formData: S, trialHomeData: I, updateSlideConfig: u, updateButtonState: g } = K(), { preferences: o, studentTimezone: s } = S || {}, { demo_info: P, intel_student: h } = I || {}, { scheduled_start_time: $ } = P || {}, w = T.map((e) => ({ id: e, label: e })), D = r ? L : s, p = N(
|
|
21
|
+
() => r && s ? V($, s) : void 0,
|
|
22
|
+
[r, $, s]
|
|
23
|
+
), C = !!(!q(h == null ? void 0 : h.source) || o && o.length > 0 && o.every((e) => e.selectedDay && e.selectedTime)), _ = (e, t, i) => {
|
|
24
|
+
u({
|
|
25
|
+
preferences: (o ?? y).map(
|
|
26
26
|
(n) => n.id === e ? { ...n, [t]: i } : n
|
|
27
27
|
)
|
|
28
28
|
});
|
|
29
|
+
}, O = (e, t) => {
|
|
30
|
+
_(e, "selectedDay", t);
|
|
29
31
|
}, k = (e, t) => {
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
x(e, "selectedTime", t);
|
|
33
|
-
}, O = z(
|
|
32
|
+
_(e, "selectedTime", t);
|
|
33
|
+
}, v = W(
|
|
34
34
|
(e, t) => {
|
|
35
35
|
if (e && t && s) {
|
|
36
|
-
const { hours: i, minutes: n } =
|
|
37
|
-
return b(
|
|
36
|
+
const { hours: i, minutes: n } = z(t), d = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0), f = M(L, s), a = r ? d + f : d, { day: H = "" } = b(a, s), X = T.indexOf(H), j = (T.indexOf(e) - X + 7) % 7, B = a + R({ days: j, hours: i, minutes: n });
|
|
37
|
+
return b(B, D);
|
|
38
38
|
}
|
|
39
39
|
return {};
|
|
40
40
|
},
|
|
41
|
-
[
|
|
41
|
+
[r, s, D]
|
|
42
42
|
);
|
|
43
|
-
return
|
|
44
|
-
if (
|
|
43
|
+
return x(() => {
|
|
44
|
+
if (r && (!o || !Array.isArray(o) || o.length === 0)) {
|
|
45
45
|
let e = y;
|
|
46
|
-
|
|
46
|
+
p && (e = y.map(
|
|
47
47
|
(t) => t.id === 1 ? {
|
|
48
48
|
...t,
|
|
49
|
-
selectedDay:
|
|
50
|
-
selectedTime:
|
|
49
|
+
selectedDay: p.day,
|
|
50
|
+
selectedTime: p.time
|
|
51
51
|
} : t
|
|
52
|
-
)),
|
|
52
|
+
)), u({ preferences: e });
|
|
53
53
|
}
|
|
54
|
-
}, [
|
|
54
|
+
}, [r, o, p, u]), x(() => {
|
|
55
55
|
g("right", { isDisabled: !C, isLoading: !1 });
|
|
56
|
-
}, [C, g]), /* @__PURE__ */ m(
|
|
57
|
-
/* @__PURE__ */ c(
|
|
58
|
-
/* @__PURE__ */ c(
|
|
56
|
+
}, [C, g]), /* @__PURE__ */ m(l, { $justifyContent: "center", $alignItems: "center", children: [
|
|
57
|
+
/* @__PURE__ */ c(Y, { height: 60 }),
|
|
58
|
+
/* @__PURE__ */ c(Z, {}),
|
|
59
59
|
/* @__PURE__ */ m(
|
|
60
|
-
|
|
60
|
+
l,
|
|
61
61
|
{
|
|
62
|
-
$
|
|
62
|
+
$width: U - 100,
|
|
63
|
+
$position: "relative",
|
|
64
|
+
$gapX: E ? 2.2 : 3.75,
|
|
63
65
|
$gutterX: 4.6875,
|
|
64
66
|
$background: "YELLOW_4",
|
|
65
67
|
$borderColor: "BLACK_1",
|
|
@@ -67,22 +69,22 @@ const y = [
|
|
|
67
69
|
$justifyContent: "space-between",
|
|
68
70
|
$alignItems: "center",
|
|
69
71
|
children: [
|
|
70
|
-
/* @__PURE__ */ c(
|
|
71
|
-
|
|
72
|
-
const { id: t, selectedDay: i, selectedTime: n } = e, { day: d, time:
|
|
73
|
-
return /* @__PURE__ */ m(
|
|
74
|
-
/* @__PURE__ */ m(
|
|
72
|
+
/* @__PURE__ */ c(Q, {}),
|
|
73
|
+
o == null ? void 0 : o.map((e) => {
|
|
74
|
+
const { id: t, selectedDay: i, selectedTime: n } = e, { day: d, time: f } = v(i, n);
|
|
75
|
+
return /* @__PURE__ */ m(l, { $width: 213, $background: "YELLOW_1", $borderColor: "BLACK_1", children: [
|
|
76
|
+
/* @__PURE__ */ m(l, { $gapX: 1.65, $gutterX: 2, $flexGapX: 0.25, children: [
|
|
75
77
|
/* @__PURE__ */ c(
|
|
76
78
|
A,
|
|
77
79
|
{
|
|
78
80
|
renderAs: "primary",
|
|
79
81
|
label: `Day ${t}`,
|
|
80
82
|
value: i,
|
|
81
|
-
options:
|
|
83
|
+
options: w,
|
|
82
84
|
theme: "dark",
|
|
83
85
|
shape: "borderLess",
|
|
84
86
|
isTransparent: !0,
|
|
85
|
-
onChange: (a) =>
|
|
87
|
+
onChange: (a) => O(t, a)
|
|
86
88
|
}
|
|
87
89
|
),
|
|
88
90
|
/* @__PURE__ */ c(
|
|
@@ -91,27 +93,27 @@ const y = [
|
|
|
91
93
|
renderAs: "primary",
|
|
92
94
|
label: "Time",
|
|
93
95
|
value: n,
|
|
94
|
-
options:
|
|
96
|
+
options: J,
|
|
95
97
|
shape: "borderLess",
|
|
96
98
|
isTransparent: !0,
|
|
97
99
|
theme: "dark",
|
|
98
|
-
onChange: (a) =>
|
|
100
|
+
onChange: (a) => k(t, a)
|
|
99
101
|
}
|
|
100
102
|
)
|
|
101
103
|
] }),
|
|
102
104
|
/* @__PURE__ */ c(
|
|
103
|
-
|
|
105
|
+
l,
|
|
104
106
|
{
|
|
105
107
|
$heightX: 3.125,
|
|
106
108
|
$gutterX: 2,
|
|
107
109
|
$justifyContent: "center",
|
|
108
110
|
$background: "WHITE_T_60",
|
|
109
|
-
children:
|
|
111
|
+
children: r ? /* @__PURE__ */ m(G, { $renderAs: "ac4-black", $align: "center", children: [
|
|
110
112
|
d ? d.slice(0, 3) : "__",
|
|
111
113
|
", ",
|
|
112
|
-
|
|
114
|
+
f || "__",
|
|
113
115
|
" ",
|
|
114
|
-
|
|
116
|
+
r ? "(IST)" : ""
|
|
115
117
|
] }) : null
|
|
116
118
|
}
|
|
117
119
|
)
|
|
@@ -123,6 +125,6 @@ const y = [
|
|
|
123
125
|
] });
|
|
124
126
|
});
|
|
125
127
|
export {
|
|
126
|
-
|
|
128
|
+
ge as default
|
|
127
129
|
};
|
|
128
130
|
//# sourceMappingURL=class-preference.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-preference.js","sources":["../../../../../src/features/trial-session/comps/class-preference/class-preference.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { DAYS } from '../../../../constants/date-time';\nimport {\n convertEpochToDateTime,\n convertToMilliseconds,\n getOffsetBetweenTimezone,\n getTimeUnits,\n} from '../../../../helpers/date-time';\nimport SelectInput from '../../../ui/inputs/select-input/select-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource } from '../../helper';\nimport { TEACHER_TIMEZONE as teacherTimezone } from '../../trial-session-constants';\nimport SlideHeader from '../slide-header';\nimport { timeSlots } from './class-preference-constants';\nimport * as Styled from './class-preference-styled';\nimport type { IClassPreference, TPreference } from './class-preference-types';\nimport { extractDayAndTimeFromEpoch } from './helpers';\n\nconst defaultPreferences = [\n { id: 1, selectedDay: '', selectedTime: '' },\n { id: 2, selectedDay: '', selectedTime: '' },\n];\n\nconst ClassPreference: FC<IClassPreference> = memo(function ClassPreference({ miniScreenDevice }) {\n const { isTeacher, formData, trialHomeData, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n const { preferences, studentTimezone } = formData || {};\n const { demo_info: demoInfo, intel_student: intelStudent } = trialHomeData || {};\n const { scheduled_start_time: scheduledStartTime } = demoInfo || {};\n\n const daySlots = DAYS.map(day => ({ id: day, label: day }));\n const timezone = isTeacher ? teacherTimezone : studentTimezone;\n\n const preSelectedDateTimeFromEpoch = useMemo(\n () =>\n isTeacher && studentTimezone\n ? extractDayAndTimeFromEpoch(scheduledStartTime, studentTimezone)\n : undefined,\n [isTeacher, scheduledStartTime, studentTimezone],\n );\n\n const isPLA = isPLASource(intelStudent?.source);\n const hasRequiredFields = Boolean(\n isPLA\n ? preferences &&\n preferences.length > 0 &&\n preferences.every(preference => preference.selectedDay && preference.selectedTime)\n : true,\n );\n\n const handlePreferenceChange = (\n id: number,\n field: 'selectedDay' | 'selectedTime',\n value: string,\n ) => {\n updateSlideConfig({\n preferences: (preferences ?? defaultPreferences).map((preference: TPreference) =>\n preference.id === id ? { ...preference, [field]: value } : preference,\n ),\n });\n };\n\n const handleDayChange = (id: number, value: string) => {\n handlePreferenceChange(id, 'selectedDay', value);\n };\n\n const handleTimeChange = (id: number, value: string) => {\n handlePreferenceChange(id, 'selectedTime', value);\n };\n\n const getDisplayDateTimeValue = useCallback(\n (dayValue: string, timeValue: string) => {\n if (dayValue && timeValue && studentTimezone) {\n // Extracting hours, minutes, and period from the selected time.\n const { hours, minutes } = getTimeUnits(timeValue);\n const todayTimestamp = new Date().setHours(0, 0, 0, 0); // Setting current date to midnight\n\n // Calculating offset between the teacher's and student's timezone.\n const timestampOffset = getOffsetBetweenTimezone(teacherTimezone, studentTimezone);\n const studentTimestamp = isTeacher ? todayTimestamp + timestampOffset : todayTimestamp; // Current timestamp at student's timezone\n const { day: today = '' } = convertEpochToDateTime(studentTimestamp, studentTimezone); // Current day at student's timezone.\n\n // Calculating current and selected day index to get day difference.\n const currentDayIndex = DAYS.indexOf(today);\n const selectedDayIndex = DAYS.indexOf(dayValue);\n const dayDifference = (selectedDayIndex - currentDayIndex + 7) % 7;\n\n // Calculate the epoch timestamp for the selected day and time in the student's timezone.\n const epochTimestamp =\n studentTimestamp + convertToMilliseconds({ days: dayDifference, hours, minutes });\n\n // Returning date, time value with respect to both teacher and student timezone.\n return convertEpochToDateTime(epochTimestamp, timezone);\n }\n\n return {};\n },\n [isTeacher, studentTimezone, timezone],\n );\n\n useEffect(() => {\n // Only set preferences if teacher and preferences are not set\n if (isTeacher && (!preferences || !Array.isArray(preferences) || preferences.length === 0)) {\n let newPreferences = defaultPreferences;\n\n if (preSelectedDateTimeFromEpoch) {\n newPreferences = defaultPreferences.map((preference: TPreference) =>\n preference.id === 1\n ? {\n ...preference,\n selectedDay: preSelectedDateTimeFromEpoch.day,\n selectedTime: preSelectedDateTimeFromEpoch.time,\n }\n : preference,\n );\n }\n updateSlideConfig({ preferences: newPreferences });\n }\n }, [isTeacher, preferences, preSelectedDateTimeFromEpoch, updateSlideConfig]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.PreferenceWrapper\n $gapX={miniScreenDevice ? 2.2 : 3.75}\n $gutterX={4.6875}\n $background=\"YELLOW_4\"\n $borderColor=\"BLACK_1\"\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n <Styled.FixedLineSeparator />\n {preferences?.map(preference => {\n const { id, selectedDay, selectedTime } = preference;\n const { day, time } = getDisplayDateTimeValue(selectedDay, selectedTime);\n\n return (\n <FlexView key={`slot-${id}`} $widthX={15} $background=\"YELLOW_1\" $borderColor=\"BLACK_1\">\n <FlexView $gapX={1.65} $gutterX={2} $flexGapX={0.25}>\n <SelectInput\n renderAs=\"primary\"\n label={`Day ${id}`}\n value={selectedDay}\n options={daySlots}\n theme=\"dark\"\n shape=\"borderLess\"\n isTransparent\n onChange={value => handleDayChange(id, value)}\n />\n <SelectInput\n renderAs=\"primary\"\n label=\"Time\"\n value={selectedTime}\n options={timeSlots}\n shape=\"borderLess\"\n isTransparent\n theme=\"dark\"\n onChange={value => handleTimeChange(id, value)}\n />\n </FlexView>\n <FlexView\n $heightX={3.125}\n $gutterX={2}\n $justifyContent=\"center\"\n $background=\"WHITE_T_60\"\n >\n {isTeacher ? (\n <Text $renderAs=\"ac4-black\" $align=\"center\">\n {day ? day.slice(0, 3) : '__'}, {time ? time : '__'} {isTeacher ? '(IST)' : ''}\n </Text>\n ) : null}\n </FlexView>\n </FlexView>\n );\n })}\n </Styled.PreferenceWrapper>\n </Styled.Container>\n );\n});\n\nexport default ClassPreference;\n"],"names":["defaultPreferences","ClassPreference","memo","miniScreenDevice","isTeacher","formData","trialHomeData","updateSlideConfig","updateButtonState","useTrialSessionContext","preferences","studentTimezone","demoInfo","intelStudent","scheduledStartTime","daySlots","DAYS","day","timezone","teacherTimezone","preSelectedDateTimeFromEpoch","useMemo","extractDayAndTimeFromEpoch","hasRequiredFields","isPLASource","preference","handlePreferenceChange","id","field","value","handleDayChange","handleTimeChange","getDisplayDateTimeValue","useCallback","dayValue","timeValue","hours","minutes","getTimeUnits","todayTimestamp","timestampOffset","getOffsetBetweenTimezone","studentTimestamp","today","convertEpochToDateTime","currentDayIndex","dayDifference","epochTimestamp","convertToMilliseconds","useEffect","newPreferences","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.PreferenceWrapper","Styled.FixedLineSeparator","selectedDay","selectedTime","time","FlexView","SelectInput","timeSlots","Text"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAMA,IAAqB;AAAA,EACzB,EAAE,IAAI,GAAG,aAAa,IAAI,cAAc,GAAG;AAAA,EAC3C,EAAE,IAAI,GAAG,aAAa,IAAI,cAAc,GAAG;AAC7C,GAEMC,KAAwCC,EAAK,SAAyB,EAAE,kBAAAC,KAAoB;AAChG,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,eAAAC,GAAe,mBAAAC,GAAmB,mBAAAC,EAAA,IAC7DC,KACI,EAAE,aAAAC,GAAa,iBAAAC,MAAoBN,KAAY,CAAA,GAC/C,EAAE,WAAWO,GAAU,eAAeC,EAAa,IAAIP,KAAiB,IACxE,EAAE,sBAAsBQ,MAAuBF,KAAY,CAAA,GAE3DG,IAAWC,EAAK,IAAI,CAAAC,OAAQ,EAAE,IAAIA,GAAK,OAAOA,EAAA,EAAM,GACpDC,IAAWd,IAAYe,IAAkBR,GAEzCS,IAA+BC;AAAA,IACnC,MACEjB,KAAaO,IACTW,GAA2BR,GAAoBH,CAAe,IAC9D;AAAA,IACN,CAACP,GAAWU,GAAoBH,CAAe;AAAA,EAAA,GAI3CY,IAAoB,GACxB,CAFYC,EAAYX,KAAA,gBAAAA,EAAc,MAAM,KAGxCH,KACEA,EAAY,SAAS,KACrBA,EAAY,MAAM,CAAAe,MAAcA,EAAW,eAAeA,EA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AChB,OAAO+B;AAAA,oBACP,SAAS3C;AAAA,oBACT,OAAM;AAAA,oBACN,OAAM;AAAA,oBACN,eAAa;AAAA,oBACb,UAAU,CAAAc,MAASC,EAAgBH,GAAIE,CAAK;AAAA,kBAAA;AAAA,gBAC9C;AAAA,gBACA,gBAAAwB;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACC,UAAS;AAAA,oBACT,OAAM;AAAA,oBACN,OAAOH;AAAA,oBACP,SAASI;AAAA,oBACT,OAAM;AAAA,oBACN,eAAa;AAAA,oBACb,OAAM;AAAA,oBACN,UAAU,CAAAlC,MAASE,EAAiBJ,GAAIE,CAAK;AAAA,kBAAA;AAAA,gBAC/C;AAAA,cAAA,GACF;AAAA,cACA,gBAAAwB;AAAA,gBAACQ;AAAA,gBAAA;AAAA,kBACC,UAAU;AAAA,kBACV,UAAU;AAAA,kBACV,iBAAgB;AAAA,kBAChB,aAAY;AAAA,kBAEX,cACE,gBAAAV,EAAAa,GAAA,EAAK,WAAU,aAAY,QAAO,UAChC,UAAA;AAAA,oBAAA/C,IAAMA,EAAI,MAAM,GAAG,CAAC,IAAI;AAAA,oBAAK;AAAA,oBAAG2C,KAAc;AAAA,oBAAK;AAAA,oBAAExD,IAAY,UAAU;AAAA,kBAAA,EAAA,CAC9E,IACE;AAAA,gBAAA;AAAA,cACN;AAAA,YAlCa,EAAA,GAAA,QAAQuB,CAAE,EAmCzB;AAAA,UAAA;AAAA,QAEH;AAAA,MAAA;AAAA,IACH;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"class-preference.js","sources":["../../../../../src/features/trial-session/comps/class-preference/class-preference.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { DAYS } from '../../../../constants/date-time';\nimport {\n convertEpochToDateTime,\n convertToMilliseconds,\n getOffsetBetweenTimezone,\n getTimeUnits,\n} from '../../../../helpers/date-time';\nimport SelectInput from '../../../ui/inputs/select-input/select-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource } from '../../helper';\nimport {\n RIGHT_PANEL_CONTENT_WIDTH,\n TEACHER_TIMEZONE as teacherTimezone,\n} from '../../trial-session-constants';\nimport SlideHeader from '../slide-header';\nimport { timeSlots } from './class-preference-constants';\nimport * as Styled from './class-preference-styled';\nimport type { IClassPreference, TPreference } from './class-preference-types';\nimport { extractDayAndTimeFromEpoch } from './helpers';\n\nconst defaultPreferences = [\n { id: 1, selectedDay: '', selectedTime: '' },\n { id: 2, selectedDay: '', selectedTime: '' },\n];\n\nconst ClassPreference: FC<IClassPreference> = memo(function ClassPreference({ miniScreenDevice }) {\n const { isTeacher, formData, trialHomeData, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n const { preferences, studentTimezone } = formData || {};\n const { demo_info: demoInfo, intel_student: intelStudent } = trialHomeData || {};\n const { scheduled_start_time: scheduledStartTime } = demoInfo || {};\n\n const daySlots = DAYS.map(day => ({ id: day, label: day }));\n const timezone = isTeacher ? teacherTimezone : studentTimezone;\n\n const preSelectedDateTimeFromEpoch = useMemo(\n () =>\n isTeacher && studentTimezone\n ? extractDayAndTimeFromEpoch(scheduledStartTime, studentTimezone)\n : undefined,\n [isTeacher, scheduledStartTime, studentTimezone],\n );\n\n const isPLA = isPLASource(intelStudent?.source);\n const hasRequiredFields = Boolean(\n isPLA\n ? preferences &&\n preferences.length > 0 &&\n preferences.every(preference => preference.selectedDay && preference.selectedTime)\n : true,\n );\n\n const handlePreferenceChange = (\n id: number,\n field: 'selectedDay' | 'selectedTime',\n value: string,\n ) => {\n updateSlideConfig({\n preferences: (preferences ?? defaultPreferences).map((preference: TPreference) =>\n preference.id === id ? { ...preference, [field]: value } : preference,\n ),\n });\n };\n\n const handleDayChange = (id: number, value: string) => {\n handlePreferenceChange(id, 'selectedDay', value);\n };\n\n const handleTimeChange = (id: number, value: string) => {\n handlePreferenceChange(id, 'selectedTime', value);\n };\n\n const getDisplayDateTimeValue = useCallback(\n (dayValue: string, timeValue: string) => {\n if (dayValue && timeValue && studentTimezone) {\n // Extracting hours, minutes, and period from the selected time.\n const { hours, minutes } = getTimeUnits(timeValue);\n const todayTimestamp = new Date().setHours(0, 0, 0, 0); // Setting current date to midnight\n\n // Calculating offset between the teacher's and student's timezone.\n const timestampOffset = getOffsetBetweenTimezone(teacherTimezone, studentTimezone);\n const studentTimestamp = isTeacher ? todayTimestamp + timestampOffset : todayTimestamp; // Current timestamp at student's timezone\n const { day: today = '' } = convertEpochToDateTime(studentTimestamp, studentTimezone); // Current day at student's timezone.\n\n // Calculating current and selected day index to get day difference.\n const currentDayIndex = DAYS.indexOf(today);\n const selectedDayIndex = DAYS.indexOf(dayValue);\n const dayDifference = (selectedDayIndex - currentDayIndex + 7) % 7;\n\n // Calculate the epoch timestamp for the selected day and time in the student's timezone.\n const epochTimestamp =\n studentTimestamp + convertToMilliseconds({ days: dayDifference, hours, minutes });\n\n // Returning date, time value with respect to both teacher and student timezone.\n return convertEpochToDateTime(epochTimestamp, timezone);\n }\n\n return {};\n },\n [isTeacher, studentTimezone, timezone],\n );\n\n useEffect(() => {\n // Only set preferences if teacher and preferences are not set\n if (isTeacher && (!preferences || !Array.isArray(preferences) || preferences.length === 0)) {\n let newPreferences = defaultPreferences;\n\n if (preSelectedDateTimeFromEpoch) {\n newPreferences = defaultPreferences.map((preference: TPreference) =>\n preference.id === 1\n ? {\n ...preference,\n selectedDay: preSelectedDateTimeFromEpoch.day,\n selectedTime: preSelectedDateTimeFromEpoch.time,\n }\n : preference,\n );\n }\n updateSlideConfig({ preferences: newPreferences });\n }\n }, [isTeacher, preferences, preSelectedDateTimeFromEpoch, updateSlideConfig]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <Separator height={60} />\n <SlideHeader />\n <FlexView\n $width={RIGHT_PANEL_CONTENT_WIDTH - 100}\n $position=\"relative\"\n $gapX={miniScreenDevice ? 2.2 : 3.75}\n $gutterX={4.6875}\n $background=\"YELLOW_4\"\n $borderColor=\"BLACK_1\"\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n <Styled.FixedLineSeparator />\n {preferences?.map(preference => {\n const { id, selectedDay, selectedTime } = preference;\n const { day, time } = getDisplayDateTimeValue(selectedDay, selectedTime);\n\n return (\n <FlexView key={`slot-${id}`} $width={213} $background=\"YELLOW_1\" $borderColor=\"BLACK_1\">\n <FlexView $gapX={1.65} $gutterX={2} $flexGapX={0.25}>\n <SelectInput\n renderAs=\"primary\"\n label={`Day ${id}`}\n value={selectedDay}\n options={daySlots}\n theme=\"dark\"\n shape=\"borderLess\"\n isTransparent\n onChange={value => handleDayChange(id, value)}\n />\n <SelectInput\n renderAs=\"primary\"\n label=\"Time\"\n value={selectedTime}\n options={timeSlots}\n shape=\"borderLess\"\n isTransparent\n theme=\"dark\"\n onChange={value => handleTimeChange(id, value)}\n />\n </FlexView>\n <FlexView\n $heightX={3.125}\n $gutterX={2}\n $justifyContent=\"center\"\n $background=\"WHITE_T_60\"\n >\n {isTeacher ? (\n <Text $renderAs=\"ac4-black\" $align=\"center\">\n {day ? day.slice(0, 3) : '__'}, {time ? time : '__'} {isTeacher ? '(IST)' : ''}\n </Text>\n ) : null}\n </FlexView>\n </FlexView>\n );\n })}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default ClassPreference;\n"],"names":["defaultPreferences","ClassPreference","memo","miniScreenDevice","isTeacher","formData","trialHomeData","updateSlideConfig","updateButtonState","useTrialSessionContext","preferences","studentTimezone","demoInfo","intelStudent","scheduledStartTime","daySlots","DAYS","day","timezone","teacherTimezone","preSelectedDateTimeFromEpoch","useMemo","extractDayAndTimeFromEpoch","hasRequiredFields","isPLASource","preference","handlePreferenceChange","id","field","value","handleDayChange","handleTimeChange","getDisplayDateTimeValue","useCallback","dayValue","timeValue","hours","minutes","getTimeUnits","todayTimestamp","timestampOffset","getOffsetBetweenTimezone","studentTimestamp","today","convertEpochToDateTime","currentDayIndex","dayDifference","epochTimestamp","convertToMilliseconds","useEffect","newPreferences","jsxs","FlexView","jsx","Separator","SlideHeader","RIGHT_PANEL_CONTENT_WIDTH","Styled.FixedLineSeparator","selectedDay","selectedTime","time","SelectInput","timeSlots","Text"],"mappings":";;;;;;;;;;;;;;;AAyBA,MAAMA,IAAqB;AAAA,EACzB,EAAE,IAAI,GAAG,aAAa,IAAI,cAAc,GAAG;AAAA,EAC3C,EAAE,IAAI,GAAG,aAAa,IAAI,cAAc,GAAG;AAC7C,GAEMC,KAAwCC,EAAK,SAAyB,EAAE,kBAAAC,KAAoB;AAChG,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,eAAAC,GAAe,mBAAAC,GAAmB,mBAAAC,EAAA,IAC7DC,KACI,EAAE,aAAAC,GAAa,iBAAAC,MAAoBN,KAAY,CAAA,GAC/C,EAAE,WAAWO,GAAU,eAAeC,EAAa,IAAIP,KAAiB,IACxE,EAAE,sBAAsBQ,MAAuBF,KAAY,CAAA,GAE3DG,IAAWC,EAAK,IAAI,CAAAC,OAAQ,EAAE,IAAIA,GAAK,OAAOA,EAAA,EAAM,GACpDC,IAAWd,IAAYe,IAAkBR,GAEzCS,IAA+BC;AAAA,IACnC,MACEjB,KAAaO,IACTW,EAA2BR,GAAoBH,CAAe,IAC9D;AAAA,IACN,CAACP,GAAWU,GAAoBH,CAAe;AAAA,EAAA,GAI3CY,IAAoB,GACxB,CAFYC,EAAYX,KAAA,gBAAAA,EAAc,MAAM,KAGxCH,KACEA,EAAY,SAAS,KACrBA,EAAY,MAAM,CAAAe,MAAcA,EAAW,eAAeA,EAAW,YAAY,IAInFC,IAAyB,CAC7BC,GACAC,GACAC,MACG;AACe,IAAAtB,EAAA;AAAA,MAChB,cAAcG,KA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AA,oBACP,SAAS3C;AAAA,oBACT,OAAM;AAAA,oBACN,OAAM;AAAA,oBACN,eAAa;AAAA,oBACb,UAAU,CAAAc,MAASC,EAAgBH,GAAIE,CAAK;AAAA,kBAAA;AAAA,gBAC9C;AAAA,gBACA,gBAAAwB;AAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,UAAS;AAAA,oBACT,OAAM;AAAA,oBACN,OAAOF;AAAA,oBACP,SAASG;AAAA,oBACT,OAAM;AAAA,oBACN,eAAa;AAAA,oBACb,OAAM;AAAA,oBACN,UAAU,CAAAjC,MAASE,EAAiBJ,GAAIE,CAAK;AAAA,kBAAA;AAAA,gBAC/C;AAAA,cAAA,GACF;AAAA,cACA,gBAAAwB;AAAA,gBAACD;AAAA,gBAAA;AAAA,kBACC,UAAU;AAAA,kBACV,UAAU;AAAA,kBACV,iBAAgB;AAAA,kBAChB,aAAY;AAAA,kBAEX,cACE,gBAAAD,EAAAY,GAAA,EAAK,WAAU,aAAY,QAAO,UAChC,UAAA;AAAA,oBAAA9C,IAAMA,EAAI,MAAM,GAAG,CAAC,IAAI;AAAA,oBAAK;AAAA,oBAAG2C,KAAc;AAAA,oBAAK;AAAA,oBAAExD,IAAY,UAAU;AAAA,kBAAA,EAAA,CAC9E,IACE;AAAA,gBAAA;AAAA,cACN;AAAA,YAlCa,EAAA,GAAA,QAAQuB,CAAE,EAmCzB;AAAA,UAAA;AAAA,QAEH;AAAA,MAAA;AAAA,IACH;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TrialPageId as t } from "../../trial-session-constants.js";
|
|
2
|
-
const
|
|
2
|
+
const E = [
|
|
3
3
|
t.WELCOME_CUEMATH,
|
|
4
4
|
t.WELCOME_BACK,
|
|
5
|
+
t.STUDENT_INTRO,
|
|
5
6
|
t.THANK_YOU
|
|
6
7
|
];
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
E as pagesWithAboutCuemathData
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=communication-slide-constants.js.map
|
package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication-slide-constants.js","sources":["../../../../../src/features/trial-session/comps/communication-slide/communication-slide-constants.ts"],"sourcesContent":["import { TrialPageId } from '../../trial-session-constants';\n\nconst pagesWithAboutCuemathData = [\n TrialPageId.WELCOME_CUEMATH,\n TrialPageId.WELCOME_BACK,\n TrialPageId.THANK_YOU,\n];\n\nexport { pagesWithAboutCuemathData };\n"],"names":["pagesWithAboutCuemathData","TrialPageId"],"mappings":";AAEA,MAAMA,IAA4B;AAAA,EAChCC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd;"}
|
|
1
|
+
{"version":3,"file":"communication-slide-constants.js","sources":["../../../../../src/features/trial-session/comps/communication-slide/communication-slide-constants.ts"],"sourcesContent":["import { TrialPageId } from '../../trial-session-constants';\n\nconst pagesWithAboutCuemathData = [\n TrialPageId.WELCOME_CUEMATH,\n TrialPageId.WELCOME_BACK,\n TrialPageId.STUDENT_INTRO,\n TrialPageId.THANK_YOU,\n];\n\nexport { pagesWithAboutCuemathData };\n"],"names":["pagesWithAboutCuemathData","TrialPageId"],"mappings":";AAEA,MAAMA,IAA4B;AAAA,EAChCC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd;"}
|
package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { useTrialSessionContext as
|
|
3
|
-
import { TrialPageId as
|
|
4
|
-
const
|
|
5
|
-
const [
|
|
1
|
+
import { useState as p, useRef as C, useCallback as i, useMemo as N, useEffect as m } from "react";
|
|
2
|
+
import { useTrialSessionContext as E } from "../../../context/use-trial-session-context.js";
|
|
3
|
+
import { TrialPageId as s } from "../../../trial-session-constants.js";
|
|
4
|
+
const M = 500, O = () => {
|
|
5
|
+
const [d, a] = p(!1), { slideConfig: T, formData: A, demoType: g, updateSlideConfig: t } = E(), { id: n } = T, { confirmationModalActive: c } = A || {}, e = C(null), o = g === "TRIAL_V3", r = i(() => {
|
|
6
6
|
e.current && clearTimeout(e.current), e.current = setTimeout(() => {
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
}, []),
|
|
10
|
-
switch (
|
|
11
|
-
case
|
|
7
|
+
a(!1), e.current = null;
|
|
8
|
+
}, M);
|
|
9
|
+
}, []), u = i(() => {
|
|
10
|
+
switch (n) {
|
|
11
|
+
case s.LEARNING_WORKSHEET:
|
|
12
12
|
t({
|
|
13
|
-
id:
|
|
13
|
+
id: o ? s.LEARNING_LEVEL : s.STUDENT_INFORMATION,
|
|
14
14
|
confirmationModalActive: !1,
|
|
15
15
|
resetAttempt: !0
|
|
16
|
-
}),
|
|
16
|
+
}), r();
|
|
17
17
|
break;
|
|
18
18
|
default:
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
}, [
|
|
22
|
-
t({ confirmationModalActive: !1 }),
|
|
23
|
-
}, [t,
|
|
21
|
+
}, [n, t, o, r]), f = i(() => {
|
|
22
|
+
t({ confirmationModalActive: !1 }), r();
|
|
23
|
+
}, [t, r]), h = N(
|
|
24
24
|
() => ({
|
|
25
|
-
[
|
|
26
|
-
title: "Changing the session level will reset current progress. Are you sure?",
|
|
27
|
-
confirmText: "Yes, change session level",
|
|
28
|
-
onConfirm:
|
|
29
|
-
onCancel:
|
|
25
|
+
[s.LEARNING_WORKSHEET]: {
|
|
26
|
+
title: o ? "Changing the session level will reset current progress. Are you sure?" : "You will lose the current progress. Do you still wish to change the grade, level, or chapters for the session?",
|
|
27
|
+
confirmText: o ? "Yes, change session level" : "Yes, reset",
|
|
28
|
+
onConfirm: u,
|
|
29
|
+
onCancel: f
|
|
30
30
|
}
|
|
31
31
|
}),
|
|
32
|
-
[u,
|
|
33
|
-
),
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}, [
|
|
32
|
+
[f, u, o]
|
|
33
|
+
), l = n ? h[n] : void 0;
|
|
34
|
+
return m(() => {
|
|
35
|
+
c && l && a(!0);
|
|
36
|
+
}, [c, l]), m(() => () => {
|
|
37
37
|
e.current && clearTimeout(e.current);
|
|
38
|
-
}, []), { modalConfig:
|
|
38
|
+
}, []), { modalConfig: l, openModal: d };
|
|
39
39
|
};
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
O as default
|
|
42
42
|
};
|
|
43
43
|
//# sourceMappingURL=use-confirmation-modal.js.map
|
package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-confirmation-modal.js","sources":["../../../../../../src/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { useTrialSessionContext } from '../../../context/use-trial-session-context';\nimport { TrialPageId } from '../../../trial-session-constants';\n\nconst ANIMATION_DURATION_MS = 500;\n\ninterface IConfirmationModalConfig {\n title: string;\n confirmText?: string;\n cancelText?: string;\n onConfirm: () => void;\n onCancel: () => void;\n}\n\ninterface IConfirmationModalReturn {\n modalConfig: IConfirmationModalConfig | undefined;\n openModal: boolean;\n}\n\nconst useConfirmationModal = (): IConfirmationModalReturn => {\n const [openModal, setOpenModal] = useState(false);\n const { slideConfig, formData, updateSlideConfig } = useTrialSessionContext();\n const { id } = slideConfig;\n const { confirmationModalActive } = formData || {};\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const closeModal = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n timeoutRef.current = setTimeout(() => {\n setOpenModal(false);\n timeoutRef.current = null;\n }, ANIMATION_DURATION_MS);\n }, []);\n\n const handleConfirm = useCallback(() => {\n switch (id) {\n case TrialPageId.LEARNING_WORKSHEET:\n updateSlideConfig({\n id: TrialPageId.LEARNING_LEVEL,\n confirmationModalActive: false,\n resetAttempt: true,\n });\n closeModal();\n break;\n default:\n return null;\n }\n }, [id, updateSlideConfig, closeModal]);\n\n const handleCancel = useCallback(() => {\n updateSlideConfig({ confirmationModalActive: false });\n closeModal();\n }, [updateSlideConfig, closeModal]);\n\n const modalConfigs: Partial<Record<TrialPageId, IConfirmationModalConfig>> = useMemo(\n () => ({\n [TrialPageId.LEARNING_WORKSHEET]: {\n title: 'Changing the session level will reset current progress. Are you sure?',\n confirmText: 'Yes, change session level',\n onConfirm: handleConfirm,\n onCancel: handleCancel,\n },\n }),\n [handleCancel, handleConfirm],\n );\n\n const modalConfig = id ? modalConfigs[id] : undefined;\n\n useEffect(() => {\n if (confirmationModalActive && modalConfig) setOpenModal(true);\n }, [confirmationModalActive, modalConfig]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n return { modalConfig, openModal };\n};\n\nexport default useConfirmationModal;\n"],"names":["ANIMATION_DURATION_MS","useConfirmationModal","openModal","setOpenModal","useState","slideConfig","formData","updateSlideConfig","useTrialSessionContext","id","confirmationModalActive","timeoutRef","useRef","closeModal","useCallback","handleConfirm","TrialPageId","handleCancel","modalConfigs","useMemo","modalConfig","useEffect"],"mappings":";;;AAKA,MAAMA,IAAwB,KAexBC,IAAuB,MAAgC;AAC3D,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,EAAE,aAAAC,GAAa,UAAAC,GAAU,mBAAAC,
|
|
1
|
+
{"version":3,"file":"use-confirmation-modal.js","sources":["../../../../../../src/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { useTrialSessionContext } from '../../../context/use-trial-session-context';\nimport { TrialPageId } from '../../../trial-session-constants';\n\nconst ANIMATION_DURATION_MS = 500;\n\ninterface IConfirmationModalConfig {\n title: string;\n confirmText?: string;\n cancelText?: string;\n onConfirm: () => void;\n onCancel: () => void;\n}\n\ninterface IConfirmationModalReturn {\n modalConfig: IConfirmationModalConfig | undefined;\n openModal: boolean;\n}\n\nconst useConfirmationModal = (): IConfirmationModalReturn => {\n const [openModal, setOpenModal] = useState(false);\n const { slideConfig, formData, demoType, updateSlideConfig } = useTrialSessionContext();\n const { id } = slideConfig;\n const { confirmationModalActive } = formData || {};\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const isTrialV3 = demoType === 'TRIAL_V3';\n\n const closeModal = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n timeoutRef.current = setTimeout(() => {\n setOpenModal(false);\n timeoutRef.current = null;\n }, ANIMATION_DURATION_MS);\n }, []);\n\n const handleConfirm = useCallback(() => {\n switch (id) {\n case TrialPageId.LEARNING_WORKSHEET:\n updateSlideConfig({\n id: isTrialV3 ? TrialPageId.LEARNING_LEVEL : TrialPageId.STUDENT_INFORMATION,\n confirmationModalActive: false,\n resetAttempt: true,\n });\n closeModal();\n break;\n default:\n return null;\n }\n }, [id, updateSlideConfig, isTrialV3, closeModal]);\n\n const handleCancel = useCallback(() => {\n updateSlideConfig({ confirmationModalActive: false });\n closeModal();\n }, [updateSlideConfig, closeModal]);\n\n const modalConfigs: Partial<Record<TrialPageId, IConfirmationModalConfig>> = useMemo(\n () => ({\n [TrialPageId.LEARNING_WORKSHEET]: {\n title: isTrialV3\n ? 'Changing the session level will reset current progress. Are you sure?'\n : 'You will lose the current progress. Do you still wish to change the grade, level, or chapters for the session?',\n confirmText: isTrialV3 ? 'Yes, change session level' : 'Yes, reset',\n onConfirm: handleConfirm,\n onCancel: handleCancel,\n },\n }),\n [handleCancel, handleConfirm, isTrialV3],\n );\n\n const modalConfig = id ? modalConfigs[id] : undefined;\n\n useEffect(() => {\n if (confirmationModalActive && modalConfig) setOpenModal(true);\n }, [confirmationModalActive, modalConfig]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n return { modalConfig, openModal };\n};\n\nexport default useConfirmationModal;\n"],"names":["ANIMATION_DURATION_MS","useConfirmationModal","openModal","setOpenModal","useState","slideConfig","formData","demoType","updateSlideConfig","useTrialSessionContext","id","confirmationModalActive","timeoutRef","useRef","isTrialV3","closeModal","useCallback","handleConfirm","TrialPageId","handleCancel","modalConfigs","useMemo","modalConfig","useEffect"],"mappings":";;;AAKA,MAAMA,IAAwB,KAexBC,IAAuB,MAAgC;AAC3D,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,EAAE,aAAAC,GAAa,UAAAC,GAAU,UAAAC,GAAU,mBAAAC,EAAA,IAAsBC,KACzD,EAAE,IAAAC,EAAO,IAAAL,GACT,EAAE,yBAAAM,EAAA,IAA4BL,KAAY,IAC1CM,IAAaC,EAA8B,IAAI,GAC/CC,IAAYP,MAAa,YAEzBQ,IAAaC,EAAY,MAAM;AACnC,IAAIJ,EAAW,WACb,aAAaA,EAAW,OAAO,GAGtBA,EAAA,UAAU,WAAW,MAAM;AACpC,MAAAT,EAAa,EAAK,GAClBS,EAAW,UAAU;AAAA,OACpBZ,CAAqB;AAAA,EAC1B,GAAG,CAAE,CAAA,GAECiB,IAAgBD,EAAY,MAAM;AACtC,YAAQN,GAAI;AAAA,MACV,KAAKQ,EAAY;AACG,QAAAV,EAAA;AAAA,UAChB,IAAIM,IAAYI,EAAY,iBAAiBA,EAAY;AAAA,UACzD,yBAAyB;AAAA,UACzB,cAAc;AAAA,QAAA,CACf,GACUH;AACX;AAAA,MACF;AACS,eAAA;AAAA,IACX;AAAA,KACC,CAACL,GAAIF,GAAmBM,GAAWC,CAAU,CAAC,GAE3CI,IAAeH,EAAY,MAAM;AACnB,IAAAR,EAAA,EAAE,yBAAyB,GAAA,CAAO,GACzCO;EAAA,GACV,CAACP,GAAmBO,CAAU,CAAC,GAE5BK,IAAuEC;AAAA,IAC3E,OAAO;AAAA,MACL,CAACH,EAAY,kBAAkB,GAAG;AAAA,QAChC,OAAOJ,IACH,0EACA;AAAA,QACJ,aAAaA,IAAY,8BAA8B;AAAA,QACvD,WAAWG;AAAA,QACX,UAAUE;AAAA,MACZ;AAAA,IAAA;AAAA,IAEF,CAACA,GAAcF,GAAeH,CAAS;AAAA,EAAA,GAGnCQ,IAAcZ,IAAKU,EAAaV,CAAE,IAAI;AAE5C,SAAAa,EAAU,MAAM;AACV,IAAAZ,KAA2BW,KAAanB,EAAa,EAAI;AAAA,EAAA,GAC5D,CAACQ,GAAyBW,CAAW,CAAC,GAEzCC,EAAU,MACD,MAAM;AACX,IAAIX,EAAW,WACb,aAAaA,EAAW,OAAO;AAAA,EACjC,GAED,CAAE,CAAA,GAEE,EAAE,aAAAU,GAAa,WAAApB;AACxB;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import t from "styled-components";
|
|
2
2
|
import a from "../../../../assets/line-icons/icons/tick.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import n from "../../../ui/layout/flex-view.js";
|
|
4
|
+
import r from "../../../ui/text/text.js";
|
|
5
5
|
const d = t.div`
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
8
|
overflow: auto;
|
|
9
|
-
`, h = t(
|
|
9
|
+
`, h = t(n)`
|
|
10
10
|
position: relative;
|
|
11
|
-
`, f = t(
|
|
11
|
+
`, f = t(r)`
|
|
12
12
|
position: absolute;
|
|
13
13
|
bottom: 20px;
|
|
14
|
-
`, u = t(
|
|
14
|
+
`, u = t(n)`
|
|
15
15
|
position: relative;
|
|
16
16
|
overflow: hidden;
|
|
17
|
-
`,
|
|
17
|
+
`, $ = t.div(
|
|
18
18
|
({ $offset: o, $transitionEnabled: e }) => `
|
|
19
19
|
position: absolute;
|
|
20
20
|
top: 0;
|
|
@@ -24,26 +24,27 @@ const d = t.div`
|
|
|
24
24
|
transition: ${e ? "transform 0.5s ease-in-out" : "none"};
|
|
25
25
|
transform: translateX(${o * 100}%);
|
|
26
26
|
`
|
|
27
|
-
),
|
|
28
|
-
({ $top:
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: ${o || 0}px;
|
|
31
|
-
right: ${e || 0}px;
|
|
27
|
+
), g = t(a)(
|
|
28
|
+
({ theme: o, $top: e, $right: i }) => `
|
|
32
29
|
z-index: 1;
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: ${e || 0}px;
|
|
32
|
+
right: ${i || 0}px;
|
|
33
|
+
color: ${o.colors.GREEN_4};
|
|
33
34
|
`
|
|
34
|
-
),
|
|
35
|
-
const { top: e, bottom:
|
|
35
|
+
), v = t(n)(({ $position: o }) => {
|
|
36
|
+
const { top: e, bottom: i, left: p, right: s } = o || {};
|
|
36
37
|
return `
|
|
37
38
|
position: absolute;
|
|
38
39
|
z-index: 2;
|
|
39
40
|
top: ${e || 0}px;
|
|
40
|
-
bottom: ${
|
|
41
|
+
bottom: ${i || 0}px;
|
|
41
42
|
left: ${p || 0}px;
|
|
42
43
|
right: ${s || 0}px;
|
|
43
44
|
`;
|
|
44
45
|
}), b = t.div`
|
|
45
46
|
position: relative;
|
|
46
|
-
`, w = t(
|
|
47
|
+
`, w = t(r)(
|
|
47
48
|
({ theme: o }) => `
|
|
48
49
|
white-space: pre-wrap;
|
|
49
50
|
margin-top: -${o.layout.gutter * 0.25}px;
|
|
@@ -52,12 +53,12 @@ const d = t.div`
|
|
|
52
53
|
export {
|
|
53
54
|
d as Container,
|
|
54
55
|
h as FlexRelative,
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
v as FloatingElement,
|
|
57
|
+
g as GreenTick,
|
|
57
58
|
b as ImageWrapper,
|
|
58
59
|
f as MathText,
|
|
59
60
|
u as Slider,
|
|
60
|
-
|
|
61
|
+
$ as SliderContent,
|
|
61
62
|
w as TextElement
|
|
62
63
|
};
|
|
63
64
|
//# sourceMappingURL=learning-session-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learning-session-styled.js","sources":["../../../../../src/features/trial-session/comps/learning-session/learning-session-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport TickIcon from '../../../../assets/line-icons/icons/tick';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport type { TFloatingElement, TGreenTick, TSliderContent } from './learning-session-types';\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n overflow: auto;\n`;\n\nconst FlexRelative = styled(FlexView)`\n position: relative;\n`;\n\nconst MathText = styled(Text)`\n position: absolute;\n bottom: 20px;\n`;\n\nconst Slider = styled(FlexView)`\n position: relative;\n overflow: hidden;\n`;\n\nconst SliderContent = styled.div<TSliderContent>(\n ({ $offset, $transitionEnabled }) => `\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: auto;\n transition: ${$transitionEnabled ? 'transform 0.5s ease-in-out' : 'none'};\n transform: translateX(${$offset * 100}%);\n`,\n);\n\nconst GreenTick = styled(TickIcon)<TGreenTick>(\n ({ $top, $right }) => `\n position: absolute;\n top: ${$top || 0}px;\n right: ${$right || 0}px;\n
|
|
1
|
+
{"version":3,"file":"learning-session-styled.js","sources":["../../../../../src/features/trial-session/comps/learning-session/learning-session-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport TickIcon from '../../../../assets/line-icons/icons/tick';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport type { TFloatingElement, TGreenTick, TSliderContent } from './learning-session-types';\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n overflow: auto;\n`;\n\nconst FlexRelative = styled(FlexView)`\n position: relative;\n`;\n\nconst MathText = styled(Text)`\n position: absolute;\n bottom: 20px;\n`;\n\nconst Slider = styled(FlexView)`\n position: relative;\n overflow: hidden;\n`;\n\nconst SliderContent = styled.div<TSliderContent>(\n ({ $offset, $transitionEnabled }) => `\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: auto;\n transition: ${$transitionEnabled ? 'transform 0.5s ease-in-out' : 'none'};\n transform: translateX(${$offset * 100}%);\n`,\n);\n\nconst GreenTick = styled(TickIcon)<TGreenTick>(\n ({ theme, $top, $right }) => `\n z-index: 1;\n position: absolute;\n top: ${$top || 0}px;\n right: ${$right || 0}px;\n color: ${theme.colors.GREEN_4};\n `,\n);\n\nconst FloatingElement = styled(FlexView)<TFloatingElement>(({ $position }) => {\n const { top, bottom, left, right } = $position || {};\n\n return `\n position: absolute;\n z-index: 2;\n top: ${top || 0}px;\n bottom: ${bottom || 0}px;\n left: ${left || 0}px;\n right: ${right || 0}px;\n `;\n});\n\nconst ImageWrapper = styled.div`\n position: relative;\n`;\n\nconst TextElement = styled(Text)(\n ({ theme }) => `\n white-space: pre-wrap;\n margin-top: -${theme.layout.gutter * 0.25}px;\n`,\n);\n\nexport {\n Container,\n FlexRelative,\n MathText,\n Slider,\n SliderContent,\n GreenTick,\n FloatingElement,\n ImageWrapper,\n TextElement,\n};\n"],"names":["Container","styled","FlexRelative","FlexView","MathText","Text","Slider","SliderContent","$offset","$transitionEnabled","GreenTick","TickIcon","theme","$top","$right","FloatingElement","$position","top","bottom","left","right","ImageWrapper","TextElement"],"mappings":";;;;AAOA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMnBC,IAAeD,EAAOE,CAAQ;AAAA;AAAA,GAI9BC,IAAWH,EAAOI,CAAI;AAAA;AAAA;AAAA,GAKtBC,IAASL,EAAOE,CAAQ;AAAA;AAAA;AAAA,GAKxBI,IAAgBN,EAAO;AAAA,EAC3B,CAAC,EAAE,SAAAO,GAAS,oBAAAC,EAAA,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMvBA,IAAqB,+BAA+B,MAAM;AAAA,0BAChDD,IAAU,GAAG;AAAA;AAEvC,GAEME,IAAYT,EAAOU,CAAQ;AAAA,EAC/B,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,QAAAC,EAAa,MAAA;AAAA;AAAA;AAAA,WAGpBD,KAAQ,CAAC;AAAA,aACPC,KAAU,CAAC;AAAA,aACXF,EAAM,OAAO,OAAO;AAAA;AAEjC,GAEMG,IAAkBd,EAAOE,CAAQ,EAAoB,CAAC,EAAE,WAAAa,QAAgB;AAC5E,QAAM,EAAE,KAAAC,GAAK,QAAAC,GAAQ,MAAAC,GAAM,OAAAC,EAAM,IAAIJ,KAAa;AAE3C,SAAA;AAAA;AAAA;AAAA,WAGEC,KAAO,CAAC;AAAA,cACLC,KAAU,CAAC;AAAA,YACbC,KAAQ,CAAC;AAAA,aACRC,KAAS,CAAC;AAAA;AAEvB,CAAC,GAEKC,IAAepB,EAAO;AAAA;AAAA,GAItBqB,IAAcrB,EAAOI,CAAI;AAAA,EAC7B,CAAC,EAAE,OAAAO,EAAA,MAAY;AAAA;AAAA,iBAEAA,EAAM,OAAO,SAAS,IAAI;AAAA;AAE3C;"}
|