@instructure/quiz-core 22.15.0 → 22.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1593) hide show
  1. package/es/banks/api/bankEntries.js +268 -175
  2. package/es/banks/api/banks.js +396 -286
  3. package/es/banks/api/copyingBanksPoller.js +193 -80
  4. package/es/banks/api/tagAssociations.js +199 -79
  5. package/es/banks/components/AddBankEntryModal/index.js +15 -12
  6. package/es/banks/components/AddBankEntryModal/presenter.js +178 -112
  7. package/es/banks/components/AddToBankModal/index.js +18 -11
  8. package/es/banks/components/AddToBankModal/presenter.js +249 -190
  9. package/es/banks/components/AsyncSearch/index.js +516 -386
  10. package/es/banks/components/Bank/index.js +43 -31
  11. package/es/banks/components/Bank/presenter.js +687 -476
  12. package/es/banks/components/Bank/styles.js +85 -36
  13. package/es/banks/components/Bank/theme.js +13 -15
  14. package/es/banks/components/BankEntriesList/index.js +10 -7
  15. package/es/banks/components/BankEntriesList/presenter.js +138 -61
  16. package/es/banks/components/BankEntriesList/styles.js +7 -7
  17. package/es/banks/components/BankEntriesList/theme.js +6 -6
  18. package/es/banks/components/BankEntry/index.js +75 -43
  19. package/es/banks/components/BankEntry/presenter.js +933 -702
  20. package/es/banks/components/BankEntry/styles.js +115 -66
  21. package/es/banks/components/BankEntry/theme.js +24 -27
  22. package/es/banks/components/BankEntryRow/index.js +44 -25
  23. package/es/banks/components/BankEntryRow/presenter.js +507 -409
  24. package/es/banks/components/BankEntryRow/styles.js +47 -47
  25. package/es/banks/components/BankEntryRow/theme.js +20 -23
  26. package/es/banks/components/BankSearch/index.js +29 -20
  27. package/es/banks/components/BankSearch/presenter.js +241 -173
  28. package/es/banks/components/BankSearch/styles.js +15 -15
  29. package/es/banks/components/BankSearch/theme.js +7 -7
  30. package/es/banks/components/Banks/index.js +32 -26
  31. package/es/banks/components/Banks/presenter.js +590 -502
  32. package/es/banks/components/Banks/styles.js +27 -27
  33. package/es/banks/components/Banks/theme.js +12 -14
  34. package/es/banks/components/BanksList/index.js +19 -13
  35. package/es/banks/components/BanksList/presenter.js +682 -484
  36. package/es/banks/components/BanksList/styles.js +43 -43
  37. package/es/banks/components/BanksList/theme.js +18 -21
  38. package/es/banks/components/CopyMoveBankEntryModal/index.js +25 -15
  39. package/es/banks/components/CopyMoveBankEntryModal/presenter.js +344 -285
  40. package/es/banks/components/CreateBankModal/index.js +34 -23
  41. package/es/banks/components/CreateBankModal/presenter.js +240 -173
  42. package/es/banks/components/EditBankModal/index.js +24 -18
  43. package/es/banks/components/EditBankModal/presenter.js +197 -129
  44. package/es/banks/components/HeaderBreadCrumb/index.js +60 -67
  45. package/es/banks/components/HeaderMenu/index.js +5 -5
  46. package/es/banks/components/HeaderMenu/presenter.js +176 -94
  47. package/es/banks/components/HeaderMenu/styles.js +12 -12
  48. package/es/banks/components/HeaderMenu/theme.js +7 -8
  49. package/es/banks/components/NavWrapper/externalStyles.js +5 -5
  50. package/es/banks/components/NavWrapper/index.js +7 -4
  51. package/es/banks/components/NavWrapper/presenter.js +239 -158
  52. package/es/banks/components/NavWrapper/styles.js +52 -28
  53. package/es/banks/components/NavWrapper/theme.js +13 -17
  54. package/es/banks/components/SharingModal/ContextualIconButton/index.js +187 -54
  55. package/es/banks/components/SharingModal/RootAccountSharing.js +160 -79
  56. package/es/banks/components/SharingModal/ShareList/index.js +192 -120
  57. package/es/banks/components/SharingModal/ShareList/styles.js +7 -7
  58. package/es/banks/components/SharingModal/index.js +20 -17
  59. package/es/banks/components/SharingModal/presenter.js +766 -590
  60. package/es/banks/components/SharingModal/styles.js +11 -11
  61. package/es/banks/components/SharingModal/theme.js +8 -10
  62. package/es/building/api/items.js +409 -260
  63. package/es/building/api/qtiImports.js +86 -88
  64. package/es/building/api/quizEntries.js +498 -308
  65. package/es/building/api/quizzes.js +164 -179
  66. package/es/building/api/stimuli.js +60 -60
  67. package/es/building/components/QTIImportModal/index.js +24 -21
  68. package/es/building/components/layout/Sidebar/SidebarItem/index.js +33 -35
  69. package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +239 -130
  70. package/es/building/components/layout/Sidebar/SidebarItem/styles.js +7 -7
  71. package/es/building/components/layout/Sidebar/SidebarItem/theme.js +3 -3
  72. package/es/building/components/layout/Sidebar/Stimulus/index.js +41 -39
  73. package/es/building/components/layout/Sidebar/Stimulus/presenter.js +249 -138
  74. package/es/building/components/layout/Sidebar/Stimulus/styles.js +7 -7
  75. package/es/building/components/layout/Sidebar/Stimulus/theme.js +3 -3
  76. package/es/building/components/layout/Sidebar/index.js +26 -30
  77. package/es/building/components/layout/Sidebar/presenter.js +291 -211
  78. package/es/building/components/layout/Sidebar/styles.js +51 -27
  79. package/es/building/components/layout/Sidebar/theme.js +6 -6
  80. package/es/building/components/layout/header/BuildingButtons/index.js +24 -21
  81. package/es/building/components/layout/header/BuildingButtons/presenter.js +453 -368
  82. package/es/building/components/layout/header/BuildingButtons/styles.js +48 -23
  83. package/es/building/components/layout/header/BuildingButtons/theme.js +10 -12
  84. package/es/building/components/layout/header/SDKBuildingButtons/index.js +5 -5
  85. package/es/building/components/resources/ActionButtons/index.js +8 -8
  86. package/es/building/components/resources/ActionButtons/presenter.js +230 -154
  87. package/es/building/components/resources/ActionButtons/styles.js +53 -29
  88. package/es/building/components/resources/ActionButtons/theme.js +8 -9
  89. package/es/building/components/resources/AddToBankOptions/index.js +300 -92
  90. package/es/building/components/resources/AddToBankOptions/styles.js +9 -9
  91. package/es/building/components/resources/AddToBankOptions/theme.js +7 -8
  92. package/es/building/components/resources/BanksTray/index.js +27 -12
  93. package/es/building/components/resources/BanksTray/presenter.js +254 -191
  94. package/es/building/components/resources/DeleteStimulusModal/index.js +31 -22
  95. package/es/building/components/resources/DeleteStimulusModal/presenter.js +356 -277
  96. package/es/building/components/resources/DeleteStimulusModal/styles.js +20 -20
  97. package/es/building/components/resources/DeleteStimulusModal/theme.js +9 -10
  98. package/es/building/components/resources/ItemFeedbackModal/index.js +27 -14
  99. package/es/building/components/resources/ItemFeedbackModal/presenter.js +201 -124
  100. package/es/building/components/resources/ItemFeedbackModal/styles.js +12 -12
  101. package/es/building/components/resources/ItemFeedbackModal/theme.js +6 -6
  102. package/es/building/components/resources/MoveImmutableModal/index.js +23 -19
  103. package/es/building/components/resources/MoveImmutableModal/presenter.js +165 -101
  104. package/es/building/components/resources/quiz/editButton/EditButton.js +159 -55
  105. package/es/building/components/resources/quiz/instructions/Edit/index.js +7 -4
  106. package/es/building/components/resources/quiz/instructions/Edit/presenter.js +153 -78
  107. package/es/building/components/resources/quiz/instructions/Edit/styles.js +19 -19
  108. package/es/building/components/resources/quiz/instructions/Edit/theme.js +7 -7
  109. package/es/building/components/resources/quiz/instructions/Instructions/index.js +9 -9
  110. package/es/building/components/resources/quiz/instructions/Instructions/presenter.js +253 -186
  111. package/es/building/components/resources/quiz/instructions/Instructions/styles.js +41 -29
  112. package/es/building/components/resources/quiz/instructions/Instructions/theme.js +11 -13
  113. package/es/building/components/resources/quiz/instructions/Show/index.js +138 -69
  114. package/es/building/components/resources/quiz/instructions/Show/styles.js +27 -27
  115. package/es/building/components/resources/quiz/instructions/Show/theme.js +7 -9
  116. package/es/building/components/resources/quiz/title/Edit/index.js +224 -164
  117. package/es/building/components/resources/quiz/title/Show/index.js +137 -69
  118. package/es/building/components/resources/quiz/title/Show/styles.js +14 -14
  119. package/es/building/components/resources/quiz/title/Show/theme.js +6 -6
  120. package/es/building/components/resources/quiz/title/Title/index.js +10 -10
  121. package/es/building/components/resources/quiz/title/Title/presenter.js +258 -192
  122. package/es/building/components/resources/quiz/title/Title/styles.js +61 -36
  123. package/es/building/components/resources/quiz/title/Title/theme.js +14 -17
  124. package/es/building/components/resources/quizEntry/QuizEntry/index.js +57 -49
  125. package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +532 -371
  126. package/es/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +94 -36
  127. package/es/building/components/resources/quizEntry/QuizEntry/styles.js +32 -20
  128. package/es/building/components/resources/quizEntry/QuizEntry/theme.js +9 -12
  129. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/index.js +18 -18
  130. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +287 -217
  131. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +28 -28
  132. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +18 -21
  133. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +178 -96
  134. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +17 -17
  135. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +10 -13
  136. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/index.js +14 -16
  137. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +350 -229
  138. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +73 -24
  139. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +7 -10
  140. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +533 -340
  141. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +17 -18
  142. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +8 -10
  143. package/es/building/components/resources/quizEntry/QuizEntryEdit/index.js +76 -59
  144. package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +681 -434
  145. package/es/building/components/resources/quizEntry/QuizEntryEdit/styles.js +17 -17
  146. package/es/building/components/resources/quizEntry/QuizEntryEdit/theme.js +7 -10
  147. package/es/building/components/resources/quizEntry/QuizEntryShow/index.js +46 -24
  148. package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +458 -335
  149. package/es/building/components/resources/quizEntry/QuizEntryShow/styles.js +131 -82
  150. package/es/building/components/resources/quizEntry/QuizEntryShow/theme.js +22 -26
  151. package/es/common/actions/addInteractionTypes.js +5 -5
  152. package/es/common/actions/alerts.js +45 -52
  153. package/es/common/actions/analyses.js +45 -45
  154. package/es/common/actions/bankEntries.js +11 -11
  155. package/es/common/actions/bankSearch.js +28 -28
  156. package/es/common/actions/banks.js +48 -48
  157. package/es/common/actions/config.js +13 -13
  158. package/es/common/actions/dragAndDrop.js +5 -5
  159. package/es/common/actions/editing.js +15 -15
  160. package/es/common/actions/errorsShowing.js +17 -17
  161. package/es/common/actions/features.js +9 -9
  162. package/es/common/actions/grading.js +12 -12
  163. package/es/common/actions/items.js +5 -5
  164. package/es/common/actions/modal.js +56 -56
  165. package/es/common/actions/moderation.js +8 -8
  166. package/es/common/actions/modifications.js +410 -438
  167. package/es/common/actions/outcomes.js +17 -17
  168. package/es/common/actions/postMessage.js +5 -5
  169. package/es/common/actions/printing.js +9 -9
  170. package/es/common/actions/qtiImports.js +8 -8
  171. package/es/common/actions/quizEntries.js +37 -37
  172. package/es/common/actions/quizExport.js +6 -6
  173. package/es/common/actions/quizSessionEvents.js +6 -6
  174. package/es/common/actions/quizSessionResults.js +6 -6
  175. package/es/common/actions/quizSessions.js +78 -73
  176. package/es/common/actions/quizzes.js +43 -43
  177. package/es/common/actions/rce.js +18 -19
  178. package/es/common/actions/regrading.js +13 -13
  179. package/es/common/actions/reporting.js +21 -21
  180. package/es/common/actions/scrolling.js +10 -10
  181. package/es/common/actions/sessionItemResults.js +6 -6
  182. package/es/common/actions/sessionItems.js +6 -6
  183. package/es/common/actions/sharedBanks.js +29 -29
  184. package/es/common/actions/sharingModal.js +6 -6
  185. package/es/common/actions/sidebar.js +11 -11
  186. package/es/common/actions/stimuli.js +5 -5
  187. package/es/common/actions/tagAssociations.js +74 -74
  188. package/es/common/actions/taking.js +147 -149
  189. package/es/common/actions/ui.js +57 -57
  190. package/es/common/actions/upload.js +30 -30
  191. package/es/common/api/callHandlers.js +142 -97
  192. package/es/common/api/camelizeHelpers.js +7 -10
  193. package/es/common/api/features.js +11 -11
  194. package/es/common/api/fileUpload.js +24 -25
  195. package/es/common/api/getPersistenceActions.js +88 -88
  196. package/es/common/api/helpers.js +250 -125
  197. package/es/common/api/interactionTypes.js +8 -8
  198. package/es/common/api/quizSessions.js +196 -144
  199. package/es/common/api/quizzes.js +24 -25
  200. package/es/common/api/schema.js +45 -37
  201. package/es/common/components/AccessCodeTextInput/index.js +133 -53
  202. package/es/common/components/ApiFeatureFlagInitializer/index.js +20 -17
  203. package/es/common/components/ConfirmationModal/index.js +41 -13
  204. package/es/common/components/ConfirmationModal/presenter.js +178 -122
  205. package/es/common/components/ImportModal/ImportFileSelector/index.js +212 -125
  206. package/es/common/components/ImportModal/ImportFileSelector/styles.js +25 -25
  207. package/es/common/components/ImportModal/ImportFileSelector/theme.js +14 -16
  208. package/es/common/components/ImportModal/index.js +45 -36
  209. package/es/common/components/ImportModal/presenter.js +438 -356
  210. package/es/common/components/ImportModal/styles.js +7 -7
  211. package/es/common/components/ImportModal/theme.js +6 -6
  212. package/es/common/components/LearnosityCalculator/index.js +340 -153
  213. package/es/common/components/MaskedTextInput/index.js +162 -62
  214. package/es/common/components/Pin/index.js +1 -1
  215. package/es/common/components/Pin/presenter.js +122 -56
  216. package/es/common/components/PreviewFrame/index.js +112 -42
  217. package/es/common/components/PrintFontSizeModal/index.js +1 -1
  218. package/es/common/components/PrintFontSizeModal/presenter.js +243 -167
  219. package/es/common/components/PrintFontSizeModal/styles.js +11 -11
  220. package/es/common/components/PrintFontSizeModal/theme.js +8 -10
  221. package/es/common/components/RceConfigProvider/index.js +8 -8
  222. package/es/common/components/RceConfigProvider/presenter.js +393 -186
  223. package/es/common/components/RceConfigProvider/rceConfigErrorHandler.js +18 -18
  224. package/es/common/components/RceConfigProvider/rceConfigErrorMessages.js +15 -15
  225. package/es/common/components/RceConfigProvider/rceConfigFetcher.js +158 -42
  226. package/es/common/components/RceConfigProvider/rceConfigMapper.js +38 -23
  227. package/es/common/components/RceConfigProvider/rceConfigUtils.js +5 -5
  228. package/es/common/components/SDKApp/index.js +271 -175
  229. package/es/common/components/SDKApp/styles.js +7 -7
  230. package/es/common/components/SDKHeaderCalculator.js +11 -12
  231. package/es/common/components/SDKMenuButton.js +5 -5
  232. package/es/common/components/SDKNavBar.js +5 -5
  233. package/es/common/components/SDKTimer.js +11 -12
  234. package/es/common/components/TimingAlerts/index.js +1 -0
  235. package/es/common/components/TimingAlerts/presenter.js +42 -0
  236. package/es/common/components/alerts/index.js +11 -11
  237. package/es/common/components/alerts/presenter.js +174 -95
  238. package/es/common/components/alerts/styles.js +32 -20
  239. package/es/common/components/alerts/theme.js +10 -11
  240. package/es/common/components/layout/Page/index.js +168 -83
  241. package/es/common/components/layout/Page/styles.js +84 -35
  242. package/es/common/components/layout/Page/theme.js +8 -11
  243. package/es/common/components/layout/header/Calculator/index.js +8 -8
  244. package/es/common/components/layout/header/Calculator/presenter.js +179 -68
  245. package/es/common/components/layout/header/HeaderMenuButton/index.js +17 -14
  246. package/es/common/components/layout/header/HeaderMenuButton/presenter.js +136 -62
  247. package/es/common/components/layout/header/HeaderMenuButton/styles.js +34 -23
  248. package/es/common/components/layout/header/HeaderMenuButton/theme.js +9 -11
  249. package/es/common/components/layout/header/Timer/index.js +17 -17
  250. package/es/common/components/layout/header/Timer/presenter.js +254 -180
  251. package/es/common/components/layout/header/Timer/styles.js +25 -25
  252. package/es/common/components/layout/header/Timer/theme.js +15 -18
  253. package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +123 -41
  254. package/es/common/components/layout/navbar/externalStyles.js +7 -7
  255. package/es/common/components/layout/navbar/index.js +231 -122
  256. package/es/common/components/layout/navbar/styles.js +34 -9
  257. package/es/common/components/layout/navbar/theme.js +7 -8
  258. package/es/common/components/layout/sidebar/PositionSummary/index.js +145 -52
  259. package/es/common/components/layout/sidebar/PositionSummary/styles.js +26 -26
  260. package/es/common/components/layout/sidebar/PositionSummary/theme.js +12 -15
  261. package/es/common/components/layout/sidebar/Sidebar/Pin.js +114 -49
  262. package/es/common/components/layout/sidebar/Sidebar/externalStyles.js +10 -10
  263. package/es/common/components/layout/sidebar/Sidebar/index.js +433 -338
  264. package/es/common/components/layout/sidebar/Sidebar/styles.js +160 -111
  265. package/es/common/components/layout/sidebar/Sidebar/theme.js +31 -36
  266. package/es/common/components/layout/sidebar/SidebarItem/index.js +13 -13
  267. package/es/common/components/layout/sidebar/SidebarItem/presenter.js +267 -195
  268. package/es/common/components/layout/sidebar/SidebarItem/styles.js +82 -57
  269. package/es/common/components/layout/sidebar/SidebarItem/theme.js +23 -26
  270. package/es/common/components/layout/sidebar/Stimulus/Collection/index.js +2 -2
  271. package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +220 -149
  272. package/es/common/components/layout/sidebar/Stimulus/Collection/styles.js +71 -46
  273. package/es/common/components/layout/sidebar/Stimulus/Collection/theme.js +8 -10
  274. package/es/common/components/layout/sidebar/Stimulus/Summary/index.js +2 -2
  275. package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +207 -136
  276. package/es/common/components/layout/sidebar/Stimulus/Summary/styles.js +28 -28
  277. package/es/common/components/layout/sidebar/Stimulus/Summary/theme.js +11 -13
  278. package/es/common/components/layout/sidebar/Stimulus/Title/index.js +138 -58
  279. package/es/common/components/layout/sidebar/Stimulus/Title/styles.js +10 -10
  280. package/es/common/components/layout/sidebar/Stimulus/index.js +17 -14
  281. package/es/common/components/layout/sidebar/Stimulus/presenter.js +301 -227
  282. package/es/common/components/layout/sidebar/Stimulus/styles.js +7 -7
  283. package/es/common/components/layout/sidebar/Stimulus/theme.js +7 -10
  284. package/es/common/components/resources/BankSelection/index.js +14 -8
  285. package/es/common/components/resources/BankSelection/presenter.js +268 -113
  286. package/es/common/components/resources/WarningWrapper/index.js +212 -124
  287. package/es/common/components/resources/WarningWrapper/styles.js +26 -26
  288. package/es/common/components/resources/WarningWrapper/theme.js +11 -13
  289. package/es/common/components/resources/entry/EntrySave/index.js +11 -11
  290. package/es/common/components/resources/entry/EntrySave/presenter.js +385 -193
  291. package/es/common/components/resources/item/ItemEdit/index.js +60 -45
  292. package/es/common/components/resources/item/ItemEdit/presenter.js +298 -199
  293. package/es/common/components/resources/item/ItemOverride/index.js +17 -17
  294. package/es/common/components/resources/item/ItemOverride/presenter.js +181 -78
  295. package/es/common/components/resources/item/ItemShow/index.js +156 -47
  296. package/es/common/components/resources/positionBox/PositionBox.js +133 -49
  297. package/es/common/components/resources/positionBox/styles.js +35 -23
  298. package/es/common/components/resources/positionBox/theme.js +12 -14
  299. package/es/common/components/resources/quiz/AddContent/Body/index.js +12 -12
  300. package/es/common/components/resources/quiz/AddContent/Body/presenter.js +139 -140
  301. package/es/common/components/resources/quiz/AddContent/Body/styles.js +36 -22
  302. package/es/common/components/resources/quiz/AddContent/Body/theme.js +9 -13
  303. package/es/common/components/resources/quiz/AddContent/Button/index.js +178 -96
  304. package/es/common/components/resources/quiz/AddContent/Button/styles.js +74 -49
  305. package/es/common/components/resources/quiz/AddContent/Button/theme.js +20 -24
  306. package/es/common/components/resources/quiz/AddContent/Modal/index.js +19 -18
  307. package/es/common/components/resources/quiz/AddContent/Modal/presenter.js +103 -64
  308. package/es/common/components/resources/quiz/AddContent/Popover/index.js +24 -20
  309. package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +169 -127
  310. package/es/common/components/resources/quiz/AddContent/Popover/styles.js +28 -28
  311. package/es/common/components/resources/quiz/AddContent/Popover/theme.js +7 -8
  312. package/es/common/components/resources/quiz/info/QuizInfo.js +148 -39
  313. package/es/common/components/resources/quiz/instructions/Instructions.js +125 -48
  314. package/es/common/components/resources/quiz/instructions/styles.js +28 -28
  315. package/es/common/components/resources/quiz/instructions/theme.js +8 -9
  316. package/es/common/components/resources/quiz/title/Title.js +124 -46
  317. package/es/common/components/resources/quiz/title/styles.js +17 -17
  318. package/es/common/components/resources/quiz/title/theme.js +8 -9
  319. package/es/common/components/resources/quizSessionResult/Header/index.js +156 -78
  320. package/es/common/components/resources/quizSessionResult/Header/styles.js +27 -27
  321. package/es/common/components/resources/quizSessionResult/Header/theme.js +9 -10
  322. package/es/common/components/resources/quizSessionResult/Info/index.js +389 -290
  323. package/es/common/components/resources/quizSessionResult/Info/styles.js +55 -56
  324. package/es/common/components/resources/quizSessionResult/Info/theme.js +12 -13
  325. package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +173 -90
  326. package/es/common/components/resources/sessionItemResult/ResultStimulus/styles.js +127 -78
  327. package/es/common/components/resources/sessionItemResult/ResultStimulus/theme.js +28 -32
  328. package/es/common/components/resources/sessionItemResult/SessionItemResult/index.js +8 -5
  329. package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +415 -324
  330. package/es/common/components/resources/sessionItemResult/SessionItemResult/styles.js +73 -48
  331. package/es/common/components/resources/sessionItemResult/SessionItemResult/theme.js +27 -30
  332. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +158 -81
  333. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/styles.js +15 -15
  334. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +11 -14
  335. package/es/common/components/resources/stimulus/Stimulus/index.js +28 -19
  336. package/es/common/components/resources/stimulus/Stimulus/presenter.js +331 -211
  337. package/es/common/components/resources/stimulus/Stimulus/styles.js +102 -53
  338. package/es/common/components/resources/stimulus/Stimulus/theme.js +12 -15
  339. package/es/common/components/resources/stimulus/StimulusEdit/index.js +42 -36
  340. package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +670 -450
  341. package/es/common/components/resources/stimulus/StimulusEdit/styles.js +40 -40
  342. package/es/common/components/resources/stimulus/StimulusEdit/theme.js +13 -15
  343. package/es/common/components/resources/stimulus/StimulusEditInfo/index.js +16 -13
  344. package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +281 -201
  345. package/es/common/components/resources/stimulus/StimulusEditInfo/styles.js +12 -12
  346. package/es/common/components/resources/stimulus/StimulusEditInfo/theme.js +9 -11
  347. package/es/common/components/resources/stimulus/StimulusShow/index.js +184 -107
  348. package/es/common/components/resources/stimulus/StimulusShow/styles.js +24 -24
  349. package/es/common/components/resources/stimulus/StimulusShow/theme.js +10 -12
  350. package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +138 -68
  351. package/es/common/components/shared/Card/CardContent/index.js +143 -49
  352. package/es/common/components/shared/Card/CardContent/styles.js +29 -17
  353. package/es/common/components/shared/Card/CardContent/theme.js +14 -18
  354. package/es/common/components/shared/Card/CardWrapper/index.js +141 -47
  355. package/es/common/components/shared/Card/CardWrapper/styles.js +26 -14
  356. package/es/common/components/shared/Card/CardWrapper/theme.js +9 -11
  357. package/es/common/components/shared/Card/index.js +45 -19
  358. package/es/common/components/shared/ExpandButton/index.js +187 -65
  359. package/es/common/components/shared/ExpandButton/styles.js +37 -12
  360. package/es/common/components/shared/ExpandButton/theme.js +5 -5
  361. package/es/common/components/shared/FormattedDuration/index.js +185 -82
  362. package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +241 -183
  363. package/es/common/components/shared/IfFeature/index.js +4 -4
  364. package/es/common/components/shared/IfFeature/presenter.js +112 -39
  365. package/es/common/components/shared/InteractionTypes/index.js +2 -2
  366. package/es/common/components/shared/InteractionTypes/presenter.js +240 -163
  367. package/es/common/components/shared/InteractionTypes/styles.js +15 -15
  368. package/es/common/components/shared/InteractionTypes/theme.js +9 -11
  369. package/es/common/components/shared/PaginatedCollection/index.js +15 -12
  370. package/es/common/components/shared/PaginatedCollection/presenter.js +350 -160
  371. package/es/common/components/shared/PaginatedCollection/styles.js +10 -10
  372. package/es/common/components/shared/PaginatedCollection/theme.js +8 -10
  373. package/es/common/components/shared/Paginator/index.js +140 -59
  374. package/es/common/components/shared/Paginator/styles.js +7 -7
  375. package/es/common/components/shared/Paginator/theme.js +6 -6
  376. package/es/common/components/shared/PrintTrigger/index.js +31 -19
  377. package/es/common/components/shared/PrintTrigger/presenter.js +213 -123
  378. package/es/common/components/shared/TagDisplay/index.js +151 -70
  379. package/es/common/components/shared/TagDisplay/styles.js +7 -7
  380. package/es/common/components/shared/TagSelect/index.js +1 -1
  381. package/es/common/components/shared/TagSelect/presenter.js +326 -244
  382. package/es/common/components/shared/TagSuggestSelect/index.js +14 -9
  383. package/es/common/components/shared/TagSuggestSelect/presenter.js +158 -97
  384. package/es/common/components/shared/TagWrapper/index.js +1 -1
  385. package/es/common/components/shared/TagWrapper/presenter.js +127 -65
  386. package/es/common/components/shared/TimeUnitsInput/index.js +364 -310
  387. package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +183 -106
  388. package/es/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +65 -40
  389. package/es/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +16 -18
  390. package/es/common/components/shared/drag_and_drop/DragHandle/index.js +20 -14
  391. package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +320 -254
  392. package/es/common/components/shared/drag_and_drop/dragAndDropUtils.js +258 -271
  393. package/es/common/components/shared/file_selector/FileSelector.js +143 -60
  394. package/es/common/components/shared/file_selector/styles.js +10 -10
  395. package/es/common/components/shared/file_selector/theme.js +9 -11
  396. package/es/common/components/shared/functionality/componentWithOutsideClick.js +148 -66
  397. package/es/common/components/shared/functionality/componentWithOutsideClickEmotion.js +165 -75
  398. package/es/common/components/shared/functionality/disableDraggingOverride.js +7 -7
  399. package/es/common/components/shared/functionality/makeEditable.js +170 -104
  400. package/es/common/components/shared/functionality/makeScrollable.js +269 -126
  401. package/es/common/components/shared/overlay/index.js +161 -82
  402. package/es/common/components/shared/overlay/styles.js +36 -24
  403. package/es/common/components/shared/overlay/theme.js +8 -10
  404. package/es/common/components/shared/return_button/ReturnButton.js +128 -58
  405. package/es/common/components/shared/spinner/Spinner.js +188 -97
  406. package/es/common/components/shared/spinner/styles.js +13 -13
  407. package/es/common/kinesis/QuizEventsLogger.js +305 -115
  408. package/es/common/kinesis/StreamQueue.js +214 -138
  409. package/es/common/kinesis/client.js +31 -33
  410. package/es/common/kinesis/config.js +34 -33
  411. package/es/common/kinesis/eventTypes.js +27 -30
  412. package/es/common/middleware/alertTimerMiddleware.js +13 -14
  413. package/es/common/middleware/crossDomainMessagingMiddleware.js +9 -9
  414. package/es/common/middleware/eventLoggerMiddleware.js +21 -24
  415. package/es/common/middleware/persistedStorageMiddleware.js +39 -34
  416. package/es/common/middleware/quizTimerWebSocketMiddleware.js +60 -61
  417. package/es/common/middleware/sharedBanksMiddleware.js +355 -226
  418. package/es/common/react-redux.js +5 -6
  419. package/es/common/records/Alert.js +70 -29
  420. package/es/common/records/Bank.js +177 -105
  421. package/es/common/records/BankEntry.js +179 -95
  422. package/es/common/records/Item.js +226 -137
  423. package/es/common/records/ItemAnalysis.js +241 -157
  424. package/es/common/records/QtiImport.js +106 -48
  425. package/es/common/records/Quiz.js +304 -180
  426. package/es/common/records/QuizAnalysis.js +175 -104
  427. package/es/common/records/QuizEntry.js +662 -489
  428. package/es/common/records/QuizSession.js +278 -200
  429. package/es/common/records/QuizSessionEvent.js +113 -49
  430. package/es/common/records/QuizSessionResult.js +140 -71
  431. package/es/common/records/Response.js +108 -46
  432. package/es/common/records/SessionItem.js +206 -129
  433. package/es/common/records/SessionItemResult.js +140 -73
  434. package/es/common/records/Stimulus.js +160 -84
  435. package/es/common/records/baseRecord.js +184 -94
  436. package/es/common/records/index.js +1 -1
  437. package/es/common/records/reduxRecord.js +94 -38
  438. package/es/common/reducers/alerts.js +11 -12
  439. package/es/common/reducers/analyses.js +44 -33
  440. package/es/common/reducers/bankEntries.js +16 -14
  441. package/es/common/reducers/bankSearch.js +24 -29
  442. package/es/common/reducers/banks.js +50 -40
  443. package/es/common/reducers/calls.js +17 -12
  444. package/es/common/reducers/config.js +14 -15
  445. package/es/common/reducers/dragAndDrop.js +9 -10
  446. package/es/common/reducers/editing.js +19 -7
  447. package/es/common/reducers/errorsShowing.js +13 -14
  448. package/es/common/reducers/features.js +11 -12
  449. package/es/common/reducers/grading.js +13 -14
  450. package/es/common/reducers/interactionTypes.js +11 -12
  451. package/es/common/reducers/items.js +12 -13
  452. package/es/common/reducers/modal.js +24 -25
  453. package/es/common/reducers/moderation.js +14 -15
  454. package/es/common/reducers/modifications.js +259 -181
  455. package/es/common/reducers/outcomes.js +19 -20
  456. package/es/common/reducers/printing.js +10 -11
  457. package/es/common/reducers/qtiImports.js +14 -15
  458. package/es/common/reducers/quizEntries.js +155 -154
  459. package/es/common/reducers/quizExport.js +9 -10
  460. package/es/common/reducers/quizSessionEvents.js +17 -17
  461. package/es/common/reducers/quizSessionResults.js +12 -13
  462. package/es/common/reducers/quizSessions.js +47 -37
  463. package/es/common/reducers/quizzes.js +47 -36
  464. package/es/common/reducers/rce.js +15 -16
  465. package/es/common/reducers/regrading.js +18 -19
  466. package/es/common/reducers/reporting.js +50 -37
  467. package/es/common/reducers/scrolling.js +11 -12
  468. package/es/common/reducers/sessionItemResults.js +12 -13
  469. package/es/common/reducers/sessionItems.js +12 -13
  470. package/es/common/reducers/sharedBanks.js +21 -20
  471. package/es/common/reducers/sharingModal.js +13 -14
  472. package/es/common/reducers/sidebar.js +13 -14
  473. package/es/common/reducers/stimuli.js +12 -13
  474. package/es/common/reducers/tagAssociations.js +136 -87
  475. package/es/common/reducers/taking.js +133 -119
  476. package/es/common/reducers/ui.js +30 -27
  477. package/es/common/reducers/upload.js +20 -21
  478. package/es/common/selectors/analyses.js +59 -26
  479. package/es/common/selectors/calculator.js +16 -15
  480. package/es/common/selectors/calls.js +10 -2
  481. package/es/common/selectors/config.js +11 -8
  482. package/es/common/selectors/interactionTypes.js +68 -34
  483. package/es/common/selectors/items.js +14 -7
  484. package/es/common/selectors/qtiImports.js +19 -16
  485. package/es/common/selectors/quizSessionResults.js +10 -7
  486. package/es/common/selectors/quizSessions.js +23 -18
  487. package/es/common/selectors/quizzes.js +161 -86
  488. package/es/common/selectors/rce.js +11 -5
  489. package/es/common/selectors/reporting.js +13 -9
  490. package/es/common/selectors/sessionItemResults.js +52 -22
  491. package/es/common/selectors/sessionItems.js +63 -30
  492. package/es/common/selectors/taking.js +52 -21
  493. package/es/common/selectors/ui.js +6 -3
  494. package/es/common/util/CustomPropTypes.js +53 -46
  495. package/es/common/util/ElementsForSelectors.js +33 -7
  496. package/es/common/util/ExhaustivePaginatedFetcher.js +398 -100
  497. package/es/common/util/Fetcher.js +502 -356
  498. package/es/common/util/MultiWeakMap.js +72 -49
  499. package/es/common/util/PaginatedFetcher.js +303 -75
  500. package/es/common/util/ThunkQueue.js +286 -97
  501. package/es/common/util/TimeRecordingService.js +93 -55
  502. package/es/common/util/TimerService.js +200 -156
  503. package/es/common/util/cachePreviousArgs.js +16 -15
  504. package/es/common/util/callHelpers.js +23 -23
  505. package/es/common/util/clickHandlers.js +15 -16
  506. package/es/common/util/componentForItem.js +16 -17
  507. package/es/common/util/crossDomainMessaging.js +5 -5
  508. package/es/common/util/debounceLatestPromise.js +54 -23
  509. package/es/common/util/featureCheck.js +17 -19
  510. package/es/common/util/fetchHelpers.js +6 -6
  511. package/es/common/util/fitbCopyHelper.js +33 -32
  512. package/es/common/util/formatTimespan.js +46 -46
  513. package/es/common/util/generateDisplayPositions.js +18 -18
  514. package/es/common/util/getClientIpAddress.js +159 -32
  515. package/es/common/util/httpHeaders.js +12 -12
  516. package/es/common/util/immutableHelpers.js +13 -16
  517. package/es/common/util/instUIMessages.js +8 -8
  518. package/es/common/util/interactionTypeMetadata.js +25 -33
  519. package/es/common/util/interactionTypePropsHelper.js +77 -77
  520. package/es/common/util/interactionTypeRecordForItem.js +14 -15
  521. package/es/common/util/jsonify.js +48 -24
  522. package/es/common/util/keyboardClickable.js +7 -7
  523. package/es/common/util/localStoreService.js +63 -39
  524. package/es/common/util/mathRenderingUtils.js +1 -2
  525. package/es/common/util/maxContent.js +6 -6
  526. package/es/common/util/modalHelpers.js +6 -3
  527. package/es/common/util/noop.js +1 -1
  528. package/es/common/util/persistedState.js +53 -34
  529. package/es/common/util/printUtils.js +36 -36
  530. package/es/common/util/rceChecker.js +130 -18
  531. package/es/common/util/renderAlerts.js +13 -15
  532. package/es/common/util/serializeEvent.js +36 -29
  533. package/es/common/util/sessionStore.js +77 -54
  534. package/es/common/util/useRemoteComponent.js +266 -102
  535. package/es/common/util/valMap.js +7 -7
  536. package/es/common/util/warningHelpers.js +145 -108
  537. package/es/common/util/windowChecks.js +15 -15
  538. package/es/common/util/withCachedArguments.js +21 -23
  539. package/es/common/util/withDynamoPagination.js +333 -110
  540. package/es/common/util/withStateCache.js +32 -32
  541. package/es/config.js +10 -16
  542. package/es/configureStore.js +110 -86
  543. package/es/grading/api/quizEntryRegrades.js +28 -29
  544. package/es/grading/api/updateResults.js +33 -28
  545. package/es/index.js +4 -12
  546. package/es/messages/LocalStorageAdapter.js +44 -29
  547. package/es/messages/LocalStorageLimits.js +80 -65
  548. package/es/messages/StorageExhaustionError.js +118 -30
  549. package/es/messages/postMessageService.js +104 -75
  550. package/es/messages/subjectHandlers/forwardMessage.js +5 -5
  551. package/es/messages/subjectHandlers/lti.capabilities.js +12 -12
  552. package/es/messages/subjectHandlers/lti.fetchWindowSize.js +14 -14
  553. package/es/messages/subjectHandlers/lti.frameResize.js +8 -8
  554. package/es/messages/subjectHandlers/lti.get_data.js +16 -18
  555. package/es/messages/subjectHandlers/lti.put_data.js +37 -33
  556. package/es/messages/subjectHandlers/requestFullWindowLaunch.js +7 -7
  557. package/es/messages/utils.js +5 -5
  558. package/es/moderating/api/quizSessionEvents.js +14 -12
  559. package/es/moderating/api/quizSessions.js +38 -38
  560. package/es/moderating/components/events/Event.js +174 -105
  561. package/es/moderating/components/events/PageBlurredEvent.js +103 -33
  562. package/es/moderating/components/events/PageFocusedEvent.js +103 -33
  563. package/es/moderating/components/events/RCEEvent.js +108 -37
  564. package/es/moderating/components/events/ResponseEvent.js +207 -111
  565. package/es/moderating/components/events/SessionStartEvent.js +108 -38
  566. package/es/moderating/components/events/SessionSubmitEvent.js +108 -38
  567. package/es/moderating/components/events/styles.js +23 -23
  568. package/es/moderating/components/events/theme.js +10 -11
  569. package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +172 -108
  570. package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +153 -94
  571. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +201 -128
  572. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +240 -140
  573. package/es/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +183 -77
  574. package/es/moderating/components/resources/AccommodationsModal/index.js +195 -139
  575. package/es/moderating/components/resources/ElapsedTime.js +128 -60
  576. package/es/moderating/components/resources/EventDetails.js +12 -14
  577. package/es/moderating/components/resources/ModerateTable/index.js +38 -26
  578. package/es/moderating/components/resources/ModerateTable/presenter.js +487 -388
  579. package/es/moderating/components/resources/ModerateTable/styles.js +47 -22
  580. package/es/moderating/components/resources/ModerateTable/theme.js +7 -8
  581. package/es/moderating/components/resources/ModerateTableRow/index.js +8 -8
  582. package/es/moderating/components/resources/ModerateTableRow/presenter.js +453 -357
  583. package/es/moderating/components/resources/ModerateTableRow/story.js +5 -7
  584. package/es/moderating/components/resources/ModerateTableRow/styles.js +23 -23
  585. package/es/moderating/components/resources/ModerateTableRow/theme.js +7 -7
  586. package/es/moderating/components/resources/OutstandingQuizzesModal/index.js +9 -6
  587. package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +220 -150
  588. package/es/moderating/components/resources/RetryGradePassbackButton/index.js +6 -7
  589. package/es/moderating/components/resources/RetryGradePassbackButton/presenter.js +237 -72
  590. package/es/moderating/components/resources/util/extractSessionData.js +39 -24
  591. package/es/moderating/components/resources/util/renderEventSummary.js +23 -19
  592. package/es/moderating/components/sidebar/ModerateTray/index.js +12 -6
  593. package/es/moderating/components/sidebar/ModerateTray/presenter.js +290 -235
  594. package/es/moderating/components/sidebar/ResetQuiz/index.js +29 -27
  595. package/es/moderating/components/sidebar/ResetQuiz/presenter.js +285 -100
  596. package/es/reduxStore.js +16 -14
  597. package/es/reporting/api/fetchStudentAnalyses.js +143 -30
  598. package/es/reporting/api/getAnalysesExport.js +158 -49
  599. package/es/reporting/api/getAnalysesStatus.js +144 -34
  600. package/es/reporting/api/getItemAnalyses.js +141 -26
  601. package/es/reporting/api/getQuizAnalysis.js +141 -26
  602. package/es/reporting/api/itemAnalyses.js +12 -9
  603. package/es/reporting/api/quizAnalyses.js +15 -12
  604. package/es/reporting/components/Caption/index.js +133 -49
  605. package/es/reporting/components/Caption/styles.js +10 -10
  606. package/es/reporting/components/Caption/theme.js +7 -9
  607. package/es/reporting/components/MetricsListItem/index.js +175 -56
  608. package/es/reporting/components/MetricsListItem/styles.js +10 -10
  609. package/es/reporting/components/charts/CentileDistribution/index.js +1 -1
  610. package/es/reporting/components/charts/CentileDistribution/presenter.js +206 -137
  611. package/es/reporting/components/charts/CentileDistribution/styles.js +39 -27
  612. package/es/reporting/components/charts/CentileDistribution/theme.js +7 -9
  613. package/es/reporting/components/charts/Distribution/CentileDistribution.js +1 -1
  614. package/es/reporting/components/charts/Distribution/Distribution.js +1 -1
  615. package/es/reporting/components/charts/Distribution/QuintileDistribution.js +1 -1
  616. package/es/reporting/components/charts/Distribution/index.js +1 -1
  617. package/es/reporting/components/charts/Distribution/presenter.js +387 -301
  618. package/es/reporting/components/charts/Distribution/styles.js +20 -20
  619. package/es/reporting/components/charts/Distribution/theme.js +11 -12
  620. package/es/reporting/components/charts/Legend/index.js +180 -83
  621. package/es/reporting/components/charts/Legend/styles.js +66 -41
  622. package/es/reporting/components/charts/Legend/theme.js +14 -17
  623. package/es/reporting/components/charts/QuintileDistribution/index.js +1 -1
  624. package/es/reporting/components/charts/QuintileDistribution/presenter.js +207 -140
  625. package/es/reporting/components/charts/QuintileDistribution/styles.js +10 -10
  626. package/es/reporting/components/charts/QuintileDistribution/theme.js +8 -9
  627. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +204 -111
  628. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +48 -31
  629. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +21 -26
  630. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/index.js +5 -5
  631. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +333 -251
  632. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +105 -95
  633. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +22 -25
  634. package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +203 -129
  635. package/es/reporting/components/quizAnalysis/styles.js +35 -22
  636. package/es/reporting/components/quizAnalysis/theme.js +10 -13
  637. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +2 -2
  638. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +142 -61
  639. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +12 -12
  640. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +2 -2
  641. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +150 -68
  642. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +16 -16
  643. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/index.js +1 -1
  644. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +91 -44
  645. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +1 -1
  646. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +95 -48
  647. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/index.js +1 -1
  648. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +172 -99
  649. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +89 -40
  650. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +7 -7
  651. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/index.js +1 -1
  652. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +160 -88
  653. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +17 -17
  654. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +6 -6
  655. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +150 -67
  656. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +96 -49
  657. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/index.js +1 -1
  658. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +237 -173
  659. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +76 -51
  660. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +7 -7
  661. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +151 -69
  662. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/index.js +1 -1
  663. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/utils/matchingTypeOrderer.js +74 -34
  664. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/index.js +1 -1
  665. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +127 -85
  666. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/index.js +1 -1
  667. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +254 -217
  668. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/styles.js +8 -8
  669. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/theme.js +6 -6
  670. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/index.js +1 -1
  671. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +179 -132
  672. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/styles.js +8 -8
  673. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/theme.js +6 -6
  674. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +1 -1
  675. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +106 -63
  676. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +177 -106
  677. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/styles.js +34 -34
  678. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/theme.js +8 -9
  679. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +97 -50
  680. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +1 -1
  681. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +164 -93
  682. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/index.js +1 -1
  683. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +139 -65
  684. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +38 -13
  685. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +6 -6
  686. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/index.js +1 -1
  687. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/popoverContent.js +4 -4
  688. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +117 -59
  689. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/styles.js +9 -9
  690. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/index.js +1 -1
  691. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +210 -156
  692. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +139 -139
  693. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +11 -11
  694. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/index.js +1 -1
  695. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +242 -188
  696. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +140 -91
  697. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +9 -10
  698. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/index.js +1 -1
  699. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +148 -95
  700. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/styles.js +14 -14
  701. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/theme.js +5 -5
  702. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +26 -30
  703. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/index.js +2 -2
  704. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +188 -112
  705. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +13 -13
  706. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +6 -6
  707. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/index.js +1 -1
  708. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +118 -38
  709. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/styles.js +15 -15
  710. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +9 -9
  711. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +17 -17
  712. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/popoverContent.js +10 -10
  713. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +348 -285
  714. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +98 -73
  715. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +14 -17
  716. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/index.js +2 -2
  717. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js +7 -7
  718. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +237 -140
  719. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +38 -38
  720. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +14 -14
  721. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +1 -1
  722. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +255 -198
  723. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +75 -50
  724. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +11 -12
  725. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/index.js +1 -1
  726. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +159 -81
  727. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +18 -18
  728. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +10 -12
  729. package/es/reporting/components/resources/NewQuizAndItemAnalysis/exportFormats.js +1 -1
  730. package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +228 -51
  731. package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +166 -38
  732. package/es/reporting/components/resources/NewQuizAndItemAnalysis/index.js +1 -1
  733. package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +307 -261
  734. package/es/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +12 -12
  735. package/es/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +6 -6
  736. package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +27 -27
  737. package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +421 -208
  738. package/es/reporting/components/resources/OutcomeAnalysis/index.js +20 -8
  739. package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +125 -62
  740. package/es/reporting/components/resources/QuizAndItemAnalysis/index.js +28 -14
  741. package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +370 -277
  742. package/es/reporting/components/resources/QuizAndItemAnalysis/styles.js +16 -16
  743. package/es/reporting/components/resources/QuizAndItemAnalysis/theme.js +11 -13
  744. package/es/reporting/components/resources/ReportCard/index.js +144 -66
  745. package/es/reporting/components/resources/ReportCard/styles.js +32 -20
  746. package/es/reporting/components/resources/ReportCard/theme.js +10 -11
  747. package/es/reporting/components/resources/ReportList/index.js +139 -54
  748. package/es/reporting/components/resources/ReportList/styles.js +17 -17
  749. package/es/reporting/components/resources/ReportList/theme.js +8 -8
  750. package/es/reporting/components/resources/StudentAnalysis/ReportCard/index.js +1 -1
  751. package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +215 -154
  752. package/es/reporting/components/resources/StudentAnalysis/ReportCard/styles.js +66 -42
  753. package/es/reporting/components/resources/StudentAnalysis/ReportCard/theme.js +11 -13
  754. package/es/reporting/components/resources/StudentAnalysis/fetchReport.js +174 -45
  755. package/es/reporting/components/resources/StudentAnalysis/fetchReportStatus.js +166 -38
  756. package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +23 -23
  757. package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +418 -213
  758. package/es/reporting/components/resources/common/AnalysisUpdateDate/index.js +115 -49
  759. package/es/reporting/components/resources/common/ExportButton/index.js +16 -17
  760. package/es/reporting/components/resources/common/errorCodes.js +19 -19
  761. package/es/reporting/components/resources/common/errorMessages.js +17 -17
  762. package/es/reporting/components/resources/common/exportReports.js +174 -50
  763. package/es/reporting/components/resources/common/generateReports.js +215 -72
  764. package/es/reporting/components/resources/common/propTypes.js +145 -133
  765. package/es/reporting/components/resources/common/utils.js +14 -14
  766. package/es/taking/api/taking.js +375 -257
  767. package/es/taking/learnosity/index.js +268 -115
  768. package/lib/banks/api/bankEntries.js +279 -193
  769. package/lib/banks/api/banks.js +412 -311
  770. package/lib/banks/api/copyingBanksPoller.js +196 -90
  771. package/lib/banks/api/tagAssociations.js +205 -92
  772. package/lib/banks/components/AddBankEntryModal/index.js +25 -30
  773. package/lib/banks/components/AddBankEntryModal/presenter.js +186 -129
  774. package/lib/banks/components/AddToBankModal/index.js +28 -31
  775. package/lib/banks/components/AddToBankModal/presenter.js +257 -207
  776. package/lib/banks/components/AsyncSearch/index.js +518 -397
  777. package/lib/banks/components/Bank/index.js +59 -57
  778. package/lib/banks/components/Bank/presenter.js +707 -505
  779. package/lib/banks/components/Bank/styles.js +85 -43
  780. package/lib/banks/components/Bank/theme.js +13 -21
  781. package/lib/banks/components/BankEntriesList/index.js +15 -20
  782. package/lib/banks/components/BankEntriesList/presenter.js +145 -75
  783. package/lib/banks/components/BankEntriesList/styles.js +7 -13
  784. package/lib/banks/components/BankEntriesList/theme.js +6 -12
  785. package/lib/banks/components/BankEntry/index.js +93 -68
  786. package/lib/banks/components/BankEntry/presenter.js +961 -737
  787. package/lib/banks/components/BankEntry/styles.js +115 -73
  788. package/lib/banks/components/BankEntry/theme.js +24 -33
  789. package/lib/banks/components/BankEntryRow/index.js +56 -46
  790. package/lib/banks/components/BankEntryRow/presenter.js +526 -437
  791. package/lib/banks/components/BankEntryRow/styles.js +47 -53
  792. package/lib/banks/components/BankEntryRow/theme.js +20 -29
  793. package/lib/banks/components/BankSearch/index.js +35 -33
  794. package/lib/banks/components/BankSearch/presenter.js +258 -197
  795. package/lib/banks/components/BankSearch/styles.js +15 -21
  796. package/lib/banks/components/BankSearch/theme.js +7 -13
  797. package/lib/banks/components/Banks/index.js +43 -45
  798. package/lib/banks/components/Banks/presenter.js +611 -532
  799. package/lib/banks/components/Banks/styles.js +27 -33
  800. package/lib/banks/components/Banks/theme.js +12 -20
  801. package/lib/banks/components/BanksList/index.js +29 -31
  802. package/lib/banks/components/BanksList/presenter.js +700 -511
  803. package/lib/banks/components/BanksList/styles.js +43 -49
  804. package/lib/banks/components/BanksList/theme.js +18 -27
  805. package/lib/banks/components/CopyMoveBankEntryModal/index.js +35 -35
  806. package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +353 -303
  807. package/lib/banks/components/CreateBankModal/index.js +47 -45
  808. package/lib/banks/components/CreateBankModal/presenter.js +248 -190
  809. package/lib/banks/components/EditBankModal/index.js +34 -37
  810. package/lib/banks/components/EditBankModal/presenter.js +204 -145
  811. package/lib/banks/components/HeaderBreadCrumb/index.js +65 -82
  812. package/lib/banks/components/HeaderMenu/index.js +10 -19
  813. package/lib/banks/components/HeaderMenu/presenter.js +190 -115
  814. package/lib/banks/components/HeaderMenu/styles.js +12 -18
  815. package/lib/banks/components/HeaderMenu/theme.js +7 -14
  816. package/lib/banks/components/NavWrapper/externalStyles.js +5 -11
  817. package/lib/banks/components/NavWrapper/index.js +10 -14
  818. package/lib/banks/components/NavWrapper/presenter.js +251 -177
  819. package/lib/banks/components/NavWrapper/styles.js +53 -36
  820. package/lib/banks/components/NavWrapper/theme.js +13 -23
  821. package/lib/banks/components/SharingModal/ContextualIconButton/index.js +190 -66
  822. package/lib/banks/components/SharingModal/RootAccountSharing.js +169 -97
  823. package/lib/banks/components/SharingModal/ShareList/index.js +203 -138
  824. package/lib/banks/components/SharingModal/ShareList/styles.js +7 -13
  825. package/lib/banks/components/SharingModal/index.js +27 -31
  826. package/lib/banks/components/SharingModal/presenter.js +787 -620
  827. package/lib/banks/components/SharingModal/styles.js +11 -17
  828. package/lib/banks/components/SharingModal/theme.js +8 -16
  829. package/lib/building/api/items.js +419 -279
  830. package/lib/building/api/qtiImports.js +93 -101
  831. package/lib/building/api/quizEntries.js +529 -357
  832. package/lib/building/api/quizzes.js +201 -248
  833. package/lib/building/api/stimuli.js +67 -74
  834. package/lib/building/components/QTIImportModal/index.js +32 -36
  835. package/lib/building/components/layout/Sidebar/SidebarItem/index.js +47 -56
  836. package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +248 -146
  837. package/lib/building/components/layout/Sidebar/SidebarItem/styles.js +7 -13
  838. package/lib/building/components/layout/Sidebar/SidebarItem/theme.js +3 -9
  839. package/lib/building/components/layout/Sidebar/Stimulus/index.js +53 -58
  840. package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +257 -153
  841. package/lib/building/components/layout/Sidebar/Stimulus/styles.js +7 -13
  842. package/lib/building/components/layout/Sidebar/Stimulus/theme.js +3 -9
  843. package/lib/building/components/layout/Sidebar/index.js +41 -52
  844. package/lib/building/components/layout/Sidebar/presenter.js +300 -227
  845. package/lib/building/components/layout/Sidebar/styles.js +51 -34
  846. package/lib/building/components/layout/Sidebar/theme.js +6 -12
  847. package/lib/building/components/layout/header/BuildingButtons/index.js +38 -45
  848. package/lib/building/components/layout/header/BuildingButtons/presenter.js +462 -384
  849. package/lib/building/components/layout/header/BuildingButtons/styles.js +48 -30
  850. package/lib/building/components/layout/header/BuildingButtons/theme.js +10 -18
  851. package/lib/building/components/layout/header/SDKBuildingButtons/index.js +9 -16
  852. package/lib/building/components/resources/ActionButtons/index.js +16 -23
  853. package/lib/building/components/resources/ActionButtons/presenter.js +239 -170
  854. package/lib/building/components/resources/ActionButtons/styles.js +53 -36
  855. package/lib/building/components/resources/ActionButtons/theme.js +8 -15
  856. package/lib/building/components/resources/AddToBankOptions/index.js +308 -107
  857. package/lib/building/components/resources/AddToBankOptions/styles.js +9 -15
  858. package/lib/building/components/resources/AddToBankOptions/theme.js +7 -14
  859. package/lib/building/components/resources/BanksTray/index.js +33 -24
  860. package/lib/building/components/resources/BanksTray/presenter.js +266 -212
  861. package/lib/building/components/resources/DeleteStimulusModal/index.js +40 -37
  862. package/lib/building/components/resources/DeleteStimulusModal/presenter.js +368 -298
  863. package/lib/building/components/resources/DeleteStimulusModal/styles.js +20 -26
  864. package/lib/building/components/resources/DeleteStimulusModal/theme.js +9 -16
  865. package/lib/building/components/resources/ItemFeedbackModal/index.js +38 -32
  866. package/lib/building/components/resources/ItemFeedbackModal/presenter.js +207 -137
  867. package/lib/building/components/resources/ItemFeedbackModal/styles.js +12 -18
  868. package/lib/building/components/resources/ItemFeedbackModal/theme.js +6 -12
  869. package/lib/building/components/resources/MoveImmutableModal/index.js +32 -35
  870. package/lib/building/components/resources/MoveImmutableModal/presenter.js +170 -115
  871. package/lib/building/components/resources/quiz/editButton/EditButton.js +165 -70
  872. package/lib/building/components/resources/quiz/instructions/Edit/index.js +9 -13
  873. package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +165 -94
  874. package/lib/building/components/resources/quiz/instructions/Edit/styles.js +19 -25
  875. package/lib/building/components/resources/quiz/instructions/Edit/theme.js +7 -13
  876. package/lib/building/components/resources/quiz/instructions/Instructions/index.js +18 -25
  877. package/lib/building/components/resources/quiz/instructions/Instructions/presenter.js +260 -196
  878. package/lib/building/components/resources/quiz/instructions/Instructions/styles.js +41 -36
  879. package/lib/building/components/resources/quiz/instructions/Instructions/theme.js +11 -19
  880. package/lib/building/components/resources/quiz/instructions/Show/index.js +146 -81
  881. package/lib/building/components/resources/quiz/instructions/Show/styles.js +27 -33
  882. package/lib/building/components/resources/quiz/instructions/Show/theme.js +7 -15
  883. package/lib/building/components/resources/quiz/title/Edit/index.js +233 -178
  884. package/lib/building/components/resources/quiz/title/Show/index.js +145 -81
  885. package/lib/building/components/resources/quiz/title/Show/styles.js +14 -20
  886. package/lib/building/components/resources/quiz/title/Show/theme.js +6 -12
  887. package/lib/building/components/resources/quiz/title/Title/index.js +20 -27
  888. package/lib/building/components/resources/quiz/title/Title/presenter.js +266 -203
  889. package/lib/building/components/resources/quiz/title/Title/styles.js +61 -43
  890. package/lib/building/components/resources/quiz/title/Title/theme.js +14 -23
  891. package/lib/building/components/resources/quizEntry/QuizEntry/index.js +75 -74
  892. package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +551 -397
  893. package/lib/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +95 -44
  894. package/lib/building/components/resources/quizEntry/QuizEntry/styles.js +32 -27
  895. package/lib/building/components/resources/quizEntry/QuizEntry/theme.js +9 -18
  896. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/index.js +25 -33
  897. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +300 -237
  898. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +28 -34
  899. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +18 -27
  900. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +186 -111
  901. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +17 -23
  902. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +10 -19
  903. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/index.js +18 -28
  904. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +364 -250
  905. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +73 -31
  906. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +7 -16
  907. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +545 -359
  908. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +17 -24
  909. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +8 -16
  910. package/lib/building/components/resources/quizEntry/QuizEntryEdit/index.js +90 -82
  911. package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +692 -454
  912. package/lib/building/components/resources/quizEntry/QuizEntryEdit/styles.js +17 -23
  913. package/lib/building/components/resources/quizEntry/QuizEntryEdit/theme.js +7 -16
  914. package/lib/building/components/resources/quizEntry/QuizEntryShow/index.js +57 -41
  915. package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +474 -358
  916. package/lib/building/components/resources/quizEntry/QuizEntryShow/styles.js +131 -89
  917. package/lib/building/components/resources/quizEntry/QuizEntryShow/theme.js +22 -32
  918. package/lib/common/actions/addInteractionTypes.js +7 -13
  919. package/lib/common/actions/alerts.js +53 -72
  920. package/lib/common/actions/analyses.js +57 -73
  921. package/lib/common/actions/bankEntries.js +12 -18
  922. package/lib/common/actions/bankSearch.js +29 -35
  923. package/lib/common/actions/banks.js +49 -55
  924. package/lib/common/actions/config.js +17 -25
  925. package/lib/common/actions/dragAndDrop.js +7 -13
  926. package/lib/common/actions/editing.js +19 -27
  927. package/lib/common/actions/errorsShowing.js +21 -29
  928. package/lib/common/actions/features.js +12 -19
  929. package/lib/common/actions/grading.js +16 -24
  930. package/lib/common/actions/items.js +7 -13
  931. package/lib/common/actions/modal.js +63 -74
  932. package/lib/common/actions/moderation.js +11 -18
  933. package/lib/common/actions/modifications.js +487 -563
  934. package/lib/common/actions/outcomes.js +22 -31
  935. package/lib/common/actions/postMessage.js +7 -13
  936. package/lib/common/actions/printing.js +12 -19
  937. package/lib/common/actions/qtiImports.js +11 -18
  938. package/lib/common/actions/quizEntries.js +44 -55
  939. package/lib/common/actions/quizExport.js +7 -13
  940. package/lib/common/actions/quizSessionEvents.js +7 -13
  941. package/lib/common/actions/quizSessionResults.js +7 -13
  942. package/lib/common/actions/quizSessions.js +83 -87
  943. package/lib/common/actions/quizzes.js +44 -50
  944. package/lib/common/actions/rce.js +19 -26
  945. package/lib/common/actions/regrading.js +17 -25
  946. package/lib/common/actions/reporting.js +27 -37
  947. package/lib/common/actions/scrolling.js +13 -20
  948. package/lib/common/actions/sessionItemResults.js +7 -13
  949. package/lib/common/actions/sessionItems.js +7 -13
  950. package/lib/common/actions/sharedBanks.js +30 -36
  951. package/lib/common/actions/sharingModal.js +7 -13
  952. package/lib/common/actions/sidebar.js +14 -21
  953. package/lib/common/actions/stimuli.js +7 -13
  954. package/lib/common/actions/tagAssociations.js +75 -81
  955. package/lib/common/actions/taking.js +149 -157
  956. package/lib/common/actions/ui.js +57 -63
  957. package/lib/common/actions/upload.js +31 -37
  958. package/lib/common/api/callHandlers.js +147 -107
  959. package/lib/common/api/camelizeHelpers.js +10 -19
  960. package/lib/common/api/features.js +14 -21
  961. package/lib/common/api/fileUpload.js +28 -37
  962. package/lib/common/api/getPersistenceActions.js +107 -113
  963. package/lib/common/api/helpers.js +253 -135
  964. package/lib/common/api/interactionTypes.js +11 -18
  965. package/lib/common/api/quizSessions.js +204 -159
  966. package/lib/common/api/quizzes.js +31 -40
  967. package/lib/common/api/schema.js +65 -62
  968. package/lib/common/components/AccessCodeTextInput/index.js +135 -64
  969. package/lib/common/components/ApiFeatureFlagInitializer/index.js +26 -31
  970. package/lib/common/components/ConfirmationModal/index.js +46 -25
  971. package/lib/common/components/ConfirmationModal/presenter.js +184 -137
  972. package/lib/common/components/ImportModal/ImportFileSelector/index.js +221 -141
  973. package/lib/common/components/ImportModal/ImportFileSelector/styles.js +25 -31
  974. package/lib/common/components/ImportModal/ImportFileSelector/theme.js +14 -22
  975. package/lib/common/components/ImportModal/index.js +55 -55
  976. package/lib/common/components/ImportModal/presenter.js +449 -374
  977. package/lib/common/components/ImportModal/styles.js +7 -13
  978. package/lib/common/components/ImportModal/theme.js +6 -12
  979. package/lib/common/components/LearnosityCalculator/index.js +341 -163
  980. package/lib/common/components/MaskedTextInput/index.js +169 -78
  981. package/lib/common/components/Pin/index.js +3 -9
  982. package/lib/common/components/Pin/presenter.js +126 -69
  983. package/lib/common/components/PreviewFrame/index.js +121 -60
  984. package/lib/common/components/PrintFontSizeModal/index.js +2 -9
  985. package/lib/common/components/PrintFontSizeModal/presenter.js +251 -182
  986. package/lib/common/components/PrintFontSizeModal/styles.js +11 -17
  987. package/lib/common/components/PrintFontSizeModal/theme.js +8 -16
  988. package/lib/common/components/RceConfigProvider/index.js +15 -22
  989. package/lib/common/components/RceConfigProvider/presenter.js +409 -211
  990. package/lib/common/components/RceConfigProvider/rceConfigErrorHandler.js +23 -30
  991. package/lib/common/components/RceConfigProvider/rceConfigErrorMessages.js +17 -24
  992. package/lib/common/components/RceConfigProvider/rceConfigFetcher.js +158 -49
  993. package/lib/common/components/RceConfigProvider/rceConfigMapper.js +40 -32
  994. package/lib/common/components/RceConfigProvider/rceConfigUtils.js +5 -11
  995. package/lib/common/components/SDKApp/index.js +289 -200
  996. package/lib/common/components/SDKApp/styles.js +7 -13
  997. package/lib/common/components/SDKHeaderCalculator.js +18 -26
  998. package/lib/common/components/SDKMenuButton.js +9 -16
  999. package/lib/common/components/SDKNavBar.js +10 -17
  1000. package/lib/common/components/SDKTimer.js +18 -26
  1001. package/lib/common/components/TimingAlerts/index.js +1 -0
  1002. package/lib/common/components/TimingAlerts/presenter.js +42 -0
  1003. package/lib/common/components/alerts/index.js +17 -24
  1004. package/lib/common/components/alerts/presenter.js +182 -110
  1005. package/lib/common/components/alerts/styles.js +32 -27
  1006. package/lib/common/components/alerts/theme.js +10 -17
  1007. package/lib/common/components/layout/Page/index.js +171 -93
  1008. package/lib/common/components/layout/Page/styles.js +84 -42
  1009. package/lib/common/components/layout/Page/theme.js +8 -17
  1010. package/lib/common/components/layout/header/Calculator/index.js +16 -22
  1011. package/lib/common/components/layout/header/Calculator/presenter.js +188 -86
  1012. package/lib/common/components/layout/header/HeaderMenuButton/index.js +25 -30
  1013. package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +144 -77
  1014. package/lib/common/components/layout/header/HeaderMenuButton/styles.js +34 -30
  1015. package/lib/common/components/layout/header/HeaderMenuButton/theme.js +9 -17
  1016. package/lib/common/components/layout/header/Timer/index.js +25 -32
  1017. package/lib/common/components/layout/header/Timer/presenter.js +266 -201
  1018. package/lib/common/components/layout/header/Timer/styles.js +25 -31
  1019. package/lib/common/components/layout/header/Timer/theme.js +15 -24
  1020. package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +130 -55
  1021. package/lib/common/components/layout/navbar/externalStyles.js +7 -13
  1022. package/lib/common/components/layout/navbar/index.js +238 -136
  1023. package/lib/common/components/layout/navbar/styles.js +35 -17
  1024. package/lib/common/components/layout/navbar/theme.js +7 -14
  1025. package/lib/common/components/layout/sidebar/PositionSummary/index.js +151 -65
  1026. package/lib/common/components/layout/sidebar/PositionSummary/styles.js +26 -32
  1027. package/lib/common/components/layout/sidebar/PositionSummary/theme.js +12 -21
  1028. package/lib/common/components/layout/sidebar/Sidebar/Pin.js +119 -62
  1029. package/lib/common/components/layout/sidebar/Sidebar/externalStyles.js +10 -16
  1030. package/lib/common/components/layout/sidebar/Sidebar/index.js +448 -360
  1031. package/lib/common/components/layout/sidebar/Sidebar/styles.js +161 -119
  1032. package/lib/common/components/layout/sidebar/Sidebar/theme.js +32 -43
  1033. package/lib/common/components/layout/sidebar/SidebarItem/index.js +21 -28
  1034. package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +275 -210
  1035. package/lib/common/components/layout/sidebar/SidebarItem/styles.js +82 -64
  1036. package/lib/common/components/layout/sidebar/SidebarItem/theme.js +23 -32
  1037. package/lib/common/components/layout/sidebar/Stimulus/Collection/index.js +6 -13
  1038. package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +228 -164
  1039. package/lib/common/components/layout/sidebar/Stimulus/Collection/styles.js +72 -54
  1040. package/lib/common/components/layout/sidebar/Stimulus/Collection/theme.js +8 -16
  1041. package/lib/common/components/layout/sidebar/Stimulus/Summary/index.js +6 -13
  1042. package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +213 -149
  1043. package/lib/common/components/layout/sidebar/Stimulus/Summary/styles.js +28 -34
  1044. package/lib/common/components/layout/sidebar/Stimulus/Summary/theme.js +11 -19
  1045. package/lib/common/components/layout/sidebar/Stimulus/Title/index.js +146 -73
  1046. package/lib/common/components/layout/sidebar/Stimulus/Title/styles.js +10 -16
  1047. package/lib/common/components/layout/sidebar/Stimulus/index.js +22 -25
  1048. package/lib/common/components/layout/sidebar/Stimulus/presenter.js +314 -247
  1049. package/lib/common/components/layout/sidebar/Stimulus/styles.js +7 -13
  1050. package/lib/common/components/layout/sidebar/Stimulus/theme.js +7 -16
  1051. package/lib/common/components/resources/BankSelection/index.js +22 -24
  1052. package/lib/common/components/resources/BankSelection/presenter.js +274 -128
  1053. package/lib/common/components/resources/WarningWrapper/index.js +217 -136
  1054. package/lib/common/components/resources/WarningWrapper/styles.js +26 -32
  1055. package/lib/common/components/resources/WarningWrapper/theme.js +11 -19
  1056. package/lib/common/components/resources/entry/EntrySave/index.js +18 -26
  1057. package/lib/common/components/resources/entry/EntrySave/presenter.js +390 -207
  1058. package/lib/common/components/resources/item/ItemEdit/index.js +77 -72
  1059. package/lib/common/components/resources/item/ItemEdit/presenter.js +306 -216
  1060. package/lib/common/components/resources/item/ItemOverride/index.js +27 -36
  1061. package/lib/common/components/resources/item/ItemOverride/presenter.js +186 -92
  1062. package/lib/common/components/resources/item/ItemShow/index.js +163 -63
  1063. package/lib/common/components/resources/positionBox/PositionBox.js +141 -64
  1064. package/lib/common/components/resources/positionBox/styles.js +35 -30
  1065. package/lib/common/components/resources/positionBox/theme.js +12 -20
  1066. package/lib/common/components/resources/quiz/AddContent/Body/index.js +19 -26
  1067. package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +155 -166
  1068. package/lib/common/components/resources/quiz/AddContent/Body/styles.js +36 -29
  1069. package/lib/common/components/resources/quiz/AddContent/Body/theme.js +9 -19
  1070. package/lib/common/components/resources/quiz/AddContent/Button/index.js +183 -108
  1071. package/lib/common/components/resources/quiz/AddContent/Button/styles.js +74 -56
  1072. package/lib/common/components/resources/quiz/AddContent/Button/theme.js +20 -30
  1073. package/lib/common/components/resources/quiz/AddContent/Modal/index.js +25 -30
  1074. package/lib/common/components/resources/quiz/AddContent/Modal/presenter.js +110 -78
  1075. package/lib/common/components/resources/quiz/AddContent/Popover/index.js +33 -36
  1076. package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +188 -154
  1077. package/lib/common/components/resources/quiz/AddContent/Popover/styles.js +28 -34
  1078. package/lib/common/components/resources/quiz/AddContent/Popover/theme.js +7 -14
  1079. package/lib/common/components/resources/quiz/info/QuizInfo.js +155 -55
  1080. package/lib/common/components/resources/quiz/instructions/Instructions.js +136 -64
  1081. package/lib/common/components/resources/quiz/instructions/styles.js +28 -34
  1082. package/lib/common/components/resources/quiz/instructions/theme.js +8 -15
  1083. package/lib/common/components/resources/quiz/title/Title.js +135 -62
  1084. package/lib/common/components/resources/quiz/title/styles.js +17 -23
  1085. package/lib/common/components/resources/quiz/title/theme.js +8 -15
  1086. package/lib/common/components/resources/quizSessionResult/Header/index.js +163 -92
  1087. package/lib/common/components/resources/quizSessionResult/Header/styles.js +27 -33
  1088. package/lib/common/components/resources/quizSessionResult/Header/theme.js +9 -16
  1089. package/lib/common/components/resources/quizSessionResult/Info/index.js +401 -309
  1090. package/lib/common/components/resources/quizSessionResult/Info/styles.js +55 -62
  1091. package/lib/common/components/resources/quizSessionResult/Info/theme.js +12 -19
  1092. package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +179 -103
  1093. package/lib/common/components/resources/sessionItemResult/ResultStimulus/styles.js +127 -85
  1094. package/lib/common/components/resources/sessionItemResult/ResultStimulus/theme.js +28 -38
  1095. package/lib/common/components/resources/sessionItemResult/SessionItemResult/index.js +14 -18
  1096. package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +427 -343
  1097. package/lib/common/components/resources/sessionItemResult/SessionItemResult/styles.js +73 -55
  1098. package/lib/common/components/resources/sessionItemResult/SessionItemResult/theme.js +27 -36
  1099. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +169 -99
  1100. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/styles.js +15 -21
  1101. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +11 -20
  1102. package/lib/common/components/resources/stimulus/Stimulus/index.js +34 -32
  1103. package/lib/common/components/resources/stimulus/Stimulus/presenter.js +340 -227
  1104. package/lib/common/components/resources/stimulus/Stimulus/styles.js +102 -60
  1105. package/lib/common/components/resources/stimulus/Stimulus/theme.js +12 -21
  1106. package/lib/common/components/resources/stimulus/StimulusEdit/index.js +55 -58
  1107. package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +688 -475
  1108. package/lib/common/components/resources/stimulus/StimulusEdit/styles.js +40 -46
  1109. package/lib/common/components/resources/stimulus/StimulusEdit/theme.js +13 -21
  1110. package/lib/common/components/resources/stimulus/StimulusEditInfo/index.js +22 -28
  1111. package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +291 -218
  1112. package/lib/common/components/resources/stimulus/StimulusEditInfo/styles.js +12 -18
  1113. package/lib/common/components/resources/stimulus/StimulusEditInfo/theme.js +9 -17
  1114. package/lib/common/components/resources/stimulus/StimulusShow/index.js +194 -124
  1115. package/lib/common/components/resources/stimulus/StimulusShow/styles.js +24 -30
  1116. package/lib/common/components/resources/stimulus/StimulusShow/theme.js +10 -18
  1117. package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +145 -84
  1118. package/lib/common/components/shared/Card/CardContent/index.js +149 -62
  1119. package/lib/common/components/shared/Card/CardContent/styles.js +29 -24
  1120. package/lib/common/components/shared/Card/CardContent/theme.js +14 -24
  1121. package/lib/common/components/shared/Card/CardWrapper/index.js +149 -62
  1122. package/lib/common/components/shared/Card/CardWrapper/styles.js +26 -21
  1123. package/lib/common/components/shared/Card/CardWrapper/theme.js +9 -17
  1124. package/lib/common/components/shared/Card/index.js +49 -31
  1125. package/lib/common/components/shared/ExpandButton/index.js +194 -79
  1126. package/lib/common/components/shared/ExpandButton/styles.js +37 -19
  1127. package/lib/common/components/shared/ExpandButton/theme.js +5 -11
  1128. package/lib/common/components/shared/FormattedDuration/index.js +196 -104
  1129. package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +246 -197
  1130. package/lib/common/components/shared/IfFeature/index.js +9 -16
  1131. package/lib/common/components/shared/IfFeature/presenter.js +116 -50
  1132. package/lib/common/components/shared/InteractionTypes/index.js +4 -11
  1133. package/lib/common/components/shared/InteractionTypes/presenter.js +254 -184
  1134. package/lib/common/components/shared/InteractionTypes/styles.js +15 -21
  1135. package/lib/common/components/shared/InteractionTypes/theme.js +9 -17
  1136. package/lib/common/components/shared/PaginatedCollection/index.js +21 -26
  1137. package/lib/common/components/shared/PaginatedCollection/presenter.js +362 -179
  1138. package/lib/common/components/shared/PaginatedCollection/styles.js +10 -16
  1139. package/lib/common/components/shared/PaginatedCollection/theme.js +8 -16
  1140. package/lib/common/components/shared/Paginator/index.js +147 -73
  1141. package/lib/common/components/shared/Paginator/styles.js +7 -13
  1142. package/lib/common/components/shared/Paginator/theme.js +6 -12
  1143. package/lib/common/components/shared/PrintTrigger/index.js +42 -39
  1144. package/lib/common/components/shared/PrintTrigger/presenter.js +223 -142
  1145. package/lib/common/components/shared/TagDisplay/index.js +160 -86
  1146. package/lib/common/components/shared/TagDisplay/styles.js +7 -13
  1147. package/lib/common/components/shared/TagSelect/index.js +2 -9
  1148. package/lib/common/components/shared/TagSelect/presenter.js +331 -258
  1149. package/lib/common/components/shared/TagSuggestSelect/index.js +19 -21
  1150. package/lib/common/components/shared/TagSuggestSelect/presenter.js +164 -112
  1151. package/lib/common/components/shared/TagWrapper/index.js +2 -9
  1152. package/lib/common/components/shared/TagWrapper/presenter.js +131 -78
  1153. package/lib/common/components/shared/TimeUnitsInput/index.js +374 -327
  1154. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +186 -116
  1155. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +65 -47
  1156. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +16 -24
  1157. package/lib/common/components/shared/drag_and_drop/DragHandle/index.js +30 -31
  1158. package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +326 -269
  1159. package/lib/common/components/shared/drag_and_drop/dragAndDropUtils.js +273 -305
  1160. package/lib/common/components/shared/file_selector/FileSelector.js +149 -73
  1161. package/lib/common/components/shared/file_selector/styles.js +10 -16
  1162. package/lib/common/components/shared/file_selector/theme.js +9 -17
  1163. package/lib/common/components/shared/functionality/componentWithOutsideClick.js +151 -75
  1164. package/lib/common/components/shared/functionality/componentWithOutsideClickEmotion.js +169 -85
  1165. package/lib/common/components/shared/functionality/disableDraggingOverride.js +9 -15
  1166. package/lib/common/components/shared/functionality/makeEditable.js +180 -122
  1167. package/lib/common/components/shared/functionality/makeScrollable.js +276 -142
  1168. package/lib/common/components/shared/overlay/index.js +168 -96
  1169. package/lib/common/components/shared/overlay/styles.js +36 -31
  1170. package/lib/common/components/shared/overlay/theme.js +8 -16
  1171. package/lib/common/components/shared/return_button/ReturnButton.js +134 -73
  1172. package/lib/common/components/shared/spinner/Spinner.js +194 -110
  1173. package/lib/common/components/shared/spinner/styles.js +13 -19
  1174. package/lib/common/kinesis/QuizEventsLogger.js +307 -124
  1175. package/lib/common/kinesis/StreamQueue.js +216 -146
  1176. package/lib/common/kinesis/client.js +35 -44
  1177. package/lib/common/kinesis/config.js +35 -40
  1178. package/lib/common/kinesis/eventTypes.js +33 -42
  1179. package/lib/common/middleware/alertTimerMiddleware.js +15 -22
  1180. package/lib/common/middleware/crossDomainMessagingMiddleware.js +11 -17
  1181. package/lib/common/middleware/eventLoggerMiddleware.js +24 -33
  1182. package/lib/common/middleware/persistedStorageMiddleware.js +42 -43
  1183. package/lib/common/middleware/quizTimerWebSocketMiddleware.js +65 -72
  1184. package/lib/common/middleware/sharedBanksMiddleware.js +360 -238
  1185. package/lib/common/react-redux.js +6 -14
  1186. package/lib/common/records/Alert.js +72 -38
  1187. package/lib/common/records/Bank.js +181 -116
  1188. package/lib/common/records/BankEntry.js +180 -103
  1189. package/lib/common/records/Item.js +229 -147
  1190. package/lib/common/records/ItemAnalysis.js +244 -167
  1191. package/lib/common/records/QtiImport.js +108 -57
  1192. package/lib/common/records/Quiz.js +312 -195
  1193. package/lib/common/records/QuizAnalysis.js +176 -112
  1194. package/lib/common/records/QuizEntry.js +663 -499
  1195. package/lib/common/records/QuizSession.js +283 -212
  1196. package/lib/common/records/QuizSessionEvent.js +114 -57
  1197. package/lib/common/records/QuizSessionResult.js +141 -79
  1198. package/lib/common/records/Response.js +113 -58
  1199. package/lib/common/records/SessionItem.js +209 -139
  1200. package/lib/common/records/SessionItemResult.js +141 -81
  1201. package/lib/common/records/Stimulus.js +163 -94
  1202. package/lib/common/records/baseRecord.js +186 -104
  1203. package/lib/common/records/index.js +16 -118
  1204. package/lib/common/records/reduxRecord.js +97 -48
  1205. package/lib/common/reducers/alerts.js +13 -20
  1206. package/lib/common/reducers/analyses.js +57 -53
  1207. package/lib/common/reducers/bankEntries.js +20 -25
  1208. package/lib/common/reducers/bankSearch.js +27 -38
  1209. package/lib/common/reducers/banks.js +54 -51
  1210. package/lib/common/reducers/calls.js +19 -20
  1211. package/lib/common/reducers/config.js +17 -24
  1212. package/lib/common/reducers/dragAndDrop.js +11 -18
  1213. package/lib/common/reducers/editing.js +21 -16
  1214. package/lib/common/reducers/errorsShowing.js +15 -22
  1215. package/lib/common/reducers/features.js +13 -20
  1216. package/lib/common/reducers/grading.js +15 -22
  1217. package/lib/common/reducers/interactionTypes.js +14 -22
  1218. package/lib/common/reducers/items.js +16 -24
  1219. package/lib/common/reducers/modal.js +26 -33
  1220. package/lib/common/reducers/moderation.js +17 -24
  1221. package/lib/common/reducers/modifications.js +263 -192
  1222. package/lib/common/reducers/outcomes.js +22 -29
  1223. package/lib/common/reducers/printing.js +12 -19
  1224. package/lib/common/reducers/qtiImports.js +18 -26
  1225. package/lib/common/reducers/quizEntries.js +159 -165
  1226. package/lib/common/reducers/quizExport.js +11 -18
  1227. package/lib/common/reducers/quizSessionEvents.js +20 -26
  1228. package/lib/common/reducers/quizSessionResults.js +15 -23
  1229. package/lib/common/reducers/quizSessions.js +51 -48
  1230. package/lib/common/reducers/quizzes.js +53 -49
  1231. package/lib/common/reducers/rce.js +17 -24
  1232. package/lib/common/reducers/regrading.js +21 -28
  1233. package/lib/common/reducers/reporting.js +54 -48
  1234. package/lib/common/reducers/scrolling.js +13 -20
  1235. package/lib/common/reducers/sessionItemResults.js +15 -23
  1236. package/lib/common/reducers/sessionItems.js +16 -24
  1237. package/lib/common/reducers/sharedBanks.js +24 -30
  1238. package/lib/common/reducers/sharingModal.js +15 -22
  1239. package/lib/common/reducers/sidebar.js +15 -22
  1240. package/lib/common/reducers/stimuli.js +16 -24
  1241. package/lib/common/reducers/tagAssociations.js +138 -95
  1242. package/lib/common/reducers/taking.js +135 -127
  1243. package/lib/common/reducers/ui.js +33 -36
  1244. package/lib/common/reducers/upload.js +22 -29
  1245. package/lib/common/selectors/analyses.js +59 -32
  1246. package/lib/common/selectors/calculator.js +20 -24
  1247. package/lib/common/selectors/calls.js +12 -10
  1248. package/lib/common/selectors/config.js +13 -17
  1249. package/lib/common/selectors/interactionTypes.js +74 -46
  1250. package/lib/common/selectors/items.js +19 -20
  1251. package/lib/common/selectors/qtiImports.js +21 -25
  1252. package/lib/common/selectors/quizSessionResults.js +14 -19
  1253. package/lib/common/selectors/quizSessions.js +26 -29
  1254. package/lib/common/selectors/quizzes.js +170 -101
  1255. package/lib/common/selectors/rce.js +11 -11
  1256. package/lib/common/selectors/reporting.js +15 -18
  1257. package/lib/common/selectors/sessionItemResults.js +57 -36
  1258. package/lib/common/selectors/sessionItems.js +69 -46
  1259. package/lib/common/selectors/taking.js +58 -39
  1260. package/lib/common/selectors/ui.js +6 -9
  1261. package/lib/common/util/CustomPropTypes.js +57 -57
  1262. package/lib/common/util/ElementsForSelectors.js +34 -16
  1263. package/lib/common/util/ExhaustivePaginatedFetcher.js +399 -107
  1264. package/lib/common/util/Fetcher.js +511 -371
  1265. package/lib/common/util/MultiWeakMap.js +73 -56
  1266. package/lib/common/util/PaginatedFetcher.js +307 -86
  1267. package/lib/common/util/ThunkQueue.js +287 -104
  1268. package/lib/common/util/TimeRecordingService.js +93 -62
  1269. package/lib/common/util/TimerService.js +200 -163
  1270. package/lib/common/util/cachePreviousArgs.js +18 -24
  1271. package/lib/common/util/callHelpers.js +24 -30
  1272. package/lib/common/util/clickHandlers.js +18 -26
  1273. package/lib/common/util/componentForItem.js +17 -26
  1274. package/lib/common/util/crossDomainMessaging.js +6 -12
  1275. package/lib/common/util/debounceLatestPromise.js +55 -31
  1276. package/lib/common/util/featureCheck.js +25 -37
  1277. package/lib/common/util/fetchHelpers.js +7 -13
  1278. package/lib/common/util/fitbCopyHelper.js +35 -39
  1279. package/lib/common/util/formatTimespan.js +51 -61
  1280. package/lib/common/util/generateDisplayPositions.js +19 -26
  1281. package/lib/common/util/getClientIpAddress.js +160 -40
  1282. package/lib/common/util/httpHeaders.js +13 -19
  1283. package/lib/common/util/immutableHelpers.js +15 -23
  1284. package/lib/common/util/instUIMessages.js +8 -14
  1285. package/lib/common/util/interactionTypeMetadata.js +27 -43
  1286. package/lib/common/util/interactionTypePropsHelper.js +80 -87
  1287. package/lib/common/util/interactionTypeRecordForItem.js +15 -24
  1288. package/lib/common/util/jsonify.js +48 -32
  1289. package/lib/common/util/keyboardClickable.js +7 -13
  1290. package/lib/common/util/localStoreService.js +63 -46
  1291. package/lib/common/util/mathRenderingUtils.js +3 -9
  1292. package/lib/common/util/maxContent.js +8 -15
  1293. package/lib/common/util/modalHelpers.js +8 -11
  1294. package/lib/common/util/noop.js +2 -9
  1295. package/lib/common/util/persistedState.js +57 -45
  1296. package/lib/common/util/printUtils.js +36 -42
  1297. package/lib/common/util/rceChecker.js +132 -27
  1298. package/lib/common/util/renderAlerts.js +19 -28
  1299. package/lib/common/util/serializeEvent.js +42 -42
  1300. package/lib/common/util/sessionStore.js +78 -61
  1301. package/lib/common/util/useRemoteComponent.js +268 -111
  1302. package/lib/common/util/valMap.js +8 -15
  1303. package/lib/common/util/warningHelpers.js +150 -120
  1304. package/lib/common/util/windowChecks.js +17 -23
  1305. package/lib/common/util/withCachedArguments.js +21 -29
  1306. package/lib/common/util/withDynamoPagination.js +333 -118
  1307. package/lib/common/util/withStateCache.js +34 -40
  1308. package/lib/config.js +14 -25
  1309. package/lib/configureStore.js +161 -145
  1310. package/lib/grading/api/quizEntryRegrades.js +34 -42
  1311. package/lib/grading/api/updateResults.js +39 -41
  1312. package/lib/index.js +159 -1690
  1313. package/lib/messages/LocalStorageAdapter.js +45 -36
  1314. package/lib/messages/LocalStorageLimits.js +81 -73
  1315. package/lib/messages/StorageExhaustionError.js +118 -36
  1316. package/lib/messages/postMessageService.js +110 -87
  1317. package/lib/messages/subjectHandlers/forwardMessage.js +5 -11
  1318. package/lib/messages/subjectHandlers/lti.capabilities.js +12 -18
  1319. package/lib/messages/subjectHandlers/lti.fetchWindowSize.js +14 -20
  1320. package/lib/messages/subjectHandlers/lti.frameResize.js +9 -15
  1321. package/lib/messages/subjectHandlers/lti.get_data.js +17 -25
  1322. package/lib/messages/subjectHandlers/lti.put_data.js +39 -42
  1323. package/lib/messages/subjectHandlers/requestFullWindowLaunch.js +9 -16
  1324. package/lib/messages/utils.js +6 -11
  1325. package/lib/moderating/api/quizSessionEvents.js +19 -24
  1326. package/lib/moderating/api/quizSessions.js +45 -55
  1327. package/lib/moderating/components/events/Event.js +185 -125
  1328. package/lib/moderating/components/events/PageBlurredEvent.js +109 -46
  1329. package/lib/moderating/components/events/PageFocusedEvent.js +109 -46
  1330. package/lib/moderating/components/events/RCEEvent.js +114 -50
  1331. package/lib/moderating/components/events/ResponseEvent.js +219 -132
  1332. package/lib/moderating/components/events/SessionStartEvent.js +116 -55
  1333. package/lib/moderating/components/events/SessionSubmitEvent.js +116 -55
  1334. package/lib/moderating/components/events/styles.js +23 -29
  1335. package/lib/moderating/components/events/theme.js +10 -17
  1336. package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +176 -121
  1337. package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +156 -106
  1338. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +205 -141
  1339. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +246 -155
  1340. package/lib/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +190 -93
  1341. package/lib/moderating/components/resources/AccommodationsModal/index.js +203 -156
  1342. package/lib/moderating/components/resources/ElapsedTime.js +132 -73
  1343. package/lib/moderating/components/resources/EventDetails.js +16 -25
  1344. package/lib/moderating/components/resources/ModerateTable/index.js +49 -45
  1345. package/lib/moderating/components/resources/ModerateTable/presenter.js +503 -411
  1346. package/lib/moderating/components/resources/ModerateTable/styles.js +47 -29
  1347. package/lib/moderating/components/resources/ModerateTable/theme.js +7 -14
  1348. package/lib/moderating/components/resources/ModerateTableRow/index.js +13 -21
  1349. package/lib/moderating/components/resources/ModerateTableRow/presenter.js +465 -378
  1350. package/lib/moderating/components/resources/ModerateTableRow/story.js +9 -17
  1351. package/lib/moderating/components/resources/ModerateTableRow/styles.js +23 -29
  1352. package/lib/moderating/components/resources/ModerateTableRow/theme.js +7 -13
  1353. package/lib/moderating/components/resources/OutstandingQuizzesModal/index.js +16 -21
  1354. package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +228 -167
  1355. package/lib/moderating/components/resources/RetryGradePassbackButton/index.js +12 -20
  1356. package/lib/moderating/components/resources/RetryGradePassbackButton/presenter.js +240 -82
  1357. package/lib/moderating/components/resources/util/extractSessionData.js +41 -33
  1358. package/lib/moderating/components/resources/util/renderEventSummary.js +29 -32
  1359. package/lib/moderating/components/sidebar/ModerateTray/index.js +17 -19
  1360. package/lib/moderating/components/sidebar/ModerateTray/presenter.js +299 -253
  1361. package/lib/moderating/components/sidebar/ResetQuiz/index.js +38 -44
  1362. package/lib/moderating/components/sidebar/ResetQuiz/presenter.js +291 -115
  1363. package/lib/reduxStore.js +24 -32
  1364. package/lib/reporting/api/fetchStudentAnalyses.js +146 -40
  1365. package/lib/reporting/api/getAnalysesExport.js +163 -61
  1366. package/lib/reporting/api/getAnalysesStatus.js +148 -45
  1367. package/lib/reporting/api/getItemAnalyses.js +143 -35
  1368. package/lib/reporting/api/getQuizAnalysis.js +143 -35
  1369. package/lib/reporting/api/itemAnalyses.js +17 -21
  1370. package/lib/reporting/api/quizAnalyses.js +20 -24
  1371. package/lib/reporting/components/Caption/index.js +140 -63
  1372. package/lib/reporting/components/Caption/styles.js +10 -16
  1373. package/lib/reporting/components/Caption/theme.js +7 -15
  1374. package/lib/reporting/components/MetricsListItem/index.js +183 -71
  1375. package/lib/reporting/components/MetricsListItem/styles.js +10 -16
  1376. package/lib/reporting/components/MetricsListItem/theme.js +0 -1
  1377. package/lib/reporting/components/charts/CentileDistribution/index.js +2 -9
  1378. package/lib/reporting/components/charts/CentileDistribution/presenter.js +216 -154
  1379. package/lib/reporting/components/charts/CentileDistribution/styles.js +39 -34
  1380. package/lib/reporting/components/charts/CentileDistribution/theme.js +7 -15
  1381. package/lib/reporting/components/charts/Distribution/CentileDistribution.js +3 -10
  1382. package/lib/reporting/components/charts/Distribution/Distribution.js +2 -9
  1383. package/lib/reporting/components/charts/Distribution/QuintileDistribution.js +2 -9
  1384. package/lib/reporting/components/charts/Distribution/index.js +2 -9
  1385. package/lib/reporting/components/charts/Distribution/presenter.js +399 -319
  1386. package/lib/reporting/components/charts/Distribution/styles.js +20 -26
  1387. package/lib/reporting/components/charts/Distribution/theme.js +11 -18
  1388. package/lib/reporting/components/charts/Legend/index.js +184 -94
  1389. package/lib/reporting/components/charts/Legend/styles.js +66 -48
  1390. package/lib/reporting/components/charts/Legend/theme.js +14 -23
  1391. package/lib/reporting/components/charts/QuintileDistribution/index.js +2 -9
  1392. package/lib/reporting/components/charts/QuintileDistribution/presenter.js +214 -154
  1393. package/lib/reporting/components/charts/QuintileDistribution/styles.js +10 -16
  1394. package/lib/reporting/components/charts/QuintileDistribution/theme.js +8 -15
  1395. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +213 -127
  1396. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +48 -38
  1397. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +21 -32
  1398. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/index.js +9 -16
  1399. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +350 -277
  1400. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +105 -102
  1401. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +22 -31
  1402. package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +216 -151
  1403. package/lib/reporting/components/quizAnalysis/styles.js +35 -29
  1404. package/lib/reporting/components/quizAnalysis/theme.js +10 -19
  1405. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +2 -8
  1406. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +149 -75
  1407. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +12 -18
  1408. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +2 -8
  1409. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +158 -83
  1410. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +16 -22
  1411. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/index.js +1 -12
  1412. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +98 -60
  1413. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +1 -12
  1414. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +102 -64
  1415. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/index.js +1 -12
  1416. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +180 -114
  1417. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +89 -47
  1418. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +7 -13
  1419. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/index.js +1 -12
  1420. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +170 -105
  1421. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +17 -23
  1422. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +6 -12
  1423. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +159 -85
  1424. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +104 -66
  1425. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/index.js +1 -12
  1426. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +248 -191
  1427. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +76 -58
  1428. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +7 -13
  1429. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +158 -85
  1430. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/index.js +3 -26
  1431. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/utils/matchingTypeOrderer.js +74 -41
  1432. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/index.js +1 -12
  1433. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +134 -101
  1434. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/index.js +1 -12
  1435. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +268 -238
  1436. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/styles.js +8 -14
  1437. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/theme.js +6 -12
  1438. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/index.js +1 -12
  1439. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +190 -150
  1440. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/styles.js +8 -14
  1441. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/theme.js +6 -12
  1442. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +1 -12
  1443. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +113 -79
  1444. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +183 -119
  1445. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/styles.js +34 -40
  1446. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/theme.js +8 -15
  1447. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +105 -67
  1448. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +1 -12
  1449. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +175 -113
  1450. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/index.js +1 -12
  1451. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +142 -77
  1452. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +38 -20
  1453. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +6 -12
  1454. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/index.js +1 -12
  1455. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/popoverContent.js +6 -13
  1456. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +125 -74
  1457. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/styles.js +9 -15
  1458. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/index.js +1 -12
  1459. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +221 -174
  1460. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +139 -145
  1461. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +11 -17
  1462. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/index.js +1 -12
  1463. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +254 -207
  1464. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +140 -98
  1465. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +9 -16
  1466. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/index.js +1 -12
  1467. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +156 -110
  1468. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/styles.js +14 -20
  1469. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/theme.js +5 -11
  1470. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +32 -42
  1471. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/index.js +2 -8
  1472. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +199 -130
  1473. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +13 -19
  1474. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +6 -12
  1475. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/index.js +1 -12
  1476. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +125 -52
  1477. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/styles.js +15 -21
  1478. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +9 -15
  1479. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +21 -27
  1480. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/popoverContent.js +14 -21
  1481. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +366 -310
  1482. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +98 -80
  1483. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +14 -23
  1484. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/index.js +2 -8
  1485. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js +10 -17
  1486. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +251 -161
  1487. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +38 -44
  1488. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +14 -20
  1489. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +4 -11
  1490. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +269 -219
  1491. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +75 -57
  1492. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +11 -18
  1493. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/index.js +2 -8
  1494. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +169 -100
  1495. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +18 -24
  1496. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +10 -18
  1497. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/exportFormats.js +1 -7
  1498. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +229 -59
  1499. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +167 -46
  1500. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/index.js +4 -11
  1501. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +326 -289
  1502. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +12 -18
  1503. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +6 -12
  1504. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +40 -46
  1505. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +427 -223
  1506. package/lib/reporting/components/resources/OutcomeAnalysis/index.js +25 -20
  1507. package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +131 -77
  1508. package/lib/reporting/components/resources/QuizAndItemAnalysis/index.js +39 -32
  1509. package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +381 -295
  1510. package/lib/reporting/components/resources/QuizAndItemAnalysis/styles.js +16 -22
  1511. package/lib/reporting/components/resources/QuizAndItemAnalysis/theme.js +11 -19
  1512. package/lib/reporting/components/resources/ReportCard/index.js +154 -83
  1513. package/lib/reporting/components/resources/ReportCard/styles.js +32 -27
  1514. package/lib/reporting/components/resources/ReportCard/theme.js +10 -17
  1515. package/lib/reporting/components/resources/ReportList/index.js +147 -69
  1516. package/lib/reporting/components/resources/ReportList/styles.js +17 -23
  1517. package/lib/reporting/components/resources/ReportList/theme.js +8 -14
  1518. package/lib/reporting/components/resources/StudentAnalysis/ReportCard/index.js +3 -10
  1519. package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +224 -172
  1520. package/lib/reporting/components/resources/StudentAnalysis/ReportCard/styles.js +66 -49
  1521. package/lib/reporting/components/resources/StudentAnalysis/ReportCard/theme.js +11 -19
  1522. package/lib/reporting/components/resources/StudentAnalysis/fetchReport.js +175 -53
  1523. package/lib/reporting/components/resources/StudentAnalysis/fetchReportStatus.js +168 -47
  1524. package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +36 -43
  1525. package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +426 -230
  1526. package/lib/reporting/components/resources/common/AnalysisUpdateDate/index.js +122 -65
  1527. package/lib/reporting/components/resources/common/ExportButton/index.js +21 -29
  1528. package/lib/reporting/components/resources/common/errorCodes.js +26 -32
  1529. package/lib/reporting/components/resources/common/errorMessages.js +25 -32
  1530. package/lib/reporting/components/resources/common/exportReports.js +177 -60
  1531. package/lib/reporting/components/resources/common/generateReports.js +219 -83
  1532. package/lib/reporting/components/resources/common/propTypes.js +185 -180
  1533. package/lib/reporting/components/resources/common/utils.js +17 -23
  1534. package/lib/taking/api/taking.js +404 -309
  1535. package/lib/taking/learnosity/index.js +274 -131
  1536. package/package.json +14 -10
  1537. package/es/banks/components/BankEntryRow/BankEntryRow.examples.js +0 -40
  1538. package/es/banks/components/BankSearch/BankSearch.stories.js +0 -50
  1539. package/es/banks/components/NavWrapper/NavWrapper.examples.js +0 -14
  1540. package/es/banks/components/SharingModal/ShareList/ShareList.examples.js +0 -21
  1541. package/es/building/components/layout/Sidebar/Sidebar.examples.js +0 -113
  1542. package/es/building/components/resources/quiz/instructions/Instructions/Instructions.examples.js +0 -22
  1543. package/es/building/components/resources/quiz/title/Title/Title.examples.js +0 -39
  1544. package/es/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +0 -10
  1545. package/es/common/components/MaskedTextInput/MaskedTextInput.stories.js +0 -19
  1546. package/es/common/components/Pin/Pin.examples.js +0 -13
  1547. package/es/common/components/PreviewFrame/examples.config.js +0 -11
  1548. package/es/common/components/layout/sidebar/Sidebar/Sidebar.examples.js +0 -30
  1549. package/es/common/components/resources/BankSelection/BankSelection.examples.js +0 -19
  1550. package/es/common/components/resources/quizSessionResult/Info/Info.examples.js +0 -33
  1551. package/es/common/components/resources/stimulus/StimulusShowInfo/StimulusShowInfo.examples.js +0 -11
  1552. package/es/common/components/shared/FormattedDuration/FormattedDuration.examples.js +0 -15
  1553. package/es/common/components/shared/TimeUnitsInput/TimeUnitsInput.examples.js +0 -18
  1554. package/es/moderating/components/resources/AccommodationsModal/AccommodationsModal.examples.js +0 -16
  1555. package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/{}.examples.js +0 -21
  1556. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/ExtraTimeSettings.examples.js +0 -49
  1557. package/es/moderating/components/resources/ModerateTableRow/ModerateTableRow.examples.js +0 -71
  1558. package/es/moderating/components/resources/OutstandingQuizzesModal/OutstandingQuizzesModal.examples.js +0 -79
  1559. package/es/moderating/components/sidebar/ModerateTray/ModerateTray.examples.js +0 -13
  1560. package/es/reporting/components/charts/CentileDistribution/CentileDistribution.examples.js +0 -25
  1561. package/es/reporting/components/charts/QuintileDistribution/QuintileDistribution.examples.js +0 -9
  1562. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/AnswerFrequencySummary.examples.js +0 -33
  1563. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/ItemAnalysisRow.examples.js +0 -48
  1564. package/es/reporting/components/resources/QuizAndItemAnalysis/QuizAndItemAnalysis.examples.js +0 -174
  1565. package/lib/banks/components/BankEntryRow/BankEntryRow.examples.js +0 -47
  1566. package/lib/banks/components/BankSearch/BankSearch.stories.js +0 -57
  1567. package/lib/banks/components/NavWrapper/NavWrapper.examples.js +0 -21
  1568. package/lib/banks/components/SharingModal/ShareList/ShareList.examples.js +0 -27
  1569. package/lib/building/components/layout/Sidebar/Sidebar.examples.js +0 -120
  1570. package/lib/building/components/resources/quiz/instructions/Instructions/Instructions.examples.js +0 -29
  1571. package/lib/building/components/resources/quiz/title/Title/Title.examples.js +0 -46
  1572. package/lib/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +0 -17
  1573. package/lib/common/components/MaskedTextInput/MaskedTextInput.stories.js +0 -26
  1574. package/lib/common/components/Pin/Pin.examples.js +0 -19
  1575. package/lib/common/components/PreviewFrame/examples.config.js +0 -18
  1576. package/lib/common/components/layout/sidebar/Sidebar/Sidebar.examples.js +0 -37
  1577. package/lib/common/components/resources/BankSelection/BankSelection.examples.js +0 -25
  1578. package/lib/common/components/resources/quizSessionResult/Info/Info.examples.js +0 -40
  1579. package/lib/common/components/resources/stimulus/StimulusShowInfo/StimulusShowInfo.examples.js +0 -18
  1580. package/lib/common/components/shared/FormattedDuration/FormattedDuration.examples.js +0 -22
  1581. package/lib/common/components/shared/TimeUnitsInput/TimeUnitsInput.examples.js +0 -24
  1582. package/lib/moderating/components/resources/AccommodationsModal/AccommodationsModal.examples.js +0 -22
  1583. package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/{}.examples.js +0 -27
  1584. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/ExtraTimeSettings.examples.js +0 -55
  1585. package/lib/moderating/components/resources/ModerateTableRow/ModerateTableRow.examples.js +0 -78
  1586. package/lib/moderating/components/resources/OutstandingQuizzesModal/OutstandingQuizzesModal.examples.js +0 -85
  1587. package/lib/moderating/components/sidebar/ModerateTray/ModerateTray.examples.js +0 -19
  1588. package/lib/package.json +0 -1
  1589. package/lib/reporting/components/charts/CentileDistribution/CentileDistribution.examples.js +0 -31
  1590. package/lib/reporting/components/charts/QuintileDistribution/QuintileDistribution.examples.js +0 -15
  1591. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/AnswerFrequencySummary.examples.js +0 -40
  1592. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/ItemAnalysisRow.examples.js +0 -55
  1593. package/lib/reporting/components/resources/QuizAndItemAnalysis/QuizAndItemAnalysis.examples.js +0 -181
