@instructure/quiz-core 20.17.3-rc.6 → 20.17.3-rc.8

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 (1471) hide show
  1. package/es/banks/api/bankEntries.js +20 -13
  2. package/es/banks/api/banks.js +34 -22
  3. package/es/banks/api/copyingBanksPoller.js +67 -57
  4. package/es/banks/api/tagAssociations.js +40 -26
  5. package/es/banks/components/AddBankEntryModal/index.js +10 -7
  6. package/es/banks/components/AddBankEntryModal/presenter.js +25 -5
  7. package/es/banks/components/AddToBankModal/index.js +12 -12
  8. package/es/banks/components/AddToBankModal/presenter.js +94 -51
  9. package/es/banks/components/AsyncSearch/index.js +70 -13
  10. package/es/banks/components/Bank/index.js +12 -12
  11. package/es/banks/components/Bank/presenter.js +115 -57
  12. package/es/banks/components/Bank/styles.js +2 -0
  13. package/es/banks/components/Bank/theme.js +3 -2
  14. package/es/banks/components/BankEntriesList/index.js +3 -3
  15. package/es/banks/components/BankEntriesList/presenter.js +27 -13
  16. package/es/banks/components/BankEntriesList/styles.js +1 -0
  17. package/es/banks/components/BankEntriesList/theme.js +1 -0
  18. package/es/banks/components/BankEntry/index.js +19 -14
  19. package/es/banks/components/BankEntry/presenter.js +257 -160
  20. package/es/banks/components/BankEntry/styles.js +2 -0
  21. package/es/banks/components/BankEntry/theme.js +4 -3
  22. package/es/banks/components/BankEntryRow/BankEntryRow.examples.js +4 -2
  23. package/es/banks/components/BankEntryRow/index.js +14 -9
  24. package/es/banks/components/BankEntryRow/presenter.js +59 -27
  25. package/es/banks/components/BankEntryRow/styles.js +1 -0
  26. package/es/banks/components/BankEntryRow/theme.js +4 -3
  27. package/es/banks/components/BankSearch/BankSearch.stories.js +1 -1
  28. package/es/banks/components/BankSearch/index.js +6 -4
  29. package/es/banks/components/BankSearch/presenter.js +42 -21
  30. package/es/banks/components/BankSearch/styles.js +1 -0
  31. package/es/banks/components/BankSearch/theme.js +1 -0
  32. package/es/banks/components/Banks/index.js +10 -7
  33. package/es/banks/components/Banks/presenter.js +85 -31
  34. package/es/banks/components/Banks/styles.js +1 -0
  35. package/es/banks/components/Banks/theme.js +3 -2
  36. package/es/banks/components/BanksList/index.js +8 -8
  37. package/es/banks/components/BanksList/presenter.js +143 -79
  38. package/es/banks/components/BanksList/styles.js +1 -0
  39. package/es/banks/components/BanksList/theme.js +4 -3
  40. package/es/banks/components/CopyMoveBankEntryModal/index.js +9 -9
  41. package/es/banks/components/CopyMoveBankEntryModal/presenter.js +39 -10
  42. package/es/banks/components/CreateBankModal/index.js +13 -10
  43. package/es/banks/components/CreateBankModal/presenter.js +42 -13
  44. package/es/banks/components/CreateBankModal/styles.js +1 -0
  45. package/es/banks/components/CreateBankModal/theme.js +2 -1
  46. package/es/banks/components/EditBankModal/index.js +10 -7
  47. package/es/banks/components/EditBankModal/presenter.js +36 -13
  48. package/es/banks/components/EditBankModal/styles.js +1 -0
  49. package/es/banks/components/EditBankModal/theme.js +2 -1
  50. package/es/banks/components/HeaderBreadCrumb/index.js +26 -13
  51. package/es/banks/components/HeaderMenu/index.js +7 -4
  52. package/es/banks/components/HeaderMenu/presenter.js +29 -15
  53. package/es/banks/components/HeaderMenu/styles.js +1 -0
  54. package/es/banks/components/HeaderMenu/theme.js +2 -1
  55. package/es/banks/components/NavWrapper/index.js +4 -2
  56. package/es/banks/components/NavWrapper/presenter.js +38 -19
  57. package/es/banks/components/NavWrapper/styles.js +2 -0
  58. package/es/banks/components/NavWrapper/theme.js +5 -4
  59. package/es/banks/components/SharingModal/ContextualIconButton/index.js +21 -5
  60. package/es/banks/components/SharingModal/RootAccountSharing.js +33 -16
  61. package/es/banks/components/SharingModal/ShareList/index.js +37 -16
  62. package/es/banks/components/SharingModal/ShareList/styles.js +1 -0
  63. package/es/banks/components/SharingModal/index.js +8 -6
  64. package/es/banks/components/SharingModal/presenter.js +126 -56
  65. package/es/banks/components/SharingModal/styles.js +1 -0
  66. package/es/banks/components/SharingModal/theme.js +3 -2
  67. package/es/building/api/items.js +103 -81
  68. package/es/building/api/qtiImports.js +22 -14
  69. package/es/building/api/quizEntries.js +65 -57
  70. package/es/building/api/quizzes.js +29 -34
  71. package/es/building/api/stimuli.js +6 -9
  72. package/es/building/components/QTIImportModal/index.js +5 -6
  73. package/es/building/components/layout/Sidebar/Sidebar.examples.js +38 -17
  74. package/es/building/components/layout/Sidebar/SidebarItem/index.js +13 -13
  75. package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +41 -27
  76. package/es/building/components/layout/Sidebar/SidebarItem/styles.js +4 -1
  77. package/es/building/components/layout/Sidebar/SidebarItem/theme.js +1 -0
  78. package/es/building/components/layout/Sidebar/Stimulus/index.js +12 -11
  79. package/es/building/components/layout/Sidebar/Stimulus/presenter.js +39 -25
  80. package/es/building/components/layout/Sidebar/Stimulus/styles.js +4 -1
  81. package/es/building/components/layout/Sidebar/Stimulus/theme.js +1 -0
  82. package/es/building/components/layout/Sidebar/index.js +15 -15
  83. package/es/building/components/layout/Sidebar/presenter.js +51 -21
  84. package/es/building/components/layout/Sidebar/styles.js +2 -0
  85. package/es/building/components/layout/Sidebar/theme.js +1 -0
  86. package/es/building/components/layout/header/BuildingButtons/index.js +11 -9
  87. package/es/building/components/layout/header/BuildingButtons/presenter.js +64 -15
  88. package/es/building/components/layout/header/BuildingButtons/styles.js +2 -0
  89. package/es/building/components/layout/header/BuildingButtons/theme.js +3 -2
  90. package/es/building/components/layout/header/SDKBuildingButtons/index.js +3 -3
  91. package/es/building/components/resources/ActionButtons/index.js +7 -4
  92. package/es/building/components/resources/ActionButtons/presenter.js +34 -14
  93. package/es/building/components/resources/ActionButtons/styles.js +3 -0
  94. package/es/building/components/resources/ActionButtons/theme.js +2 -1
  95. package/es/building/components/resources/AddToBankOptions/index.js +62 -38
  96. package/es/building/components/resources/AddToBankOptions/styles.js +1 -0
  97. package/es/building/components/resources/AddToBankOptions/theme.js +2 -1
  98. package/es/building/components/resources/BanksTray/index.js +5 -3
  99. package/es/building/components/resources/BanksTray/presenter.js +40 -12
  100. package/es/building/components/resources/DeleteStimulusModal/index.js +12 -8
  101. package/es/building/components/resources/DeleteStimulusModal/presenter.js +56 -21
  102. package/es/building/components/resources/DeleteStimulusModal/styles.js +1 -0
  103. package/es/building/components/resources/DeleteStimulusModal/theme.js +2 -1
  104. package/es/building/components/resources/ItemFeedbackModal/index.js +10 -8
  105. package/es/building/components/resources/ItemFeedbackModal/presenter.js +35 -12
  106. package/es/building/components/resources/ItemFeedbackModal/styles.js +1 -0
  107. package/es/building/components/resources/ItemFeedbackModal/theme.js +1 -0
  108. package/es/building/components/resources/MoveImmutableModal/index.js +14 -11
  109. package/es/building/components/resources/MoveImmutableModal/presenter.js +24 -8
  110. package/es/building/components/resources/quiz/editButton/EditButton.js +20 -5
  111. package/es/building/components/resources/quiz/instructions/Edit/index.js +4 -2
  112. package/es/building/components/resources/quiz/instructions/Edit/presenter.js +26 -21
  113. package/es/building/components/resources/quiz/instructions/Edit/styles.js +1 -0
  114. package/es/building/components/resources/quiz/instructions/Instructions/Instructions.examples.js +1 -1
  115. package/es/building/components/resources/quiz/instructions/Instructions/index.js +9 -7
  116. package/es/building/components/resources/quiz/instructions/Instructions/presenter.js +55 -31
  117. package/es/building/components/resources/quiz/instructions/Instructions/styles.js +2 -0
  118. package/es/building/components/resources/quiz/instructions/Instructions/theme.js +2 -2
  119. package/es/building/components/resources/quiz/instructions/Show/index.js +29 -18
  120. package/es/building/components/resources/quiz/instructions/Show/styles.js +1 -0
  121. package/es/building/components/resources/quiz/instructions/Show/theme.js +2 -2
  122. package/es/building/components/resources/quiz/title/Edit/index.js +36 -21
  123. package/es/building/components/resources/quiz/title/Edit/styles.js +2 -0
  124. package/es/building/components/resources/quiz/title/Edit/theme.js +4 -3
  125. package/es/building/components/resources/quiz/title/Show/index.js +28 -17
  126. package/es/building/components/resources/quiz/title/Show/styles.js +1 -0
  127. package/es/building/components/resources/quiz/title/Show/theme.js +1 -0
  128. package/es/building/components/resources/quiz/title/Title/Title.examples.js +1 -1
  129. package/es/building/components/resources/quiz/title/Title/index.js +10 -8
  130. package/es/building/components/resources/quiz/title/Title/presenter.js +48 -31
  131. package/es/building/components/resources/quiz/title/Title/styles.js +2 -0
  132. package/es/building/components/resources/quiz/title/Title/theme.js +3 -3
  133. package/es/building/components/resources/quizEntry/QuizEntry/index.js +16 -14
  134. package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +66 -30
  135. package/es/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +16 -4
  136. package/es/building/components/resources/quizEntry/QuizEntry/styles.js +2 -0
  137. package/es/building/components/resources/quizEntry/QuizEntry/theme.js +4 -3
  138. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/index.js +4 -4
  139. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +51 -16
  140. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +1 -0
  141. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +4 -3
  142. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +30 -15
  143. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +1 -0
  144. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +4 -3
  145. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/index.js +7 -5
  146. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +54 -24
  147. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +3 -0
  148. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +4 -3
  149. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +124 -70
  150. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +2 -0
  151. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +3 -2
  152. package/es/building/components/resources/quizEntry/QuizEntryEdit/index.js +14 -11
  153. package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +165 -94
  154. package/es/building/components/resources/quizEntry/QuizEntryEdit/styles.js +2 -0
  155. package/es/building/components/resources/quizEntry/QuizEntryEdit/theme.js +4 -3
  156. package/es/building/components/resources/quizEntry/QuizEntryShow/index.js +10 -8
  157. package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +71 -37
  158. package/es/building/components/resources/quizEntry/QuizEntryShow/styles.js +2 -0
  159. package/es/building/components/resources/quizEntry/QuizEntryShow/theme.js +5 -4
  160. package/es/common/actions/alerts.js +7 -7
  161. package/es/common/actions/modifications.js +16 -37
  162. package/es/common/actions/quizSessions.js +15 -5
  163. package/es/common/actions/rce.js +2 -3
  164. package/es/common/actions/taking.js +17 -1
  165. package/es/common/api/callHandlers.js +15 -14
  166. package/es/common/api/camelizeHelpers.js +6 -6
  167. package/es/common/api/features.js +5 -3
  168. package/es/common/api/fileUpload.js +3 -4
  169. package/es/common/api/getPersistenceActions.js +40 -41
  170. package/es/common/api/helpers.js +100 -77
  171. package/es/common/api/interactionTypes.js +2 -2
  172. package/es/common/api/quizSessions.js +32 -27
  173. package/es/common/api/quizzes.js +6 -10
  174. package/es/common/api/schema.js +4 -6
  175. package/es/common/components/ApiFeatureFlagInitializer/index.js +12 -8
  176. package/es/common/components/ConfirmationModal/index.js +6 -3
  177. package/es/common/components/ConfirmationModal/presenter.js +29 -13
  178. package/es/common/components/ImportModal/ImportFileSelector/index.js +40 -24
  179. package/es/common/components/ImportModal/ImportFileSelector/styles.js +1 -0
  180. package/es/common/components/ImportModal/ImportFileSelector/theme.js +3 -2
  181. package/es/common/components/ImportModal/index.js +13 -13
  182. package/es/common/components/ImportModal/presenter.js +69 -19
  183. package/es/common/components/ImportModal/styles.js +1 -0
  184. package/es/common/components/ImportModal/theme.js +1 -0
  185. package/es/common/components/LearnosityCalculator/index.js +60 -36
  186. package/es/common/components/Pin/index.js +1 -1
  187. package/es/common/components/Pin/presenter.js +17 -4
  188. package/es/common/components/PreviewFrame/examples.config.js +4 -2
  189. package/es/common/components/PreviewFrame/index.js +18 -8
  190. package/es/common/components/PrintFontSizeModal/index.js +1 -1
  191. package/es/common/components/PrintFontSizeModal/presenter.js +35 -24
  192. package/es/common/components/PrintFontSizeModal/styles.js +1 -0
  193. package/es/common/components/PrintFontSizeModal/theme.js +3 -2
  194. package/es/common/components/RceConfigProvider/index.js +6 -4
  195. package/es/common/components/RceConfigProvider/presenter.js +125 -93
  196. package/es/common/components/RceConfigProvider/rceConfigErrorHandler.js +11 -5
  197. package/es/common/components/RceConfigProvider/rceConfigFetcher.js +37 -26
  198. package/es/common/components/RceConfigProvider/rceConfigMapper.js +11 -3
  199. package/es/common/components/RceConfigProvider/rceConfigUtils.js +2 -2
  200. package/es/common/components/SDKApp/index.js +61 -30
  201. package/es/common/components/SDKApp/styles.js +1 -0
  202. package/es/common/components/SDKHeaderCalculator.js +4 -4
  203. package/es/common/components/SDKMenuButton.js +3 -3
  204. package/es/common/components/SDKNavBar.js +3 -3
  205. package/es/common/components/SDKTimer.js +4 -4
  206. package/es/common/components/alerts/index.js +6 -4
  207. package/es/common/components/alerts/presenter.js +30 -11
  208. package/es/common/components/alerts/styles.js +2 -0
  209. package/es/common/components/alerts/theme.js +2 -1
  210. package/es/common/components/layout/Page/index.js +21 -11
  211. package/es/common/components/layout/Page/styles.js +2 -0
  212. package/es/common/components/layout/Page/theme.js +3 -2
  213. package/es/common/components/layout/header/Calculator/index.js +9 -7
  214. package/es/common/components/layout/header/Calculator/presenter.js +22 -9
  215. package/es/common/components/layout/header/HeaderMenuButton/index.js +5 -5
  216. package/es/common/components/layout/header/HeaderMenuButton/presenter.js +36 -14
  217. package/es/common/components/layout/header/HeaderMenuButton/styles.js +2 -0
  218. package/es/common/components/layout/header/HeaderMenuButton/theme.js +3 -2
  219. package/es/common/components/layout/header/Timer/index.js +9 -6
  220. package/es/common/components/layout/header/Timer/presenter.js +49 -19
  221. package/es/common/components/layout/header/Timer/styles.js +1 -0
  222. package/es/common/components/layout/header/Timer/theme.js +4 -3
  223. package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +20 -10
  224. package/es/common/components/layout/navbar/SecondaryNavBarButton/styles.js +1 -0
  225. package/es/common/components/layout/navbar/SecondaryNavBarButton/theme.js +1 -0
  226. package/es/common/components/layout/navbar/index.js +39 -15
  227. package/es/common/components/layout/navbar/styles.js +1 -0
  228. package/es/common/components/layout/navbar/theme.js +2 -1
  229. package/es/common/components/layout/sidebar/PositionSummary/index.js +20 -10
  230. package/es/common/components/layout/sidebar/PositionSummary/styles.js +1 -0
  231. package/es/common/components/layout/sidebar/PositionSummary/theme.js +4 -3
  232. package/es/common/components/layout/sidebar/Sidebar/Pin.js +18 -7
  233. package/es/common/components/layout/sidebar/Sidebar/Sidebar.examples.js +10 -6
  234. package/es/common/components/layout/sidebar/Sidebar/index.js +81 -39
  235. package/es/common/components/layout/sidebar/Sidebar/styles.js +9 -4
  236. package/es/common/components/layout/sidebar/Sidebar/theme.js +7 -5
  237. package/es/common/components/layout/sidebar/SidebarItem/index.js +5 -5
  238. package/es/common/components/layout/sidebar/SidebarItem/presenter.js +51 -35
  239. package/es/common/components/layout/sidebar/SidebarItem/styles.js +2 -0
  240. package/es/common/components/layout/sidebar/SidebarItem/theme.js +4 -3
  241. package/es/common/components/layout/sidebar/Stimulus/Collection/index.js +3 -3
  242. package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +39 -23
  243. package/es/common/components/layout/sidebar/Stimulus/Collection/styles.js +3 -1
  244. package/es/common/components/layout/sidebar/Stimulus/Collection/theme.js +3 -2
  245. package/es/common/components/layout/sidebar/Stimulus/Summary/index.js +3 -3
  246. package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +43 -20
  247. package/es/common/components/layout/sidebar/Stimulus/Summary/styles.js +1 -0
  248. package/es/common/components/layout/sidebar/Stimulus/Summary/theme.js +3 -2
  249. package/es/common/components/layout/sidebar/Stimulus/Title/index.js +21 -11
  250. package/es/common/components/layout/sidebar/Stimulus/Title/styles.js +1 -0
  251. package/es/common/components/layout/sidebar/Stimulus/index.js +5 -3
  252. package/es/common/components/layout/sidebar/Stimulus/presenter.js +49 -28
  253. package/es/common/components/layout/sidebar/Stimulus/styles.js +1 -0
  254. package/es/common/components/layout/sidebar/Stimulus/theme.js +4 -3
  255. package/es/common/components/resources/BankSelection/index.js +5 -5
  256. package/es/common/components/resources/BankSelection/presenter.js +49 -16
  257. package/es/common/components/resources/WarningWrapper/index.js +25 -11
  258. package/es/common/components/resources/WarningWrapper/styles.js +1 -0
  259. package/es/common/components/resources/WarningWrapper/theme.js +3 -2
  260. package/es/common/components/resources/entry/EntrySave/index.js +10 -10
  261. package/es/common/components/resources/entry/EntrySave/presenter.js +150 -95
  262. package/es/common/components/resources/item/ItemEdit/index.js +18 -16
  263. package/es/common/components/resources/item/ItemEdit/presenter.js +41 -18
  264. package/es/common/components/resources/item/ItemOverride/index.js +11 -9
  265. package/es/common/components/resources/item/ItemOverride/presenter.js +18 -6
  266. package/es/common/components/resources/item/ItemShow/index.js +17 -7
  267. package/es/common/components/resources/positionBox/PositionBox.js +21 -11
  268. package/es/common/components/resources/positionBox/styles.js +2 -0
  269. package/es/common/components/resources/positionBox/theme.js +3 -2
  270. package/es/common/components/resources/quiz/AddContent/Body/index.js +9 -7
  271. package/es/common/components/resources/quiz/AddContent/Body/presenter.js +45 -23
  272. package/es/common/components/resources/quiz/AddContent/Body/styles.js +9 -4
  273. package/es/common/components/resources/quiz/AddContent/Body/theme.js +5 -4
  274. package/es/common/components/resources/quiz/AddContent/Button/index.js +25 -11
  275. package/es/common/components/resources/quiz/AddContent/Button/styles.js +2 -0
  276. package/es/common/components/resources/quiz/AddContent/Button/theme.js +5 -4
  277. package/es/common/components/resources/quiz/AddContent/Modal/index.js +11 -8
  278. package/es/common/components/resources/quiz/AddContent/Modal/presenter.js +13 -5
  279. package/es/common/components/resources/quiz/AddContent/Popover/index.js +8 -7
  280. package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +37 -16
  281. package/es/common/components/resources/quiz/AddContent/Popover/styles.js +1 -0
  282. package/es/common/components/resources/quiz/AddContent/Popover/theme.js +2 -1
  283. package/es/common/components/resources/quiz/info/QuizInfo.js +14 -6
  284. package/es/common/components/resources/quiz/instructions/Instructions.js +22 -13
  285. package/es/common/components/resources/quiz/instructions/styles.js +1 -0
  286. package/es/common/components/resources/quiz/instructions/theme.js +2 -1
  287. package/es/common/components/resources/quiz/title/Title.js +21 -13
  288. package/es/common/components/resources/quiz/title/styles.js +1 -0
  289. package/es/common/components/resources/quiz/title/theme.js +2 -1
  290. package/es/common/components/resources/quizSessionResult/Header/index.js +26 -11
  291. package/es/common/components/resources/quizSessionResult/Header/styles.js +1 -0
  292. package/es/common/components/resources/quizSessionResult/Header/theme.js +2 -1
  293. package/es/common/components/resources/quizSessionResult/Info/Info.examples.js +2 -2
  294. package/es/common/components/resources/quizSessionResult/Info/index.js +125 -107
  295. package/es/common/components/resources/quizSessionResult/Info/styles.js +2 -0
  296. package/es/common/components/resources/quizSessionResult/Info/theme.js +2 -1
  297. package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +22 -10
  298. package/es/common/components/resources/sessionItemResult/ResultStimulus/styles.js +2 -0
  299. package/es/common/components/resources/sessionItemResult/ResultStimulus/theme.js +5 -4
  300. package/es/common/components/resources/sessionItemResult/SessionItemResult/index.js +6 -4
  301. package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +90 -64
  302. package/es/common/components/resources/sessionItemResult/SessionItemResult/styles.js +2 -0
  303. package/es/common/components/resources/sessionItemResult/SessionItemResult/theme.js +4 -3
  304. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +31 -15
  305. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/styles.js +1 -0
  306. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +4 -3
  307. package/es/common/components/resources/stimulus/Stimulus/index.js +8 -5
  308. package/es/common/components/resources/stimulus/Stimulus/presenter.js +39 -22
  309. package/es/common/components/resources/stimulus/Stimulus/styles.js +5 -1
  310. package/es/common/components/resources/stimulus/Stimulus/theme.js +4 -3
  311. package/es/common/components/resources/stimulus/StimulusEdit/index.js +13 -10
  312. package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +190 -111
  313. package/es/common/components/resources/stimulus/StimulusEdit/styles.js +1 -0
  314. package/es/common/components/resources/stimulus/StimulusEdit/theme.js +3 -2
  315. package/es/common/components/resources/stimulus/StimulusEditInfo/index.js +7 -4
  316. package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +43 -16
  317. package/es/common/components/resources/stimulus/StimulusEditInfo/styles.js +1 -0
  318. package/es/common/components/resources/stimulus/StimulusEditInfo/theme.js +3 -2
  319. package/es/common/components/resources/stimulus/StimulusShow/index.js +33 -15
  320. package/es/common/components/resources/stimulus/StimulusShow/styles.js +1 -0
  321. package/es/common/components/resources/stimulus/StimulusShow/theme.js +3 -2
  322. package/es/common/components/resources/stimulus/StimulusShowInfo/StimulusShowInfo.examples.js +1 -1
  323. package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +14 -4
  324. package/es/common/components/shared/Card/CardContent/index.js +21 -11
  325. package/es/common/components/shared/Card/CardContent/styles.js +2 -0
  326. package/es/common/components/shared/Card/CardContent/theme.js +5 -4
  327. package/es/common/components/shared/Card/CardWrapper/index.js +21 -11
  328. package/es/common/components/shared/Card/CardWrapper/styles.js +2 -0
  329. package/es/common/components/shared/Card/CardWrapper/theme.js +3 -2
  330. package/es/common/components/shared/Card/index.js +6 -6
  331. package/es/common/components/shared/ExpandButton/index.js +20 -10
  332. package/es/common/components/shared/ExpandButton/styles.js +2 -0
  333. package/es/common/components/shared/ExpandButton/theme.js +1 -0
  334. package/es/common/components/shared/FormattedDuration/index.js +20 -9
  335. package/es/common/components/shared/IfFeature/index.js +3 -3
  336. package/es/common/components/shared/IfFeature/presenter.js +13 -4
  337. package/es/common/components/shared/InteractionTypes/index.js +4 -2
  338. package/es/common/components/shared/InteractionTypes/presenter.js +33 -14
  339. package/es/common/components/shared/InteractionTypes/styles.js +1 -0
  340. package/es/common/components/shared/InteractionTypes/theme.js +3 -2
  341. package/es/common/components/shared/PaginatedCollection/index.js +3 -3
  342. package/es/common/components/shared/PaginatedCollection/presenter.js +75 -46
  343. package/es/common/components/shared/PaginatedCollection/styles.js +1 -0
  344. package/es/common/components/shared/PaginatedCollection/theme.js +3 -2
  345. package/es/common/components/shared/Paginator/index.js +24 -11
  346. package/es/common/components/shared/Paginator/styles.js +1 -0
  347. package/es/common/components/shared/Paginator/theme.js +1 -0
  348. package/es/common/components/shared/PrintTrigger/index.js +9 -7
  349. package/es/common/components/shared/PrintTrigger/presenter.js +37 -12
  350. package/es/common/components/shared/TagDisplay/index.js +21 -10
  351. package/es/common/components/shared/TagDisplay/styles.js +1 -0
  352. package/es/common/components/shared/TagSelect/index.js +1 -1
  353. package/es/common/components/shared/TagSelect/presenter.js +49 -15
  354. package/es/common/components/shared/TagSuggestSelect/index.js +7 -4
  355. package/es/common/components/shared/TagSuggestSelect/presenter.js +26 -12
  356. package/es/common/components/shared/TagWrapper/index.js +1 -1
  357. package/es/common/components/shared/TagWrapper/presenter.js +20 -7
  358. package/es/common/components/shared/TimeUnitsInput/index.js +61 -29
  359. package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +33 -18
  360. package/es/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +2 -0
  361. package/es/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +3 -2
  362. package/es/common/components/shared/drag_and_drop/DragHandle/index.js +9 -9
  363. package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +67 -26
  364. package/es/common/components/shared/drag_and_drop/dragAndDropUtils.js +64 -22
  365. package/es/common/components/shared/errors/Errors.js +27 -11
  366. package/es/common/components/shared/errors/styles.js +1 -0
  367. package/es/common/components/shared/errors/theme.js +2 -1
  368. package/es/common/components/shared/file_selector/FileSelector.js +24 -12
  369. package/es/common/components/shared/file_selector/styles.js +1 -0
  370. package/es/common/components/shared/file_selector/theme.js +3 -2
  371. package/es/common/components/shared/functionality/componentWithOutsideClick.js +27 -17
  372. package/es/common/components/shared/functionality/componentWithOutsideClickEmotion.js +21 -12
  373. package/es/common/components/shared/functionality/disableDraggingOverride.js +3 -2
  374. package/es/common/components/shared/functionality/makeEditable.js +35 -21
  375. package/es/common/components/shared/functionality/makeScrollable.js +46 -27
  376. package/es/common/components/shared/overlay/index.js +29 -16
  377. package/es/common/components/shared/overlay/styles.js +2 -0
  378. package/es/common/components/shared/overlay/theme.js +3 -2
  379. package/es/common/components/shared/return_button/ReturnButton.js +15 -6
  380. package/es/common/components/shared/spinner/Spinner.js +28 -17
  381. package/es/common/components/shared/spinner/styles.js +1 -0
  382. package/es/common/kinesis/QuizEventsLogger.js +84 -48
  383. package/es/common/kinesis/StreamQueue.js +28 -9
  384. package/es/common/kinesis/client.js +5 -3
  385. package/es/common/kinesis/config.js +6 -4
  386. package/es/common/kinesis/eventTypes.js +7 -5
  387. package/es/common/middleware/alertTimerMiddleware.js +7 -3
  388. package/es/common/middleware/crossDomainMessagingMiddleware.js +4 -1
  389. package/es/common/middleware/eventLoggerMiddleware.js +7 -5
  390. package/es/common/middleware/persistedStorageMiddleware.js +7 -2
  391. package/es/common/react-redux.js +2 -0
  392. package/es/common/records/Alert.js +9 -5
  393. package/es/common/records/Bank.js +13 -7
  394. package/es/common/records/BankEntry.js +17 -7
  395. package/es/common/records/Item.js +22 -15
  396. package/es/common/records/ItemAnalysis.js +13 -6
  397. package/es/common/records/QtiImport.js +14 -5
  398. package/es/common/records/Quiz.js +27 -18
  399. package/es/common/records/QuizAnalysis.js +12 -5
  400. package/es/common/records/QuizEntry.js +152 -105
  401. package/es/common/records/QuizSession.js +28 -21
  402. package/es/common/records/QuizSessionEvent.js +13 -6
  403. package/es/common/records/QuizSessionResult.js +13 -6
  404. package/es/common/records/Response.js +13 -6
  405. package/es/common/records/SessionItem.js +23 -10
  406. package/es/common/records/SessionItemResult.js +13 -6
  407. package/es/common/records/Stimulus.js +17 -10
  408. package/es/common/records/baseRecord.js +19 -8
  409. package/es/common/records/index.js +32 -16
  410. package/es/common/records/reduxRecord.js +14 -9
  411. package/es/common/reducers/alerts.js +3 -0
  412. package/es/common/reducers/analyses.js +11 -1
  413. package/es/common/reducers/bankEntries.js +5 -0
  414. package/es/common/reducers/bankSearch.js +9 -4
  415. package/es/common/reducers/banks.js +13 -1
  416. package/es/common/reducers/calls.js +3 -0
  417. package/es/common/reducers/config.js +4 -0
  418. package/es/common/reducers/dragAndDrop.js +2 -0
  419. package/es/common/reducers/editing.js +3 -1
  420. package/es/common/reducers/errorsShowing.js +4 -0
  421. package/es/common/reducers/features.js +3 -0
  422. package/es/common/reducers/grading.js +4 -0
  423. package/es/common/reducers/interactionTypes.js +4 -0
  424. package/es/common/reducers/items.js +4 -0
  425. package/es/common/reducers/modal.js +6 -0
  426. package/es/common/reducers/moderation.js +3 -0
  427. package/es/common/reducers/modifications.js +40 -8
  428. package/es/common/reducers/outcomes.js +5 -0
  429. package/es/common/reducers/printing.js +2 -0
  430. package/es/common/reducers/qtiImports.js +5 -0
  431. package/es/common/reducers/quizEntries.js +39 -28
  432. package/es/common/reducers/quizExport.js +2 -0
  433. package/es/common/reducers/quizSessionEvents.js +5 -2
  434. package/es/common/reducers/quizSessionResults.js +4 -0
  435. package/es/common/reducers/quizSessions.js +11 -2
  436. package/es/common/reducers/quizzes.js +13 -0
  437. package/es/common/reducers/rce.js +6 -0
  438. package/es/common/reducers/regrading.js +4 -0
  439. package/es/common/reducers/reporting.js +12 -0
  440. package/es/common/reducers/scrolling.js +3 -0
  441. package/es/common/reducers/sessionItemResults.js +4 -0
  442. package/es/common/reducers/sessionItems.js +4 -0
  443. package/es/common/reducers/sharedBanks.js +8 -1
  444. package/es/common/reducers/sidebar.js +3 -0
  445. package/es/common/reducers/stimuli.js +4 -0
  446. package/es/common/reducers/tagAssociations.js +28 -0
  447. package/es/common/reducers/taking.js +35 -0
  448. package/es/common/reducers/ui.js +11 -0
  449. package/es/common/reducers/upload.js +7 -0
  450. package/es/common/selectors/analyses.js +2 -0
  451. package/es/common/selectors/calculator.js +10 -9
  452. package/es/common/selectors/config.js +2 -0
  453. package/es/common/selectors/interactionTypes.js +8 -7
  454. package/es/common/selectors/items.js +2 -1
  455. package/es/common/selectors/qtiImports.js +6 -3
  456. package/es/common/selectors/quizSessionResults.js +1 -1
  457. package/es/common/selectors/quizSessions.js +2 -3
  458. package/es/common/selectors/quizzes.js +14 -8
  459. package/es/common/selectors/reporting.js +3 -1
  460. package/es/common/selectors/sessionItemResults.js +5 -4
  461. package/es/common/selectors/sessionItems.js +5 -4
  462. package/es/common/selectors/taking.js +1 -1
  463. package/es/common/util/CustomPropTypes.js +12 -0
  464. package/es/common/util/ExhaustivePaginatedFetcher.js +73 -55
  465. package/es/common/util/Fetcher.js +224 -155
  466. package/es/common/util/MultiWeakMap.js +21 -1
  467. package/es/common/util/PaginatedFetcher.js +39 -21
  468. package/es/common/util/ThunkQueue.js +80 -50
  469. package/es/common/util/TimeRecordingService.js +14 -1
  470. package/es/common/util/TimerService.js +44 -5
  471. package/es/common/util/cachePreviousArgs.js +3 -0
  472. package/es/common/util/callHelpers.js +2 -0
  473. package/es/common/util/componentForItem.js +6 -1
  474. package/es/common/util/crossDomainMessaging.js +1 -0
  475. package/es/common/util/debounceLatestPromise.js +2 -0
  476. package/es/common/util/featureCheck.js +4 -6
  477. package/es/common/util/fitbCopyHelper.js +3 -3
  478. package/es/common/util/formatTimespan.js +10 -0
  479. package/es/common/util/generateDisplayPositions.js +5 -2
  480. package/es/common/util/immutableHelpers.js +6 -8
  481. package/es/common/util/interactionTypeMetadata.js +3 -2
  482. package/es/common/util/interactionTypePropsHelper.js +7 -0
  483. package/es/common/util/interactionTypeRecordForItem.js +7 -1
  484. package/es/common/util/jsonify.js +0 -1
  485. package/es/common/util/keyboardClickable.js +1 -0
  486. package/es/common/util/mathRenderingUtils.js +1 -2
  487. package/es/common/util/maxContent.js +1 -0
  488. package/es/common/util/persistedState.js +10 -4
  489. package/es/common/util/printUtils.js +4 -0
  490. package/es/common/util/rceChecker.js +15 -11
  491. package/es/common/util/renderAlerts.js +13 -11
  492. package/es/common/util/serializeEvent.js +6 -4
  493. package/es/common/util/sessionStore.js +13 -5
  494. package/es/common/util/warningHelpers.js +9 -0
  495. package/es/common/util/withCachedArguments.js +7 -3
  496. package/es/common/util/withDynamoPagination.js +84 -60
  497. package/es/common/util/withStateCache.js +10 -3
  498. package/es/config.js +9 -5
  499. package/es/configureStore.js +49 -52
  500. package/es/grading/api/quizEntryRegrades.js +5 -6
  501. package/es/grading/api/updateResults.js +8 -4
  502. package/es/index.js +135 -141
  503. package/es/messages/LocalStorageAdapter.js +15 -4
  504. package/es/messages/LocalStorageLimits.js +25 -5
  505. package/es/messages/StorageExhaustionError.js +12 -5
  506. package/es/messages/postMessageService.js +24 -5
  507. package/es/messages/subjectHandlers/forwardMessage.js +1 -0
  508. package/es/messages/subjectHandlers/lti.capabilities.js +1 -0
  509. package/es/messages/subjectHandlers/lti.fetchWindowSize.js +1 -0
  510. package/es/messages/subjectHandlers/lti.frameResize.js +4 -1
  511. package/es/messages/subjectHandlers/lti.get_data.js +8 -3
  512. package/es/messages/subjectHandlers/lti.put_data.js +10 -5
  513. package/es/messages/subjectHandlers/requestFullWindowLaunch.js +5 -1
  514. package/es/messages/utils.js +1 -0
  515. package/es/moderating/api/quizSessionEvents.js +3 -3
  516. package/es/moderating/api/quizSessions.js +2 -2
  517. package/es/moderating/components/events/Event.js +37 -12
  518. package/es/moderating/components/events/PageBlurredEvent.js +29 -0
  519. package/es/moderating/components/events/PageFocusedEvent.js +29 -0
  520. package/es/moderating/components/events/RCEEvent.js +12 -4
  521. package/es/moderating/components/events/ResponseEvent.js +30 -15
  522. package/es/moderating/components/events/SessionStartEvent.js +13 -5
  523. package/es/moderating/components/events/styles.js +1 -0
  524. package/es/moderating/components/events/theme.js +2 -1
  525. package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +30 -12
  526. package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +29 -5
  527. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +29 -5
  528. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +30 -7
  529. package/es/moderating/components/resources/AccommodationsModal/index.js +32 -11
  530. package/es/moderating/components/resources/ElapsedTime.js +16 -9
  531. package/es/moderating/components/resources/ModerateTable/index.js +7 -7
  532. package/es/moderating/components/resources/ModerateTable/presenter.js +96 -44
  533. package/es/moderating/components/resources/ModerateTable/styles.js +2 -0
  534. package/es/moderating/components/resources/ModerateTable/theme.js +2 -1
  535. package/es/moderating/components/resources/ModerateTableRow/ModerateTableRow.examples.js +4 -2
  536. package/es/moderating/components/resources/ModerateTableRow/index.js +5 -5
  537. package/es/moderating/components/resources/ModerateTableRow/presenter.js +73 -30
  538. package/es/moderating/components/resources/ModerateTableRow/story.js +2 -3
  539. package/es/moderating/components/resources/ModerateTableRow/styles.js +1 -0
  540. package/es/moderating/components/resources/ModerateTableRow/theme.js +1 -0
  541. package/es/moderating/components/resources/OutstandingQuizzesModal/index.js +4 -4
  542. package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +32 -5
  543. package/es/moderating/components/sidebar/ModerateTray/index.js +3 -3
  544. package/es/moderating/components/sidebar/ModerateTray/presenter.js +27 -4
  545. package/es/moderating/components/sidebar/ResetQuiz/index.js +9 -7
  546. package/es/moderating/components/sidebar/ResetQuiz/presenter.js +38 -17
  547. package/es/reduxStore.js +8 -4
  548. package/es/reporting/api/getAnalysesExport.js +29 -20
  549. package/es/reporting/api/getAnalysesStatus.js +22 -17
  550. package/es/reporting/api/getItemAnalyses.js +22 -17
  551. package/es/reporting/api/getQuizAnalysis.js +22 -17
  552. package/es/reporting/api/itemAnalyses.js +4 -4
  553. package/es/reporting/api/quizAnalyses.js +4 -4
  554. package/es/reporting/components/Caption/index.js +21 -11
  555. package/es/reporting/components/Caption/styles.js +1 -0
  556. package/es/reporting/components/Caption/theme.js +3 -2
  557. package/es/reporting/components/MetricsListItem/index.js +23 -13
  558. package/es/reporting/components/MetricsListItem/styles.js +1 -0
  559. package/es/reporting/components/charts/CentileDistribution/presenter.js +42 -17
  560. package/es/reporting/components/charts/CentileDistribution/styles.js +2 -0
  561. package/es/reporting/components/charts/CentileDistribution/theme.js +3 -2
  562. package/es/reporting/components/charts/Distribution/presenter.js +54 -21
  563. package/es/reporting/components/charts/Distribution/styles.js +1 -0
  564. package/es/reporting/components/charts/Distribution/theme.js +2 -1
  565. package/es/reporting/components/charts/Legend/index.js +25 -14
  566. package/es/reporting/components/charts/Legend/styles.js +2 -0
  567. package/es/reporting/components/charts/Legend/theme.js +4 -3
  568. package/es/reporting/components/charts/QuintileDistribution/presenter.js +40 -14
  569. package/es/reporting/components/charts/QuintileDistribution/styles.js +1 -0
  570. package/es/reporting/components/charts/QuintileDistribution/theme.js +2 -1
  571. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/AnswerFrequencySummary.examples.js +1 -1
  572. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +33 -11
  573. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +14 -2
  574. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +6 -5
  575. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/ItemAnalysisRow.examples.js +1 -1
  576. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/index.js +3 -3
  577. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +52 -29
  578. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +3 -0
  579. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +4 -3
  580. package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +41 -22
  581. package/es/reporting/components/quizAnalysis/styles.js +7 -3
  582. package/es/reporting/components/quizAnalysis/theme.js +4 -3
  583. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +1 -1
  584. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +25 -15
  585. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +1 -0
  586. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +1 -1
  587. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +25 -15
  588. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +4 -1
  589. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisUpdateDate/index.js +17 -9
  590. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/index.js +1 -1
  591. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +19 -11
  592. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +1 -1
  593. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +20 -12
  594. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/index.js +1 -1
  595. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +34 -11
  596. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +2 -0
  597. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +1 -0
  598. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/index.js +1 -1
  599. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +31 -16
  600. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +1 -0
  601. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +1 -0
  602. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +24 -12
  603. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +20 -12
  604. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/index.js +1 -1
  605. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +51 -27
  606. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +2 -0
  607. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +1 -0
  608. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +25 -12
  609. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/index.js +3 -3
  610. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/utils/matchingTypeOrderer.js +10 -3
  611. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/index.js +1 -1
  612. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +22 -12
  613. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/index.js +1 -1
  614. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +62 -26
  615. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/styles.js +1 -0
  616. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/theme.js +1 -0
  617. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/index.js +1 -1
  618. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +40 -20
  619. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/styles.js +1 -0
  620. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/theme.js +1 -0
  621. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +1 -1
  622. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +24 -14
  623. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +32 -16
  624. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/styles.js +1 -0
  625. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/theme.js +2 -1
  626. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +20 -12
  627. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +1 -1
  628. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +44 -19
  629. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/index.js +1 -1
  630. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +29 -13
  631. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +2 -0
  632. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +1 -0
  633. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/index.js +1 -1
  634. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +23 -12
  635. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/styles.js +1 -0
  636. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/index.js +1 -1
  637. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +54 -18
  638. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +1 -0
  639. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +1 -0
  640. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/index.js +1 -1
  641. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +61 -19
  642. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -0
  643. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +2 -1
  644. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/index.js +1 -1
  645. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +28 -15
  646. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/styles.js +1 -0
  647. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/theme.js +1 -0
  648. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +6 -3
  649. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/index.js +1 -1
  650. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +32 -14
  651. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +1 -0
  652. package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +1 -0
  653. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/index.js +1 -1
  654. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +20 -10
  655. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/styles.js +1 -0
  656. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +1 -0
  657. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +5 -3
  658. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +55 -25
  659. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +2 -0
  660. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +4 -3
  661. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/index.js +1 -1
  662. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +42 -21
  663. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +1 -0
  664. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +1 -0
  665. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +2 -2
  666. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +56 -31
  667. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +2 -0
  668. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +2 -1
  669. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/index.js +1 -1
  670. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +31 -13
  671. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +1 -0
  672. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +3 -2
  673. package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +7 -1
  674. package/es/reporting/components/resources/NewQuizAndItemAnalysis/exportReports.js +53 -40
  675. package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +50 -41
  676. package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +35 -27
  677. package/es/reporting/components/resources/NewQuizAndItemAnalysis/generateReports.js +85 -64
  678. package/es/reporting/components/resources/NewQuizAndItemAnalysis/index.js +2 -2
  679. package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +77 -39
  680. package/es/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +1 -0
  681. package/es/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +1 -0
  682. package/es/reporting/components/resources/NewQuizAndItemAnalysis/utils.js +5 -0
  683. package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +13 -11
  684. package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +133 -104
  685. package/es/reporting/components/resources/OutcomeAnalysis/index.js +3 -3
  686. package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +25 -12
  687. package/es/reporting/components/resources/QuizAndItemAnalysis/QuizAndItemAnalysis.examples.js +9 -7
  688. package/es/reporting/components/resources/QuizAndItemAnalysis/index.js +7 -7
  689. package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +56 -29
  690. package/es/reporting/components/resources/QuizAndItemAnalysis/styles.js +1 -0
  691. package/es/reporting/components/resources/QuizAndItemAnalysis/theme.js +3 -2
  692. package/es/reporting/components/resources/ReportCard/index.js +25 -15
  693. package/es/reporting/components/resources/ReportCard/styles.js +2 -0
  694. package/es/reporting/components/resources/ReportCard/theme.js +2 -1
  695. package/es/reporting/components/resources/ReportList/index.js +24 -14
  696. package/es/reporting/components/resources/ReportList/styles.js +1 -0
  697. package/es/reporting/components/resources/ReportList/theme.js +1 -0
  698. package/es/taking/api/taking.js +53 -41
  699. package/es/taking/learnosity/index.js +68 -42
  700. package/lib/banks/api/bankEntries.js +65 -23
  701. package/lib/banks/api/banks.js +103 -38
  702. package/lib/banks/api/copyingBanksPoller.js +83 -60
  703. package/lib/banks/api/tagAssociations.js +61 -32
  704. package/lib/banks/components/AddBankEntryModal/index.js +25 -10
  705. package/lib/banks/components/AddBankEntryModal/presenter.js +49 -10
  706. package/lib/banks/components/AddToBankModal/index.js +36 -16
  707. package/lib/banks/components/AddToBankModal/presenter.js +126 -56
  708. package/lib/banks/components/AsyncSearch/index.js +94 -18
  709. package/lib/banks/components/Bank/index.js +37 -17
  710. package/lib/banks/components/Bank/presenter.js +165 -70
  711. package/lib/banks/components/Bank/styles.js +8 -2
  712. package/lib/banks/components/Bank/theme.js +6 -3
  713. package/lib/banks/components/BankEntriesList/index.js +15 -6
  714. package/lib/banks/components/BankEntriesList/presenter.js +45 -18
  715. package/lib/banks/components/BankEntriesList/styles.js +4 -1
  716. package/lib/banks/components/BankEntriesList/theme.js +4 -1
  717. package/lib/banks/components/BankEntry/index.js +42 -17
  718. package/lib/banks/components/BankEntry/presenter.js +314 -173
  719. package/lib/banks/components/BankEntry/styles.js +7 -2
  720. package/lib/banks/components/BankEntry/theme.js +7 -4
  721. package/lib/banks/components/BankEntryRow/BankEntryRow.examples.js +13 -5
  722. package/lib/banks/components/BankEntryRow/index.js +32 -12
  723. package/lib/banks/components/BankEntryRow/presenter.js +100 -38
  724. package/lib/banks/components/BankEntryRow/styles.js +4 -1
  725. package/lib/banks/components/BankEntryRow/theme.js +7 -4
  726. package/lib/banks/components/BankSearch/BankSearch.stories.js +27 -9
  727. package/lib/banks/components/BankSearch/index.js +18 -6
  728. package/lib/banks/components/BankSearch/presenter.js +70 -25
  729. package/lib/banks/components/BankSearch/styles.js +4 -1
  730. package/lib/banks/components/BankSearch/theme.js +4 -1
  731. package/lib/banks/components/Banks/index.js +26 -10
  732. package/lib/banks/components/Banks/presenter.js +129 -42
  733. package/lib/banks/components/Banks/styles.js +4 -1
  734. package/lib/banks/components/Banks/theme.js +6 -3
  735. package/lib/banks/components/BanksList/index.js +26 -12
  736. package/lib/banks/components/BanksList/presenter.js +180 -88
  737. package/lib/banks/components/BanksList/styles.js +4 -1
  738. package/lib/banks/components/BanksList/theme.js +7 -4
  739. package/lib/banks/components/CopyMoveBankEntryModal/index.js +30 -13
  740. package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +65 -15
  741. package/lib/banks/components/CreateBankModal/index.js +33 -13
  742. package/lib/banks/components/CreateBankModal/presenter.js +64 -16
  743. package/lib/banks/components/CreateBankModal/styles.js +4 -1
  744. package/lib/banks/components/CreateBankModal/theme.js +5 -2
  745. package/lib/banks/components/EditBankModal/index.js +27 -10
  746. package/lib/banks/components/EditBankModal/presenter.js +56 -16
  747. package/lib/banks/components/EditBankModal/styles.js +4 -1
  748. package/lib/banks/components/EditBankModal/theme.js +5 -2
  749. package/lib/banks/components/HeaderBreadCrumb/index.js +47 -17
  750. package/lib/banks/components/HeaderMenu/index.js +20 -8
  751. package/lib/banks/components/HeaderMenu/presenter.js +51 -19
  752. package/lib/banks/components/HeaderMenu/styles.js +4 -1
  753. package/lib/banks/components/HeaderMenu/theme.js +5 -2
  754. package/lib/banks/components/NavWrapper/NavWrapper.examples.js +9 -3
  755. package/lib/banks/components/NavWrapper/index.js +12 -4
  756. package/lib/banks/components/NavWrapper/presenter.js +64 -25
  757. package/lib/banks/components/NavWrapper/styles.js +5 -1
  758. package/lib/banks/components/NavWrapper/theme.js +8 -5
  759. package/lib/banks/components/SharingModal/ContextualIconButton/index.js +37 -8
  760. package/lib/banks/components/SharingModal/RootAccountSharing.js +55 -19
  761. package/lib/banks/components/SharingModal/ShareList/ShareList.examples.js +5 -2
  762. package/lib/banks/components/SharingModal/ShareList/index.js +61 -20
  763. package/lib/banks/components/SharingModal/ShareList/styles.js +4 -1
  764. package/lib/banks/components/SharingModal/index.js +22 -8
  765. package/lib/banks/components/SharingModal/presenter.js +164 -63
  766. package/lib/banks/components/SharingModal/styles.js +4 -1
  767. package/lib/banks/components/SharingModal/theme.js +6 -3
  768. package/lib/building/api/items.js +118 -81
  769. package/lib/building/api/qtiImports.js +47 -18
  770. package/lib/building/api/quizEntries.js +111 -64
  771. package/lib/building/api/quizzes.js +78 -50
  772. package/lib/building/api/stimuli.js +16 -9
  773. package/lib/building/components/QTIImportModal/index.js +28 -13
  774. package/lib/building/components/layout/Sidebar/Sidebar.examples.js +50 -19
  775. package/lib/building/components/layout/Sidebar/SidebarItem/index.js +46 -19
  776. package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +62 -34
  777. package/lib/building/components/layout/Sidebar/SidebarItem/styles.js +7 -2
  778. package/lib/building/components/layout/Sidebar/SidebarItem/theme.js +4 -1
  779. package/lib/building/components/layout/Sidebar/Stimulus/index.js +43 -17
  780. package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +61 -33
  781. package/lib/building/components/layout/Sidebar/Stimulus/styles.js +7 -2
  782. package/lib/building/components/layout/Sidebar/Stimulus/theme.js +4 -1
  783. package/lib/building/components/layout/Sidebar/index.js +44 -21
  784. package/lib/building/components/layout/Sidebar/presenter.js +74 -28
  785. package/lib/building/components/layout/Sidebar/styles.js +7 -2
  786. package/lib/building/components/layout/Sidebar/theme.js +4 -1
  787. package/lib/building/components/layout/header/BuildingButtons/index.js +34 -15
  788. package/lib/building/components/layout/header/BuildingButtons/presenter.js +86 -19
  789. package/lib/building/components/layout/header/BuildingButtons/styles.js +7 -2
  790. package/lib/building/components/layout/header/BuildingButtons/theme.js +6 -3
  791. package/lib/building/components/layout/header/SDKBuildingButtons/index.js +16 -7
  792. package/lib/building/components/resources/ActionButtons/index.js +20 -7
  793. package/lib/building/components/resources/ActionButtons/presenter.js +55 -18
  794. package/lib/building/components/resources/ActionButtons/styles.js +9 -2
  795. package/lib/building/components/resources/ActionButtons/theme.js +5 -2
  796. package/lib/building/components/resources/AddToBankOptions/index.js +81 -41
  797. package/lib/building/components/resources/AddToBankOptions/styles.js +4 -1
  798. package/lib/building/components/resources/AddToBankOptions/theme.js +5 -2
  799. package/lib/building/components/resources/BanksTray/index.js +13 -5
  800. package/lib/building/components/resources/BanksTray/presenter.js +69 -19
  801. package/lib/building/components/resources/DeleteStimulusModal/index.js +24 -10
  802. package/lib/building/components/resources/DeleteStimulusModal/presenter.js +79 -24
  803. package/lib/building/components/resources/DeleteStimulusModal/styles.js +4 -1
  804. package/lib/building/components/resources/DeleteStimulusModal/theme.js +5 -2
  805. package/lib/building/components/resources/ItemFeedbackModal/index.js +27 -12
  806. package/lib/building/components/resources/ItemFeedbackModal/presenter.js +53 -15
  807. package/lib/building/components/resources/ItemFeedbackModal/styles.js +4 -1
  808. package/lib/building/components/resources/ItemFeedbackModal/theme.js +4 -1
  809. package/lib/building/components/resources/MoveImmutableModal/index.js +29 -14
  810. package/lib/building/components/resources/MoveImmutableModal/presenter.js +45 -12
  811. package/lib/building/components/resources/quiz/editButton/EditButton.js +38 -8
  812. package/lib/building/components/resources/quiz/instructions/Edit/index.js +11 -4
  813. package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +45 -20
  814. package/lib/building/components/resources/quiz/instructions/Edit/styles.js +4 -1
  815. package/lib/building/components/resources/quiz/instructions/Edit/theme.js +1 -0
  816. package/lib/building/components/resources/quiz/instructions/Instructions/Instructions.examples.js +9 -4
  817. package/lib/building/components/resources/quiz/instructions/Instructions/index.js +23 -10
  818. package/lib/building/components/resources/quiz/instructions/Instructions/presenter.js +75 -31
  819. package/lib/building/components/resources/quiz/instructions/Instructions/styles.js +7 -2
  820. package/lib/building/components/resources/quiz/instructions/Instructions/theme.js +3 -2
  821. package/lib/building/components/resources/quiz/instructions/Show/index.js +47 -17
  822. package/lib/building/components/resources/quiz/instructions/Show/styles.js +4 -1
  823. package/lib/building/components/resources/quiz/instructions/Show/theme.js +3 -2
  824. package/lib/building/components/resources/quiz/title/Edit/index.js +55 -19
  825. package/lib/building/components/resources/quiz/title/Edit/styles.js +7 -2
  826. package/lib/building/components/resources/quiz/title/Edit/theme.js +7 -4
  827. package/lib/building/components/resources/quiz/title/Show/index.js +47 -17
  828. package/lib/building/components/resources/quiz/title/Show/styles.js +4 -1
  829. package/lib/building/components/resources/quiz/title/Show/theme.js +4 -1
  830. package/lib/building/components/resources/quiz/title/Title/Title.examples.js +9 -4
  831. package/lib/building/components/resources/quiz/title/Title/index.js +25 -11
  832. package/lib/building/components/resources/quiz/title/Title/presenter.js +69 -31
  833. package/lib/building/components/resources/quiz/title/Title/styles.js +8 -2
  834. package/lib/building/components/resources/quiz/title/Title/theme.js +4 -3
  835. package/lib/building/components/resources/quizEntry/QuizEntry/index.js +44 -19
  836. package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +117 -46
  837. package/lib/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +23 -6
  838. package/lib/building/components/resources/quizEntry/QuizEntry/styles.js +7 -2
  839. package/lib/building/components/resources/quizEntry/QuizEntry/theme.js +7 -4
  840. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/index.js +17 -8
  841. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +77 -21
  842. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +4 -1
  843. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +7 -4
  844. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +47 -18
  845. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +4 -1
  846. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +7 -4
  847. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/index.js +18 -8
  848. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +79 -28
  849. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +8 -2
  850. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +7 -4
  851. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +151 -74
  852. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +5 -1
  853. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +6 -3
  854. package/lib/building/components/resources/quizEntry/QuizEntryEdit/index.js +35 -14
  855. package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +206 -107
  856. package/lib/building/components/resources/quizEntry/QuizEntryEdit/styles.js +5 -1
  857. package/lib/building/components/resources/quizEntry/QuizEntryEdit/theme.js +7 -4
  858. package/lib/building/components/resources/quizEntry/QuizEntryShow/index.js +24 -10
  859. package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +106 -47
  860. package/lib/building/components/resources/quizEntry/QuizEntryShow/styles.js +8 -2
  861. package/lib/building/components/resources/quizEntry/QuizEntryShow/theme.js +8 -5
  862. package/lib/common/actions/addInteractionTypes.js +2 -0
  863. package/lib/common/actions/alerts.js +18 -9
  864. package/lib/common/actions/analyses.js +11 -4
  865. package/lib/common/actions/bankEntries.js +10 -3
  866. package/lib/common/actions/bankSearch.js +19 -6
  867. package/lib/common/actions/banks.js +27 -8
  868. package/lib/common/actions/config.js +5 -1
  869. package/lib/common/actions/dragAndDrop.js +2 -0
  870. package/lib/common/actions/editing.js +5 -1
  871. package/lib/common/actions/errorsShowing.js +5 -1
  872. package/lib/common/actions/features.js +3 -0
  873. package/lib/common/actions/grading.js +6 -2
  874. package/lib/common/actions/items.js +2 -0
  875. package/lib/common/actions/modal.js +10 -3
  876. package/lib/common/actions/moderation.js +3 -0
  877. package/lib/common/actions/modifications.js +86 -64
  878. package/lib/common/actions/outcomes.js +5 -0
  879. package/lib/common/actions/postMessage.js +2 -0
  880. package/lib/common/actions/printing.js +4 -1
  881. package/lib/common/actions/qtiImports.js +3 -0
  882. package/lib/common/actions/quizEntries.js +7 -0
  883. package/lib/common/actions/quizExport.js +6 -2
  884. package/lib/common/actions/quizSessionEvents.js +6 -2
  885. package/lib/common/actions/quizSessionResults.js +6 -2
  886. package/lib/common/actions/quizSessions.js +45 -13
  887. package/lib/common/actions/quizzes.js +27 -8
  888. package/lib/common/actions/rce.js +17 -8
  889. package/lib/common/actions/regrading.js +5 -1
  890. package/lib/common/actions/reporting.js +7 -1
  891. package/lib/common/actions/scrolling.js +4 -1
  892. package/lib/common/actions/sessionItemResults.js +6 -2
  893. package/lib/common/actions/sessionItems.js +6 -2
  894. package/lib/common/actions/sharedBanks.js +15 -5
  895. package/lib/common/actions/sidebar.js +4 -1
  896. package/lib/common/actions/stimuli.js +2 -0
  897. package/lib/common/actions/tagAssociations.js +34 -9
  898. package/lib/common/actions/taking.js +86 -17
  899. package/lib/common/actions/ui.js +39 -11
  900. package/lib/common/actions/upload.js +22 -6
  901. package/lib/common/api/callHandlers.js +111 -38
  902. package/lib/common/api/camelizeHelpers.js +15 -6
  903. package/lib/common/api/features.js +15 -6
  904. package/lib/common/api/fileUpload.js +14 -7
  905. package/lib/common/api/getPersistenceActions.js +64 -42
  906. package/lib/common/api/helpers.js +127 -84
  907. package/lib/common/api/interactionTypes.js +11 -5
  908. package/lib/common/api/quizSessions.js +94 -42
  909. package/lib/common/api/quizzes.js +19 -11
  910. package/lib/common/api/schema.js +42 -24
  911. package/lib/common/components/ApiFeatureFlagInitializer/index.js +26 -12
  912. package/lib/common/components/ConfirmationModal/index.js +17 -5
  913. package/lib/common/components/ConfirmationModal/presenter.js +49 -17
  914. package/lib/common/components/ImportModal/ImportFileSelector/index.js +57 -27
  915. package/lib/common/components/ImportModal/ImportFileSelector/styles.js +4 -1
  916. package/lib/common/components/ImportModal/ImportFileSelector/theme.js +6 -3
  917. package/lib/common/components/ImportModal/index.js +33 -18
  918. package/lib/common/components/ImportModal/presenter.js +95 -23
  919. package/lib/common/components/ImportModal/styles.js +4 -1
  920. package/lib/common/components/ImportModal/theme.js +4 -1
  921. package/lib/common/components/LearnosityCalculator/index.js +81 -43
  922. package/lib/common/components/Pin/Pin.examples.js +3 -2
  923. package/lib/common/components/Pin/index.js +7 -3
  924. package/lib/common/components/Pin/presenter.js +35 -8
  925. package/lib/common/components/PreviewFrame/examples.config.js +10 -5
  926. package/lib/common/components/PreviewFrame/index.js +36 -12
  927. package/lib/common/components/PrintFontSizeModal/index.js +7 -3
  928. package/lib/common/components/PrintFontSizeModal/presenter.js +54 -27
  929. package/lib/common/components/PrintFontSizeModal/styles.js +4 -1
  930. package/lib/common/components/PrintFontSizeModal/theme.js +6 -3
  931. package/lib/common/components/RceConfigProvider/index.js +14 -6
  932. package/lib/common/components/RceConfigProvider/presenter.js +145 -96
  933. package/lib/common/components/RceConfigProvider/rceConfigErrorHandler.js +26 -9
  934. package/lib/common/components/RceConfigProvider/rceConfigErrorMessages.js +26 -8
  935. package/lib/common/components/RceConfigProvider/rceConfigFetcher.js +45 -29
  936. package/lib/common/components/RceConfigProvider/rceConfigMapper.js +20 -6
  937. package/lib/common/components/RceConfigProvider/rceConfigUtils.js +12 -6
  938. package/lib/common/components/SDKApp/index.js +92 -39
  939. package/lib/common/components/SDKApp/styles.js +4 -1
  940. package/lib/common/components/SDKHeaderCalculator.js +20 -10
  941. package/lib/common/components/SDKMenuButton.js +16 -7
  942. package/lib/common/components/SDKNavBar.js +17 -8
  943. package/lib/common/components/SDKTimer.js +20 -10
  944. package/lib/common/components/alerts/index.js +17 -7
  945. package/lib/common/components/alerts/presenter.js +48 -14
  946. package/lib/common/components/alerts/styles.js +7 -2
  947. package/lib/common/components/alerts/theme.js +5 -2
  948. package/lib/common/components/layout/Page/index.js +33 -14
  949. package/lib/common/components/layout/Page/styles.js +8 -2
  950. package/lib/common/components/layout/Page/theme.js +6 -3
  951. package/lib/common/components/layout/header/Calculator/index.js +20 -9
  952. package/lib/common/components/layout/header/Calculator/presenter.js +43 -14
  953. package/lib/common/components/layout/header/HeaderMenuButton/index.js +22 -10
  954. package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +52 -17
  955. package/lib/common/components/layout/header/HeaderMenuButton/styles.js +7 -2
  956. package/lib/common/components/layout/header/HeaderMenuButton/theme.js +6 -3
  957. package/lib/common/components/layout/header/Timer/index.js +22 -8
  958. package/lib/common/components/layout/header/Timer/presenter.js +75 -25
  959. package/lib/common/components/layout/header/Timer/styles.js +4 -1
  960. package/lib/common/components/layout/header/Timer/theme.js +7 -4
  961. package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +34 -13
  962. package/lib/common/components/layout/navbar/SecondaryNavBarButton/styles.js +4 -1
  963. package/lib/common/components/layout/navbar/SecondaryNavBarButton/theme.js +4 -1
  964. package/lib/common/components/layout/navbar/index.js +55 -18
  965. package/lib/common/components/layout/navbar/styles.js +4 -1
  966. package/lib/common/components/layout/navbar/theme.js +5 -2
  967. package/lib/common/components/layout/sidebar/PositionSummary/index.js +34 -13
  968. package/lib/common/components/layout/sidebar/PositionSummary/styles.js +4 -1
  969. package/lib/common/components/layout/sidebar/PositionSummary/theme.js +7 -4
  970. package/lib/common/components/layout/sidebar/Sidebar/Pin.js +33 -8
  971. package/lib/common/components/layout/sidebar/Sidebar/Sidebar.examples.js +17 -9
  972. package/lib/common/components/layout/sidebar/Sidebar/index.js +108 -43
  973. package/lib/common/components/layout/sidebar/Sidebar/styles.js +15 -6
  974. package/lib/common/components/layout/sidebar/Sidebar/theme.js +10 -6
  975. package/lib/common/components/layout/sidebar/SidebarItem/index.js +27 -11
  976. package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +72 -39
  977. package/lib/common/components/layout/sidebar/SidebarItem/styles.js +7 -2
  978. package/lib/common/components/layout/sidebar/SidebarItem/theme.js +7 -4
  979. package/lib/common/components/layout/sidebar/Stimulus/Collection/index.js +13 -6
  980. package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +60 -27
  981. package/lib/common/components/layout/sidebar/Stimulus/Collection/styles.js +9 -3
  982. package/lib/common/components/layout/sidebar/Stimulus/Collection/theme.js +6 -3
  983. package/lib/common/components/layout/sidebar/Stimulus/Summary/index.js +13 -6
  984. package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +59 -23
  985. package/lib/common/components/layout/sidebar/Stimulus/Summary/styles.js +4 -1
  986. package/lib/common/components/layout/sidebar/Stimulus/Summary/theme.js +6 -3
  987. package/lib/common/components/layout/sidebar/Stimulus/Title/index.js +35 -14
  988. package/lib/common/components/layout/sidebar/Stimulus/Title/styles.js +4 -1
  989. package/lib/common/components/layout/sidebar/Stimulus/index.js +21 -8
  990. package/lib/common/components/layout/sidebar/Stimulus/presenter.js +76 -35
  991. package/lib/common/components/layout/sidebar/Stimulus/styles.js +4 -1
  992. package/lib/common/components/layout/sidebar/Stimulus/theme.js +7 -4
  993. package/lib/common/components/resources/BankSelection/BankSelection.examples.js +3 -2
  994. package/lib/common/components/resources/BankSelection/index.js +21 -9
  995. package/lib/common/components/resources/BankSelection/presenter.js +70 -20
  996. package/lib/common/components/resources/WarningWrapper/index.js +42 -14
  997. package/lib/common/components/resources/WarningWrapper/styles.js +4 -1
  998. package/lib/common/components/resources/WarningWrapper/theme.js +6 -3
  999. package/lib/common/components/resources/entry/EntrySave/index.js +29 -13
  1000. package/lib/common/components/resources/entry/EntrySave/presenter.js +175 -99
  1001. package/lib/common/components/resources/item/ItemEdit/index.js +44 -21
  1002. package/lib/common/components/resources/item/ItemEdit/presenter.js +69 -22
  1003. package/lib/common/components/resources/item/ItemOverride/index.js +29 -12
  1004. package/lib/common/components/resources/item/ItemOverride/presenter.js +38 -10
  1005. package/lib/common/components/resources/item/ItemShow/index.js +34 -10
  1006. package/lib/common/components/resources/positionBox/PositionBox.js +35 -14
  1007. package/lib/common/components/resources/positionBox/styles.js +7 -2
  1008. package/lib/common/components/resources/positionBox/theme.js +6 -3
  1009. package/lib/common/components/resources/quiz/AddContent/Body/index.js +22 -9
  1010. package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +68 -27
  1011. package/lib/common/components/resources/quiz/AddContent/Body/styles.js +14 -6
  1012. package/lib/common/components/resources/quiz/AddContent/Body/theme.js +8 -5
  1013. package/lib/common/components/resources/quiz/AddContent/Button/index.js +42 -14
  1014. package/lib/common/components/resources/quiz/AddContent/Button/styles.js +8 -2
  1015. package/lib/common/components/resources/quiz/AddContent/Button/theme.js +8 -5
  1016. package/lib/common/components/resources/quiz/AddContent/Modal/index.js +21 -10
  1017. package/lib/common/components/resources/quiz/AddContent/Modal/presenter.js +33 -10
  1018. package/lib/common/components/resources/quiz/AddContent/Popover/index.js +23 -10
  1019. package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +59 -21
  1020. package/lib/common/components/resources/quiz/AddContent/Popover/styles.js +4 -1
  1021. package/lib/common/components/resources/quiz/AddContent/Popover/theme.js +5 -2
  1022. package/lib/common/components/resources/quiz/info/QuizInfo.js +31 -10
  1023. package/lib/common/components/resources/quiz/instructions/Instructions.js +38 -19
  1024. package/lib/common/components/resources/quiz/instructions/styles.js +4 -1
  1025. package/lib/common/components/resources/quiz/instructions/theme.js +5 -2
  1026. package/lib/common/components/resources/quiz/title/Title.js +38 -18
  1027. package/lib/common/components/resources/quiz/title/styles.js +4 -1
  1028. package/lib/common/components/resources/quiz/title/theme.js +5 -2
  1029. package/lib/common/components/resources/quizSessionResult/Header/index.js +43 -14
  1030. package/lib/common/components/resources/quizSessionResult/Header/styles.js +4 -1
  1031. package/lib/common/components/resources/quizSessionResult/Header/theme.js +5 -2
  1032. package/lib/common/components/resources/quizSessionResult/Info/Info.examples.js +11 -5
  1033. package/lib/common/components/resources/quizSessionResult/Info/index.js +151 -111
  1034. package/lib/common/components/resources/quizSessionResult/Info/styles.js +5 -1
  1035. package/lib/common/components/resources/quizSessionResult/Info/theme.js +5 -2
  1036. package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +37 -13
  1037. package/lib/common/components/resources/sessionItemResult/ResultStimulus/styles.js +8 -2
  1038. package/lib/common/components/resources/sessionItemResult/ResultStimulus/theme.js +8 -5
  1039. package/lib/common/components/resources/sessionItemResult/SessionItemResult/index.js +17 -7
  1040. package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +115 -68
  1041. package/lib/common/components/resources/sessionItemResult/SessionItemResult/styles.js +7 -2
  1042. package/lib/common/components/resources/sessionItemResult/SessionItemResult/theme.js +7 -4
  1043. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +53 -20
  1044. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/styles.js +4 -1
  1045. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +7 -4
  1046. package/lib/common/components/resources/stimulus/Stimulus/index.js +19 -7
  1047. package/lib/common/components/resources/stimulus/Stimulus/presenter.js +72 -32
  1048. package/lib/common/components/resources/stimulus/Stimulus/styles.js +12 -3
  1049. package/lib/common/components/resources/stimulus/Stimulus/theme.js +7 -4
  1050. package/lib/common/components/resources/stimulus/StimulusEdit/index.js +33 -13
  1051. package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +232 -120
  1052. package/lib/common/components/resources/stimulus/StimulusEdit/styles.js +4 -1
  1053. package/lib/common/components/resources/stimulus/StimulusEdit/theme.js +6 -3
  1054. package/lib/common/components/resources/stimulus/StimulusEditInfo/index.js +19 -7
  1055. package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +67 -19
  1056. package/lib/common/components/resources/stimulus/StimulusEditInfo/styles.js +4 -1
  1057. package/lib/common/components/resources/stimulus/StimulusEditInfo/theme.js +6 -3
  1058. package/lib/common/components/resources/stimulus/StimulusShow/index.js +53 -22
  1059. package/lib/common/components/resources/stimulus/StimulusShow/styles.js +4 -1
  1060. package/lib/common/components/resources/stimulus/StimulusShow/theme.js +6 -3
  1061. package/lib/common/components/resources/stimulus/StimulusShowInfo/StimulusShowInfo.examples.js +8 -4
  1062. package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +30 -7
  1063. package/lib/common/components/shared/Card/CardContent/index.js +35 -14
  1064. package/lib/common/components/shared/Card/CardContent/styles.js +7 -2
  1065. package/lib/common/components/shared/Card/CardContent/theme.js +8 -5
  1066. package/lib/common/components/shared/Card/CardWrapper/index.js +35 -14
  1067. package/lib/common/components/shared/Card/CardWrapper/styles.js +7 -2
  1068. package/lib/common/components/shared/Card/CardWrapper/theme.js +6 -3
  1069. package/lib/common/components/shared/Card/index.js +20 -10
  1070. package/lib/common/components/shared/ExpandButton/index.js +35 -13
  1071. package/lib/common/components/shared/ExpandButton/styles.js +7 -2
  1072. package/lib/common/components/shared/ExpandButton/theme.js +4 -1
  1073. package/lib/common/components/shared/FormattedDuration/FormattedDuration.examples.js +8 -3
  1074. package/lib/common/components/shared/FormattedDuration/index.js +48 -17
  1075. package/lib/common/components/shared/IfFeature/index.js +13 -6
  1076. package/lib/common/components/shared/IfFeature/presenter.js +25 -7
  1077. package/lib/common/components/shared/InteractionTypes/index.js +11 -4
  1078. package/lib/common/components/shared/InteractionTypes/presenter.js +56 -17
  1079. package/lib/common/components/shared/InteractionTypes/styles.js +4 -1
  1080. package/lib/common/components/shared/InteractionTypes/theme.js +6 -3
  1081. package/lib/common/components/shared/PaginatedCollection/index.js +16 -7
  1082. package/lib/common/components/shared/PaginatedCollection/presenter.js +97 -63
  1083. package/lib/common/components/shared/PaginatedCollection/styles.js +4 -1
  1084. package/lib/common/components/shared/PaginatedCollection/theme.js +6 -3
  1085. package/lib/common/components/shared/Paginator/index.js +38 -14
  1086. package/lib/common/components/shared/Paginator/styles.js +4 -1
  1087. package/lib/common/components/shared/Paginator/theme.js +4 -1
  1088. package/lib/common/components/shared/PrintTrigger/index.js +27 -11
  1089. package/lib/common/components/shared/PrintTrigger/presenter.js +61 -17
  1090. package/lib/common/components/shared/TagDisplay/index.js +37 -13
  1091. package/lib/common/components/shared/TagDisplay/styles.js +4 -1
  1092. package/lib/common/components/shared/TagSelect/index.js +7 -3
  1093. package/lib/common/components/shared/TagSelect/presenter.js +72 -20
  1094. package/lib/common/components/shared/TagSuggestSelect/index.js +17 -6
  1095. package/lib/common/components/shared/TagSuggestSelect/presenter.js +49 -17
  1096. package/lib/common/components/shared/TagWrapper/index.js +7 -3
  1097. package/lib/common/components/shared/TagWrapper/presenter.js +38 -11
  1098. package/lib/common/components/shared/TimeUnitsInput/TimeUnitsInput.examples.js +3 -2
  1099. package/lib/common/components/shared/TimeUnitsInput/index.js +89 -36
  1100. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +47 -21
  1101. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +7 -2
  1102. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +6 -3
  1103. package/lib/common/components/shared/drag_and_drop/DragHandle/index.js +30 -13
  1104. package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +89 -30
  1105. package/lib/common/components/shared/drag_and_drop/dragAndDropUtils.js +108 -39
  1106. package/lib/common/components/shared/errors/Errors.js +42 -14
  1107. package/lib/common/components/shared/errors/styles.js +4 -1
  1108. package/lib/common/components/shared/errors/theme.js +5 -2
  1109. package/lib/common/components/shared/file_selector/FileSelector.js +39 -15
  1110. package/lib/common/components/shared/file_selector/styles.js +4 -1
  1111. package/lib/common/components/shared/file_selector/theme.js +6 -3
  1112. package/lib/common/components/shared/functionality/componentWithOutsideClick.js +40 -18
  1113. package/lib/common/components/shared/functionality/componentWithOutsideClickEmotion.js +32 -12
  1114. package/lib/common/components/shared/functionality/disableDraggingOverride.js +10 -4
  1115. package/lib/common/components/shared/functionality/makeEditable.js +59 -25
  1116. package/lib/common/components/shared/functionality/makeScrollable.js +74 -33
  1117. package/lib/common/components/shared/overlay/index.js +39 -26
  1118. package/lib/common/components/shared/overlay/styles.js +7 -2
  1119. package/lib/common/components/shared/overlay/theme.js +6 -3
  1120. package/lib/common/components/shared/return_button/ReturnButton.js +33 -11
  1121. package/lib/common/components/shared/spinner/Spinner.js +43 -20
  1122. package/lib/common/components/shared/spinner/styles.js +4 -1
  1123. package/lib/common/kinesis/QuizEventsLogger.js +104 -53
  1124. package/lib/common/kinesis/StreamQueue.js +33 -12
  1125. package/lib/common/kinesis/client.js +26 -9
  1126. package/lib/common/kinesis/config.js +25 -10
  1127. package/lib/common/kinesis/eventTypes.js +20 -10
  1128. package/lib/common/middleware/alertTimerMiddleware.js +11 -4
  1129. package/lib/common/middleware/crossDomainMessagingMiddleware.js +8 -2
  1130. package/lib/common/middleware/eventLoggerMiddleware.js +14 -6
  1131. package/lib/common/middleware/persistedStorageMiddleware.js +15 -4
  1132. package/lib/common/react-redux.js +7 -3
  1133. package/lib/common/records/Alert.js +20 -8
  1134. package/lib/common/records/Bank.js +30 -10
  1135. package/lib/common/records/BankEntry.js +32 -10
  1136. package/lib/common/records/Item.js +39 -18
  1137. package/lib/common/records/ItemAnalysis.js +28 -9
  1138. package/lib/common/records/QtiImport.js +25 -8
  1139. package/lib/common/records/Quiz.js +47 -21
  1140. package/lib/common/records/QuizAnalysis.js +24 -8
  1141. package/lib/common/records/QuizEntry.js +179 -109
  1142. package/lib/common/records/QuizSession.js +46 -24
  1143. package/lib/common/records/QuizSessionEvent.js +25 -9
  1144. package/lib/common/records/QuizSessionResult.js +27 -9
  1145. package/lib/common/records/Response.js +27 -9
  1146. package/lib/common/records/SessionItem.js +38 -13
  1147. package/lib/common/records/SessionItemResult.js +26 -9
  1148. package/lib/common/records/Stimulus.js +33 -13
  1149. package/lib/common/records/baseRecord.js +33 -11
  1150. package/lib/common/records/index.js +52 -35
  1151. package/lib/common/records/reduxRecord.js +21 -10
  1152. package/lib/common/reducers/alerts.js +10 -2
  1153. package/lib/common/reducers/analyses.js +35 -11
  1154. package/lib/common/reducers/bankEntries.js +15 -3
  1155. package/lib/common/reducers/bankSearch.js +17 -6
  1156. package/lib/common/reducers/banks.js +23 -4
  1157. package/lib/common/reducers/calls.js +10 -2
  1158. package/lib/common/reducers/config.js +12 -2
  1159. package/lib/common/reducers/dragAndDrop.js +9 -2
  1160. package/lib/common/reducers/editing.js +13 -4
  1161. package/lib/common/reducers/errorsShowing.js +11 -2
  1162. package/lib/common/reducers/features.js +10 -2
  1163. package/lib/common/reducers/grading.js +11 -2
  1164. package/lib/common/reducers/interactionTypes.js +13 -3
  1165. package/lib/common/reducers/items.js +14 -3
  1166. package/lib/common/reducers/modal.js +13 -2
  1167. package/lib/common/reducers/moderation.js +11 -2
  1168. package/lib/common/reducers/modifications.js +50 -11
  1169. package/lib/common/reducers/outcomes.js +13 -2
  1170. package/lib/common/reducers/printing.js +9 -2
  1171. package/lib/common/reducers/qtiImports.js +15 -3
  1172. package/lib/common/reducers/quizEntries.js +50 -31
  1173. package/lib/common/reducers/quizExport.js +9 -2
  1174. package/lib/common/reducers/quizSessionEvents.js +12 -4
  1175. package/lib/common/reducers/quizSessionResults.js +13 -3
  1176. package/lib/common/reducers/quizSessions.js +22 -5
  1177. package/lib/common/reducers/quizzes.js +25 -3
  1178. package/lib/common/reducers/rce.js +12 -2
  1179. package/lib/common/reducers/regrading.js +12 -2
  1180. package/lib/common/reducers/reporting.js +22 -3
  1181. package/lib/common/reducers/scrolling.js +10 -2
  1182. package/lib/common/reducers/sessionItemResults.js +13 -3
  1183. package/lib/common/reducers/sessionItems.js +14 -3
  1184. package/lib/common/reducers/sharedBanks.js +17 -4
  1185. package/lib/common/reducers/sidebar.js +10 -2
  1186. package/lib/common/reducers/stimuli.js +14 -3
  1187. package/lib/common/reducers/tagAssociations.js +35 -2
  1188. package/lib/common/reducers/taking.js +41 -2
  1189. package/lib/common/reducers/ui.js +18 -2
  1190. package/lib/common/reducers/upload.js +14 -2
  1191. package/lib/common/selectors/analyses.js +28 -8
  1192. package/lib/common/selectors/calculator.js +15 -8
  1193. package/lib/common/selectors/calls.js +3 -0
  1194. package/lib/common/selectors/config.js +5 -1
  1195. package/lib/common/selectors/interactionTypes.js +22 -12
  1196. package/lib/common/selectors/items.js +9 -2
  1197. package/lib/common/selectors/qtiImports.js +14 -6
  1198. package/lib/common/selectors/quizSessionResults.js +8 -3
  1199. package/lib/common/selectors/quizSessions.js +30 -13
  1200. package/lib/common/selectors/quizzes.js +70 -23
  1201. package/lib/common/selectors/rce.js +10 -4
  1202. package/lib/common/selectors/reporting.js +11 -4
  1203. package/lib/common/selectors/sessionItemResults.js +17 -8
  1204. package/lib/common/selectors/sessionItems.js +18 -8
  1205. package/lib/common/selectors/taking.js +29 -10
  1206. package/lib/common/selectors/ui.js +5 -2
  1207. package/lib/common/util/CustomPropTypes.js +23 -3
  1208. package/lib/common/util/ElementsForSelectors.js +8 -3
  1209. package/lib/common/util/ExhaustivePaginatedFetcher.js +85 -55
  1210. package/lib/common/util/Fetcher.js +245 -157
  1211. package/lib/common/util/MultiWeakMap.js +27 -4
  1212. package/lib/common/util/PaginatedFetcher.js +57 -24
  1213. package/lib/common/util/ThunkQueue.js +87 -53
  1214. package/lib/common/util/TimeRecordingService.js +23 -4
  1215. package/lib/common/util/TimerService.js +59 -9
  1216. package/lib/common/util/cachePreviousArgs.js +11 -3
  1217. package/lib/common/util/callHelpers.js +20 -6
  1218. package/lib/common/util/componentForItem.js +16 -4
  1219. package/lib/common/util/crossDomainMessaging.js +2 -0
  1220. package/lib/common/util/debounceLatestPromise.js +10 -3
  1221. package/lib/common/util/featureCheck.js +16 -6
  1222. package/lib/common/util/fetchHelpers.js +1 -0
  1223. package/lib/common/util/fitbCopyHelper.js +4 -1
  1224. package/lib/common/util/formatTimespan.js +22 -3
  1225. package/lib/common/util/generateDisplayPositions.js +10 -4
  1226. package/lib/common/util/httpHeaders.js +12 -5
  1227. package/lib/common/util/immutableHelpers.js +19 -10
  1228. package/lib/common/util/instUIMessages.js +5 -2
  1229. package/lib/common/util/interactionTypeMetadata.js +16 -8
  1230. package/lib/common/util/interactionTypePropsHelper.js +20 -4
  1231. package/lib/common/util/interactionTypeRecordForItem.js +13 -3
  1232. package/lib/common/util/jsonify.js +10 -5
  1233. package/lib/common/util/keyboardClickable.js +4 -1
  1234. package/lib/common/util/mathRenderingUtils.js +6 -2
  1235. package/lib/common/util/maxContent.js +10 -3
  1236. package/lib/common/util/modalHelpers.js +2 -0
  1237. package/lib/common/util/noop.js +5 -2
  1238. package/lib/common/util/persistedState.js +20 -6
  1239. package/lib/common/util/printUtils.js +13 -4
  1240. package/lib/common/util/rceChecker.js +26 -14
  1241. package/lib/common/util/renderAlerts.js +25 -13
  1242. package/lib/common/util/serializeEvent.js +14 -5
  1243. package/lib/common/util/sessionStore.js +20 -8
  1244. package/lib/common/util/valMap.js +8 -3
  1245. package/lib/common/util/warningHelpers.js +44 -10
  1246. package/lib/common/util/windowChecks.js +22 -7
  1247. package/lib/common/util/withCachedArguments.js +14 -4
  1248. package/lib/common/util/withDynamoPagination.js +97 -63
  1249. package/lib/common/util/withStateCache.js +19 -3
  1250. package/lib/config.js +17 -6
  1251. package/lib/configureStore.js +104 -53
  1252. package/lib/grading/api/quizEntryRegrades.js +13 -7
  1253. package/lib/grading/api/updateResults.js +20 -7
  1254. package/lib/index.js +646 -517
  1255. package/lib/messages/LocalStorageAdapter.js +21 -6
  1256. package/lib/messages/LocalStorageLimits.js +30 -7
  1257. package/lib/messages/StorageExhaustionError.js +20 -8
  1258. package/lib/messages/postMessageService.js +35 -6
  1259. package/lib/messages/subjectHandlers/forwardMessage.js +4 -1
  1260. package/lib/messages/subjectHandlers/lti.capabilities.js +4 -1
  1261. package/lib/messages/subjectHandlers/lti.fetchWindowSize.js +4 -1
  1262. package/lib/messages/subjectHandlers/lti.frameResize.js +7 -2
  1263. package/lib/messages/subjectHandlers/lti.get_data.js +12 -4
  1264. package/lib/messages/subjectHandlers/lti.put_data.js +19 -7
  1265. package/lib/messages/subjectHandlers/requestFullWindowLaunch.js +13 -4
  1266. package/lib/messages/utils.js +1 -0
  1267. package/lib/moderating/api/quizSessionEvents.js +10 -4
  1268. package/lib/moderating/api/quizSessions.js +12 -4
  1269. package/lib/moderating/components/events/Event.js +58 -15
  1270. package/lib/moderating/components/events/PageBlurredEvent.js +48 -0
  1271. package/lib/moderating/components/events/PageFocusedEvent.js +48 -0
  1272. package/lib/moderating/components/events/RCEEvent.js +27 -8
  1273. package/lib/moderating/components/events/ResponseEvent.js +49 -18
  1274. package/lib/moderating/components/events/SessionStartEvent.js +33 -9
  1275. package/lib/moderating/components/events/styles.js +4 -1
  1276. package/lib/moderating/components/events/theme.js +5 -2
  1277. package/lib/moderating/components/resources/AccommodationsModal/AccommodationsModal.examples.js +3 -2
  1278. package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +44 -15
  1279. package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/{}.examples.js +3 -2
  1280. package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +47 -10
  1281. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +45 -8
  1282. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/ExtraTimeSettings.examples.js +3 -2
  1283. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +54 -14
  1284. package/lib/moderating/components/resources/AccommodationsModal/index.js +55 -15
  1285. package/lib/moderating/components/resources/ElapsedTime.js +32 -13
  1286. package/lib/moderating/components/resources/ModerateTable/index.js +26 -12
  1287. package/lib/moderating/components/resources/ModerateTable/presenter.js +128 -52
  1288. package/lib/moderating/components/resources/ModerateTable/styles.js +7 -2
  1289. package/lib/moderating/components/resources/ModerateTable/theme.js +5 -2
  1290. package/lib/moderating/components/resources/ModerateTableRow/ModerateTableRow.examples.js +13 -5
  1291. package/lib/moderating/components/resources/ModerateTableRow/index.js +15 -8
  1292. package/lib/moderating/components/resources/ModerateTableRow/presenter.js +99 -35
  1293. package/lib/moderating/components/resources/ModerateTableRow/story.js +10 -4
  1294. package/lib/moderating/components/resources/ModerateTableRow/styles.js +4 -1
  1295. package/lib/moderating/components/resources/ModerateTableRow/theme.js +4 -1
  1296. package/lib/moderating/components/resources/OutstandingQuizzesModal/OutstandingQuizzesModal.examples.js +3 -2
  1297. package/lib/moderating/components/resources/OutstandingQuizzesModal/index.js +20 -8
  1298. package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +54 -9
  1299. package/lib/moderating/components/sidebar/ModerateTray/ModerateTray.examples.js +3 -2
  1300. package/lib/moderating/components/sidebar/ModerateTray/index.js +15 -7
  1301. package/lib/moderating/components/sidebar/ModerateTray/presenter.js +52 -8
  1302. package/lib/moderating/components/sidebar/ResetQuiz/index.js +25 -11
  1303. package/lib/moderating/components/sidebar/ResetQuiz/presenter.js +58 -21
  1304. package/lib/reduxStore.js +21 -9
  1305. package/lib/reporting/api/getAnalysesExport.js +40 -23
  1306. package/lib/reporting/api/getAnalysesStatus.js +33 -20
  1307. package/lib/reporting/api/getItemAnalyses.js +33 -20
  1308. package/lib/reporting/api/getQuizAnalysis.js +33 -20
  1309. package/lib/reporting/api/itemAnalyses.js +11 -5
  1310. package/lib/reporting/api/quizAnalyses.js +11 -5
  1311. package/lib/reporting/components/Caption/index.js +34 -14
  1312. package/lib/reporting/components/Caption/styles.js +4 -1
  1313. package/lib/reporting/components/Caption/theme.js +6 -3
  1314. package/lib/reporting/components/MetricsListItem/index.js +38 -16
  1315. package/lib/reporting/components/MetricsListItem/styles.js +4 -1
  1316. package/lib/reporting/components/charts/CentileDistribution/CentileDistribution.examples.js +3 -2
  1317. package/lib/reporting/components/charts/CentileDistribution/index.js +6 -2
  1318. package/lib/reporting/components/charts/CentileDistribution/presenter.js +60 -21
  1319. package/lib/reporting/components/charts/CentileDistribution/styles.js +7 -2
  1320. package/lib/reporting/components/charts/CentileDistribution/theme.js +6 -3
  1321. package/lib/reporting/components/charts/Distribution/CentileDistribution.js +6 -3
  1322. package/lib/reporting/components/charts/Distribution/Distribution.js +6 -2
  1323. package/lib/reporting/components/charts/Distribution/QuintileDistribution.js +6 -2
  1324. package/lib/reporting/components/charts/Distribution/index.js +6 -2
  1325. package/lib/reporting/components/charts/Distribution/presenter.js +76 -23
  1326. package/lib/reporting/components/charts/Distribution/styles.js +4 -1
  1327. package/lib/reporting/components/charts/Distribution/theme.js +5 -2
  1328. package/lib/reporting/components/charts/Legend/index.js +39 -17
  1329. package/lib/reporting/components/charts/Legend/styles.js +7 -2
  1330. package/lib/reporting/components/charts/Legend/theme.js +7 -4
  1331. package/lib/reporting/components/charts/QuintileDistribution/QuintileDistribution.examples.js +3 -2
  1332. package/lib/reporting/components/charts/QuintileDistribution/index.js +6 -2
  1333. package/lib/reporting/components/charts/QuintileDistribution/presenter.js +57 -19
  1334. package/lib/reporting/components/charts/QuintileDistribution/styles.js +4 -1
  1335. package/lib/reporting/components/charts/QuintileDistribution/theme.js +5 -2
  1336. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/AnswerFrequencySummary.examples.js +9 -4
  1337. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +53 -14
  1338. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +20 -4
  1339. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +9 -6
  1340. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/ItemAnalysisRow.examples.js +9 -4
  1341. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/index.js +18 -7
  1342. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +95 -45
  1343. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +8 -2
  1344. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +7 -4
  1345. package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +74 -35
  1346. package/lib/reporting/components/quizAnalysis/styles.js +12 -5
  1347. package/lib/reporting/components/quizAnalysis/theme.js +7 -4
  1348. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +5 -2
  1349. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +36 -17
  1350. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +4 -1
  1351. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +5 -2
  1352. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +38 -18
  1353. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +7 -2
  1354. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisUpdateDate/index.js +33 -12
  1355. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/index.js +2 -1
  1356. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +37 -15
  1357. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +2 -1
  1358. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +41 -18
  1359. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/index.js +2 -1
  1360. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +49 -13
  1361. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +7 -2
  1362. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +4 -1
  1363. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/index.js +2 -1
  1364. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +51 -21
  1365. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +4 -1
  1366. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +4 -1
  1367. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +47 -18
  1368. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +42 -18
  1369. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/index.js +2 -1
  1370. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +72 -29
  1371. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +7 -2
  1372. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +4 -1
  1373. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +47 -18
  1374. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/index.js +12 -9
  1375. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/utils/matchingTypeOrderer.js +15 -5
  1376. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/index.js +2 -1
  1377. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +41 -16
  1378. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/index.js +2 -1
  1379. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +89 -34
  1380. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/styles.js +4 -1
  1381. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/theme.js +4 -1
  1382. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/index.js +2 -1
  1383. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +61 -25
  1384. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/styles.js +4 -1
  1385. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/theme.js +4 -1
  1386. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +2 -1
  1387. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +45 -20
  1388. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +48 -19
  1389. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/styles.js +4 -1
  1390. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/theme.js +5 -2
  1391. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +44 -19
  1392. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +2 -1
  1393. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +80 -37
  1394. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/index.js +2 -1
  1395. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +41 -17
  1396. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +7 -2
  1397. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +4 -1
  1398. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/index.js +2 -1
  1399. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/popoverContent.js +7 -3
  1400. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +39 -15
  1401. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/styles.js +4 -1
  1402. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/index.js +2 -1
  1403. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +71 -20
  1404. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +4 -1
  1405. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +4 -1
  1406. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/index.js +2 -1
  1407. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +82 -21
  1408. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +7 -2
  1409. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +5 -2
  1410. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/index.js +2 -1
  1411. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +45 -19
  1412. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/styles.js +4 -1
  1413. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/theme.js +4 -1
  1414. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +20 -6
  1415. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/index.js +5 -2
  1416. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +49 -16
  1417. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +4 -1
  1418. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +4 -1
  1419. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/index.js +2 -1
  1420. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +30 -12
  1421. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/styles.js +4 -1
  1422. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +4 -1
  1423. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +10 -4
  1424. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/popoverContent.js +11 -5
  1425. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +91 -36
  1426. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +7 -2
  1427. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +7 -4
  1428. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/index.js +5 -2
  1429. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js +10 -5
  1430. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +73 -33
  1431. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +4 -1
  1432. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +4 -1
  1433. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +11 -5
  1434. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +85 -39
  1435. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +8 -2
  1436. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +5 -2
  1437. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/index.js +5 -2
  1438. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +51 -19
  1439. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +4 -1
  1440. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +6 -3
  1441. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +30 -10
  1442. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +37 -11
  1443. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/exportFormats.js +2 -1
  1444. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/exportReports.js +64 -43
  1445. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +61 -44
  1446. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +45 -30
  1447. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/generateReports.js +100 -68
  1448. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/index.js +11 -5
  1449. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +111 -48
  1450. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +71 -18
  1451. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +4 -1
  1452. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +4 -1
  1453. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/utils.js +17 -5
  1454. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +32 -15
  1455. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +154 -108
  1456. package/lib/reporting/components/resources/OutcomeAnalysis/index.js +13 -6
  1457. package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +44 -16
  1458. package/lib/reporting/components/resources/QuizAndItemAnalysis/QuizAndItemAnalysis.examples.js +19 -10
  1459. package/lib/reporting/components/resources/QuizAndItemAnalysis/index.js +22 -10
  1460. package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +92 -45
  1461. package/lib/reporting/components/resources/QuizAndItemAnalysis/styles.js +4 -1
  1462. package/lib/reporting/components/resources/QuizAndItemAnalysis/theme.js +6 -3
  1463. package/lib/reporting/components/resources/ReportCard/index.js +43 -19
  1464. package/lib/reporting/components/resources/ReportCard/styles.js +7 -2
  1465. package/lib/reporting/components/resources/ReportCard/theme.js +5 -2
  1466. package/lib/reporting/components/resources/ReportList/index.js +38 -17
  1467. package/lib/reporting/components/resources/ReportList/styles.js +4 -1
  1468. package/lib/reporting/components/resources/ReportList/theme.js +4 -1
  1469. package/lib/taking/api/taking.js +104 -56
  1470. package/lib/taking/learnosity/index.js +77 -44
  1471. package/package.json +10 -9
