@cuemath/leap 3.5.46 → 3.5.47-gg10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/assets/line-icons/icons/bulb.js +10 -10
  2. package/dist/assets/line-icons/icons/bulb.js.map +1 -1
  3. package/dist/assets/line-icons/icons/chevron-up.js +28 -0
  4. package/dist/assets/line-icons/icons/chevron-up.js.map +1 -0
  5. package/dist/assets/line-icons/icons/close.js +28 -0
  6. package/dist/assets/line-icons/icons/close.js.map +1 -0
  7. package/dist/assets/line-icons/icons/cursor2.js +24 -0
  8. package/dist/assets/line-icons/icons/cursor2.js.map +1 -0
  9. package/dist/assets/line-icons/icons/hand.js.map +1 -1
  10. package/dist/assets/line-icons/icons/hints.js +25 -0
  11. package/dist/assets/line-icons/icons/hints.js.map +1 -0
  12. package/dist/assets/line-icons/icons/question-feedback.js +30 -0
  13. package/dist/assets/line-icons/icons/question-feedback.js.map +1 -0
  14. package/dist/assets/line-icons/icons/scribble.js +13 -36
  15. package/dist/assets/line-icons/icons/scribble.js.map +1 -1
  16. package/dist/assets/line-icons/icons/sticker.js +9 -9
  17. package/dist/assets/line-icons/icons/sticker.js.map +1 -1
  18. package/dist/assets/line-icons/icons/teaching-tools.js +40 -0
  19. package/dist/assets/line-icons/icons/teaching-tools.js.map +1 -0
  20. package/dist/assets/line-icons/icons/tval-question.js +32 -0
  21. package/dist/assets/line-icons/icons/tval-question.js.map +1 -0
  22. package/dist/features/circle-games/hooks/use-circle-sounds/constants.js +4 -7
  23. package/dist/features/circle-games/hooks/use-circle-sounds/constants.js.map +1 -1
  24. package/dist/features/circle-games/hooks/use-circle-sounds/helper.js +19 -0
  25. package/dist/features/circle-games/hooks/use-circle-sounds/helper.js.map +1 -0
  26. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +110 -51
  27. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
  28. package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +1 -1
  29. package/dist/features/hooks/use-audio-player.js +54 -0
  30. package/dist/features/hooks/use-audio-player.js.map +1 -0
  31. package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +6 -6
  32. package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
  33. package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js +2 -2
  34. package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js.map +1 -1
  35. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +64 -29
  36. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
  37. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +9 -9
  38. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
  39. package/dist/features/puzzles/app/puzzle-app-view.js +40 -40
  40. package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -1
  41. package/dist/features/ui/tabs/tabs.js +15 -15
  42. package/dist/features/ui/tabs/tabs.js.map +1 -1
  43. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js +0 -1
  44. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
  45. package/dist/features/worksheet/worksheet/constants.js +12 -13
  46. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  47. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +120 -101
  48. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
  49. package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js +1 -1
  50. package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js.map +1 -1
  51. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +40 -109
  52. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
  53. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +49 -46
  54. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
  55. package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js +4 -4
  56. package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js.map +1 -1
  57. package/dist/features/worksheet/worksheet/worksheet-helpers.js +127 -274
  58. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  59. package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js +25 -25
  60. package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js.map +1 -1
  61. package/dist/features/worksheet/worksheet/worksheet-provider.js +1 -1
  62. package/dist/features/worksheet/worksheet/worksheet-provider.js.map +1 -1
  63. package/dist/features/worksheet/worksheet/worksheet-question/subjective-styled.js +17 -22
  64. package/dist/features/worksheet/worksheet/worksheet-question/subjective-styled.js.map +1 -1
  65. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +25 -29
  66. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  67. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +319 -259
  68. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  69. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-allow-retry-button-click.js +15 -0
  70. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-allow-retry-button-click.js.map +1 -0
  71. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-back-button-click.js +18 -0
  72. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-back-button-click.js.map +1 -0
  73. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-check-button-click.js +21 -0
  74. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-check-button-click.js.map +1 -0
  75. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-next-button-click.js +19 -0
  76. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-next-button-click.js.map +1 -0
  77. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-ready-button-click.js +34 -0
  78. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-ready-button-click.js.map +1 -0
  79. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-response-change.js +38 -0
  80. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-response-change.js.map +1 -0
  81. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-retry-button-click.js +16 -0
  82. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-retry-button-click.js.map +1 -0
  83. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-button-click.js +35 -0
  84. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-button-click.js.map +1 -0
  85. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-section-button-click.js +12 -0
  86. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-skip-section-button-click.js.map +1 -0
  87. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-start-button-click.js +44 -0
  88. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-start-button-click.js.map +1 -0
  89. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-submit-quiz.js +51 -0
  90. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-submit-quiz.js.map +1 -0
  91. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-validate-button-click.js +19 -0
  92. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-handle-validate-button-click.js.map +1 -0
  93. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-play-validation-audio.js +23 -0
  94. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-play-validation-audio.js.map +1 -0
  95. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-validate-question.js +36 -0
  96. package/dist/features/worksheet/worksheet/worksheet-questions-controller/hooks/use-validate-question.js.map +1 -0
  97. package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3.js +184 -0
  98. package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3.js.map +1 -0
  99. package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3_1.js +258 -0
  100. package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller-lesson-v3_1.js.map +1 -0
  101. package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller.js +180 -0
  102. package/dist/features/worksheet/worksheet/worksheet-questions-controller/student/controller.js.map +1 -0
  103. package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3.js +77 -0
  104. package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3.js.map +1 -0
  105. package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3_1.js +103 -0
  106. package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller-lesson-v3_1.js.map +1 -0
  107. package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller.js +21 -0
  108. package/dist/features/worksheet/worksheet/worksheet-questions-controller/teacher/controller.js.map +1 -0
  109. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller-view.js +22 -0
  110. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller-view.js.map +1 -0
  111. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +20 -345
  112. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  113. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar-styled.js +49 -0
  114. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar-styled.js.map +1 -0
  115. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar.js +184 -0
  116. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar.js.map +1 -0
  117. package/dist/features/worksheet/worksheet/worksheet-questions-tools/scribble-switch.js +65 -0
  118. package/dist/features/worksheet/worksheet/worksheet-questions-tools/scribble-switch.js.map +1 -0
  119. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-styled.js +9 -0
  120. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-styled.js.map +1 -0
  121. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-tools.js +38 -0
  122. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-tools.js.map +1 -0
  123. package/dist/features/worksheet/worksheet/worksheet-sidebar/navigator.js +33 -20
  124. package/dist/features/worksheet/worksheet/worksheet-sidebar/navigator.js.map +1 -1
  125. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js +73 -0
  126. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js.map +1 -0
  127. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-derived-blocker.js +20 -0
  128. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-derived-blocker.js.map +1 -0
  129. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-attemptable-question-index.js +69 -0
  130. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-attemptable-question-index.js.map +1 -0
  131. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-unlocked-question-index.js +18 -0
  132. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-last-unlocked-question-index.js.map +1 -0
  133. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-merged-response-state.js +19 -0
  134. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-merged-response-state.js.map +1 -0
  135. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js +138 -0
  136. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js.map +1 -0
  137. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-renderable-questions.js +9 -0
  138. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-renderable-questions.js.map +1 -0
  139. package/dist/features/worksheet/worksheet/worksheet-store/worksheet-store.js +230 -0
  140. package/dist/features/worksheet/worksheet/worksheet-store/worksheet-store.js.map +1 -0
  141. package/dist/features/worksheet/worksheet/worksheet-styled.js +29 -83
  142. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  143. package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js +45 -24
  144. package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js.map +1 -1
  145. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.js +19 -0
  146. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.js.map +1 -0
  147. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js +66 -0
  148. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js.map +1 -0
  149. package/dist/features/worksheet/worksheet/worksheet-types.js +3 -2
  150. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  151. package/dist/features/worksheet/worksheet/worksheet-view.js +89 -100
  152. package/dist/features/worksheet/worksheet/worksheet-view.js.map +1 -1
  153. package/dist/features/worksheet/worksheet/worksheet.js +126 -117
  154. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  155. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +29 -29
  156. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
  157. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +16 -16
  158. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  159. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +24 -24
  160. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  161. package/dist/index.d.ts +67 -28
  162. package/dist/index.js +760 -745
  163. package/dist/index.js.map +1 -1
  164. package/dist/types/models/worksheet.js +2 -1
  165. package/dist/types/models/worksheet.js.map +1 -1
  166. package/package.json +2 -2
  167. package/dist/features/hooks/use-audio-player/use-audio-player.js +0 -164
  168. package/dist/features/hooks/use-audio-player/use-audio-player.js.map +0 -1
  169. package/dist/features/worksheet/worksheet/question-tips.js +0 -100
  170. package/dist/features/worksheet/worksheet/question-tips.js.map +0 -1
  171. package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js +0 -53
  172. package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js.map +0 -1
  173. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +0 -195
  174. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +0 -1
  175. package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js +0 -112
  176. package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js.map +0 -1
  177. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +0 -61
  178. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +0 -1
  179. package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js +0 -91
  180. package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js.map +0 -1
  181. package/dist/features/worksheet/worksheet/worksheet-store.js +0 -289
  182. package/dist/features/worksheet/worksheet/worksheet-store.js.map +0 -1
@@ -1,70 +1,42 @@
1
1
  import t from "styled-components";
2
- import i from "../../ui/layout/flex-view.js";
3
- import { WORKSHEET_CONTAINER_BORDER_RADIUS as n, TOP_NAVIGATION_HEIGHT as d, ACTION_BAR_HEIGHT as p, SIDEBAR_WIDTH as c } from "./constants.js";
4
- t(i)(({ $topOffset: o }) => `
5
- position: sticky;
6
- top: ${o}px;
7
- z-index: 1;
8
- `);
9
- t.div(({ theme: o }) => {
10
- const { colors: r } = o;
11
- return `
12
- width: 16px;
13
- height: 16px;
14
- border-radius: 32px;
15
- border: 0.667px solid ${r.BLACK_T_87}
16
- `;
17
- });
18
- const b = t(i)`
2
+ import r from "../../ui/layout/flex-view.js";
3
+ import { WORKSHEET_CONTAINER_BORDER_RADIUS as e, TOP_NAVIGATION_HEIGHT as s, ACTION_BAR_HEIGHT as n } from "./constants.js";
4
+ const a = t(r)`
19
5
  position: relative;
20
- `, $ = t(i)(
21
- ({ theme: o, $topOffset: r }) => `
6
+ `, d = t(r)(
7
+ ({ theme: o, $topOffset: i }) => `
22
8
  position: sticky;
23
- top: ${r}px;
9
+ top: ${i}px;
24
10
  width: 100%;
25
11
  z-index: 1;
26
12
  justify-content: flex-end;
27
13
  background-color: ${o.colors.WHITE};