@@ -1,753 +1,977 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = exports.BankEntry = void 0;
8
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- var _react = require("react");
17
- var _reactDom = _interopRequireDefault(require("react-dom"));
18
- var _propTypes = _interopRequireDefault(require("prop-types"));
19
- var _immutable = _interopRequireDefault(require("immutable"));
20
- var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
21
- var _differenceWith = _interopRequireDefault(require("lodash/differenceWith"));
22
- var _intersectionWith = _interopRequireDefault(require("lodash/intersectionWith"));
23
- var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
24
- var _isUndefined = _interopRequireDefault(require("lodash/isUndefined"));
25
- var _keyBy = _interopRequireDefault(require("lodash/keyBy"));
26
- var _uiAlerts = require("@instructure/ui-alerts");
27
- var _uiBreadcrumb = require("@instructure/ui-breadcrumb");
28
- var _uiButtons = require("@instructure/ui-buttons");
29
- var _uiText = require("@instructure/ui-text");
30
- var _uiHeading = require("@instructure/ui-heading");
31
- var _uiIcons = require("@instructure/ui-icons");
32
- var _uiA11yContent = require("@instructure/ui-a11y-content");
33
- var _emotion = require("@instructure/emotion");
34
- var _HeaderBreadCrumb = require("../HeaderBreadCrumb");
35
- var _EntrySave = _interopRequireDefault(require("../../../common/components/resources/entry/EntrySave"));
36
- var _ItemEdit = _interopRequireDefault(require("../../../common/components/resources/item/ItemEdit"));
37
- var _ItemFeedbackModal = _interopRequireDefault(require("../../../building/components/resources/ItemFeedbackModal"));
38
- var _ItemShow = _interopRequireDefault(require("../../../common/components/resources/item/ItemShow"));
39
- var _Page = _interopRequireDefault(require("../../../common/components/layout/Page"));
40
- var _Spinner = _interopRequireDefault(require("../../../common/components/shared/spinner/Spinner"));
41
- var _StimulusEditInfo = _interopRequireDefault(require("../../../common/components/resources/stimulus/StimulusEditInfo"));
42
- var _StimulusShowInfo = _interopRequireDefault(require("../../../common/components/resources/stimulus/StimulusShowInfo"));
43
- var _TagSuggestSelect = _interopRequireDefault(require("../../../common/components/shared/TagSuggestSelect"));
44
- var _WarningWrapper = _interopRequireDefault(require("../../../common/components/resources/WarningWrapper"));
45
- var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/format-message"));
46
- var _items = require("../../../building/api/items");
47
- var _stimuli = require("../../../building/api/stimuli");
48
- var _warningHelpers = require("../../../common/util/warningHelpers");
49
- var _NavWrapper = _interopRequireDefault(require("../NavWrapper"));
50
- var _quizCommon = require("@instructure/quiz-common");
51
- var _styles = _interopRequireDefault(require("./styles"));
52
- var _theme = _interopRequireDefault(require("./theme"));
53
- var _dec, _class, _BankEntry;
54
- /** @jsx jsx */
55
- function _callSuper(_this, derived, args) {
56
- function isNativeReflectConstruct() {
57
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
58
- if (Reflect.construct.sham) return false;
59
- if (typeof Proxy === "function") return true;
60
- try {
61
- return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
62
- } catch (e) {
63
- return false;
1
+ /** @jsx jsx */ function _assert_this_initialized(self) {
2
+ if (self === void 0) {
3
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
64
4
  }
65
- }
66
- derived = (0, _getPrototypeOf2["default"])(derived);
67
- return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
5
+ return self;
68
6
  }
69
- var BankEntry = exports.BankEntry = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default"], _theme["default"]), _dec(_class = (_BankEntry = /*#__PURE__*/function (_Component) {
70
- function BankEntry() {
71
- var _this2;
72
- (0, _classCallCheck2["default"])(this, BankEntry);
73
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
74
- args[_key] = arguments[_key];
75
- }
76
- _this2 = _callSuper(this, BankEntry, [].concat(args));
77
- (0, _defineProperty2["default"])(_this2, "state", {
78
- validationErrorsFromApi: {}
79
- });
80
- (0, _defineProperty2["default"])(_this2, "setNavToBankRef", function (node) {
81
- _this2.navToBankRef = node;
82
- });
83
- (0, _defineProperty2["default"])(_this2, "navigateToBank", function () {
84
- _this2.props.navigateToBank(_this2.props.bankId);
85
- });
86
- (0, _defineProperty2["default"])(_this2, "handleTitleChange", function (e) {
87
- _this2.props.changeItemTitle(_this2.props.entry.id, e.target.value);
88
- });
89
- (0, _defineProperty2["default"])(_this2, "clearValidationErrorsFromApi", function (inputId) {
90
- if (inputId === _quizCommon.CLEAR_ALL_INPUT_VALIDATION_ERRORS) {
91
- _this2.setState({
92
- validationErrorsFromApi: {}
93
- });
94
- }
95
- if (_this2.state.validationErrorsFromApi[inputId]) {
96
- var newErrors = Object.assign({}, _this2.state.validationErrorsFromApi);
97
- delete newErrors[inputId];
98
- _this2.setState({
99
- validationErrorsFromApi: newErrors
100
- });
101
- }
102
- });
103
- (0, _defineProperty2["default"])(_this2, "submitHandler", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
104
- return _regenerator["default"].wrap(function _callee$(_context) {
105
- while (1) switch (_context.prev = _context.next) {
106
- case 0:
107
- _context.prev = 0;
108
- if (!_this2.props.entry.isTemporary()) {
109
- _context.next = 6;
110
- break;
111
- }
112
- _context.next = 4;
113
- return _this2.temporarySubmit();
114
- case 4:
115
- _context.next = 8;
116
- break;
117
- case 6:
118
- _context.next = 8;
119
- return _this2.normalSubmit();
120
- case 8:
121
- _context.next = 16;
122
- break;
123
- case 10:
124
- _context.prev = 10;
125
- _context.t0 = _context["catch"](0);
126
- if (!_context.t0.validationErrorsFromApi) {
127
- _context.next = 15;
128
- break;
129
- }
130
- _this2.setState({
131
- validationErrorsFromApi: _context.t0.validationErrorsFromApi
132
- });
133
- // Throwing an error here would cause an alert banner to show,
134
- // which we don't want in the case of a simple input validation error
135
- return _context.abrupt("return", _quizCommon.API_INPUT_VALIDATION_ERROR);
136
- case 15:
137
- throw _context.t0;
138
- case 16:
139
- _this2.navigateToBank();
140
- case 17:
141
- case "end":
142
- return _context.stop();
143
- }
144
- }, _callee, null, [[0, 10]]);
145
- })));
146
- (0, _defineProperty2["default"])(_this2, "handleRef", function (node) {
147
- _this2.itemEditArea = node;
148
- });
149
- (0, _defineProperty2["default"])(_this2, "clearChanges", function () {
150
- _this2.clearValidationErrorsFromApi(_quizCommon.CLEAR_ALL_INPUT_VALIDATION_ERRORS);
151
- if (!_this2.props.entry) return;
152
- if (_this2.props.entry.isTemporary()) {
153
- _this2.props.clearTemporaryBankItem(_this2.props.bankId);
154
- }
155
- _this2.props.clearModifications('items', _this2.props.entry.id);
156
- _this2.props.setPendingDeletionTagAssociations(_this2.props.bankEntry.entryType, _this2.props.entry.id, []);
157
- _this2.props.setPendingAdditionTagAssociations(_this2.props.bankEntry.entryType, _this2.props.entry.id, []);
158
- });
159
- (0, _defineProperty2["default"])(_this2, "handlePointsChange", function (points) {
160
- _this2.props.changeQuizEntryPoints(_this2.props.entry.id, points);
161
- });
162
- (0, _defineProperty2["default"])(_this2, "editProps", function (entry) {
163
- return {
164
- cancelHandler: _this2.navigateToBank,
165
- clearChanges: _this2.clearChanges,
166
- clearValidationErrorsFromApi: _this2.clearValidationErrorsFromApi,
167
- contextUuid: null,
168
- entry: entry,
169
- guid: "".concat(_this2.props.bankEntry.id, "_bank_entry_edit"),
170
- handleQuizEntryPointsChange: _this2.handlePointsChange,
171
- itemEditArea: _this2.itemEditArea,
172
- parentId: _this2.props.bankId,
173
- parentType: _quizCommon.PARENT_TYPE_BANK,
174
- stimulus: entry,
175
- submitHandler: _this2.submitHandler,
176
- validationErrorsFromApi: _this2.state.validationErrorsFromApi,
177
- scope: _this2.props.scope
178
- };
179
- });
180
- (0, _defineProperty2["default"])(_this2, "openFeedbackModal", function () {
181
- _this2.props.setUi(_quizCommon.ITEM_FEEDBACK_MODAL_ITEM, _this2.props.entry.getWorkingInstance());
182
- _this2.props.setUi(_quizCommon.ITEM_FEEDBACK_MODAL_FEEDBACK, _this2.props.entry.getWorkingInstance().feedback);
183
- _this2.props.openModal(_quizCommon.ITEM_FEEDBACK_MODAL, {
184
- modalTrigger: _this2.addFeedbackButton
185
- });
186
- });
187
- (0, _defineProperty2["default"])(_this2, "storeFeedbackButtonRef", function (button) {
188
- _this2.addFeedbackButton = button;
189
- });
190
- (0, _defineProperty2["default"])(_this2, "compareTagValues", function (left, right) {
191
- return left.tag_value === right.tag_value;
192
- });
193
- (0, _defineProperty2["default"])(_this2, "tagToAssociation", function (_ref2) {
194
- var value = _ref2.value;
195
- return {
196
- tag_value: value
197
- };
198
- });
199
- (0, _defineProperty2["default"])(_this2, "handleTagChange", function (tags) {
200
- var bankEntry = _this2.props.bankEntry;
201
- var tagAssociations = _this2.props.tagAssociations.toJS();
202
- var associations = tags.map(_this2.tagToAssociation);
203
- var removed = (0, _differenceWith["default"])(tagAssociations, associations, _this2.compareTagValues);
204
- var created = (0, _differenceWith["default"])(associations, tagAssociations, _this2.compareTagValues);
205
- // If a tag that was removed is being re-added,
206
- // remove from both addAssociations and deletedTags
207
- var restored = (0, _intersectionWith["default"])(created, removed, _this2.compareTagValues);
208
- var addOperations = (0, _differenceWith["default"])(created, restored, _isEqual["default"]);
209
- var deleteOperations = (0, _differenceWith["default"])(removed, restored, _this2.compareTagValues);
210
- var bankEntryId = _this2.getBankEntryId(bankEntry);
211
- _this2.props.setPendingDeletionTagAssociations(bankEntry.entryType, bankEntryId, deleteOperations);
212
- _this2.props.setPendingAdditionTagAssociations(bankEntry.entryType, bankEntryId, addOperations);
213
- });
214
- return _this2;
215
- }
216
- (0, _inherits2["default"])(BankEntry, _Component);
217
- return (0, _createClass2["default"])(BankEntry, [{
218
- key: "componentDidMount",
219
- value: function componentDidMount() {
220
- if (!this.isTemporary()) {
221
- this.props.getBankEntry(this.props.bankId, this.props.bankEntryId);
222
- }
223
- if (this.navToBankRef) {
224
- _reactDom["default"].findDOMNode(this.navToBankRef).focus();
225
- }
226
- this.props.getBank(this.props.bankId);
227
- }
228
- }, {
229
- key: "componentWillUnmount",
230
- value: function componentWillUnmount() {
231
- this.props.setShouldClone(false);
232
- }
233
- }, {
234
- key: "UNSAFE_componentWillMount",
235
- value: function UNSAFE_componentWillMount() {
236
- this.props.setShouldClone(false);
237
- }
238
- }, {
239
- key: "isTemporary",
240
- value: function isTemporary() {
241
- return this.props.entry && this.props.entry.isTemporary();
242
- }
243
- }, {
244
- key: "getBankEntryTypeSlug",
245
- value: function getBankEntryTypeSlug() {
246
- return this.props.bankEntry.entryType;
247
- }
248
- }, {
249
- key: "getEntry",
250
- value: function getEntry() {
251
- return this.props.entry;
252
- }
253
- }, {
254
- key: "isItemEntry",
255
- value: function isItemEntry() {
256
- return this.props.bankEntry.entryType === 'Item';
257
- }
258
- }, {
259
- key: "isStimulusEntry",
260
- value: function isStimulusEntry() {
261
- var _this$props$bankEntry;
262
- return (_this$props$bankEntry = this.props.bankEntry) === null || _this$props$bankEntry === void 0 ? void 0 : _this$props$bankEntry.isStimulusEntry;
263
- }
264
- }, {
265
- key: "isPassageEntry",
266
- value: function isPassageEntry() {
267
- var _this$props$bankEntry2;
268
- return (_this$props$bankEntry2 = this.props.bankEntry) === null || _this$props$bankEntry2 === void 0 ? void 0 : _this$props$bankEntry2.isPassageEntry;
269
- }
270
- }, {
271
- key: "getEditWarning",
272
- value: function getEditWarning() {
273
- if (this.isStimulusEntry()) {
274
- return (0, _formatMessage["default"])('Edits made here will appear on any assessment using this stimulus.');
275
- }
276
- if (this.isPassageEntry()) {
277
- return (0, _formatMessage["default"])('Edits made here will appear on any assessment using this text block.');
278
- }
279
- return (0, _formatMessage["default"])('Edits made here will appear on any assessment using this question.');
280
- }
281
- }, {
282
- key: "entryLinkName",
283
- value: function entryLinkName() {
284
- var translations = {
285
- "new": {
286
- question: (0, _formatMessage["default"])('New Question'),
287
- stimulus: (0, _formatMessage["default"])('New Stimulus'),
288
- passage: (0, _formatMessage["default"])('New Text Block')
289
- },
290
- edit: {
291
- question: (0, _formatMessage["default"])('Edit Question'),
292
- stimulus: (0, _formatMessage["default"])('Edit Stimulus'),
293
- passage: (0, _formatMessage["default"])('Edit Text Block')
294
- }
295
- };
296
- var operation = this.isTemporary() ? 'new' : 'edit';
297
- switch (true) {
298
- case this.isItemEntry():
299
- return translations[operation]['question'];
300
- case this.isStimulusEntry():
301
- return translations[operation]['stimulus'];
302
- case this.isPassageEntry():
303
- return translations[operation]['passage'];
304
- }
305
- }
306
- }, {
307
- key: "renderBankBreadCrumbLink",
308
- value: function renderBankBreadCrumbLink() {
309
- return (0, _emotion.jsx)(_uiBreadcrumb.BreadcrumbLink, {
310
- key: "bank",
311
- onClick: this.navigateToBank,
312
- ref: this.setNavToBankRef
313
- }, this.props.bank.title);
314
- }
315
- }, {
316
- key: "renderBankEntryBreadCrumbLink",
317
- value: function renderBankEntryBreadCrumbLink() {
318
- return (0, _emotion.jsx)(_uiBreadcrumb.BreadcrumbLink, {
319
- key: "bankEntry"
320
- }, this.entryLinkName());
7
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8
+ try {
9
+ var info = gen[key](arg);
10
+ var value = info.value;
11
+ } catch (error) {
12
+ reject(error);
13
+ return;
321
14
  }
322
- }, {
323
- key: "renderNav",
324
- value: function renderNav() {
325
- var _this$props = this.props,
326
- scope = _this$props.scope,
327
- closeTray = _this$props.closeTray,
328
- navigateToBanks = _this$props.navigateToBanks,
329
- navigateToBuild = _this$props.navigateToBuild,
330
- returnToUrl = _this$props.returnToUrl;
331
- var isScopeEmpty = !Object.keys(scope).length;
332
- return (0, _emotion.jsx)(_NavWrapper["default"], {
333
- closeTray: closeTray,
334
- navigateToBanks: navigateToBanks,
335
- navigateToBuild: navigateToBuild,
336
- returnToUrl: isScopeEmpty ? null : returnToUrl,
337
- scope: scope,
338
- isCompact: this.props.isCompact,
339
- iceTopNavBarEnabled: this.props.iceTopNavBarEnabled,
340
- menuItemPath: "/banks/".concat(this.props.bankId, "/bank_entries/").concat(this.props.bankEntryId || 'new')
341
- }, this.renderBankBreadCrumbLink(), this.renderBankEntryBreadCrumbLink());
15
+ if (info.done) {
16
+ resolve(value);
17
+ } else {
18
+ Promise.resolve(value).then(_next, _throw);
342
19
  }
343
- }, {
344
- key: "renderTitle",
345
- value: function renderTitle(entry) {
346
- if (this.isItemEntry()) {
347
- return (0, _emotion.jsx)(_quizCommon.TextInput, {
348
- renderLabel: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage["default"])('Edit question title')),
349
- type: "text",
350
- placeholder: (0, _formatMessage["default"])('Question Title'),
351
- onChange: this.handleTitleChange,
352
- value: entry.getWorkingInstance().title || ''
20
+ }
21
+ function _async_to_generator(fn) {
22
+ return function() {
23
+ var self = this, args = arguments;
24
+ return new Promise(function(resolve, reject) {
25
+ var gen = fn.apply(self, args);
26
+ function _next(value) {
27
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
28
+ }
29
+ function _throw(err) {
30
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
31
+ }
32
+ _next(undefined);
353
33
  });
354
- }
355
- }
356
- }, {
357
- key: "getIdentifier",
358
- value: function getIdentifier(entry) {
359
- if (!entry) return;
360
- switch (true) {
361
- case this.isItemEntry():
362
- return (0, _formatMessage["default"])('Question { id }', {
363
- id: entry.id
364
- });
365
- case this.isStimulusEntry():
366
- return (0, _formatMessage["default"])('Stimulus { id }', {
367
- id: entry.id
368
- });
369
- case this.isPassageEntry():
370
- return (0, _formatMessage["default"])('Text Block { id }', {
371
- id: entry.id
372
- });
373
- default:
374
- return;
375
- }
376
- }
377
- }, {
378
- key: "getTemporaryIdentifier",
379
- value: function getTemporaryIdentifier() {
380
- switch (true) {
381
- case this.isItemEntry():
382
- return (0, _formatMessage["default"])('New Question');
383
- case this.isStimulusEntry():
384
- return (0, _formatMessage["default"])('New Stimulus');
385
- case this.isPassageEntry():
386
- return (0, _formatMessage["default"])('New Text Block');
387
- default:
388
- return;
389
- }
390
- }
391
- }, {
392
- key: "getEntryName",
393
- value: function getEntryName(entry) {
394
- var _entry$getInteraction;
395
- if (!entry) return;
396
- switch (true) {
397
- case this.isItemEntry():
398
- return (_entry$getInteraction = entry.getInteractionType()) === null || _entry$getInteraction === void 0 ? void 0 : _entry$getInteraction.name;
399
- case this.isStimulusEntry():
400
- return (0, _formatMessage["default"])('Stimulus');
401
- case this.isPassageEntry():
402
- return (0, _formatMessage["default"])('Text Block');
403
- default:
404
- return;
405
- }
406
- }
407
- }, {
408
- key: "renderHeader",
409
- value: function renderHeader(entry) {
410
- if (!entry) return;
411
- var props = this.editProps(entry);
412
- var identifier = this.getIdentifier(entry);
413
- var tempIdentifier = this.getTemporaryIdentifier();
414
- var itemIdentifier = this.isTemporary() ? tempIdentifier : identifier;
415
- var entryName = this.getEntryName(entry);
416
- return (0, _emotion.jsx)("div", {
417
- css: this.props.styles.header
418
- }, (0, _emotion.jsx)("div", {
419
- css: this.props.styles.leftHeader
420
- }, (0, _emotion.jsx)("div", {
421
- css: this.props.styles.headerText
422
- }, (0, _emotion.jsx)(_uiHeading.Heading, {
423
- level: "reset",
424
- as: "h2"
425
- }, (0, _formatMessage["default"])('{entryName} | {itemIdentifier}', {
426
- entryName: entryName,
427
- itemIdentifier: itemIdentifier
428
- })))), this.renderTitle(entry), (0, _emotion.jsx)("div", {
429
- css: this.props.styles.rightHeader
430
- }, (0, _emotion.jsx)(_EntrySave["default"], props)));
34
+ };
35
+ }
36
+ function _call_super(_this, derived, args) {
37
+ derived = _get_prototype_of(derived);
38
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
39
+ }
40
+ function _class_call_check(instance, Constructor) {
41
+ if (!(instance instanceof Constructor)) {
42
+ throw new TypeError("Cannot call a class as a function");
431
43
  }
432
- }, {
433
- key: "hasPendingTagModifications",
434
- value: function hasPendingTagModifications() {
435
- return !this.props.pendingDeletionTags.isEmpty() || !this.props.pendingAdditionTags.isEmpty();
44
+ }
45
+ function _defineProperties(target, props) {
46
+ for(var i = 0; i < props.length; i++){
47
+ var descriptor = props[i];
48
+ descriptor.enumerable = descriptor.enumerable || false;
49
+ descriptor.configurable = true;
50
+ if ("value" in descriptor) descriptor.writable = true;
51
+ Object.defineProperty(target, descriptor.key, descriptor);
436
52
  }
437
- }, {
438
- key: "createTagsForClone",
439
- value: function createTagsForClone(newBankEntry, tags) {
440
- this.props.createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, tags.map(function (tag) {
441
- return tag.tag_value;
442
- }));
443
- // Pending tag associations were applied to the original bank entry, so clear those out
444
- this.props.setPendingAdditionTagAssociations(this.props.bankEntry.entryType, this.props.entry.id, []);
445
- this.props.setPendingDeletionTagAssociations(this.props.bankEntry.entryType, this.props.entry.id, []);
53
+ }
54
+ function _create_class(Constructor, protoProps, staticProps) {
55
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
56
+ if (staticProps) _defineProperties(Constructor, staticProps);
57
+ return Constructor;
58
+ }
59
+ function _define_property(obj, key, value) {
60
+ if (key in obj) {
61
+ Object.defineProperty(obj, key, {
62
+ value: value,
63
+ enumerable: true,
64
+ configurable: true,
65
+ writable: true
66
+ });
67
+ } else {
68
+ obj[key] = value;
446
69
  }
447
- }, {
448
- key: "updateTagsForEntry",
449
- value: function () {
450
- var _updateTagsForEntry = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
451
- return _regenerator["default"].wrap(function _callee2$(_context2) {
452
- while (1) switch (_context2.prev = _context2.next) {
453
- case 0:
454
- if (this.props.shouldClone) {
455
- _context2.next = 5;
456
- break;
457
- }
458
- _context2.next = 3;
459
- return this.props.createTagAssociations(this.props.bankEntryId, this.props.bankEntry.entryType, this.getBankEntryId(this.props.bankEntry), this.props.pendingAdditionTags.map(function (tagToAdd) {
460
- return tagToAdd.get('tag_value');
461
- }));
462
- case 3:
463
- _context2.next = 5;
464
- return this.props.deleteTagAssociations(this.props.bankEntryId, this.props.bankEntry.entryType, this.getBankEntryId(this.props.bankEntry), this.props.pendingDeletionTags.map(function (tagToDelete) {
465
- return tagToDelete.get('id');
466
- }));
467
- case 5:
468
- case "end":
469
- return _context2.stop();
470
- }
471
- }, _callee2, this);
472
- }));
473
- function updateTagsForEntry() {
474
- return _updateTagsForEntry.apply(this, arguments);
475
- }
476
- return updateTagsForEntry;
477
- }()
478
- }, {
479
- key: "normalSubmit",
480
- value: function () {
481
- var _normalSubmit = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
482
- var entry, tags, createEntryCb, newBankEntry, workingEntry, updateFunc, toClear;
483
- return _regenerator["default"].wrap(function _callee3$(_context3) {
484
- while (1) switch (_context3.prev = _context3.next) {
485
- case 0:
486
- entry = this.props.entry;
487
- if (!(entry.hasModifications() || this.props.shouldClone && this.hasPendingTagModifications())) {
488
- _context3.next = 17;
489
- break;
490
- }
491
- if (!this.props.shouldClone) {
492
- _context3.next = 11;
493
- break;
494
- }
495
- tags = this.visibleTagAssociations();
496
- createEntryCb = this.isItemEntry() ? _items.createItem : _stimuli.createStimulus;
497
- _context3.next = 7;
498
- return this.props.cloneBankEntry(this.props.bankEntry, createEntryCb);
499
- case 7:
500
- newBankEntry = _context3.sent;
501
- this.createTagsForClone(newBankEntry, tags);
502
- _context3.next = 15;
503
- break;
504
- case 11:
505
- workingEntry = entry.getWorkingInstance();
506
- updateFunc = this.isItemEntry() ? this.props.updateItem : this.props.updateStimulus;
507
- _context3.next = 15;
508
- return updateFunc(workingEntry, this.props.bankId, 'bank');
509
- case 15:
510
- toClear = this.isItemEntry() ? 'items' : 'stimuli';
511
- this.props.clearModifications(toClear, entry.id);
512
- case 17:
513
- if (!this.hasPendingTagModifications()) {
514
- _context3.next = 20;
515
- break;
516
- }
517
- _context3.next = 20;
518
- return this.updateTagsForEntry();
519
- case 20:
520
- case "end":
521
- return _context3.stop();
522
- }
523
- }, _callee3, this);
524
- }));
525
- function normalSubmit() {
526
- return _normalSubmit.apply(this, arguments);
527
- }
528
- return normalSubmit;
529
- }()
530
- }, {
531
- key: "temporarySubmit",
532
- value: function () {
533
- var _temporarySubmit = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
534
- var entry, workingEntry, workingBankEntry, createEntryCb, newBankEntry, toClear;
535
- return _regenerator["default"].wrap(function _callee4$(_context4) {
536
- while (1) switch (_context4.prev = _context4.next) {
537
- case 0:
538
- entry = this.props.entry;
539
- workingEntry = entry.getWorkingInstance();
540
- workingBankEntry = this.props.bankEntry.getWorkingInstance();
541
- createEntryCb = this.isItemEntry() ? _items.createItem : _stimuli.createStimulus;
542
- _context4.next = 6;
543
- return this.props.createEntryAndBankEntry(this.props.bankId, workingEntry, workingBankEntry, createEntryCb);
544
- case 6:
545
- newBankEntry = _context4.sent;
546
- if (this.hasPendingTagModifications()) {
547
- this.props.createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, this.props.pendingAdditionTags.map(function (tagToAdd) {
548
- return tagToAdd.get('tag_value');
549
- }));
550
- }
551
- toClear = this.isItemEntry() ? 'items' : 'stimuli';
552
- this.props.clearModifications(toClear, entry.id);
553
- this.props.clearTemporaryBankItem(this.props.bankId);
554
- case 11:
555
- case "end":
556
- return _context4.stop();
557
- }
558
- }, _callee4, this);
559
- }));
560
- function temporarySubmit() {
561
- return _temporarySubmit.apply(this, arguments);
562
- }
563
- return temporarySubmit;
564
- }()
565
- }, {
566
- key: "renderFeedbackSection",
567
- value: function renderFeedbackSection() {
568
- if (!this.isItemEntry()) {
569
- return;
570
- }
571
- var shouldClone = this.props.shouldClone;
572
- var disabled = this.props.entry.isImmutable() && !shouldClone;
573
- var icon, text;
574
- if (this.props.entry.getWorkingInstance().hasFeedback()) {
575
- icon = _uiIcons.IconDiscussionSolid;
576
- text = (0, _formatMessage["default"])('Edit Question Level Feedback (present)');
577
- } else {
578
- icon = _uiIcons.IconDiscussionLine;
579
- text = (0, _formatMessage["default"])('Edit Question Level Feedback');
580
- }
581
- return (0, _emotion.jsx)(_uiButtons.IconButton, {
582
- onClick: this.openFeedbackModal,
583
- withBackground: false,
584
- withBorder: false,
585
- disabled: disabled,
586
- ref: this.storeFeedbackButtonRef,
587
- renderIcon: icon,
588
- screenReaderLabel: text
589
- });
70
+ return obj;
71
+ }
72
+ function _get_prototype_of(o) {
73
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
74
+ return o.__proto__ || Object.getPrototypeOf(o);
75
+ };
76
+ return _get_prototype_of(o);
77
+ }
78
+ function _inherits(subClass, superClass) {
79
+ if (typeof superClass !== "function" && superClass !== null) {
80
+ throw new TypeError("Super expression must either be null or a function");
590
81
  }
591
- }, {
592
- key: "getBankEntryId",
593
- value: function getBankEntryId(bankEntry) {
594
- // bankEntry.entry can be either 'TEMPORARY_ITEM' or an entire Map
595
- return bankEntry.entry ? bankEntry.entry.get ? bankEntry.entry.get('id') : bankEntry.entry : null;
82
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
83
+ constructor: {
84
+ value: subClass,
85
+ writable: true,
86
+ configurable: true
87
+ }
88
+ });
89
+ if (superClass) _set_prototype_of(subClass, superClass);
90
+ }
91
+ function _possible_constructor_return(self, call) {
92
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
93
+ return call;
596
94
  }