@@ -1,42 +1,62 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
- exports.getBanks = exports.getBank = exports.getAllBanks = exports.deleteBank = exports.createBankCloneJob = exports.createBank = void 0;
8
8
  exports.getExistingBankAndEntries = getExistingBankAndEntries;
9
- exports.updateSharedBankPermission = exports.updateBank = exports.shareBank = exports.getSpecificBanks = exports.getSharedBanks = exports.getSharedBank = void 0;
9
+ exports.createBankCloneJob = exports.updateSharedBankPermission = exports.getSharedBanks = exports.getSharedBank = exports.shareBank = exports.deleteBank = exports.updateBank = exports.createBank = exports.getSpecificBanks = exports.getBank = exports.getAllBanks = exports.getBanks = void 0;
10
+
10
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
+
11
13
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
- var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher"));
13
- var _PaginatedFetcher = _interopRequireDefault(require("../../common/util/PaginatedFetcher"));
14
- var _ExhaustivePaginatedFetcher = _interopRequireDefault(require("../../common/util/ExhaustivePaginatedFetcher"));
15
- var _callHandlers = require("../../common/api/callHandlers");
16
- var _bankEntries = require("../../common/actions/bankEntries");
17
- var _banks = require("../../common/actions/banks");
18
- var _sharedBanks = require("../../common/actions/sharedBanks");
19
- var _ui = require("../../common/actions/ui");
14
+
15
+ var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher.js"));
16
+
17
+ var _PaginatedFetcher = _interopRequireDefault(require("../../common/util/PaginatedFetcher.js"));
18
+
19
+ var _ExhaustivePaginatedFetcher = _interopRequireDefault(require("../../common/util/ExhaustivePaginatedFetcher.js"));
20
+
21
+ var _callHandlers = require("../../common/api/callHandlers.js");
22
+
23
+ var _bankEntries = require("../../common/actions/bankEntries.js");
24
+
25
+ var _banks = require("../../common/actions/banks.js");
26
+
27
+ var _sharedBanks = require("../../common/actions/sharedBanks.js");
28
+
29
+ var _ui = require("../../common/actions/ui.js");
30
+
20
31
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
21
- var _helpers = require("../../common/api/helpers");
22
- var _copyingBanksPoller = require("./copyingBanksPoller");
32
+
33
+ var _helpers = require("../../common/api/helpers.js");
34
+
35
+ var _copyingBanksPoller = require("./copyingBanksPoller.js");
36
+
23
37
  var _quizCommon = require("@instructure/quiz-common");