28
14
  `
29
- ), g = t(i)`
15
+ ), b = t(r)`
30
16
  border: 1px solid ${({ theme: o }) => o.colors.GREY_2};
31
17
  border-top: 0px;
32
- border-radius: ${n}px ${n}px 0 0;
18
+ border-radius: ${e}px ${e}px 0 0;
33
19
  overflow: hidden;
34
- `, u = t(i)(
35
- ({ theme: { colors: o }, $height: r, $isCardView: e, $marginTop: s }) => `
20
+ `, $ = t(r)(
21
+ ({ $height: o, $marginTop: i }) => `
36
22
  position: sticky;
37
- top: calc(100% - ${r}px);
38
- margin-top: -${s}px;
23
+ top: calc(100% - ${o}px - 16px);
24
+ margin-top: -${i}px;
39
25
  z-index: 1;
40
- ${e ? `
41
- border-left: 1px solid ${o.GREY_2};
42
- border-right: 1px solid ${o.GREY_2};
43
- ` : ""}
44
- `
45
- ), E = t(i)(
46
- ({ theme: { colors: o }, $isCardView: r }) => `
26
+ pointer-events: none;
47
27
  align-items: center;
48
28
  justify-content: center;
49
29
  align-self: center;
50
- background-color: ${o.WHITE};
51
- border-top: 1px solid ${o.GREY_2};
52
- ${r ? `
53
- border-left: 1px solid ${o.GREY_2};
54
- border-right: 1px solid ${o.GREY_2};
55
- border-top-left-radius: 8px;
56
- border-top-right-radius: 8px;
57
- ` : ""}
58
30
  `
59
- ), _ = t(i)(
60
- ({ theme: o, $minHeight: r, $topOffset: e }) => `
31
+ ), f = t(r)(
32
+ ({ theme: o, $minHeight: i, $topOffset: p }) => `
61
33
  box-sizing: content-box;
62
34
  position: sticky;
63
35
  width: calc(100% - 2px);
64
- top: ${e + d}px;
36
+ top: ${p + s}px;
65
37
  z-index: 2;
66
- min-height: ${r}${typeof r == "number" ? "px" : ""};
67
- padding-bottom: ${p / 2}px;
38
+ min-height: ${i}${typeof i == "number" ? "px" : ""};
39
+ padding-bottom: ${n / 2}px;
68
40
  background-color: ${o.colors.WHITE_70};
69
41
  border-left: 1px solid ${o.colors.GREY_2};
70
42
  border-right: 1px solid ${o.colors.GREY_2};
@@ -76,50 +48,24 @@ const b = t(i)`
76
48
  box-sizing: border-box;
77
49
  }
78
50
  `
79
- ), f = t(i)`
51
+ ), m = t(r)`
80
52
  position: absolute;
81
53
  width: 100%;
82
- bottom: ${p}px;
54
+ bottom: ${n}px;
83
55
  left: 0;
84
- `, I = t(i)(({ theme: o }) => `
56
+ `, g = t(r)(({ theme: o }) => `
85
57
  position: sticky;
86
58
  top: 0;
87
59
  left: 0;
88
60
  z-index: ${o.zIndex.DESMOS_CALCULATOR};
89
- `), h = t(i)(
90
- ({ theme: o, $active: r }) => `
91
- width: 36px;
92
- height: 36px;
93
- border-radius: 50%;
94
- &:hover {
95
- cursor: pointer;
96
- background-color: ${o.colors.BLACK};
97
- svg path {
98
- stroke: ${o.colors.WHITE};
99
- }
100
- }
101
- background-color: ${r ? o.colors.BLACK : o.colors.WHITE};
102
- svg path {
103
- stroke: ${r ? o.colors.WHITE : o.colors.BLACK};
104
- }
105
- `
106
- ), k = t(i)`
107
- position: absolute;
108
- bottom: 8px;
109
- right: -${c}px;
110
- align-items: center;
111
- z-index: 1;
112
- `;
61
+ `);
113
62
  export {
114
- u as ActionbarContainer,
115
- E as ActionbarWrapper,
116
- _ as BlockerWrapper,
117
- I as DesmosCalcWrapper,
118
- h as IconContainer,
119
- $ as NavigationContainer,
120
- g as NavigationWrapper,
121
- k as StudentWorksheetSideBar,
122
- f as SummaryWrapper,
123
- b as WorksheetContainer
63
+ $ as ActionbarContainer,
64
+ f as BlockerWrapper,
65
+ g as DesmosCalcWrapper,
66
+ d as NavigationContainer,
67
+ b as NavigationWrapper,
68
+ m as SummaryWrapper,
69
+ a as WorksheetContainer
124
70
  };
125
71
  //# sourceMappingURL=worksheet-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-styled.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport {\n ACTION_BAR_HEIGHT,\n SIDEBAR_WIDTH,\n TOP_NAVIGATION_HEIGHT,\n WORKSHEET_CONTAINER_BORDER_RADIUS,\n} from './constants';\n\nconst NudgeBannerWrapper = styled(FlexView)<{ $topOffset: number }>(({ $topOffset }) => {\n return `\n position: sticky;\n top: ${$topOffset}px;\n z-index: 1;\n `;\n});\n\nconst NudgeBannerIcon = styled.div(({ theme }) => {\n const { colors } = theme;\n\n return `\n width: 16px;\n height: 16px;\n border-radius: 32px;\n border: 0.667px solid ${colors.BLACK_T_87}\n `;\n});\n\nconst WorksheetContainer = styled(FlexView)`\n position: relative;\n`;\n\nconst NavigationContainer = styled(FlexView)<{ $topOffset: number }>(\n ({ theme, $topOffset }) => `\n position: sticky;\n top: ${$topOffset}px;\n width: 100%;\n z-index: 1;\n justify-content: flex-end;\n background-color: ${theme.colors.WHITE};\n`,\n);\n\nconst NavigationWrapper = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.GREY_2};\n border-top: 0px;\n border-radius: ${WORKSHEET_CONTAINER_BORDER_RADIUS}px ${WORKSHEET_CONTAINER_BORDER_RADIUS}px 0 0;\n overflow: hidden;\n`;\n\nconst ActionbarContainer = styled(FlexView)<{\n $isCardView: boolean;\n $marginTop: string | number;\n}>(\n ({ theme: { colors }, $height, $isCardView, $marginTop }) => `\n position: sticky;\n top: calc(100% - ${$height}px);\n margin-top: -${$marginTop}px;\n z-index: 1;\n ${\n $isCardView\n ? `\n border-left: 1px solid ${colors.GREY_2};\n border-right: 1px solid ${colors.GREY_2};\n `\n : ''\n }\n `,\n);\n\nconst ActionbarWrapper = styled(FlexView)<{ $isCardView: boolean }>(\n ({ theme: { colors }, $isCardView }) => `\n align-items: center;\n justify-content: center;\n align-self: center;\n background-color: ${colors.WHITE};\n border-top: 1px solid ${colors.GREY_2};\n ${\n $isCardView\n ? `\n border-left: 1px solid ${colors.GREY_2};\n border-right: 1px solid ${colors.GREY_2};\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n `\n : ''\n }\n `,\n);\n\ninterface IBlockerWrapperProps {\n $minHeight: number | string;\n $topOffset: number;\n}\n\nconst BlockerWrapper = styled(FlexView)<IBlockerWrapperProps>(\n ({ theme, $minHeight, $topOffset }) => `\n box-sizing: content-box;\n position: sticky;\n width: calc(100% - 2px);\n top: ${$topOffset + TOP_NAVIGATION_HEIGHT}px;\n z-index: 2;\n min-height: ${$minHeight}${typeof $minHeight === 'number' ? 'px' : ''};\n padding-bottom: ${ACTION_BAR_HEIGHT / 2}px;\n background-color: ${theme.colors.WHITE_70};\n border-left: 1px solid ${theme.colors.GREY_2};\n border-right: 1px solid ${theme.colors.GREY_2};\n backdrop-filter: blur(7px);\n align-items: center;\n justify-content: center;\n\n & * {\n box-sizing: border-box;\n }\n`,\n);\n\nconst SummaryWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n bottom: ${ACTION_BAR_HEIGHT}px;\n left: 0;\n`;\n\nconst DesmosCalcWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: 0;\n left: 0;\n z-index: ${theme.zIndex.DESMOS_CALCULATOR};\n `;\n});\n\nconst IconContainer = styled(FlexView)<{ $active: boolean }>(\n ({ theme, $active }) => `\n width: 36px;\n height: 36px;\n border-radius: 50%;\n &:hover {\n cursor: pointer;\n background-color: ${theme.colors.BLACK};\n svg path {\n stroke: ${theme.colors.WHITE};\n }\n }\n background-color: ${$active ? theme.colors.BLACK : theme.colors.WHITE};\n svg path {\n stroke: ${$active ? theme.colors.WHITE : theme.colors.BLACK};\n }\n`,\n);\n\nconst StudentWorksheetSideBar = styled(FlexView)`\n position: absolute;\n bottom: 8px;\n right: -${SIDEBAR_WIDTH}px;\n align-items: center;\n z-index: 1;\n`;\n\nexport {\n NudgeBannerWrapper,\n NudgeBannerIcon,\n WorksheetContainer,\n NavigationContainer,\n ActionbarContainer,\n NavigationWrapper,\n ActionbarWrapper,\n BlockerWrapper,\n SummaryWrapper,\n IconContainer,\n DesmosCalcWrapper,\n StudentWorksheetSideBar,\n};\n"],"names":["styled","FlexView","$topOffset","theme","colors","WorksheetContainer","NavigationContainer","NavigationWrapper","WORKSHEET_CONTAINER_BORDER_RADIUS","ActionbarContainer","$height","$isCardView","$marginTop","ActionbarWrapper","BlockerWrapper","$minHeight","TOP_NAVIGATION_HEIGHT","ACTION_BAR_HEIGHT","SummaryWrapper","DesmosCalcWrapper","IconContainer","$active","StudentWorksheetSideBar","SIDEBAR_WIDTH"],"mappings":";;;AAU2BA,EAAOC,CAAQ,EAA0B,CAAC,EAAE,YAAAC,QAC9D;AAAA;AAAA,WAEEA,CAAU;AAAA;AAAA,GAGpB;AAEuBF,EAAO,IAAI,CAAC,EAAE,OAAAG,QAAY;AAC1C,QAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA,4BAImBC,EAAO,UAAU;AAAA;AAE7C,CAAC;AAEK,MAAAC,IAAqBL,EAAOC,CAAQ;AAAA;AAAA,GAIpCK,IAAsBN,EAAOC,CAAQ;AAAA,EACzC,CAAC,EAAE,OAAAE,GAAO,YAAAD,EAAA,MAAiB;AAAA;AAAA,SAEpBA,CAAU;AAAA;AAAA;AAAA;AAAA,sBAIGC,EAAM,OAAO,KAAK;AAAA;AAExC,GAEMI,IAAoBP,EAAOC,CAAQ;AAAA,sBACnB,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,MAAM;AAAA;AAAA,mBAErCK,CAAiC,MAAMA,CAAiC;AAAA;AAAA,GAIrFC,IAAqBT,EAAOC,CAAQ;AAAA,EAIxC,CAAC,EAAE,OAAO,EAAE,QAAAG,KAAU,SAAAM,GAAS,aAAAC,GAAa,YAAAC,EAAA,MAAiB;AAAA;AAAA,qBAE1CF,CAAO;AAAA,iBACXE,CAAU;AAAA;AAAA,IAGvBD,IACI;AAAA,mCAC2BP,EAAO,MAAM;AAAA,oCACZA,EAAO,MAAM;AAAA,YAEzC,EACN;AAAA;AAEF,GAEMS,IAAmBb,EAAOC,CAAQ;AAAA,EACtC,CAAC,EAAE,OAAO,EAAE,QAAAG,EAAO,GAAG,aAAAO,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,sBAIpBP,EAAO,KAAK;AAAA,0BACRA,EAAO,MAAM;AAAA,IAEnCO,IACI;AAAA,mCAC2BP,EAAO,MAAM;AAAA,oCACZA,EAAO,MAAM;AAAA;AAAA;AAAA,YAIzC,EACN;AAAA;AAEF,GAOMU,IAAiBd,EAAOC,CAAQ;AAAA,EACpC,CAAC,EAAE,OAAAE,GAAO,YAAAY,GAAY,YAAAb,EAAiB,MAAA;AAAA;AAAA;AAAA;AAAA,SAIhCA,IAAac,CAAqB;AAAA;AAAA,gBAE3BD,CAAU,GAAG,OAAOA,KAAe,WAAW,OAAO,EAAE;AAAA,oBACnDE,IAAoB,CAAC;AAAA,sBACnBd,EAAM,OAAO,QAAQ;AAAA,2BAChBA,EAAM,OAAO,MAAM;AAAA,4BAClBA,EAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/C,GAEMe,IAAiBlB,EAAOC,CAAQ;AAAA;AAAA;AAAA,YAG1BgB,CAAiB;AAAA;AAAA,GAIvBE,IAAoBnB,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QACrC;AAAA;AAAA;AAAA;AAAA,eAIMA,EAAM,OAAO,iBAAiB;AAAA,GAE5C,GAEKiB,IAAgBpB,EAAOC,CAAQ;AAAA,EACnC,CAAC,EAAE,OAAAE,GAAO,SAAAkB,EAAA,MAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMFlB,EAAM,OAAO,KAAK;AAAA;AAAA,gBAE1BA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA,sBAGZkB,IAAUlB,EAAM,OAAO,QAAQA,EAAM,OAAO,KAAK;AAAA;AAAA,cAEzDkB,IAAUlB,EAAM,OAAO,QAAQA,EAAM,OAAO,KAAK;AAAA;AAAA;AAG/D,GAEMmB,IAA0BtB,EAAOC,CAAQ;AAAA;AAAA;AAAA,YAGnCsB,CAAa;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"worksheet-styled.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport {\n ACTION_BAR_HEIGHT,\n TOP_NAVIGATION_HEIGHT,\n WORKSHEET_CONTAINER_BORDER_RADIUS,\n} from './constants';\n\nconst WorksheetContainer = styled(FlexView)`\n position: relative;\n`;\n\nconst NavigationContainer = styled(FlexView)<{ $topOffset: number }>(\n ({ theme, $topOffset }) => `\n position: sticky;\n top: ${$topOffset}px;\n width: 100%;\n z-index: 1;\n justify-content: flex-end;\n background-color: ${theme.colors.WHITE};\n`,\n);\n\nconst NavigationWrapper = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.GREY_2};\n border-top: 0px;\n border-radius: ${WORKSHEET_CONTAINER_BORDER_RADIUS}px ${WORKSHEET_CONTAINER_BORDER_RADIUS}px 0 0;\n overflow: hidden;\n`;\n\nconst ActionbarContainer = styled(FlexView)<{\n $marginTop: string | number;\n}>(\n ({ $height, $marginTop }) => `\n position: sticky;\n top: calc(100% - ${$height}px - 16px);\n margin-top: -${$marginTop}px;\n z-index: 1;\n pointer-events: none;\n align-items: center;\n justify-content: center;\n align-self: center;\n `,\n);\n\ninterface IBlockerWrapperProps {\n $minHeight: number | string;\n $topOffset: number;\n}\n\nconst BlockerWrapper = styled(FlexView)<IBlockerWrapperProps>(\n ({ theme, $minHeight, $topOffset }) => `\n box-sizing: content-box;\n position: sticky;\n width: calc(100% - 2px);\n top: ${$topOffset + TOP_NAVIGATION_HEIGHT}px;\n z-index: 2;\n min-height: ${$minHeight}${typeof $minHeight === 'number' ? 'px' : ''};\n padding-bottom: ${ACTION_BAR_HEIGHT / 2}px;\n background-color: ${theme.colors.WHITE_70};\n border-left: 1px solid ${theme.colors.GREY_2};\n border-right: 1px solid ${theme.colors.GREY_2};\n backdrop-filter: blur(7px);\n align-items: center;\n justify-content: center;\n\n & * {\n box-sizing: border-box;\n }\n`,\n);\n\nconst SummaryWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n bottom: ${ACTION_BAR_HEIGHT}px;\n left: 0;\n`;\n\nconst DesmosCalcWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: 0;\n left: 0;\n z-index: ${theme.zIndex.DESMOS_CALCULATOR};\n `;\n});\n\nexport {\n WorksheetContainer,\n NavigationContainer,\n ActionbarContainer,\n NavigationWrapper,\n BlockerWrapper,\n SummaryWrapper,\n DesmosCalcWrapper,\n};\n"],"names":["WorksheetContainer","styled","FlexView","NavigationContainer","theme","$topOffset","NavigationWrapper","WORKSHEET_CONTAINER_BORDER_RADIUS","ActionbarContainer","$height","$marginTop","BlockerWrapper","$minHeight","TOP_NAVIGATION_HEIGHT","ACTION_BAR_HEIGHT","SummaryWrapper","DesmosCalcWrapper"],"mappings":";;;AASM,MAAAA,IAAqBC,EAAOC,CAAQ;AAAA;AAAA,GAIpCC,IAAsBF,EAAOC,CAAQ;AAAA,EACzC,CAAC,EAAE,OAAAE,GAAO,YAAAC,EAAA,MAAiB;AAAA;AAAA,SAEpBA,CAAU;AAAA;AAAA;AAAA;AAAA,sBAIGD,EAAM,OAAO,KAAK;AAAA;AAExC,GAEME,IAAoBL,EAAOC,CAAQ;AAAA,sBACnB,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,MAAM;AAAA;AAAA,mBAErCG,CAAiC,MAAMA,CAAiC;AAAA;AAAA,GAIrFC,IAAqBP,EAAOC,CAAQ;AAAA,EAGxC,CAAC,EAAE,SAAAO,GAAS,YAAAC,EAAA,MAAiB;AAAA;AAAA,qBAEVD,CAAO;AAAA,iBACXC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO3B,GAOMC,IAAiBV,EAAOC,CAAQ;AAAA,EACpC,CAAC,EAAE,OAAAE,GAAO,YAAAQ,GAAY,YAAAP,EAAiB,MAAA;AAAA;AAAA;AAAA;AAAA,SAIhCA,IAAaQ,CAAqB;AAAA;AAAA,gBAE3BD,CAAU,GAAG,OAAOA,KAAe,WAAW,OAAO,EAAE;AAAA,oBACnDE,IAAoB,CAAC;AAAA,sBACnBV,EAAM,OAAO,QAAQ;AAAA,2BAChBA,EAAM,OAAO,MAAM;AAAA,4BAClBA,EAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/C,GAEMW,IAAiBd,EAAOC,CAAQ;AAAA;AAAA;AAAA,YAG1BY,CAAiB;AAAA;AAAA,GAIvBE,IAAoBf,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QACrC;AAAA;AAAA;AAAA;AAAA,eAIMA,EAAM,OAAO,iBAAiB;AAAA,GAE5C;"}
