@cuemath/leap 3.5.48-gg1 → 3.5.48-j2
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/illustrations/illustrations.js +0 -3
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/bulb.js +10 -10
- package/dist/assets/line-icons/icons/bulb.js.map +1 -1
- package/dist/assets/line-icons/icons/hand.js.map +1 -1
- package/dist/assets/line-icons/icons/scribble.js +36 -13
- package/dist/assets/line-icons/icons/scribble.js.map +1 -1
- package/dist/assets/line-icons/icons/sticker.js +9 -9
- package/dist/assets/line-icons/icons/sticker.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +6 -6
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js +2 -2
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js.map +1 -1
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +29 -64
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +2 -2
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +107 -103
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +2 -2
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +104 -96
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +134 -115
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +95 -91
- 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 +92 -74
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +28 -25
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +214 -170
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/store/action-types.js +20 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/action-types.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/actions.js +55 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/actions.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/initial-state.js +38 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/initial-state.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/reducer.js +58 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/reducer.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +40 -39
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +44 -43
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js +51 -42
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js +85 -72
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +34 -25
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-types.js +5 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-types.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +146 -89
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-view.js +40 -40
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js +268 -83
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/hooks/use-learning-plan-sync.js +29 -0
- package/dist/features/trial-session/hooks/use-learning-plan-sync.js.map +1 -0
- package/dist/features/trial-session/trial-session-types.js +3 -2
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/ui/tabs/tabs.js +15 -15
- package/dist/features/ui/tabs/tabs.js.map +1 -1
- package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js +1 -0
- package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +13 -12
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +100 -123
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js.map +1 -1
- package/dist/features/worksheet/worksheet/question-tips.js +100 -0
- package/dist/features/worksheet/worksheet/question-tips.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +109 -40
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +46 -49
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js +4 -4
- package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +276 -129
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js +25 -25
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-provider.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-provider.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +25 -22
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/question-backdrop/question-backdrop-styled.js +20 -26
- package/dist/features/worksheet/worksheet/worksheet-question/question-backdrop/question-backdrop-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/question-backdrop/question-backdrop.js +17 -32
- package/dist/features/worksheet/worksheet/worksheet-question/question-backdrop/question-backdrop.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-styled.js +22 -17
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/system-intros/basic-practice-intro.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/system-intros/basic-practice-intro.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/system-intros/regular-practice-intro.js +2 -2
- package/dist/features/worksheet/worksheet/worksheet-question/system-intros/regular-practice-intro.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +50 -32
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +287 -377
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js +53 -0
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +191 -0
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +345 -20
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/navigator.js +20 -33
- package/dist/features/worksheet/worksheet/worksheet-sidebar/navigator.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js +112 -0
- package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +61 -0
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js +91 -0
- package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-store.js +289 -0
- package/dist/features/worksheet/worksheet/worksheet-store.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-styled.js +83 -29
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js +24 -45
- package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js +3 -4
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-view.js +99 -88
- package/dist/features/worksheet/worksheet/worksheet-view.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +117 -126
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +29 -29
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +16 -16
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +24 -24
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/index.d.ts +129 -68
- package/dist/index.js +745 -760
- package/dist/index.js.map +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/types/models/worksheet.js +1 -2
- package/dist/types/models/worksheet.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/chevron-up.js +0 -28
- package/dist/assets/line-icons/icons/chevron-up.js.map +0 -1
- package/dist/assets/line-icons/icons/close.js +0 -28
- package/dist/assets/line-icons/icons/close.js.map +0 -1
- package/dist/assets/line-icons/icons/cursor2.js +0 -24
- package/dist/assets/line-icons/icons/cursor2.js.map +0 -1
- package/dist/assets/line-icons/icons/hints.js +0 -25
- package/dist/assets/line-icons/icons/hints.js.map +0 -1
- package/dist/assets/line-icons/icons/question-feedback.js +0 -30
- package/dist/assets/line-icons/icons/question-feedback.js.map +0 -1
- package/dist/assets/line-icons/icons/teaching-tools.js +0 -40
- package/dist/assets/line-icons/icons/teaching-tools.js.map +0 -1
- package/dist/assets/line-icons/icons/tval-question.js +0 -32
- package/dist/assets/line-icons/icons/tval-question.js.map +0 -1
- package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js +0 -37
- package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-allow-retry-button-click.js +0 -15
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-allow-retry-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-back-button-click.js +0 -18
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-back-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-check-button-click.js +0 -21
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-check-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-next-button-click.js +0 -19
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-next-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-ready-button-click.js +0 -34
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-ready-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-response-change.js +0 -38
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-response-change.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-retry-button-click.js +0 -16
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-retry-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-button-click.js +0 -35
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-section-button-click.js +0 -12
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-section-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-start-button-click.js +0 -44
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-start-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-submit-quiz.js +0 -51
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-submit-quiz.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-validate-button-click.js +0 -19
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-validate-button-click.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-play-validation-audio.js +0 -23
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-play-validation-audio.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-validate-question.js +0 -36
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-validate-question.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3.js +0 -184
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3_1.js +0 -261
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3_1.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller.js +0 -180
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3.js +0 -77
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3_1.js +0 -103
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3_1.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller.js +0 -21
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller-view.js +0 -22
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller-view.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar-styled.js +0 -49
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar.js +0 -191
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/scribble-switch.js +0 -65
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/scribble-switch.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-styled.js +0 -9
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-tools.js +0 -38
- package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-tools.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js +0 -73
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-derived-blocker.js +0 -20
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-derived-blocker.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-attemptable-question-index.js +0 -69
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-attemptable-question-index.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-unlocked-question-index.js +0 -18
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-unlocked-question-index.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-merged-response-state.js +0 -19
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-merged-response-state.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js +0 -138
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-renderable-questions.js +0 -9
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-renderable-questions.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store/worksheet-store.js +0 -230
- package/dist/features/worksheet/worksheet/worksheet-store/worksheet-store.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.js +0 -19
- package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js +0 -72
- package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js.map +0 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- package/dist/static/pattern-cubes.113d8dda.svg +0 -1
- package/dist/static/pattern-diamond.a51b202c.svg +0 -1
- package/dist/static/pattern-honeycomb.ed7ad26a.svg +0 -1
- /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/store/actions.ts"],"sourcesContent":["import type { IExtraPracticeQuery } from '../api/get-resource';\nimport type { IEPResourceState, TFilterType, TResourceTab } from '../resources-assign-type';\nimport { RESOURCE_ASSIGN_ACTION_TYPES } from './action-types';\n\nexport const ACTIONS = {\n setPageNumber: (payload: number) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SET_PAGE_NUMBER,\n payload,\n }),\n\n setSearchValue: (payload: string) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SET_SEARCH_VALUE,\n payload,\n }),\n\n updateSearchQuery: (payload: Partial<IExtraPracticeQuery>) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.UPDATE_SEARCH_QUERY,\n payload,\n }),\n\n setResourceItems: (payload: IEPResourceState['resourceItems']) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SET_RESOURCE_ITEMS,\n payload,\n }),\n\n appendResourceItems: (payload: IEPResourceState['resourceItems']) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.APPEND_RESOURCE_ITEMS,\n payload,\n }),\n\n addSelectedResource: (payload: IEPResourceState['selectedResourceItems'][number]) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.ADD_SELECTED_RESOURCE,\n payload,\n }),\n\n removeSelectedResource: (payload: string) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.REMOVE_SELECTED_RESOURCE,\n payload,\n }),\n\n setResourceFilters: (payload: IEPResourceState['resourceFilters']) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SET_RESOURCE_FILTERS,\n payload,\n }),\n\n setSelectedTab: (payload: TResourceTab) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SET_SELECTED_TAB,\n payload,\n }),\n\n setFilterExpansion: (payload: { filterType: TFilterType; expanded: boolean }) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SET_FILTER_EXPANSION,\n payload,\n }),\n\n resetState: (payload: Partial<IEPResourceState>) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.RESET_STATE,\n payload,\n }),\n\n syncState: (payload: Partial<IEPResourceState>) => ({\n type: RESOURCE_ASSIGN_ACTION_TYPES.SYNC_STATE,\n payload,\n }),\n} as const;\n"],"names":["ACTIONS","payload","RESOURCE_ASSIGN_ACTION_TYPES"],"mappings":";AAIO,MAAMA,IAAU;AAAA,EACrB,eAAe,CAACC,OAAqB;AAAA,IACnC,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,gBAAgB,CAACA,OAAqB;AAAA,IACpC,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,mBAAmB,CAACA,OAA2C;AAAA,IAC7D,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,kBAAkB,CAACA,OAAgD;AAAA,IACjE,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,qBAAqB,CAACA,OAAgD;AAAA,IACpE,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,qBAAqB,CAACA,OAAgE;AAAA,IACpF,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,wBAAwB,CAACA,OAAqB;AAAA,IAC5C,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,oBAAoB,CAACA,OAAkD;AAAA,IACrE,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,gBAAgB,CAACA,OAA2B;AAAA,IAC1C,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,oBAAoB,CAACA,OAA6D;AAAA,IAChF,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,YAAY,CAACA,OAAwC;AAAA,IACnD,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAAA,EAGF,WAAW,CAACA,OAAwC;AAAA,IAClD,MAAMC,EAA6B;AAAA,IACnC,SAAAD;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const b = ({
|
|
2
|
+
controlledState: s,
|
|
3
|
+
stream: u,
|
|
4
|
+
studentId: i,
|
|
5
|
+
userMilestoneId: p,
|
|
6
|
+
programId: m
|
|
7
|
+
}) => {
|
|
8
|
+
const g = {
|
|
9
|
+
stream: u,
|
|
10
|
+
page: (s == null ? void 0 : s.pageNumber) ?? 1,
|
|
11
|
+
per_page: 50,
|
|
12
|
+
user_id: i,
|
|
13
|
+
user_milestone_id: p,
|
|
14
|
+
program_id: m
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
pageNumber: (s == null ? void 0 : s.pageNumber) ?? 1,
|
|
18
|
+
searchValue: (s == null ? void 0 : s.searchValue) ?? "",
|
|
19
|
+
searchQuery: (s == null ? void 0 : s.searchQuery) ?? g,
|
|
20
|
+
resourceItems: (s == null ? void 0 : s.resourceItems) ?? [],
|
|
21
|
+
selectedResourceItems: (s == null ? void 0 : s.selectedResourceItems) ?? [],
|
|
22
|
+
resourceFilters: (s == null ? void 0 : s.resourceFilters) ?? {
|
|
23
|
+
boards: [],
|
|
24
|
+
grades: [],
|
|
25
|
+
node_types: []
|
|
26
|
+
},
|
|
27
|
+
selectedTab: (s == null ? void 0 : s.selectedTab) ?? "resource-filters",
|
|
28
|
+
filterExpansion: (s == null ? void 0 : s.filterExpansion) ?? {
|
|
29
|
+
curriculum: !0,
|
|
30
|
+
grade: !0,
|
|
31
|
+
type: !0
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
b as createInitialState
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=initial-state.js.map
|
package/dist/features/milestone/milestone-resources/resources-assign/store/initial-state.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initial-state.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/store/initial-state.ts"],"sourcesContent":["import type { TCourseStream } from '../../../create/milestone-create-types';\nimport type { IExtraPracticeQuery } from '../api/get-resource';\nimport type { IEPResourceState } from '../resources-assign-type';\n\ninterface ICreateInitialStateParams {\n controlledState?: Partial<IEPResourceState>;\n stream: TCourseStream;\n studentId: string;\n userMilestoneId?: string;\n programId?: string;\n}\n\nexport const createInitialState = ({\n controlledState,\n stream,\n studentId,\n userMilestoneId,\n programId,\n}: ICreateInitialStateParams): IEPResourceState => {\n const defaultSearchQuery: IExtraPracticeQuery = {\n stream,\n page: controlledState?.pageNumber ?? 1,\n per_page: 50,\n user_id: studentId,\n user_milestone_id: userMilestoneId,\n program_id: programId,\n };\n\n return {\n pageNumber: controlledState?.pageNumber ?? 1,\n searchValue: controlledState?.searchValue ?? '',\n searchQuery: controlledState?.searchQuery ?? defaultSearchQuery,\n resourceItems: controlledState?.resourceItems ?? [],\n selectedResourceItems: controlledState?.selectedResourceItems ?? [],\n resourceFilters: controlledState?.resourceFilters ?? {\n boards: [],\n grades: [],\n node_types: [],\n },\n selectedTab: controlledState?.selectedTab ?? 'resource-filters',\n filterExpansion: controlledState?.filterExpansion ?? {\n curriculum: true,\n grade: true,\n type: true,\n },\n };\n};\n"],"names":["createInitialState","controlledState","stream","studentId","userMilestoneId","programId","defaultSearchQuery"],"mappings":"AAYO,MAAMA,IAAqB,CAAC;AAAA,EACjC,iBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AACF,MAAmD;AACjD,QAAMC,IAA0C;AAAA,IAC9C,QAAAJ;AAAA,IACA,OAAMD,KAAA,gBAAAA,EAAiB,eAAc;AAAA,IACrC,UAAU;AAAA,IACV,SAASE;AAAA,IACT,mBAAmBC;AAAA,IACnB,YAAYC;AAAA,EAAA;AAGP,SAAA;AAAA,IACL,aAAYJ,KAAA,gBAAAA,EAAiB,eAAc;AAAA,IAC3C,cAAaA,KAAA,gBAAAA,EAAiB,gBAAe;AAAA,IAC7C,cAAaA,KAAA,gBAAAA,EAAiB,gBAAeK;AAAA,IAC7C,gBAAeL,KAAA,gBAAAA,EAAiB,kBAAiB,CAAC;AAAA,IAClD,wBAAuBA,KAAA,gBAAAA,EAAiB,0BAAyB,CAAC;AAAA,IAClE,kBAAiBA,KAAA,gBAAAA,EAAiB,oBAAmB;AAAA,MACnD,QAAQ,CAAC;AAAA,MACT,QAAQ,CAAC;AAAA,MACT,YAAY,CAAC;AAAA,IACf;AAAA,IACA,cAAaA,KAAA,gBAAAA,EAAiB,gBAAe;AAAA,IAC7C,kBAAiBA,KAAA,gBAAAA,EAAiB,oBAAmB;AAAA,MACnD,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { RESOURCE_ASSIGN_ACTION_TYPES as E } from "./action-types.js";
|
|
2
|
+
const R = (e, r) => {
|
|
3
|
+
switch (r.type) {
|
|
4
|
+
case E.SET_PAGE_NUMBER:
|
|
5
|
+
return { ...e, pageNumber: r.payload };
|
|
6
|
+
case E.SET_SEARCH_VALUE:
|
|
7
|
+
return { ...e, searchValue: r.payload };
|
|
8
|
+
case E.SET_SEARCH_QUERY:
|
|
9
|
+
return { ...e, searchQuery: r.payload };
|
|
10
|
+
case E.UPDATE_SEARCH_QUERY:
|
|
11
|
+
return { ...e, searchQuery: { ...e.searchQuery, ...r.payload } };
|
|
12
|
+
case E.SET_RESOURCE_ITEMS:
|
|
13
|
+
return { ...e, resourceItems: r.payload };
|
|
14
|
+
case E.APPEND_RESOURCE_ITEMS: {
|
|
15
|
+
const u = [...e.resourceItems, ...r.payload], a = Array.from(new Map(u.map((s) => [s.id, s])).values());
|
|
16
|
+
return { ...e, resourceItems: a };
|
|
17
|
+
}
|
|
18
|
+
case E.SET_SELECTED_RESOURCES:
|
|
19
|
+
return { ...e, selectedResourceItems: r.payload };
|
|
20
|
+
case E.ADD_SELECTED_RESOURCE:
|
|
21
|
+
return {
|
|
22
|
+
...e,
|
|
23
|
+
selectedResourceItems: [...e.selectedResourceItems, r.payload]
|
|
24
|
+
};
|
|
25
|
+
case E.REMOVE_SELECTED_RESOURCE:
|
|
26
|
+
return {
|
|
27
|
+
...e,
|
|
28
|
+
selectedResourceItems: e.selectedResourceItems.filter(
|
|
29
|
+
(u) => u.node_id !== r.payload
|
|
30
|
+
)
|
|
31
|
+
};
|
|
32
|
+
case E.SET_RESOURCE_FILTERS:
|
|
33
|
+
return { ...e, resourceFilters: r.payload };
|
|
34
|
+
case E.SET_SELECTED_TAB:
|
|
35
|
+
return { ...e, selectedTab: r.payload };
|
|
36
|
+
case E.SET_FILTER_EXPANSION:
|
|
37
|
+
return {
|
|
38
|
+
...e,
|
|
39
|
+
filterExpansion: {
|
|
40
|
+
...e.filterExpansion,
|
|
41
|
+
[r.payload.filterType]: r.payload.expanded
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
case E.RESET_STATE:
|
|
45
|
+
return { ...e, ...r.payload };
|
|
46
|
+
case E.SYNC_STATE:
|
|
47
|
+
return Object.keys(r.payload).some((a) => {
|
|
48
|
+
const s = a, l = r.payload[s], S = e[s];
|
|
49
|
+
return l === S ? !1 : typeof l == "object" && l !== null ? JSON.stringify(l) !== JSON.stringify(S) : !0;
|
|
50
|
+
}) ? { ...e, ...r.payload } : e;
|
|
51
|
+
default:
|
|
52
|
+
return e;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
R as resourceAssignReducer
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/store/reducer.ts"],"sourcesContent":["import type { IEPResourceState, TFilterType, TResourceTab } from '../resources-assign-type';\nimport { RESOURCE_ASSIGN_ACTION_TYPES } from './action-types';\n\nexport type TResourceAssignAction =\n | { type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_PAGE_NUMBER; payload: number }\n | { type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_SEARCH_VALUE; payload: string }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_SEARCH_QUERY;\n payload: IEPResourceState['searchQuery'];\n }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_RESOURCE_ITEMS;\n payload: IEPResourceState['resourceItems'];\n }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_SELECTED_RESOURCES;\n payload: IEPResourceState['selectedResourceItems'];\n }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_RESOURCE_FILTERS;\n payload: IEPResourceState['resourceFilters'];\n }\n | { type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_SELECTED_TAB; payload: TResourceTab }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SET_FILTER_EXPANSION;\n payload: { filterType: TFilterType; expanded: boolean };\n }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.UPDATE_SEARCH_QUERY;\n payload: Partial<IEPResourceState['searchQuery']>;\n }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.ADD_SELECTED_RESOURCE;\n payload: IEPResourceState['selectedResourceItems'][number];\n }\n | { type: typeof RESOURCE_ASSIGN_ACTION_TYPES.REMOVE_SELECTED_RESOURCE; payload: string }\n | {\n type: typeof RESOURCE_ASSIGN_ACTION_TYPES.APPEND_RESOURCE_ITEMS;\n payload: IEPResourceState['resourceItems'];\n }\n | { type: typeof RESOURCE_ASSIGN_ACTION_TYPES.RESET_STATE; payload: Partial<IEPResourceState> }\n | { type: typeof RESOURCE_ASSIGN_ACTION_TYPES.SYNC_STATE; payload: Partial<IEPResourceState> };\n\nexport const resourceAssignReducer = (\n state: IEPResourceState,\n action: TResourceAssignAction,\n): IEPResourceState => {\n switch (action.type) {\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_PAGE_NUMBER:\n return { ...state, pageNumber: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_SEARCH_VALUE:\n return { ...state, searchValue: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_SEARCH_QUERY:\n return { ...state, searchQuery: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.UPDATE_SEARCH_QUERY:\n return { ...state, searchQuery: { ...state.searchQuery, ...action.payload } };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_RESOURCE_ITEMS:\n return { ...state, resourceItems: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.APPEND_RESOURCE_ITEMS: {\n const combined = [...state.resourceItems, ...action.payload];\n const uniqueItems = Array.from(new Map(combined.map(item => [item.id, item])).values());\n\n return { ...state, resourceItems: uniqueItems };\n }\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_SELECTED_RESOURCES:\n return { ...state, selectedResourceItems: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.ADD_SELECTED_RESOURCE:\n return {\n ...state,\n selectedResourceItems: [...state.selectedResourceItems, action.payload],\n };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.REMOVE_SELECTED_RESOURCE:\n return {\n ...state,\n selectedResourceItems: state.selectedResourceItems.filter(\n item => item.node_id !== action.payload,\n ),\n };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_RESOURCE_FILTERS:\n return { ...state, resourceFilters: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_SELECTED_TAB:\n return { ...state, selectedTab: action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SET_FILTER_EXPANSION:\n return {\n ...state,\n filterExpansion: {\n ...state.filterExpansion,\n [action.payload.filterType]: action.payload.expanded,\n },\n };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.RESET_STATE:\n return { ...state, ...action.payload };\n\n case RESOURCE_ASSIGN_ACTION_TYPES.SYNC_STATE: {\n // Only return new state if values actually changed (deep comparison for objects/arrays)\n const hasChanges = Object.keys(action.payload).some(key => {\n const stateKey = key as keyof IEPResourceState;\n const payloadValue = action.payload[stateKey];\n const stateValue = state[stateKey];\n\n // Shallow reference check first\n if (payloadValue === stateValue) {\n return false;\n }\n\n // Deep compare for objects/arrays\n if (typeof payloadValue === 'object' && payloadValue !== null) {\n return JSON.stringify(payloadValue) !== JSON.stringify(stateValue);\n }\n\n return true;\n });\n\n return hasChanges ? { ...state, ...action.payload } : state;\n }\n\n default:\n return state;\n }\n};\n"],"names":["resourceAssignReducer","state","action","RESOURCE_ASSIGN_ACTION_TYPES","combined","uniqueItems","item","key","stateKey","payloadValue","stateValue"],"mappings":";AA2Ca,MAAAA,IAAwB,CACnCC,GACAC,MACqB;AACrB,UAAQA,EAAO,MAAM;AAAA,IACnB,KAAKC,EAA6B;AAChC,aAAO,EAAE,GAAGF,GAAO,YAAYC,EAAO,QAAQ;AAAA,IAEhD,KAAKC,EAA6B;AAChC,aAAO,EAAE,GAAGF,GAAO,aAAaC,EAAO,QAAQ;AAAA,IAEjD,KAAKC,EAA6B;AAChC,aAAO,EAAE,GAAGF,GAAO,aAAaC,EAAO,QAAQ;AAAA,IAEjD,KAAKC,EAA6B;AACzB,aAAA,EAAE,GAAGF,GAAO,aAAa,EAAE,GAAGA,EAAM,aAAa,GAAGC,EAAO,QAAA;IAEpE,KAAKC,EAA6B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AWD,GACXE,IAAeP,EAAO,QAAQM,CAAQ,GACtCE,IAAaT,EAAMO,CAAQ;AAGjC,eAAIC,MAAiBC,IACZ,KAIL,OAAOD,KAAiB,YAAYA,MAAiB,OAChD,KAAK,UAAUA,CAAY,MAAM,KAAK,UAAUC,CAAU,IAG5D;AAAA,MAAA,CACR,IAEmB,EAAE,GAAGT,GAAO,GAAGC,EAAO,QAAY,IAAAD;AAAA,IAGxD;AACS,aAAAA;AAAA,EACX;AACF;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as e, jsxs as l, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { IMAGES as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { memo as H, useCallback as d, useEffect as v } from "react";
|
|
3
|
+
import { IMAGES as G } from "../../../../assets/images/images.js";
|
|
4
|
+
import O from "../../../../assets/line-icons/icons/plus.js";
|
|
5
|
+
import X from "../../../../assets/line-icons/icons/search.js";
|
|
6
|
+
import q from "../../../sheet-v2/resource-list/resource-list.js";
|
|
7
|
+
import z from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
|
8
8
|
import I from "../../../ui/buttons/button/button.js";
|
|
9
|
-
import
|
|
9
|
+
import F from "../../../ui/buttons/icon-button/icon-button.js";
|
|
10
10
|
import b from "../../../ui/layout/flex-view.js";
|
|
11
|
-
import
|
|
11
|
+
import L from "../../../ui/loader/app-loader/app-loader.js";
|
|
12
12
|
import C from "../../../ui/text/text.js";
|
|
13
|
-
import { useGetMilestoneResources as
|
|
14
|
-
import { MilestoneResourcesWrapper as m, SearchButtonWrapper as
|
|
15
|
-
const
|
|
13
|
+
import { useGetMilestoneResources as U } from "../../milestone-list-container/api/get-milestone-resources.js";
|
|
14
|
+
import { MilestoneResourcesWrapper as m, SearchButtonWrapper as V, SearchButtonCover as _, DefaultWrapper as E } from "./resources-list-styled.js";
|
|
15
|
+
const de = H(
|
|
16
16
|
function(M) {
|
|
17
17
|
const {
|
|
18
18
|
isDraftMilestone: u,
|
|
@@ -21,29 +21,30 @@ const le = D(
|
|
|
21
21
|
studentId: o,
|
|
22
22
|
userMilestoneId: r,
|
|
23
23
|
canUpdatePlan: h,
|
|
24
|
+
isTrialSession: T,
|
|
24
25
|
onAssignResources: s,
|
|
25
|
-
onNodeAttempt:
|
|
26
|
+
onNodeAttempt: S,
|
|
26
27
|
onNodeView: P,
|
|
27
|
-
onNodeReview:
|
|
28
|
-
onNodeReset:
|
|
29
|
-
onNodeUnassign:
|
|
30
|
-
onNodeReattempt:
|
|
31
|
-
onNodeAssignAsHomework:
|
|
32
|
-
} = M, f = p === "TEACHER", g = !h || !t || t && u, {
|
|
28
|
+
onNodeReview: W,
|
|
29
|
+
onNodeReset: x,
|
|
30
|
+
onNodeUnassign: j,
|
|
31
|
+
onNodeReattempt: k,
|
|
32
|
+
onNodeAssignAsHomework: N
|
|
33
|
+
} = M, f = p === "TEACHER", g = T ? !1 : !h || !t || t && u, {
|
|
33
34
|
get: $,
|
|
34
35
|
isProcessed: n,
|
|
35
36
|
isProcessing: A,
|
|
36
37
|
isProcessingFailed: i,
|
|
37
38
|
isStale: R,
|
|
38
39
|
data: a
|
|
39
|
-
} =
|
|
40
|
+
} = U(), w = d(() => {
|
|
40
41
|
r && $(r, void 0, {
|
|
41
42
|
studentId: o
|
|
42
43
|
});
|
|
43
44
|
}, [o, r, $]), c = d(() => {
|
|
44
45
|
w();
|
|
45
46
|
}, [w]);
|
|
46
|
-
|
|
47
|
+
v(() => {
|
|
47
48
|
!A && (!n && !i || R) && c();
|
|
48
49
|
}, [c, n, A, i, R]);
|
|
49
50
|
const y = d(() => {
|
|
@@ -51,7 +52,7 @@ const le = D(
|
|
|
51
52
|
throw new Error("onAssignResources must be a function");
|
|
52
53
|
if (!r) throw new Error("userMilestoneId is required");
|
|
53
54
|
s(r);
|
|
54
|
-
}, [s, r]),
|
|
55
|
+
}, [s, r]), B = a && a.length > 0;
|
|
55
56
|
return i ? /* @__PURE__ */ e(
|
|
56
57
|
m,
|
|
57
58
|
{
|
|
@@ -73,34 +74,34 @@ const le = D(
|
|
|
73
74
|
)
|
|
74
75
|
] })
|
|
75
76
|
}
|
|
76
|
-
) : n ? /* @__PURE__ */ e(m, { $justifyContent: "space-between", children:
|
|
77
|
+
) : n ? /* @__PURE__ */ e(m, { $justifyContent: "space-between", children: B ? /* @__PURE__ */ l(D, { children: [
|
|
77
78
|
/* @__PURE__ */ e(
|
|
78
|
-
|
|
79
|
+
q,
|
|
79
80
|
{
|
|
80
81
|
sheets: a,
|
|
81
82
|
userType: p,
|
|
82
|
-
onNodeAttempt:
|
|
83
|
+
onNodeAttempt: S,
|
|
83
84
|
onNodeView: P,
|
|
84
|
-
onNodeReview:
|
|
85
|
-
onNodeReattempt:
|
|
86
|
-
onNodeReset:
|
|
87
|
-
onNodeUnassign:
|
|
88
|
-
onNodeAssignAsHomework:
|
|
85
|
+
onNodeReview: W,
|
|
86
|
+
onNodeReattempt: k,
|
|
87
|
+
onNodeReset: x,
|
|
88
|
+
onNodeUnassign: j,
|
|
89
|
+
onNodeAssignAsHomework: N,
|
|
89
90
|
studentId: o,
|
|
90
91
|
userMilestoneId: r
|
|
91
92
|
}
|
|
92
93
|
),
|
|
93
94
|
f && h && /* @__PURE__ */ e(
|
|
94
|
-
|
|
95
|
+
V,
|
|
95
96
|
{
|
|
96
97
|
$flexDirection: "row",
|
|
97
98
|
$justifyContent: "flex-end",
|
|
98
99
|
$gapX: 1,
|
|
99
100
|
$gutterX: 1,
|
|
100
|
-
children: /* @__PURE__ */ e(
|
|
101
|
-
|
|
101
|
+
children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
102
|
+
F,
|
|
102
103
|
{
|
|
103
|
-
Icon:
|
|
104
|
+
Icon: X,
|
|
104
105
|
renderAs: "secondary",
|
|
105
106
|
size: "small",
|
|
106
107
|
analyticsLabel: "Milestone Resource Search",
|
|
@@ -122,14 +123,14 @@ const le = D(
|
|
|
122
123
|
/* @__PURE__ */ e(E, { $isImageWrapper: !0, children: /* @__PURE__ */ e(
|
|
123
124
|
"img",
|
|
124
125
|
{
|
|
125
|
-
src:
|
|
126
|
+
src: G.BG_EMPTY_RESOURCES,
|
|
126
127
|
alt: "Empty resources",
|
|
127
128
|
width: 420,
|
|
128
129
|
height: 420
|
|
129
130
|
}
|
|
130
131
|
) }),
|
|
131
132
|
/* @__PURE__ */ e(E, { children: f ? /* @__PURE__ */ e(
|
|
132
|
-
|
|
133
|
+
z,
|
|
133
134
|
{
|
|
134
135
|
renderAs: "primary",
|
|
135
136
|
position: "bottom",
|
|
@@ -140,7 +141,7 @@ const le = D(
|
|
|
140
141
|
{
|
|
141
142
|
renderAs: "primary",
|
|
142
143
|
label: "Assign Resource",
|
|
143
|
-
Icon:
|
|
144
|
+
Icon: O,
|
|
144
145
|
shape: "square",
|
|
145
146
|
size: "small",
|
|
146
147
|
onClick: y,
|
|
@@ -151,10 +152,10 @@ const le = D(
|
|
|
151
152
|
) : /* @__PURE__ */ e(C, { $renderAs: "ab2-bold", children: "Wait for the teacher to assign a resource" }) })
|
|
152
153
|
]
|
|
153
154
|
}
|
|
154
|
-
) }) : /* @__PURE__ */ e(m, { $justifyContent: "center", $background: "WHITE", children: /* @__PURE__ */ e(
|
|
155
|
+
) }) : /* @__PURE__ */ e(m, { $justifyContent: "center", $background: "WHITE", children: /* @__PURE__ */ e(L, { height: "100%" }) });
|
|
155
156
|
}
|
|
156
157
|
);
|
|
157
158
|
export {
|
|
158
|
-
|
|
159
|
+
de as default
|
|
159
160
|
};
|
|
160
161
|
//# sourceMappingURL=resources-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-list.js","sources":["../../../../../src/features/milestone/milestone-resources/resources-list/resources-list.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport SearchIcon from '../../../../assets/line-icons/icons/search';\nimport ResourcesList from '../../../sheet-v2/resource-list/resource-list';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useGetMilestoneResources } from '../../milestone-list-container/api/get-milestone-resources';\nimport * as Styled from './resources-list-styled';\nimport type { IMilestoneWidgetResourcesProps } from './resources-list-types';\n\nconst MilestoneWidgetResources: FC<IMilestoneWidgetResourcesProps> = memo(\n function MilestoneWidgetResources(props) {\n const {\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n onAssignResources,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReset,\n onNodeUnassign,\n onNodeReattempt,\n onNodeAssignAsHomework,\n } = props;\n\n const isTeacher = userType === 'TEACHER';\n const isEPSheetCreationDisabled =\n !canUpdatePlan || !isMilestoneActive || (isMilestoneActive && isDraftMilestone);\n\n const {\n get: getMilestoneResources,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n isStale,\n data: sheets,\n } = useGetMilestoneResources();\n\n const fetchMilestoneResources = useCallback(() => {\n if (userMilestoneId) {\n getMilestoneResources(userMilestoneId, undefined, {\n studentId,\n });\n }\n }, [studentId, userMilestoneId, getMilestoneResources]);\n\n const handleOnTryAgain = useCallback(() => {\n fetchMilestoneResources();\n }, [fetchMilestoneResources]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnAssignResources = useCallback(() => {\n if (typeof onAssignResources !== 'function')\n throw new Error('onAssignResources must be a function');\n\n if (!userMilestoneId) throw new Error('userMilestoneId is required');\n\n onAssignResources(userMilestoneId);\n }, [onAssignResources, userMilestoneId]);\n\n const sheetsDataPresent = sheets && sheets.length > 0;\n\n if (isProcessingFailed) {\n return (\n <Styled.MilestoneResourcesWrapper\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <FlexView $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n if (isProcessed) {\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"space-between\">\n {sheetsDataPresent ? (\n <>\n <ResourcesList\n sheets={sheets}\n userType={userType}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n studentId={studentId}\n userMilestoneId={userMilestoneId}\n />\n\n {isTeacher && canUpdatePlan && (\n <Styled.SearchButtonWrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.SearchButtonCover>\n <IconButton\n Icon={SearchIcon}\n renderAs=\"secondary\"\n size=\"small\"\n analyticsLabel=\"Milestone Resource Search\"\n onClick={handleOnAssignResources}\n disabled={!isMilestoneActive}\n />\n </Styled.SearchButtonCover>\n </Styled.SearchButtonWrapper>\n )}\n </>\n ) : (\n <FlexView\n $width=\"100%\"\n $height=\"100%\"\n $alignItems=\"center\"\n $justifyContent=\"flex-start\"\n $background=\"WHITE\"\n >\n <Styled.DefaultWrapper $isImageWrapper>\n <img\n src={IMAGES.BG_EMPTY_RESOURCES}\n alt=\"Empty resources\"\n width={420}\n height={420}\n />\n </Styled.DefaultWrapper>\n\n <Styled.DefaultWrapper>\n {isTeacher ? (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isEPSheetCreationDisabled}\n tooltipItem={\n isDraftMilestone ? 'Allowed after plan is published' : 'Plan is completed'\n }\n >\n <Button\n renderAs=\"primary\"\n label=\"Assign Resource\"\n Icon={PlusIcon}\n shape=\"square\"\n size=\"small\"\n onClick={handleOnAssignResources}\n disabled={isEPSheetCreationDisabled}\n />\n </ArrowTooltip>\n ) : (\n <Text $renderAs=\"ab2-bold\">Wait for the teacher to assign a resource</Text>\n )}\n </Styled.DefaultWrapper>\n </FlexView>\n )}\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"center\" $background=\"WHITE\">\n <AppLoader height=\"100%\" />\n </Styled.MilestoneResourcesWrapper>\n );\n },\n);\n\nexport default MilestoneWidgetResources;\n"],"names":["MilestoneWidgetResources","memo","props","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onAssignResources","onNodeAttempt","onNodeView","onNodeReview","onNodeReset","onNodeUnassign","onNodeReattempt","onNodeAssignAsHomework","isTeacher","isEPSheetCreationDisabled","getMilestoneResources","isProcessed","isProcessing","isProcessingFailed","isStale","sheets","useGetMilestoneResources","fetchMilestoneResources","useCallback","handleOnTryAgain","useEffect","handleOnAssignResources","sheetsDataPresent","jsx","Styled.MilestoneResourcesWrapper","FlexView","Text","Button","jsxs","Fragment","ResourcesList","Styled.SearchButtonWrapper","Styled.SearchButtonCover","IconButton","SearchIcon","Styled.DefaultWrapper","IMAGES","ArrowTooltip","PlusIcon","AppLoader"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,KAA+DC;AAAA,EACnE,SAAkCC,GAAO;AACjC,UAAA;AAAA,MACJ,kBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,UAA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AAAF,EAACY,GAAA,EAAsB,iBAAe,IACpC,UAAA,gBAAAZ;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAKa,EAAO;AAAA,cACZ,KAAI;AAAA,cACJ,OAAO;AAAA,cACP,QAAQ;AAAA,YAAA;AAAA,UAAA,GAEZ;AAAA,UAEC,gBAAAb,EAAAY,GAAA,EACE,UACC3B,IAAA,gBAAAe;AAAA,YAACc;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,QAAQ,CAAC5B;AAAA,cACT,aACEf,IAAmB,oCAAoC;AAAA,cAGzD,UAAA,gBAAA6B;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,UAAS;AAAA,kBACT,OAAM;AAAA,kBACN,MAAMW;AAAA,kBACN,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,SAASjB;AAAA,kBACT,UAAUZ;AAAA,gBAAA;AAAA,cACZ;AAAA,YAAA;AAAA,UAAA,IAGD,gBAAAc,EAAAG,GAAA,EAAK,WAAU,YAAW,sDAAyC,CAAA,GAExE;AAAA,QAAA;AAAA,MAAA;AAAA,IAGN,EAAA,CAAA,IAKD,gBAAAH,EAAAC,GAAA,EAAiC,iBAAgB,UAAS,aAAY,SACrE,UAAC,gBAAAD,EAAAgB,GAAA,EAAU,QAAO,OAAO,CAAA,EAC3B,CAAA;AAAA,EAEJ;AACF;"}
|
|
1
|
+
{"version":3,"file":"resources-list.js","sources":["../../../../../src/features/milestone/milestone-resources/resources-list/resources-list.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport SearchIcon from '../../../../assets/line-icons/icons/search';\nimport ResourcesList from '../../../sheet-v2/resource-list/resource-list';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useGetMilestoneResources } from '../../milestone-list-container/api/get-milestone-resources';\nimport * as Styled from './resources-list-styled';\nimport type { IMilestoneWidgetResourcesProps } from './resources-list-types';\n\nconst MilestoneWidgetResources: FC<IMilestoneWidgetResourcesProps> = memo(\n function MilestoneWidgetResources(props) {\n const {\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n isTrialSession,\n onAssignResources,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReset,\n onNodeUnassign,\n onNodeReattempt,\n onNodeAssignAsHomework,\n } = props;\n\n const isTeacher = userType === 'TEACHER';\n const isEPSheetCreationDisabled = isTrialSession\n ? false\n : !canUpdatePlan || !isMilestoneActive || (isMilestoneActive && isDraftMilestone);\n\n const {\n get: getMilestoneResources,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n isStale,\n data: sheets,\n } = useGetMilestoneResources();\n\n const fetchMilestoneResources = useCallback(() => {\n if (userMilestoneId) {\n getMilestoneResources(userMilestoneId, undefined, {\n studentId,\n });\n }\n }, [studentId, userMilestoneId, getMilestoneResources]);\n\n const handleOnTryAgain = useCallback(() => {\n fetchMilestoneResources();\n }, [fetchMilestoneResources]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnAssignResources = useCallback(() => {\n if (typeof onAssignResources !== 'function')\n throw new Error('onAssignResources must be a function');\n\n if (!userMilestoneId) throw new Error('userMilestoneId is required');\n\n onAssignResources(userMilestoneId);\n }, [onAssignResources, userMilestoneId]);\n\n const sheetsDataPresent = sheets && sheets.length > 0;\n\n if (isProcessingFailed) {\n return (\n <Styled.MilestoneResourcesWrapper\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <FlexView $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n if (isProcessed) {\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"space-between\">\n {sheetsDataPresent ? (\n <>\n <ResourcesList\n sheets={sheets}\n userType={userType}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n studentId={studentId}\n userMilestoneId={userMilestoneId}\n />\n\n {isTeacher && canUpdatePlan && (\n <Styled.SearchButtonWrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.SearchButtonCover>\n <IconButton\n Icon={SearchIcon}\n renderAs=\"secondary\"\n size=\"small\"\n analyticsLabel=\"Milestone Resource Search\"\n onClick={handleOnAssignResources}\n disabled={!isMilestoneActive}\n />\n </Styled.SearchButtonCover>\n </Styled.SearchButtonWrapper>\n )}\n </>\n ) : (\n <FlexView\n $width=\"100%\"\n $height=\"100%\"\n $alignItems=\"center\"\n $justifyContent=\"flex-start\"\n $background=\"WHITE\"\n >\n <Styled.DefaultWrapper $isImageWrapper>\n <img\n src={IMAGES.BG_EMPTY_RESOURCES}\n alt=\"Empty resources\"\n width={420}\n height={420}\n />\n </Styled.DefaultWrapper>\n\n <Styled.DefaultWrapper>\n {isTeacher ? (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isEPSheetCreationDisabled}\n tooltipItem={\n isDraftMilestone ? 'Allowed after plan is published' : 'Plan is completed'\n }\n >\n <Button\n renderAs=\"primary\"\n label=\"Assign Resource\"\n Icon={PlusIcon}\n shape=\"square\"\n size=\"small\"\n onClick={handleOnAssignResources}\n disabled={isEPSheetCreationDisabled}\n />\n </ArrowTooltip>\n ) : (\n <Text $renderAs=\"ab2-bold\">Wait for the teacher to assign a resource</Text>\n )}\n </Styled.DefaultWrapper>\n </FlexView>\n )}\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"center\" $background=\"WHITE\">\n <AppLoader height=\"100%\" />\n </Styled.MilestoneResourcesWrapper>\n );\n },\n);\n\nexport default MilestoneWidgetResources;\n"],"names":["MilestoneWidgetResources","memo","props","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","isTrialSession","onAssignResources","onNodeAttempt","onNodeView","onNodeReview","onNodeReset","onNodeUnassign","onNodeReattempt","onNodeAssignAsHomework","isTeacher","isEPSheetCreationDisabled","getMilestoneResources","isProcessed","isProcessing","isProcessingFailed","isStale","sheets","useGetMilestoneResources","fetchMilestoneResources","useCallback","handleOnTryAgain","useEffect","handleOnAssignResources","sheetsDataPresent","jsx","Styled.MilestoneResourcesWrapper","FlexView","Text","Button","jsxs","Fragment","ResourcesList","Styled.SearchButtonWrapper","Styled.SearchButtonCover","IconButton","SearchIcon","Styled.DefaultWrapper","IMAGES","ArrowTooltip","PlusIcon","AppLoader"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,KAA+DC;AAAA,EACnE,SAAkCC,GAAO;AACjC,UAAA;AAAA,MACJ,kBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,WAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,aAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,iBA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A,UAAA,GAEZ;AAAA,UAEC,gBAAAb,EAAAY,GAAA,EACE,UACC3B,IAAA,gBAAAe;AAAA,YAACc;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,QAAQ,CAAC5B;AAAA,cACT,aACEhB,IAAmB,oCAAoC;AAAA,cAGzD,UAAA,gBAAA8B;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,UAAS;AAAA,kBACT,OAAM;AAAA,kBACN,MAAMW;AAAA,kBACN,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,SAASjB;AAAA,kBACT,UAAUZ;AAAA,gBAAA;AAAA,cACZ;AAAA,YAAA;AAAA,UAAA,IAGD,gBAAAc,EAAAG,GAAA,EAAK,WAAU,YAAW,sDAAyC,CAAA,GAExE;AAAA,QAAA;AAAA,MAAA;AAAA,IAGN,EAAA,CAAA,IAKD,gBAAAH,EAAAC,GAAA,EAAiC,iBAAgB,UAAS,aAAY,SACrE,UAAC,gBAAAD,EAAAgB,GAAA,EAAU,QAAO,OAAO,CAAA,EAC3B,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as u, jsx as e, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { IMAGES as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as e, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { memo as j, useCallback as l, useEffect as G } from "react";
|
|
3
|
+
import { IMAGES as R } from "../../../../assets/images/images.js";
|
|
4
|
+
import W from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
|
5
|
+
import $ from "../../../ui/buttons/button/button.js";
|
|
6
6
|
import T from "../../../ui/layout/flex-view.js";
|
|
7
|
-
import
|
|
7
|
+
import F from "../../../ui/loader/app-loader/app-loader.js";
|
|
8
8
|
import _ from "../../../ui/separator/separator.js";
|
|
9
9
|
import N from "../../../ui/text/text.js";
|
|
10
10
|
import { MILESTONE_WIDGET_MIN_HEIGHT as v } from "../../constants.js";
|
|
11
|
-
import { useGetTestHelpData as
|
|
12
|
-
import { TESTS_CREATION_ANALYTICS_EVENTS as
|
|
13
|
-
import
|
|
14
|
-
const
|
|
11
|
+
import { useGetTestHelpData as U } from "../../milestone-list-container/api/get-tests-list.js";
|
|
12
|
+
import { TESTS_CREATION_ANALYTICS_EVENTS as V } from "../tests-creation/tests-creation-analytics-events.js";
|
|
13
|
+
import q from "./test-list-view.js";
|
|
14
|
+
const ae = j(function(c) {
|
|
15
15
|
const {
|
|
16
16
|
isChaptersAvailable: g,
|
|
17
17
|
isDraftMilestone: E,
|
|
@@ -19,13 +19,14 @@ const se = D(function(c) {
|
|
|
19
19
|
userType: b,
|
|
20
20
|
studentId: m,
|
|
21
21
|
userMilestoneId: t,
|
|
22
|
-
canUpdatePlan: I
|
|
22
|
+
canUpdatePlan: I,
|
|
23
|
+
isTrialSession: k
|
|
23
24
|
} = c, {
|
|
24
|
-
onCreateMilestoneTest:
|
|
25
|
-
onTestPreview:
|
|
25
|
+
onCreateMilestoneTest: i,
|
|
26
|
+
onTestPreview: o,
|
|
26
27
|
onTestStart: n,
|
|
27
28
|
onTestReview: s,
|
|
28
|
-
onNodeAssignAsHomework:
|
|
29
|
+
onNodeAssignAsHomework: M
|
|
29
30
|
} = c, {
|
|
30
31
|
get: A,
|
|
31
32
|
data: r,
|
|
@@ -33,39 +34,39 @@ const se = D(function(c) {
|
|
|
33
34
|
isProcessed: f,
|
|
34
35
|
isStale: w,
|
|
35
36
|
isProcessing: C
|
|
36
|
-
} =
|
|
37
|
+
} = U(), y = k ? !1 : !I || !g || !d || d && E, O = d && !g ? "Chapters need to be assigned" : E ? "Allowed after plan is published" : "Plan is completed", h = l(() => {
|
|
37
38
|
A(t, void 0, {
|
|
38
39
|
studentId: m
|
|
39
40
|
});
|
|
40
41
|
}, [A, m, t]);
|
|
41
|
-
|
|
42
|
+
G(() => {
|
|
42
43
|
!C && (!f && !p || w) && h();
|
|
43
44
|
}, [h, f, C, p, w]);
|
|
44
|
-
const
|
|
45
|
-
if (typeof
|
|
46
|
-
|
|
45
|
+
const S = l(() => {
|
|
46
|
+
if (typeof i == "function") {
|
|
47
|
+
i == null || i(t, ((r == null ? void 0 : r.length) || 0) + 1);
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
50
|
throw new Error("No callback provided. If provided it must be a function");
|
|
50
|
-
}, [
|
|
51
|
+
}, [i, t, r]), H = l(
|
|
51
52
|
(a) => {
|
|
52
|
-
if (typeof
|
|
53
|
-
|
|
53
|
+
if (typeof o == "function") {
|
|
54
|
+
o == null || o(a, t);
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
57
|
throw new Error("No callback provided. If provided it must be a function");
|
|
57
58
|
},
|
|
58
|
-
[
|
|
59
|
-
),
|
|
60
|
-
(a,
|
|
59
|
+
[o, t]
|
|
60
|
+
), P = l(
|
|
61
|
+
(a, L, X) => {
|
|
61
62
|
if (typeof n == "function") {
|
|
62
|
-
n == null || n(a,
|
|
63
|
+
n == null || n(a, L, X);
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
66
|
throw new Error("No callback provided. If provided it must be a function");
|
|
66
67
|
},
|
|
67
68
|
[n]
|
|
68
|
-
),
|
|
69
|
+
), x = l(
|
|
69
70
|
(a) => {
|
|
70
71
|
if (typeof s == "function") {
|
|
71
72
|
s == null || s(a, t);
|
|
@@ -86,7 +87,7 @@ const se = D(function(c) {
|
|
|
86
87
|
children: [
|
|
87
88
|
/* @__PURE__ */ e(N, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
|
88
89
|
/* @__PURE__ */ e(
|
|
89
|
-
|
|
90
|
+
$,
|
|
90
91
|
{
|
|
91
92
|
widthX: 14,
|
|
92
93
|
size: "small",
|
|
@@ -99,18 +100,18 @@ const se = D(function(c) {
|
|
|
99
100
|
]
|
|
100
101
|
}
|
|
101
102
|
) : f ? r != null && r.length ? /* @__PURE__ */ e(
|
|
102
|
-
|
|
103
|
+
q,
|
|
103
104
|
{
|
|
104
105
|
...c,
|
|
105
|
-
onNodeAttempt:
|
|
106
|
-
onNodeView:
|
|
107
|
-
onNodeReview:
|
|
108
|
-
onNodeAssignAsHomework:
|
|
106
|
+
onNodeAttempt: P,
|
|
107
|
+
onNodeView: H,
|
|
108
|
+
onNodeReview: x,
|
|
109
|
+
onNodeAssignAsHomework: M,
|
|
109
110
|
milestoneId: t,
|
|
110
111
|
sheets: r,
|
|
111
112
|
userType: b,
|
|
112
113
|
studentId: m,
|
|
113
|
-
onCreateNewTest:
|
|
114
|
+
onCreateNewTest: S,
|
|
114
115
|
canUpdatedPlan: I,
|
|
115
116
|
isMilestoneActive: d
|
|
116
117
|
}
|
|
@@ -123,27 +124,27 @@ const se = D(function(c) {
|
|
|
123
124
|
$background: "WHITE",
|
|
124
125
|
$height: v,
|
|
125
126
|
children: [
|
|
126
|
-
/* @__PURE__ */ e("img", { src:
|
|
127
|
+
/* @__PURE__ */ e("img", { src: R.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
|
|
127
128
|
/* @__PURE__ */ e(_, { heightX: 2 }),
|
|
128
|
-
b === "TEACHER" ? /* @__PURE__ */ u(
|
|
129
|
+
b === "TEACHER" ? /* @__PURE__ */ u(D, { children: [
|
|
129
130
|
/* @__PURE__ */ e(
|
|
130
|
-
|
|
131
|
+
W,
|
|
131
132
|
{
|
|
132
133
|
renderAs: "primary",
|
|
133
134
|
position: "bottom",
|
|
134
135
|
hidden: !y,
|
|
135
|
-
tooltipItem:
|
|
136
|
+
tooltipItem: O,
|
|
136
137
|
children: /* @__PURE__ */ e(
|
|
137
|
-
|
|
138
|
+
$,
|
|
138
139
|
{
|
|
139
140
|
widthX: 10,
|
|
140
141
|
renderAs: "primary",
|
|
141
142
|
shape: "square",
|
|
142
143
|
size: "small",
|
|
143
144
|
label: "Create a Test",
|
|
144
|
-
onClick:
|
|
145
|
+
onClick: S,
|
|
145
146
|
disabled: y,
|
|
146
|
-
analyticsLabel:
|
|
147
|
+
analyticsLabel: V.CUSTOM_TEST_CREATION_STARTED,
|
|
147
148
|
analyticsProps: {
|
|
148
149
|
milestone_id: t
|
|
149
150
|
}
|
|
@@ -162,11 +163,11 @@ const se = D(function(c) {
|
|
|
162
163
|
$alignItems: "center",
|
|
163
164
|
$justifyContent: "center",
|
|
164
165
|
$background: "WHITE",
|
|
165
|
-
children: /* @__PURE__ */ e(
|
|
166
|
+
children: /* @__PURE__ */ e(F, { height: "100%" })
|
|
166
167
|
}
|
|
167
168
|
);
|
|
168
169
|
});
|
|
169
170
|
export {
|
|
170
|
-
|
|
171
|
+
ae as default
|
|
171
172
|
};
|
|
172
173
|
//# sourceMappingURL=test-list-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-list-container.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-container.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type FC } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\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 { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { useGetTestHelpData } from '../../milestone-list-container/api/get-tests-list';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport TestSheetsList from './test-list-view';\nimport type { ITestsListProps } from './types';\n\nconst MilestoneTestsList: FC<ITestsListProps> = memo(function MilestoneTestsList(props) {\n const {\n isChaptersAvailable,\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n } = props;\n const {\n onCreateMilestoneTest,\n onTestPreview,\n onTestStart,\n onTestReview,\n onNodeAssignAsHomework,\n } = props;\n\n const {\n get: getTestHelpData,\n data,\n isProcessingFailed,\n isProcessed,\n isStale,\n isProcessing,\n } = useGetTestHelpData();\n\n const isTestSheetCreationDisabled =\n !canUpdatePlan ||\n !isChaptersAvailable ||\n !isMilestoneActive ||\n (isMilestoneActive && isDraftMilestone);\n const testCreationCtaTooltipText =\n isMilestoneActive && !isChaptersAvailable\n ? 'Chapters need to be assigned'\n : isDraftMilestone\n ? 'Allowed after plan is published'\n : 'Plan is completed';\n\n const handleOnTryAgain = useCallback(() => {\n getTestHelpData(userMilestoneId, undefined, {\n studentId,\n });\n }, [getTestHelpData, studentId, userMilestoneId]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnCreateMilestoneTest = useCallback(() => {\n if (typeof onCreateMilestoneTest === 'function') {\n onCreateMilestoneTest?.(userMilestoneId, (data?.length || 0) + 1);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [onCreateMilestoneTest, userMilestoneId, data]);\n\n const handleOnTestPreview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestPreview === 'function') {\n onTestPreview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestPreview, userMilestoneId],\n );\n\n const handleOnTestStart = useCallback(\n (sheetData: INodeDataProps, milestoneId?: string, hwId?: string) => {\n if (typeof onTestStart === 'function') {\n onTestStart?.(sheetData, milestoneId, hwId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestStart],\n );\n\n const handleOnTestReview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestReview === 'function') {\n onTestReview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestReview, userMilestoneId],\n );\n\n if (isProcessingFailed) {\n return (\n <FlexView\n $flexGapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100%\"\n $background=\"WHITE\"\n >\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n );\n }\n\n if (isProcessed) {\n if (data?.length) {\n return (\n <TestSheetsList\n {...props}\n onNodeAttempt={handleOnTestStart}\n onNodeView={handleOnTestPreview}\n onNodeReview={handleOnTestReview}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n milestoneId={userMilestoneId}\n sheets={data}\n userType={userType}\n studentId={studentId}\n onCreateNewTest={handleOnCreateMilestoneTest}\n canUpdatedPlan={canUpdatePlan}\n isMilestoneActive={isMilestoneActive}\n />\n );\n }\n\n return (\n <FlexView\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isTestSheetCreationDisabled}\n tooltipItem={testCreationCtaTooltipText}\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Create a Test\"\n onClick={handleOnCreateMilestoneTest}\n disabled={isTestSheetCreationDisabled}\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n analyticsProps={{\n milestone_id: userMilestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to create a test\n </Text>\n )}\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <AppLoader height=\"100%\" />\n </FlexView>\n );\n});\n\nexport default MilestoneTestsList;\n"],"names":["MilestoneTestsList","memo","props","isChaptersAvailable","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onCreateMilestoneTest","onTestPreview","onTestStart","onTestReview","onNodeAssignAsHomework","getTestHelpData","data","isProcessingFailed","isProcessed","isStale","isProcessing","useGetTestHelpData","isTestSheetCreationDisabled","testCreationCtaTooltipText","handleOnTryAgain","useCallback","useEffect","handleOnCreateMilestoneTest","handleOnTestPreview","sheetData","handleOnTestStart","milestoneId","hwId","handleOnTestReview","jsxs","FlexView","jsx","Text","Button","TestSheetsList","MILESTONE_WIDGET_MIN_HEIGHT","IMAGES","Separator","Fragment","ArrowTooltip","TESTS_CREATION_ANALYTICS_EVENTS","AppLoader"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,KAA0CC,EAAK,SAA4BC,GAAO;AAChF,QAAA;AAAA,IACJ,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,EACE,IAAAP,GACE;AAAA,IACJ,uBAAAQ;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,wBAAAC;AAAA,EACE,IAAAZ,GAEE;AAAA,IACJ,KAAKa;AAAA,IACL,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,MACEC,EAAmB,GAEjBC,IACJ,CAACb,KACD,CAACN,KACD,CAACE,KACAA,KAAqBD,GAClBmB,IACJlB,KAAqB,CAACF,IAClB,iCACAC,IACE,oCACA,qBAEFoB,IAAmBC,EAAY,M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Eb,UAAA,gBAAAa;AAAA,gBAACE;AAAA,gBAAA;AAAA,kBACC,QAAQ;AAAA,kBACR,UAAS;AAAA,kBACT,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,OAAM;AAAA,kBACN,SAASX;AAAA,kBACT,UAAUL;AAAA,kBACV,gBAAgBuB,EAAgC;AAAA,kBAChD,gBAAgB;AAAA,oBACd,cAAcrC;AAAA,kBAChB;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAA4B,EAACM,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QAAA,EAAA,CACzB,IAEC,gBAAAN,EAAAC,GAAA,EAAK,WAAU,YAAW,QAAO,cAAa,UAE/C,yCAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAON,gBAAAD;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,SAASK;AAAA,MACT,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEZ,UAAA,gBAAAJ,EAACU,GAAU,EAAA,QAAO,OAAO,CAAA;AAAA,IAAA;AAAA,EAAA;AAG/B,CAAC;"}
|
|
1
|
+
{"version":3,"file":"test-list-container.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-container.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type FC } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\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 { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { useGetTestHelpData } from '../../milestone-list-container/api/get-tests-list';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport TestSheetsList from './test-list-view';\nimport type { ITestsListProps } from './types';\n\nconst MilestoneTestsList: FC<ITestsListProps> = memo(function MilestoneTestsList(props) {\n const {\n isChaptersAvailable,\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n isTrialSession,\n } = props;\n const {\n onCreateMilestoneTest,\n onTestPreview,\n onTestStart,\n onTestReview,\n onNodeAssignAsHomework,\n } = props;\n\n const {\n get: getTestHelpData,\n data,\n isProcessingFailed,\n isProcessed,\n isStale,\n isProcessing,\n } = useGetTestHelpData();\n\n const isTestSheetCreationDisabled = isTrialSession\n ? false\n : !canUpdatePlan ||\n !isChaptersAvailable ||\n !isMilestoneActive ||\n (isMilestoneActive && isDraftMilestone);\n const testCreationCtaTooltipText =\n isMilestoneActive && !isChaptersAvailable\n ? 'Chapters need to be assigned'\n : isDraftMilestone\n ? 'Allowed after plan is published'\n : 'Plan is completed';\n\n const handleOnTryAgain = useCallback(() => {\n getTestHelpData(userMilestoneId, undefined, {\n studentId,\n });\n }, [getTestHelpData, studentId, userMilestoneId]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnCreateMilestoneTest = useCallback(() => {\n if (typeof onCreateMilestoneTest === 'function') {\n onCreateMilestoneTest?.(userMilestoneId, (data?.length || 0) + 1);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [onCreateMilestoneTest, userMilestoneId, data]);\n\n const handleOnTestPreview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestPreview === 'function') {\n onTestPreview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestPreview, userMilestoneId],\n );\n\n const handleOnTestStart = useCallback(\n (sheetData: INodeDataProps, milestoneId?: string, hwId?: string) => {\n if (typeof onTestStart === 'function') {\n onTestStart?.(sheetData, milestoneId, hwId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestStart],\n );\n\n const handleOnTestReview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestReview === 'function') {\n onTestReview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestReview, userMilestoneId],\n );\n\n if (isProcessingFailed) {\n return (\n <FlexView\n $flexGapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100%\"\n $background=\"WHITE\"\n >\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n );\n }\n\n if (isProcessed) {\n if (data?.length) {\n return (\n <TestSheetsList\n {...props}\n onNodeAttempt={handleOnTestStart}\n onNodeView={handleOnTestPreview}\n onNodeReview={handleOnTestReview}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n milestoneId={userMilestoneId}\n sheets={data}\n userType={userType}\n studentId={studentId}\n onCreateNewTest={handleOnCreateMilestoneTest}\n canUpdatedPlan={canUpdatePlan}\n isMilestoneActive={isMilestoneActive}\n />\n );\n }\n\n return (\n <FlexView\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isTestSheetCreationDisabled}\n tooltipItem={testCreationCtaTooltipText}\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Create a Test\"\n onClick={handleOnCreateMilestoneTest}\n disabled={isTestSheetCreationDisabled}\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n analyticsProps={{\n milestone_id: userMilestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to create a test\n </Text>\n )}\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <AppLoader height=\"100%\" />\n </FlexView>\n );\n});\n\nexport default MilestoneTestsList;\n"],"names":["MilestoneTestsList","memo","props","isChaptersAvailable","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","isTrialSession","onCreateMilestoneTest","onTestPreview","onTestStart","onTestReview","onNodeAssignAsHomework","getTestHelpData","data","isProcessingFailed","isProcessed","isStale","isProcessing","useGetTestHelpData","isTestSheetCreationDisabled","testCreationCtaTooltipText","handleOnTryAgain","useCallback","useEffect","handleOnCreateMilestoneTest","handleOnTestPreview","sheetData","handleOnTestStart","milestoneId","hwId","handleOnTestReview","jsxs","FlexView","jsx","Text","Button","TestSheetsList","MILESTONE_WIDGET_MIN_HEIGHT","IMAGES","Separator","Fragment","ArrowTooltip","TESTS_CREATION_ANALYTICS_EVENTS","AppLoader"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,KAA0CC,EAAK,SAA4BC,GAAO;AAChF,QAAA;AAAA,IACJ,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,EACE,IAAAR,GACE;AAAA,IACJ,uBAAAS;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,wBAAAC;AAA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