38
+
24
39
  var _lodash = require("lodash");
40
+
25
41
  var _uuid = require("uuid");
42
+
26
43
  var banksApiEndpoint = '/api/banks';
27
44
  var DEFAULT_PAGE_SIZE = 100;
45
+
28
46
  var _fetchBanks = function _fetchBanks(dispatch) {
29
47
  var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
30
48
  var fetcher = new _PaginatedFetcher.default();
31
49
  return fetcher.get(banksApiEndpoint, params).then(function (_ref) {
32
50
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
33
- response = _ref2[0],
34
- pageData = _ref2[1];
51
+ response = _ref2[0],
52
+ pageData = _ref2[1];
53
+
35
54
  dispatch((0, _callHandlers.handleBanksResponse)(response));
36
55
  return pageData;
37
56
  });
38
57
  };
39
- var getBanks = exports.getBanks = function getBanks() {
58
+
59
+ var getBanks = function getBanks() {
40
60
  var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
41
61
  var usedByCourseEnabled = arguments.length > 1 ? arguments[1] : void 0;
42
62
  var getCourseAssignments = arguments.length > 2 ? arguments[2] : void 0;
@@ -54,7 +74,10 @@ var getBanks = exports.getBanks = function getBanks() {
54
74
  }
55
75
  };
56
76
  };