@@ -1,31 +1,52 @@
1
- import { jsxs as e, Fragment as a, jsx as r } from "react/jsx-runtime";
2
- import { memo as s } from "react";
3
- import t from "../../../ui/buttons/button/button.js";
1
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
+ import { memo as k, useCallback as l } from "react";
3
+ import a from "../../../ui/buttons/button/button.js";
4
4
  import c from "../../../ui/layout/flex-view.js";
5
- import f from "../../../ui/separator/separator.js";
6
- import { useWorksheetStore as p } from "../hooks/use-worksheet-store.js";
7
- const y = s(
8
- function({ onBack: o, onSubmit: m, canSubmitWorksheet: i }) {
9
- const n = p((l) => l.behavior.canAttempt);
10
- return /* @__PURE__ */ e(a, { children: [
11
- /* @__PURE__ */ r(f, { height: 0, width: 0 }),
12
- /* @__PURE__ */ e(
13
- c,
5
+ import S from "../../../ui/separator/separator.js";
6
+ import { useWorksheetStore as u } from "../hooks/use-worksheet-store.js";
7
+ const q = k(function() {
8
+ const h = u((e) => e.behavior.canAttempt), { questions: o, changeQuestion: r, onSubmit: t, canSubmitWorksheet: p, responses: s } = u(
9
+ (e) => ({
10
+ questions: e.questions,
11
+ changeQuestion: e.changeQuestion,
12
+ onSubmit: e.onSubmit,
13
+ canSubmitWorksheet: e.canSubmitWorksheet,
14
+ responses: e.responses
15
+ })
16
+ ), d = l(() => {
17
+ var i;
18
+ const e = (i = o[o.length - 1]) == null ? void 0 : i.response_id;
19
+ e && r(e);
20
+ }, [r, o]), f = l(() => {
21
+ t == null || t(s, o);
22
+ }, [t, s, o]);
23
+ return /* @__PURE__ */ m(c, { style: { pointerEvents: "auto" }, children: [
24
+ /* @__PURE__ */ n(S, { height: 0, width: 0 }),
25
+ /* @__PURE__ */ m(c, { $background: "WHITE", $flexDirection: "row", $flexGapX: 0.5, $justifyContent: "flex-end", children: [
26
+ /* @__PURE__ */ n(
27
+ a,
14
28
  {
15
- $background: "WHITE",
16
- $flexDirection: "row",
17
- $flexGapX: 0.5,
18
- $justifyContent: "flex-end",
19
- children: [
20
- /* @__PURE__ */ r(t, { renderAs: "secondary", size: "small", widthX: 6, label: "Back", onClick: o }),
21
- n && i && /* @__PURE__ */ r(t, { renderAs: "primary", size: "small", widthX: 6, label: "Submit", onClick: m })
22
- ]
29
+ renderAs: "secondary",
30
+ size: "small",
31
+ widthX: 6,
32
+ label: "Back",
33
+ onClick: d
34
+ }
35
+ ),
36
+ h && p && /* @__PURE__ */ n(
37
+ a,
38
+ {
39
+ renderAs: "primary",
40
+ size: "small",
41
+ widthX: 6,
42
+ label: "Submit",
43
+ onClick: f
23
44
  }
24
45
  )
25
- ] });
26
- }
27
- );
46
+ ] })
47
+ ] });
48
+ });
28
49
  export {
29
- y as default
50
+ q as default
30
51
  };
31
52
  //# sourceMappingURL=worksheet-summary-controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-summary-controller.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport type { IWorksheetSummaryControllerProps } from './worksheet-summary-controller-types';\nimport { useWorksheetStore } from '../hooks/use-worksheet-store';\n\nconst WorksheetSummaryController: FC<IWorksheetSummaryControllerProps> = memo(\n function WorksheetSummaryController({ onBack, onSubmit, canSubmitWorksheet }) {\n const canAttempt = useWorksheetStore(state => state.behavior.canAttempt);\n\n return (\n <>\n <Separator height={0} width={0} />\n <FlexView\n $background=\"WHITE\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n $justifyContent=\"flex-end\"\n >\n <Button renderAs=\"secondary\" size=\"small\" widthX={6} label=\"Back\" onClick={onBack} />\n {canAttempt && canSubmitWorksheet && (\n <Button renderAs=\"primary\" size=\"small\" widthX={6} label=\"Submit\" onClick={onSubmit} />\n )}\n </FlexView>\n </>\n );\n },\n);\n\nexport default WorksheetSummaryController;\n"],"names":["WorksheetSummaryController","memo","onBack","onSubmit","canSubmitWorksheet","canAttempt","useWorksheetStore","state","jsxs","Fragment","jsx","Separator","FlexView","Button"],"mappings":";;;;;;AAQA,MAAMA,IAAmEC;AAAA,EACvE,SAAoC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,oBAAAC,KAAsB;AAC5E,UAAMC,IAAaC,EAAkB,CAASC,MAAAA,EAAM,SAAS,UAAU;AAEvE,WAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAU,EAAA,QAAQ,GAAG,OAAO,GAAG;AAAA,MAChC,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,aAAY;AAAA,UACZ,gBAAe;AAAA,UACf,WAAW;AAAA,UACX,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAC,gBAAAF,EAAAG,GAAA,EAAO,UAAS,aAAY,MAAK,SAAQ,QAAQ,GAAG,OAAM,QAAO,SAASX,EAAQ,CAAA;AAAA,YAClFG,KAAcD,KACZ,gBAAAM,EAAAG,GAAA,EAAO,UAAS,WAAU,MAAK,SAAQ,QAAQ,GAAG,OAAM,UAAS,SAASV,GAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MAEzF;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"worksheet-summary-controller.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.tsx"],"sourcesContent":["import { memo, useCallback, type FC } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport { useWorksheetStore } from '../hooks/use-worksheet-store';\n\nconst WorksheetSummaryController: FC = memo(function WorksheetSummaryController() {\n const canAttempt = useWorksheetStore(state => state.behavior.canAttempt);\n const { questions, changeQuestion, onSubmit, canSubmitWorksheet, responses } = useWorksheetStore(\n state => ({\n questions: state.questions,\n changeQuestion: state.changeQuestion,\n onSubmit: state.onSubmit,\n canSubmitWorksheet: state.canSubmitWorksheet,\n responses: state.responses,\n }),\n );\n\n const handleBackFromSummary = useCallback(() => {\n const questionId = questions[questions.length - 1]?.response_id;\n\n if (questionId) {\n changeQuestion(questionId);\n }\n }, [changeQuestion, questions]);\n\n const handleSheetSubmitButtonClick = useCallback(() => {\n onSubmit?.(responses, questions);\n }, [onSubmit, responses, questions]);\n\n return (\n <FlexView style={{ pointerEvents: 'auto' }}>\n <Separator height={0} width={0} />\n <FlexView $background=\"WHITE\" $flexDirection=\"row\" $flexGapX={0.5} $justifyContent=\"flex-end\">\n <Button\n renderAs=\"secondary\"\n size=\"small\"\n widthX={6}\n label=\"Back\"\n onClick={handleBackFromSummary}\n />\n {canAttempt && canSubmitWorksheet && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n widthX={6}\n label=\"Submit\"\n onClick={handleSheetSubmitButtonClick}\n />\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default WorksheetSummaryController;\n"],"names":["WorksheetSummaryController","memo","canAttempt","useWorksheetStore","state","questions","changeQuestion","onSubmit","canSubmitWorksheet","responses","handleBackFromSummary","useCallback","questionId","_a","handleSheetSubmitButtonClick","FlexView","jsx","Separator","jsxs","Button"],"mappings":";;;;;;AAOM,MAAAA,IAAiCC,EAAK,WAAsC;AAChF,QAAMC,IAAaC,EAAkB,CAASC,MAAAA,EAAM,SAAS,UAAU,GACjE,EAAE,WAAAC,GAAW,gBAAAC,GAAgB,UAAAC,GAAU,oBAAAC,GAAoB,WAAAC,MAAcN;AAAA,IAC7E,CAAUC,OAAA;AAAA,MACR,WAAWA,EAAM;AAAA,MACjB,gBAAgBA,EAAM;AAAA,MACtB,UAAUA,EAAM;AAAA,MAChB,oBAAoBA,EAAM;AAAA,MAC1B,WAAWA,EAAM;AAAA,IAAA;AAAA,EACnB,GAGIM,IAAwBC,EAAY,MAAM;;AAC9C,UAAMC,KAAaC,IAAAR,EAAUA,EAAU,SAAS,CAAC,MAA9B,gBAAAQ,EAAiC;AAEpD,IAAID,KACFN,EAAeM,CAAU;AAAA,EAC3B,GACC,CAACN,GAAgBD,CAAS,CAAC,GAExBS,IAA+BH,EAAY,MAAM;AACrD,IAAAJ,KAAA,QAAAA,EAAWE,GAAWJ;AAAA,EACrB,GAAA,CAACE,GAAUE,GAAWJ,CAAS,CAAC;AAEnC,2BACGU,GAAS,EAAA,OAAO,EAAE,eAAe,OAChC,GAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAU,EAAA,QAAQ,GAAG,OAAO,GAAG;AAAA,IAChC,gBAAAC,EAACH,KAAS,aAAY,SAAQ,gBAAe,OAAM,WAAW,KAAK,iBAAgB,YACjF,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,MAAK;AAAA,UACL,QAAQ;AAAA,UACR,OAAM;AAAA,UACN,SAAST;AAAA,QAAA;AAAA,MACX;AAAA,MACCR,KAAcM,KACb,gBAAAQ;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,MAAK;AAAA,UACL,QAAQ;AAAA,UACR,OAAM;AAAA,UACN,SAASL;AAAA,QAAA;AAAA,MACX;AAAA,IAAA,GAEJ;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
@@ -0,0 +1,19 @@
1
+ import o from "styled-components";
2
+ import t from "../../../ui/layout/flex-view.js";
3
+ const i = o(t)(
4
+ ({ theme: e }) => `
5
+ position: absolute;
6
+ bottom: 48px;
7
+ left: 16px;
8
+ right: 16px;
9
+ pointer-events: auto;
10
+ box-shadow: 0 6px 12px 0 ${e.colors.BLACK_T_15};
11
+ `
12
+ ), p = o(t)`
13
+ overflow-y: auto;
14
+ `;
15
+ export {
16
+ p as ContentContainer,
17
+ i as WorksheetTeachingToolsContainer
18
+ };
19
+ //# sourceMappingURL=worksheet-teaching-tools-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worksheet-teaching-tools-styled.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst WorksheetTeachingToolsContainer = styled(FlexView)(\n ({ theme }) => `\n position: absolute;\n bottom: 48px;\n left: 16px;\n right: 16px;\n pointer-events: auto;\n box-shadow: 0 6px 12px 0 ${theme.colors.BLACK_T_15};\n`,\n);\n\nconst ContentContainer = styled(FlexView)`\n overflow-y: auto;\n`;\n\nexport { WorksheetTeachingToolsContainer, ContentContainer };\n"],"names":["WorksheetTeachingToolsContainer","styled","FlexView","theme","ContentContainer"],"mappings":";;AAIM,MAAAA,IAAkCC,EAAOC,CAAQ;AAAA,EACrD,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAMYA,EAAM,OAAO,UAAU;AAAA;AAEpD,GAEMC,IAAmBH,EAAOC,CAAQ;AAAA;AAAA;"}
@@ -0,0 +1,66 @@
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
+ import { memo as p, useMemo as T, useState as u } from "react";
3
+ import g from "../../../ui/layout/flex-view.js";
4
+ import f from "../../../ui/tabs/tabs.js";
5
+ import S from "../../../ui/text/text.js";
6
+ import { useWorksheetStore as b } from "../hooks/use-worksheet-store.js";
7
+ import { CustomElement as $ } from "../worksheet-question/worksheet-question-styled.js";
8
+ import { WorksheetTeachingToolsContainer as x, ContentContainer as A } from "./worksheet-teaching-tools-styled.js";
9
+ import { EActiveQuestionTool as a } from "../worksheet-types.js";
10
+ const C = {
11
+ [a.TEACHING_TOOLS]: [
12
+ { id: "Teacher Tip", label: "Cue Don't Tell" },
13
+ {
14
+ id: "Hint",
15
+ label: "Hints"
16
+ },
17
+ { id: "Solution", label: "Solution" }
18
+ ],
19
+ [a.SOLUTION]: [{ id: "Solution", label: "Solution" }]
20
+ }, L = p(
21
+ function({ tool: m }) {
22
+ const { question: t, learnosity: c } = b((e) => ({
23
+ question: e.questions[e.activeQuestionIndex],
24
+ learnosity: e.learnosity
25
+ })), i = T(() => {
26
+ const e = t == null ? void 0 : t.metadata;
27
+ return {
28
+ "Teacher Tip": (e == null ? void 0 : e.teacher_tips) ?? [],
29
+ Hint: (e == null ? void 0 : e.hints) ?? [],
30
+ Solution: (e == null ? void 0 : e.solution) ?? []
31
+ };
32
+ }, [t]), h = T(
33
+ () => C[m].map((e) => ({
34
+ ...e,
35
+ disabled: i[e.id].length === 0
36
+ })),
37
+ [i, m]
38
+ ), [r, d] = u(() => {
39
+ var e;
40
+ return ((e = h.find((n) => !n.disabled)) == null ? void 0 : e.id) ?? "Teacher Tip";
41
+ }), o = i[r];
42
+ return o && c && c.renderMath("mathjax"), /* @__PURE__ */ l(x, { $background: "WHITE", children: [
43
+ /* @__PURE__ */ s(f, { theme: "light", tabs: h, selectedTab: r, onChange: d }),
44
+ /* @__PURE__ */ s(A, { $height: 152, $gutterX: 1, $gapX: 0.5, children: o == null ? void 0 : o.map((e, n) => /* @__PURE__ */ l(g, { $gapX: 0.5, children: [
45
+ o.length > 1 && /* @__PURE__ */ l(S, { $renderAs: "eyebrow2", $color: "ORANGE_5", $marginBottomX: 0.25, children: [
46
+ r,
47
+ " ",
48
+ n + 1,
49
+ ":"
50
+ ] }),
51
+ /* @__PURE__ */ s(
52
+ $,
53
+ {
54
+ dangerouslySetInnerHTML: {
55
+ __html: e
56
+ }
57
+ }
58
+ )
59
+ ] }, `${r}-item-${n}`)) })
60
+ ] });
61
+ }
62
+ );
63
+ export {
64
+ L as default
65
+ };
66
+ //# sourceMappingURL=worksheet-teaching-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worksheet-teaching-tools.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.tsx"],"sourcesContent":["import { type FC, memo, useMemo, useState } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Tabs from '../../../ui/tabs/tabs';\nimport { type ITabsProps } from '../../../ui/tabs/tabs-types';\nimport Text from '../../../ui/text/text';\nimport { useWorksheetStore } from '../hooks/use-worksheet-store';\nimport { CustomElement } from '../worksheet-question/worksheet-question-styled';\nimport * as Styled from './worksheet-teaching-tools-styled';\nimport { EActiveQuestionTool } from '../worksheet-types';\n\nenum TAB_IDS {\n CDT = 'Teacher Tip',\n HINTS = 'Hint',\n SOLUTION = 'Solution',\n}\n\nconst TABS_MAP: Record<EActiveQuestionTool, ITabsProps<TAB_IDS>['tabs']> = {\n [EActiveQuestionTool.TEACHING_TOOLS]: [\n { id: TAB_IDS.CDT, label: \"Cue Don't Tell\" },\n {\n id: TAB_IDS.HINTS,\n label: 'Hints',\n },\n { id: TAB_IDS.SOLUTION, label: 'Solution' },\n ],\n [EActiveQuestionTool.SOLUTION]: [{ id: TAB_IDS.SOLUTION, label: 'Solution' }],\n};\n\ninterface IWorksheetTeachingToolsProps {\n tool: EActiveQuestionTool;\n}\nconst WorksheetTeachingTools: FC<IWorksheetTeachingToolsProps> = memo(\n function WorksheetTeachingTools({ tool }) {\n const { question, learnosity } = useWorksheetStore(store => ({\n question: store.questions[store.activeQuestionIndex],\n learnosity: store.learnosity,\n }));\n const content = useMemo(() => {\n const questionMetadata = question?.metadata;\n\n return {\n [TAB_IDS.CDT]: questionMetadata?.teacher_tips ?? [],\n [TAB_IDS.HINTS]: questionMetadata?.hints ?? [],\n [TAB_IDS.SOLUTION]: questionMetadata?.solution ?? [],\n };\n }, [question]);\n const tabs = useMemo(\n () =>\n TABS_MAP[tool].map(tab => ({\n ...tab,\n disabled: content[tab.id].length === 0,\n })),\n [content, tool],\n );\n const [selectedTab, setSelectedTab] = useState<TAB_IDS>(() => {\n return tabs.find(tab => !tab.disabled)?.id ?? TAB_IDS.CDT;\n });\n const tabContent = content[selectedTab];\n\n if (tabContent && learnosity) {\n learnosity.renderMath('mathjax');\n }\n\n return (\n <Styled.WorksheetTeachingToolsContainer $background=\"WHITE\">\n <Tabs theme=\"light\" tabs={tabs} selectedTab={selectedTab} onChange={setSelectedTab} />\n <Styled.ContentContainer $height={152} $gutterX={1} $gapX={0.5}>\n {tabContent?.map((item, index) => (\n <FlexView $gapX={0.5} key={`${selectedTab}-item-${index}`}>\n {tabContent.length > 1 && (\n <Text $renderAs=\"eyebrow2\" $color=\"ORANGE_5\" $marginBottomX={0.25}>\n {selectedTab} {index + 1}:\n </Text>\n )}\n <CustomElement\n dangerouslySetInnerHTML={{\n __html: item,\n }}\n />\n </FlexView>\n ))}\n </Styled.ContentContainer>\n </Styled.WorksheetTeachingToolsContainer>\n );\n },\n);\n\nexport default WorksheetTeachingTools;\n"],"names":["TABS_MAP","EActiveQuestionTool","WorksheetTeachingTools","memo","tool","question","learnosity","useWorksheetStore","store","content","useMemo","questionMetadata","tabs","tab","selectedTab","setSelectedTab","useState","_a","tabContent","jsxs","Styled.WorksheetTeachingToolsContainer","jsx","Tabs","Styled.ContentContainer","item","index","FlexView","Text","CustomElement"],"mappings":";;;;;;;;;AAiBA,MAAMA,IAAqE;AAAA,EACzE,CAACC,EAAoB,cAAc,GAAG;AAAA,IACpC,EAAE,IAAI,eAAa,OAAO,iBAAiB;AAAA,IAC3C;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,YAAkB,OAAO,WAAW;AAAA,EAC5C;AAAA,EACA,CAACA,EAAoB,QAAQ,GAAG,CAAC,EAAE,IAAI,YAAkB,OAAO,YAAY;AAC9E,GAKMC,IAA2DC;AAAA,EAC/D,SAAgC,EAAE,MAAAC,KAAQ;AACxC,UAAM,EAAE,UAAAC,GAAU,YAAAC,EAAW,IAAIC,EAAkB,CAAUC,OAAA;AAAA,MAC3D,UAAUA,EAAM,UAAUA,EAAM,mBAAmB;AAAA,MACnD,YAAYA,EAAM;AAAA,IAClB,EAAA,GACIC,IAAUC,EAAQ,MAAM;AAC5B,YAAMC,IAAmBN,KAAA,gBAAAA,EAAU;AAE5B,aAAA;AAAA,QACJ,gBAAcM,KAAA,gBAAAA,EAAkB,iBAAgB,CAAC;AAAA,QACjD,OAAgBA,KAAA,gBAAAA,EAAkB,UAAS,CAAC;AAAA,QAC5C,WAAmBA,KAAA,gBAAAA,EAAkB,aAAY,CAAC;AAAA,MAAA;AAAA,IACrD,GACC,CAACN,CAAQ,CAAC,GACPO,IAAOF;AAAA,MACX,MACEV,EAASI,CAAI,EAAE,IAAI,CAAQS,OAAA;AAAA,QACzB,GAAGA;AAAA,QACH,UAAUJ,EAAQI,EAAI,EAAE,EAAE,WAAW;AAAA,MAAA,EACrC;AAAA,MACJ,CAACJ,GAASL,CAAI;AAAA,IAAA,GAEV,CAACU,GAAaC,CAAc,IAAIC,EAAkB,MAAM;;AAC5D,eAAOC,IAAAL,EAAK,KAAK,CAAAC,MAAO,CAACA,EAAI,QAAQ,MAA9B,gBAAAI,EAAiC,OAAM;AAAA,IAAA,CAC/C,GACKC,IAAaT,EAAQK,CAAW;AAEtC,WAAII,KAAcZ,KAChBA,EAAW,WAAW,SAAS,GAI9B,gBAAAa,EAAAC,GAAA,EAAuC,aAAY,SAClD,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAK,OAAM,SAAQ,MAAAV,GAAY,aAAAE,GAA0B,UAAUC,GAAgB;AAAA,wBACnFQ,GAAA,EAAwB,SAAS,KAAK,UAAU,GAAG,OAAO,KACxD,UAAAL,KAAA,gBAAAA,EAAY,IAAI,CAACM,GAAMC,MACrB,gBAAAN,EAAAO,GAAA,EAAS,OAAO,KACd,UAAA;AAAA,QAAWR,EAAA,SAAS,KAClB,gBAAAC,EAAAQ,GAAA,EAAK,WAAU,YAAW,QAAO,YAAW,gBAAgB,MAC1D,UAAA;AAAA,UAAAb;AAAA,UAAY;AAAA,UAAEW,IAAQ;AAAA,UAAE;AAAA,QAAA,GAC3B;AAAA,QAEF,gBAAAJ;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,yBAAyB;AAAA,cACvB,QAAQJ;AAAA,YACV;AAAA,UAAA;AAAA,QACF;AAAA,MAAA,EAAA,GAVyB,GAAGV,CAAW,SAASW,CAAK,EAWvD,IAEJ;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
@@ -1,6 +1,7 @@
1
- var t = /* @__PURE__ */ ((r) => (r.TRIAL_TOPIC = "trial-topic", r.QUESTION_CODE = "question code", r))(t || {}), e = /* @__PURE__ */ ((r) => (r[r.E = 3] = "E", r[r.S = 2] = "S", r[r.H = 1] = "H", r))(e || {});
1
+ var t = /* @__PURE__ */ ((r) => (r.TRIAL_TOPIC = "trial-topic", r.QUESTION_CODE = "question code", r))(t || {}), L = /* @__PURE__ */ ((r) => (r[r.E = 3] = "E", r[r.S = 2] = "S", r[r.H = 1] = "H", r))(L || {}), O = /* @__PURE__ */ ((r) => (r.TEACHING_TOOLS = "TEACHING_TOOLS", r.SOLUTION = "SOLUTION", r))(O || {});
2
2
  export {
3
- e as QUESTIONS_RATING,
3
+ O as EActiveQuestionTool,
4
+ L as QUESTIONS_RATING,
4
5
  t as QUESTION_TAGS
5
6
  };
6
7
  //# sourceMappingURL=worksheet-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-types.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-types.ts"],"sourcesContent":["import type { MutableRefObject, ReactElement, ReactNode } from 'react';\n\nimport type { TNodeTypes } from '../../../types/models/worksheet';\nimport type { IActionData, TPublish, TSubscribe } from '../../cue-canvas/types/cue-canvas';\nimport type { TPublishMouseMove, TSubscribeMouseMove } from '../../pointer-sync/pointer-types';\nimport type { TColorNames, THueNames, TUserTypes } from '../../ui/types';\nimport type { IFile } from './worksheet-question/subjective-review';\nimport type { TWorksheetBlocker } from './worksheet-blocker/worksheet-blocker-types';\n\nexport enum QUESTION_TAGS {\n TRIAL_TOPIC = 'trial-topic',\n QUESTION_CODE = 'question code',\n}\n\nexport enum QUESTIONS_RATING {\n E = 3,\n S = 2, // Just right\n H = 1,\n}\n\nexport interface ILearnosityError {\n code: number;\n consumerKey: string;\n detail: string;\n errorUI: string;\n msg: string;\n}\n\ninterface ILearnosityQuestionMetadata {\n widget_reference: string;\n sheet_reference: string;\n hints?: string[];\n solution?: string[];\n teacher_tips?: string[];\n valid_response_count: number;\n source: {\n organisation_id: number;\n };\n}\n\nexport type TInstructorStimulus =\n | 'SystemIntro' // lesson v3\n | 'Intro' // lesson v3\n | 'Concept-Intro' // lesson v3\n | 'Instruction' // lesson v3\n | 'Task' // lesson v3\n | 'Try' // trial v3\n | 'Learn' // trial v3\n | 'Apply'; // trial v3\nexport type TItemType =\n | 'overview'\n | 'learning-we-do'\n | 'learning-your-turn'\n | 'learning-explore'\n | 'practice-basic'\n | 'practice-basic-optional'\n | 'practice-regular'\n | 'practice-regular-optional'\n | 'exit-ticket'\n | 'advanced-we-do'\n | 'advanced-your-turn'\n | 'advanced-explore'\n | 'advanced-practice';\n\nexport type TSectionName =\n | 'overview'\n | 'learning'\n | 'practice-basic'\n | 'practice-regular'\n | 'exit-ticket'\n | 'advanced';\n\nexport interface IQuestionValidResponse {\n score: number;\n value: unknown[];\n}\n\nexport interface ISheetNudgeBannerInfo {\n bannerBackgroundColor: TColorNames;\n label: string;\n}\n\nexport interface ILearnosityQuestion {\n response_id: string;\n instructor_stimulus?: TInstructorStimulus;\n metadata: ILearnosityQuestionMetadata;\n instant_feedback?: boolean;\n math_renderer?: string;\n template?: string;\n tokenization?: string;\n numberPad?: string[];\n symbols?: unknown[];\n response_container?: Record<string, unknown>;\n ui_style?: Record<string, unknown>;\n shuffle_options?: boolean;\n // for custom type question validation is undefined.\n validation?: {\n scoring_type?: string;\n unscored?: boolean;\n valid_response?: IQuestionValidResponse;\n alt_responses?: IQuestionValidResponse[];\n penalty?: number;\n min_score_if_attempted?: number;\n };\n is_math?: boolean;\n labels?: Record<string, unknown>;\n line?: Record<string, unknown>;\n points?: string[];\n snap_to_ticks?: boolean;\n ticks?: Record<string, unknown>;\n max_length?: number;\n type:\n | 'hotspot'\n | 'tokenhighlight'\n | 'numberline'\n | 'clozeassociation'\n | 'clozetext'\n | 'association'\n | 'classification'\n | 'clozedropdown'\n | 'clozeformula'\n | 'mcq'\n | 'choicematrix'\n | 'plaintext'\n | 'drawing';\n case_sensitive?: boolean;\n show_copy?: boolean;\n show_cut?: boolean;\n show_paste?: boolean;\n spellcheck?: boolean;\n stimulus?: string;\n stimulus_review?: string;\n stimulus_list?: string[];\n image?: Record<string, unknown>;\n areas?: unknown[];\n area_attributes?: Record<string, unknown>;\n possible_responses?: string[][] | string[];\n duplicate_responses?: boolean;\n response_containers?: unknown[];\n options?: Record<string, unknown>[] | string[];\n feedback_attempts?: number;\n stems?: string[];\n multiple_responses?: boolean;\n}\n\nexport interface ILearnosityItem {\n reference: string;\n questions: ILearnosityQuestion[];\n source: Record<string, unknown>;\n content: string;\n metadata: Record<string, unknown> | unknown[];\n workflow: unknown[];\n response_ids: string[];\n feature_ids: unknown[];\n features: unknown[];\n itemType?: TItemType;\n tags?: string[];\n}\n\nexport interface IWorksheetQuestion extends ILearnosityQuestion {\n item_reference: string;\n item_type?: TItemType;\n section_name?: TSectionName;\n is_optional?: boolean;\n item_tags: string[];\n item_tags_map: Record<string, string>;\n item_number: number;\n item_display_number: number;\n question_number: number;\n total_questions: number;\n}\n\nexport interface ILearnosityQuestionScore {\n score?: number | null;\n max_score: number;\n unscored?: boolean;\n}\n\nexport interface ILearnosityQuestionResponse {\n value: unknown;\n responses?: unknown;\n type: unknown;\n updatedFormat?: boolean;\n wordCount?: number;\n apiVersion: string;\n revision: number;\n feedbackAttemptsCount?: number;\n}\n\nexport interface IAttempt {\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n}\n\ninterface ITeacherReview {\n reviewComment?: string;\n images?: string[];\n}\nexport interface IWorksheetResponse {\n widgetReference: string;\n itemReference: string;\n itemPosition: number; // 0 based\n questionPosition: number; // 0 based\n isOkayTypeQuestion: boolean;\n response?: ILearnosityQuestionResponse;\n simState?: Record<string, unknown>;\n score?: ILearnosityQuestionScore;\n responseEdited?: boolean;\n hintsUsed?: number;\n markedForReview?: boolean;\n attemptsHistory?: IAttempt[];\n validatedByTeacher?: boolean;\n submittedByStudent?: boolean;\n assignStatus?: 'assigned' | 'skipped';\n rating?: number;\n skipped?: boolean;\n doubtResolved?: boolean;\n teacherReview?: ITeacherReview;\n tags?: Record<string, string>;\n timeSpent?: number;\n}\n\ntype TMathRenderer = 'mathjax' | 'mathquill';\nexport interface ILearnosity {\n ready: () => void;\n questions: () => Record<string, unknown>;\n question: (responseId: string) =>\n | {\n enable: () => boolean;\n disable: () => boolean;\n getQuestion: () => ILearnosityQuestion;\n getMetadata: () => ILearnosityQuestionMetadata;\n getResponse: () => ILearnosityQuestionResponse;\n getScore: (\n callback?: (score: ILearnosityQuestionScore | null) => void,\n ) => ILearnosityQuestionScore;\n validate: (\n options?: { showCorrectAnswers?: boolean; feedbackAttempts?: boolean },\n callback?: () => void,\n ) => void;\n resetValidationUI: () => void;\n on: (eventName: 'changed', callback: () => void) => void;\n off: (eventName: 'changed', callback?: () => void) => void;\n }\n | undefined;\n append: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n appendQuestion: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n reset: () => void;\n renderMath: (renderer: TMathRenderer) => void;\n}\n\nexport interface IWorksheetBehavior {\n /**\n * If true, Opens the worksheet in resume mode.\n * - If false, Opens the worksheet in review mode.\n */\n canAttempt: boolean;\n /**\n * If true, the user can mark the question for review.\n */\n canMarkForReview: boolean;\n /**\n * The mode of navigation for the worksheet.\n * - `OPEN` mode allows the user to navigate to any question in the worksheet.\n * - `LINEAR` mode allows the user to navigate to the next question only.\n * - `ADAPTIVE` mode allows the user to navigate future questions based on the rating of the current question.\n * - `CURRENT` mode allows the user to navigate to the current question only. Back and forth not allowed.\n */\n navigationMode: 'OPEN' | 'LINEAR' | 'ADAPTIVE' | 'CURRENT';\n /**\n * The initial question to display when the worksheet is loaded.\n * - `FIRST` mode displays the first question in the worksheet.\n * - `CURRENT` mode displays the question that the user was last on.\n */\n initialQuestion: 'FIRST' | 'CURRENT';\n /**\n * If hints are available, on clicking the help button, first availble hint will be shown.\n * Clicking again will show the next hint.\n * If no more hints are available, onHelp will be called.\n */\n hints: boolean;\n /**\n * The time in seconds after which the hints button will be shown.\n */\n hintsTimer?: number; // in seconds\n /**\n * If true, the user can skip the question without attempting it.\n * Skip button will be shown only after the hints are exausted and skipTimer is reached.\n */\n skippable?: boolean;\n /**\n * The time in seconds after which the user can skip the question.\n */\n skippableTime?: number; // in seconds\n /**\n * If true, teacher validation is needed for the question to proceed\n */\n teacherValidationEnabled: boolean;\n /**\n * If worksheet is attempting outside the class setting\n * This needs teacherValidationEnabled to be true\n * TODO: Consider changing to accept validation type: 'system' | 'teacher' | undefined instead of boolean\n */\n canTeacherValidate: boolean;\n /**\n * If true, questions will be validated and feedback will be shown.\n */\n validation: boolean;\n /**\n * If true, solution wont be shown to the user.\n */\n solutionHidden?: boolean;\n /**\n * If true, questions will be validated and feedback will be shown along with the correct answer.\n */\n review: boolean;\n /**\n * The maximum number of attempts allowed for each question.\n * 0 means unlimited attempts.\n * -1 means attempts will not be validated, hence not pushed to attempt history.\n * -2 means the sheet is a puzzle sheet\n * After reaching the maximum number of attempts, the user cannot attempt the question anymore.\n * If maxAtttmpts reached and canExceedAttempts is true, the user can still attempt the question\n * , also user will have the option to move to next question\n */\n maximumAttempts: number;\n /**\n * If true, the user can exceed the maximum number of attempts.\n */\n canExceedAttempts: boolean;\n /**\n * If the worksheet minimumAccuracy is not met, on clicking the final submit button, onMinimumAccuracyNotMet will be called.\n */\n minimumAccuracy: number;\n /**\n * Label for the check button\n * For example,\n * - \"Check\" for Checking the answer\n * - \"Submit\" for Submitting the answer when doing assessment\n */\n checkButtonLabel: string;\n /**\n * If attempt is incorrect, we show retry button, this is the label for the retry button\n * For example,\n * - 'Try Again' for retrying the question\n */\n retryButtonLabel: string;\n /**\n * If true show demos calculator https://www.desmos.com/calculator\n */\n canShowDesmosCalc: boolean;\n\n // If true, canvas is enabled and user can use canvas to scribble on the worksheet by toggling the scribble button\n canvasEnabled?: boolean;\n\n // If true, the user can scribble on workheet\n canScribble?: boolean;\n}\n\nexport type TWORKSHEET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';\n\nexport interface IWorksheetCallbackProps {\n onResponseChange?: (options: {\n responseId: string;\n response: IWorksheetResponse;\n isNewAttempt: boolean;\n question: IWorksheetQuestion;\n }) => void;\n onBulkResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onMediaStateChange?: (\n question: IWorksheetQuestion,\n mediaType: TWORKSHEET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n onTeacherValidation?: (questionId: string, rating?: keyof typeof QUESTIONS_RATING) => void;\n onOptionalItemAssignment?: (itemType: TItemType) => void;\n onOptionalItemSkip?: (itemType: TItemType) => void;\n onHelp?: (options: { questionId: string; questionNumber: string }) => void;\n onMinimumAccuracyNotMet?: (accuracy: number) => void;\n onExitTicketStart?: () => void;\n onExitTicketSubmit?: () => void;\n onSubmit?: (responses: Record<string, IWorksheetResponse>) => void;\n onActiveQuestionChange?: (question: IWorksheetQuestion) => void;\n onResolveDoubt?: (responseId: string) => void;\n onSkip?: (itemIndex: number, widgetIndex: number) => void;\n onLoaded: () => void;\n onErrored: (error: { code?: number; message: string }) => void;\n onResponsesLoaded?: (responses: Record<string, IWorksheetResponse>) => void;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n}\n\nexport interface ICueCanvasCallbackProps {\n onPublishStrokes?: TPublish;\n onReceiveStrokes?: TSubscribe;\n}\n\nexport interface ICueCanvasProps {\n initialStrokesData?: Record<string, IActionData[]>;\n}\n\nexport interface IPointerSyncCallbackProps {\n onPublishMouseMove?: TPublishMouseMove;\n onSubscribeMouseMove?: TSubscribeMouseMove;\n}\n\nexport interface IWorksheetLayout {\n containerStyle: 'none' | 'card';\n navigationBar: 'none' | 'top' | 'bottom';\n actionBar: 'none' | 'bottom';\n containerWidth: string;\n topOffset: number; // Offset from the top of the screen, for eg: height of the header\n questionsScrollable: boolean;\n minQuestionHeight: string | number;\n minSummaryHeight: string | number;\n renderSideBar: boolean;\n showUserPointer?: boolean;\n renderQuestionHeader?: boolean;\n imageHue?: THueNames;\n background?: 'none' | 'paper';\n questionPadding: number;\n}\n\nexport interface ISubjectiveSheetProps {\n onAddReviewComment?: (\n responseId: string,\n commentData: {\n score: ILearnosityQuestionScore;\n teacherReview: ITeacherReview;\n },\n ) => void;\n openImagesReviewModal?: (props: IOpenImageReviewModalProps) => void;\n handleReviewSubmit?: () => void;\n isSubmittingReview?: boolean;\n isReviewPending?: boolean;\n}\n\ninterface IBaseWorksheetProps {\n userType: TUserTypes;\n userId: string;\n studentId: string;\n studentName?: string;\n worksheetName: string;\n initialResponseId?: string;\n initialItemIndex?: number;\n layout: IWorksheetLayout;\n updatedResponses?: Record<string, IWorksheetResponse>;\n worksheetCompleted: boolean;\n showNudgeBanner?: boolean;\n markedAsCompleted?: boolean;\n canResolveDoubt?: boolean;\n canShowActionBar?: boolean;\n actionBarRightElement?: ReactElement; // Extra Elements to be rendered in the action bar\n attemptId?: string;\n itemsSignedRequest: string;\n questionsSignedRequest: string;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n subjectiveProps?: ISubjectiveSheetProps;\n inClass?: boolean; // If true, the worksheet is rendered inside class\n isLessonV3Enabled?: boolean; // If true, the worksheet is rendered in lesson v3 mode\n isDesmosEnabled?: boolean; // If true, the worksheet can show desmos calculator\n nodeType: TNodeTypes; // NodeType of the worksheet\n mode: 'resume' | 'review' | 'preview'; // mode of the worksheet\n loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;\n}\n\ninterface IWorksheetPlugins {\n plugins?: {\n stickers?: ReactNode;\n };\n}\n\nexport interface IUpdateImages {\n filteredImages: string[];\n newImages: IFile[];\n}\nexport interface IOpenImageReviewModalProps {\n isReviewed?: boolean;\n disableScoreForm?: boolean;\n imageUrls?: string[];\n filteredImageUrls?: (props: IUpdateImages) => void;\n uploadedImages?: (IFile | string)[];\n image?: string;\n}\n\nexport interface IWorksheetProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps,\n IWorksheetPlugins {}\n\nexport interface IWorksheetRef {\n validateQuestion: (\n responseId: string,\n rating?: keyof typeof QUESTIONS_RATING,\n skipRemainingQuestions?: boolean,\n ) => void;\n assignOptionalItems: (itemType: TItemType) => void;\n skipOptionalItems: (itemType: TItemType) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHEET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n}\n\ninterface IWorksheetHeaderLayoutArgs {\n isPuzzleWorksheet?: boolean;\n isTestWorksheet?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface IWorksheetHeaderLayoutProps {\n (args: IWorksheetHeaderLayoutArgs): {\n bgColor: TColorNames;\n borderColor?: TColorNames;\n textColor?: TColorNames;\n };\n}\n\nexport type TWorksheetStoreProps = Omit<\n IBaseWorksheetProps,\n 'studentName' | 'canShowActionBar' | 'itemsSignedRequest' | 'nodeType' | 'mode'\n> &\n Required<Pick<IBaseWorksheetProps, 'studentName' | 'canShowActionBar'>> &\n Omit<IWorksheetCallbackProps, 'onLoaded' | 'onErrored'> &\n ICueCanvasProps &\n ICueCanvasCallbackProps &\n IPointerSyncCallbackProps &\n IWorksheetPlugins & {\n behavior: IWorksheetBehavior;\n learnosityItems: ILearnosityItem[];\n learnosityResponses?: Record<string, IWorksheetResponse>;\n learnosity: ILearnosity;\n appendedQuestionIds: string[];\n };\n\nexport interface IWorksheetStoreState {\n questions: IWorksheetQuestion[];\n renderableQuestions: IWorksheetQuestion[];\n responses: Record<string, IWorksheetResponse>;\n lastUnlockedQuestionIndex: number;\n initialQuestionId: string;\n activeQuestionId: string;\n activeQuestionIndex: number;\n questionsContainerWidth: number;\n maxQuestionWidth: number;\n actionbarHeight: number;\n summaryVisible: boolean;\n calculatorVisible: boolean;\n scribblingEnabled: boolean;\n blocker?: TWorksheetBlocker;\n}\n\n// Actions interface - contains all the methods\ninterface IWorksheetStoreActions {\n mergeWorksheetProps: (data: TWorksheetStoreProps) => void;\n setResponses: (\n responses:\n | IWorksheetStore['responses']\n | ((prevResponses: IWorksheetStore['responses']) => IWorksheetStore['responses']),\n ) => void;\n showSummary: () => void;\n hideSummary: () => void;\n toggleSummary: () => void;\n showCalculator: () => void;\n hideCalculator: () => void;\n toggleScribble: () => void;\n setBlocker: (blocker?: TWorksheetBlocker) => void;\n removeBlocker: () => void;\n updateResponse: (options: {\n responseId: string;\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n timeSpent: number;\n answerChecked?: boolean;\n }) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHEET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n markForReview: (responseId: string, markedForReview: boolean) => void;\n changeQuestion: (questionId: string, shouldScroll?: boolean, scrollDelay?: number) => void;\n destroy: () => void;\n}\n\n// Combined store interface\nexport interface IWorksheetStore\n extends IWorksheetStoreState,\n TWorksheetStoreProps,\n IWorksheetStoreActions {}\n"],"names":["QUESTION_TAGS","QUESTIONS_RATING"],"mappings":"AASY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KAHUA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"worksheet-types.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-types.ts"],"sourcesContent":["import type { MutableRefObject, ReactElement, ReactNode } from 'react';\n\nimport type { EWorksheetActivity, TNodeTypes } from '../../../types/models/worksheet';\nimport type { IActionData, TPublish, TSubscribe } from '../../cue-canvas/types/cue-canvas';\nimport type { TPublishMouseMove, TSubscribeMouseMove } from '../../pointer-sync/pointer-types';\nimport type { TColorNames, THueNames, TUserTypes } from '../../ui/types';\nimport type { IFile } from './worksheet-question/subjective-review';\nimport type { TWorksheetBlocker } from './worksheet-blocker/worksheet-blocker-types';\n\nexport enum QUESTION_TAGS {\n TRIAL_TOPIC = 'trial-topic',\n QUESTION_CODE = 'question code',\n}\n\nexport enum QUESTIONS_RATING {\n E = 3,\n S = 2, // Just right\n H = 1,\n}\n\nexport interface ILearnosityError {\n code: number;\n consumerKey: string;\n detail: string;\n errorUI: string;\n msg: string;\n}\n\ninterface ILearnosityQuestionMetadata {\n widget_reference: string;\n sheet_reference: string;\n acknowledgements?: string;\n sample_answer?: string;\n hints?: string[];\n solution?: string[];\n teacher_tips?: string[];\n valid_response_count: number;\n source: {\n organisation_id: number;\n };\n}\n\nexport type TInstructorStimulus =\n | 'SystemIntro' // lesson v3\n | 'Intro' // lesson v3\n | 'Concept-Intro' // lesson v3\n | 'Instruction' // lesson v3\n | 'Task' // lesson v3\n | 'Try' // trial v3\n | 'Learn' // trial v3\n | 'Apply'; // trial v3\n\nexport type TItemType =\n | 'overview'\n | 'learning'\n | 'learning-we-do'\n | 'learning-your-turn'\n | 'learning-explore'\n | 'practice'\n | 'practice-basic'\n | 'practice-basic-optional'\n | 'practice-regular'\n | 'practice-regular-optional'\n | 'exit-ticket'\n | 'advanced-we-do'\n | 'advanced-your-turn'\n | 'advanced-explore'\n | 'advanced-practice';\n\nexport type TSectionName =\n | 'overview'\n | 'learning'\n | 'practice'\n | 'practice-basic'\n | 'practice-regular'\n | 'exit-ticket'\n | 'advanced';\n\ninterface IQuestionValidResponse {\n score: number;\n value: unknown[];\n}\n\nexport interface ISheetNudgeBannerInfo {\n bannerBackgroundColor: TColorNames;\n label: string;\n}\n\nexport interface ILearnosityQuestion {\n response_id: string;\n instructor_stimulus?: TInstructorStimulus;\n metadata: ILearnosityQuestionMetadata;\n instant_feedback?: boolean;\n math_renderer?: string;\n template?: string;\n tokenization?: string;\n numberPad?: string[];\n symbols?: unknown[];\n response_container?: Record<string, unknown>;\n ui_style?: Record<string, unknown>;\n shuffle_options?: boolean;\n // for custom type question validation is undefined.\n validation?: {\n scoring_type?: string;\n unscored?: boolean;\n valid_response?: IQuestionValidResponse;\n alt_responses?: IQuestionValidResponse[];\n penalty?: number;\n min_score_if_attempted?: number;\n };\n is_math?: boolean;\n labels?: Record<string, unknown>;\n line?: Record<string, unknown>;\n points?: string[];\n snap_to_ticks?: boolean;\n ticks?: Record<string, unknown>;\n max_length?: number;\n type:\n | 'hotspot'\n | 'tokenhighlight'\n | 'numberline'\n | 'clozeassociation'\n | 'clozetext'\n | 'association'\n | 'classification'\n | 'clozedropdown'\n | 'clozeformula'\n | 'mcq'\n | 'choicematrix'\n | 'plaintext'\n | 'drawing';\n case_sensitive?: boolean;\n show_copy?: boolean;\n show_cut?: boolean;\n show_paste?: boolean;\n spellcheck?: boolean;\n stimulus?: string;\n stimulus_review?: string;\n stimulus_list?: string[];\n image?: Record<string, unknown>;\n areas?: unknown[];\n area_attributes?: Record<string, unknown>;\n possible_responses?: string[][] | string[];\n duplicate_responses?: boolean;\n response_containers?: unknown[];\n options?: Record<string, unknown>[] | string[];\n feedback_attempts?: number;\n stems?: string[];\n multiple_responses?: boolean;\n}\n\nexport interface ILearnosityItem {\n reference: string;\n questions: ILearnosityQuestion[];\n source: Record<string, unknown>;\n content: string;\n metadata: Record<string, unknown> | unknown[];\n workflow: unknown[];\n response_ids: string[];\n feature_ids: unknown[];\n features: unknown[];\n itemType?: TItemType;\n tags?: string[];\n}\n\nexport interface IWorksheetQuestion extends ILearnosityQuestion {\n item_reference: string;\n item_type?: TItemType;\n section_name?: TSectionName;\n is_optional?: boolean;\n /**\n * If true, the question is not a question, but a content only item\n * e.g. Intro, Overview, Instruction etc.\n */\n is_non_question?: boolean;\n concept_intro_stimulus?: string; // Content for concept intro widget\n item_tags: string[];\n item_tags_map: Record<string, string>;\n item_number: number;\n item_display_number: number;\n question_number: number;\n total_questions: number;\n}\n\nexport interface ILearnosityQuestionScore {\n score?: number | null;\n max_score: number;\n unscored?: boolean;\n}\n\nexport interface ILearnosityQuestionResponse {\n value: unknown;\n responses?: unknown;\n type: unknown;\n updatedFormat?: boolean;\n wordCount?: number;\n apiVersion: string;\n revision: number;\n feedbackAttemptsCount?: number;\n}\n\ninterface IAttempt {\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n}\n\ninterface ITeacherReview {\n reviewComment?: string;\n images?: string[];\n}\nexport interface IWorksheetResponse {\n widgetReference: string;\n itemReference: string;\n itemPosition: number; // 0 based\n questionPosition: number; // 0 based\n isOkayTypeQuestion: boolean;\n response?: ILearnosityQuestionResponse;\n /**\n * For non question questions, when user click on start, responseGiven will be true\n */\n responseGiven?: boolean;\n retryEnabled?: boolean;\n simState?: Record<string, unknown>;\n score?: ILearnosityQuestionScore;\n responseEdited?: boolean;\n hintsUsed?: number;\n markedForReview?: boolean;\n attemptsHistory?: IAttempt[];\n validatedByTeacher?: boolean;\n submittedByStudent?: boolean;\n assignStatus?: 'assigned' | 'skipped';\n rating?: number;\n skipped?: boolean;\n doubtResolved?: boolean;\n teacherReview?: ITeacherReview;\n tags?: Record<string, string>;\n timeSpent?: number;\n discussionQuestionOffset?: number;\n}\n\ntype TMathRenderer = 'mathjax' | 'mathquill';\nexport interface ILearnosity {\n ready: () => void;\n questions: () => Record<string, unknown>;\n question: (responseId: string) =>\n | {\n enable: () => boolean;\n disable: () => boolean;\n getQuestion: () => ILearnosityQuestion;\n getMetadata: () => ILearnosityQuestionMetadata;\n getResponse: () => ILearnosityQuestionResponse;\n getScore: (\n callback?: (score: ILearnosityQuestionScore | null) => void,\n ) => ILearnosityQuestionScore;\n validate: (\n options?: { showCorrectAnswers?: boolean; feedbackAttempts?: boolean },\n callback?: () => void,\n ) => void;\n resetValidationUI: () => void;\n on: (eventName: 'changed', callback: () => void) => void;\n off: (eventName: 'changed', callback?: () => void) => void;\n }\n | undefined;\n append: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n appendQuestion: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n reset: () => void;\n renderMath: (renderer: TMathRenderer) => void;\n}\n\nexport interface IWorksheetBehavior {\n /**\n * If true, Opens the worksheet in resume mode.\n * - If false, Opens the worksheet in review mode.\n */\n canAttempt: boolean;\n /**\n * If true, the user can mark the question for review.\n */\n canMarkForReview: boolean;\n /**\n * The mode of navigation for the worksheet.\n * - `OPEN` mode allows the user to navigate to any question in the worksheet.\n * - `LINEAR` mode allows the user to navigate to the next question only.\n * - `ADAPTIVE` mode allows the user to navigate future questions based on the rating of the current question.\n * - `CURRENT` mode allows the user to navigate to the current question only. Back and forth not allowed.\n */\n navigationMode: 'OPEN' | 'LINEAR' | 'ADAPTIVE' | 'CURRENT';\n /**\n * The initial question to display when the worksheet is loaded.\n * - `FIRST` mode displays the first question in the worksheet.\n * - `CURRENT` mode displays the question that the user was last on.\n */\n initialQuestion: 'FIRST' | 'CURRENT';\n /**\n * If hints are available, on clicking the help button, first availble hint will be shown.\n * Clicking again will show the next hint.\n * If no more hints are available, onHelp will be called.\n */\n hints: boolean;\n /**\n * The time in seconds after which the hints button will be shown.\n */\n hintsTimer?: number; // in seconds\n /**\n * If true, the user can skip the question without attempting it.\n * Skip button will be shown only after the hints are exausted and skipTimer is reached.\n */\n skippable?: boolean;\n /**\n * The time in seconds after which the user can skip the question.\n */\n skippableTime?: number; // in seconds\n /**\n * If true, after the question is system validated, teacher discussion button will be shown when the question has discussion points.\n */\n teacherDiscussionEnabled?: boolean;\n /**\n * If true, teacher validation is needed for the question to proceed\n */\n teacherValidationEnabled: boolean;\n /**\n * If worksheet is attempting outside the class setting\n * This needs teacherValidationEnabled to be true\n * TODO: Consider changing to accept validation type: 'system' | 'teacher' | undefined instead of boolean\n */\n canTeacherValidate: boolean;\n /**\n * If true, questions will be validated and feedback will be shown.\n */\n validation: boolean;\n /**\n * If true, solution wont be shown to the user.\n */\n solutionHidden?: boolean;\n /**\n * If true, questions will be validated and feedback will be shown along with the correct answer.\n */\n review: boolean;\n /**\n * The maximum number of attempts allowed for each question.\n * 0 means unlimited attempts.\n * -1 means attempts will not be validated, hence not pushed to attempt history.\n * -2 means the sheet is a puzzle sheet\n * After reaching the maximum number of attempts, the user cannot attempt the question anymore.\n * If maxAtttmpts reached and canExceedAttempts is true, the user can still attempt the question\n * , also user will have the option to move to next question\n */\n maximumAttempts: number;\n /**\n * If true, the user can exceed the maximum number of attempts.\n */\n canExceedAttempts: boolean;\n\n /**\n * After attemptsAfterTeacherInterventionNeeded incorrect attempts, retry button will be disabled in class, move ahead button will show ouside class.\n */\n attemptsAfterTeacherInterventionNeeded?: number;\n /**\n * If the worksheet minimumAccuracy is not met, on clicking the final submit button, onMinimumAccuracyNotMet will be called.\n */\n minimumAccuracy: number;\n /**\n * Label for the check button\n * For example,\n * - \"Check\" for Checking the answer\n * - \"Submit\" for Submitting the answer when doing assessment\n */\n checkButtonLabel: string;\n /**\n * If attempt is incorrect, we show retry button, this is the label for the retry button\n * For example,\n * - 'Try Again' for retrying the question\n */\n retryButtonLabel: string;\n /**\n * If true show demos calculator https://www.desmos.com/calculator\n */\n canShowDesmosCalc: boolean;\n\n // If true, canvas is enabled and user can use canvas to scribble on the worksheet by toggling the scribble button\n canvasEnabled?: boolean;\n\n // If true, the user can scribble on workheet\n canScribble?: boolean;\n}\n\nexport type TWORKSHEET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';\n\nexport interface IWorksheetCallbackProps {\n onResponseChange?: (options: {\n responseId: string;\n response: IWorksheetResponse;\n isNewAttempt: boolean;\n question: IWorksheetQuestion;\n }) => void;\n onBulkResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onMediaStateChange?: (\n question: IWorksheetQuestion,\n mediaType: TWORKSHEET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n onTeacherValidation?: (questionId: string, rating?: keyof typeof QUESTIONS_RATING) => void;\n onAllowRetry?: (questionId: string) => void;\n onOptionalItemAssignment?: (itemType: TItemType) => void;\n onOptionalItemSkip?: (itemType: TItemType) => void;\n onHelp?: (options: { questionId: string; questionNumber: string }) => void;\n onMinimumAccuracyNotMet?: (accuracy: number) => void;\n onExitTicketStart?: () => void;\n onExitTicketSubmit?: () => void;\n onSubmit?: (\n responses: Record<string, IWorksheetResponse>,\n questions: IWorksheetQuestion[],\n ) => void;\n onActiveQuestionChange?: (question: IWorksheetQuestion) => void;\n onResolveDoubt?: (responseId: string) => void;\n onSkip?: (itemIndex: number, widgetIndex: number) => void;\n onLoaded: () => void;\n onErrored: (error: { code?: number; message: string }) => void;\n onResponsesLoaded?: (responses: Record<string, IWorksheetResponse>) => void;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n}\n\ninterface ICueCanvasCallbackProps {\n onPublishStrokes?: TPublish;\n onReceiveStrokes?: TSubscribe;\n}\n\ninterface ICueCanvasProps {\n initialStrokesData?: Record<string, IActionData[]>;\n}\n\ninterface IPointerSyncCallbackProps {\n onPublishMouseMove?: TPublishMouseMove;\n onSubscribeMouseMove?: TSubscribeMouseMove;\n}\n\nexport interface IWorksheetLayout {\n containerStyle: 'none' | 'card';\n navigationBar: 'none' | 'top' | 'bottom';\n actionBar: 'none' | 'bottom';\n containerWidth: string;\n topOffset: number; // Offset from the top of the screen, for eg: height of the header\n questionsScrollable: boolean;\n minQuestionHeight: string | number;\n minSummaryHeight: string | number;\n showUserPointer?: boolean;\n renderQuestionHeader?: boolean;\n imageHue?: THueNames;\n background?: 'none' | 'paper';\n questionPadding: number;\n}\n\nexport interface ISubjectiveSheetProps {\n onAddReviewComment?: (\n responseId: string,\n commentData: {\n score: ILearnosityQuestionScore;\n teacherReview: ITeacherReview;\n },\n ) => void;\n openImagesReviewModal?: (props: IOpenImageReviewModalProps) => void;\n handleReviewSubmit?: () => void;\n isSubmittingReview?: boolean;\n isReviewPending?: boolean;\n}\n\ninterface IBaseWorksheetProps {\n userType: TUserTypes;\n userId: string;\n studentId: string;\n studentName?: string;\n worksheetName: string;\n initialResponseId?: string;\n initialItemIndex?: number;\n layout: IWorksheetLayout;\n updatedResponses?: Record<string, IWorksheetResponse>;\n worksheetCompleted: boolean;\n showNudgeBanner?: boolean;\n markedAsCompleted?: boolean;\n canResolveDoubt?: boolean;\n canShowActionBar?: boolean;\n actionBarRightElement?: ReactElement; // Extra Elements to be rendered in the action bar\n attemptId?: string;\n itemsSignedRequest: string;\n questionsSignedRequest: string;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n subjectiveProps?: ISubjectiveSheetProps;\n inClass?: boolean; // If true, the worksheet is rendered inside class\n activityType: EWorksheetActivity | null;\n isDesmosEnabled?: boolean; // If true, the worksheet can show desmos calculator\n nodeType: TNodeTypes; // NodeType of the worksheet\n mode: 'resume' | 'review' | 'preview'; // mode of the worksheet\n loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;\n}\n\ninterface IWorksheetPlugins {\n plugins?: {\n stickers?: ReactNode;\n };\n}\n\ninterface IUpdateImages {\n filteredImages: string[];\n newImages: IFile[];\n}\ninterface IOpenImageReviewModalProps {\n isReviewed?: boolean;\n disableScoreForm?: boolean;\n imageUrls?: string[];\n filteredImageUrls?: (props: IUpdateImages) => void;\n uploadedImages?: (IFile | string)[];\n image?: string;\n}\n\nexport interface IWorksheetProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps,\n IWorksheetPlugins {}\n\nexport interface IWorksheetRef {\n validateQuestion: (\n responseId: string,\n rating?: keyof typeof QUESTIONS_RATING,\n skipRemainingQuestions?: boolean,\n ) => void;\n assignOptionalItems: (itemType: TItemType) => void;\n skipOptionalItems: (itemType: TItemType) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHEET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n allowRetry: (responseId: string) => void;\n}\n\ninterface IWorksheetHeaderLayoutArgs {\n isPuzzleWorksheet?: boolean;\n isTestWorksheet?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface IWorksheetHeaderLayoutProps {\n (args: IWorksheetHeaderLayoutArgs): {\n bgColor: TColorNames;\n borderColor?: TColorNames;\n textColor?: TColorNames;\n };\n}\n\nexport type TWorksheetStoreProps = Omit<\n IBaseWorksheetProps,\n 'studentName' | 'canShowActionBar' | 'itemsSignedRequest' | 'mode'\n> &\n Required<Pick<IBaseWorksheetProps, 'studentName' | 'canShowActionBar'>> &\n Omit<IWorksheetCallbackProps, 'onLoaded' | 'onErrored'> &\n ICueCanvasProps &\n ICueCanvasCallbackProps &\n IPointerSyncCallbackProps &\n IWorksheetPlugins & {\n behavior: IWorksheetBehavior;\n learnosityItems: ILearnosityItem[];\n learnosityResponses?: Record<string, IWorksheetResponse>;\n learnosity: ILearnosity;\n appendedQuestionIds: string[];\n };\n\nexport enum EActiveQuestionTool {\n TEACHING_TOOLS = 'TEACHING_TOOLS',\n SOLUTION = 'SOLUTION',\n}\n\nexport interface IWorksheetStoreState {\n questions: IWorksheetQuestion[];\n renderableQuestions: IWorksheetQuestion[];\n responses: Record<string, IWorksheetResponse>;\n lastUnlockedQuestionIndex: number;\n initialQuestionId: string;\n activeQuestionId: string;\n activeQuestionIndex: number;\n questionsContainerWidth: number;\n maxQuestionWidth: number;\n actionbarHeight: number;\n summaryVisible: boolean;\n calculatorVisible: boolean;\n scribblingEnabled: boolean;\n activeQuestionTool?: EActiveQuestionTool;\n blocker?: TWorksheetBlocker;\n}\n\n// Actions interface - contains all the methods\ninterface IWorksheetStoreActions {\n mergeWorksheetProps: (data: TWorksheetStoreProps) => void;\n setResponses: (\n responses:\n | IWorksheetStore['responses']\n | ((prevResponses: IWorksheetStore['responses']) => IWorksheetStore['responses']),\n ) => void;\n showSummary: () => void;\n hideSummary: () => void;\n toggleSummary: () => void;\n toggleCalculator: () => void;\n toggleScribble: () => void;\n setBlocker: (blocker?: TWorksheetBlocker) => void;\n removeBlocker: () => void;\n updateResponse: (options: {\n responseId: string;\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n timeSpent: number;\n answerChecked?: boolean;\n }) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHEET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n setDiscussionQuestionOffset: (responseId: string, offset: number) => void;\n markForReview: (responseId: string, markedForReview: boolean) => void;\n changeQuestion: (questionId: string, shouldScroll?: boolean, scrollDelay?: number) => void;\n setActiveQuestionTool: (tool: EActiveQuestionTool) => void;\n unsetActiveQuestionTool: () => void;\n destroy: () => void;\n}\n\n// Combined store interface\nexport interface IWorksheetStore\n extends IWorksheetStoreState,\n TWorksheetStoreProps,\n IWorksheetStoreActions {}\n"],"names":["QUESTION_TAGS","QUESTIONS_RATING","EActiveQuestionTool"],"mappings":"AASY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KAHUA,IAAAA,KAAA,CAAA,CAAA,GAmjBAC,sBAAAA,OACVA,EAAA,iBAAiB,kBACjBA,EAAA,WAAW,YAFDA,IAAAA,KAAA,CAAA,CAAA;"}