597
- }, {
598
- key: "visibleTagAssociations",
599
- value: function visibleTagAssociations() {
600
- var _this$props2 = this.props,
601
- pendingAdditionTags = _this$props2.pendingAdditionTags,
602
- pendingDeletionTags = _this$props2.pendingDeletionTags,
603
- tagAssociations = _this$props2.tagAssociations;
604
- var existingValues = (0, _keyBy["default"])(tagAssociations.toJS(), function (t) {
605
- return t.tag_value;
606
- });
607
- var noDuplicates = pendingAdditionTags.filter(function (t) {
608
- return (0, _isUndefined["default"])(existingValues[t.get('tag_value')]);
609
- });
610
- return tagAssociations.filter(function (tag) {
611
- return !pendingDeletionTags.includes(tag);
612
- }).concat(noDuplicates).toJS();
95
+ return _assert_this_initialized(self);
96
+ }
97
+ function _set_prototype_of(o, p) {
98
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
99
+ o.__proto__ = p;
100
+ return o;
101
+ };
102
+ return _set_prototype_of(o, p);
103
+ }
104
+ function _type_of(obj) {
105
+ "@swc/helpers - typeof";
106
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
107
+ }
108
+ function _is_native_reflect_construct() {
109
+ try {
110
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
111
+ } catch (_) {}
112
+ return (_is_native_reflect_construct = function() {
113
+ return !!result;
114
+ })();
115
+ }
116
+ function _ts_decorate(decorators, target, key, desc) {
117
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
118
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
119
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
120
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
121
+ }
122
+ function _ts_generator(thisArg, body) {
123
+ var f, y, t, _ = {
124
+ label: 0,
125
+ sent: function() {
126
+ if (t[0] & 1) throw t[1];
127
+ return t[1];
128
+ },
129
+ trys: [],
130
+ ops: []
131
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
132
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
133
+ return this;
134
+ }), g;
135
+ function verb(n) {
136
+ return function(v) {
137
+ return step([
138
+ n,
139
+ v
140
+ ]);
141
+ };
613
142
  }
