@clickview/lite 0.0.24-rc.4 → 0.0.24-rc.5

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 (464) hide show
  1. package/dist/css/4.chunk.css +3 -3
  2. package/dist/en.json +1 -1
  3. package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +1 -2
  4. package/dist/libs/common/src/react/utils/TextHelper.d.ts +1 -2
  5. package/dist/libs/shared/src/components/curriculum-links/CurriculumLinks.d.ts +9 -0
  6. package/dist/libs/shared/src/enums/CurriculumType.d.ts +6 -0
  7. package/dist/libs/shared/src/flight-requests/ClassificationRequests.d.ts +1 -0
  8. package/dist/libs/shared/src/interfaces/models/Curriculum.d.ts +14 -0
  9. package/dist/libs/shared/src/interfaces/models/index.d.ts +1 -0
  10. package/dist/projects/lite/src/app.d.ts +1 -0
  11. package/dist/projects/lite/src/shared/components/play-page/PlayPage.d.ts +2 -1
  12. package/dist/projects/lite/src/shared/components/synopsis/Synopsis.d.ts +3 -1
  13. package/dist/projects/lite/src/shared/components/video-details/VideoDetails.d.ts +2 -0
  14. package/dist/projects/lite/src/shared/constants/MinimumGlanceHeight.d.ts +1 -0
  15. package/dist/scripts/{0-702db3d74c.chunk.js → 0-0e5b8c97da.chunk.js} +1 -1
  16. package/dist/scripts/{1-fcddc988fa.chunk.js → 1-4f19a5caea.chunk.js} +3 -3
  17. package/dist/scripts/{11-6e7f935551.chunk.js → 11-c6f3f1495e.chunk.js} +1 -1
  18. package/dist/scripts/{13-95937e4149.chunk.js → 12-e75a157856.chunk.js} +1 -1
  19. package/dist/scripts/{13-4245983c0a.chunk.js → 13-9fa696f312.chunk.js} +1 -1
  20. package/dist/scripts/{14-62608fc1de.chunk.js → 14-be9f036f4f.chunk.js} +1 -1
  21. package/dist/scripts/{15-379cb5f586.chunk.js → 15-955489324a.chunk.js} +1 -1
  22. package/dist/scripts/{16-00e83a6d12.chunk.js → 16-fbcfe9b88a.chunk.js} +1 -1
  23. package/dist/scripts/{17-c62d5aa7f2.chunk.js → 17-891a386483.chunk.js} +1 -1
  24. package/dist/scripts/18-8c73b7d99b.chunk.js +1 -0
  25. package/dist/scripts/{19-d394ae9543.chunk.js → 19-7fa88b10ad.chunk.js} +1 -1
  26. package/dist/scripts/{2-6aad743aee.chunk.js → 2-24cf1c2b8f.chunk.js} +1 -1
  27. package/dist/scripts/{20-e20c4c0645.chunk.js → 20-01ffebd514.chunk.js} +1 -1
  28. package/dist/scripts/{21-8b195ab041.chunk.js → 21-c0d8b510a7.chunk.js} +1 -1
  29. package/dist/scripts/{22-8a60335dfb.chunk.js → 22-5559cfd4b9.chunk.js} +1 -1
  30. package/dist/scripts/23-9ee2ed9cd4.chunk.js +1 -0
  31. package/dist/scripts/{24-7924828128.chunk.js → 24-4160a65b1e.chunk.js} +1 -1
  32. package/dist/scripts/{25-93218e513e.chunk.js → 25-c9d38b5363.chunk.js} +1 -1
  33. package/dist/scripts/{26-a4a0b97207.chunk.js → 26-3ce3cfcc52.chunk.js} +1 -1
  34. package/dist/scripts/{27-35820f00f1.chunk.js → 27-406581ece9.chunk.js} +1 -1
  35. package/dist/scripts/{28-22cbd36128.chunk.js → 28-fc3b956c1b.chunk.js} +1 -1
  36. package/dist/scripts/{29-d6f6b32986.chunk.js → 29-88ce0ae05b.chunk.js} +1 -1
  37. package/dist/scripts/{3-02219d10d4.chunk.js → 3-4eb18353bb.chunk.js} +2 -2
  38. package/dist/scripts/30-610acec595.chunk.js +1 -0
  39. package/dist/scripts/{31-1307509953.chunk.js → 31-e912953920.chunk.js} +1 -1
  40. package/dist/scripts/{32-8ec5bb19f5.chunk.js → 32-ee11faab9b.chunk.js} +1 -1
  41. package/dist/scripts/{33-8740c874b3.chunk.js → 33-26cc3cdaeb.chunk.js} +1 -1
  42. package/dist/scripts/{34-81e4464339.chunk.js → 34-7ebb43ddc8.chunk.js} +1 -1
  43. package/dist/scripts/{35-0ff2658139.chunk.js → 35-17ca18b5d1.chunk.js} +1 -1
  44. package/dist/scripts/36-e9d8de4a2d.chunk.js +1 -0
  45. package/dist/scripts/{37-10fe5a06a5.chunk.js → 37-a7cba803bb.chunk.js} +1 -1
  46. package/dist/scripts/{38-31744f9ae7.chunk.js → 38-b2cc6a93f5.chunk.js} +1 -1
  47. package/dist/scripts/{39-4b26fafe13.chunk.js → 39-7f84929f98.chunk.js} +1 -1
  48. package/dist/scripts/4-b2cb65391a.chunk.js +1 -0
  49. package/dist/scripts/{40-fa1b51a3e0.chunk.js → 40-9f70a53d97.chunk.js} +1 -1
  50. package/dist/scripts/{41-2e358dbf59.chunk.js → 41-e706064472.chunk.js} +1 -1
  51. package/dist/scripts/{42-680fb45a87.chunk.js → 42-c258fa97ee.chunk.js} +1 -1
  52. package/dist/scripts/{43-cb8bdb3d8f.chunk.js → 43-c1bdce377d.chunk.js} +1 -1
  53. package/dist/scripts/44-a91444ce28.chunk.js +1 -0
  54. package/dist/scripts/45-1d0659f37e.chunk.js +1 -0
  55. package/dist/scripts/{46-273127f163.chunk.js → 46-426c9485e1.chunk.js} +1 -1
  56. package/dist/scripts/{47-c4c6264df4.chunk.js → 47-9bbb498c46.chunk.js} +1 -1
  57. package/dist/scripts/{48-54817c0e78.chunk.js → 48-9edb995a3f.chunk.js} +1 -1
  58. package/dist/scripts/{49-0826d62735.chunk.js → 49-5df5a269f0.chunk.js} +1 -1
  59. package/dist/scripts/{5-52c2070b12.chunk.js → 5-a1283a9cb4.chunk.js} +1 -1
  60. package/dist/scripts/{50-e94493066c.chunk.js → 50-7164dd3966.chunk.js} +1 -1
  61. package/dist/scripts/{51-907ccc689c.chunk.js → 51-93a336058b.chunk.js} +1 -1
  62. package/dist/scripts/{52-dd5dd9f7f7.chunk.js → 52-1b6f0b1a8a.chunk.js} +1 -1
  63. package/dist/scripts/{53-b24c780288.chunk.js → 53-f555732892.chunk.js} +1 -1
  64. package/dist/scripts/{54-603f252394.chunk.js → 54-2fbaa17038.chunk.js} +1 -1
  65. package/dist/scripts/{55-eea39b3205.chunk.js → 55-cbbe48a07d.chunk.js} +1 -1
  66. package/dist/scripts/{56-20237748ba.chunk.js → 56-dd9c322af2.chunk.js} +1 -1
  67. package/dist/scripts/{57-dfacc1ad90.chunk.js → 57-cb2aa6435f.chunk.js} +1 -1
  68. package/dist/scripts/{58-bb756b517d.chunk.js → 58-670fdd6cb0.chunk.js} +1 -1
  69. package/dist/scripts/{59-18ef4c5afb.chunk.js → 59-d6f2652c76.chunk.js} +1 -1
  70. package/dist/scripts/{6-0a53c42432.chunk.js → 6-f84bd82a30.chunk.js} +1 -1
  71. package/dist/scripts/{60-81ac7ce262.chunk.js → 60-cef13e0035.chunk.js} +1 -1
  72. package/dist/scripts/{61-41c8cb7e0f.chunk.js → 61-6ff0431833.chunk.js} +1 -1
  73. package/dist/scripts/{62-94874205ae.chunk.js → 62-2d3c8592f0.chunk.js} +1 -1
  74. package/dist/scripts/{63-d423dd59f5.chunk.js → 63-ac70e80473.chunk.js} +1 -1
  75. package/dist/scripts/{64-d280e018c4.chunk.js → 64-a7b7a52e1a.chunk.js} +1 -1
  76. package/dist/scripts/{65-f94e7ab2ef.chunk.js → 65-4c4a640570.chunk.js} +1 -1
  77. package/dist/scripts/{66-faeadaa25e.chunk.js → 66-4a8bbcd5da.chunk.js} +1 -1
  78. package/dist/scripts/{66-dc4b036321.chunk.js → 67-2e0d661c52.chunk.js} +1 -1
  79. package/dist/scripts/{7-096f5703bd.chunk.js → 7-4ed6ab081c.chunk.js} +1 -1
  80. package/dist/scripts/8-3a52d29637.chunk.js +1 -0
  81. package/dist/scripts/{bundle-fef50e5bb9.min.js → bundle-526e70a595.min.js} +3 -3
  82. package/dist/scripts/bundles.json +2 -2
  83. package/dist/scripts/polyfills-46d3c7a509.min.js +1 -0
  84. package/package.json +2 -2
  85. package/dist/css/0.chunk.css.map +0 -1
  86. package/dist/css/1.chunk.css +0 -223
  87. package/dist/css/1.chunk.css.map +0 -1
  88. package/dist/css/10.chunk.css +0 -106
  89. package/dist/css/10.chunk.css.map +0 -1
  90. package/dist/css/11.chunk.css.map +0 -1
  91. package/dist/css/12.chunk.css.map +0 -1
  92. package/dist/css/13.chunk.css.map +0 -1
  93. package/dist/css/14.chunk.css.map +0 -1
  94. package/dist/css/15.chunk.css.map +0 -1
  95. package/dist/css/16.chunk.css.map +0 -1
  96. package/dist/css/17.chunk.css.map +0 -1
  97. package/dist/css/18.chunk.css.map +0 -1
  98. package/dist/css/19.chunk.css.map +0 -1
  99. package/dist/css/2.chunk.css.map +0 -1
  100. package/dist/css/20.chunk.css.map +0 -1
  101. package/dist/css/21.chunk.css.map +0 -1
  102. package/dist/css/22.chunk.css.map +0 -1
  103. package/dist/css/23.chunk.css.map +0 -1
  104. package/dist/css/24.chunk.css.map +0 -1
  105. package/dist/css/25.chunk.css.map +0 -1
  106. package/dist/css/26.chunk.css.map +0 -1
  107. package/dist/css/27.chunk.css.map +0 -1
  108. package/dist/css/28.chunk.css.map +0 -1
  109. package/dist/css/29.chunk.css.map +0 -1
  110. package/dist/css/3.chunk.css.map +0 -1
  111. package/dist/css/30.chunk.css.map +0 -1
  112. package/dist/css/31.chunk.css.map +0 -1
  113. package/dist/css/32.chunk.css.map +0 -1
  114. package/dist/css/33.chunk.css.map +0 -1
  115. package/dist/css/34.chunk.css.map +0 -1
  116. package/dist/css/35.chunk.css.map +0 -1
  117. package/dist/css/36.chunk.css.map +0 -1
  118. package/dist/css/37.chunk.css.map +0 -1
  119. package/dist/css/38.chunk.css +0 -40
  120. package/dist/css/38.chunk.css.map +0 -1
  121. package/dist/css/39.chunk.css +0 -6
  122. package/dist/css/39.chunk.css.map +0 -1
  123. package/dist/css/4.chunk.css.map +0 -1
  124. package/dist/css/40.chunk.css +0 -6
  125. package/dist/css/40.chunk.css.map +0 -1
  126. package/dist/css/41.chunk.css +0 -40
  127. package/dist/css/41.chunk.css.map +0 -1
  128. package/dist/css/42.chunk.css +0 -14
  129. package/dist/css/42.chunk.css.map +0 -1
  130. package/dist/css/43.chunk.css +0 -38
  131. package/dist/css/43.chunk.css.map +0 -1
  132. package/dist/css/44.chunk.css +0 -6
  133. package/dist/css/44.chunk.css.map +0 -1
  134. package/dist/css/46.chunk.css +0 -52
  135. package/dist/css/46.chunk.css.map +0 -1
  136. package/dist/css/5.chunk.css.map +0 -1
  137. package/dist/css/50.chunk.css +0 -52
  138. package/dist/css/50.chunk.css.map +0 -1
  139. package/dist/css/53.chunk.css.map +0 -1
  140. package/dist/css/54.chunk.css.map +0 -1
  141. package/dist/css/55.chunk.css.map +0 -1
  142. package/dist/css/56.chunk.css +0 -14
  143. package/dist/css/56.chunk.css.map +0 -1
  144. package/dist/css/57.chunk.css +0 -14
  145. package/dist/css/57.chunk.css.map +0 -1
  146. package/dist/css/58.chunk.css +0 -43
  147. package/dist/css/58.chunk.css.map +0 -1
  148. package/dist/css/6.chunk.css.map +0 -1
  149. package/dist/css/7.chunk.css +0 -94
  150. package/dist/css/7.chunk.css.map +0 -1
  151. package/dist/css/79.chunk.css +0 -58
  152. package/dist/css/79.chunk.css.map +0 -1
  153. package/dist/css/8.chunk.css +0 -54
  154. package/dist/css/8.chunk.css.map +0 -1
  155. package/dist/css/82.chunk.css +0 -28
  156. package/dist/css/82.chunk.css.map +0 -1
  157. package/dist/css/83.chunk.css +0 -11
  158. package/dist/css/83.chunk.css.map +0 -1
  159. package/dist/css/84.chunk.css +0 -152
  160. package/dist/css/84.chunk.css.map +0 -1
  161. package/dist/css/85.chunk.css +0 -21
  162. package/dist/css/85.chunk.css.map +0 -1
  163. package/dist/css/86.chunk.css +0 -17
  164. package/dist/css/86.chunk.css.map +0 -1
  165. package/dist/css/87.chunk.css +0 -21
  166. package/dist/css/87.chunk.css.map +0 -1
  167. package/dist/css/88.chunk.css +0 -5
  168. package/dist/css/88.chunk.css.map +0 -1
  169. package/dist/css/90.chunk.css +0 -38
  170. package/dist/css/90.chunk.css.map +0 -1
  171. package/dist/css/lite-app.css.map +0 -1
  172. package/dist/libs/shared/src/components/file-select-button/FileSelectButton.d.ts +0 -15
  173. package/dist/libs/shared/src/components/thumbnails/video/VideoThumbnailWatchProgressBar.d.ts +0 -8
  174. package/dist/libs/shared/src/components/video-list/components/video-item-badges/VideoItemBadges.d.ts +0 -7
  175. package/dist/libs/shared/src/components/video-list/components/video-item-description/UseTruncateText.d.ts +0 -9
  176. package/dist/libs/shared/src/enums/MasterObjectTypes.d.ts +0 -8
  177. package/dist/libs/shared/src/hooks/useGetCollectionItems.d.ts +0 -7
  178. package/dist/projects/lite/src/apps/upload/views/my-uploads/DismissibleAlert.d.ts +0 -2
  179. package/dist/projects/lite/src/apps/upload/views/my-uploads/MyUploadsView.d.ts +0 -6
  180. package/dist/projects/lite/src/shared/components/clips/ClipItem.d.ts +0 -8
  181. package/dist/projects/lite/src/shared/components/clips/Clips.d.ts +0 -7
  182. package/dist/projects/lite/src/shared/components/interactives/InteractiveItem.d.ts +0 -7
  183. package/dist/projects/lite/src/shared/components/interactives/Interactives.d.ts +0 -7
  184. package/dist/projects/lite/src/shared/components/play-page/Buttons.d.ts +0 -7
  185. package/dist/scripts/0-bf0af5f75c.chunk.js +0 -1
  186. package/dist/scripts/0.chunk.js +0 -355
  187. package/dist/scripts/0.chunk.js.map +0 -1
  188. package/dist/scripts/1-d1ce3fe6e8.chunk.js +0 -17
  189. package/dist/scripts/1.chunk.js +0 -1031
  190. package/dist/scripts/1.chunk.js.map +0 -1
  191. package/dist/scripts/10.chunk.js +0 -1338
  192. package/dist/scripts/10.chunk.js.map +0 -1
  193. package/dist/scripts/11.chunk.js +0 -1544
  194. package/dist/scripts/11.chunk.js.map +0 -1
  195. package/dist/scripts/12-7e1380d9fa.chunk.js +0 -1
  196. package/dist/scripts/12-fa7004b555.chunk.js +0 -1
  197. package/dist/scripts/12.chunk.js +0 -445
  198. package/dist/scripts/12.chunk.js.map +0 -1
  199. package/dist/scripts/13.chunk.js +0 -502
  200. package/dist/scripts/13.chunk.js.map +0 -1
  201. package/dist/scripts/14-eba60049a5.chunk.js +0 -1
  202. package/dist/scripts/14.chunk.js +0 -469
  203. package/dist/scripts/14.chunk.js.map +0 -1
  204. package/dist/scripts/15-d811a90e8d.chunk.js +0 -1
  205. package/dist/scripts/15.chunk.js +0 -356
  206. package/dist/scripts/15.chunk.js.map +0 -1
  207. package/dist/scripts/16-885363ce46.chunk.js +0 -1
  208. package/dist/scripts/16.chunk.js +0 -537
  209. package/dist/scripts/16.chunk.js.map +0 -1
  210. package/dist/scripts/17-6d597b8323.chunk.js +0 -1
  211. package/dist/scripts/17.chunk.js +0 -230
  212. package/dist/scripts/17.chunk.js.map +0 -1
  213. package/dist/scripts/18-5affadddcc.chunk.js +0 -1
  214. package/dist/scripts/18-69049350eb.chunk.js +0 -1
  215. package/dist/scripts/18.chunk.js +0 -273
  216. package/dist/scripts/18.chunk.js.map +0 -1
  217. package/dist/scripts/19-f0550464de.chunk.js +0 -1
  218. package/dist/scripts/19.chunk.js +0 -502
  219. package/dist/scripts/19.chunk.js.map +0 -1
  220. package/dist/scripts/2-c47e1da13a.chunk.js +0 -1
  221. package/dist/scripts/2.chunk.js +0 -800
  222. package/dist/scripts/2.chunk.js.map +0 -1
  223. package/dist/scripts/20-81a48ca4fa.chunk.js +0 -1
  224. package/dist/scripts/20.chunk.js +0 -339
  225. package/dist/scripts/20.chunk.js.map +0 -1
  226. package/dist/scripts/21-f6ff589cb4.chunk.js +0 -1
  227. package/dist/scripts/21.chunk.js +0 -1544
  228. package/dist/scripts/21.chunk.js.map +0 -1
  229. package/dist/scripts/22-f458cb647a.chunk.js +0 -1
  230. package/dist/scripts/22.chunk.js +0 -1338
  231. package/dist/scripts/22.chunk.js.map +0 -1
  232. package/dist/scripts/23-633a2d5b09.chunk.js +0 -1
  233. package/dist/scripts/23-bb1e2bfb90.chunk.js +0 -1
  234. package/dist/scripts/23.chunk.js +0 -749
  235. package/dist/scripts/23.chunk.js.map +0 -1
  236. package/dist/scripts/24-a254eb1f32.chunk.js +0 -1
  237. package/dist/scripts/24.chunk.js +0 -1207
  238. package/dist/scripts/24.chunk.js.map +0 -1
  239. package/dist/scripts/25-db170bd5e3.chunk.js +0 -1
  240. package/dist/scripts/25.chunk.js +0 -750
  241. package/dist/scripts/25.chunk.js.map +0 -1
  242. package/dist/scripts/26-93c9661292.chunk.js +0 -1
  243. package/dist/scripts/26.chunk.js +0 -826
  244. package/dist/scripts/26.chunk.js.map +0 -1
  245. package/dist/scripts/27-8a4d69f288.chunk.js +0 -1
  246. package/dist/scripts/27.chunk.js +0 -658
  247. package/dist/scripts/27.chunk.js.map +0 -1
  248. package/dist/scripts/28-0730152b25.chunk.js +0 -1
  249. package/dist/scripts/28.chunk.js +0 -692
  250. package/dist/scripts/28.chunk.js.map +0 -1
  251. package/dist/scripts/29-965aa23b96.chunk.js +0 -1
  252. package/dist/scripts/29.chunk.js +0 -627
  253. package/dist/scripts/29.chunk.js.map +0 -1
  254. package/dist/scripts/3-0ce5d8bff2.chunk.js +0 -7
  255. package/dist/scripts/3.chunk.js +0 -18851
  256. package/dist/scripts/3.chunk.js.map +0 -1
  257. package/dist/scripts/30-13106255a1.chunk.js +0 -1
  258. package/dist/scripts/30-77202cb6be.chunk.js +0 -1
  259. package/dist/scripts/30.chunk.js +0 -562
  260. package/dist/scripts/30.chunk.js.map +0 -1
  261. package/dist/scripts/31-e3ee095203.chunk.js +0 -1
  262. package/dist/scripts/31.chunk.js +0 -767
  263. package/dist/scripts/31.chunk.js.map +0 -1
  264. package/dist/scripts/32-40ed1dd894.chunk.js +0 -1
  265. package/dist/scripts/32.chunk.js +0 -468
  266. package/dist/scripts/32.chunk.js.map +0 -1
  267. package/dist/scripts/33-93b8d74603.chunk.js +0 -1
  268. package/dist/scripts/33.chunk.js +0 -441
  269. package/dist/scripts/33.chunk.js.map +0 -1
  270. package/dist/scripts/34-ada5bfd254.chunk.js +0 -1
  271. package/dist/scripts/34.chunk.js +0 -622
  272. package/dist/scripts/34.chunk.js.map +0 -1
  273. package/dist/scripts/35-3eb6fe74fc.chunk.js +0 -1
  274. package/dist/scripts/35.chunk.js +0 -962
  275. package/dist/scripts/35.chunk.js.map +0 -1
  276. package/dist/scripts/36-0532d93a26.chunk.js +0 -1
  277. package/dist/scripts/36-3bfbb52684.chunk.js +0 -1
  278. package/dist/scripts/36.chunk.js +0 -545
  279. package/dist/scripts/36.chunk.js.map +0 -1
  280. package/dist/scripts/37-3e5e429c93.chunk.js +0 -1
  281. package/dist/scripts/37.chunk.js +0 -803
  282. package/dist/scripts/37.chunk.js.map +0 -1
  283. package/dist/scripts/38-76dc0e356d.chunk.js +0 -1
  284. package/dist/scripts/38.chunk.js +0 -943
  285. package/dist/scripts/38.chunk.js.map +0 -1
  286. package/dist/scripts/39-5df3077ac3.chunk.js +0 -1
  287. package/dist/scripts/39.chunk.js +0 -585
  288. package/dist/scripts/39.chunk.js.map +0 -1
  289. package/dist/scripts/4-3b38074599.chunk.js +0 -1
  290. package/dist/scripts/4-d5bec07430.chunk.js +0 -1
  291. package/dist/scripts/4.chunk.js +0 -1165
  292. package/dist/scripts/4.chunk.js.map +0 -1
  293. package/dist/scripts/40-6e3500fafc.chunk.js +0 -1
  294. package/dist/scripts/40.chunk.js +0 -273
  295. package/dist/scripts/40.chunk.js.map +0 -1
  296. package/dist/scripts/41-cde309348b.chunk.js +0 -1
  297. package/dist/scripts/41.chunk.js +0 -252
  298. package/dist/scripts/41.chunk.js.map +0 -1
  299. package/dist/scripts/42-4f9c639481.chunk.js +0 -1
  300. package/dist/scripts/42.chunk.js +0 -464
  301. package/dist/scripts/42.chunk.js.map +0 -1
  302. package/dist/scripts/43-3818cf7ed2.chunk.js +0 -1
  303. package/dist/scripts/43.chunk.js +0 -345
  304. package/dist/scripts/43.chunk.js.map +0 -1
  305. package/dist/scripts/44-0648e8e28f.chunk.js +0 -1
  306. package/dist/scripts/44-f4e93786c0.chunk.js +0 -1
  307. package/dist/scripts/44.chunk.js +0 -537
  308. package/dist/scripts/44.chunk.js.map +0 -1
  309. package/dist/scripts/45-23e64d06ed.chunk.js +0 -1
  310. package/dist/scripts/45-586cefa5b3.chunk.js +0 -1
  311. package/dist/scripts/45.chunk.js +0 -221
  312. package/dist/scripts/45.chunk.js.map +0 -1
  313. package/dist/scripts/46-8b4730ff48.chunk.js +0 -1
  314. package/dist/scripts/46.chunk.js +0 -230
  315. package/dist/scripts/46.chunk.js.map +0 -1
  316. package/dist/scripts/47-86e38a1468.chunk.js +0 -1
  317. package/dist/scripts/47.chunk.js +0 -408
  318. package/dist/scripts/47.chunk.js.map +0 -1
  319. package/dist/scripts/48-54db253a8c.chunk.js +0 -1
  320. package/dist/scripts/48.chunk.js +0 -241
  321. package/dist/scripts/48.chunk.js.map +0 -1
  322. package/dist/scripts/49-702676e587.chunk.js +0 -1
  323. package/dist/scripts/49.chunk.js +0 -249
  324. package/dist/scripts/49.chunk.js.map +0 -1
  325. package/dist/scripts/5-202373c80b.chunk.js +0 -1
  326. package/dist/scripts/5.chunk.js +0 -403
  327. package/dist/scripts/5.chunk.js.map +0 -1
  328. package/dist/scripts/50-8069668f8a.chunk.js +0 -1
  329. package/dist/scripts/50.chunk.js +0 -132
  330. package/dist/scripts/50.chunk.js.map +0 -1
  331. package/dist/scripts/51-6177cd4126.chunk.js +0 -1
  332. package/dist/scripts/51.chunk.js +0 -230
  333. package/dist/scripts/51.chunk.js.map +0 -1
  334. package/dist/scripts/52-96d9beee16.chunk.js +0 -1
  335. package/dist/scripts/52.chunk.js +0 -318
  336. package/dist/scripts/52.chunk.js.map +0 -1
  337. package/dist/scripts/53-be20bb20c9.chunk.js +0 -1
  338. package/dist/scripts/53.chunk.js +0 -212
  339. package/dist/scripts/53.chunk.js.map +0 -1
  340. package/dist/scripts/54-fdfdb33705.chunk.js +0 -1
  341. package/dist/scripts/54.chunk.js +0 -108
  342. package/dist/scripts/54.chunk.js.map +0 -1
  343. package/dist/scripts/55-306c5a0e4d.chunk.js +0 -1
  344. package/dist/scripts/55.chunk.js +0 -69
  345. package/dist/scripts/55.chunk.js.map +0 -1
  346. package/dist/scripts/56-db73243d04.chunk.js +0 -1
  347. package/dist/scripts/56.chunk.js +0 -209
  348. package/dist/scripts/56.chunk.js.map +0 -1
  349. package/dist/scripts/57-d5c787b4e3.chunk.js +0 -1
  350. package/dist/scripts/57.chunk.js +0 -211
  351. package/dist/scripts/57.chunk.js.map +0 -1
  352. package/dist/scripts/58-4d5ed35434.chunk.js +0 -1
  353. package/dist/scripts/58.chunk.js +0 -113
  354. package/dist/scripts/58.chunk.js.map +0 -1
  355. package/dist/scripts/59-ad37f90eca.chunk.js +0 -1
  356. package/dist/scripts/59.chunk.js +0 -108
  357. package/dist/scripts/59.chunk.js.map +0 -1
  358. package/dist/scripts/6-8ada925fb7.chunk.js +0 -1
  359. package/dist/scripts/6.chunk.js +0 -1382
  360. package/dist/scripts/6.chunk.js.map +0 -1
  361. package/dist/scripts/60-f95d0a0a90.chunk.js +0 -1
  362. package/dist/scripts/60.chunk.js +0 -110
  363. package/dist/scripts/60.chunk.js.map +0 -1
  364. package/dist/scripts/61-8ce5227508.chunk.js +0 -1
  365. package/dist/scripts/61.chunk.js +0 -161
  366. package/dist/scripts/61.chunk.js.map +0 -1
  367. package/dist/scripts/62-62d450716a.chunk.js +0 -1
  368. package/dist/scripts/62.chunk.js +0 -145
  369. package/dist/scripts/62.chunk.js.map +0 -1
  370. package/dist/scripts/63-91623df29f.chunk.js +0 -1
  371. package/dist/scripts/63.chunk.js +0 -139
  372. package/dist/scripts/63.chunk.js.map +0 -1
  373. package/dist/scripts/64-c0e959f4bb.chunk.js +0 -1
  374. package/dist/scripts/64.chunk.js +0 -142
  375. package/dist/scripts/64.chunk.js.map +0 -1
  376. package/dist/scripts/65-37ba4bad15.chunk.js +0 -1
  377. package/dist/scripts/65.chunk.js +0 -170
  378. package/dist/scripts/65.chunk.js.map +0 -1
  379. package/dist/scripts/66.chunk.js +0 -172
  380. package/dist/scripts/66.chunk.js.map +0 -1
  381. package/dist/scripts/67-edfc0ba1e9.chunk.js +0 -1
  382. package/dist/scripts/67.chunk.js +0 -173
  383. package/dist/scripts/67.chunk.js.map +0 -1
  384. package/dist/scripts/68.chunk.js +0 -165
  385. package/dist/scripts/68.chunk.js.map +0 -1
  386. package/dist/scripts/69.chunk.js +0 -102
  387. package/dist/scripts/69.chunk.js.map +0 -1
  388. package/dist/scripts/7-81162e12a2.chunk.js +0 -1
  389. package/dist/scripts/7.chunk.js +0 -2629
  390. package/dist/scripts/7.chunk.js.map +0 -1
  391. package/dist/scripts/70.chunk.js +0 -60
  392. package/dist/scripts/70.chunk.js.map +0 -1
  393. package/dist/scripts/71.chunk.js +0 -65
  394. package/dist/scripts/71.chunk.js.map +0 -1
  395. package/dist/scripts/72.chunk.js +0 -37
  396. package/dist/scripts/72.chunk.js.map +0 -1
  397. package/dist/scripts/73.chunk.js +0 -65
  398. package/dist/scripts/73.chunk.js.map +0 -1
  399. package/dist/scripts/74.chunk.js +0 -67
  400. package/dist/scripts/74.chunk.js.map +0 -1
  401. package/dist/scripts/75.chunk.js +0 -104
  402. package/dist/scripts/75.chunk.js.map +0 -1
  403. package/dist/scripts/76.chunk.js +0 -123
  404. package/dist/scripts/76.chunk.js.map +0 -1
  405. package/dist/scripts/77.chunk.js +0 -1001
  406. package/dist/scripts/77.chunk.js.map +0 -1
  407. package/dist/scripts/78.chunk.js +0 -36
  408. package/dist/scripts/78.chunk.js.map +0 -1
  409. package/dist/scripts/79.chunk.js +0 -417
  410. package/dist/scripts/79.chunk.js.map +0 -1
  411. package/dist/scripts/8-7dc2d39ce2.chunk.js +0 -1
  412. package/dist/scripts/8-a89310bd50.chunk.js +0 -1
  413. package/dist/scripts/8.chunk.js +0 -930
  414. package/dist/scripts/8.chunk.js.map +0 -1
  415. package/dist/scripts/80.chunk.js +0 -327
  416. package/dist/scripts/80.chunk.js.map +0 -1
  417. package/dist/scripts/81.chunk.js +0 -619
  418. package/dist/scripts/81.chunk.js.map +0 -1
  419. package/dist/scripts/82.chunk.js +0 -437
  420. package/dist/scripts/82.chunk.js.map +0 -1
  421. package/dist/scripts/83.chunk.js +0 -633
  422. package/dist/scripts/83.chunk.js.map +0 -1
  423. package/dist/scripts/84.chunk.js +0 -1938
  424. package/dist/scripts/84.chunk.js.map +0 -1
  425. package/dist/scripts/85.chunk.js +0 -692
  426. package/dist/scripts/85.chunk.js.map +0 -1
  427. package/dist/scripts/86.chunk.js +0 -829
  428. package/dist/scripts/86.chunk.js.map +0 -1
  429. package/dist/scripts/87.chunk.js +0 -622
  430. package/dist/scripts/87.chunk.js.map +0 -1
  431. package/dist/scripts/88.chunk.js +0 -962
  432. package/dist/scripts/88.chunk.js.map +0 -1
  433. package/dist/scripts/89.chunk.js +0 -943
  434. package/dist/scripts/89.chunk.js.map +0 -1
  435. package/dist/scripts/9-9865a75c99.chunk.js +0 -1
  436. package/dist/scripts/9.chunk.js +0 -24
  437. package/dist/scripts/9.chunk.js.map +0 -1
  438. package/dist/scripts/90.chunk.js +0 -345
  439. package/dist/scripts/90.chunk.js.map +0 -1
  440. package/dist/scripts/91.chunk.js +0 -108
  441. package/dist/scripts/91.chunk.js.map +0 -1
  442. package/dist/scripts/92.chunk.js +0 -110
  443. package/dist/scripts/92.chunk.js.map +0 -1
  444. package/dist/scripts/93.chunk.js +0 -165
  445. package/dist/scripts/93.chunk.js.map +0 -1
  446. package/dist/scripts/94.chunk.js +0 -102
  447. package/dist/scripts/94.chunk.js.map +0 -1
  448. package/dist/scripts/95.chunk.js +0 -65
  449. package/dist/scripts/95.chunk.js.map +0 -1
  450. package/dist/scripts/96.chunk.js +0 -65
  451. package/dist/scripts/96.chunk.js.map +0 -1
  452. package/dist/scripts/97.chunk.js +0 -67
  453. package/dist/scripts/97.chunk.js.map +0 -1
  454. package/dist/scripts/98.chunk.js +0 -104
  455. package/dist/scripts/98.chunk.js.map +0 -1
  456. package/dist/scripts/99.chunk.js +0 -123
  457. package/dist/scripts/99.chunk.js.map +0 -1
  458. package/dist/scripts/bundle-0958accd59.min.js +0 -15
  459. package/dist/scripts/bundle.js +0 -47043
  460. package/dist/scripts/bundle.js.map +0 -1
  461. package/dist/scripts/polyfills-1f23e4a487.min.js +0 -1
  462. package/dist/scripts/polyfills-8a0101e5f1.min.js +0 -1
  463. package/dist/scripts/polyfills.js +0 -15254
  464. package/dist/scripts/polyfills.js.map +0 -1