57
- var getAllBanks = exports.getAllBanks = function getAllBanks() {
77
+
78
+ exports.getBanks = getBanks;
79
+
80
+ var getAllBanks = function getAllBanks() {
58
81
  var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59
82
  return function (dispatch, getState) {
60
83
  var fetcher = new _ExhaustivePaginatedFetcher.default();
@@ -68,7 +91,10 @@ var getAllBanks = exports.getAllBanks = function getAllBanks() {
68
91
  });
69
92
  };
70
93
  };
71
- var getBank = exports.getBank = function getBank(bankId) {
94
+
95
+ exports.getAllBanks = getAllBanks;
96
+
97
+ var getBank = function getBank(bankId) {
72
98
  return function (dispatch, getState) {
73
99
  var fetcher = new _Fetcher.default({
74
100
  onError: (0, _helpers.handleError)(dispatch, (0, _formatMessage.default)('Failed to fetch bank.'))
@@ -78,13 +104,16 @@ var getBank = exports.getBank = function getBank(bankId) {
78
104
  }).catch(function (err) {
79
105
  if (err.response.status === 404) {
80
106
  dispatch((0, _ui.clear)(_quizCommon.BANKS_BANK_PAGINATION));
81
- }
82
- // Do nothing because this case is handled elsewhere.
107
+ } // Do nothing because this case is handled elsewhere.
83
108
  // This catch is to suppress an console error for "unhandled in promise".
109
+
84
110
  });
85
111
  };
86
112
  };
87
- var getSpecificBanks = exports.getSpecificBanks = function getSpecificBanks() {
113
+
114
+ exports.getBank = getBank;
115
+
116
+ var getSpecificBanks = function getSpecificBanks() {
88
117
  var bankIds = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
89
118
  return function (dispatch, getState) {
90
119
  var fetcher = new _Fetcher.default({
@@ -99,7 +128,10 @@ var getSpecificBanks = exports.getSpecificBanks = function getSpecificBanks() {
99
128
  });
100
129
  };
101
130
  };
102
- var createBank = exports.createBank = function createBank(newBank, shareWithCourseUuid) {
131
+
132
+ exports.getSpecificBanks = getSpecificBanks;
133
+
134
+ var createBank = function createBank(newBank, shareWithCourseUuid) {
103
135
  return function (dispatch, getState) {
104
136
  var newBankData = JSON.stringify({
105
137
  bank: {
@@ -112,15 +144,19 @@ var createBank = exports.createBank = function createBank(newBank, shareWithCour
112
144
  body: newBankData
113
145
  }).then(function (bankData) {
114
146
  dispatch([(0, _callHandlers.handleBankResponse)(bankData), (0, _ui.clear)(_quizCommon.BANKS_BANK_PAGINATION)]);
147
+
115
148
  if (shareWithCourseUuid) {
116
149
  simpleShareWithCourse(dispatch, bankData.id, shareWithCourseUuid);
117
150
  }
151
+
118
152
  return bankData;
119
153
  });
120
154
  };
121
- };
155
+ }; // not an action creator
156
+
157
+
158
+ exports.createBank = createBank;
122
159
 
123
- // not an action creator
124
160
  var simpleShareWithCourse = function simpleShareWithCourse(dispatch, bankId, courseUuid) {
125
161
  var url = "".concat(banksApiEndpoint, "/").concat(bankId, "/shared_banks");
126
162
  var shareBankData = JSON.stringify({
@@ -138,12 +174,14 @@ var simpleShareWithCourse = function simpleShareWithCourse(dispatch, bankId, cou
138
174
  body: shareBankData
139
175
  });
140
176
  };
177
+
141
178
  function getExistingBankAndEntries(bankId) {
142
179
  return function (dispatch, getState) {
143
180
  return dispatch([(0, _ui.clear)("".concat(_quizCommon.BANKS_BANK_ENTRY_PAGINATION, ":").concat(bankId)), getBank(bankId)]);
144
181
  };
145
182
  }
146
- var updateBank = exports.updateBank = function updateBank(bank) {
183
+
184
+ var updateBank = function updateBank(bank) {
147
185
  var clearPagination = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
148
186
  var url = "".concat(banksApiEndpoint, "/").concat(bank.id);
149
187
  return function (dispatch, getState) {
@@ -161,15 +199,20 @@ var updateBank = exports.updateBank = function updateBank(bank) {
161
199
  body: updatedBankData
162
200
  }).then(function (bankData) {
163
201
  var toDispatch = [(0, _callHandlers.handleBankResponse)(bankData)];
202
+
164
203
  if (clearPagination) {
165
204
  toDispatch.push((0, _ui.clear)(_quizCommon.BANKS_BANK_PAGINATION));
166
205
  }
206
+
167
207
  dispatch(toDispatch);
168
208
  return bankData;
169
209
  });
170
210
  };
171
211
  };
172
- var deleteBank = exports.deleteBank = function deleteBank(bankId) {
212
+
213
+ exports.updateBank = updateBank;
214
+
215
+ var deleteBank = function deleteBank(bankId) {
173
216
  (0, _copyingBanksPoller.removeFromPolling)([bankId]);
174
217
  var url = "".concat(banksApiEndpoint, "/").concat(bankId);
175
218
  return function (dispatch, getState) {
@@ -179,10 +222,13 @@ var deleteBank = exports.deleteBank = function deleteBank(bankId) {
179
222
  });
180
223
  return fetcher.delete(url).then(function () {
181
224
  dispatch((0, _ui.clear)(_quizCommon.BANKS_BANK_PAGINATION));
225
+
182
226
  if (getState().getIn(['ui', 'activeBankId']) === bankId) {
183
227
  dispatch([(0, _ui.newActiveBankEntry)(void 0), (0, _ui.newActiveBank)(void 0)]);
184
228
  }
229
+
185
230
  var activeQuizId = getState().getIn(['quizzes', 'activeQuizId'], false);
231
+
186
232
  if (activeQuizId) {
187
233
  dispatch((0, _banks.archiveBank)(bankId));
188
234
  getState().get('bankEntries', []).forEach(function (bankEntry) {
@@ -194,7 +240,10 @@ var deleteBank = exports.deleteBank = function deleteBank(bankId) {
194
240
  });
195
241
  };
196
242
  };
197
- var shareBank = exports.shareBank = function shareBank(_shareBank) {
243
+
244
+ exports.deleteBank = deleteBank;
245
+
246
+ var shareBank = function shareBank(_shareBank) {
198
247
  var getUserInfo = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _lodash.noop;
199
248
  var url = "".concat(banksApiEndpoint, "/").concat(_shareBank.bankId, "/shared_banks");
200
249
  return function (dispatch, getState) {
@@ -239,7 +288,10 @@ var shareBank = exports.shareBank = function shareBank(_shareBank) {
239
288
  });
240
289
  };
241
290
  };
242
- var getSharedBank = exports.getSharedBank = function getSharedBank(bankId, entityType, entityId) {
291
+
292
+ exports.shareBank = shareBank;
293
+
294
+ var getSharedBank = function getSharedBank(bankId, entityType, entityId) {
243
295
  var url = "".concat(banksApiEndpoint, "/").concat(bankId, "/shared_banks");
244
296
  var params = {
245
297
  entity_type: entityType,
@@ -261,6 +313,7 @@ var getSharedBank = exports.getSharedBank = function getSharedBank(bankId, entit
261
313
  };
262
314
  sharedBankInfo.push(placeholder);
263
315
  }
316
+
264
317
  dispatch((0, _callHandlers.handleShareBanksResponse)(sharedBankInfo));
265
318
  }).catch(function (err) {
266
319
  if (err.response.status === 401) {
@@ -270,7 +323,10 @@ var getSharedBank = exports.getSharedBank = function getSharedBank(bankId, entit
270
323
  });
271
324
  };
272
325
  };
273
- var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getUserInfo, getCourseInfo, getAccountInfo) {
326
+
327
+ exports.getSharedBank = getSharedBank;
328
+
329
+ var getSharedBanks = function getSharedBanks(bank, getUserInfo, getCourseInfo, getAccountInfo) {
274
330
  var url = "".concat(banksApiEndpoint, "/").concat(bank.id, "/shared_banks");
275
331
  return function (dispatch, getState) {
276
332
  var fetcher = new _Fetcher.default({
@@ -286,9 +342,9 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
286
342
  permission: _quizCommon.CAN_EDIT,
287
343
  bank_id: bank.id
288
344
  });
289
- }
345
+ } // USERS
346
+
290
347
 
291
- // USERS
292
348
  var userSharedBanks = [];
293
349
  var userUuids = sharedBanksInfo.filter(function (sb) {
294
350
  return sb.entity_type === _quizCommon.SHARED_WITH_USER;
@@ -300,6 +356,7 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
300
356
  var sharedBankInfo = sharedBanksInfo.find(function (sb) {
301
357
  return sb.entity_type === _quizCommon.SHARED_WITH_USER && sb.entity_id === userInfo.uuid;
302
358
  });
359
+
303
360
  if (sharedBankInfo) {
304
361
  userSharedBanks.push({
305
362
  id: sharedBankInfo.id,
@@ -313,9 +370,8 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
313
370
  }
314
371
  });
315
372
  dispatch((0, _callHandlers.handleShareBanksResponse)(userSharedBanks));
316
- });
373
+ }); // COURSES
317
374
 
318
- // COURSES
319
375
  var courseSharedBanks = [];
320
376
  var courseUuids = sharedBanksInfo.filter(function (sb) {
321
377
  return sb.entity_type === _quizCommon.SHARED_WITH_COURSE;
@@ -327,6 +383,7 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
327
383
  var sharedBankInfo = sharedBanksInfo.find(function (sb) {
328
384
  return sb.entity_type === _quizCommon.SHARED_WITH_COURSE && sb.entity_id === courseInfo.uuid;
329
385
  });
386
+
330
387
  if (sharedBankInfo) {
331
388
  courseSharedBanks.push({
332
389
  id: sharedBankInfo.id,
@@ -339,9 +396,8 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
339
396
  }
340
397
  });
341
398
  dispatch((0, _callHandlers.handleShareBanksResponse)(courseSharedBanks));
342
- });
399
+ }); // ACCOUNTS
343
400
 
344
- // ACCOUNTS
345
401
  var accountSharedBanks = [];
346
402
  var accountUuids = sharedBanksInfo.filter(function (sb) {
347
403
  return sb.entity_type === _quizCommon.SHARED_WITH_ACCOUNT;
@@ -353,6 +409,7 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
353
409
  var sharedBankInfo = sharedBanksInfo.find(function (sb) {
354
410
  return sb.entity_type === _quizCommon.SHARED_WITH_ACCOUNT && sb.entity_id === accountInfo.uuid;
355
411
  });
412
+
356
413
  if (sharedBankInfo) {
357
414
  accountSharedBanks.push({
358
415
  id: sharedBankInfo.id,
@@ -369,7 +426,10 @@ var getSharedBanks = exports.getSharedBanks = function getSharedBanks(bank, getU
369
426
  });
370
427
  };
371
428
  };
372
- var updateSharedBankPermission = exports.updateSharedBankPermission = function updateSharedBankPermission(bankId, sharedBankId, permission) {
429
+
430
+ exports.getSharedBanks = getSharedBanks;
431
+
432
+ var updateSharedBankPermission = function updateSharedBankPermission(bankId, sharedBankId, permission) {
373
433
  var url = "".concat(banksApiEndpoint, "/").concat(bankId, "/shared_banks/").concat(sharedBankId);
374
434
  return function (dispatch, getState) {
375
435
  var shareBankData = JSON.stringify({
@@ -391,7 +451,10 @@ var updateSharedBankPermission = exports.updateSharedBankPermission = function u
391
451
  });
392
452
  };
393
453
  };
394
- var createBankCloneJob = exports.createBankCloneJob = function createBankCloneJob(bankId) {
454
+
455
+ exports.updateSharedBankPermission = updateSharedBankPermission;
456
+
457
+ var createBankCloneJob = function createBankCloneJob(bankId) {
395
458
  var userId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _uuid.NIL;
396
459
  var url = "".concat(banksApiEndpoint, "/").concat(bankId, "/bank_clone_jobs");
397
460
  return function (dispatch, getState) {
@@ -407,4 +470,6 @@ var createBankCloneJob = exports.createBankCloneJob = function createBankCloneJo
407
470
  body: field_overrides
408
471
  });
409
472
  };
410
- };
473
+ };
474
+
475
+ exports.createBankCloneJob = createBankCloneJob;
@@ -1,94 +1,117 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.removeFromPolling = exports.addToPolling = void 0;
8
- var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
9
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
+
10
14
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
11
- var _alerts = require("../../common/actions/alerts");
12
- var _banks = require("./banks");
15
+
16
+ var _alerts = require("../../common/actions/alerts.js");
17
+
18
+ var _banks = require("./banks.js");
19
+
13
20
  var pollingBanks = [];
14
21
  var currentlyPolling = false;
15
- var addToPolling = exports.addToPolling = function addToPolling(bankId, bankTitle) {
22
+
23
+ var addToPolling = function addToPolling(bankId, bankTitle) {
16
24
  var getSpecificBanksFn = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _banks.getSpecificBanks;
17
25
  return function (dispatch) {
18
26
  pollingBanks.push({
19
27
  id: bankId,
20
28
  title: bankTitle
21
29
  });
30
+
22
31
  if (!currentlyPolling) {
23
32
  currentlyPolling = true;
24
- _handlePollingBanks(dispatch, getSpecificBanksFn);
33
+ handlePollingBanks(dispatch, getSpecificBanksFn);
25
34
  }
26
35
  };
27
36
  };
28
- var removeFromPolling = exports.removeFromPolling = function removeFromPolling(removeIds) {
37
+
38
+ exports.addToPolling = addToPolling;
39
+
40
+ var removeFromPolling = function removeFromPolling(removeIds) {
29
41
  pollingBanks = pollingBanks.filter(function (bank) {
30
42
  return !removeIds.includes(bank.id);
31
43
  });
32
44
  };
33
- var _handlePollingBanks = /*#__PURE__*/function () {
34
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(dispatch) {
45
+
46
+ exports.removeFromPolling = removeFromPolling;
47
+
48
+ var handlePollingBanks = /*#__PURE__*/function () {
49
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(dispatch) {
35
50
  var getSpecificBanksFn,
36
- updatedPollingBanks,
37
- updatedPollingBankIds,
38
- finishedCopying,
39
- finishedCopyingIds,
40
- _args = arguments;
41
- return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
42
- while (1) switch (_context.prev = _context.next) {
43
- case 0:
44
- getSpecificBanksFn = _args.length > 1 && _args[1] !== void 0 ? _args[1] : _banks.getSpecificBanks;
45
- _context.next = 3;
46
- return getSpecificBanksFn(pollingBanks.map(function (bank) {
47
- return bank.id;
48
- }))(dispatch);
49
- case 3:
50
- updatedPollingBanks = _context.sent;
51
- updatedPollingBankIds = updatedPollingBanks.map(function (updatedBank) {
52
- return updatedBank.id;
53
- }); // banks that now have status 'waiting' have finished successfully
54
- // banks that are no longer in the updated list but were in the previous list have
55
- // failed to copy and therefore were archived
56
- finishedCopying = updatedPollingBanks.filter(function (bank) {
57
- return bank.status === 'waiting';
58
- }).concat(pollingBanks.filter(function (prevBank) {
59
- return !updatedPollingBankIds.includes(prevBank.id);
60
- }));
61
- finishedCopying.forEach(function (bank) {
62
- var bankInfo = updatedPollingBanks.find(function (info) {
63
- return info.id == bank.id;
51
+ updatedPollingBanks,
52
+ updatedPollingBankIds,
53
+ finishedCopying,
54
+ finishedCopyingIds,
55
+ _args = arguments;
56
+ return _regenerator.default.wrap(function _callee$(_context) {
57
+ while (1) {
58
+ switch (_context.prev = _context.next) {
59
+ case 0:
60
+ getSpecificBanksFn = _args.length > 1 && _args[1] !== void 0 ? _args[1] : _banks.getSpecificBanks;
61
+ _context.next = 3;
62
+ return getSpecificBanksFn(pollingBanks.map(function (bank) {
63
+ return bank.id;
64
+ }))(dispatch);
65
+
66
+ case 3:
67
+ updatedPollingBanks = _context.sent;
68
+ updatedPollingBankIds = updatedPollingBanks.map(function (updatedBank) {
69
+ return updatedBank.id;
70
+ }); // banks that now have status 'waiting' have finished successfully
71
+ // banks that are no longer in the updated list but were in the previous list have
72
+ // failed to copy and therefore were archived
73
+
74
+ finishedCopying = updatedPollingBanks.filter(function (bank) {
75
+ return bank.status === 'waiting';
76
+ }).concat(pollingBanks.filter(function (prevBank) {
77
+ return !updatedPollingBankIds.includes(prevBank.id);
78
+ }));
79
+ finishedCopying.forEach(function (bank) {
80
+ var bankInfo = updatedPollingBanks.find(function (info) {
81
+ return info.id == bank.id;
82
+ });
83
+
84
+ if ((bankInfo === null || bankInfo === void 0 ? void 0 : bankInfo.status) === 'waiting') {
85
+ dispatch((0, _alerts.addSuccess)((0, _formatMessage.default)('Created "{name}" successfully! Duplicate can be seen in \'Shared with Me\' filter.', {
86
+ name: bank.title
87
+ })));
88
+ } else if (!bankInfo) {
89
+ dispatch((0, _alerts.addError)((0, _formatMessage.default)('Failed to create "{name}". Please try again.', {
90
+ name: bank.title
91
+ })));
92
+ }
93
+ });
94
+ finishedCopyingIds = finishedCopying.map(function (bank) {
95
+ return bank.id;
64
96
  });
65
- if ((bankInfo === null || bankInfo === void 0 ? void 0 : bankInfo.status) === 'waiting') {
66
- dispatch((0, _alerts.addSuccess)((0, _formatMessage.default)('Created "{name}" successfully! Duplicate can be seen in \'Shared with Me\' filter.', {
67
- name: bank.title
68
- })));
69
- } else if (!bankInfo) {
70
- dispatch((0, _alerts.addError)((0, _formatMessage.default)('Failed to create "{name}". Please try again.', {
71
- name: bank.title
72
- })));
97
+ removeFromPolling(finishedCopyingIds);
98
+
99
+ if (pollingBanks.length > 0) {
100
+ setTimeout(function () {
101
+ handlePollingBanks(dispatch);
102
+ }, 3000);
103
+ } else {
104
+ currentlyPolling = false;
73
105
  }
74
- });
75
- finishedCopyingIds = finishedCopying.map(function (bank) {
76
- return bank.id;
77
- });
78
- removeFromPolling(finishedCopyingIds);
79
- if (pollingBanks.length > 0) {
80
- setTimeout(function () {
81
- _handlePollingBanks(dispatch);
82
- }, 3000);
83
- } else {
84
- currentlyPolling = false;
85
- }
86
- case 10:
87
- case "end":
88
- return _context.stop();
106
+
107
+ case 10:
108
+ case "end":
109
+ return _context.stop();
110
+ }
89
111
  }
90
112
  }, _callee);
91
113
  }));
114
+
92
115
  return function handlePollingBanks(_x) {
93
116
  return _ref.apply(this, arguments);
94
117
  };
@@ -1,18 +1,27 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
- exports.getTagSuggestions = exports.deleteTagAssociations = exports.createTagAssociations = void 0;
8
- var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
8
+ exports.deleteTagAssociations = exports.createTagAssociations = exports.getTagSuggestions = void 0;
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
9
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
- var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher"));
11
- var _helpers = require("../../common/api/helpers");
12
- var _tagAssociations = require("../../common/actions/tagAssociations");
13
+
14
+ var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher.js"));
15
+
16
+ var _helpers = require("../../common/api/helpers.js");
17
+
18
+ var _tagAssociations = require("../../common/actions/tagAssociations.js");
19
+
13
20
  var _quizCommon = require("@instructure/quiz-common");
21
+
14
22
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
15
- var getTagSuggestions = exports.getTagSuggestions = function getTagSuggestions(entryType, entryId, text) {
23
+
24
+ var getTagSuggestions = function getTagSuggestions(entryType, entryId, text) {
16
25
  return function (dispatch, getState) {
17
26
  var url = '/api/tags';
18
27
  var urlParams = {
@@ -27,6 +36,9 @@ var getTagSuggestions = exports.getTagSuggestions = function getTagSuggestions(e
27
36
  });
28
37
  };
29
38
  };
39
+
40
+ exports.getTagSuggestions = getTagSuggestions;
41
+
30
42
  var createTagAssociation = function createTagAssociation(dispatch, bankEntryId, entityType, entityId, tagValue) {
31
43
  var url = "/api/bank_entries/".concat(bankEntryId, "/tag_associations");
32
44
  var fetcher = new _Fetcher.default({
@@ -41,29 +53,38 @@ var createTagAssociation = function createTagAssociation(dispatch, bankEntryId,
41
53
  return dispatch((0, _tagAssociations.addTagAssociation)(entityType, entityId, tagAssociation));
42
54
  });
43
55
  };
44
- var createTagAssociations = exports.createTagAssociations = function createTagAssociations(bankEntryId, entityType, entityId, tagValues) {
56
+
57
+ var createTagAssociations = function createTagAssociations(bankEntryId, entityType, entityId, tagValues) {
45
58
  return function (dispatch, getState) {
46
59
  return Promise.all(tagValues.map( /*#__PURE__*/function () {
47
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(tagValue) {
48
- return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
49
- while (1) switch (_context.prev = _context.next) {
50
- case 0:
51
- _context.next = 2;
52
- return createTagAssociation(dispatch, bankEntryId, entityType, entityId, tagValue);
53
- case 2:
54
- return _context.abrupt("return", dispatch((0, _tagAssociations.removePendingAdditionTagAssociation)(entityType, entityId, tagValue)));
55
- case 3:
56
- case "end":
57
- return _context.stop();
60
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(tagValue) {
61
+ return _regenerator.default.wrap(function _callee$(_context) {
62
+ while (1) {
63
+ switch (_context.prev = _context.next) {
64
+ case 0:
65
+ _context.next = 2;
66
+ return createTagAssociation(dispatch, bankEntryId, entityType, entityId, tagValue);
67
+
68
+ case 2:
69
+ return _context.abrupt("return", dispatch((0, _tagAssociations.removePendingAdditionTagAssociation)(entityType, entityId, tagValue)));
70
+
71
+ case 3:
72
+ case "end":
73
+ return _context.stop();
74
+ }
58
75
  }
59
76
  }, _callee);
60
77
  }));
78
+
61
79
  return function (_x) {
62
80
  return _ref.apply(this, arguments);
63
81
  };
64
82
  }()));
65
83
  };
66
84
  };
85
+
86
+ exports.createTagAssociations = createTagAssociations;
87
+
67
88
  var deleteTagAssociation = function deleteTagAssociation(dispatch, bankEntryId, entityType, entityId, tagAssociationId) {
68
89
  var url = "/api/bank_entries/".concat(bankEntryId, "/tag_associations/").concat(tagAssociationId);
69
90
  var fetcher = new _Fetcher.default({
@@ -74,26 +95,34 @@ var deleteTagAssociation = function deleteTagAssociation(dispatch, bankEntryId,
74
95
  return dispatch([(0, _tagAssociations.removeTagAssociation)(entityType, entityId, tagAssociationId)]);
75
96
  });
76
97
  };
77
- var deleteTagAssociations = exports.deleteTagAssociations = function deleteTagAssociations(bankEntryId, entityType, entityId, tagAssociationIds) {
98
+
99
+ var deleteTagAssociations = function deleteTagAssociations(bankEntryId, entityType, entityId, tagAssociationIds) {
78
100
  return function (dispatch, getState) {
79
101
  return Promise.all(tagAssociationIds.map( /*#__PURE__*/function () {
80
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(tagAssociationId) {
81
- return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
82
- while (1) switch (_context2.prev = _context2.next) {
83
- case 0:
84
- _context2.next = 2;
85
- return deleteTagAssociation(dispatch, bankEntryId, entityType, entityId, tagAssociationId);
86
- case 2:
87
- return _context2.abrupt("return", dispatch((0, _tagAssociations.removePendingDeletionTagAssociation)(entityType, entityId, tagAssociationId)));
88
- case 3:
89
- case "end":
90
- return _context2.stop();
102
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(tagAssociationId) {
103
+ return _regenerator.default.wrap(function _callee2$(_context2) {
104
+ while (1) {
105
+ switch (_context2.prev = _context2.next) {
106
+ case 0:
107
+ _context2.next = 2;
108
+ return deleteTagAssociation(dispatch, bankEntryId, entityType, entityId, tagAssociationId);
109
+
110
+ case 2:
111
+ return _context2.abrupt("return", dispatch((0, _tagAssociations.removePendingDeletionTagAssociation)(entityType, entityId, tagAssociationId)));
112
+
113
+ case 3:
114
+ case "end":
115
+ return _context2.stop();
116
+ }
91
117
  }
92
118
  }, _callee2);
93
119
  }));
120
+
94
121
  return function (_x2) {
95
122
  return _ref2.apply(this, arguments);
96
123
  };
97
124
  }()));
98
125
  };
99
- };
126
+ };
127
+
128
+ exports.deleteTagAssociations = deleteTagAssociations;