614
- }, {
615
- key: "visibleTags",
616
- value: function visibleTags() {
617
- return this.visibleTagAssociations().map(function (a) {
143
+ function step(op) {
144
+ if (f) throw new TypeError("Generator is already executing.");
145
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
146
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
147
+ if (y = 0, t) op = [
148
+ op[0] & 2,
149
+ t.value
150
+ ];
151
+ switch(op[0]){
152
+ case 0:
153
+ case 1:
154
+ t = op;
155
+ break;
156
+ case 4:
157
+ _.label++;
158
+ return {
159
+ value: op[1],
160
+ done: false
161
+ };
162
+ case 5:
163
+ _.label++;
164
+ y = op[1];
165
+ op = [
166
+ 0
167
+ ];
168
+ continue;
169
+ case 7:
170
+ op = _.ops.pop();
171
+ _.trys.pop();
172
+ continue;
173
+ default:
174
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
175
+ _ = 0;
176
+ continue;
177
+ }
178
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
179
+ _.label = op[1];
180
+ break;
181
+ }
182
+ if (op[0] === 6 && _.label < t[1]) {
183
+ _.label = t[1];
184
+ t = op;
185
+ break;
186
+ }
187
+ if (t && _.label < t[2]) {
188
+ _.label = t[2];
189
+ _.ops.push(op);
190
+ break;
191
+ }
192
+ if (t[2]) _.ops.pop();
193
+ _.trys.pop();
194
+ continue;
195
+ }
196
+ op = body.call(thisArg, _);
197
+ } catch (e) {
198
+ op = [
199
+ 6,
200
+ e
201
+ ];
202
+ y = 0;
203
+ } finally{
204
+ f = t = 0;
205
+ }
206
+ if (op[0] & 5) throw op[1];
618
207
  return {
619
- id: a.tag_id,
620
- value: a.tag_value
208
+ value: op[0] ? op[1] : void 0,
209
+ done: true
621
210
  };
622
- });
623
211
  }