@@ -1,537 +0,0 @@
1
- (window["webpackJsonp_clickview_lite"] = window["webpackJsonp_clickview_lite"] || []).push([[44],{
2
-
3
- /***/ "../../libs/shared/src/flight-requests/PreferenceRequests.ts":
4
- /*!*******************************************************************************************************!*\
5
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/flight-requests/PreferenceRequests.ts ***!
6
- \*******************************************************************************************************/
7
- /*! exports provided: PreferenceRequests */
8
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
9
-
10
- "use strict";
11
- __webpack_require__.r(__webpack_exports__);
12
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreferenceRequests", function() { return PreferenceRequests; });
13
- /* harmony import */ var _common_src_backbone_utils_UrlHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/src/backbone/utils/UrlHelper */ "../../libs/common/src/backbone/utils/UrlHelper.ts");
14
- /* harmony import */ var _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/src/backbone/enums/HttpVerbs */ "../../libs/common/src/backbone/enums/HttpVerbs.ts");
15
- /* harmony import */ var _constants_WithStatements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/WithStatements */ "../../libs/shared/src/constants/WithStatements.ts");
16
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
17
-
18
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
-
20
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
-
22
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
23
-
24
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
25
-
26
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
-
28
-
29
-
30
-
31
- var classificationQuery = _constants_WithStatements__WEBPACK_IMPORTED_MODULE_2__["SharedWithStatements"].CLASSIFICATION;
32
- var endpoints = {
33
- // Subjects
34
- allSubjectPreferences: function allSubjectPreferences() {
35
- return "/api/domain/v1/subjects/preferences?query=".concat(classificationQuery, "&type=subject");
36
- },
37
- mySubjectPreferences: function mySubjectPreferences() {
38
- return "/api/domain/v1/subjects/classifications/following?query=".concat(classificationQuery);
39
- },
40
- followSubjects: function followSubjects() {
41
- return '/api/domain/v1/subjects/classifications/following';
42
- },
43
- unfollowSubjects: function unfollowSubjects(ids) {
44
- return _common_src_backbone_utils_UrlHelper__WEBPACK_IMPORTED_MODULE_0__["UrlHelper"].urlBuilder('/api/domain/v1/subjects/classifications/following', {
45
- id: ids
46
- });
47
- },
48
- // Levels
49
- allLevelPreferences: function allLevelPreferences() {
50
- return "/api/domain/v1/subjects/audiences?type=subject";
51
- },
52
- myLevelPreferences: function myLevelPreferences() {
53
- return "/api/domain/v1/subjects/audiences/following";
54
- },
55
- followLevels: function followLevels() {
56
- return "/api/domain/v1/subjects/audiences/following";
57
- },
58
- unfollowLevels: function unfollowLevels(ids) {
59
- return _common_src_backbone_utils_UrlHelper__WEBPACK_IMPORTED_MODULE_0__["UrlHelper"].urlBuilder('/api/domain/v1/subjects/audiences/following', {
60
- id: ids
61
- });
62
- },
63
- // School Level
64
- getSchoolLevels: function getSchoolLevels() {
65
- return "/api/domain/v1/subjects/school-level";
66
- },
67
- getSelectedSchoolLevel: function getSelectedSchoolLevel(userId) {
68
- return "/api/domain/v1/subjects/school-level/".concat(userId);
69
- },
70
- setSchoolLevel: function setSchoolLevel() {
71
- return '/api/domain/v1/subjects/school-level';
72
- },
73
- // Curriculum
74
- getCurriculums: function getCurriculums() {
75
- return "/api/domain/v1/subjects/curriculum";
76
- },
77
- getSelectedCurriculum: function getSelectedCurriculum(userId) {
78
- return "/api/domain/v1/subjects/school-level/".concat(userId);
79
- },
80
- setCurriculum: function setCurriculum() {
81
- return '/api/domain/v1/subjects/curriculum';
82
- },
83
- getCurrentPresentations: function getCurrentPresentations(type) {
84
- return "/api/domain/v1/subjects/presentations".concat(type ? "?type=".concat(type) : '');
85
- },
86
- getAvailablePresentations: function getAvailablePresentations(type) {
87
- return "/api/domain/v1/subjects/presentations/available".concat(type ? "?type=".concat(type) : '');
88
- },
89
- setPresentation: function setPresentation(id) {
90
- return "/api/domain/v1/subjects/presentations/".concat(id);
91
- }
92
- };
93
- var PreferenceRequests = {
94
- /**
95
- * Presentations
96
- */
97
- currentPresentations: function currentPresentations(type) {
98
- return {
99
- url: endpoints.getCurrentPresentations(type),
100
- key: "current:presentations".concat(type ? ":".concat(type) : ''),
101
- expiryTime: Infinity
102
- };
103
- },
104
- availablePresentations: function availablePresentations(type) {
105
- return {
106
- url: endpoints.getAvailablePresentations(type),
107
- key: "available:presentations:".concat(type),
108
- expiryTime: Infinity
109
- };
110
- },
111
- setPresentation: function setPresentation(presentation, type, success) {
112
- return {
113
- url: endpoints.setPresentation(presentation.id),
114
- key: "set:".concat(type, ":presentation"),
115
- type: _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_1__["HttpVerbs"].POST,
116
- data: {},
117
- invalidationKeys: ["current:presentations:".concat(type), 'current:presentations', 'subject:preference:options', 'my:subject:preferences', 'level:preference:options', 'my:level:preferences'],
118
- success: success
119
- };
120
- },
121
-
122
- /**
123
- * Subjects
124
- */
125
- allSubjectPreferences: function allSubjectPreferences() {
126
- return {
127
- url: endpoints.allSubjectPreferences(),
128
- key: "subject:preference:options",
129
- expiryTime: Infinity
130
- };
131
- },
132
- mySubjectPreferences: function mySubjectPreferences(success) {
133
- return {
134
- url: endpoints.mySubjectPreferences(),
135
- key: "my:subject:preferences",
136
- normalize: false,
137
- expiryTime: Infinity,
138
- success: success,
139
- formatData: function formatData(preferences) {
140
- return preferences.filter(function (p) {
141
- return p.canBePreferred;
142
- });
143
- }
144
- };
145
- },
146
- followSubjects: function followSubjects(subjectIds, success, error, always) {
147
- return {
148
- url: endpoints.followSubjects(),
149
- key: "follow:subjects",
150
- data: subjectIds,
151
- type: _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_1__["HttpVerbs"].POST,
152
- success: success,
153
- error: error,
154
- always: always,
155
- invalidationKeys: [].concat(_toConsumableArray(subjectIds.map(function (id) {
156
- return "classification:".concat(id);
157
- })), ['my:subject:preferences'])
158
- };
159
- },
160
- unfollowSubjects: function unfollowSubjects(subjectIds, success, error, always) {
161
- return {
162
- url: endpoints.unfollowSubjects(subjectIds),
163
- key: "unfollow:subjects",
164
- type: _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_1__["HttpVerbs"].DELETE,
165
- success: success,
166
- error: error,
167
- always: always,
168
- invalidationKeys: [].concat(_toConsumableArray(subjectIds.map(function (id) {
169
- return "classification:".concat(id);
170
- })), ['my:subject:preferences'])
171
- };
172
- },
173
-
174
- /**
175
- * Levels
176
- */
177
- allLevelPreferences: function allLevelPreferences() {
178
- return {
179
- url: endpoints.allLevelPreferences(),
180
- key: "level:preference:options",
181
- normalize: false,
182
- expiryTime: Infinity
183
- };
184
- },
185
- myLevelPreferences: function myLevelPreferences(success) {
186
- return {
187
- url: endpoints.myLevelPreferences(),
188
- key: "my:level:preferences",
189
- normalize: false,
190
- expiryTime: Infinity,
191
- success: success
192
- };
193
- },
194
- followLevels: function followLevels(levelIds, success, error, always) {
195
- return {
196
- url: endpoints.followLevels(),
197
- key: "follow:levels",
198
- data: levelIds,
199
- type: _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_1__["HttpVerbs"].POST,
200
- success: success,
201
- error: error,
202
- always: always,
203
- invalidationKeys: ['my:level:preferences']
204
- };
205
- },
206
- unfollowLevels: function unfollowLevels(levelIds, success, error, always) {
207
- return {
208
- url: endpoints.unfollowLevels(levelIds),
209
- key: "unfollow:levels",
210
- type: _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_1__["HttpVerbs"].DELETE,
211
- success: success,
212
- error: error,
213
- always: always,
214
- invalidationKeys: ['my:level:preferences']
215
- };
216
- }
217
- };
218
-
219
- /***/ }),
220
-
221
- /***/ "../../libs/shared/src/hooks/UseBatchFetch.ts":
222
- /*!****************************************************************************************!*\
223
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/hooks/UseBatchFetch.ts ***!
224
- \****************************************************************************************/
225
- /*! exports provided: useBatchFetch */
226
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
227
-
228
- "use strict";
229
- __webpack_require__.r(__webpack_exports__);
230
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useBatchFetch", function() { return useBatchFetch; });
231
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "react-redux");
232
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_0__);
233
- /* harmony import */ var _common_src_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/src/react */ "../../libs/common/src/react/index.ts");
234
- /* harmony import */ var _common_src_react_utils_ArrayHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/src/react/utils/ArrayHelper */ "../../libs/common/src/react/utils/ArrayHelper.ts");
235
-
236
-
237
-
238
- var BATCH_SIZE = 25;
239
- /**
240
- * Used to fetch multiple items by id with Flight. Will fetch 25 items at a time firing off multiple
241
- * requests if there are more than 25 items.
242
- * This will return null until we have all our items. Items will be returned as an object with
243
- * their ids as they key for easy mapping
244
- *
245
- * @param itemIds
246
- * @param getRequest
247
- */
248
-
249
- function useBatchFetch(itemIds, getRequest) {
250
- var dispatch = Object(react_redux__WEBPACK_IMPORTED_MODULE_0__["useDispatch"])();
251
- return Object(react_redux__WEBPACK_IMPORTED_MODULE_0__["useSelector"])(function (state) {
252
- var _a;
253
-
254
- if (!((_a = itemIds) === null || _a === void 0 ? void 0 : _a.length)) return null;
255
- var uniqueItemIds = _common_src_react_utils_ArrayHelper__WEBPACK_IMPORTED_MODULE_2__["ArrayHelper"].uniq(itemIds);
256
- var items = {};
257
- /* Used locally to only return our items if we've fetched all of them */
258
-
259
- var status = {};
260
-
261
- for (var i = 0; i < uniqueItemIds.length; i += BATCH_SIZE) {
262
- var ids = uniqueItemIds.slice(i, i + BATCH_SIZE);
263
- var request = getRequest(ids);
264
- var response = _common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].getResponse(state, request.key);
265
- status[i] = !!response.data;
266
- if (response.shouldFetch) _common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].fetch(dispatch, request);
267
- if (response.data) response.data.forEach(function (v) {
268
- return items[v.id] = v;
269
- });
270
- }
271
-
272
- return Object.keys(status).every(function (k) {
273
- return status[k];
274
- }) ? items : null;
275
- });
276
- }
277
-
278
- /***/ }),
279
-
280
- /***/ "./src/apps/content-updates/views/content-updates/ContentUpdatesView.tsx":
281
- /*!*******************************************************************************!*\
282
- !*** ./src/apps/content-updates/views/content-updates/ContentUpdatesView.tsx ***!
283
- \*******************************************************************************/
284
- /*! exports provided: ContentUpdatesView */
285
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
286
-
287
- "use strict";
288
- __webpack_require__.r(__webpack_exports__);
289
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentUpdatesView", function() { return ContentUpdatesView; });
290
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
291
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
292
- /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "moment");
293
- /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
294
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ "react-redux");
295
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_2__);
296
- /* harmony import */ var _libs_common_src_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../libs/common/src/react */ "../../libs/common/src/react/index.ts");
297
- /* harmony import */ var _libs_common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../libs/common/src/backbone/services/LanguageService */ "../../libs/common/src/backbone/services/LanguageService.tsx");
298
- /* harmony import */ var _libs_analytics_src_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../../libs/analytics/src/AnalyticsHelper */ "../../libs/analytics/src/AnalyticsHelper.ts");
299
- /* harmony import */ var _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../../../libs/analytics/src/interfaces */ "../../libs/analytics/src/interfaces/index.ts");
300
- /* harmony import */ var _libs_shared_src_flight_requests_PreferenceRequests__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/flight-requests/PreferenceRequests */ "../../libs/shared/src/flight-requests/PreferenceRequests.ts");
301
- /* harmony import */ var _libs_shared_src_flight_requests_ConfigRequests__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/flight-requests/ConfigRequests */ "../../libs/shared/src/flight-requests/ConfigRequests.ts");
302
- /* harmony import */ var _libs_shared_src_hooks_UseAlerts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/hooks/UseAlerts */ "../../libs/shared/src/hooks/UseAlerts.ts");
303
- /* harmony import */ var _libs_shared_src_hooks_UseBatchFetch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/hooks/UseBatchFetch */ "../../libs/shared/src/hooks/UseBatchFetch.ts");
304
- /* harmony import */ var _libs_shared_src_apps_content_updates_flight_requests_ContentUpdateRequests__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/apps/content-updates/flight-requests/ContentUpdateRequests */ "../../libs/shared/src/apps/content-updates/flight-requests/ContentUpdateRequests.ts");
305
- /* harmony import */ var _libs_common_src_react_hooks_UseSetPageTitle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../../../../libs/common/src/react/hooks/UseSetPageTitle */ "../../libs/common/src/react/hooks/UseSetPageTitle.ts");
306
- /* harmony import */ var apps_content_updates_components__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! apps/content-updates/components */ "./src/apps/content-updates/components/index.ts");
307
- /* harmony import */ var _components_ContentUpdateClassification__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/ContentUpdateClassification */ "./src/apps/content-updates/views/content-updates/components/ContentUpdateClassification.tsx");
308
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
309
-
310
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
311
-
312
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
313
-
314
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
315
-
316
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
317
-
318
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
319
-
320
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
-
337
- var INITIAL_VIDEO_COUNT = 3;
338
- var namespace = 'contentUpdates.contentUpdatesView';
339
-
340
- function map(contentUpdates, classifications) {
341
- if (!contentUpdates || !classifications) return null;
342
- return contentUpdates.map(function (c) {
343
- return {
344
- showMore: c.videos.length > INITIAL_VIDEO_COUNT,
345
- classification: classifications[c.classificationId],
346
- videos: c.videos.map(function (m) {
347
- m.classification = classifications[m.classificationId];
348
- return m;
349
- }).filter(function (v) {
350
- return v;
351
- })
352
- };
353
- });
354
- }
355
-
356
- function ContentUpdatesView(props) {
357
- var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"]({}),
358
- _React$useState2 = _slicedToArray(_React$useState, 2),
359
- followSpinners = _React$useState2[0],
360
- setFollowSpinners = _React$useState2[1];
361
-
362
- var dispatch = Object(react_redux__WEBPACK_IMPORTED_MODULE_2__["useDispatch"])();
363
- var alerts = Object(_libs_shared_src_hooks_UseAlerts__WEBPACK_IMPORTED_MODULE_9__["useAlerts"])();
364
- Object(_libs_common_src_react_hooks_UseSetPageTitle__WEBPACK_IMPORTED_MODULE_12__["useSetPageTitle"])(_libs_common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_4__["LanguageService"].getPhrase(namespace, 'pageTitle'));
365
- var from = moment__WEBPACK_IMPORTED_MODULE_1__().subtract(1, 'year').toISOString();
366
- var to = moment__WEBPACK_IMPORTED_MODULE_1__().toISOString();
367
- var config = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_3__["Flight"].useBasicFetch(_libs_shared_src_flight_requests_ConfigRequests__WEBPACK_IMPORTED_MODULE_8__["ConfigRequests"].config);
368
- var contentUpdates = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_3__["Flight"].useBasicFetch(_libs_shared_src_apps_content_updates_flight_requests_ContentUpdateRequests__WEBPACK_IMPORTED_MODULE_11__["ContentUpdateRequests"].getContentUpdates(from, to));
369
- var subjectPreferences = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_3__["Flight"].useBasicFetch(_libs_shared_src_flight_requests_PreferenceRequests__WEBPACK_IMPORTED_MODULE_7__["PreferenceRequests"].mySubjectPreferences());
370
- /* Map content update response into list of video ids and classification ids*/
371
-
372
- var classificationIds = [];
373
- contentUpdates.data && contentUpdates.data.forEach(function (c) {
374
- return classificationIds.push(c.classificationId);
375
- });
376
- /* Batch fetch the videos and classifications by id */
377
-
378
- var classifications = Object(_libs_shared_src_hooks_UseBatchFetch__WEBPACK_IMPORTED_MODULE_10__["useBatchFetch"])(classificationIds, function (ids) {
379
- return _libs_shared_src_apps_content_updates_flight_requests_ContentUpdateRequests__WEBPACK_IMPORTED_MODULE_11__["ContentUpdateRequests"].getClassifications(ids);
380
- });
381
- /** Callbacks */
382
-
383
- function onFollow(classificationId, follow) {
384
- setFollowSpinners(function (currentState) {
385
- return Object.assign(Object.assign({}, currentState), _defineProperty({}, classificationId, true));
386
- });
387
-
388
- var onSuccess = function onSuccess() {
389
- var _a, _b;
390
-
391
- setFollowSpinners(function (currentState) {
392
- return Object.assign(Object.assign({}, currentState), _defineProperty({}, classificationId, false));
393
- });
394
- _libs_analytics_src_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_5__["AnalyticsHelper"].logUserAction({
395
- id: classificationId,
396
- name: (_a = classifications[classificationId]) === null || _a === void 0 ? void 0 : _a.name
397
- }, {
398
- location: _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__["LocationContext"].ContentUpdatesClassificationBanner,
399
- workflowPhase: _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__["WorkflowPhase"].Complete,
400
- descriptor: follow ? _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__["ToggleDescriptor"].On : _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__["ToggleDescriptor"].Off,
401
- actionType: _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__["UserAction"].Follow,
402
- entity: _libs_analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_6__["EntityType"].Classification
403
- });
404
- alerts.success(_libs_common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_4__["LanguageService"].getPhrase(namespace, follow ? 'followed' : 'unfollowed', {
405
- classification: (_b = classifications[classificationId]) === null || _b === void 0 ? void 0 : _b.name
406
- }));
407
- };
408
-
409
- var onError = function onError() {
410
- setFollowSpinners(function (currentState) {
411
- return Object.assign(Object.assign({}, currentState), _defineProperty({}, classificationId, false));
412
- });
413
- alerts.error(_libs_common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_4__["LanguageService"].getPhrase(namespace, 'error'));
414
- };
415
-
416
- var request = follow ? _libs_shared_src_flight_requests_PreferenceRequests__WEBPACK_IMPORTED_MODULE_7__["PreferenceRequests"].followSubjects([classificationId], onSuccess, onError) : _libs_shared_src_flight_requests_PreferenceRequests__WEBPACK_IMPORTED_MODULE_7__["PreferenceRequests"].unfollowSubjects([classificationId], onSuccess, onError);
417
- _libs_common_src_react__WEBPACK_IMPORTED_MODULE_3__["Flight"].fetch(dispatch, request);
418
- }
419
-
420
- if (!contentUpdates.data || !config.data || !subjectPreferences.data || !classifications) return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
421
- /* Build out array of content updates from our lists of videos and classifications */
422
-
423
- var mappedUpdates = map(contentUpdates.data, classifications);
424
- var preferredSubjectIds = subjectPreferences.data.map(function (subject) {
425
- return subject.id;
426
- });
427
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
428
- className: 'bg-white px-3'
429
- }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](apps_content_updates_components__WEBPACK_IMPORTED_MODULE_13__["WhatsNewBreadcrumbs"], {
430
- dashboardAppLink: props.appLinks.dashboardAppLink
431
- }), mappedUpdates.map(function (c) {
432
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_ContentUpdateClassification__WEBPACK_IMPORTED_MODULE_14__["ContentUpdateClassification"], {
433
- classification: c.classification,
434
- videos: c.videos,
435
- imageCdnUrl: config.data.imageCdnUrl,
436
- showMore: c.showMore,
437
- key: c.classification.id,
438
- appLinks: props.appLinks,
439
- followed: preferredSubjectIds.includes(c.classification.id),
440
- follow: onFollow,
441
- showFollowSpinner: followSpinners[c.classification.id]
442
- });
443
- }));
444
- }
445
-
446
- /***/ }),
447
-
448
- /***/ "./src/apps/content-updates/views/content-updates/components/ContentUpdateClassification.tsx":
449
- /*!***************************************************************************************************!*\
450
- !*** ./src/apps/content-updates/views/content-updates/components/ContentUpdateClassification.tsx ***!
451
- \***************************************************************************************************/
452
- /*! exports provided: ContentUpdateClassification */
453
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
454
-
455
- "use strict";
456
- __webpack_require__.r(__webpack_exports__);
457
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentUpdateClassification", function() { return ContentUpdateClassification; });
458
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
459
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
460
- /* harmony import */ var _libs_shared_src_components_app_link_AppLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../libs/shared/src/components/app-link/AppLink */ "../../libs/shared/src/components/app-link/AppLink.tsx");
461
- /* harmony import */ var _libs_shared_src_components_text_Text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../../libs/shared/src/components/text/Text */ "../../libs/shared/src/components/text/Text.tsx");
462
- /* harmony import */ var _libs_shared_src_utils_ImageHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../../libs/shared/src/utils/ImageHelper */ "../../libs/shared/src/utils/ImageHelper.ts");
463
- /* harmony import */ var _libs_shared_src_enums_Images__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../../libs/shared/src/enums/Images */ "../../libs/shared/src/enums/Images.ts");
464
- /* harmony import */ var apps_content_updates_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! apps/content-updates/components */ "./src/apps/content-updates/components/index.ts");
465
- /* harmony import */ var apps_playlists_components_video_list__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! apps/playlists/components/video-list */ "./src/apps/playlists/components/video-list/index.ts");
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
- var namespace = 'contentUpdates.contentUpdatesView';
474
- function ContentUpdateClassification(props) {
475
- var classification = props.classification,
476
- videos = props.videos,
477
- imageCdnUrl = props.imageCdnUrl,
478
- showMore = props.showMore,
479
- followed = props.followed;
480
- var url = _libs_shared_src_utils_ImageHelper__WEBPACK_IMPORTED_MODULE_3__["ImageHelper"].createBannerUrl(classification.banner, {
481
- fallbackBaseUrl: imageCdnUrl,
482
- fallbackCategoryName: classification.name,
483
- type: _libs_shared_src_enums_Images__WEBPACK_IMPORTED_MODULE_4__["ImageType"].Banners
484
- }, {
485
- size: _libs_shared_src_enums_Images__WEBPACK_IMPORTED_MODULE_4__["ImageSize"].Small,
486
- resizeType: _libs_shared_src_enums_Images__WEBPACK_IMPORTED_MODULE_4__["ResizeType"].Cover
487
- });
488
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
489
- className: 'mb-3'
490
- }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](apps_content_updates_components__WEBPACK_IMPORTED_MODULE_5__["ClassificationBanner"], {
491
- classification: classification,
492
- backgroundUrl: url,
493
- getClassificationAppLink: props.appLinks.getClassificationAppLink,
494
- followed: followed,
495
- follow: props.follow,
496
- showFollowSpinner: props.showFollowSpinner
497
- }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](apps_playlists_components_video_list__WEBPACK_IMPORTED_MODULE_6__["SortableVideoListContainer"], {
498
- playlistId: '0',
499
- isUserSignedIn: true,
500
- onSortComplete: function onSortComplete() {},
501
- videos: videos,
502
- getVideoAppLink: props.appLinks.getVideoAppLink,
503
- getSeriesAppLink: props.appLinks.getSeriesAppLink
504
- }), showMore && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
505
- className: 'show-more'
506
- }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_app_link_AppLink__WEBPACK_IMPORTED_MODULE_1__["AppLink"], {
507
- className: 'info-link',
508
- appLink: props.appLinks.getClassificationUpdateAppLink(classification)
509
- }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_text_Text__WEBPACK_IMPORTED_MODULE_2__["Text"], {
510
- namespace: namespace,
511
- phrase: 'showMore',
512
- options: {
513
- classificationName: classification.name
514
- }
515
- }))));
516
- }
517
-
518
- /***/ }),
519
-
520
- /***/ "./src/apps/playlists/components/video-list/index.ts":
521
- /*!***********************************************************!*\
522
- !*** ./src/apps/playlists/components/video-list/index.ts ***!
523
- \***********************************************************/
524
- /*! exports provided: SortableVideoListContainer */
525
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
526
-
527
- "use strict";
528
- __webpack_require__.r(__webpack_exports__);
529
- /* harmony import */ var _SortableVideoListContainer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SortableVideoListContainer */ "./src/apps/playlists/components/video-list/SortableVideoListContainer.tsx");
530
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortableVideoListContainer", function() { return _SortableVideoListContainer__WEBPACK_IMPORTED_MODULE_0__["SortableVideoListContainer"]; });
531
-
532
-
533
-
534
- /***/ })
535
-
536
- }]);
537
- //# sourceMappingURL=44.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["file://C:/ClickView Projects/@clickview/packages/libs/shared/src/flight-requests/PreferenceRequests.ts","file://C:/ClickView Projects/@clickview/packages/libs/shared/src/hooks/UseBatchFetch.ts","file://C:/ClickView Projects/@clickview/packages/projects/lite/src/apps/content-updates/views/content-updates/ContentUpdatesView.tsx","file://C:/ClickView Projects/@clickview/packages/projects/lite/src/apps/content-updates/views/content-updates/components/ContentUpdateClassification.tsx","file://C:/ClickView Projects/@clickview/packages/projects/lite/src/apps/playlists/components/video-list/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AAIA,IAAM,mBAAmB,GAAG,8EAAoB,CAAC,cAAjD;AAEA,IAAM,SAAS,GAAG;AAChB;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U,EAAE,GADa;AAEzB,kBAAc,EAAE,IAFS;AAGzB,kBAAc,EAAE,0BAAK,CAAG,CAHC;AAIzB,UAAM,EAAE,MAJiB;AAKzB,mBAAe,EAAE,KAAK,CAAC,QAAN,CAAe,eALP;AAMzB,oBAAgB,EAAE,KAAK,CAAC,QAAN,CAAe;AANR,GAA3B,CATF,EAiBG,QAAQ,IACP;AAAK,aAAS,EAAE;AAAhB,KACE,oDAAC,oFAAD,EAAQ;AAAC,aAAS,EAAC,WAAX;AAAuB,WAAO,EAAE,KAAK,CAAC,QAAN,CAAe,8BAAf,CAA8C,cAA9C;AAAhC,GAAR,EACE,oDAAC,0EAAD,EAAK;AAAC,aAAS,EAAE,SAAZ;AAAuB,UAAM,EAAC,UAA9B;AAAyC,WAAO,EAAE;AACrD,wBAAkB,EAAE,cAAc,CAAC;AADkB;AAAlD,GAAL,CADF,CADF,CAlBJ,CADF;AA6BD,C;;;;;;;;;;;;AChED;AAAA;AAAA;AAAA","file":"scripts/44.chunk.js","sourcesContent":["import { Flight } from 'libs/common/flight';\r\nimport { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\r\nimport { HttpVerbs } from 'libs/common/backbone/enums/HttpVerbs';\r\n\r\nimport { SharedWithStatements } from 'libs/shared/constants/WithStatements';\r\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\r\nimport { Presentation, Classification } from 'libs/shared/interfaces';\r\n\r\nconst classificationQuery = SharedWithStatements.CLASSIFICATION;\r\n\r\nconst endpoints = {\r\n // Subjects\r\n allSubjectPreferences: () => `/api/domain/v1/subjects/preferences?query=${classificationQuery}&type=subject`,\r\n mySubjectPreferences: () => `/api/domain/v1/subjects/classifications/following?query=${classificationQuery}`,\r\n followSubjects: () => '/api/domain/v1/subjects/classifications/following',\r\n unfollowSubjects: (ids: string[]) => UrlHelper.urlBuilder('/api/domain/v1/subjects/classifications/following', { id: ids }),\r\n\r\n // Levels\r\n allLevelPreferences: () => `/api/domain/v1/subjects/audiences?type=subject`,\r\n myLevelPreferences: () => `/api/domain/v1/subjects/audiences/following`,\r\n followLevels: () => `/api/domain/v1/subjects/audiences/following`,\r\n unfollowLevels: (ids: string[]) => UrlHelper.urlBuilder('/api/domain/v1/subjects/audiences/following', { id: ids }),\r\n\r\n // School Level\r\n getSchoolLevels: () => `/api/domain/v1/subjects/school-level`,\r\n getSelectedSchoolLevel: (userId: string) => `/api/domain/v1/subjects/school-level/${userId}`,\r\n setSchoolLevel: () => '/api/domain/v1/subjects/school-level',\r\n\r\n // Curriculum\r\n getCurriculums: () => `/api/domain/v1/subjects/curriculum`,\r\n getSelectedCurriculum: (userId: string) => `/api/domain/v1/subjects/school-level/${userId}`,\r\n setCurriculum: () => '/api/domain/v1/subjects/curriculum',\r\n\r\n getCurrentPresentations: (type?: PresentationType) =>\r\n `/api/domain/v1/subjects/presentations${type ? `?type=${type}` : ''}`,\r\n getAvailablePresentations: (type?: PresentationType) =>\r\n `/api/domain/v1/subjects/presentations/available${type ? `?type=${type}` : ''}`,\r\n setPresentation: (id: string) => `/api/domain/v1/subjects/presentations/${id}`\r\n};\r\n\r\nexport const PreferenceRequests = {\r\n /**\r\n * Presentations\r\n */\r\n\r\n currentPresentations(type?: PresentationType): Flight.Request {\r\n return {\r\n url: endpoints.getCurrentPresentations(type),\r\n key: `current:presentations${type ? `:${type}` : ''}`,\r\n expiryTime: Infinity\r\n };\r\n },\r\n\r\n availablePresentations(type?: PresentationType): Flight.Request {\r\n return {\r\n url: endpoints.getAvailablePresentations(type),\r\n key: `available:presentations:${type}`,\r\n expiryTime: Infinity\r\n };\r\n },\r\n\r\n setPresentation(\r\n presentation: Presentation, type: PresentationType, success?: () => void\r\n ): Flight.Request {\r\n return {\r\n url: endpoints.setPresentation(presentation.id),\r\n key: `set:${type}:presentation`,\r\n type: HttpVerbs.POST,\r\n data: {},\r\n invalidationKeys: [\r\n `current:presentations:${type}`,\r\n 'current:presentations',\r\n 'subject:preference:options',\r\n 'my:subject:preferences',\r\n 'level:preference:options',\r\n 'my:level:preferences'\r\n ],\r\n success\r\n };\r\n },\r\n\r\n /**\r\n * Subjects\r\n */\r\n allSubjectPreferences(): Flight.Request {\r\n return {\r\n url: endpoints.allSubjectPreferences(),\r\n key: `subject:preference:options`,\r\n expiryTime: Infinity\r\n };\r\n },\r\n\r\n mySubjectPreferences(success?: (data: any) => void): Flight.Request {\r\n return {\r\n url: endpoints.mySubjectPreferences(),\r\n key: `my:subject:preferences`,\r\n normalize: false,\r\n expiryTime: Infinity,\r\n success,\r\n formatData: preferences => preferences.filter((p: Classification) => p.canBePreferred)\r\n };\r\n },\r\n\r\n followSubjects(\r\n subjectIds: string[],\r\n success: () => void,\r\n error?: () => void,\r\n always?: () => void\r\n ): Flight.Request {\r\n return {\r\n url: endpoints.followSubjects(),\r\n key: `follow:subjects`,\r\n data: subjectIds,\r\n type: HttpVerbs.POST,\r\n success,\r\n error,\r\n always,\r\n invalidationKeys: [ ...subjectIds.map(id => `classification:${id}`), 'my:subject:preferences' ]\r\n };\r\n },\r\n\r\n unfollowSubjects(\r\n subjectIds: string[],\r\n success: () => void,\r\n error?: () => void,\r\n always?: () => void\r\n ): Flight.Request {\r\n return {\r\n url: endpoints.unfollowSubjects(subjectIds),\r\n key: `unfollow:subjects`,\r\n type: HttpVerbs.DELETE,\r\n success,\r\n error,\r\n always,\r\n invalidationKeys: [ ...subjectIds.map(id => `classification:${id}`), 'my:subject:preferences' ]\r\n };\r\n },\r\n\r\n /**\r\n * Levels\r\n */\r\n allLevelPreferences(): Flight.Request {\r\n return {\r\n url: endpoints.allLevelPreferences(),\r\n key: `level:preference:options`,\r\n normalize: false,\r\n expiryTime: Infinity\r\n };\r\n },\r\n\r\n myLevelPreferences(success?: (data: any) => void): Flight.Request {\r\n return {\r\n url: endpoints.myLevelPreferences(),\r\n key: `my:level:preferences`,\r\n normalize: false,\r\n expiryTime: Infinity,\r\n success\r\n };\r\n },\r\n\r\n followLevels(\r\n levelIds: string[],\r\n success: () => void,\r\n error?: () => void,\r\n always?: () => void\r\n ): Flight.Request {\r\n return {\r\n url: endpoints.followLevels(),\r\n key: `follow:levels`,\r\n data: levelIds,\r\n type: HttpVerbs.POST,\r\n success,\r\n error,\r\n always,\r\n invalidationKeys: ['my:level:preferences']\r\n };\r\n },\r\n\r\n unfollowLevels(\r\n levelIds: string[],\r\n success: () => void,\r\n error?: () => void,\r\n always?: () => void\r\n ): Flight.Request {\r\n return {\r\n url: endpoints.unfollowLevels(levelIds),\r\n key: `unfollow:levels`,\r\n type: HttpVerbs.DELETE,\r\n success,\r\n error,\r\n always,\r\n invalidationKeys: ['my:level:preferences']\r\n };\r\n }\r\n};","import { useDispatch, useSelector } from 'react-redux';\r\nimport { Flight } from 'libs/common/flight';\r\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\r\nimport { HashObject, ApplicationState } from 'libs/common/react/interfaces';\r\nimport { BaseObject } from 'libs/shared/interfaces';\r\n\r\nconst BATCH_SIZE = 25;\r\n\r\n/**\r\n * Used to fetch multiple items by id with Flight. Will fetch 25 items at a time firing off multiple\r\n * requests if there are more than 25 items.\r\n * This will return null until we have all our items. Items will be returned as an object with\r\n * their ids as they key for easy mapping\r\n * \r\n * @param itemIds \r\n * @param getRequest \r\n */\r\nexport function useBatchFetch<T extends BaseObject>(\r\n itemIds: string[], getRequest: (ids: string[]) => Flight.Request\r\n): { [key: string]: T} {\r\n const dispatch = useDispatch();\r\n return useSelector((state: ApplicationState) => {\r\n if (!itemIds?.length)\r\n return null;\r\n\r\n const uniqueItemIds = ArrayHelper.uniq(itemIds);\r\n let items: { [key: string]: T} = {};\r\n\r\n /* Used locally to only return our items if we've fetched all of them */\r\n const status: HashObject = {};\r\n\r\n for (let i = 0; i < uniqueItemIds.length; i += BATCH_SIZE) {\r\n const ids = uniqueItemIds.slice(i, i + BATCH_SIZE);\r\n\r\n const request = getRequest(ids);\r\n const response = Flight.getResponse<T[]>(state, request.key);\r\n status[i] = !!response.data;\r\n\r\n if (response.shouldFetch)\r\n Flight.fetch(dispatch, request);\r\n\r\n if (response.data)\r\n response.data.forEach(v => items[v.id] = v);\r\n }\r\n\r\n return Object.keys(status).every(k => status[k]) ? items : null;\r\n });\r\n}","import * as React from 'react';\r\nimport * as moment from 'moment';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { Flight } from 'libs/common/flight';\r\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\r\nimport { Classification, Config } from 'libs/shared/interfaces';\r\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\r\nimport { LocationContext, WorkflowPhase, UserAction, EntityType, ToggleDescriptor } from 'libs/analytics/interfaces';\r\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\r\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\r\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\r\nimport { useBatchFetch } from 'libs/shared/hooks/UseBatchFetch';\r\nimport { ContentUpdateRequests } from 'libs/shared/apps/content-updates/flight-requests/ContentUpdateRequests';\r\nimport { ContentUpdateAppLinks, ContentUpdate, ClassificationVideosGrouping } from 'libs/shared/apps/content-updates/interfaces';\r\nimport { useSetPageTitle } from 'libs/common/react/hooks/UseSetPageTitle';\r\n\r\nimport { WhatsNewBreadcrumbs } from 'apps/content-updates/components';\r\n\r\nimport { ContentUpdateClassification } from './components/ContentUpdateClassification';\r\n\r\nconst INITIAL_VIDEO_COUNT = 3;\r\nconst namespace = 'contentUpdates.contentUpdatesView';\r\n\r\nfunction map(\r\n contentUpdates: ClassificationVideosGrouping[],\r\n classifications: {[key: string]: Classification}\r\n): ContentUpdate[] {\r\n if (!contentUpdates || !classifications)\r\n return null;\r\n\r\n return contentUpdates.map((c): ContentUpdate => {\r\n return {\r\n showMore: c.videos.length > INITIAL_VIDEO_COUNT,\r\n classification: classifications[c.classificationId],\r\n videos: c.videos.map((m: any) => {\r\n m.classification = classifications[m.classificationId];\r\n return m;\r\n }).filter(v => v)\r\n };\r\n });\r\n}\r\n\r\ninterface FollowSpinnersMap {\r\n [classificationId: string]: boolean;\r\n}\r\n\r\ninterface ContentUpdatesViewProps {\r\n appLinks: ContentUpdateAppLinks;\r\n}\r\n\r\nexport function ContentUpdatesView(props: ContentUpdatesViewProps): JSX.Element {\r\n const [ followSpinners, setFollowSpinners ] = React.useState<FollowSpinnersMap>({});\r\n\r\n const dispatch = useDispatch();\r\n const alerts = useAlerts();\r\n\r\n useSetPageTitle(LanguageService.getPhrase(namespace, 'pageTitle'));\r\n\r\n const from = moment().subtract(1, 'year').toISOString();\r\n const to = moment().toISOString();\r\n\r\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config);\r\n const contentUpdates = Flight.useBasicFetch<ClassificationVideosGrouping[]>(\r\n ContentUpdateRequests.getContentUpdates(from, to)\r\n );\r\n const subjectPreferences = Flight.useBasicFetch<Classification[]>(PreferenceRequests.mySubjectPreferences());\r\n\r\n /* Map content update response into list of video ids and classification ids*/\r\n const classificationIds: string[] = [];\r\n contentUpdates.data && contentUpdates.data.forEach(c => classificationIds.push(c.classificationId));\r\n\r\n /* Batch fetch the videos and classifications by id */\r\n const classifications = useBatchFetch<Classification>(\r\n classificationIds, (ids: string[]) => ContentUpdateRequests.getClassifications(ids));\r\n\r\n\r\n /** Callbacks */\r\n function onFollow(classificationId: string, follow: boolean): void {\r\n setFollowSpinners(currentState => ({\r\n ...currentState,\r\n [classificationId]: true\r\n }));\r\n\r\n const onSuccess = () => {\r\n setFollowSpinners(currentState => ({\r\n ...currentState,\r\n [classificationId]: false\r\n }));\r\n\r\n AnalyticsHelper.logUserAction({\r\n id: classificationId,\r\n name: classifications[classificationId]?.name\r\n }, {\r\n location: LocationContext.ContentUpdatesClassificationBanner,\r\n workflowPhase: WorkflowPhase.Complete,\r\n descriptor: follow ? ToggleDescriptor.On : ToggleDescriptor.Off,\r\n actionType: UserAction.Follow,\r\n entity: EntityType.Classification\r\n });\r\n\r\n alerts.success(LanguageService.getPhrase(\r\n namespace,\r\n follow ? 'followed' : 'unfollowed',\r\n { classification: classifications[classificationId]?.name }\r\n ));\r\n };\r\n\r\n const onError = () => {\r\n setFollowSpinners(currentState => ({\r\n ...currentState,\r\n [classificationId]: false\r\n }));\r\n\r\n alerts.error(LanguageService.getPhrase(namespace, 'error'));\r\n };\r\n\r\n const request = follow ?\r\n PreferenceRequests.followSubjects([classificationId], onSuccess, onError) :\r\n PreferenceRequests.unfollowSubjects([classificationId], onSuccess, onError);\r\n\r\n Flight.fetch(dispatch, request);\r\n }\r\n\r\n if (!contentUpdates.data || !config.data || !subjectPreferences.data || !classifications)\r\n return <></>;\r\n\r\n /* Build out array of content updates from our lists of videos and classifications */\r\n const mappedUpdates = map(contentUpdates.data, classifications);\r\n const preferredSubjectIds = subjectPreferences.data.map(subject => subject.id);\r\n\r\n return (\r\n <div className='bg-white px-3'>\r\n <WhatsNewBreadcrumbs\r\n dashboardAppLink={props.appLinks.dashboardAppLink}\r\n />\r\n {mappedUpdates.map((c: ContentUpdate) => (\r\n <ContentUpdateClassification\r\n classification={c.classification}\r\n videos={c.videos}\r\n imageCdnUrl={config.data.imageCdnUrl}\r\n showMore={c.showMore}\r\n key={c.classification.id}\r\n appLinks={props.appLinks}\r\n followed={preferredSubjectIds.includes(c.classification.id)}\r\n follow={onFollow}\r\n showFollowSpinner={followSpinners[c.classification.id]}\r\n />\r\n ))}\r\n </div>\r\n );\r\n}","import * as React from 'react';\r\n\r\nimport { Classification } from 'libs/shared/interfaces';\r\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\r\nimport { Text } from 'libs/shared/components/text/Text';\r\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\r\nimport { ImageType, ImageSize, ResizeType } from 'libs/shared/enums/Images';\r\nimport { VideoWithClassification, ContentUpdateAppLinks } from 'libs/shared/apps/content-updates/interfaces';\r\n\r\nimport { ClassificationBanner } from 'apps/content-updates/components';\r\nimport { SortableVideoListContainer } from 'apps/playlists/components/video-list';\r\n\r\nconst namespace = 'contentUpdates.contentUpdatesView';\r\n\r\ninterface ClassificationProps {\r\n classification: Classification;\r\n videos: VideoWithClassification[];\r\n imageCdnUrl: string;\r\n showMore: boolean;\r\n // reason: any;\r\n appLinks: ContentUpdateAppLinks;\r\n followed: boolean;\r\n follow: (classificationId: string, follow: boolean) => void;\r\n showFollowSpinner: boolean;\r\n}\r\n\r\nexport function ContentUpdateClassification(props: ClassificationProps): JSX.Element {\r\n const { classification, videos, imageCdnUrl, showMore, followed } = props;\r\n\r\n const url = ImageHelper.createBannerUrl(classification.banner, {\r\n fallbackBaseUrl: imageCdnUrl,\r\n fallbackCategoryName: classification.name,\r\n type: ImageType.Banners\r\n }, { size: ImageSize.Small, resizeType: ResizeType.Cover });\r\n\r\n return (\r\n <div className='mb-3'>\r\n <ClassificationBanner\r\n classification={classification}\r\n backgroundUrl={url}\r\n getClassificationAppLink={props.appLinks.getClassificationAppLink}\r\n followed={followed}\r\n follow={props.follow}\r\n showFollowSpinner={props.showFollowSpinner}\r\n />\r\n <SortableVideoListContainer\r\n playlistId={'0'}\r\n isUserSignedIn={true}\r\n onSortComplete={() => {}}\r\n videos={videos}\r\n getVideoAppLink={props.appLinks.getVideoAppLink}\r\n getSeriesAppLink={props.appLinks.getSeriesAppLink}\r\n />\r\n {showMore &&\r\n <div className={'show-more'}>\r\n <AppLink className='info-link' appLink={props.appLinks.getClassificationUpdateAppLink(classification)}>\r\n <Text namespace={namespace} phrase='showMore' options={{\r\n classificationName: classification.name\r\n }} />\r\n </AppLink>\r\n </div>\r\n }\r\n </div>\r\n );\r\n}","export * from './SortableVideoListContainer';"],"sourceRoot":""}