@clickview/lite 0.0.26-dev.1 → 0.0.26-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/0.chunk.css +2 -2
- package/dist/css/28.chunk.css +1 -1
- package/dist/css/36.chunk.css +1 -1
- package/dist/en.json +1 -1
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +1 -0
- package/dist/libs/common/src/backbone/utils/LocalStorageHelper.d.ts +1 -1
- package/dist/libs/common/src/react/hooks/UseViewModel.d.ts +8 -0
- package/dist/libs/shared/src/apps/playlists/utils/PlaylistSortHelper.d.ts +1 -0
- package/dist/libs/shared/src/apps/subjects/components/audience-filter/AudienceFilter.d.ts +3 -3
- package/dist/libs/shared/src/apps/subjects/hooks/useAudienceFilter.d.ts +10 -0
- package/dist/libs/shared/src/components/thumbnails/video/VideoThumbnail.d.ts +1 -1
- package/dist/libs/shared/src/constants/SharedViewModelKeys.d.ts +1 -0
- package/dist/libs/shared/src/flight-requests/FavouriteVideoRequests.d.ts +1 -1
- package/dist/libs/shared/src/interfaces/models/ClassroomGroup.d.ts +1 -1
- package/dist/projects/lite/src/app.d.ts +1 -0
- package/dist/projects/lite/src/apps/dashboard/flight-requests/DashboardRequests.d.ts +1 -0
- package/dist/projects/lite/src/apps/playlists/views/playlists/PlaylistsView.d.ts +1 -1
- package/dist/projects/lite/src/shared/constants/LiteViewModels.d.ts +1 -0
- package/dist/scripts/0-2d31d283ae.chunk.js +1 -0
- package/dist/scripts/{1-8027d5d7a2.chunk.js → 1-416147a365.chunk.js} +3 -3
- package/dist/scripts/{10-8b52a5b2a9.chunk.js → 10-6f924160d4.chunk.js} +1 -1
- package/dist/scripts/11-bb4335845c.chunk.js +1 -0
- package/dist/scripts/{12-5a9f0cff7a.chunk.js → 12-c98f636456.chunk.js} +1 -1
- package/dist/scripts/13-f440a979f2.chunk.js +1 -0
- package/dist/scripts/14-96e2ac4c4e.chunk.js +1 -0
- package/dist/scripts/17-ae3c652b7f.chunk.js +1 -0
- package/dist/scripts/18-70bed357d5.chunk.js +1 -0
- package/dist/scripts/19-fd97756828.chunk.js +1 -0
- package/dist/scripts/2-9458935561.chunk.js +1 -0
- package/dist/scripts/20-f660938e48.chunk.js +1 -0
- package/dist/scripts/21-6b5bac2388.chunk.js +1 -0
- package/dist/scripts/22-d2e93288e2.chunk.js +1 -0
- package/dist/scripts/{23-8fa9630961.chunk.js → 23-cef41d75a0.chunk.js} +1 -1
- package/dist/scripts/{24-1b298386e9.chunk.js → 24-bce9e631d6.chunk.js} +1 -1
- package/dist/scripts/25-db36457320.chunk.js +1 -0
- package/dist/scripts/26-5aed5ee0dd.chunk.js +1 -0
- package/dist/scripts/27-7f8deea7e3.chunk.js +1 -0
- package/dist/scripts/{28-992fa1d7d3.chunk.js → 28-5f765079fd.chunk.js} +1 -1
- package/dist/scripts/29-0b8214340f.chunk.js +1 -0
- package/dist/scripts/{3-0490c565bc.chunk.js → 3-96cf66c7ed.chunk.js} +1 -1
- package/dist/scripts/30-2f39246be7.chunk.js +1 -0
- package/dist/scripts/{31-35db520dd1.chunk.js → 31-29dea56635.chunk.js} +1 -1
- package/dist/scripts/32-bbaee512ce.chunk.js +1 -0
- package/dist/scripts/33-46803f3fef.chunk.js +1 -0
- package/dist/scripts/34-c017ae74c8.chunk.js +53 -0
- package/dist/scripts/{35-c03686c46a.chunk.js → 35-7da451a1c9.chunk.js} +1 -1
- package/dist/scripts/{36-83d6842746.chunk.js → 36-57ab543f4f.chunk.js} +1 -1
- package/dist/scripts/{37-c3430bac04.chunk.js → 37-80c7b6220d.chunk.js} +1 -1
- package/dist/scripts/38-50ed73316a.chunk.js +1 -0
- package/dist/scripts/39-3adf4ecd44.chunk.js +1 -0
- package/dist/scripts/4-6611628e1a.chunk.js +1 -0
- package/dist/scripts/40-3872135793.chunk.js +1 -0
- package/dist/scripts/{41-900e1bf0e1.chunk.js → 41-9a1c72850a.chunk.js} +1 -1
- package/dist/scripts/42-4932b5ac21.chunk.js +1 -0
- package/dist/scripts/{43-24d8ad0345.chunk.js → 43-22cf86a966.chunk.js} +1 -1
- package/dist/scripts/44-b62663ca9d.chunk.js +1 -0
- package/dist/scripts/45-0d8523abe9.chunk.js +1 -0
- package/dist/scripts/{46-b0dd9697cf.chunk.js → 46-fe9870ac23.chunk.js} +1 -1
- package/dist/scripts/{47-2b4a82f4ad.chunk.js → 47-6dffaed1d7.chunk.js} +1 -1
- package/dist/scripts/{48-982a605bb0.chunk.js → 48-7220efc4d6.chunk.js} +1 -1
- package/dist/scripts/{49-8226f8d1ba.chunk.js → 49-ae885df086.chunk.js} +1 -1
- package/dist/scripts/5-4177d478cc.chunk.js +1 -0
- package/dist/scripts/{50-dcc75825be.chunk.js → 50-f9157fe86a.chunk.js} +2 -2
- package/dist/scripts/{51-1f52bbeb15.chunk.js → 51-9c714f222a.chunk.js} +1 -1
- package/dist/scripts/{52-a15b2e7c02.chunk.js → 52-40b5bed763.chunk.js} +1 -1
- package/dist/scripts/{53-4cd55bd586.chunk.js → 53-b1a06f2260.chunk.js} +1 -1
- package/dist/scripts/{54-aa1a08cdbf.chunk.js → 54-adc0aca3b2.chunk.js} +1 -1
- package/dist/scripts/{55-c969a4fc28.chunk.js → 55-89cef329b2.chunk.js} +1 -1
- package/dist/scripts/{56-68fdf84a0d.chunk.js → 56-0dddea6e48.chunk.js} +1 -1
- package/dist/scripts/{57-db5bdeea30.chunk.js → 57-8fb86637a6.chunk.js} +1 -1
- package/dist/scripts/{58-df23c1a02e.chunk.js → 58-72d868bb97.chunk.js} +1 -1
- package/dist/scripts/{59-2d38ae02a6.chunk.js → 59-f186c23ddf.chunk.js} +1 -1
- package/dist/scripts/{6-1b789e45e3.chunk.js → 6-615cc3317e.chunk.js} +1 -1
- package/dist/scripts/{60-b5000feaed.chunk.js → 60-60ea3e256b.chunk.js} +1 -1
- package/dist/scripts/{61-280ba38bbf.chunk.js → 61-fba9617716.chunk.js} +1 -1
- package/dist/scripts/{62-9a61055529.chunk.js → 62-39c21de14e.chunk.js} +1 -1
- package/dist/scripts/{63-ecc242395a.chunk.js → 63-d1c111fcd5.chunk.js} +1 -1
- package/dist/scripts/{64-077f9961a9.chunk.js → 64-33b287c3c2.chunk.js} +1 -1
- package/dist/scripts/{65-0463ba68c3.chunk.js → 65-889dba985e.chunk.js} +1 -1
- package/dist/scripts/{66-851f0b0243.chunk.js → 66-00f7b4a21f.chunk.js} +1 -1
- package/dist/scripts/{67-103e97e558.chunk.js → 67-d923fb11ed.chunk.js} +1 -1
- package/dist/scripts/{68-7a80380425.chunk.js → 68-85a8867bd2.chunk.js} +1 -1
- package/dist/scripts/{69-7d9f3514e6.chunk.js → 69-0fc67deac3.chunk.js} +1 -1
- package/dist/scripts/7-79961729d4.chunk.js +1 -0
- package/dist/scripts/{70-fd6b603857.chunk.js → 70-8b68b786a9.chunk.js} +1 -1
- package/dist/scripts/{71-b002267371.chunk.js → 71-81cbd9cbe0.chunk.js} +1 -1
- package/dist/scripts/{72-7b99de33d0.chunk.js → 72-ea543ecb4d.chunk.js} +1 -1
- package/dist/scripts/73-32bacce3b9.chunk.js +1 -0
- package/dist/scripts/{74-72227ec214.chunk.js → 74-5b7c16baa1.chunk.js} +1 -1
- package/dist/scripts/{75-d463b7002b.chunk.js → 75-81b94320b7.chunk.js} +1 -1
- package/dist/scripts/{76-5780bbb319.chunk.js → 76-9e8154e3d1.chunk.js} +1 -1
- package/dist/scripts/{77-7ea0e086de.chunk.js → 77-d57229038b.chunk.js} +1 -1
- package/dist/scripts/{78-11cad53884.chunk.js → 78-cd93b07a63.chunk.js} +1 -1
- package/dist/scripts/{79-90eb976e11.chunk.js → 79-999b00ee35.chunk.js} +1 -1
- package/dist/scripts/{8-fe4d1fcbb5.chunk.js → 8-f1d54ac54a.chunk.js} +1 -1
- package/dist/scripts/80-7a85bbaf88.chunk.js +1 -0
- package/dist/scripts/81-a589326f2f.chunk.js +1 -0
- package/dist/scripts/{82-3326a696b2.chunk.js → 82-660d825e60.chunk.js} +1 -1
- package/dist/scripts/{9-753761ada2.chunk.js → 9-d2c18751ff.chunk.js} +1 -1
- package/dist/scripts/bundle-99c49275bf.min.js +31 -0
- package/dist/scripts/bundles.json +2 -2
- package/dist/scripts/polyfills-b23c61c24c.min.js +1 -0
- package/package.json +3 -3
- package/dist/css/0.chunk.css.map +0 -1
- package/dist/css/1.chunk.css +0 -226
- package/dist/css/1.chunk.css.map +0 -1
- package/dist/css/10.chunk.css +0 -101
- package/dist/css/10.chunk.css.map +0 -1
- package/dist/css/11.chunk.css.map +0 -1
- package/dist/css/12.chunk.css.map +0 -1
- package/dist/css/13.chunk.css +0 -42
- package/dist/css/13.chunk.css.map +0 -1
- package/dist/css/14.chunk.css +0 -42
- package/dist/css/14.chunk.css.map +0 -1
- package/dist/css/15.chunk.css +0 -86
- package/dist/css/15.chunk.css.map +0 -1
- package/dist/css/16.chunk.css +0 -25
- package/dist/css/16.chunk.css.map +0 -1
- package/dist/css/17.chunk.css.map +0 -1
- package/dist/css/18.chunk.css.map +0 -1
- package/dist/css/19.chunk.css.map +0 -1
- package/dist/css/2.chunk.css.map +0 -1
- package/dist/css/20.chunk.css.map +0 -1
- package/dist/css/21.chunk.css.map +0 -1
- package/dist/css/22.chunk.css.map +0 -1
- package/dist/css/23.chunk.css.map +0 -1
- package/dist/css/24.chunk.css.map +0 -1
- package/dist/css/25.chunk.css.map +0 -1
- package/dist/css/26.chunk.css.map +0 -1
- package/dist/css/27.chunk.css.map +0 -1
- package/dist/css/28.chunk.css.map +0 -1
- package/dist/css/29.chunk.css.map +0 -1
- package/dist/css/3.chunk.css +0 -26
- package/dist/css/3.chunk.css.map +0 -1
- package/dist/css/30.chunk.css.map +0 -1
- package/dist/css/31.chunk.css.map +0 -1
- package/dist/css/32.chunk.css.map +0 -1
- package/dist/css/33.chunk.css.map +0 -1
- package/dist/css/34.chunk.css +0 -26
- package/dist/css/34.chunk.css.map +0 -1
- package/dist/css/35.chunk.css.map +0 -1
- package/dist/css/36.chunk.css.map +0 -1
- package/dist/css/37.chunk.css.map +0 -1
- package/dist/css/38.chunk.css.map +0 -1
- package/dist/css/39.chunk.css.map +0 -1
- package/dist/css/40.chunk.css.map +0 -1
- package/dist/css/41.chunk.css.map +0 -1
- package/dist/css/42.chunk.css.map +0 -1
- package/dist/css/43.chunk.css.map +0 -1
- package/dist/css/44.chunk.css.map +0 -1
- package/dist/css/45.chunk.css +0 -17
- package/dist/css/45.chunk.css.map +0 -1
- package/dist/css/46.chunk.css +0 -50
- package/dist/css/46.chunk.css.map +0 -1
- package/dist/css/47.chunk.css +0 -10
- package/dist/css/47.chunk.css.map +0 -1
- package/dist/css/48.chunk.css +0 -40
- package/dist/css/48.chunk.css.map +0 -1
- package/dist/css/49.chunk.css +0 -26
- package/dist/css/49.chunk.css.map +0 -1
- package/dist/css/5.chunk.css.map +0 -1
- package/dist/css/50.chunk.css +0 -14
- package/dist/css/50.chunk.css.map +0 -1
- package/dist/css/51.chunk.css +0 -17
- package/dist/css/51.chunk.css.map +0 -1
- package/dist/css/52.chunk.css +0 -14
- package/dist/css/52.chunk.css.map +0 -1
- package/dist/css/53.chunk.css +0 -6
- package/dist/css/53.chunk.css.map +0 -1
- package/dist/css/54.chunk.css.map +0 -1
- package/dist/css/56.chunk.css +0 -32
- package/dist/css/56.chunk.css.map +0 -1
- package/dist/css/57.chunk.css.map +0 -1
- package/dist/css/58.chunk.css +0 -52
- package/dist/css/58.chunk.css.map +0 -1
- package/dist/css/59.chunk.css.map +0 -1
- package/dist/css/6.chunk.css.map +0 -1
- package/dist/css/60.chunk.css.map +0 -1
- package/dist/css/61.chunk.css.map +0 -1
- package/dist/css/62.chunk.css +0 -52
- package/dist/css/62.chunk.css.map +0 -1
- package/dist/css/63.chunk.css +0 -14
- package/dist/css/63.chunk.css.map +0 -1
- package/dist/css/64.chunk.css.map +0 -1
- package/dist/css/65.chunk.css.map +0 -1
- package/dist/css/66.chunk.css +0 -52
- package/dist/css/66.chunk.css.map +0 -1
- package/dist/css/67.chunk.css +0 -52
- package/dist/css/67.chunk.css.map +0 -1
- package/dist/css/68.chunk.css +0 -14
- package/dist/css/68.chunk.css.map +0 -1
- package/dist/css/69.chunk.css +0 -14
- package/dist/css/69.chunk.css.map +0 -1
- package/dist/css/7.chunk.css.map +0 -1
- package/dist/css/70.chunk.css +0 -43
- package/dist/css/70.chunk.css.map +0 -1
- package/dist/css/71.chunk.css +0 -43
- package/dist/css/71.chunk.css.map +0 -1
- package/dist/css/72.chunk.css +0 -43
- package/dist/css/72.chunk.css.map +0 -1
- package/dist/css/73.chunk.css +0 -43
- package/dist/css/73.chunk.css.map +0 -1
- package/dist/css/78.chunk.css +0 -83
- package/dist/css/78.chunk.css.map +0 -1
- package/dist/css/8.chunk.css.map +0 -1
- package/dist/css/83.chunk.css +0 -9
- package/dist/css/83.chunk.css.map +0 -1
- package/dist/css/84.chunk.css +0 -38
- package/dist/css/84.chunk.css.map +0 -1
- package/dist/css/85.chunk.css +0 -68
- package/dist/css/85.chunk.css.map +0 -1
- package/dist/css/86.chunk.css +0 -5
- package/dist/css/86.chunk.css.map +0 -1
- package/dist/css/87.chunk.css +0 -5
- package/dist/css/87.chunk.css.map +0 -1
- package/dist/css/89.chunk.css +0 -40
- package/dist/css/89.chunk.css.map +0 -1
- package/dist/css/9.chunk.css.map +0 -1
- package/dist/css/90.chunk.css +0 -8
- package/dist/css/90.chunk.css.map +0 -1
- package/dist/css/91.chunk.css +0 -8
- package/dist/css/91.chunk.css.map +0 -1
- package/dist/css/92.chunk.css +0 -32
- package/dist/css/92.chunk.css.map +0 -1
- package/dist/css/93.chunk.css +0 -32
- package/dist/css/93.chunk.css.map +0 -1
- package/dist/css/94.chunk.css +0 -5
- package/dist/css/94.chunk.css.map +0 -1
- package/dist/css/lite-app.css.map +0 -1
- package/dist/libs/common/src/react/hooks/useViewModel.d.ts +0 -4
- package/dist/libs/shared/src/apps/subjects/hooks/useAudienceParams.d.ts +0 -5
- package/dist/libs/shared/src/apps/subjects/reducers/AudienceReducer.d.ts +0 -11
- package/dist/libs/shared/src/enums/PlayerMediaType.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/interactive.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/interactives/ActionableItem.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/interactives/Interaction.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/models/interactives/InteractionType.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/interactives/InteractionTypeId.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/interactives/Interactive.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/interactives/Timepoint.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/interactives/index.d.ts +0 -6
- package/dist/libs/shared/src/utils/DashboardHelper.d.ts +0 -9
- package/dist/projects/lite/src/apps/classrooms/components/classroom-group/ClassroomGroup.d.ts +0 -7
- package/dist/projects/lite/src/apps/classrooms/components/classroom-students-list/empty-state/ClassroomStudentsListEmptyState.d.ts +0 -2
- package/dist/projects/lite/src/apps/classrooms/components/tile-actions/TileActions.d.ts +0 -12
- package/dist/projects/lite/src/apps/classrooms/enums/GroupColour.d.ts +0 -10
- package/dist/projects/lite/src/apps/search/components/filter-types/radio-filter/year-level/YearLevelRadioFilter.d.ts +0 -8
- package/dist/projects/lite/src/apps/search/flight-requests/index.d.ts +0 -1
- package/dist/projects/lite/src/apps/share/components/sharee-item/ShareeItem.d.ts +0 -8
- package/dist/projects/lite/src/apps/share/views/main-view/MainShareView.d.ts +0 -11
- package/dist/projects/lite/src/apps/share/views/settings-view/ShareSettingsView.d.ts +0 -9
- package/dist/projects/lite/src/apps/user-manager/interfaces/mocks/MockClassroom.d.ts +0 -8
- package/dist/projects/lite/src/apps/user-manager/views/bulk-upload-users/BulkUploadUsersView.d.ts +0 -8
- package/dist/projects/lite/src/apps/user-manager/views/user-upload-duplicates/UserUploadDuplicatesView.d.ts +0 -8
- package/dist/projects/lite/src/apps/user-manager/views/user-upload-review/UserUploadReviewView.d.ts +0 -8
- package/dist/projects/lite/src/shared/components/share/copy-embed-html/CopyEmbedHtml.d.ts +0 -8
- package/dist/projects/lite/src/shared/components/share/result-templates/user/InstantUserTemplate.d.ts +0 -8
- package/dist/projects/lite/src/shared/components/share/sharee-item/ShareeItem.d.ts +0 -7
- package/dist/projects/lite/src/shared/components/share/tokenized-typeahead/InputSelection.d.ts +0 -8
- package/dist/projects/lite/src/shared/components/share/tokenized-typeahead/TokenizedTypeahead.d.ts +0 -21
- package/dist/projects/lite/src/shared/flight-requests/ShareRequests.d.ts +0 -5
- package/dist/projects/lite/src/shared/hooks/useGetEdgeToEdge.d.ts +0 -6
- package/dist/projects/lite/src/shared/interfaces/mocks/MockClassroomGroup.d.ts +0 -6
- package/dist/projects/lite/src/shared/interfaces/mocks/index.d.ts +0 -1
- package/dist/projects/lite/src/shared/services/SettingsDataService.d.ts +0 -10
- package/dist/projects/lite/src/shared/views/create-clip/CreateClipView.d.ts +0 -6
- package/dist/projects/lite/src/shared/views/left-nav/partial-loading/PartialLeftNavItem.d.ts +0 -2
- package/dist/projects/lite/src/shared/views/play-shared/PlaySharedView.d.ts +0 -6
- package/dist/projects/lite/src/shared/views/share/ShareView.d.ts +0 -9
- package/dist/projects/lite/src/shared/views/share/main-view/MainShareView.d.ts +0 -11
- package/dist/projects/lite/src/shared/views/share/settings-view/ShareSettingsView.d.ts +0 -9
- package/dist/projects/player/src/react/EmbeddedPlayer.d.ts +0 -7
- package/dist/scripts/0-e994a1b4d7.chunk.js +0 -1
- package/dist/scripts/0.chunk.js +0 -332
- package/dist/scripts/0.chunk.js.map +0 -1
- package/dist/scripts/1.chunk.js +0 -1130
- package/dist/scripts/1.chunk.js.map +0 -1
- package/dist/scripts/10.chunk.js +0 -2334
- package/dist/scripts/10.chunk.js.map +0 -1
- package/dist/scripts/100.chunk.js +0 -453
- package/dist/scripts/100.chunk.js.map +0 -1
- package/dist/scripts/101.chunk.js +0 -161
- package/dist/scripts/101.chunk.js.map +0 -1
- package/dist/scripts/102.chunk.js +0 -91
- package/dist/scripts/102.chunk.js.map +0 -1
- package/dist/scripts/103.chunk.js +0 -84
- package/dist/scripts/103.chunk.js.map +0 -1
- package/dist/scripts/11-7a8c344ea6.chunk.js +0 -1
- package/dist/scripts/11.chunk.js +0 -1682
- package/dist/scripts/11.chunk.js.map +0 -1
- package/dist/scripts/12.chunk.js +0 -484
- package/dist/scripts/12.chunk.js.map +0 -1
- package/dist/scripts/13-b5d5d7bdfa.chunk.js +0 -1
- package/dist/scripts/13.chunk.js +0 -260
- package/dist/scripts/13.chunk.js.map +0 -1
- package/dist/scripts/14-28375f71fa.chunk.js +0 -1
- package/dist/scripts/14.chunk.js +0 -1183
- package/dist/scripts/14.chunk.js.map +0 -1
- package/dist/scripts/15.chunk.js +0 -788
- package/dist/scripts/15.chunk.js.map +0 -1
- package/dist/scripts/16.chunk.js +0 -442
- package/dist/scripts/16.chunk.js.map +0 -1
- package/dist/scripts/17-b4479339d2.chunk.js +0 -1
- package/dist/scripts/17.chunk.js +0 -879
- package/dist/scripts/17.chunk.js.map +0 -1
- package/dist/scripts/18-60f3cd6ee4.chunk.js +0 -1
- package/dist/scripts/18.chunk.js +0 -1140
- package/dist/scripts/18.chunk.js.map +0 -1
- package/dist/scripts/19-df1dc3ef2f.chunk.js +0 -1
- package/dist/scripts/19.chunk.js +0 -541
- package/dist/scripts/19.chunk.js.map +0 -1
- package/dist/scripts/2-dbb770fac8.chunk.js +0 -1
- package/dist/scripts/2.chunk.js +0 -18795
- package/dist/scripts/2.chunk.js.map +0 -1
- package/dist/scripts/20-9615a8e5b8.chunk.js +0 -1
- package/dist/scripts/20.chunk.js +0 -369
- package/dist/scripts/20.chunk.js.map +0 -1
- package/dist/scripts/21-30ec979fe0.chunk.js +0 -1
- package/dist/scripts/21.chunk.js +0 -272
- package/dist/scripts/21.chunk.js.map +0 -1
- package/dist/scripts/22-b278cab988.chunk.js +0 -1
- package/dist/scripts/22.chunk.js +0 -2164
- package/dist/scripts/22.chunk.js.map +0 -1
- package/dist/scripts/23.chunk.js +0 -20753
- package/dist/scripts/23.chunk.js.map +0 -1
- package/dist/scripts/24.chunk.js +0 -2288
- package/dist/scripts/24.chunk.js.map +0 -1
- package/dist/scripts/25-888b6248ff.chunk.js +0 -1
- package/dist/scripts/25.chunk.js +0 -2110
- package/dist/scripts/25.chunk.js.map +0 -1
- package/dist/scripts/26-aaabbf241e.chunk.js +0 -1
- package/dist/scripts/26.chunk.js +0 -1603
- package/dist/scripts/26.chunk.js.map +0 -1
- package/dist/scripts/27-3dc1f5803f.chunk.js +0 -1
- package/dist/scripts/27.chunk.js +0 -770
- package/dist/scripts/27.chunk.js.map +0 -1
- package/dist/scripts/28.chunk.js +0 -1460
- package/dist/scripts/28.chunk.js.map +0 -1
- package/dist/scripts/29-ae81a5e250.chunk.js +0 -1
- package/dist/scripts/29.chunk.js +0 -899
- package/dist/scripts/29.chunk.js.map +0 -1
- package/dist/scripts/3.chunk.js +0 -741
- package/dist/scripts/3.chunk.js.map +0 -1
- package/dist/scripts/30-75d0f41d0f.chunk.js +0 -1
- package/dist/scripts/30.chunk.js +0 -792
- package/dist/scripts/30.chunk.js.map +0 -1
- package/dist/scripts/31.chunk.js +0 -825
- package/dist/scripts/31.chunk.js.map +0 -1
- package/dist/scripts/32-d62f3a69c0.chunk.js +0 -1
- package/dist/scripts/32.chunk.js +0 -848
- package/dist/scripts/32.chunk.js.map +0 -1
- package/dist/scripts/33-8ec9d596c5.chunk.js +0 -1
- package/dist/scripts/33.chunk.js +0 -793
- package/dist/scripts/33.chunk.js.map +0 -1
- package/dist/scripts/34-7f80fea1f9.chunk.js +0 -53
- package/dist/scripts/34.chunk.js +0 -817
- package/dist/scripts/34.chunk.js.map +0 -1
- package/dist/scripts/35.chunk.js +0 -520
- package/dist/scripts/35.chunk.js.map +0 -1
- package/dist/scripts/36.chunk.js +0 -717
- package/dist/scripts/36.chunk.js.map +0 -1
- package/dist/scripts/37.chunk.js +0 -538
- package/dist/scripts/37.chunk.js.map +0 -1
- package/dist/scripts/38-3e08037fa3.chunk.js +0 -1
- package/dist/scripts/38.chunk.js +0 -438
- package/dist/scripts/38.chunk.js.map +0 -1
- package/dist/scripts/39-bfb5d54572.chunk.js +0 -1
- package/dist/scripts/39.chunk.js +0 -408
- package/dist/scripts/39.chunk.js.map +0 -1
- package/dist/scripts/4-eef3251d84.chunk.js +0 -1
- package/dist/scripts/4.chunk.js +0 -403
- package/dist/scripts/4.chunk.js.map +0 -1
- package/dist/scripts/40-e0eafc5aec.chunk.js +0 -1
- package/dist/scripts/40.chunk.js +0 -533
- package/dist/scripts/40.chunk.js.map +0 -1
- package/dist/scripts/41.chunk.js +0 -814
- package/dist/scripts/41.chunk.js.map +0 -1
- package/dist/scripts/42-6b91ae0603.chunk.js +0 -1
- package/dist/scripts/42.chunk.js +0 -529
- package/dist/scripts/42.chunk.js.map +0 -1
- package/dist/scripts/43.chunk.js +0 -609
- package/dist/scripts/43.chunk.js.map +0 -1
- package/dist/scripts/44-f0664cf45b.chunk.js +0 -1
- package/dist/scripts/44.chunk.js +0 -563
- package/dist/scripts/44.chunk.js.map +0 -1
- package/dist/scripts/45-3173437bfb.chunk.js +0 -1
- package/dist/scripts/45.chunk.js +0 -674
- package/dist/scripts/45.chunk.js.map +0 -1
- package/dist/scripts/46.chunk.js +0 -409
- package/dist/scripts/46.chunk.js.map +0 -1
- package/dist/scripts/47.chunk.js +0 -401
- package/dist/scripts/47.chunk.js.map +0 -1
- package/dist/scripts/48.chunk.js +0 -217
- package/dist/scripts/48.chunk.js.map +0 -1
- package/dist/scripts/49.chunk.js +0 -282
- package/dist/scripts/49.chunk.js.map +0 -1
- package/dist/scripts/5-9cb873330d.chunk.js +0 -1
- package/dist/scripts/5.chunk.js +0 -309
- package/dist/scripts/5.chunk.js.map +0 -1
- package/dist/scripts/50.chunk.js +0 -450
- package/dist/scripts/50.chunk.js.map +0 -1
- package/dist/scripts/51.chunk.js +0 -338
- package/dist/scripts/51.chunk.js.map +0 -1
- package/dist/scripts/52.chunk.js +0 -447
- package/dist/scripts/52.chunk.js.map +0 -1
- package/dist/scripts/53.chunk.js +0 -440
- package/dist/scripts/53.chunk.js.map +0 -1
- package/dist/scripts/54.chunk.js +0 -1533
- package/dist/scripts/54.chunk.js.map +0 -1
- package/dist/scripts/55.chunk.js +0 -574
- package/dist/scripts/55.chunk.js.map +0 -1
- package/dist/scripts/56.chunk.js +0 -245
- package/dist/scripts/56.chunk.js.map +0 -1
- package/dist/scripts/57.chunk.js +0 -230
- package/dist/scripts/57.chunk.js.map +0 -1
- package/dist/scripts/58.chunk.js +0 -480
- package/dist/scripts/58.chunk.js.map +0 -1
- package/dist/scripts/59.chunk.js +0 -408
- package/dist/scripts/59.chunk.js.map +0 -1
- package/dist/scripts/6.chunk.js +0 -1172
- package/dist/scripts/6.chunk.js.map +0 -1
- package/dist/scripts/60.chunk.js +0 -241
- package/dist/scripts/60.chunk.js.map +0 -1
- package/dist/scripts/61.chunk.js +0 -249
- package/dist/scripts/61.chunk.js.map +0 -1
- package/dist/scripts/62.chunk.js +0 -132
- package/dist/scripts/62.chunk.js.map +0 -1
- package/dist/scripts/63.chunk.js +0 -318
- package/dist/scripts/63.chunk.js.map +0 -1
- package/dist/scripts/64.chunk.js +0 -212
- package/dist/scripts/64.chunk.js.map +0 -1
- package/dist/scripts/65.chunk.js +0 -195
- package/dist/scripts/65.chunk.js.map +0 -1
- package/dist/scripts/66.chunk.js +0 -230
- package/dist/scripts/66.chunk.js.map +0 -1
- package/dist/scripts/67.chunk.js +0 -108
- package/dist/scripts/67.chunk.js.map +0 -1
- package/dist/scripts/68.chunk.js +0 -209
- package/dist/scripts/68.chunk.js.map +0 -1
- package/dist/scripts/69.chunk.js +0 -211
- package/dist/scripts/69.chunk.js.map +0 -1
- package/dist/scripts/7-3adb578de5.chunk.js +0 -1
- package/dist/scripts/7.chunk.js +0 -613
- package/dist/scripts/7.chunk.js.map +0 -1
- package/dist/scripts/70.chunk.js +0 -115
- package/dist/scripts/70.chunk.js.map +0 -1
- package/dist/scripts/71.chunk.js +0 -449
- package/dist/scripts/71.chunk.js.map +0 -1
- package/dist/scripts/72.chunk.js +0 -161
- package/dist/scripts/72.chunk.js.map +0 -1
- package/dist/scripts/73-3d149ecedc.chunk.js +0 -1
- package/dist/scripts/73.chunk.js +0 -87
- package/dist/scripts/73.chunk.js.map +0 -1
- package/dist/scripts/74.chunk.js +0 -142
- package/dist/scripts/74.chunk.js.map +0 -1
- package/dist/scripts/75.chunk.js +0 -149
- package/dist/scripts/75.chunk.js.map +0 -1
- package/dist/scripts/76.chunk.js +0 -142
- package/dist/scripts/76.chunk.js.map +0 -1
- package/dist/scripts/77.chunk.js +0 -180
- package/dist/scripts/77.chunk.js.map +0 -1
- package/dist/scripts/78.chunk.js +0 -170
- package/dist/scripts/78.chunk.js.map +0 -1
- package/dist/scripts/79.chunk.js +0 -172
- package/dist/scripts/79.chunk.js.map +0 -1
- package/dist/scripts/8.chunk.js +0 -436
- package/dist/scripts/8.chunk.js.map +0 -1
- package/dist/scripts/80-f4b5d951b3.chunk.js +0 -1
- package/dist/scripts/80.chunk.js +0 -173
- package/dist/scripts/80.chunk.js.map +0 -1
- package/dist/scripts/81-8c42a24988.chunk.js +0 -1
- package/dist/scripts/81.chunk.js +0 -172
- package/dist/scripts/81.chunk.js.map +0 -1
- package/dist/scripts/82.chunk.js +0 -311
- package/dist/scripts/82.chunk.js.map +0 -1
- package/dist/scripts/83.chunk.js +0 -318
- package/dist/scripts/83.chunk.js.map +0 -1
- package/dist/scripts/84.chunk.js +0 -64
- package/dist/scripts/84.chunk.js.map +0 -1
- package/dist/scripts/85.chunk.js +0 -65
- package/dist/scripts/85.chunk.js.map +0 -1
- package/dist/scripts/86.chunk.js +0 -37
- package/dist/scripts/86.chunk.js.map +0 -1
- package/dist/scripts/87.chunk.js +0 -82
- package/dist/scripts/87.chunk.js.map +0 -1
- package/dist/scripts/88.chunk.js +0 -1001
- package/dist/scripts/88.chunk.js.map +0 -1
- package/dist/scripts/89.chunk.js +0 -24
- package/dist/scripts/89.chunk.js.map +0 -1
- package/dist/scripts/9.chunk.js +0 -445
- package/dist/scripts/9.chunk.js.map +0 -1
- package/dist/scripts/90.chunk.js +0 -36
- package/dist/scripts/90.chunk.js.map +0 -1
- package/dist/scripts/91.chunk.js +0 -36
- package/dist/scripts/91.chunk.js.map +0 -1
- package/dist/scripts/92.chunk.js +0 -69
- package/dist/scripts/92.chunk.js.map +0 -1
- package/dist/scripts/93.chunk.js +0 -441
- package/dist/scripts/93.chunk.js.map +0 -1
- package/dist/scripts/94.chunk.js +0 -740
- package/dist/scripts/94.chunk.js.map +0 -1
- package/dist/scripts/95.chunk.js +0 -221
- package/dist/scripts/95.chunk.js.map +0 -1
- package/dist/scripts/96.chunk.js +0 -230
- package/dist/scripts/96.chunk.js.map +0 -1
- package/dist/scripts/97.chunk.js +0 -241
- package/dist/scripts/97.chunk.js.map +0 -1
- package/dist/scripts/98.chunk.js +0 -249
- package/dist/scripts/98.chunk.js.map +0 -1
- package/dist/scripts/99.chunk.js +0 -212
- package/dist/scripts/99.chunk.js.map +0 -1
- package/dist/scripts/bundle-f4a1d3ab76.min.js +0 -31
- package/dist/scripts/bundle.js +0 -119288
- package/dist/scripts/bundle.js.map +0 -1
- package/dist/scripts/pdf.worker.entry.worker.js +0 -46239
- package/dist/scripts/pdf.worker.entry.worker.js.map +0 -1
- package/dist/scripts/polyfills-7ae776aac5.min.js +0 -1
- package/dist/scripts/polyfills.js +0 -15254
- package/dist/scripts/polyfills.js.map +0 -1
package/dist/scripts/22.chunk.js
DELETED
|
@@ -1,2164 +0,0 @@
|
|
|
1
|
-
(window["webpackJsonp_clickview_lite"] = window["webpackJsonp_clickview_lite"] || []).push([[22],{
|
|
2
|
-
|
|
3
|
-
/***/ "../../libs/shared/src/components/video-owner-text/VideoOwnerText.tsx":
|
|
4
|
-
/*!****************************************************************************************************************!*\
|
|
5
|
-
!*** C:/ClickView/front-end/clickview/packages/libs/shared/src/components/video-owner-text/VideoOwnerText.tsx ***!
|
|
6
|
-
\****************************************************************************************************************/
|
|
7
|
-
/*! exports provided: VideoOwnerText */
|
|
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__, "VideoOwnerText", function() { return VideoOwnerText; });
|
|
13
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
-
|
|
16
|
-
function VideoOwnerText(props) {
|
|
17
|
-
var _a, _b, _c, _d;
|
|
18
|
-
|
|
19
|
-
if (!props.owner) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);
|
|
20
|
-
var name = props.owner.name;
|
|
21
|
-
if (props.owner.surname) name += " ".concat(props.owner.surname.substr(0, 1)).toUpperCase();
|
|
22
|
-
var customer = (_b = (_a = props.owner.customers) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
|
|
23
|
-
var customerName = (_d = (_c = customer) === null || _c === void 0 ? void 0 : _c.name, _d !== null && _d !== void 0 ? _d : '');
|
|
24
|
-
if (customerName) name += ', ';
|
|
25
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("small", {
|
|
26
|
-
className: 'clamp-1'
|
|
27
|
-
}, name, customerName && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("em", null, customerName), customerName === 'ClickView' && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, "CV Icon"));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/***/ }),
|
|
31
|
-
|
|
32
|
-
/***/ "../../libs/shared/src/components/widgets/fixed-widget/index.ts":
|
|
33
|
-
/*!**********************************************************************************************************!*\
|
|
34
|
-
!*** C:/ClickView/front-end/clickview/packages/libs/shared/src/components/widgets/fixed-widget/index.ts ***!
|
|
35
|
-
\**********************************************************************************************************/
|
|
36
|
-
/*! exports provided: FixedWidget, initialWidgetState, FixedWidgetReducer, lazyWidgetInit, PartialFixedWidget */
|
|
37
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38
|
-
|
|
39
|
-
"use strict";
|
|
40
|
-
__webpack_require__.r(__webpack_exports__);
|
|
41
|
-
/* harmony import */ var _FixedWidget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FixedWidget */ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidget.tsx");
|
|
42
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FixedWidget", function() { return _FixedWidget__WEBPACK_IMPORTED_MODULE_0__["FixedWidget"]; });
|
|
43
|
-
|
|
44
|
-
/* harmony import */ var _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FixedWidgetReducer */ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidgetReducer.tsx");
|
|
45
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialWidgetState", function() { return _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_1__["initialWidgetState"]; });
|
|
46
|
-
|
|
47
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FixedWidgetReducer", function() { return _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_1__["FixedWidgetReducer"]; });
|
|
48
|
-
|
|
49
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lazyWidgetInit", function() { return _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_1__["lazyWidgetInit"]; });
|
|
50
|
-
|
|
51
|
-
/* harmony import */ var _PartialFixedWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PartialFixedWidget */ "../../libs/shared/src/components/widgets/fixed-widget/PartialFixedWidget.tsx");
|
|
52
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PartialFixedWidget", function() { return _PartialFixedWidget__WEBPACK_IMPORTED_MODULE_2__["PartialFixedWidget"]; });
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/***/ }),
|
|
59
|
-
|
|
60
|
-
/***/ "../../libs/shared/src/components/widgets/items/interactive-widget-item/InteractiveWidgetItem.tsx":
|
|
61
|
-
/*!********************************************************************************************************************************************!*\
|
|
62
|
-
!*** C:/ClickView/front-end/clickview/packages/libs/shared/src/components/widgets/items/interactive-widget-item/InteractiveWidgetItem.tsx ***!
|
|
63
|
-
\********************************************************************************************************************************************/
|
|
64
|
-
/*! exports provided: InteractiveWidgetItem */
|
|
65
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
66
|
-
|
|
67
|
-
"use strict";
|
|
68
|
-
__webpack_require__.r(__webpack_exports__);
|
|
69
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractiveWidgetItem", function() { return InteractiveWidgetItem; });
|
|
70
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
71
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
72
|
-
/* harmony import */ var _common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../common/src/react/utils/TextHelper */ "../../libs/common/src/react/utils/TextHelper.ts");
|
|
73
|
-
/* harmony import */ var _app_link_AppLink__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../app-link/AppLink */ "../../libs/shared/src/components/app-link/AppLink.tsx");
|
|
74
|
-
/* harmony import */ var _thumbnails_video_VideoThumbnail__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../thumbnails/video/VideoThumbnail */ "../../libs/shared/src/components/thumbnails/video/VideoThumbnail.tsx");
|
|
75
|
-
/* harmony import */ var _enums_ThumbnailTextPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../enums/ThumbnailTextPosition */ "../../libs/shared/src/enums/ThumbnailTextPosition.ts");
|
|
76
|
-
/* harmony import */ var _text_Text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../text/Text */ "../../libs/shared/src/components/text/Text.tsx");
|
|
77
|
-
/* harmony import */ var _video_owner_text_VideoOwnerText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../video-owner-text/VideoOwnerText */ "../../libs/shared/src/components/video-owner-text/VideoOwnerText.tsx");
|
|
78
|
-
/* harmony import */ var _enums_Images__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../enums/Images */ "../../libs/shared/src/enums/Images.ts");
|
|
79
|
-
/* harmony import */ var _interactive_widget_item_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./interactive-widget-item.scss */ "../../libs/shared/src/components/widgets/items/interactive-widget-item/interactive-widget-item.scss");
|
|
80
|
-
/* harmony import */ var _interactive_widget_item_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_interactive_widget_item_scss__WEBPACK_IMPORTED_MODULE_8__);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
var namespace = 'shared.interactiveWidgetItem';
|
|
91
|
-
var InteractiveWidgetItem = react__WEBPACK_IMPORTED_MODULE_0___default.a.memo(function (props) {
|
|
92
|
-
var interactiveAppLink = Object.assign(Object.assign({}, props.appLink), {
|
|
93
|
-
args: [props.data.id, _common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_1__["TextHelper"].slugify(props.data.name)]
|
|
94
|
-
});
|
|
95
|
-
var questionsAppLink = Object.assign(Object.assign({}, props.questionsAppLink), {
|
|
96
|
-
args: [props.data.id]
|
|
97
|
-
});
|
|
98
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
99
|
-
className: "flex-shrink-0 px-1 ".concat(_interactive_widget_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.item)
|
|
100
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
101
|
-
className: 'row m-0 border rounded p-2 h-100'
|
|
102
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
103
|
-
className: 'col-6 p-0'
|
|
104
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_thumbnails_video_VideoThumbnail__WEBPACK_IMPORTED_MODULE_3__["VideoThumbnail"], {
|
|
105
|
-
video: props.video,
|
|
106
|
-
interactive: props.data,
|
|
107
|
-
appLink: interactiveAppLink,
|
|
108
|
-
type: 'static',
|
|
109
|
-
videoType: 'interactive',
|
|
110
|
-
imageOptions: {
|
|
111
|
-
size: _enums_Images__WEBPACK_IMPORTED_MODULE_7__["ImageSize"].Small
|
|
112
|
-
},
|
|
113
|
-
textPosition: _enums_ThumbnailTextPosition__WEBPACK_IMPORTED_MODULE_4__["ThumbnailTextPosition"].Independent,
|
|
114
|
-
preload: true
|
|
115
|
-
})), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
116
|
-
className: 'col-6 p-0'
|
|
117
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
118
|
-
className: 'pl-3'
|
|
119
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_app_link_AppLink__WEBPACK_IMPORTED_MODULE_2__["AppLink"], {
|
|
120
|
-
appLink: interactiveAppLink
|
|
121
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", {
|
|
122
|
-
className: 'h6 mb-1 clamp-2'
|
|
123
|
-
}, props.data.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_video_owner_text_VideoOwnerText__WEBPACK_IMPORTED_MODULE_6__["VideoOwnerText"], {
|
|
124
|
-
owner: props.data.owner
|
|
125
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_app_link_AppLink__WEBPACK_IMPORTED_MODULE_2__["AppLink"], {
|
|
126
|
-
className: 'info-link',
|
|
127
|
-
appLink: questionsAppLink
|
|
128
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_text_Text__WEBPACK_IMPORTED_MODULE_5__["Text"], {
|
|
129
|
-
namespace: namespace,
|
|
130
|
-
phrase: 'previewQuestions'
|
|
131
|
-
}))))));
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
/***/ }),
|
|
135
|
-
|
|
136
|
-
/***/ "../../libs/shared/src/components/widgets/items/interactive-widget-item/interactive-widget-item.scss":
|
|
137
|
-
/*!***********************************************************************************************************************************************!*\
|
|
138
|
-
!*** C:/ClickView/front-end/clickview/packages/libs/shared/src/components/widgets/items/interactive-widget-item/interactive-widget-item.scss ***!
|
|
139
|
-
\***********************************************************************************************************************************************/
|
|
140
|
-
/*! no static exports found */
|
|
141
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
142
|
-
|
|
143
|
-
// extracted by mini-css-extract-plugin
|
|
144
|
-
module.exports = {"item":"cv--item--2An5o","thumbnail":"cv--thumbnail--Wvc5s","smallItemIconWidth":"cv--smallItemIconWidth--2IdDd","smallItemInfoWidth":"cv--smallItemInfoWidth--1Iat7","smallProgressBarContainer":"cv--smallProgressBarContainer--17I8T"};
|
|
145
|
-
|
|
146
|
-
/***/ }),
|
|
147
|
-
|
|
148
|
-
/***/ "../../libs/shared/src/flight-requests/PlayerRequests.ts":
|
|
149
|
-
/*!***************************************************************************************************!*\
|
|
150
|
-
!*** C:/ClickView/front-end/clickview/packages/libs/shared/src/flight-requests/PlayerRequests.ts ***!
|
|
151
|
-
\***************************************************************************************************/
|
|
152
|
-
/*! exports provided: PlayerRequests */
|
|
153
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
154
|
-
|
|
155
|
-
"use strict";
|
|
156
|
-
__webpack_require__.r(__webpack_exports__);
|
|
157
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlayerRequests", function() { return PlayerRequests; });
|
|
158
|
-
/* harmony import */ var _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/src/backbone/enums/HttpVerbs */ "../../libs/common/src/backbone/enums/HttpVerbs.ts");
|
|
159
|
-
|
|
160
|
-
var PlayerRequests = {
|
|
161
|
-
createViewKey: function createViewKey(id) {
|
|
162
|
-
return {
|
|
163
|
-
url: "/api/player/create-view-key",
|
|
164
|
-
key: "view:key:".concat(id),
|
|
165
|
-
type: _common_src_backbone_enums_HttpVerbs__WEBPACK_IMPORTED_MODULE_0__["HttpVerbs"].POST,
|
|
166
|
-
data: {
|
|
167
|
-
mediaId: id.toString()
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
/***/ }),
|
|
174
|
-
|
|
175
|
-
/***/ "../player/src/players/interactive-player.ts":
|
|
176
|
-
/*!***************************************************!*\
|
|
177
|
-
!*** ../player/src/players/interactive-player.ts ***!
|
|
178
|
-
\***************************************************/
|
|
179
|
-
/*! exports provided: InteractivePlayer */
|
|
180
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
181
|
-
|
|
182
|
-
"use strict";
|
|
183
|
-
__webpack_require__.r(__webpack_exports__);
|
|
184
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractivePlayer", function() { return InteractivePlayer; });
|
|
185
|
-
/* harmony import */ var _base_player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-player */ "../player/src/players/base-player.ts");
|
|
186
|
-
/* harmony import */ var _plugins_interactive_plugin_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../plugins/interactive-plugin/interfaces */ "../player/src/plugins/interactive-plugin/interfaces/index.ts");
|
|
187
|
-
/* harmony import */ var _plugins_interactive_plugin_interactive_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../plugins/interactive-plugin/interactive-plugin */ "../player/src/plugins/interactive-plugin/interactive-plugin.ts");
|
|
188
|
-
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
189
|
-
function adopt(value) {
|
|
190
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
191
|
-
resolve(value);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
196
|
-
function fulfilled(value) {
|
|
197
|
-
try {
|
|
198
|
-
step(generator.next(value));
|
|
199
|
-
} catch (e) {
|
|
200
|
-
reject(e);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function rejected(value) {
|
|
205
|
-
try {
|
|
206
|
-
step(generator["throw"](value));
|
|
207
|
-
} catch (e) {
|
|
208
|
-
reject(e);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function step(result) {
|
|
213
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
217
|
-
});
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
class InteractivePlayer extends _base_player__WEBPACK_IMPORTED_MODULE_0__["BasePlayer"] {
|
|
224
|
-
constructor(id, options) {
|
|
225
|
-
super(id, options);
|
|
226
|
-
this.onCueChange = this.onCueChange.bind(this);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
additionalSetup(playbackObject) {
|
|
230
|
-
const _super = Object.create(null, {
|
|
231
|
-
additionalSetup: {
|
|
232
|
-
get: () => super.additionalSetup
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
-
_super.additionalSetup.call(this, playbackObject);
|
|
238
|
-
|
|
239
|
-
this.track = this.player.addTextTrack('metadata', 'interactive');
|
|
240
|
-
|
|
241
|
-
if (this.options.mode === _plugins_interactive_plugin_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractiveMode"].Create) {
|
|
242
|
-
this.player.viewInteractivePlugin({
|
|
243
|
-
interactive: {
|
|
244
|
-
id: Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString()
|
|
245
|
-
},
|
|
246
|
-
mode: _plugins_interactive_plugin_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractiveMode"].Create,
|
|
247
|
-
track: this.track
|
|
248
|
-
});
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
const interactive = playbackObject.additionalData;
|
|
253
|
-
interactive.timepoints.forEach(t => {
|
|
254
|
-
const startTime = t.visibleAt / 1000;
|
|
255
|
-
const endTime = t.visibleFor ? startTime + t.visibleFor / 1000 : startTime + 1;
|
|
256
|
-
this.track.addCue({
|
|
257
|
-
startTime,
|
|
258
|
-
endTime,
|
|
259
|
-
text: t.id
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
this.player.viewInteractivePlugin({
|
|
263
|
-
interactive,
|
|
264
|
-
mode: _plugins_interactive_plugin_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractiveMode"].View
|
|
265
|
-
});
|
|
266
|
-
if (this.options.onTimepointChange) this.bindCueChange();
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
bindCueChange() {
|
|
271
|
-
this.track.addEventListener('cuechange', this.onCueChange);
|
|
272
|
-
this.player.on('dispose', () => {
|
|
273
|
-
this.track.removeEventListener('cuechange', this.onCueChange);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
onCueChange() {
|
|
278
|
-
const activeCues = this.track.activeCues;
|
|
279
|
-
|
|
280
|
-
if (!activeCues || !activeCues.length) {
|
|
281
|
-
this.options.onTimepointChange(null);
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
this.options.onTimepointChange(activeCues[0].text);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/***/ }),
|
|
291
|
-
|
|
292
|
-
/***/ "../player/src/plugins/interactive-plugin/components/create-components/create-components.ts":
|
|
293
|
-
/*!**************************************************************************************************!*\
|
|
294
|
-
!*** ../player/src/plugins/interactive-plugin/components/create-components/create-components.ts ***!
|
|
295
|
-
\**************************************************************************************************/
|
|
296
|
-
/*! exports provided: getCreateComponent, getCreateValidation, getCreateSubmit */
|
|
297
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
298
|
-
|
|
299
|
-
"use strict";
|
|
300
|
-
__webpack_require__.r(__webpack_exports__);
|
|
301
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreateComponent", function() { return getCreateComponent; });
|
|
302
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreateValidation", function() { return getCreateValidation; });
|
|
303
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreateSubmit", function() { return getCreateSubmit; });
|
|
304
|
-
/* harmony import */ var _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/interfaces */ "../../libs/shared/src/interfaces/index.ts");
|
|
305
|
-
/* harmony import */ var _create_short_answer_ts_create_short_answer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-short-answer.ts/create-short-answer */ "../player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.tsx");
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
const QuestionLookup = {
|
|
309
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Annotation]: null,
|
|
310
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Image]: null,
|
|
311
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MissingWord]: null,
|
|
312
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MultipleChoice]: null,
|
|
313
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].ShortAnswer]: _create_short_answer_ts_create_short_answer__WEBPACK_IMPORTED_MODULE_1__["CreateShortAnswer"]
|
|
314
|
-
};
|
|
315
|
-
function getCreateComponent(typeId) {
|
|
316
|
-
return QuestionLookup[typeId];
|
|
317
|
-
}
|
|
318
|
-
const ValidationLookup = {
|
|
319
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Annotation]: null,
|
|
320
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Image]: null,
|
|
321
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MissingWord]: null,
|
|
322
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MultipleChoice]: null,
|
|
323
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].ShortAnswer]: _create_short_answer_ts_create_short_answer__WEBPACK_IMPORTED_MODULE_1__["ValidateShortAnswer"],
|
|
324
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].TrueOrFalse]: null
|
|
325
|
-
};
|
|
326
|
-
function getCreateValidation(typeId) {
|
|
327
|
-
return ValidationLookup[typeId];
|
|
328
|
-
}
|
|
329
|
-
const SubmissionLookup = {
|
|
330
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Annotation]: null,
|
|
331
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Image]: null,
|
|
332
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MissingWord]: null,
|
|
333
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MultipleChoice]: null,
|
|
334
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].ShortAnswer]: _create_short_answer_ts_create_short_answer__WEBPACK_IMPORTED_MODULE_1__["SubmitShortAnswer"],
|
|
335
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].TrueOrFalse]: null
|
|
336
|
-
};
|
|
337
|
-
function getCreateSubmit(typeId) {
|
|
338
|
-
return SubmissionLookup[typeId];
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/***/ }),
|
|
342
|
-
|
|
343
|
-
/***/ "../player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.scss":
|
|
344
|
-
/*!*****************************************************************************************************************************!*\
|
|
345
|
-
!*** ../player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.scss ***!
|
|
346
|
-
\*****************************************************************************************************************************/
|
|
347
|
-
/*! no static exports found */
|
|
348
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
349
|
-
|
|
350
|
-
// extracted by mini-css-extract-plugin
|
|
351
|
-
|
|
352
|
-
/***/ }),
|
|
353
|
-
|
|
354
|
-
/***/ "../player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.tsx":
|
|
355
|
-
/*!****************************************************************************************************************************!*\
|
|
356
|
-
!*** ../player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.tsx ***!
|
|
357
|
-
\****************************************************************************************************************************/
|
|
358
|
-
/*! exports provided: ValidateShortAnswer, SubmitShortAnswer, CreateShortAnswer */
|
|
359
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
360
|
-
|
|
361
|
-
"use strict";
|
|
362
|
-
__webpack_require__.r(__webpack_exports__);
|
|
363
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValidateShortAnswer", function() { return ValidateShortAnswer; });
|
|
364
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmitShortAnswer", function() { return SubmitShortAnswer; });
|
|
365
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateShortAnswer", function() { return CreateShortAnswer; });
|
|
366
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
367
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
368
|
-
/* harmony import */ var _create_short_answer_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-short-answer.scss */ "../player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.scss");
|
|
369
|
-
/* harmony import */ var _create_short_answer_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_create_short_answer_scss__WEBPACK_IMPORTED_MODULE_1__);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
function ValidateShortAnswer(state) {
|
|
373
|
-
return !!state.text;
|
|
374
|
-
}
|
|
375
|
-
function SubmitShortAnswer(state, interaction) {
|
|
376
|
-
return new Promise(resolve => {
|
|
377
|
-
window.setTimeout(() => {
|
|
378
|
-
interaction.data.text = state.text;
|
|
379
|
-
resolve();
|
|
380
|
-
}, 200);
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
function CreateShortAnswer(props) {
|
|
384
|
-
const {
|
|
385
|
-
state,
|
|
386
|
-
setState,
|
|
387
|
-
interaction
|
|
388
|
-
} = props;
|
|
389
|
-
|
|
390
|
-
function onChange(event) {
|
|
391
|
-
setState(Object.assign(Object.assign({}, state), {
|
|
392
|
-
text: event.target.value
|
|
393
|
-
}));
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
397
|
-
className: 'cv-create-short-answer'
|
|
398
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2", {
|
|
399
|
-
className: 'font-body'
|
|
400
|
-
}, "Create Short Answer"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("textarea", {
|
|
401
|
-
className: 'form-control',
|
|
402
|
-
rows: 3,
|
|
403
|
-
onChange: onChange,
|
|
404
|
-
value: state.text || interaction.data.text
|
|
405
|
-
}));
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/***/ }),
|
|
409
|
-
|
|
410
|
-
/***/ "../player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.scss":
|
|
411
|
-
/*!****************************************************************************************************************************!*\
|
|
412
|
-
!*** ../player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.scss ***!
|
|
413
|
-
\****************************************************************************************************************************/
|
|
414
|
-
/*! no static exports found */
|
|
415
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
416
|
-
|
|
417
|
-
// extracted by mini-css-extract-plugin
|
|
418
|
-
|
|
419
|
-
/***/ }),
|
|
420
|
-
|
|
421
|
-
/***/ "../player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.tsx":
|
|
422
|
-
/*!***************************************************************************************************************************!*\
|
|
423
|
-
!*** ../player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.tsx ***!
|
|
424
|
-
\***************************************************************************************************************************/
|
|
425
|
-
/*! exports provided: CreateTypeSelector */
|
|
426
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
427
|
-
|
|
428
|
-
"use strict";
|
|
429
|
-
__webpack_require__.r(__webpack_exports__);
|
|
430
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateTypeSelector", function() { return CreateTypeSelector; });
|
|
431
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
432
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
433
|
-
/* harmony import */ var _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../libs/shared/src/interfaces */ "../../libs/shared/src/interfaces/index.ts");
|
|
434
|
-
/* harmony import */ var _create_type_selector_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./create-type-selector.scss */ "../player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.scss");
|
|
435
|
-
/* harmony import */ var _create_type_selector_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_create_type_selector_scss__WEBPACK_IMPORTED_MODULE_2__);
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const interactionTypes = [{
|
|
440
|
-
name: 'Annotation',
|
|
441
|
-
type: _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractionTypeId"].Annotation
|
|
442
|
-
}, {
|
|
443
|
-
name: 'Image',
|
|
444
|
-
type: _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractionTypeId"].Image
|
|
445
|
-
}, {
|
|
446
|
-
name: 'MissingWord',
|
|
447
|
-
type: _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractionTypeId"].MissingWord
|
|
448
|
-
}, {
|
|
449
|
-
name: 'MultipleChoice',
|
|
450
|
-
type: _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractionTypeId"].MultipleChoice
|
|
451
|
-
}, {
|
|
452
|
-
name: 'ShortAnswer',
|
|
453
|
-
type: _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractionTypeId"].ShortAnswer
|
|
454
|
-
}, {
|
|
455
|
-
name: 'TrueOrFalse',
|
|
456
|
-
type: _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractionTypeId"].TrueOrFalse
|
|
457
|
-
}];
|
|
458
|
-
function CreateTypeSelector(props) {
|
|
459
|
-
const {
|
|
460
|
-
onTypeSelected
|
|
461
|
-
} = props;
|
|
462
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
463
|
-
className: 'cv-interactive-type-selector'
|
|
464
|
-
}, interactionTypes.map((interaction, index) => {
|
|
465
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
|
466
|
-
key: index,
|
|
467
|
-
className: 'btn btn-info',
|
|
468
|
-
onClick: () => onTypeSelected(interaction.type)
|
|
469
|
-
}, interaction.name);
|
|
470
|
-
}));
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/***/ }),
|
|
474
|
-
|
|
475
|
-
/***/ "../player/src/plugins/interactive-plugin/components/feedback/feedback.tsx":
|
|
476
|
-
/*!*********************************************************************************!*\
|
|
477
|
-
!*** ../player/src/plugins/interactive-plugin/components/feedback/feedback.tsx ***!
|
|
478
|
-
\*********************************************************************************/
|
|
479
|
-
/*! exports provided: Feedback */
|
|
480
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
481
|
-
|
|
482
|
-
"use strict";
|
|
483
|
-
__webpack_require__.r(__webpack_exports__);
|
|
484
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Feedback", function() { return Feedback; });
|
|
485
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
486
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
487
|
-
|
|
488
|
-
function Feedback(props) {
|
|
489
|
-
const {
|
|
490
|
-
correct,
|
|
491
|
-
showFeedback
|
|
492
|
-
} = props;
|
|
493
|
-
if (!showFeedback) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);
|
|
494
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, correct ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
495
|
-
className: 'alert alert-success'
|
|
496
|
-
}, "Correct") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
497
|
-
className: 'alert alert-danger'
|
|
498
|
-
}, "Incorrect"));
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/***/ }),
|
|
502
|
-
|
|
503
|
-
/***/ "../player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.tsx":
|
|
504
|
-
/*!*************************************************************************************************!*\
|
|
505
|
-
!*** ../player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.tsx ***!
|
|
506
|
-
\*************************************************************************************************/
|
|
507
|
-
/*! exports provided: IncompleteAlert */
|
|
508
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
509
|
-
|
|
510
|
-
"use strict";
|
|
511
|
-
__webpack_require__.r(__webpack_exports__);
|
|
512
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IncompleteAlert", function() { return IncompleteAlert; });
|
|
513
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
514
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
515
|
-
|
|
516
|
-
function IncompleteAlert() {
|
|
517
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
518
|
-
className: 'alert alert-info mt-3',
|
|
519
|
-
role: 'alert'
|
|
520
|
-
}, "Psst, you haven't attempted this question yet. You can continue to watch the video and answer the question later if you like.");
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/***/ }),
|
|
524
|
-
|
|
525
|
-
/***/ "../player/src/plugins/interactive-plugin/components/interactive/interactive-component.scss":
|
|
526
|
-
/*!**************************************************************************************************!*\
|
|
527
|
-
!*** ../player/src/plugins/interactive-plugin/components/interactive/interactive-component.scss ***!
|
|
528
|
-
\**************************************************************************************************/
|
|
529
|
-
/*! no static exports found */
|
|
530
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
531
|
-
|
|
532
|
-
// extracted by mini-css-extract-plugin
|
|
533
|
-
|
|
534
|
-
/***/ }),
|
|
535
|
-
|
|
536
|
-
/***/ "../player/src/plugins/interactive-plugin/components/interactive/interactive-component.tsx":
|
|
537
|
-
/*!*************************************************************************************************!*\
|
|
538
|
-
!*** ../player/src/plugins/interactive-plugin/components/interactive/interactive-component.tsx ***!
|
|
539
|
-
\*************************************************************************************************/
|
|
540
|
-
/*! no exports provided */
|
|
541
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
542
|
-
|
|
543
|
-
"use strict";
|
|
544
|
-
__webpack_require__.r(__webpack_exports__);
|
|
545
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
546
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
547
|
-
/* harmony import */ var simplebar_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! simplebar-react */ "../../../node_modules/simplebar-react/dist/simplebar-react.esm.js");
|
|
548
|
-
/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! video.js */ "../../../node_modules/video.js/dist/video.es.js");
|
|
549
|
-
/* harmony import */ var _react_react_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../react/react-component */ "../player/src/react/react-component.ts");
|
|
550
|
-
/* harmony import */ var _utils_useInteractiveTrack__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/useInteractiveTrack */ "../player/src/plugins/interactive-plugin/utils/useInteractiveTrack.ts");
|
|
551
|
-
/* harmony import */ var _interfaces_InteractiveMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../interfaces/InteractiveMode */ "../player/src/plugins/interactive-plugin/interfaces/InteractiveMode.ts");
|
|
552
|
-
/* harmony import */ var _timepoint_timepoint_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../timepoint/timepoint-component */ "../player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.tsx");
|
|
553
|
-
/* harmony import */ var _utils_getTimepointStateId__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/getTimepointStateId */ "../player/src/plugins/interactive-plugin/utils/getTimepointStateId.ts");
|
|
554
|
-
/* harmony import */ var _create_components_create_type_selector_create_type_selector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../create-components/create-type-selector/create-type-selector */ "../player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.tsx");
|
|
555
|
-
/* harmony import */ var _interactive_component_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./interactive-component.scss */ "../player/src/plugins/interactive-plugin/components/interactive/interactive-component.scss");
|
|
556
|
-
/* harmony import */ var _interactive_component_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_interactive_component_scss__WEBPACK_IMPORTED_MODULE_9__);
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
function interactiveReducer(state, action) {
|
|
569
|
-
return Object.assign(Object.assign({}, state), {
|
|
570
|
-
[action.key]: action.value
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
function InteractiveComponent(props) {
|
|
575
|
-
const {
|
|
576
|
-
player,
|
|
577
|
-
track,
|
|
578
|
-
mode,
|
|
579
|
-
interactive
|
|
580
|
-
} = props;
|
|
581
|
-
const [state, dispatch] = react__WEBPACK_IMPORTED_MODULE_0___default.a.useReducer(interactiveReducer, {});
|
|
582
|
-
const {
|
|
583
|
-
open,
|
|
584
|
-
timepoint,
|
|
585
|
-
continueInteractive
|
|
586
|
-
} = Object(_utils_useInteractiveTrack__WEBPACK_IMPORTED_MODULE_4__["useInteractiveTrack"])({
|
|
587
|
-
player,
|
|
588
|
-
track,
|
|
589
|
-
interactive,
|
|
590
|
-
mode
|
|
591
|
-
});
|
|
592
|
-
const ref = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef();
|
|
593
|
-
|
|
594
|
-
function recalulateScroll() {
|
|
595
|
-
ref.current.recalculate();
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
function onTypeSelected(typeId) {
|
|
599
|
-
player.pause();
|
|
600
|
-
const currentTime = player.currentTime();
|
|
601
|
-
const timePointId = Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString();
|
|
602
|
-
if (!interactive.timepoints) interactive.timepoints = [];
|
|
603
|
-
interactive.timepoints.push({
|
|
604
|
-
id: timePointId,
|
|
605
|
-
visibleAt: currentTime * 1000,
|
|
606
|
-
interactiveId: interactive.id,
|
|
607
|
-
shouldPause: 1,
|
|
608
|
-
interactions: [{
|
|
609
|
-
id: Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString(),
|
|
610
|
-
typeId: typeId,
|
|
611
|
-
type: {
|
|
612
|
-
id: typeId,
|
|
613
|
-
name: '',
|
|
614
|
-
colour: '',
|
|
615
|
-
icon: ''
|
|
616
|
-
},
|
|
617
|
-
timepointId: timePointId,
|
|
618
|
-
order: 0,
|
|
619
|
-
interactiveId: interactive.id,
|
|
620
|
-
data: {}
|
|
621
|
-
}]
|
|
622
|
-
});
|
|
623
|
-
track.addCue({
|
|
624
|
-
startTime: currentTime,
|
|
625
|
-
endTime: currentTime + 1,
|
|
626
|
-
text: timePointId
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
631
|
-
className: 'cv-interactive-container'
|
|
632
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
633
|
-
className: `cv-interactive ${open ? 'cv-open' : ''}`
|
|
634
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(simplebar_react__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
635
|
-
style: {
|
|
636
|
-
height: '100%'
|
|
637
|
-
},
|
|
638
|
-
ref: ref
|
|
639
|
-
}, !timepoint && mode === _interfaces_InteractiveMode__WEBPACK_IMPORTED_MODULE_5__["InteractiveMode"].Create && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_create_components_create_type_selector_create_type_selector__WEBPACK_IMPORTED_MODULE_8__["CreateTypeSelector"], {
|
|
640
|
-
onTypeSelected: onTypeSelected
|
|
641
|
-
}), !!timepoint && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_timepoint_timepoint_component__WEBPACK_IMPORTED_MODULE_6__["TimepointComponent"], {
|
|
642
|
-
timepoint: timepoint,
|
|
643
|
-
continueInteractive: continueInteractive,
|
|
644
|
-
immediateFeedback: interactive.immediateFeedback,
|
|
645
|
-
mode: mode,
|
|
646
|
-
state: state,
|
|
647
|
-
dispatch: dispatch,
|
|
648
|
-
recalculateScroll: recalulateScroll,
|
|
649
|
-
timepointState: state[Object(_utils_getTimepointStateId__WEBPACK_IMPORTED_MODULE_7__["getTimepointStateId"])(timepoint)] || _timepoint_timepoint_component__WEBPACK_IMPORTED_MODULE_6__["initialTimepointState"]
|
|
650
|
-
}))));
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
video_js__WEBPACK_IMPORTED_MODULE_2__["default"].registerComponent('Interactive', Object(_react_react_component__WEBPACK_IMPORTED_MODULE_3__["getReactComponent"])((player, options) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(InteractiveComponent, Object.assign({
|
|
654
|
-
player: player
|
|
655
|
-
}, options))));
|
|
656
|
-
|
|
657
|
-
/***/ }),
|
|
658
|
-
|
|
659
|
-
/***/ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.scss":
|
|
660
|
-
/*!**********************************************************************************************!*\
|
|
661
|
-
!*** ../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.scss ***!
|
|
662
|
-
\**********************************************************************************************/
|
|
663
|
-
/*! no static exports found */
|
|
664
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
665
|
-
|
|
666
|
-
// extracted by mini-css-extract-plugin
|
|
667
|
-
|
|
668
|
-
/***/ }),
|
|
669
|
-
|
|
670
|
-
/***/ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.ts":
|
|
671
|
-
/*!********************************************************************************************!*\
|
|
672
|
-
!*** ../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.ts ***!
|
|
673
|
-
\********************************************************************************************/
|
|
674
|
-
/*! exports provided: InteractiveBarItem */
|
|
675
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
676
|
-
|
|
677
|
-
"use strict";
|
|
678
|
-
__webpack_require__.r(__webpack_exports__);
|
|
679
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractiveBarItem", function() { return InteractiveBarItem; });
|
|
680
|
-
/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ "../../../node_modules/video.js/dist/video.es.js");
|
|
681
|
-
/* harmony import */ var _interactive_bar_item_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interactive-bar-item.scss */ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.scss");
|
|
682
|
-
/* harmony import */ var _interactive_bar_item_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_interactive_bar_item_scss__WEBPACK_IMPORTED_MODULE_1__);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
const Component = video_js__WEBPACK_IMPORTED_MODULE_0__["default"].getComponent('Button');
|
|
686
|
-
class InteractiveBarItem extends Component {
|
|
687
|
-
constructor(player, options) {
|
|
688
|
-
super(player, options);
|
|
689
|
-
this.timepoint_ = options.timepoint;
|
|
690
|
-
this.time_ = options.timepoint.visibleAt / 1000;
|
|
691
|
-
const firstInteraction = options.timepoint.interactions[0]; // if we have no interaction, hide this timepoint
|
|
692
|
-
|
|
693
|
-
if (!firstInteraction) this.hide();
|
|
694
|
-
this.setColour(firstInteraction.type.colour); // set the control text to the interaction name for screen readers
|
|
695
|
-
|
|
696
|
-
this.controlText(firstInteraction.name);
|
|
697
|
-
this.update();
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
buildCSSClass() {
|
|
701
|
-
return `cv-interactive-bar-item ${super.buildCSSClass()}`;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
createEl(tagName, properties, attributes) {
|
|
705
|
-
const el = super.createEl(tagName, Object.assign(Object.assign({}, properties), {
|
|
706
|
-
className: this.buildCSSClass()
|
|
707
|
-
}), attributes);
|
|
708
|
-
return el;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
update() {
|
|
712
|
-
const duration = this.player_.duration();
|
|
713
|
-
const width = this.time_ / duration;
|
|
714
|
-
this.el().style.left = width * 100 + '%'; // hide items outside of bounds
|
|
715
|
-
|
|
716
|
-
if (width > 100 || width < 0) this.hide();else this.show();
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
handleClick(e) {
|
|
720
|
-
e.stopPropagation();
|
|
721
|
-
this.player_.currentTime(this.time_);
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
setColour(colour) {
|
|
725
|
-
this.el().querySelector('.vjs-icon-placeholder').style.backgroundColor = '#' + colour;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
/***/ }),
|
|
731
|
-
|
|
732
|
-
/***/ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.scss":
|
|
733
|
-
/*!***********************************************************************************************!*\
|
|
734
|
-
!*** ../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.scss ***!
|
|
735
|
-
\***********************************************************************************************/
|
|
736
|
-
/*! no static exports found */
|
|
737
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
738
|
-
|
|
739
|
-
// extracted by mini-css-extract-plugin
|
|
740
|
-
|
|
741
|
-
/***/ }),
|
|
742
|
-
|
|
743
|
-
/***/ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.ts":
|
|
744
|
-
/*!*********************************************************************************************!*\
|
|
745
|
-
!*** ../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.ts ***!
|
|
746
|
-
\*********************************************************************************************/
|
|
747
|
-
/*! exports provided: InteractiveBarItems */
|
|
748
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
749
|
-
|
|
750
|
-
"use strict";
|
|
751
|
-
__webpack_require__.r(__webpack_exports__);
|
|
752
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractiveBarItems", function() { return InteractiveBarItems; });
|
|
753
|
-
/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ "../../../node_modules/video.js/dist/video.es.js");
|
|
754
|
-
/* harmony import */ var _interactive_bar_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interactive-bar-item */ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.ts");
|
|
755
|
-
/* harmony import */ var _interactive_bar_items_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interactive-bar-items.scss */ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.scss");
|
|
756
|
-
/* harmony import */ var _interactive_bar_items_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_interactive_bar_items_scss__WEBPACK_IMPORTED_MODULE_2__);
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
const Component = video_js__WEBPACK_IMPORTED_MODULE_0__["default"].getComponent('Component');
|
|
761
|
-
class InteractiveBarItems extends Component {
|
|
762
|
-
constructor(player, options) {
|
|
763
|
-
super(player, options);
|
|
764
|
-
this.track_ = options.track;
|
|
765
|
-
this.interactive_ = options.interactive;
|
|
766
|
-
this.onDurationChange = this.onDurationChange.bind(this);
|
|
767
|
-
this.createInteractionItems = this.createInteractionItems.bind(this);
|
|
768
|
-
this.createInteractionItems();
|
|
769
|
-
this.player_.on('durationchange', this.onDurationChange);
|
|
770
|
-
this.player_.on('dispose', () => {
|
|
771
|
-
this.player_.off('durationchange', this.onDurationChange);
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
buildCSSClass() {
|
|
776
|
-
return `cv-interactive-bar-items ${super.buildCSSClass()}`;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
createEl(tagName, properties, attributes) {
|
|
780
|
-
return super.createEl(tagName, Object.assign(Object.assign({}, properties), {
|
|
781
|
-
className: this.buildCSSClass()
|
|
782
|
-
}), attributes);
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
update() {
|
|
786
|
-
this.children_.forEach(child => {
|
|
787
|
-
child.update();
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
createInteractionItems() {
|
|
792
|
-
if (!this.track_) return; // remove all existing children
|
|
793
|
-
|
|
794
|
-
this.children_.forEach(child => {
|
|
795
|
-
this.removeChild(child);
|
|
796
|
-
});
|
|
797
|
-
|
|
798
|
-
for (let i = 0; i < this.track_.cues.length; i++) {
|
|
799
|
-
const cue = this.track_.cues[i];
|
|
800
|
-
const timepoint = this.getTimepointById(cue.text);
|
|
801
|
-
if (!timepoint) continue;
|
|
802
|
-
this.addChild(new _interactive_bar_item__WEBPACK_IMPORTED_MODULE_1__["InteractiveBarItem"](this.player_, {
|
|
803
|
-
timepoint: timepoint
|
|
804
|
-
}));
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
onDurationChange() {
|
|
809
|
-
this.update();
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
getTimepointById(id) {
|
|
813
|
-
var _a;
|
|
814
|
-
|
|
815
|
-
return (_a = this.interactive_.timepoints) === null || _a === void 0 ? void 0 : _a.find(t => t.id === id);
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/***/ }),
|
|
821
|
-
|
|
822
|
-
/***/ "../player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.scss":
|
|
823
|
-
/*!**********************************************************************************************!*\
|
|
824
|
-
!*** ../player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.scss ***!
|
|
825
|
-
\**********************************************************************************************/
|
|
826
|
-
/*! no static exports found */
|
|
827
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
828
|
-
|
|
829
|
-
// extracted by mini-css-extract-plugin
|
|
830
|
-
|
|
831
|
-
/***/ }),
|
|
832
|
-
|
|
833
|
-
/***/ "../player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.tsx":
|
|
834
|
-
/*!*********************************************************************************************!*\
|
|
835
|
-
!*** ../player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.tsx ***!
|
|
836
|
-
\*********************************************************************************************/
|
|
837
|
-
/*! exports provided: initialTimepointState, TimepointComponent */
|
|
838
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
839
|
-
|
|
840
|
-
"use strict";
|
|
841
|
-
__webpack_require__.r(__webpack_exports__);
|
|
842
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialTimepointState", function() { return initialTimepointState; });
|
|
843
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimepointComponent", function() { return TimepointComponent; });
|
|
844
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
845
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
846
|
-
/* harmony import */ var _incomplete_alert_incomplete_alert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../incomplete-alert/incomplete-alert */ "../player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.tsx");
|
|
847
|
-
/* harmony import */ var _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/interfaces */ "../../libs/shared/src/interfaces/index.ts");
|
|
848
|
-
/* harmony import */ var _utils_getValidationFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/getValidationFunction */ "../player/src/plugins/interactive-plugin/utils/getValidationFunction.ts");
|
|
849
|
-
/* harmony import */ var _utils_getSubmissionFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/getSubmissionFunction */ "../player/src/plugins/interactive-plugin/utils/getSubmissionFunction.ts");
|
|
850
|
-
/* harmony import */ var _utils_getInteractionComponents__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/getInteractionComponents */ "../player/src/plugins/interactive-plugin/utils/getInteractionComponents.ts");
|
|
851
|
-
/* harmony import */ var _utils_getTimepointStateId__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/getTimepointStateId */ "../player/src/plugins/interactive-plugin/utils/getTimepointStateId.ts");
|
|
852
|
-
/* harmony import */ var _utils_getInteractionStateId__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/getInteractionStateId */ "../player/src/plugins/interactive-plugin/utils/getInteractionStateId.ts");
|
|
853
|
-
/* harmony import */ var _timepoint_component_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./timepoint-component.scss */ "../player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.scss");
|
|
854
|
-
/* harmony import */ var _timepoint_component_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_timepoint_component_scss__WEBPACK_IMPORTED_MODULE_8__);
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
function shouldShowFeedback(timepoint) {
|
|
866
|
-
return timepoint.interactions.some(i => {
|
|
867
|
-
return i.typeId === _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractionTypeId"].MissingWord || i.typeId === _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractionTypeId"].MultipleChoice || i.typeId === _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractionTypeId"].TrueOrFalse;
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
const initialTimepointState = {
|
|
872
|
-
isValid: true,
|
|
873
|
-
submitted: false,
|
|
874
|
-
preview: false
|
|
875
|
-
};
|
|
876
|
-
function TimepointComponent(props) {
|
|
877
|
-
const {
|
|
878
|
-
timepoint,
|
|
879
|
-
continueInteractive,
|
|
880
|
-
mode,
|
|
881
|
-
state,
|
|
882
|
-
dispatch,
|
|
883
|
-
recalculateScroll,
|
|
884
|
-
timepointState,
|
|
885
|
-
immediateFeedback
|
|
886
|
-
} = props;
|
|
887
|
-
|
|
888
|
-
function onClickContinue() {
|
|
889
|
-
if (timepointState.submitted) {
|
|
890
|
-
continueInteractive();
|
|
891
|
-
return;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
const isValid = !timepoint.interactions.some(i => {
|
|
895
|
-
const validate = Object(_utils_getValidationFunction__WEBPACK_IMPORTED_MODULE_3__["getValidationFunction"])(i.typeId, mode);
|
|
896
|
-
return !validate(state[Object(_utils_getInteractionStateId__WEBPACK_IMPORTED_MODULE_7__["getInteractionStateId"])(i)] || {}, i);
|
|
897
|
-
});
|
|
898
|
-
|
|
899
|
-
if (!isValid) {
|
|
900
|
-
dispatch({
|
|
901
|
-
key: Object(_utils_getTimepointStateId__WEBPACK_IMPORTED_MODULE_6__["getTimepointStateId"])(timepoint),
|
|
902
|
-
value: Object.assign(Object.assign({}, timepointState), {
|
|
903
|
-
isValid: false
|
|
904
|
-
})
|
|
905
|
-
});
|
|
906
|
-
return;
|
|
907
|
-
} // TODO: Spinner button + state
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
const promises = timepoint.interactions.map(i => {
|
|
911
|
-
const submit = Object(_utils_getSubmissionFunction__WEBPACK_IMPORTED_MODULE_4__["getSubmissionFunction"])(i.typeId, mode);
|
|
912
|
-
return submit(state[Object(_utils_getInteractionStateId__WEBPACK_IMPORTED_MODULE_7__["getInteractionStateId"])(i)] || {}, i);
|
|
913
|
-
});
|
|
914
|
-
Promise.all(promises).then(() => {
|
|
915
|
-
dispatch({
|
|
916
|
-
key: Object(_utils_getTimepointStateId__WEBPACK_IMPORTED_MODULE_6__["getTimepointStateId"])(timepoint),
|
|
917
|
-
value: Object.assign(Object.assign({}, timepointState), {
|
|
918
|
-
submitted: true,
|
|
919
|
-
isValid: true
|
|
920
|
-
})
|
|
921
|
-
});
|
|
922
|
-
if (!immediateFeedback || !shouldShowFeedback(timepoint)) continueInteractive();
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
927
|
-
className: 'cv-timepoint'
|
|
928
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, timepoint.interactions.map((interaction, index) => {
|
|
929
|
-
const Question = Object(_utils_getInteractionComponents__WEBPACK_IMPORTED_MODULE_5__["getInteractionComponent"])(interaction.type.id, mode);
|
|
930
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Question, {
|
|
931
|
-
interaction: interaction,
|
|
932
|
-
state: state[Object(_utils_getInteractionStateId__WEBPACK_IMPORTED_MODULE_7__["getInteractionStateId"])(interaction)] || {},
|
|
933
|
-
setState: value => dispatch({
|
|
934
|
-
key: Object(_utils_getInteractionStateId__WEBPACK_IMPORTED_MODULE_7__["getInteractionStateId"])(interaction),
|
|
935
|
-
value
|
|
936
|
-
}),
|
|
937
|
-
key: index,
|
|
938
|
-
recalculateScroll: recalculateScroll,
|
|
939
|
-
showFeedback: timepointState.submitted
|
|
940
|
-
});
|
|
941
|
-
}), !timepointState.isValid && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_incomplete_alert_incomplete_alert__WEBPACK_IMPORTED_MODULE_1__["IncompleteAlert"], null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
942
|
-
className: 'cv-timpoint-button-container'
|
|
943
|
-
}, !timepointState.isValid && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
|
944
|
-
className: 'btn btn-secondary',
|
|
945
|
-
onClick: continueInteractive
|
|
946
|
-
}, "Come back later"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
|
947
|
-
className: 'btn btn-info ml-2',
|
|
948
|
-
onClick: onClickContinue
|
|
949
|
-
}, "Save & Continue")));
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
/***/ }),
|
|
953
|
-
|
|
954
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.tsx":
|
|
955
|
-
/*!*****************************************************************************************************************!*\
|
|
956
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.tsx ***!
|
|
957
|
-
\*****************************************************************************************************************/
|
|
958
|
-
/*! exports provided: AnnotationInteraction */
|
|
959
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
960
|
-
|
|
961
|
-
"use strict";
|
|
962
|
-
__webpack_require__.r(__webpack_exports__);
|
|
963
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnnotationInteraction", function() { return AnnotationInteraction; });
|
|
964
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
965
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
966
|
-
/* harmony import */ var _view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../view-interaction-heading/view-interaction-heading */ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx");
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
function AnnotationInteraction(props) {
|
|
970
|
-
const {
|
|
971
|
-
interaction
|
|
972
|
-
} = props;
|
|
973
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
974
|
-
className: 'cv-interactive-question'
|
|
975
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_1__["ViewInteractionHeading"], {
|
|
976
|
-
interaction: interaction
|
|
977
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
978
|
-
dangerouslySetInnerHTML: {
|
|
979
|
-
__html: props.interaction.data.annotation
|
|
980
|
-
}
|
|
981
|
-
}));
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
/***/ }),
|
|
985
|
-
|
|
986
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.scss":
|
|
987
|
-
/*!********************************************************************************************************!*\
|
|
988
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.scss ***!
|
|
989
|
-
\********************************************************************************************************/
|
|
990
|
-
/*! no static exports found */
|
|
991
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
992
|
-
|
|
993
|
-
// extracted by mini-css-extract-plugin
|
|
994
|
-
|
|
995
|
-
/***/ }),
|
|
996
|
-
|
|
997
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.tsx":
|
|
998
|
-
/*!*******************************************************************************************************!*\
|
|
999
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.tsx ***!
|
|
1000
|
-
\*******************************************************************************************************/
|
|
1001
|
-
/*! exports provided: ImageInteraction */
|
|
1002
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1003
|
-
|
|
1004
|
-
"use strict";
|
|
1005
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1006
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImageInteraction", function() { return ImageInteraction; });
|
|
1007
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1008
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1009
|
-
/* harmony import */ var _view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../view-interaction-heading/view-interaction-heading */ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx");
|
|
1010
|
-
/* harmony import */ var _image_interaction_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./image-interaction.scss */ "../player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.scss");
|
|
1011
|
-
/* harmony import */ var _image_interaction_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_image_interaction_scss__WEBPACK_IMPORTED_MODULE_2__);
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
function ImageInteraction(props) {
|
|
1016
|
-
const {
|
|
1017
|
-
interaction,
|
|
1018
|
-
recalculateScroll
|
|
1019
|
-
} = props;
|
|
1020
|
-
const ref = react__WEBPACK_IMPORTED_MODULE_0___default.a.useCallback(node => {
|
|
1021
|
-
if (!node) return;
|
|
1022
|
-
|
|
1023
|
-
node.onload = () => {
|
|
1024
|
-
recalculateScroll();
|
|
1025
|
-
};
|
|
1026
|
-
}, []);
|
|
1027
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1028
|
-
className: 'cv-interactive-question cv-image-interactive'
|
|
1029
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_1__["ViewInteractionHeading"], {
|
|
1030
|
-
interaction: interaction
|
|
1031
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1032
|
-
className: 'cv-image-container'
|
|
1033
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", {
|
|
1034
|
-
className: 'img-fluid',
|
|
1035
|
-
src: interaction.data.url,
|
|
1036
|
-
ref: ref
|
|
1037
|
-
})));
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
/***/ }),
|
|
1041
|
-
|
|
1042
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.tsx":
|
|
1043
|
-
/*!*********************************************************************************************************************!*\
|
|
1044
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.tsx ***!
|
|
1045
|
-
\*********************************************************************************************************************/
|
|
1046
|
-
/*! exports provided: IsViewMissingWordValid, SubmitViewMissingWord, MissingWordInteraction */
|
|
1047
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1048
|
-
|
|
1049
|
-
"use strict";
|
|
1050
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1051
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsViewMissingWordValid", function() { return IsViewMissingWordValid; });
|
|
1052
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmitViewMissingWord", function() { return SubmitViewMissingWord; });
|
|
1053
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissingWordInteraction", function() { return MissingWordInteraction; });
|
|
1054
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1055
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1056
|
-
/* harmony import */ var _feedback_feedback__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../feedback/feedback */ "../player/src/plugins/interactive-plugin/components/feedback/feedback.tsx");
|
|
1057
|
-
/* harmony import */ var _view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../view-interaction-heading/view-interaction-heading */ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx");
|
|
1058
|
-
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
1059
|
-
var t = {};
|
|
1060
|
-
|
|
1061
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1062
|
-
|
|
1063
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1064
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1065
|
-
}
|
|
1066
|
-
return t;
|
|
1067
|
-
};
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
const PLACEHOLDER = 'cv-missing-word-';
|
|
1073
|
-
const FONT = '17pt arial';
|
|
1074
|
-
|
|
1075
|
-
function getWordWidth(text) {
|
|
1076
|
-
const canvas = document.createElement('canvas');
|
|
1077
|
-
const context = canvas.getContext('2d');
|
|
1078
|
-
context.font = FONT;
|
|
1079
|
-
const metrics = context.measureText(text);
|
|
1080
|
-
return metrics.width;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
function isCorrect(state, interaction) {
|
|
1084
|
-
return interaction.actionableItems.every(a => {
|
|
1085
|
-
return a.name === state[a.id];
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
function IsViewMissingWordValid(state, interaction) {
|
|
1090
|
-
// TODO: This needs factor in if all the words have been filled in
|
|
1091
|
-
return Object.keys(state).length === interaction.actionableItems.length;
|
|
1092
|
-
}
|
|
1093
|
-
function SubmitViewMissingWord() {
|
|
1094
|
-
return new Promise(resolve => {
|
|
1095
|
-
resolve();
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
function MissingWordInteraction(props) {
|
|
1099
|
-
const {
|
|
1100
|
-
state,
|
|
1101
|
-
setState,
|
|
1102
|
-
interaction,
|
|
1103
|
-
showFeedback
|
|
1104
|
-
} = props;
|
|
1105
|
-
const cleanedUp = interaction.data.sentence.replace(/{([^{}]*)}/g, (match, val) => {
|
|
1106
|
-
return `{${PLACEHOLDER}${val}}`;
|
|
1107
|
-
});
|
|
1108
|
-
const items = cleanedUp.split(/{([^{}]*)}/g);
|
|
1109
|
-
|
|
1110
|
-
function onChange(a, event) {
|
|
1111
|
-
if (!event.target.value) {
|
|
1112
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1113
|
-
const _a = a.id,
|
|
1114
|
-
removed = state[_a],
|
|
1115
|
-
newState = __rest(state, [typeof _a === "symbol" ? _a : _a + ""]);
|
|
1116
|
-
|
|
1117
|
-
setState(newState);
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
setState(Object.assign(Object.assign({}, state), {
|
|
1122
|
-
[a.id]: event.target.value
|
|
1123
|
-
}));
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1127
|
-
className: 'cv-interactive-question'
|
|
1128
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_feedback_feedback__WEBPACK_IMPORTED_MODULE_1__["Feedback"], {
|
|
1129
|
-
correct: isCorrect(state, interaction),
|
|
1130
|
-
showFeedback: showFeedback
|
|
1131
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_2__["ViewInteractionHeading"], {
|
|
1132
|
-
interaction: interaction
|
|
1133
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("form", null, items.map((item, index) => {
|
|
1134
|
-
if (!item.startsWith(PLACEHOLDER)) return item;
|
|
1135
|
-
const order = item.replace(PLACEHOLDER, '');
|
|
1136
|
-
const actionableItem = interaction.actionableItems.find(a => a.order.toString() === order);
|
|
1137
|
-
if (!actionableItem) return;
|
|
1138
|
-
const width = getWordWidth(actionableItem.name);
|
|
1139
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", {
|
|
1140
|
-
key: index,
|
|
1141
|
-
style: {
|
|
1142
|
-
width: width + 'px'
|
|
1143
|
-
},
|
|
1144
|
-
onChange: e => onChange(actionableItem, e)
|
|
1145
|
-
});
|
|
1146
|
-
})));
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
/***/ }),
|
|
1150
|
-
|
|
1151
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.scss":
|
|
1152
|
-
/*!****************************************************************************************************************************!*\
|
|
1153
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.scss ***!
|
|
1154
|
-
\****************************************************************************************************************************/
|
|
1155
|
-
/*! no static exports found */
|
|
1156
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1157
|
-
|
|
1158
|
-
// extracted by mini-css-extract-plugin
|
|
1159
|
-
|
|
1160
|
-
/***/ }),
|
|
1161
|
-
|
|
1162
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.tsx":
|
|
1163
|
-
/*!***************************************************************************************************************************!*\
|
|
1164
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.tsx ***!
|
|
1165
|
-
\***************************************************************************************************************************/
|
|
1166
|
-
/*! exports provided: IsViewMultipleChoiceValid, SubmitViewMultipleChoice, MultipleChoiceInteraction */
|
|
1167
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1168
|
-
|
|
1169
|
-
"use strict";
|
|
1170
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1171
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsViewMultipleChoiceValid", function() { return IsViewMultipleChoiceValid; });
|
|
1172
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmitViewMultipleChoice", function() { return SubmitViewMultipleChoice; });
|
|
1173
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultipleChoiceInteraction", function() { return MultipleChoiceInteraction; });
|
|
1174
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1175
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1176
|
-
/* harmony import */ var _feedback_feedback__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../feedback/feedback */ "../player/src/plugins/interactive-plugin/components/feedback/feedback.tsx");
|
|
1177
|
-
/* harmony import */ var _view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../view-interaction-heading/view-interaction-heading */ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx");
|
|
1178
|
-
/* harmony import */ var _multiple_choice_interaction_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./multiple-choice-interaction.scss */ "../player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.scss");
|
|
1179
|
-
/* harmony import */ var _multiple_choice_interaction_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_multiple_choice_interaction_scss__WEBPACK_IMPORTED_MODULE_3__);
|
|
1180
|
-
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
1181
|
-
var t = {};
|
|
1182
|
-
|
|
1183
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1184
|
-
|
|
1185
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1186
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1187
|
-
}
|
|
1188
|
-
return t;
|
|
1189
|
-
};
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
function isCorrect(state, interaction) {
|
|
1197
|
-
const correctAnswers = interaction.actionableItems.filter(a => a.isCorrect);
|
|
1198
|
-
return correctAnswers.every(a => state[a.id]);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
function IsViewMultipleChoiceValid(state) {
|
|
1202
|
-
return !!Object.keys(state).length;
|
|
1203
|
-
}
|
|
1204
|
-
function SubmitViewMultipleChoice() {
|
|
1205
|
-
return new Promise(resolve => {
|
|
1206
|
-
resolve();
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
function MultipleChoiceInteraction(props) {
|
|
1210
|
-
const {
|
|
1211
|
-
state,
|
|
1212
|
-
setState,
|
|
1213
|
-
interaction,
|
|
1214
|
-
showFeedback
|
|
1215
|
-
} = props;
|
|
1216
|
-
const radio = interaction.actionableItems.filter(a => a.isCorrect).length === 1;
|
|
1217
|
-
|
|
1218
|
-
function onChecked(a, event) {
|
|
1219
|
-
if (radio) {
|
|
1220
|
-
setState({
|
|
1221
|
-
[a.id]: true
|
|
1222
|
-
});
|
|
1223
|
-
return;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
if (!event.target.checked) {
|
|
1227
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1228
|
-
const _a = a.id,
|
|
1229
|
-
removed = state[_a],
|
|
1230
|
-
newState = __rest(state, [typeof _a === "symbol" ? _a : _a + ""]);
|
|
1231
|
-
|
|
1232
|
-
setState(newState);
|
|
1233
|
-
return;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
setState(Object.assign(Object.assign({}, state), {
|
|
1237
|
-
[a.id]: true
|
|
1238
|
-
}));
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1242
|
-
className: 'cv-interactive-question'
|
|
1243
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_feedback_feedback__WEBPACK_IMPORTED_MODULE_1__["Feedback"], {
|
|
1244
|
-
correct: isCorrect(state, interaction),
|
|
1245
|
-
showFeedback: showFeedback
|
|
1246
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_2__["ViewInteractionHeading"], {
|
|
1247
|
-
interaction: interaction
|
|
1248
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("form", {
|
|
1249
|
-
className: 'cv-multiple-choice-form'
|
|
1250
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("table", {
|
|
1251
|
-
className: 'table-bordered w-100'
|
|
1252
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", {
|
|
1253
|
-
className: 'table-bordered w-100'
|
|
1254
|
-
}, interaction.actionableItems.map((a, index) => {
|
|
1255
|
-
const answer = state[a.id];
|
|
1256
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", {
|
|
1257
|
-
key: index
|
|
1258
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", {
|
|
1259
|
-
className: 'cv-multiple-choice-input-container'
|
|
1260
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1261
|
-
className: `custom-control ${radio ? 'custom-radio' : 'custom-checkbox'}`
|
|
1262
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", {
|
|
1263
|
-
id: a.id,
|
|
1264
|
-
type: radio ? 'radio' : 'checkbox',
|
|
1265
|
-
className: 'custom-control-input',
|
|
1266
|
-
name: 'multiple-choice',
|
|
1267
|
-
checked: !!answer,
|
|
1268
|
-
onChange: e => onChecked(a, e),
|
|
1269
|
-
disabled: showFeedback
|
|
1270
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", {
|
|
1271
|
-
htmlFor: a.id,
|
|
1272
|
-
className: 'custom-control-label'
|
|
1273
|
-
}))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", {
|
|
1274
|
-
className: 'cv-multiple-choice-label-container w-100'
|
|
1275
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", {
|
|
1276
|
-
htmlFor: a.id
|
|
1277
|
-
}, a.name)));
|
|
1278
|
-
})))));
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
/***/ }),
|
|
1282
|
-
|
|
1283
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.tsx":
|
|
1284
|
-
/*!*********************************************************************************************************************!*\
|
|
1285
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.tsx ***!
|
|
1286
|
-
\*********************************************************************************************************************/
|
|
1287
|
-
/*! exports provided: IsViewShortAnswerValid, SubmitViewShortAnswer, ShortAnswerInteraction */
|
|
1288
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1289
|
-
|
|
1290
|
-
"use strict";
|
|
1291
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1292
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsViewShortAnswerValid", function() { return IsViewShortAnswerValid; });
|
|
1293
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmitViewShortAnswer", function() { return SubmitViewShortAnswer; });
|
|
1294
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShortAnswerInteraction", function() { return ShortAnswerInteraction; });
|
|
1295
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1296
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1297
|
-
/* harmony import */ var react_textarea_autosize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-textarea-autosize */ "../../../node_modules/react-textarea-autosize/dist/react-textarea-autosize.browser.esm.js");
|
|
1298
|
-
/* harmony import */ var _view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../view-interaction-heading/view-interaction-heading */ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx");
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
function IsViewShortAnswerValid(state) {
|
|
1303
|
-
return !!state.text;
|
|
1304
|
-
}
|
|
1305
|
-
function SubmitViewShortAnswer() {
|
|
1306
|
-
return new Promise(resolve => {
|
|
1307
|
-
// TODO: Submit response
|
|
1308
|
-
resolve();
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
function ShortAnswerInteraction(props) {
|
|
1312
|
-
const {
|
|
1313
|
-
interaction,
|
|
1314
|
-
state,
|
|
1315
|
-
setState
|
|
1316
|
-
} = props;
|
|
1317
|
-
|
|
1318
|
-
function onChange(event) {
|
|
1319
|
-
setState(Object.assign(Object.assign({}, state), {
|
|
1320
|
-
text: event.target.value
|
|
1321
|
-
}));
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1325
|
-
className: 'cv-interactive-question'
|
|
1326
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_view_interaction_heading_view_interaction_heading__WEBPACK_IMPORTED_MODULE_2__["ViewInteractionHeading"], {
|
|
1327
|
-
interaction: interaction
|
|
1328
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_textarea_autosize__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
1329
|
-
translate: true,
|
|
1330
|
-
className: 'form-control',
|
|
1331
|
-
minRows: 3,
|
|
1332
|
-
value: state.text || '',
|
|
1333
|
-
onChange: onChange
|
|
1334
|
-
}));
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
/***/ }),
|
|
1338
|
-
|
|
1339
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/view-components.ts":
|
|
1340
|
-
/*!**********************************************************************************************!*\
|
|
1341
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/view-components.ts ***!
|
|
1342
|
-
\**********************************************************************************************/
|
|
1343
|
-
/*! exports provided: getViewComponent, getViewValidation, getViewSubmit */
|
|
1344
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1345
|
-
|
|
1346
|
-
"use strict";
|
|
1347
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1348
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getViewComponent", function() { return getViewComponent; });
|
|
1349
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getViewValidation", function() { return getViewValidation; });
|
|
1350
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getViewSubmit", function() { return getViewSubmit; });
|
|
1351
|
-
/* harmony import */ var _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../libs/shared/src/interfaces */ "../../libs/shared/src/interfaces/index.ts");
|
|
1352
|
-
/* harmony import */ var _annotation_annotation_interaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./annotation/annotation-interaction */ "../player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.tsx");
|
|
1353
|
-
/* harmony import */ var _image_image_interaction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./image/image-interaction */ "../player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.tsx");
|
|
1354
|
-
/* harmony import */ var _missing_word_missing_word_interaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./missing-word/missing-word-interaction */ "../player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.tsx");
|
|
1355
|
-
/* harmony import */ var _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./multiple-choice/multiple-choice-interaction */ "../player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.tsx");
|
|
1356
|
-
/* harmony import */ var _short_answer_short_answer_interaction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./short-answer/short-answer-interaction */ "../player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.tsx");
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
const QuestionLookup = {
|
|
1364
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Annotation]: _annotation_annotation_interaction__WEBPACK_IMPORTED_MODULE_1__["AnnotationInteraction"],
|
|
1365
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Image]: _image_image_interaction__WEBPACK_IMPORTED_MODULE_2__["ImageInteraction"],
|
|
1366
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MissingWord]: _missing_word_missing_word_interaction__WEBPACK_IMPORTED_MODULE_3__["MissingWordInteraction"],
|
|
1367
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MultipleChoice]: _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__["MultipleChoiceInteraction"],
|
|
1368
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].ShortAnswer]: _short_answer_short_answer_interaction__WEBPACK_IMPORTED_MODULE_5__["ShortAnswerInteraction"],
|
|
1369
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].TrueOrFalse]: _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__["MultipleChoiceInteraction"]
|
|
1370
|
-
};
|
|
1371
|
-
function getViewComponent(typeId) {
|
|
1372
|
-
return QuestionLookup[typeId];
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
function noValidation() {
|
|
1376
|
-
return true;
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
const ValidationLookup = {
|
|
1380
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Annotation]: noValidation,
|
|
1381
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Image]: noValidation,
|
|
1382
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MissingWord]: _missing_word_missing_word_interaction__WEBPACK_IMPORTED_MODULE_3__["IsViewMissingWordValid"],
|
|
1383
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MultipleChoice]: _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__["IsViewMultipleChoiceValid"],
|
|
1384
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].ShortAnswer]: _short_answer_short_answer_interaction__WEBPACK_IMPORTED_MODULE_5__["IsViewShortAnswerValid"],
|
|
1385
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].TrueOrFalse]: _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__["IsViewMultipleChoiceValid"]
|
|
1386
|
-
};
|
|
1387
|
-
function getViewValidation(typeId) {
|
|
1388
|
-
return ValidationLookup[typeId];
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
function noSubmission() {
|
|
1392
|
-
return Promise.resolve();
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
const SubmissionLookup = {
|
|
1396
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Annotation]: noSubmission,
|
|
1397
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].Image]: noSubmission,
|
|
1398
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MissingWord]: _missing_word_missing_word_interaction__WEBPACK_IMPORTED_MODULE_3__["SubmitViewMissingWord"],
|
|
1399
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].MultipleChoice]: _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__["SubmitViewMultipleChoice"],
|
|
1400
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].ShortAnswer]: _short_answer_short_answer_interaction__WEBPACK_IMPORTED_MODULE_5__["SubmitViewShortAnswer"],
|
|
1401
|
-
[_libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["InteractionTypeId"].TrueOrFalse]: _multiple_choice_multiple_choice_interaction__WEBPACK_IMPORTED_MODULE_4__["SubmitViewMultipleChoice"]
|
|
1402
|
-
};
|
|
1403
|
-
function getViewSubmit(typeId) {
|
|
1404
|
-
return SubmissionLookup[typeId];
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
/***/ }),
|
|
1408
|
-
|
|
1409
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.scss":
|
|
1410
|
-
/*!**********************************************************************************************************************************!*\
|
|
1411
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.scss ***!
|
|
1412
|
-
\**********************************************************************************************************************************/
|
|
1413
|
-
/*! no static exports found */
|
|
1414
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1415
|
-
|
|
1416
|
-
// extracted by mini-css-extract-plugin
|
|
1417
|
-
|
|
1418
|
-
/***/ }),
|
|
1419
|
-
|
|
1420
|
-
/***/ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx":
|
|
1421
|
-
/*!*********************************************************************************************************************************!*\
|
|
1422
|
-
!*** ../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.tsx ***!
|
|
1423
|
-
\*********************************************************************************************************************************/
|
|
1424
|
-
/*! exports provided: ViewInteractionHeading */
|
|
1425
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1426
|
-
|
|
1427
|
-
"use strict";
|
|
1428
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1429
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewInteractionHeading", function() { return ViewInteractionHeading; });
|
|
1430
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1431
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1432
|
-
/* harmony import */ var _view_interaction_heading_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./view-interaction-heading.scss */ "../player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.scss");
|
|
1433
|
-
/* harmony import */ var _view_interaction_heading_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_view_interaction_heading_scss__WEBPACK_IMPORTED_MODULE_1__);
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
function ViewInteractionHeading(props) {
|
|
1437
|
-
const {
|
|
1438
|
-
interaction
|
|
1439
|
-
} = props;
|
|
1440
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1441
|
-
className: 'cv-interaction-heading mb-3'
|
|
1442
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
|
1443
|
-
className: 'cv-iteraction-icon',
|
|
1444
|
-
style: {
|
|
1445
|
-
backgroundImage: `url(https:${interaction.type.icon})`,
|
|
1446
|
-
backgroundColor: `#${interaction.type.colour}`
|
|
1447
|
-
}
|
|
1448
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2", {
|
|
1449
|
-
className: 'cv-interaction-title h5'
|
|
1450
|
-
}, interaction.name));
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
/***/ }),
|
|
1454
|
-
|
|
1455
|
-
/***/ "../player/src/plugins/interactive-plugin/interactive-plugin.ts":
|
|
1456
|
-
/*!**********************************************************************!*\
|
|
1457
|
-
!*** ../player/src/plugins/interactive-plugin/interactive-plugin.ts ***!
|
|
1458
|
-
\**********************************************************************/
|
|
1459
|
-
/*! no exports provided */
|
|
1460
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1461
|
-
|
|
1462
|
-
"use strict";
|
|
1463
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1464
|
-
/* harmony import */ var _utils_track_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/track-helper */ "../player/src/utils/track-helper.ts");
|
|
1465
|
-
/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! video.js */ "../../../node_modules/video.js/dist/video.es.js");
|
|
1466
|
-
/* harmony import */ var _components_interactive_interactive_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/interactive/interactive-component */ "../player/src/plugins/interactive-plugin/components/interactive/interactive-component.tsx");
|
|
1467
|
-
/* harmony import */ var _components_seek_bar_interactive_bar_items__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/seek-bar/interactive-bar-items */ "../player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.ts");
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
const Plugin = video_js__WEBPACK_IMPORTED_MODULE_1__["default"].getPlugin('plugin');
|
|
1473
|
-
|
|
1474
|
-
class InteractivePlugin extends Plugin {
|
|
1475
|
-
constructor(player, options) {
|
|
1476
|
-
super(player);
|
|
1477
|
-
this.options = options;
|
|
1478
|
-
player.ready(() => this.initialize());
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
initialize() {
|
|
1482
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1483
|
-
_utils_track_helper__WEBPACK_IMPORTED_MODULE_0__["TrackHelper"].useTrack(this.player, 'metadata', 'interactive', this.onTrackLoaded.bind(this));
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
onTrackLoaded(track) {
|
|
1487
|
-
this.player.addChild('Interactive', {
|
|
1488
|
-
track,
|
|
1489
|
-
interactive: this.options.interactive,
|
|
1490
|
-
mode: this.options.mode
|
|
1491
|
-
}); // 🌶 inject the interative bar items into the seek bar
|
|
1492
|
-
|
|
1493
|
-
const seekBar = this.player.controlBar.getChild('progressControl').getChild('SeekBar');
|
|
1494
|
-
seekBar.addChild(new _components_seek_bar_interactive_bar_items__WEBPACK_IMPORTED_MODULE_3__["InteractiveBarItems"](this.player, {
|
|
1495
|
-
interactive: this.options.interactive,
|
|
1496
|
-
track: track
|
|
1497
|
-
}));
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
video_js__WEBPACK_IMPORTED_MODULE_1__["default"].registerPlugin('viewInteractivePlugin', InteractivePlugin);
|
|
1503
|
-
|
|
1504
|
-
/***/ }),
|
|
1505
|
-
|
|
1506
|
-
/***/ "../player/src/plugins/interactive-plugin/interfaces/InteractiveMode.ts":
|
|
1507
|
-
/*!******************************************************************************!*\
|
|
1508
|
-
!*** ../player/src/plugins/interactive-plugin/interfaces/InteractiveMode.ts ***!
|
|
1509
|
-
\******************************************************************************/
|
|
1510
|
-
/*! exports provided: InteractiveMode */
|
|
1511
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1512
|
-
|
|
1513
|
-
"use strict";
|
|
1514
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1515
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractiveMode", function() { return InteractiveMode; });
|
|
1516
|
-
var InteractiveMode;
|
|
1517
|
-
|
|
1518
|
-
(function (InteractiveMode) {
|
|
1519
|
-
InteractiveMode[InteractiveMode["View"] = 0] = "View";
|
|
1520
|
-
InteractiveMode[InteractiveMode["Create"] = 1] = "Create";
|
|
1521
|
-
})(InteractiveMode || (InteractiveMode = {}));
|
|
1522
|
-
|
|
1523
|
-
/***/ }),
|
|
1524
|
-
|
|
1525
|
-
/***/ "../player/src/plugins/interactive-plugin/interfaces/index.ts":
|
|
1526
|
-
/*!********************************************************************!*\
|
|
1527
|
-
!*** ../player/src/plugins/interactive-plugin/interfaces/index.ts ***!
|
|
1528
|
-
\********************************************************************/
|
|
1529
|
-
/*! exports provided: InteractiveMode */
|
|
1530
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1531
|
-
|
|
1532
|
-
"use strict";
|
|
1533
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1534
|
-
/* harmony import */ var _InteractiveMode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InteractiveMode */ "../player/src/plugins/interactive-plugin/interfaces/InteractiveMode.ts");
|
|
1535
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InteractiveMode", function() { return _InteractiveMode__WEBPACK_IMPORTED_MODULE_0__["InteractiveMode"]; });
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
/***/ }),
|
|
1540
|
-
|
|
1541
|
-
/***/ "../player/src/plugins/interactive-plugin/utils/getInteractionComponents.ts":
|
|
1542
|
-
/*!**********************************************************************************!*\
|
|
1543
|
-
!*** ../player/src/plugins/interactive-plugin/utils/getInteractionComponents.ts ***!
|
|
1544
|
-
\**********************************************************************************/
|
|
1545
|
-
/*! exports provided: getInteractionComponent */
|
|
1546
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1547
|
-
|
|
1548
|
-
"use strict";
|
|
1549
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1550
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInteractionComponent", function() { return getInteractionComponent; });
|
|
1551
|
-
/* harmony import */ var _components_create_components_create_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/create-components/create-components */ "../player/src/plugins/interactive-plugin/components/create-components/create-components.ts");
|
|
1552
|
-
/* harmony import */ var _components_view_components_view_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/view-components/view-components */ "../player/src/plugins/interactive-plugin/components/view-components/view-components.ts");
|
|
1553
|
-
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interfaces */ "../player/src/plugins/interactive-plugin/interfaces/index.ts");
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
function getInteractionComponent(typeId, mode) {
|
|
1558
|
-
if (mode === _interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractiveMode"].Create) return Object(_components_create_components_create_components__WEBPACK_IMPORTED_MODULE_0__["getCreateComponent"])(typeId);
|
|
1559
|
-
if (mode === _interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractiveMode"].View) return Object(_components_view_components_view_components__WEBPACK_IMPORTED_MODULE_1__["getViewComponent"])(typeId);
|
|
1560
|
-
throw new Error(`Cannot find components for the mode ${mode}`);
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
/***/ }),
|
|
1564
|
-
|
|
1565
|
-
/***/ "../player/src/plugins/interactive-plugin/utils/getInteractionStateId.ts":
|
|
1566
|
-
/*!*******************************************************************************!*\
|
|
1567
|
-
!*** ../player/src/plugins/interactive-plugin/utils/getInteractionStateId.ts ***!
|
|
1568
|
-
\*******************************************************************************/
|
|
1569
|
-
/*! exports provided: getInteractionStateId */
|
|
1570
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1571
|
-
|
|
1572
|
-
"use strict";
|
|
1573
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1574
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInteractionStateId", function() { return getInteractionStateId; });
|
|
1575
|
-
function getInteractionStateId(interaction) {
|
|
1576
|
-
return `i${interaction.id}`;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
/***/ }),
|
|
1580
|
-
|
|
1581
|
-
/***/ "../player/src/plugins/interactive-plugin/utils/getSubmissionFunction.ts":
|
|
1582
|
-
/*!*******************************************************************************!*\
|
|
1583
|
-
!*** ../player/src/plugins/interactive-plugin/utils/getSubmissionFunction.ts ***!
|
|
1584
|
-
\*******************************************************************************/
|
|
1585
|
-
/*! exports provided: getSubmissionFunction */
|
|
1586
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1587
|
-
|
|
1588
|
-
"use strict";
|
|
1589
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1590
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSubmissionFunction", function() { return getSubmissionFunction; });
|
|
1591
|
-
/* harmony import */ var _components_create_components_create_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/create-components/create-components */ "../player/src/plugins/interactive-plugin/components/create-components/create-components.ts");
|
|
1592
|
-
/* harmony import */ var _components_view_components_view_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/view-components/view-components */ "../player/src/plugins/interactive-plugin/components/view-components/view-components.ts");
|
|
1593
|
-
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interfaces */ "../player/src/plugins/interactive-plugin/interfaces/index.ts");
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
function getSubmissionFunction(typeId, mode) {
|
|
1598
|
-
if (mode === _interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractiveMode"].Create) return Object(_components_create_components_create_components__WEBPACK_IMPORTED_MODULE_0__["getCreateSubmit"])(typeId);
|
|
1599
|
-
if (mode === _interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractiveMode"].View) return Object(_components_view_components_view_components__WEBPACK_IMPORTED_MODULE_1__["getViewSubmit"])(typeId);
|
|
1600
|
-
throw new Error(`Cannot find validation functions for the mode ${mode}`);
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
/***/ }),
|
|
1604
|
-
|
|
1605
|
-
/***/ "../player/src/plugins/interactive-plugin/utils/getTimepointStateId.ts":
|
|
1606
|
-
/*!*****************************************************************************!*\
|
|
1607
|
-
!*** ../player/src/plugins/interactive-plugin/utils/getTimepointStateId.ts ***!
|
|
1608
|
-
\*****************************************************************************/
|
|
1609
|
-
/*! exports provided: getTimepointStateId */
|
|
1610
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1611
|
-
|
|
1612
|
-
"use strict";
|
|
1613
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1614
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTimepointStateId", function() { return getTimepointStateId; });
|
|
1615
|
-
function getTimepointStateId(timepoint) {
|
|
1616
|
-
return `t${timepoint.id}`;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
/***/ }),
|
|
1620
|
-
|
|
1621
|
-
/***/ "../player/src/plugins/interactive-plugin/utils/getValidationFunction.ts":
|
|
1622
|
-
/*!*******************************************************************************!*\
|
|
1623
|
-
!*** ../player/src/plugins/interactive-plugin/utils/getValidationFunction.ts ***!
|
|
1624
|
-
\*******************************************************************************/
|
|
1625
|
-
/*! exports provided: getValidationFunction */
|
|
1626
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1627
|
-
|
|
1628
|
-
"use strict";
|
|
1629
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1630
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValidationFunction", function() { return getValidationFunction; });
|
|
1631
|
-
/* harmony import */ var _components_create_components_create_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/create-components/create-components */ "../player/src/plugins/interactive-plugin/components/create-components/create-components.ts");
|
|
1632
|
-
/* harmony import */ var _components_view_components_view_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/view-components/view-components */ "../player/src/plugins/interactive-plugin/components/view-components/view-components.ts");
|
|
1633
|
-
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interfaces */ "../player/src/plugins/interactive-plugin/interfaces/index.ts");
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
function getValidationFunction(typeId, mode) {
|
|
1638
|
-
if (mode === _interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractiveMode"].Create) return Object(_components_create_components_create_components__WEBPACK_IMPORTED_MODULE_0__["getCreateValidation"])(typeId);
|
|
1639
|
-
if (mode === _interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractiveMode"].View) return Object(_components_view_components_view_components__WEBPACK_IMPORTED_MODULE_1__["getViewValidation"])(typeId);
|
|
1640
|
-
throw new Error(`Cannot find validation functions for the mode ${mode}`);
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
/***/ }),
|
|
1644
|
-
|
|
1645
|
-
/***/ "../player/src/plugins/interactive-plugin/utils/useInteractiveTrack.ts":
|
|
1646
|
-
/*!*****************************************************************************!*\
|
|
1647
|
-
!*** ../player/src/plugins/interactive-plugin/utils/useInteractiveTrack.ts ***!
|
|
1648
|
-
\*****************************************************************************/
|
|
1649
|
-
/*! exports provided: useInteractiveTrack */
|
|
1650
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1651
|
-
|
|
1652
|
-
"use strict";
|
|
1653
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1654
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useInteractiveTrack", function() { return useInteractiveTrack; });
|
|
1655
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1656
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1657
|
-
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../interfaces */ "../player/src/plugins/interactive-plugin/interfaces/index.ts");
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
function useInteractiveTrack(options) {
|
|
1661
|
-
const {
|
|
1662
|
-
player,
|
|
1663
|
-
track,
|
|
1664
|
-
interactive,
|
|
1665
|
-
mode
|
|
1666
|
-
} = options;
|
|
1667
|
-
const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0___default.a.useState(mode === _interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractiveMode"].Create);
|
|
1668
|
-
const [timepoint, setTimepoint] = react__WEBPACK_IMPORTED_MODULE_0___default.a.useState(null);
|
|
1669
|
-
|
|
1670
|
-
function onCueChange() {
|
|
1671
|
-
const activeCues = track.activeCues;
|
|
1672
|
-
|
|
1673
|
-
if (!activeCues.length) {
|
|
1674
|
-
if (mode !== _interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractiveMode"].Create) setOpen(false);
|
|
1675
|
-
setTimepoint(null);
|
|
1676
|
-
return;
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
const currentTimepoint = interactive.timepoints.find(t => {
|
|
1680
|
-
return t.id.toString() === activeCues[0].text.toString();
|
|
1681
|
-
});
|
|
1682
|
-
|
|
1683
|
-
if (currentTimepoint.shouldPause) {
|
|
1684
|
-
if (!player.seeking()) {
|
|
1685
|
-
player.pause();
|
|
1686
|
-
} else {
|
|
1687
|
-
player.one('play', () => player.pause());
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
setOpen(true);
|
|
1692
|
-
setTimepoint(currentTimepoint);
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
function continueInteractive() {
|
|
1696
|
-
if (mode !== _interfaces__WEBPACK_IMPORTED_MODULE_1__["InteractiveMode"].Create) setOpen(false);
|
|
1697
|
-
player.play();
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
function lockPlayer() {// TODO: Find a way to prevent the user from seeking or playing the video
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
function unlockPlayer() {// TODO: Find a way to undo the above
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(() => {
|
|
1707
|
-
track.addEventListener('cuechange', onCueChange);
|
|
1708
|
-
return () => track.removeEventListener('cuechange', onCueChange);
|
|
1709
|
-
});
|
|
1710
|
-
return {
|
|
1711
|
-
open,
|
|
1712
|
-
timepoint,
|
|
1713
|
-
continueInteractive,
|
|
1714
|
-
lockPlayer,
|
|
1715
|
-
unlockPlayer
|
|
1716
|
-
};
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
/***/ }),
|
|
1720
|
-
|
|
1721
|
-
/***/ "../player/src/react/InteractivePlayer.tsx":
|
|
1722
|
-
/*!*************************************************!*\
|
|
1723
|
-
!*** ../player/src/react/InteractivePlayer.tsx ***!
|
|
1724
|
-
\*************************************************/
|
|
1725
|
-
/*! exports provided: ClickViewInteractivePlayer */
|
|
1726
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1727
|
-
|
|
1728
|
-
"use strict";
|
|
1729
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1730
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClickViewInteractivePlayer", function() { return ClickViewInteractivePlayer; });
|
|
1731
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1732
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1733
|
-
/* harmony import */ var _players_interactive_player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../players/interactive-player */ "../player/src/players/interactive-player.ts");
|
|
1734
|
-
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
1735
|
-
var t = {};
|
|
1736
|
-
|
|
1737
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1738
|
-
|
|
1739
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1740
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1741
|
-
}
|
|
1742
|
-
return t;
|
|
1743
|
-
};
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
function ClickViewInteractivePlayer(props) {
|
|
1748
|
-
const {
|
|
1749
|
-
onReady
|
|
1750
|
-
} = props,
|
|
1751
|
-
options = __rest(props, ["onReady"]);
|
|
1752
|
-
|
|
1753
|
-
const ref = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef();
|
|
1754
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(() => {
|
|
1755
|
-
const player = new _players_interactive_player__WEBPACK_IMPORTED_MODULE_1__["InteractivePlayer"](ref.current, options);
|
|
1756
|
-
|
|
1757
|
-
if (onReady) {
|
|
1758
|
-
player.ready(() => {
|
|
1759
|
-
onReady(player);
|
|
1760
|
-
});
|
|
1761
|
-
}
|
|
1762
|
-
}, []);
|
|
1763
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1764
|
-
ref: ref
|
|
1765
|
-
});
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
/***/ }),
|
|
1769
|
-
|
|
1770
|
-
/***/ "./src/shared/components/interactive-questions/InteractiveQuestions.tsx":
|
|
1771
|
-
/*!******************************************************************************!*\
|
|
1772
|
-
!*** ./src/shared/components/interactive-questions/InteractiveQuestions.tsx ***!
|
|
1773
|
-
\******************************************************************************/
|
|
1774
|
-
/*! exports provided: InteractiveQuestions */
|
|
1775
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1776
|
-
|
|
1777
|
-
"use strict";
|
|
1778
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1779
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractiveQuestions", function() { return InteractiveQuestions; });
|
|
1780
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1781
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1782
|
-
/* harmony import */ var react_custom_scrollbars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-custom-scrollbars */ "react-custom-scrollbars");
|
|
1783
|
-
/* harmony import */ var react_custom_scrollbars__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_custom_scrollbars__WEBPACK_IMPORTED_MODULE_1__);
|
|
1784
|
-
/* harmony import */ var _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../libs/shared/src/interfaces */ "../../libs/shared/src/interfaces/index.ts");
|
|
1785
|
-
/* harmony import */ var _libs_shared_src_utils_DurationHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../libs/shared/src/utils/DurationHelper */ "../../libs/shared/src/utils/DurationHelper.ts");
|
|
1786
|
-
/* harmony import */ var _libs_shared_src_components_div_button_DivButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../libs/shared/src/components/div-button/DivButton */ "../../libs/shared/src/components/div-button/DivButton.tsx");
|
|
1787
|
-
/* harmony import */ var shared_constants_MinimumGlanceHeight__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! shared/constants/MinimumGlanceHeight */ "./src/shared/constants/MinimumGlanceHeight.ts");
|
|
1788
|
-
/* harmony import */ var _formatAnnotationText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatAnnotationText */ "./src/shared/components/interactive-questions/formatAnnotationText.ts");
|
|
1789
|
-
/* harmony import */ var _interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./interactive-questions.scss */ "./src/shared/components/interactive-questions/interactive-questions.scss");
|
|
1790
|
-
/* harmony import */ var _interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7__);
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
function InteractionComponent(props) {
|
|
1801
|
-
var interaction = props.interaction,
|
|
1802
|
-
visibleAt = props.visibleAt,
|
|
1803
|
-
goToTimepoint = props.goToTimepoint,
|
|
1804
|
-
selected = props.selected;
|
|
1805
|
-
|
|
1806
|
-
function onClick() {
|
|
1807
|
-
goToTimepoint && goToTimepoint(visibleAt);
|
|
1808
|
-
}
|
|
1809
|
-
/**
|
|
1810
|
-
* Don't have a cursor if there is no callback function.
|
|
1811
|
-
* i.e. when rendered in a popup
|
|
1812
|
-
*/
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
var cursor = goToTimepoint ? 'cursor-pointer' : 'cursor-default';
|
|
1816
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_libs_shared_src_components_div_button_DivButton__WEBPACK_IMPORTED_MODULE_4__["DivButton"], {
|
|
1817
|
-
className: "py-2 outline-none ".concat(cursor),
|
|
1818
|
-
onClick: onClick
|
|
1819
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
|
1820
|
-
className: "".concat(_interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7___default.a.time, " ").concat(selected ? 'font-weight-bold' : '')
|
|
1821
|
-
}, _libs_shared_src_utils_DurationHelper__WEBPACK_IMPORTED_MODULE_3__["DurationHelper"].ToDisplayDuration(visibleAt)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
|
1822
|
-
className: _interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7___default.a.typeIcon,
|
|
1823
|
-
style: {
|
|
1824
|
-
backgroundImage: "url(".concat(interaction.type.icon, ")"),
|
|
1825
|
-
backgroundColor: "#".concat(interaction.type.colour)
|
|
1826
|
-
}
|
|
1827
|
-
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
|
1828
|
-
className: _interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7___default.a.type
|
|
1829
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("strong", null, interaction.type.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
|
1830
|
-
className: "".concat(_interactive_questions_scss__WEBPACK_IMPORTED_MODULE_7___default.a.question, " ").concat(selected ? 'font-weight-bold' : '')
|
|
1831
|
-
}, interaction.typeId === _libs_shared_src_interfaces__WEBPACK_IMPORTED_MODULE_2__["InteractionTypeId"].Annotation ? Object(_formatAnnotationText__WEBPACK_IMPORTED_MODULE_6__["formatAnnotationText"])(interaction.data.annotation) : interaction.name));
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
function TimepointComponent(props) {
|
|
1835
|
-
var timepoint = props.timepoint,
|
|
1836
|
-
selectedTimepointId = props.selectedTimepointId,
|
|
1837
|
-
goToTimepoint = props.goToTimepoint,
|
|
1838
|
-
scrollTo = props.scrollTo;
|
|
1839
|
-
var ref = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef();
|
|
1840
|
-
var selected = selectedTimepointId && selectedTimepointId.toString() === timepoint.id.toString();
|
|
1841
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {
|
|
1842
|
-
if (!selected) return;
|
|
1843
|
-
if (!ref.current) return;
|
|
1844
|
-
var el = ref.current;
|
|
1845
|
-
var rect = el.getBoundingClientRect();
|
|
1846
|
-
var offset = rect.top - el.offsetParent.getBoundingClientRect().top;
|
|
1847
|
-
scrollTo(offset, rect.height);
|
|
1848
|
-
}, [selected]);
|
|
1849
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1850
|
-
ref: ref
|
|
1851
|
-
}, timepoint.interactions.map(function (interaction, i) {
|
|
1852
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(InteractionComponent, {
|
|
1853
|
-
interaction: interaction,
|
|
1854
|
-
visibleAt: timepoint.visibleAt,
|
|
1855
|
-
goToTimepoint: goToTimepoint,
|
|
1856
|
-
selected: selected,
|
|
1857
|
-
key: i
|
|
1858
|
-
});
|
|
1859
|
-
}));
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
function InteractiveQuestions(props) {
|
|
1863
|
-
var interactive = props.interactive,
|
|
1864
|
-
goToTimepoint = props.goToTimepoint,
|
|
1865
|
-
selectedTimepointId = props.selectedTimepointId;
|
|
1866
|
-
var ref = react__WEBPACK_IMPORTED_MODULE_0___default.a.useRef();
|
|
1867
|
-
|
|
1868
|
-
function scrollTo(offset, elHeight) {
|
|
1869
|
-
if (!ref.current) return;
|
|
1870
|
-
var height = ref.current.getClientHeight();
|
|
1871
|
-
var scroll = ref.current.getScrollTop();
|
|
1872
|
-
var elementFromTop = offset + scroll;
|
|
1873
|
-
/**
|
|
1874
|
-
* Element is above scroll window if it's distance from the top
|
|
1875
|
-
* is less than the scroll
|
|
1876
|
-
*/
|
|
1877
|
-
|
|
1878
|
-
var isAboveScrollWindow = elementFromTop < scroll;
|
|
1879
|
-
/**
|
|
1880
|
-
* Element is beneath scroll window if it's distance from the top
|
|
1881
|
-
* plus it's height is greater than the scroll plus the window height
|
|
1882
|
-
*/
|
|
1883
|
-
|
|
1884
|
-
var isBelowScrollWindow = elementFromTop + elHeight > scroll + height;
|
|
1885
|
-
/**
|
|
1886
|
-
* So we don't scroll if our element is visible
|
|
1887
|
-
*/
|
|
1888
|
-
|
|
1889
|
-
if (!isAboveScrollWindow && !isBelowScrollWindow) return;
|
|
1890
|
-
/**
|
|
1891
|
-
* If our element isn't visible, we want to try scroll so the element is
|
|
1892
|
-
* centered in our viewport
|
|
1893
|
-
*/
|
|
1894
|
-
|
|
1895
|
-
ref.current.scrollTop(elementFromTop - height / 2 + elHeight / 2);
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
var borderClass = goToTimepoint ? 'border rounded' : '';
|
|
1899
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_custom_scrollbars__WEBPACK_IMPORTED_MODULE_1__["Scrollbars"], {
|
|
1900
|
-
autoHeight: true,
|
|
1901
|
-
autoHeightMax: shared_constants_MinimumGlanceHeight__WEBPACK_IMPORTED_MODULE_5__["MINIMUM_GLANCE_HEIGHT"],
|
|
1902
|
-
className: borderClass,
|
|
1903
|
-
hideTracksWhenNotNeeded: true,
|
|
1904
|
-
ref: ref
|
|
1905
|
-
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
1906
|
-
className: 'px-3 py-1'
|
|
1907
|
-
}, interactive.timepoints.map(function (t, i) {
|
|
1908
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(TimepointComponent, {
|
|
1909
|
-
key: i,
|
|
1910
|
-
timepoint: t,
|
|
1911
|
-
goToTimepoint: goToTimepoint,
|
|
1912
|
-
selectedTimepointId: selectedTimepointId,
|
|
1913
|
-
scrollTo: scrollTo
|
|
1914
|
-
});
|
|
1915
|
-
})));
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
/***/ }),
|
|
1919
|
-
|
|
1920
|
-
/***/ "./src/shared/components/interactive-questions/formatAnnotationText.ts":
|
|
1921
|
-
/*!*****************************************************************************!*\
|
|
1922
|
-
!*** ./src/shared/components/interactive-questions/formatAnnotationText.ts ***!
|
|
1923
|
-
\*****************************************************************************/
|
|
1924
|
-
/*! exports provided: formatAnnotationText */
|
|
1925
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1926
|
-
|
|
1927
|
-
"use strict";
|
|
1928
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1929
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatAnnotationText", function() { return formatAnnotationText; });
|
|
1930
|
-
function replacePTags(text) {
|
|
1931
|
-
if (!text) return;
|
|
1932
|
-
return text.replace(/<p>/g, '').replace(/<\/p>/g, '<br>');
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
function stripTags(text, items) {
|
|
1936
|
-
if (!text || !items) return;
|
|
1937
|
-
items.forEach(function (item) {
|
|
1938
|
-
text = text.replace('<' + item + '>', '').replace('</' + item + '>', '');
|
|
1939
|
-
});
|
|
1940
|
-
return text;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
function formatAnnotationText(text) {
|
|
1944
|
-
if (!text) return;
|
|
1945
|
-
text = stripTags(text, ['b', 'i', 'u', 'ul', 'li', 'old']);
|
|
1946
|
-
text = replacePTags(text);
|
|
1947
|
-
return text.split('<br>')[0] || 'Annotation';
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
/***/ }),
|
|
1951
|
-
|
|
1952
|
-
/***/ "./src/shared/components/interactive-questions/interactive-questions.scss":
|
|
1953
|
-
/*!********************************************************************************!*\
|
|
1954
|
-
!*** ./src/shared/components/interactive-questions/interactive-questions.scss ***!
|
|
1955
|
-
\********************************************************************************/
|
|
1956
|
-
/*! no static exports found */
|
|
1957
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1958
|
-
|
|
1959
|
-
// extracted by mini-css-extract-plugin
|
|
1960
|
-
module.exports = {"time":"cv--time--30ibe","typeIcon":"cv--typeIcon--UMnFt","type":"cv--type--3uwxz","question":"cv--question--1FwXi"};
|
|
1961
|
-
|
|
1962
|
-
/***/ }),
|
|
1963
|
-
|
|
1964
|
-
/***/ "./src/shared/constants/MinimumGlanceHeight.ts":
|
|
1965
|
-
/*!*****************************************************!*\
|
|
1966
|
-
!*** ./src/shared/constants/MinimumGlanceHeight.ts ***!
|
|
1967
|
-
\*****************************************************/
|
|
1968
|
-
/*! exports provided: MINIMUM_GLANCE_HEIGHT */
|
|
1969
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1970
|
-
|
|
1971
|
-
"use strict";
|
|
1972
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1973
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MINIMUM_GLANCE_HEIGHT", function() { return MINIMUM_GLANCE_HEIGHT; });
|
|
1974
|
-
// 368 is the min height of Video at a glance which is defined as $glanceHeight in synopsis.scss
|
|
1975
|
-
var MINIMUM_GLANCE_HEIGHT = 368; // px
|
|
1976
|
-
|
|
1977
|
-
/***/ }),
|
|
1978
|
-
|
|
1979
|
-
/***/ "./src/shared/flight-requests/InteractiveRequests.ts":
|
|
1980
|
-
/*!***********************************************************!*\
|
|
1981
|
-
!*** ./src/shared/flight-requests/InteractiveRequests.ts ***!
|
|
1982
|
-
\***********************************************************/
|
|
1983
|
-
/*! exports provided: InteractiveRequests */
|
|
1984
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1985
|
-
|
|
1986
|
-
"use strict";
|
|
1987
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1988
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractiveRequests", function() { return InteractiveRequests; });
|
|
1989
|
-
var InteractiveRequests = {
|
|
1990
|
-
interactiveMetadata: function interactiveMetadata(id) {
|
|
1991
|
-
return {
|
|
1992
|
-
url: "/api/domain/v2/objects/".concat(id, "?query=video"),
|
|
1993
|
-
key: "interactivemetadata:".concat(id)
|
|
1994
|
-
};
|
|
1995
|
-
},
|
|
1996
|
-
interactive: function interactive(id) {
|
|
1997
|
-
return {
|
|
1998
|
-
url: "/api/domain/v1/interactives/".concat(id),
|
|
1999
|
-
key: "interactive:".concat(id)
|
|
2000
|
-
};
|
|
2001
|
-
}
|
|
2002
|
-
};
|
|
2003
|
-
|
|
2004
|
-
/***/ }),
|
|
2005
|
-
|
|
2006
|
-
/***/ "./src/shared/views/preview-interactive/PreviewInteractiveView.tsx":
|
|
2007
|
-
/*!*************************************************************************!*\
|
|
2008
|
-
!*** ./src/shared/views/preview-interactive/PreviewInteractiveView.tsx ***!
|
|
2009
|
-
\*************************************************************************/
|
|
2010
|
-
/*! exports provided: PreviewInteractiveView */
|
|
2011
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2012
|
-
|
|
2013
|
-
"use strict";
|
|
2014
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2015
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreviewInteractiveView", function() { return PreviewInteractiveView; });
|
|
2016
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
2017
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2018
|
-
/* harmony import */ var _libs_common_src_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../libs/common/src/react */ "../../libs/common/src/react/index.ts");
|
|
2019
|
-
/* harmony import */ var _libs_common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../libs/common/src/backbone/services/LanguageService */ "../../libs/common/src/backbone/services/LanguageService.tsx");
|
|
2020
|
-
/* harmony import */ var _libs_common_src_react_hooks_UseSetPageTitle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../libs/common/src/react/hooks/UseSetPageTitle */ "../../libs/common/src/react/hooks/UseSetPageTitle.ts");
|
|
2021
|
-
/* harmony import */ var _libs_shared_src_flight_requests_PlayerRequests__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../libs/shared/src/flight-requests/PlayerRequests */ "../../libs/shared/src/flight-requests/PlayerRequests.ts");
|
|
2022
|
-
/* harmony import */ var _libs_shared_src_flight_requests_ConfigRequests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../libs/shared/src/flight-requests/ConfigRequests */ "../../libs/shared/src/flight-requests/ConfigRequests.ts");
|
|
2023
|
-
/* harmony import */ var _libs_shared_src_components_app_link_AppLink__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../../libs/shared/src/components/app-link/AppLink */ "../../libs/shared/src/components/app-link/AppLink.tsx");
|
|
2024
|
-
/* harmony import */ var _libs_shared_src_components_widgets_items_interactive_widget_item_InteractiveWidgetItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../../libs/shared/src/components/widgets/items/interactive-widget-item/InteractiveWidgetItem */ "../../libs/shared/src/components/widgets/items/interactive-widget-item/InteractiveWidgetItem.tsx");
|
|
2025
|
-
/* harmony import */ var _libs_shared_src_components_widgets_fixed_widget__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../../libs/shared/src/components/widgets/fixed-widget */ "../../libs/shared/src/components/widgets/fixed-widget/index.ts");
|
|
2026
|
-
/* harmony import */ var _libs_shared_src_components_text_Text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../../../libs/shared/src/components/text/Text */ "../../libs/shared/src/components/text/Text.tsx");
|
|
2027
|
-
/* harmony import */ var _libs_shared_src_enums_WidgetContents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../../../libs/shared/src/enums/WidgetContents */ "../../libs/shared/src/enums/WidgetContents.ts");
|
|
2028
|
-
/* harmony import */ var _player_src_react_InteractivePlayer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../../player/src/react/InteractivePlayer */ "../player/src/react/InteractivePlayer.tsx");
|
|
2029
|
-
/* harmony import */ var shared_constants_LiteActions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! shared/constants/LiteActions */ "./src/shared/constants/LiteActions.ts");
|
|
2030
|
-
/* harmony import */ var shared_components_interactive_questions_InteractiveQuestions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! shared/components/interactive-questions/InteractiveQuestions */ "./src/shared/components/interactive-questions/InteractiveQuestions.tsx");
|
|
2031
|
-
/* harmony import */ var shared_constants_LiteRadioChannels__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! shared/constants/LiteRadioChannels */ "./src/shared/constants/LiteRadioChannels.ts");
|
|
2032
|
-
/* harmony import */ var shared_flight_requests_InteractiveRequests__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! shared/flight-requests/InteractiveRequests */ "./src/shared/flight-requests/InteractiveRequests.ts");
|
|
2033
|
-
/* harmony import */ var shared_flight_requests_VideoRequests__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! shared/flight-requests/VideoRequests */ "./src/shared/flight-requests/VideoRequests.ts");
|
|
2034
|
-
/* harmony import */ var _libs_common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../../../libs/common/src/react/utils/TextHelper */ "../../libs/common/src/react/utils/TextHelper.ts");
|
|
2035
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2036
|
-
|
|
2037
|
-
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."); }
|
|
2038
|
-
|
|
2039
|
-
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); }
|
|
2040
|
-
|
|
2041
|
-
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; }
|
|
2042
|
-
|
|
2043
|
-
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; }
|
|
2044
|
-
|
|
2045
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
var namespace = 'shared.previewInteractive';
|
|
2066
|
-
var getPhrase = _libs_common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_2__["LanguageService"].encloseNamespace(namespace);
|
|
2067
|
-
function PreviewInteractiveView(props) {
|
|
2068
|
-
var _a, _b, _c, _d;
|
|
2069
|
-
|
|
2070
|
-
var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](null),
|
|
2071
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2072
|
-
timepointId = _React$useState2[0],
|
|
2073
|
-
setTimepointId = _React$useState2[1];
|
|
2074
|
-
|
|
2075
|
-
var playerRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"]();
|
|
2076
|
-
var config = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].useBasicFetch(_libs_shared_src_flight_requests_ConfigRequests__WEBPACK_IMPORTED_MODULE_5__["ConfigRequests"].config());
|
|
2077
|
-
var interactiveMetadata = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].useBasicFetch(shared_flight_requests_InteractiveRequests__WEBPACK_IMPORTED_MODULE_15__["InteractiveRequests"].interactiveMetadata(props.id));
|
|
2078
|
-
var video = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].useBasicFetch(interactiveMetadata.data ? shared_flight_requests_VideoRequests__WEBPACK_IMPORTED_MODULE_16__["VideoRequests"].video(interactiveMetadata.data.video.id) : null);
|
|
2079
|
-
var viewKey = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].useBasicFetch(interactiveMetadata.data ? _libs_shared_src_flight_requests_PlayerRequests__WEBPACK_IMPORTED_MODULE_4__["PlayerRequests"].createViewKey(interactiveMetadata.data.id) : null);
|
|
2080
|
-
var interactive = _libs_common_src_react__WEBPACK_IMPORTED_MODULE_1__["Flight"].useBasicFetch(interactiveMetadata.data ? shared_flight_requests_InteractiveRequests__WEBPACK_IMPORTED_MODULE_15__["InteractiveRequests"].interactive(interactiveMetadata.data.interactiveId) : null);
|
|
2081
|
-
Object(_libs_common_src_react_hooks_UseSetPageTitle__WEBPACK_IMPORTED_MODULE_3__["useSetPageTitle"])((_a = interactiveMetadata.data) === null || _a === void 0 ? void 0 : _a.name);
|
|
2082
|
-
|
|
2083
|
-
function goToTimepoint(visibleAt) {
|
|
2084
|
-
if (!playerRef.current) return;
|
|
2085
|
-
playerRef.current.currentTime(visibleAt / 1000);
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
function onTimepointChange(id) {
|
|
2089
|
-
setTimepointId(id);
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
function onReady(player) {
|
|
2093
|
-
playerRef.current = player;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
if (!viewKey.data || !config.data || !interactiveMetadata.data || !interactive.data || !video.data) return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
|
|
2097
|
-
var otherInteractives = (_c = (_b = video.data.interactives) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.filter(function (i) {
|
|
2098
|
-
return i.id.toString() !== props.id.toString();
|
|
2099
|
-
});
|
|
2100
|
-
var videoAppLink = {
|
|
2101
|
-
application: shared_constants_LiteRadioChannels__WEBPACK_IMPORTED_MODULE_14__["AppChannels"].DEFAULT,
|
|
2102
|
-
action: shared_constants_LiteActions__WEBPACK_IMPORTED_MODULE_12__["Actions"].Default.PLAY_VIDEO,
|
|
2103
|
-
args: [video.data.id, _libs_common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_17__["TextHelper"].slugify(video.data.name)]
|
|
2104
|
-
};
|
|
2105
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_text_Text__WEBPACK_IMPORTED_MODULE_9__["LanguageNamespaceContext"].Provider, {
|
|
2106
|
-
value: namespace
|
|
2107
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
2108
|
-
className: 'mb-3'
|
|
2109
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_player_src_react_InteractivePlayer__WEBPACK_IMPORTED_MODULE_11__["ClickViewInteractivePlayer"], {
|
|
2110
|
-
viewKey: viewKey.data.viewKey,
|
|
2111
|
-
playerApi: new URL(config.data.playerApiUrl),
|
|
2112
|
-
hotkeyElQuerySelector: 'body',
|
|
2113
|
-
autoplay: true,
|
|
2114
|
-
onTimepointChange: onTimepointChange,
|
|
2115
|
-
onReady: onReady
|
|
2116
|
-
})), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
2117
|
-
className: 'd-flex justify-content-between align-items-center pb-3'
|
|
2118
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("h1", {
|
|
2119
|
-
className: 'h3 d-inline-block m-0'
|
|
2120
|
-
}, interactiveMetadata.data.name), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_text_Text__WEBPACK_IMPORTED_MODULE_9__["Text"], {
|
|
2121
|
-
phrase: 'backTo'
|
|
2122
|
-
}), ": ", react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_app_link_AppLink__WEBPACK_IMPORTED_MODULE_6__["AppLink"], {
|
|
2123
|
-
appLink: videoAppLink,
|
|
2124
|
-
className: 'text-info'
|
|
2125
|
-
}, interactiveMetadata.data.video.name)))), interactiveMetadata.data.description && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("p", null, interactiveMetadata.data.description), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("h2", {
|
|
2126
|
-
className: 'h4'
|
|
2127
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_text_Text__WEBPACK_IMPORTED_MODULE_9__["Text"], {
|
|
2128
|
-
phrase: 'interactiveQuestions'
|
|
2129
|
-
})), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](shared_components_interactive_questions_InteractiveQuestions__WEBPACK_IMPORTED_MODULE_13__["InteractiveQuestions"], {
|
|
2130
|
-
interactive: interactive.data,
|
|
2131
|
-
selectedTimepointId: timepointId,
|
|
2132
|
-
goToTimepoint: goToTimepoint
|
|
2133
|
-
}), !!((_d = otherInteractives) === null || _d === void 0 ? void 0 : _d.length) && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
2134
|
-
className: 'my-3'
|
|
2135
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_widgets_fixed_widget__WEBPACK_IMPORTED_MODULE_8__["FixedWidget"], {
|
|
2136
|
-
name: getPhrase('otherInteractives', {
|
|
2137
|
-
count: otherInteractives.length
|
|
2138
|
-
}),
|
|
2139
|
-
contents: _libs_shared_src_enums_WidgetContents__WEBPACK_IMPORTED_MODULE_10__["WidgetContents"].Interactives,
|
|
2140
|
-
collection: otherInteractives,
|
|
2141
|
-
prefetched: true,
|
|
2142
|
-
childAppLink: {
|
|
2143
|
-
application: shared_constants_LiteRadioChannels__WEBPACK_IMPORTED_MODULE_14__["AppChannels"].DEFAULT,
|
|
2144
|
-
action: shared_constants_LiteActions__WEBPACK_IMPORTED_MODULE_12__["Actions"].Default.PREVIEW_INTERACTIVE
|
|
2145
|
-
},
|
|
2146
|
-
childComponent: function childComponent(itemProps) {
|
|
2147
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_libs_shared_src_components_widgets_items_interactive_widget_item_InteractiveWidgetItem__WEBPACK_IMPORTED_MODULE_7__["InteractiveWidgetItem"], Object.assign({
|
|
2148
|
-
video: video.data,
|
|
2149
|
-
questionsAppLink: {
|
|
2150
|
-
application: shared_constants_LiteRadioChannels__WEBPACK_IMPORTED_MODULE_14__["AppChannels"].DEFAULT,
|
|
2151
|
-
action: shared_constants_LiteActions__WEBPACK_IMPORTED_MODULE_12__["Actions"].Default.PREVIEW_QUESTIONS
|
|
2152
|
-
}
|
|
2153
|
-
}, itemProps));
|
|
2154
|
-
},
|
|
2155
|
-
analyticsData: {
|
|
2156
|
-
widgetId: 'interactives'
|
|
2157
|
-
}
|
|
2158
|
-
})));
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
/***/ })
|
|
2162
|
-
|
|
2163
|
-
}]);
|
|
2164
|
-
//# sourceMappingURL=22.chunk.js.map
|