624
- }, {
625
- key: "renderEntry",
626
- value: function renderEntry(entry) {
627
- var _this3 = this;
628
- if (!entry) return;
629
- var _this$props3 = this.props,
630
- bankEntry = _this$props3.bankEntry,
631
- useBankTags = _this$props3.useBankTags;
632
- var props = this.editProps(entry);
633
- var propsFunc = this.isItemEntry() ? _warningHelpers.propsForItemVersioningWrapper : _warningHelpers.propsForStimulusVersioningWrapper;
634
- var versioningProps = propsFunc(entry.isImmutable(), this.props.shouldClone, this.props.setShouldClone, this.navigateToBank, true, 'warning', this.isPassageEntry());
635
- var canEdit = !entry.isImmutable() || this.props.shouldClone;
636
- var ItemComponent = canEdit ? _ItemEdit["default"] : _ItemShow["default"];
637
- var StimulusComponent = canEdit ? _StimulusEditInfo["default"] : _StimulusShowInfo["default"];
638
- var EntryComponent = this.isItemEntry() ? ItemComponent : StimulusComponent;
639
- var entryType = bankEntry.entryType;
640
- var entryId = this.getBankEntryId(bankEntry);
641
- var tags = function tags() {
642
- return (0, _emotion.jsx)(_TagSuggestSelect["default"], {
643
- allowNewTags: true,
644
- noMatchText: (0, _formatMessage["default"])('Enter a tag to find or create'),
645
- parentType: entryType,
646
- parentId: entryId,
647
- onChange: _this3.handleTagChange,
648
- tags: _this3.visibleTags()
212
+ }
213
+ import { Component } from 'react';
214
+ import ReactDOM from 'react-dom';
215
+ import PropTypes from 'prop-types';
216
+ import Immutable from 'immutable';
217
+ import ImmutablePropTypes from 'react-immutable-proptypes';
218
+ import differenceWith from 'lodash/differenceWith';
219
+ import intersectionWith from 'lodash/intersectionWith';
220
+ import isEqual from 'lodash/isEqual';
221
+ import isUndefined from 'lodash/isUndefined';
222
+ import keyBy from 'lodash/keyBy';
223
+ import { Alert } from '@instructure/ui-alerts';
224
+ import { BreadcrumbLink } from '@instructure/ui-breadcrumb';
225
+ import { IconButton } from '@instructure/ui-buttons';
226
+ import { Text } from '@instructure/ui-text';
227
+ import { Heading } from '@instructure/ui-heading';
228
+ import { IconDiscussionLine, IconDiscussionSolid } from '@instructure/ui-icons';
229
+ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
230
+ import { jsx } from '@instructure/emotion';
231
+ import { HeaderBreadCrumb } from '../HeaderBreadCrumb';
232
+ import EntrySave from '../../../common/components/resources/entry/EntrySave';
233
+ import ItemEdit from '../../../common/components/resources/item/ItemEdit';
234
+ import ItemFeedbackModal from '../../../building/components/resources/ItemFeedbackModal';
235
+ import ItemShow from '../../../common/components/resources/item/ItemShow';
236
+ import Page from '../../../common/components/layout/Page';
237
+ import Spinner from '../../../common/components/shared/spinner/Spinner';
238
+ import StimulusEditInfo from '../../../common/components/resources/stimulus/StimulusEditInfo';
239
+ import StimulusShowInfo from '../../../common/components/resources/stimulus/StimulusShowInfo';
240
+ import TagSuggestSelect from '../../../common/components/shared/TagSuggestSelect';
241
+ import WarningWrapper from '../../../common/components/resources/WarningWrapper';
242
+ import t from '@instructure/quiz-i18n/format-message';
243
+ import { createItem } from '../../../building/api/items';
244
+ import { createStimulus } from '../../../building/api/stimuli';
245
+ import { propsForItemVersioningWrapper, propsForStimulusVersioningWrapper } from '../../../common/util/warningHelpers';
246
+ import NavWrapper from '../NavWrapper';
247
+ import { API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, PARENT_TYPE_BANK, TextInput, withStyleOverrides } from '@instructure/quiz-common';
248
+ import generateStyle from './styles';
249
+ import generateComponentTheme from './theme';
250
+ export var BankEntry = /*#__PURE__*/ function(Component) {
251
+ "use strict";
252
+ _inherits(BankEntry, Component);
253
+ function BankEntry() {
254
+ _class_call_check(this, BankEntry);
255
+ var _this;
256
+ var _this1;
257
+ _this = _call_super(this, BankEntry, arguments), _this1 = _this, _define_property(_this1, "state", {
258
+ validationErrorsFromApi: {}
259
+ }), _define_property(_this1, "setNavToBankRef", function(node) {
260
+ _this1.navToBankRef = node;
261
+ }), _define_property(_this1, "navigateToBank", function() {
262
+ _this1.props.navigateToBank(_this1.props.bankId);
263
+ }), _define_property(_this1, "handleTitleChange", function(e) {
264
+ _this1.props.changeItemTitle(_this1.props.entry.id, e.target.value);
265
+ }), _define_property(_this1, "clearValidationErrorsFromApi", function(inputId) {
266
+ if (inputId === CLEAR_ALL_INPUT_VALIDATION_ERRORS) {
267
+ _this1.setState({
268
+ validationErrorsFromApi: {}
269
+ });
270
+ }
271
+ if (_this1.state.validationErrorsFromApi[inputId]) {
272
+ var newErrors = Object.assign({}, _this1.state.validationErrorsFromApi);
273
+ delete newErrors[inputId];
274
+ _this1.setState({
275
+ validationErrorsFromApi: newErrors
276
+ });
277
+ }
278
+ }), _define_property(_this1, "submitHandler", function() {
279
+ return _async_to_generator(function() {
280
+ var e;
281
+ return _ts_generator(this, function(_state) {
282
+ switch(_state.label){
283
+ case 0:
284
+ _state.trys.push([
285
+ 0,
286
+ 5,
287
+ ,
288
+ 6
289
+ ]);
290
+ if (!_this1.props.entry.isTemporary()) return [
291
+ 3,
292
+ 2
293
+ ];
294
+ return [
295
+ 4,
296
+ _this1.temporarySubmit()
297
+ ];
298
+ case 1:
299
+ _state.sent();
300
+ return [
301
+ 3,
302
+ 4
303
+ ];
304
+ case 2:
305
+ return [
306
+ 4,
307
+ _this1.normalSubmit()
308
+ ];
309
+ case 3:
310
+ _state.sent();
311
+ _state.label = 4;
312
+ case 4:
313
+ return [
314
+ 3,
315
+ 6
316
+ ];
317
+ case 5:
318
+ e = _state.sent();
319
+ if (e.validationErrorsFromApi) {
320
+ _this1.setState({
321
+ validationErrorsFromApi: e.validationErrorsFromApi
322
+ });
323
+ // Throwing an error here would cause an alert banner to show,
324
+ // which we don't want in the case of a simple input validation error
325
+ return [
326
+ 2,
327
+ API_INPUT_VALIDATION_ERROR
328
+ ];
329
+ }
330
+ throw e;
331
+ case 6:
332
+ _this1.navigateToBank();
333
+ return [
334
+ 2
335
+ ];
336
+ }
337
+ });
338
+ })();
339
+ }), _define_property(_this1, "handleRef", function(node) {
340
+ _this1.itemEditArea = node;
341
+ }), _define_property(_this1, "clearChanges", function() {
342
+ _this1.clearValidationErrorsFromApi(CLEAR_ALL_INPUT_VALIDATION_ERRORS);
343
+ if (!_this1.props.entry) return;
344
+ if (_this1.props.entry.isTemporary()) {
345
+ _this1.props.clearTemporaryBankItem(_this1.props.bankId);
346
+ }
347
+ _this1.props.clearModifications('items', _this1.props.entry.id);
348
+ _this1.props.setPendingDeletionTagAssociations(_this1.props.bankEntry.entryType, _this1.props.entry.id, []);
349
+ _this1.props.setPendingAdditionTagAssociations(_this1.props.bankEntry.entryType, _this1.props.entry.id, []);
350
+ }), _define_property(_this1, "handlePointsChange", function(points) {
351
+ _this1.props.changeQuizEntryPoints(_this1.props.entry.id, points);
352
+ }), _define_property(_this1, "editProps", function(entry) {
353
+ return {
354
+ cancelHandler: _this1.navigateToBank,
355
+ clearChanges: _this1.clearChanges,
356
+ clearValidationErrorsFromApi: _this1.clearValidationErrorsFromApi,
357
+ contextUuid: null,
358
+ entry: entry,
359
+ guid: "".concat(_this1.props.bankEntry.id, "_bank_entry_edit"),
360
+ handleQuizEntryPointsChange: _this1.handlePointsChange,
361
+ itemEditArea: _this1.itemEditArea,
362
+ parentId: _this1.props.bankId,
363
+ parentType: PARENT_TYPE_BANK,
364
+ stimulus: entry,
365
+ submitHandler: _this1.submitHandler,
366
+ validationErrorsFromApi: _this1.state.validationErrorsFromApi,
367
+ scope: _this1.props.scope
368
+ };
369
+ }), _define_property(_this1, "openFeedbackModal", function() {
370
+ _this1.props.setUi(ITEM_FEEDBACK_MODAL_ITEM, _this1.props.entry.getWorkingInstance());
371
+ _this1.props.setUi(ITEM_FEEDBACK_MODAL_FEEDBACK, _this1.props.entry.getWorkingInstance().feedback);
372
+ _this1.props.openModal(ITEM_FEEDBACK_MODAL, {
373
+ modalTrigger: _this1.addFeedbackButton
374
+ });
375
+ }), _define_property(_this1, "storeFeedbackButtonRef", function(button) {
376
+ _this1.addFeedbackButton = button;
377
+ }), _define_property(_this1, "compareTagValues", function(left, right) {
378
+ return left.tag_value === right.tag_value;
379
+ }), _define_property(_this1, "tagToAssociation", function(param) {
380
+ var value = param.value;
381
+ return {
382
+ tag_value: value
383
+ };
384
+ }), _define_property(_this1, "handleTagChange", function(tags) {
385
+ var bankEntry = _this1.props.bankEntry;
386
+ var tagAssociations = _this1.props.tagAssociations.toJS();
387
+ var associations = tags.map(_this1.tagToAssociation);
388
+ var removed = differenceWith(tagAssociations, associations, _this1.compareTagValues);
389
+ var created = differenceWith(associations, tagAssociations, _this1.compareTagValues);
390
+ // If a tag that was removed is being re-added,
391
+ // remove from both addAssociations and deletedTags
392
+ var restored = intersectionWith(created, removed, _this1.compareTagValues);
393
+ var addOperations = differenceWith(created, restored, isEqual);
394
+ var deleteOperations = differenceWith(removed, restored, _this1.compareTagValues);
395
+ var bankEntryId = _this1.getBankEntryId(bankEntry);
396
+ _this1.props.setPendingDeletionTagAssociations(bankEntry.entryType, bankEntryId, deleteOperations);
397
+ _this1.props.setPendingAdditionTagAssociations(bankEntry.entryType, bankEntryId, addOperations);
649
398
  });
650
- };
651
- var editWarning = this.getEditWarning();
652
- return (0, _emotion.jsx)("div", null, (0, _emotion.jsx)("div", {
653
- css: this.props.styles.entryEdit
654
- }, (0, _emotion.jsx)(_WarningWrapper["default"], versioningProps, canEdit && (0, _emotion.jsx)(_uiAlerts.Alert, {
655
- renderCloseButtonLabel: (0, _formatMessage["default"])('Dismiss'),
656
- margin: "0 0 medium 0"
657
- }, (0, _emotion.jsx)(_uiText.Text, {
658
- color: "primary"
659
- }, editWarning)), (0, _emotion.jsx)(EntryComponent, props), useBankTags && tags())), (0, _emotion.jsx)("div", {
660
- css: this.props.styles.footer
661
- }, (0, _emotion.jsx)("div", {
662
- css: this.props.styles.leftFooter
663
- }, this.renderFeedbackSection()), (0, _emotion.jsx)("div", {
664
- css: this.props.styles.rightFooter
665
- }, (0, _emotion.jsx)(_EntrySave["default"], props))));
666
- }
667
- }, {
668
- key: "render",
669
- value: function render() {
670
- var entry = this.props.entry;
671
- if (entry && !entry.isLoaded()) {
672
- return (0, _emotion.jsx)(_Spinner["default"], null);
673
- }
674
- return (0, _emotion.jsx)(_Page["default"], null, this.renderNav(), (0, _emotion.jsx)("div", {
675
- css: this.props.styles.content,
676
- ref: this.handleRef
677
- }, this.props.iceTopNavBarEnabled && (0, _emotion.jsx)("div", {
678
- css: this.props.styles.breadcrumb
679
- }, (0, _emotion.jsx)(_HeaderBreadCrumb.HeaderBreadCrumb, {
680
- returnToUrl: this.props.returnToUrl,
681
- scope: this.props.scope,
682
- navigateToBanks: this.props.navigateToBanks,
683
- navigateToBuild: this.props.navigateToBuild
684
- }, this.renderBankBreadCrumbLink(), this.renderBankEntryBreadCrumbLink())), this.renderHeader(entry), this.renderEntry(entry), !this.props.isCompact && (0, _emotion.jsx)(_ItemFeedbackModal["default"], {
685
- parentId: this.props.bankId,
686
- parentType: _quizCommon.PARENT_TYPE_BANK
687
- })));
399
+ return _this;
688
400
  }
689
- }]);
690
- }(_react.Component), (0, _defineProperty2["default"])(_BankEntry, "displayName", 'BankEntry'), (0, _defineProperty2["default"])(_BankEntry, "componentId", "Quizzes".concat(_BankEntry.displayName)), (0, _defineProperty2["default"])(_BankEntry, "propTypes", {
691
- bankEntryId: _propTypes["default"].string.isRequired,
692
- bankId: _propTypes["default"].string.isRequired,
693
- bank: _reactImmutableProptypes["default"].record.isRequired,
694
- bankEntry: _reactImmutableProptypes["default"].record.isRequired,
695
- entry: _reactImmutableProptypes["default"].record,
696
- changeItemTitle: _propTypes["default"].func.isRequired,
697
- changeQuizEntryPoints: _propTypes["default"].func.isRequired,
698
- cloneBankEntry: _propTypes["default"].func.isRequired,
699
- clearModifications: _propTypes["default"].func.isRequired,
700
- clearTemporaryBankItem: _propTypes["default"].func.isRequired,
701
- createEntryAndBankEntry: _propTypes["default"].func.isRequired,
702
- closeTray: _propTypes["default"].func,
703
- createTagAssociations: _propTypes["default"].func.isRequired,
704
- deleteTagAssociations: _propTypes["default"].func.isRequired,
705
- getBankEntry: _propTypes["default"].func.isRequired,
706
- getBank: _propTypes["default"].func.isRequired,
707
- isCompact: _propTypes["default"].bool,
708
- navigateToBanks: _propTypes["default"].func.isRequired,
709
- // can be from consumer
710
- navigateToBank: _propTypes["default"].func.isRequired,
711
- // can be from consumer
712
- navigateToBuild: _propTypes["default"].func,
713
- // from consumer
714
- scope: _propTypes["default"].objectOf(_propTypes["default"].shape({
715
- type: _propTypes["default"].string,
716
- uuid: _propTypes["default"].string,
717
- title: _propTypes["default"].string,
718
- launch_context_uuid: _propTypes["default"].string,
719
- root_account_name: _propTypes["default"].string
720
- })),
721
- returnToUrl: _propTypes["default"].string,
722
- // from consumer
723
- openModal: _propTypes["default"].func.isRequired,
724
- pendingAdditionTags: _reactImmutableProptypes["default"].listOf(_reactImmutableProptypes["default"].map),
725
- pendingDeletionTags: _reactImmutableProptypes["default"].listOf(_reactImmutableProptypes["default"].map),
726
- setPendingAdditionTagAssociations: _propTypes["default"].func.isRequired,
727
- setPendingDeletionTagAssociations: _propTypes["default"].func.isRequired,
728
- setShouldClone: _propTypes["default"].func.isRequired,
729
- setTagInput: _propTypes["default"].func.isRequired,
730
- setUi: _propTypes["default"].func.isRequired,
731
- shouldClone: _propTypes["default"].bool.isRequired,
732
- tagAssociations: _reactImmutableProptypes["default"].listOf(_reactImmutableProptypes["default"].map),
733
- tagInput: _propTypes["default"].string,
734
- updateItem: _propTypes["default"].func.isRequired,
735
- updateStimulus: _propTypes["default"].func.isRequired,
736
- useBankTags: _propTypes["default"].bool,
737
- iceTopNavBarEnabled: _propTypes["default"].bool,
738
- styles: _propTypes["default"].object
739
- }), (0, _defineProperty2["default"])(_BankEntry, "defaultProps", {
740
- closeTray: function closeTray() {},
741
- entry: null,
742
- isCompact: false,
743
- navigateToBuild: null,
744
- scope: {},
745
- returnToUrl: null,
746
- pendingAdditionTags: _immutable["default"].List(),
747
- pendingDeletionTags: _immutable["default"].List(),
748
- tagAssociations: _immutable["default"].List(),
749
- tagInput: null,
750
- useBankTags: false,
751
- iceTopNavBarEnabled: false
752
- }), _BankEntry)) || _class);
753
- var _default = exports["default"] = BankEntry;
401
+ _create_class(BankEntry, [
402
+ {
403
+ key: "componentDidMount",
404
+ value: function componentDidMount() {
405
+ if (!this.isTemporary()) {
406
+ this.props.getBankEntry(this.props.bankId, this.props.bankEntryId);
407
+ }
408
+ if (this.navToBankRef) {
409
+ ReactDOM.findDOMNode(this.navToBankRef).focus();
410
+ }
411
+ this.props.getBank(this.props.bankId);
412
+ }
413
+ },
414
+ {
415
+ key: "componentWillUnmount",
416
+ value: function componentWillUnmount() {
417
+ this.props.setShouldClone(false);
418
+ }
419
+ },
420
+ {
421
+ key: "UNSAFE_componentWillMount",
422
+ value: function UNSAFE_componentWillMount() {
423
+ this.props.setShouldClone(false);
424
+ }
425
+ },
426
+ {
427
+ key: "isTemporary",
428
+ value: function isTemporary() {
429
+ return this.props.entry && this.props.entry.isTemporary();
430
+ }
431
+ },
432
+ {
433
+ key: "getBankEntryTypeSlug",
434
+ value: function getBankEntryTypeSlug() {
435
+ return this.props.bankEntry.entryType;
436
+ }
437
+ },
438
+ {
439
+ key: "getEntry",
440
+ value: function getEntry() {
441
+ return this.props.entry;
442
+ }
443
+ },
444
+ {
445
+ key: "isItemEntry",
446
+ value: function isItemEntry() {
447
+ return this.props.bankEntry.entryType === 'Item';
448
+ }
449
+ },
450
+ {
451
+ key: "isStimulusEntry",
452
+ value: function isStimulusEntry() {
453
+ var _this_props_bankEntry;
454
+ return (_this_props_bankEntry = this.props.bankEntry) === null || _this_props_bankEntry === void 0 ? void 0 : _this_props_bankEntry.isStimulusEntry;
455
+ }
456
+ },
457
+ {
458
+ key: "isPassageEntry",
459
+ value: function isPassageEntry() {
460
+ var _this_props_bankEntry;
461
+ return (_this_props_bankEntry = this.props.bankEntry) === null || _this_props_bankEntry === void 0 ? void 0 : _this_props_bankEntry.isPassageEntry;
462
+ }
463
+ },
464
+ {
465
+ key: "getEditWarning",
466
+ value: function getEditWarning() {
467
+ if (this.isStimulusEntry()) {
468
+ return t('Edits made here will appear on any assessment using this stimulus.');
469
+ }
470
+ if (this.isPassageEntry()) {
471
+ return t('Edits made here will appear on any assessment using this text block.');
472
+ }
473
+ return t('Edits made here will appear on any assessment using this question.');
474
+ }
475
+ },
476
+ {
477
+ key: "entryLinkName",
478
+ value: function entryLinkName() {
479
+ var translations = {
480
+ new: {
481
+ question: t('New Question'),
482
+ stimulus: t('New Stimulus'),
483
+ passage: t('New Text Block')
484
+ },
485
+ edit: {
486
+ question: t('Edit Question'),
487
+ stimulus: t('Edit Stimulus'),
488
+ passage: t('Edit Text Block')
489
+ }
490
+ };
491
+ var operation = this.isTemporary() ? 'new' : 'edit';
492
+ switch(true){
493
+ case this.isItemEntry():
494
+ return translations[operation]['question'];
495
+ case this.isStimulusEntry():
496
+ return translations[operation]['stimulus'];
497
+ case this.isPassageEntry():
498
+ return translations[operation]['passage'];
499
+ }
500
+ }
501
+ },
502
+ {
503
+ key: "renderBankBreadCrumbLink",
504
+ value: function renderBankBreadCrumbLink() {
505
+ return /*#__PURE__*/ jsx(BreadcrumbLink, {
506
+ key: "bank",
507
+ onClick: this.navigateToBank,
508
+ ref: this.setNavToBankRef
509
+ }, this.props.bank.title);
510
+ }
511
+ },
512
+ {
513
+ key: "renderBankEntryBreadCrumbLink",
514
+ value: function renderBankEntryBreadCrumbLink() {
515
+ return /*#__PURE__*/ jsx(BreadcrumbLink, {
516
+ key: "bankEntry"
517
+ }, this.entryLinkName());
518
+ }
519
+ },
520
+ {
521
+ key: "renderNav",
522
+ value: function renderNav() {
523
+ var _this_props = this.props, scope = _this_props.scope, closeTray = _this_props.closeTray, navigateToBanks = _this_props.navigateToBanks, navigateToBuild = _this_props.navigateToBuild, returnToUrl = _this_props.returnToUrl;
524
+ var isScopeEmpty = !Object.keys(scope).length;
525
+ return /*#__PURE__*/ jsx(NavWrapper, {
526
+ closeTray: closeTray,
527
+ navigateToBanks: navigateToBanks,
528
+ navigateToBuild: navigateToBuild,
529
+ returnToUrl: isScopeEmpty ? null : returnToUrl,
530
+ scope: scope,
531
+ isCompact: this.props.isCompact,
532
+ iceTopNavBarEnabled: this.props.iceTopNavBarEnabled,
533
+ menuItemPath: "/banks/".concat(this.props.bankId, "/bank_entries/").concat(this.props.bankEntryId || 'new')
534
+ }, this.renderBankBreadCrumbLink(), this.renderBankEntryBreadCrumbLink());
535
+ }
536
+ },
537
+ {
538
+ key: "renderTitle",
539
+ value: function renderTitle(entry) {
540
+ if (this.isItemEntry()) {
541
+ return /*#__PURE__*/ jsx(TextInput, {
542
+ renderLabel: /*#__PURE__*/ jsx(ScreenReaderContent, null, t('Edit question title')),
543
+ type: "text",
544
+ placeholder: t('Question Title'),
545
+ onChange: this.handleTitleChange,
546
+ value: entry.getWorkingInstance().title || ''
547
+ });
548
+ }
549
+ }
550
+ },
551
+ {
552
+ key: "getIdentifier",
553
+ value: function getIdentifier(entry) {
554
+ if (!entry) return;
555
+ switch(true){
556
+ case this.isItemEntry():
557
+ return t('Question { id }', {
558
+ id: entry.id
559
+ });
560
+ case this.isStimulusEntry():
561
+ return t('Stimulus { id }', {
562
+ id: entry.id
563
+ });
564
+ case this.isPassageEntry():
565
+ return t('Text Block { id }', {
566
+ id: entry.id
567
+ });
568
+ default:
569
+ return;
570
+ }
571
+ }
572
+ },
573
+ {
574
+ key: "getTemporaryIdentifier",
575
+ value: function getTemporaryIdentifier() {
576
+ switch(true){
577
+ case this.isItemEntry():
578
+ return t('New Question');
579
+ case this.isStimulusEntry():
580
+ return t('New Stimulus');
581
+ case this.isPassageEntry():
582
+ return t('New Text Block');
583
+ default:
584
+ return;
585
+ }
586
+ }
587
+ },
588
+ {
589
+ key: "getEntryName",
590
+ value: function getEntryName(entry) {
591
+ if (!entry) return;
592
+ switch(true){
593
+ case this.isItemEntry():
594
+ var _entry_getInteractionType;
595
+ return (_entry_getInteractionType = entry.getInteractionType()) === null || _entry_getInteractionType === void 0 ? void 0 : _entry_getInteractionType.name;
596
+ case this.isStimulusEntry():
597
+ return t('Stimulus');
598
+ case this.isPassageEntry():
599
+ return t('Text Block');
600
+ default:
601
+ return;
602
+ }
603
+ }
604
+ },
605
+ {
606
+ key: "renderHeader",
607
+ value: function renderHeader(entry) {
608
+ if (!entry) return;
609
+ var props = this.editProps(entry);
610
+ var identifier = this.getIdentifier(entry);
611
+ var tempIdentifier = this.getTemporaryIdentifier();
612
+ var itemIdentifier = this.isTemporary() ? tempIdentifier : identifier;
613
+ var entryName = this.getEntryName(entry);
614
+ return /*#__PURE__*/ jsx("div", {
615
+ css: this.props.styles.header
616
+ }, /*#__PURE__*/ jsx("div", {
617
+ css: this.props.styles.leftHeader
618
+ }, /*#__PURE__*/ jsx("div", {
619
+ css: this.props.styles.headerText
620
+ }, /*#__PURE__*/ jsx(Heading, {
621
+ level: "reset",
622
+ as: "h2"
623
+ }, t('{entryName} | {itemIdentifier}', {
624
+ entryName: entryName,
625
+ itemIdentifier: itemIdentifier
626
+ })))), this.renderTitle(entry), /*#__PURE__*/ jsx("div", {
627
+ css: this.props.styles.rightHeader
628
+ }, /*#__PURE__*/ jsx(EntrySave, props)));
629
+ }
630
+ },
631
+ {
632
+ key: "hasPendingTagModifications",
633
+ value: function hasPendingTagModifications() {
634
+ return !this.props.pendingDeletionTags.isEmpty() || !this.props.pendingAdditionTags.isEmpty();
635
+ }
636
+ },
637
+ {
638
+ key: "createTagsForClone",
639
+ value: function createTagsForClone(newBankEntry, tags) {
640
+ this.props.createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, tags.map(function(tag) {
641
+ return tag.tag_value;
642
+ }));
643
+ // Pending tag associations were applied to the original bank entry, so clear those out
644
+ this.props.setPendingAdditionTagAssociations(this.props.bankEntry.entryType, this.props.entry.id, []);
645
+ this.props.setPendingDeletionTagAssociations(this.props.bankEntry.entryType, this.props.entry.id, []);
646
+ }
647
+ },
648
+ {
649
+ key: "updateTagsForEntry",
650
+ value: function updateTagsForEntry() {
651
+ return _async_to_generator(function() {
652
+ return _ts_generator(this, function(_state) {
653
+ switch(_state.label){
654
+ case 0:
655
+ if (!!this.props.shouldClone) return [
656
+ 3,
657
+ 3
658
+ ];
659
+ return [
660
+ 4,
661
+ this.props.createTagAssociations(this.props.bankEntryId, this.props.bankEntry.entryType, this.getBankEntryId(this.props.bankEntry), this.props.pendingAdditionTags.map(function(tagToAdd) {
662
+ return tagToAdd.get('tag_value');
663
+ }))
664
+ ];
665
+ case 1:
666
+ _state.sent();
667
+ return [
668
+ 4,
669
+ this.props.deleteTagAssociations(this.props.bankEntryId, this.props.bankEntry.entryType, this.getBankEntryId(this.props.bankEntry), this.props.pendingDeletionTags.map(function(tagToDelete) {
670
+ return tagToDelete.get('id');
671
+ }))
672
+ ];
673
+ case 2:
674
+ _state.sent();
675
+ _state.label = 3;
676
+ case 3:
677
+ return [
678
+ 2
679
+ ];
680
+ }
681
+ });
682
+ }).call(this);
683
+ }
684
+ },
685
+ {
686
+ key: "normalSubmit",
687
+ value: function normalSubmit() {
688
+ return _async_to_generator(function() {
689
+ var entry, tags, createEntryCb, newBankEntry, workingEntry, updateFunc, toClear;
690
+ return _ts_generator(this, function(_state) {
691
+ switch(_state.label){
692
+ case 0:
693
+ entry = this.props.entry;
694
+ if (!(entry.hasModifications() || this.props.shouldClone && this.hasPendingTagModifications())) return [
695
+ 3,
696
+ 5
697
+ ];
698
+ if (!this.props.shouldClone) return [
699
+ 3,
700
+ 2
701
+ ];
702
+ tags = this.visibleTagAssociations();
703
+ createEntryCb = this.isItemEntry() ? createItem : createStimulus;
704
+ return [
705
+ 4,
706
+ this.props.cloneBankEntry(this.props.bankEntry, createEntryCb)
707
+ ];
708
+ case 1:
709
+ newBankEntry = _state.sent();
710
+ this.createTagsForClone(newBankEntry, tags);
711
+ return [
712
+ 3,
713
+ 4
714
+ ];
715
+ case 2:
716
+ workingEntry = entry.getWorkingInstance();
717
+ updateFunc = this.isItemEntry() ? this.props.updateItem : this.props.updateStimulus;
718
+ return [
719
+ 4,
720
+ updateFunc(workingEntry, this.props.bankId, 'bank')
721
+ ];
722
+ case 3:
723
+ _state.sent();
724
+ _state.label = 4;
725
+ case 4:
726
+ toClear = this.isItemEntry() ? 'items' : 'stimuli';
727
+ this.props.clearModifications(toClear, entry.id);
728
+ _state.label = 5;
729
+ case 5:
730
+ if (!this.hasPendingTagModifications()) return [
731
+ 3,
732
+ 7
733
+ ];
734
+ return [
735
+ 4,
736
+ this.updateTagsForEntry()
737
+ ];
738
+ case 6:
739
+ _state.sent();
740
+ _state.label = 7;
741
+ case 7:
742
+ return [
743
+ 2
744
+ ];
745
+ }
746
+ });
747
+ }).call(this);
748
+ }
749
+ },
750
+ {
751
+ key: "temporarySubmit",
752
+ value: function temporarySubmit() {
753
+ return _async_to_generator(function() {
754
+ var entry, workingEntry, workingBankEntry, createEntryCb, newBankEntry, toClear;
755
+ return _ts_generator(this, function(_state) {
756
+ switch(_state.label){
757
+ case 0:
758
+ entry = this.props.entry;
759
+ workingEntry = entry.getWorkingInstance();
760
+ workingBankEntry = this.props.bankEntry.getWorkingInstance();
761
+ createEntryCb = this.isItemEntry() ? createItem : createStimulus;
762
+ return [
763
+ 4,
764
+ this.props.createEntryAndBankEntry(this.props.bankId, workingEntry, workingBankEntry, createEntryCb)
765
+ ];
766
+ case 1:
767
+ newBankEntry = _state.sent();
768
+ if (this.hasPendingTagModifications()) {
769
+ this.props.createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, this.props.pendingAdditionTags.map(function(tagToAdd) {
770
+ return tagToAdd.get('tag_value');
771
+ }));
772
+ }
773
+ toClear = this.isItemEntry() ? 'items' : 'stimuli';
774
+ this.props.clearModifications(toClear, entry.id);
775
+ this.props.clearTemporaryBankItem(this.props.bankId);
776
+ return [
777
+ 2
778
+ ];
779
+ }
780
+ });
781
+ }).call(this);
782
+ }
783
+ },
784
+ {
785
+ key: "renderFeedbackSection",
786
+ value: function renderFeedbackSection() {
787
+ if (!this.isItemEntry()) {
788
+ return;
789
+ }
790
+ var shouldClone = this.props.shouldClone;
791
+ var disabled = this.props.entry.isImmutable() && !shouldClone;
792
+ var icon, text;
793
+ if (this.props.entry.getWorkingInstance().hasFeedback()) {
794
+ icon = IconDiscussionSolid;
795
+ text = t('Edit Question Level Feedback (present)');
796
+ } else {
797
+ icon = IconDiscussionLine;
798
+ text = t('Edit Question Level Feedback');
799
+ }
800
+ return /*#__PURE__*/ jsx(IconButton, {
801
+ onClick: this.openFeedbackModal,
802
+ withBackground: false,
803
+ withBorder: false,
804
+ disabled: disabled,
805
+ ref: this.storeFeedbackButtonRef,
806
+ renderIcon: icon,
807
+ screenReaderLabel: text
808
+ });
809
+ }
810
+ },
811
+ {
812
+ key: "getBankEntryId",
813
+ value: function getBankEntryId(bankEntry) {
814
+ // bankEntry.entry can be either 'TEMPORARY_ITEM' or an entire Map
815
+ return bankEntry.entry ? bankEntry.entry.get ? bankEntry.entry.get('id') : bankEntry.entry : null;
816
+ }
817
+ },
818
+ {
819
+ key: "visibleTagAssociations",
820
+ value: function visibleTagAssociations() {
821
+ var _this_props = this.props, pendingAdditionTags = _this_props.pendingAdditionTags, pendingDeletionTags = _this_props.pendingDeletionTags, tagAssociations = _this_props.tagAssociations;
822
+ var existingValues = keyBy(tagAssociations.toJS(), function(t) {
823
+ return t.tag_value;
824
+ });
825
+ var noDuplicates = pendingAdditionTags.filter(function(t) {
826
+ return isUndefined(existingValues[t.get('tag_value')]);
827
+ });
828
+ return tagAssociations.filter(function(tag) {
829
+ return !pendingDeletionTags.includes(tag);
830
+ }).concat(noDuplicates).toJS();
831
+ }
832
+ },
833
+ {
834
+ key: "visibleTags",
835
+ value: function visibleTags() {
836
+ return this.visibleTagAssociations().map(function(a) {
837
+ return {
838
+ id: a.tag_id,
839
+ value: a.tag_value
840
+ };
841
+ });
842
+ }
843
+ },
844
+ {
845
+ key: "renderEntry",
846
+ value: function renderEntry(entry) {
847
+ var _this = this;
848
+ if (!entry) return;
849
+ var _this_props = this.props, bankEntry = _this_props.bankEntry, useBankTags = _this_props.useBankTags;
850
+ var props = this.editProps(entry);
851
+ var propsFunc = this.isItemEntry() ? propsForItemVersioningWrapper : propsForStimulusVersioningWrapper;
852
+ var versioningProps = propsFunc(entry.isImmutable(), this.props.shouldClone, this.props.setShouldClone, this.navigateToBank, true, 'warning', this.isPassageEntry());
853
+ var canEdit = !entry.isImmutable() || this.props.shouldClone;
854
+ var ItemComponent = canEdit ? ItemEdit : ItemShow;
855
+ var StimulusComponent = canEdit ? StimulusEditInfo : StimulusShowInfo;
856
+ var EntryComponent = this.isItemEntry() ? ItemComponent : StimulusComponent;
857
+ var entryType = bankEntry.entryType;
858
+ var entryId = this.getBankEntryId(bankEntry);
859
+ var tags = function() {
860
+ return /*#__PURE__*/ jsx(TagSuggestSelect, {
861
+ allowNewTags: true,
862
+ noMatchText: t('Enter a tag to find or create'),
863
+ parentType: entryType,
864
+ parentId: entryId,
865
+ onChange: _this.handleTagChange,
866
+ tags: _this.visibleTags()
867
+ });
868
+ };
869
+ var editWarning = this.getEditWarning();
870
+ return /*#__PURE__*/ jsx("div", null, /*#__PURE__*/ jsx("div", {
871
+ css: this.props.styles.entryEdit
872
+ }, /*#__PURE__*/ jsx(WarningWrapper, versioningProps, canEdit && /*#__PURE__*/ jsx(Alert, {
873
+ renderCloseButtonLabel: t('Dismiss'),
874
+ margin: "0 0 medium 0"
875
+ }, /*#__PURE__*/ jsx(Text, {
876
+ color: "primary"
877
+ }, editWarning)), /*#__PURE__*/ jsx(EntryComponent, props), useBankTags && tags())), /*#__PURE__*/ jsx("div", {
878
+ css: this.props.styles.footer
879
+ }, /*#__PURE__*/ jsx("div", {
880
+ css: this.props.styles.leftFooter
881
+ }, this.renderFeedbackSection()), /*#__PURE__*/ jsx("div", {
882
+ css: this.props.styles.rightFooter
883
+ }, /*#__PURE__*/ jsx(EntrySave, props))));
884
+ }
885
+ },
886
+ {
887
+ key: "render",
888
+ value: function render() {
889
+ var entry = this.props.entry;
890
+ if (entry && !entry.isLoaded()) {
891
+ return /*#__PURE__*/ jsx(Spinner, null);
892
+ }
893
+ return /*#__PURE__*/ jsx(Page, null, this.renderNav(), /*#__PURE__*/ jsx("div", {
894
+ css: this.props.styles.content,
895
+ ref: this.handleRef
896
+ }, this.props.iceTopNavBarEnabled && /*#__PURE__*/ jsx("div", {
897
+ css: this.props.styles.breadcrumb
898
+ }, /*#__PURE__*/ jsx(HeaderBreadCrumb, {
899
+ returnToUrl: this.props.returnToUrl,
900
+ scope: this.props.scope,
901
+ navigateToBanks: this.props.navigateToBanks,
902
+ navigateToBuild: this.props.navigateToBuild
903
+ }, this.renderBankBreadCrumbLink(), this.renderBankEntryBreadCrumbLink())), this.renderHeader(entry), this.renderEntry(entry), !this.props.isCompact && /*#__PURE__*/ jsx(ItemFeedbackModal, {
904
+ parentId: this.props.bankId,
905
+ parentType: PARENT_TYPE_BANK
906
+ })));
907
+ }
908
+ }
909
+ ]);
910
+ return BankEntry;
911
+ }(Component);
912
+ _define_property(BankEntry, "displayName", 'BankEntry');
913
+ _define_property(BankEntry, "componentId", "Quizzes".concat(BankEntry.displayName));
914
+ _define_property(BankEntry, "propTypes", {
915
+ bankEntryId: PropTypes.string.isRequired,
916
+ bankId: PropTypes.string.isRequired,
917
+ bank: ImmutablePropTypes.record.isRequired,
918
+ bankEntry: ImmutablePropTypes.record.isRequired,
919
+ entry: ImmutablePropTypes.record,
920
+ changeItemTitle: PropTypes.func.isRequired,
921
+ changeQuizEntryPoints: PropTypes.func.isRequired,
922
+ cloneBankEntry: PropTypes.func.isRequired,
923
+ clearModifications: PropTypes.func.isRequired,
924
+ clearTemporaryBankItem: PropTypes.func.isRequired,
925
+ createEntryAndBankEntry: PropTypes.func.isRequired,
926
+ closeTray: PropTypes.func,
927
+ createTagAssociations: PropTypes.func.isRequired,
928
+ deleteTagAssociations: PropTypes.func.isRequired,
929
+ getBankEntry: PropTypes.func.isRequired,
930
+ getBank: PropTypes.func.isRequired,
931
+ isCompact: PropTypes.bool,
932
+ navigateToBanks: PropTypes.func.isRequired,
933
+ navigateToBank: PropTypes.func.isRequired,
934
+ navigateToBuild: PropTypes.func,
935
+ scope: PropTypes.objectOf(PropTypes.shape({
936
+ type: PropTypes.string,
937
+ uuid: PropTypes.string,
938
+ title: PropTypes.string,
939
+ launch_context_uuid: PropTypes.string,
940
+ root_account_name: PropTypes.string
941
+ })),
942
+ returnToUrl: PropTypes.string,
943
+ openModal: PropTypes.func.isRequired,
944
+ pendingAdditionTags: ImmutablePropTypes.listOf(ImmutablePropTypes.map),
945
+ pendingDeletionTags: ImmutablePropTypes.listOf(ImmutablePropTypes.map),
946
+ setPendingAdditionTagAssociations: PropTypes.func.isRequired,
947
+ setPendingDeletionTagAssociations: PropTypes.func.isRequired,
948
+ setShouldClone: PropTypes.func.isRequired,
949
+ setTagInput: PropTypes.func.isRequired,
950
+ setUi: PropTypes.func.isRequired,
951
+ shouldClone: PropTypes.bool.isRequired,
952
+ tagAssociations: ImmutablePropTypes.listOf(ImmutablePropTypes.map),
953
+ tagInput: PropTypes.string,
954
+ updateItem: PropTypes.func.isRequired,
955
+ updateStimulus: PropTypes.func.isRequired,
956
+ useBankTags: PropTypes.bool,
957
+ iceTopNavBarEnabled: PropTypes.bool,
958
+ styles: PropTypes.object
959
+ });
960
+ _define_property(BankEntry, "defaultProps", {
961
+ closeTray: function closeTray() {},
962
+ entry: null,
963
+ isCompact: false,
964
+ navigateToBuild: null,
965
+ scope: {},
966
+ returnToUrl: null,
967
+ pendingAdditionTags: Immutable.List(),
968
+ pendingDeletionTags: Immutable.List(),
969
+ tagAssociations: Immutable.List(),
970
+ tagInput: null,
971
+ useBankTags: false,
972
+ iceTopNavBarEnabled: false
973
+ });
974
+ BankEntry = _ts_decorate([
975
+ withStyleOverrides(generateStyle, generateComponentTheme)
976
+ ], BankEntry);
977
+ export default BankEntry;