@clickview/player 0.0.0-dev.0 → 0.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/index.html +19 -0
  2. package/package.json +7 -23
  3. package/.eslintrc.json +0 -3
  4. package/.storybook/main.js +0 -21
  5. package/.storybook/preview-head.html +0 -3
  6. package/.storybook/stories/Base.stories.tsx +0 -115
  7. package/.storybook/stories/Clips.stories.tsx +0 -64
  8. package/.storybook/stories/Interactives.stories.tsx +0 -65
  9. package/.storybook/stories/Subtitles.stories.tsx +0 -22
  10. package/.storybook/stories/assets/chapters.vtt +0 -19
  11. package/.storybook/stories/assets/en.vtt +0 -8
  12. package/.storybook/stories/assets/es.vtt +0 -8
  13. package/.storybook/stories/assets/fr.vtt +0 -8
  14. package/.storybook/stories/assets/interactive.json +0 -451
  15. package/.storybook/stories/assets/sample_1280x720.mp4.jpg +0 -0
  16. package/.storybook/stories/assets/sample_1280x720.mp4.vtx +0 -0
  17. package/.storybook/stories/assets/thumbnails.vtt +0 -62
  18. package/.storybook/stories/assets/vertical.mp4 +0 -0
  19. package/.storybook/stories/utils/Wrap.tsx +0 -18
  20. package/.storybook/stories/utils/mock-playerapi.ts +0 -181
  21. package/.storybook/stories/utils/mock-setup.ts +0 -23
  22. package/dist/bundle.js +0 -1
  23. package/dist/font.scss +0 -59
  24. package/dist/libs/analytics/src/clients/CollectionApiClient.d.ts +0 -48
  25. package/dist/libs/analytics/src/constants/CountryRegionMapping.d.ts +0 -7
  26. package/dist/libs/analytics/src/constants/Regions.d.ts +0 -6
  27. package/dist/libs/analytics/src/enums/CountryCode.d.ts +0 -5
  28. package/dist/libs/analytics/src/enums/RegionName.d.ts +0 -5
  29. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +0 -316
  30. package/dist/libs/analytics/src/interfaces/Config.d.ts +0 -3
  31. package/dist/libs/analytics/src/interfaces/Folder.d.ts +0 -3
  32. package/dist/libs/analytics/src/interfaces/HashObject.d.ts +0 -3
  33. package/dist/libs/analytics/src/interfaces/Owner.d.ts +0 -3
  34. package/dist/libs/analytics/src/interfaces/Playlist.d.ts +0 -3
  35. package/dist/libs/analytics/src/interfaces/Rating.d.ts +0 -4
  36. package/dist/libs/analytics/src/interfaces/Region.d.ts +0 -5
  37. package/dist/libs/analytics/src/interfaces/RegionalUrl.d.ts +0 -5
  38. package/dist/libs/analytics/src/interfaces/Resource.d.ts +0 -5
  39. package/dist/libs/analytics/src/interfaces/Series.d.ts +0 -3
  40. package/dist/libs/analytics/src/interfaces/Subtitle.d.ts +0 -4
  41. package/dist/libs/analytics/src/interfaces/User.d.ts +0 -17
  42. package/dist/libs/analytics/src/interfaces/VersionData.d.ts +0 -4
  43. package/dist/libs/analytics/src/interfaces/Video.d.ts +0 -16
  44. package/dist/libs/analytics/src/interfaces/index.d.ts +0 -15
  45. package/dist/libs/analytics/src/interfaces/primitives/BaseObject.d.ts +0 -7
  46. package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +0 -49
  47. package/dist/libs/analytics/src/models/CollectionEvent.d.ts +0 -61
  48. package/dist/libs/analytics/src/utils/CollectionApiClientHelper.d.ts +0 -6
  49. package/dist/libs/analytics/src/utils/DataFormatHelper.d.ts +0 -14
  50. package/dist/libs/analytics/src/utils/EventWhitelistHelper.d.ts +0 -19
  51. package/dist/libs/analytics/src/utils/TypeHelper.d.ts +0 -4
  52. package/dist/libs/analytics/src/utils/UploadDataFormatHelper.d.ts +0 -10
  53. package/dist/libs/analytics/src/utils/UrlHelper.d.ts +0 -3
  54. package/dist/libs/analytics/src/utils/UserAgentHelper.d.ts +0 -10
  55. package/dist/libs/analytics/src/utils/VideoDataFormatHelper.d.ts +0 -42
  56. package/dist/libs/common/src/backbone/constants/CommonChannels.d.ts +0 -5
  57. package/dist/libs/common/src/backbone/core/AppLink.d.ts +0 -37
  58. package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +0 -99
  59. package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +0 -76
  60. package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +0 -6
  61. package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +0 -7
  62. package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +0 -16
  63. package/dist/libs/common/src/backbone/core/BaseError.d.ts +0 -18
  64. package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +0 -11
  65. package/dist/libs/common/src/backbone/core/BaseModel.d.ts +0 -27
  66. package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +0 -21
  67. package/dist/libs/common/src/backbone/core/BaseService.d.ts +0 -10
  68. package/dist/libs/common/src/backbone/core/BaseView.d.ts +0 -131
  69. package/dist/libs/common/src/backbone/core/EventNames.d.ts +0 -16
  70. package/dist/libs/common/src/backbone/core/LayoutService.d.ts +0 -31
  71. package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +0 -3
  72. package/dist/libs/common/src/backbone/core/LocationUtils.d.ts +0 -23
  73. package/dist/libs/common/src/backbone/core/Middleware.d.ts +0 -10
  74. package/dist/libs/common/src/backbone/core/Shell.d.ts +0 -79
  75. package/dist/libs/common/src/backbone/core/Types.d.ts +0 -12
  76. package/dist/libs/common/src/backbone/core/index.d.ts +0 -18
  77. package/dist/libs/common/src/backbone/errors/DevError.d.ts +0 -4
  78. package/dist/libs/common/src/backbone/index.d.ts +0 -2
  79. package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +0 -38
  80. package/dist/libs/common/src/backbone/services/EnvironmentVariables.d.ts +0 -13
  81. package/dist/libs/common/src/react/interfaces/HashObject.d.ts +0 -3
  82. package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +0 -7
  83. package/dist/player-app.css +0 -71
  84. package/dist/player-app.js +0 -52
  85. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +0 -79
  86. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +0 -55
  87. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-load-progress.d.ts +0 -55
  88. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-play-progress.d.ts +0 -55
  89. package/dist/projects/player/src/components/chapter-seek-bar/chapter-seek-bar.d.ts +0 -1
  90. package/dist/projects/player/src/components/chapters-button/chapter-menu-item.d.ts +0 -60
  91. package/dist/projects/player/src/components/chapters-button/chapters-button.d.ts +0 -1
  92. package/dist/projects/player/src/components/cog-button/cog-button.d.ts +0 -38
  93. package/dist/projects/player/src/components/collapserator/collapserator.d.ts +0 -4
  94. package/dist/projects/player/src/components/mouse-time-display/mouse-time-display.d.ts +0 -3
  95. package/dist/projects/player/src/components/playback-rate-button/playback-rate-button.d.ts +0 -1
  96. package/dist/projects/player/src/components/progress-control/progress-control.d.ts +0 -1
  97. package/dist/projects/player/src/components/quality-selector/quality-button.d.ts +0 -1
  98. package/dist/projects/player/src/components/quality-selector/quality-menu-item.d.ts +0 -17
  99. package/dist/projects/player/src/components/subs-caps-button/subs-caps-button.d.ts +0 -1
  100. package/dist/projects/player/src/components/thumbnail-display/thumbnail-display.d.ts +0 -66
  101. package/dist/projects/player/src/components/time-tooltip/time-tooltip.d.ts +0 -15
  102. package/dist/projects/player/src/components/time-wrapper/time-wrapper.d.ts +0 -1
  103. package/dist/projects/player/src/index.d.ts +0 -12
  104. package/dist/projects/player/src/interfaces/CollapsibleComponent.d.ts +0 -10
  105. package/dist/projects/player/src/interfaces/models/ApiError.d.ts +0 -4
  106. package/dist/projects/player/src/interfaces/models/PlaybackObject.d.ts +0 -32
  107. package/dist/projects/player/src/players/base-player.d.ts +0 -64
  108. package/dist/projects/player/src/players/create-clip-player.d.ts +0 -16
  109. package/dist/projects/player/src/players/interactive-player.d.ts +0 -11
  110. package/dist/projects/player/src/players/player.d.ts +0 -15
  111. package/dist/projects/player/src/plugins/clip-plugin/clip-plugin.d.ts +0 -50
  112. package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector-handle.d.ts +0 -54
  113. package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector.d.ts +0 -89
  114. package/dist/projects/player/src/plugins/create-clip-plugin/components/create-clip-seek-bar/create-clip-seek-bar.d.ts +0 -14
  115. package/dist/projects/player/src/plugins/create-clip-plugin/create-clip-plugin.d.ts +0 -14
  116. package/dist/projects/player/src/plugins/example-plugin/components/example-button/example-button.d.ts +0 -1
  117. package/dist/projects/player/src/plugins/example-plugin/components/example-react-button/example-react-button.d.ts +0 -1
  118. package/dist/projects/player/src/plugins/example-plugin/example-plugin.d.ts +0 -2
  119. package/dist/projects/player/src/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin.d.ts +0 -1
  120. package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-components.d.ts +0 -4
  121. package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.d.ts +0 -10
  122. package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.d.ts +0 -8
  123. package/dist/projects/player/src/plugins/interactive-plugin/components/feedback/feedback.d.ts +0 -7
  124. package/dist/projects/player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.d.ts +0 -2
  125. package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/interactive-component.d.ts +0 -1
  126. package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.d.ts +0 -21
  127. package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.d.ts +0 -66
  128. package/dist/projects/player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.d.ts +0 -21
  129. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.d.ts +0 -3
  130. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.d.ts +0 -4
  131. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.d.ts +0 -9
  132. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.d.ts +0 -10
  133. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.d.ts +0 -9
  134. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-components.d.ts +0 -4
  135. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.d.ts +0 -8
  136. package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +0 -1
  137. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionComponent.d.ts +0 -3
  138. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionProps.d.ts +0 -8
  139. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractiveMode.d.ts +0 -4
  140. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/SubmissionFunction.d.ts +0 -2
  141. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/ValidationFunction.d.ts +0 -2
  142. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/index.d.ts +0 -6
  143. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/ActionableItem.d.ts +0 -6
  144. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/Interaction.d.ts +0 -14
  145. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/InteractionType.d.ts +0 -7
  146. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/InteractionTypeId.d.ts +0 -8
  147. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/Interactive.d.ts +0 -7
  148. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/Timepoint.d.ts +0 -9
  149. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/index.d.ts +0 -6
  150. package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionComponents.d.ts +0 -2
  151. package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionStateId.d.ts +0 -2
  152. package/dist/projects/player/src/plugins/interactive-plugin/utils/getSubmissionFunction.d.ts +0 -2
  153. package/dist/projects/player/src/plugins/interactive-plugin/utils/getTimepointStateId.d.ts +0 -2
  154. package/dist/projects/player/src/plugins/interactive-plugin/utils/getValidationFunction.d.ts +0 -2
  155. package/dist/projects/player/src/plugins/interactive-plugin/utils/useInteractiveTrack.d.ts +0 -17
  156. package/dist/projects/player/src/plugins/open-externally-plugin/components/open-externally-button.d.ts +0 -1
  157. package/dist/projects/player/src/plugins/open-externally-plugin/interfaces/ExternalLinkOptions.d.ts +0 -3
  158. package/dist/projects/player/src/plugins/open-externally-plugin/open-externally-plugin.d.ts +0 -1
  159. package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.d.ts +0 -1
  160. package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.test.d.ts +0 -1
  161. package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +0 -9
  162. package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveFilesPluginOptions.d.ts +0 -4
  163. package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveRepresentation.d.ts +0 -10
  164. package/dist/projects/player/src/plugins/progressive-files-plugin/interfaces/Source.d.ts +0 -6
  165. package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts +0 -38
  166. package/dist/projects/player/src/plugins/touch-controls-plugin/components/touch-controls/touch-controls.d.ts +0 -59
  167. package/dist/projects/player/src/plugins/touch-controls-plugin/touch-controls-plugin.d.ts +0 -1
  168. package/dist/projects/player/src/react/CreateClipPlayer.d.ts +0 -3
  169. package/dist/projects/player/src/react/EmbeddedPlayer.d.ts +0 -7
  170. package/dist/projects/player/src/react/InteractivePlayer.d.ts +0 -9
  171. package/dist/projects/player/src/react/Player.d.ts +0 -8
  172. package/dist/projects/player/src/react/react-component.d.ts +0 -56
  173. package/dist/projects/player/src/services/analytics-service.d.ts +0 -15
  174. package/dist/projects/player/src/utils/ajax-helper.d.ts +0 -6
  175. package/dist/projects/player/src/utils/fn.d.ts +0 -14
  176. package/dist/projects/player/src/utils/formatTime.d.ts +0 -5
  177. package/dist/projects/player/src/utils/hotkeys.d.ts +0 -5
  178. package/dist/projects/player/src/utils/scrollbar-helper.d.ts +0 -6
  179. package/dist/projects/player/src/utils/track-helper.d.ts +0 -7
  180. package/dist/projects/player/test/players/test-player.d.ts +0 -17
  181. package/dist/projects/player/test/setupTests.d.ts +0 -0
  182. package/dist/projects/player/test/utils/test-helpers.d.ts +0 -8
  183. package/jest.config.js +0 -13
  184. package/test/players/test-player.ts +0 -31
  185. package/test/setupTests.ts +0 -8
  186. package/test/utils/test-helpers.ts +0 -22
  187. package/tooling/font-webpack.config.js +0 -44
  188. package/typings/libs/videojs-contrib-quality-levels.d.ts +0 -29
@@ -1,3 +0,0 @@
1
- import { BaseObject } from "./";
2
- export interface Playlist extends BaseObject {
3
- }
@@ -1,4 +0,0 @@
1
- import { BaseObject } from "./";
2
- export interface Rating extends BaseObject {
3
- code?: string;
4
- }
@@ -1,5 +0,0 @@
1
- import { RegionName } from "../enums/RegionName";
2
- export interface Region {
3
- displayName: string;
4
- systemName: RegionName;
5
- }
@@ -1,5 +0,0 @@
1
- export interface RegionalUrl {
2
- cvApSoutheast1: string;
3
- cvApSoutheast2: string;
4
- cvEuWest1: string;
5
- }
@@ -1,5 +0,0 @@
1
- import { BaseObject } from "./";
2
- export interface Resource extends BaseObject {
3
- metadata?: any;
4
- subtitle?: any;
5
- }
@@ -1,3 +0,0 @@
1
- import { BaseObject } from "./";
2
- export interface Series extends BaseObject {
3
- }
@@ -1,4 +0,0 @@
1
- import { BaseObject } from "./";
2
- export interface Subtitle extends BaseObject {
3
- metadata?: any;
4
- }
@@ -1,17 +0,0 @@
1
- import { BaseObject } from "./";
2
- export declare enum UserGroup {
3
- Staff = "staff",
4
- Learner = "learner",
5
- Unknown = "unknown"
6
- }
7
- export interface User extends BaseObject {
8
- countryCode?: string;
9
- customerId?: string;
10
- customerGuid?: string;
11
- customerName?: string;
12
- crmId?: number;
13
- role?: string;
14
- userGroup?: UserGroup;
15
- yearGroup?: string;
16
- isOpenCustomer?: boolean;
17
- }
@@ -1,4 +0,0 @@
1
- export interface VersionData {
2
- name: string;
3
- version: string;
4
- }
@@ -1,16 +0,0 @@
1
- import { BaseObject } from "./";
2
- import { Series } from './Series';
3
- import { Folder } from './Folder';
4
- import { Owner } from './Owner';
5
- import { Playlist } from './Playlist';
6
- import { Rating } from './Rating';
7
- export interface Video extends BaseObject {
8
- series?: Series;
9
- categories?: Folder[];
10
- owner?: Owner;
11
- playlist?: Playlist;
12
- rating?: Rating;
13
- duration?: number;
14
- trackingCode?: string;
15
- productionYear?: number;
16
- }
@@ -1,15 +0,0 @@
1
- export * from './AnalyticsTypes';
2
- export * from './User';
3
- export * from './Config';
4
- export * from './Owner';
5
- export * from './Folder';
6
- export * from './HashObject';
7
- export * from './Playlist';
8
- export * from './Resource';
9
- export * from './Rating';
10
- export * from './Region';
11
- export * from './RegionalUrl';
12
- export * from './Series';
13
- export * from './Subtitle';
14
- export * from './Video';
15
- export * from './primitives/BaseObject';
@@ -1,7 +0,0 @@
1
- export interface BaseObject {
2
- id?: string;
3
- name?: string;
4
- dateCreated?: string;
5
- dateModified?: string;
6
- dateAssociated?: string;
7
- }
@@ -1,49 +0,0 @@
1
- import { ObjectHash } from 'backbone';
2
- import { AnalyticsEventType, ActionContext } from "../interfaces";
3
- import { EventVersion } from "../interfaces";
4
- interface Enrichment {
5
- [prop: string]: string;
6
- }
7
- export interface DataObjectPayload extends ObjectHash {
8
- }
9
- export interface DataCollectionPayload extends Array<ObjectHash> {
10
- }
11
- export declare type AnalyticsDataPayload = DataObjectPayload | DataCollectionPayload;
12
- /**
13
- * Base AnalyticsEvent Object.
14
- * Acts as a wrapper for our events, encapsulating the event type
15
- * and a data payload.
16
- */
17
- export declare class AnalyticsEvent<TType extends AnalyticsEventType, TPayload extends AnalyticsDataPayload> {
18
- type: TType;
19
- data: TPayload;
20
- actionContext: ActionContext;
21
- eventVersion: EventVersion;
22
- constructor(type: TType, data: TPayload, actionContext?: ActionContext, eventVersion?: EventVersion);
23
- /**
24
- * Utility function that allows us to create type guards.
25
- * @param type EventType
26
- */
27
- isType(type: TType): this is TType;
28
- /**
29
- * Mix different enrichments into the base AnalyticsEvent object
30
- * to keep it as flat as possible.
31
- *
32
- * @param key Top level enrichment name
33
- * @param value Either a string or set of KV Pairs
34
- */
35
- enrich(key: string, value: string | Enrichment): void;
36
- get(key: string): string | Enrichment;
37
- /**
38
- * Check that the incoming enrichment doesn't clash with
39
- * a pre-existing enrichement.
40
- *
41
- * @param key
42
- */
43
- private validateKey;
44
- }
45
- /**
46
- * Alias our analytics type to make our function signatures and typings a little cleaner
47
- */
48
- export declare type CoreAnalyticsType = AnalyticsEvent<AnalyticsEventType, AnalyticsDataPayload>;
49
- export {};
@@ -1,61 +0,0 @@
1
- import { HashObject } from "../interfaces/HashObject";
2
- import { VersionData } from "../interfaces/VersionData";
3
- import { UserAction, EventVersion, ActionContext } from "../interfaces/AnalyticsTypes";
4
- import { Region } from "../interfaces/Region";
5
- import { CountryCode } from "../enums/CountryCode";
6
- export interface IncomingEvent {
7
- type: CollectionEventType;
8
- data: HashObject;
9
- actionContext: ActionContext;
10
- eventVersion: EventVersion;
11
- }
12
- export interface RequestData {
13
- url: string;
14
- referrer: string;
15
- }
16
- export interface PlatformData {
17
- browser: VersionData;
18
- os: VersionData;
19
- request: RequestData;
20
- screenResolution: string;
21
- }
22
- export interface CollectionEventUserData {
23
- id: string;
24
- role: string;
25
- userGroup: string;
26
- yearGroup: string;
27
- customer: {
28
- id: string;
29
- name: string;
30
- country: CountryCode;
31
- region: Region;
32
- customerGuid: string;
33
- crmId: number;
34
- openCustomer: boolean;
35
- };
36
- }
37
- export interface CollectionEventData {
38
- [entity: string]: HashObject;
39
- action: HashObject;
40
- user: CollectionEventUserData;
41
- platform: PlatformData;
42
- product: VersionData;
43
- }
44
- export interface CollectionEventMetadata {
45
- timestamp: string;
46
- client: {
47
- name: string;
48
- version: string;
49
- region: Region;
50
- };
51
- eventVersion: EventVersion;
52
- }
53
- export declare type CollectionEventType = UserAction;
54
- /**
55
- * Model to be sent to CollectionApi.
56
- */
57
- export interface CollectionEvent {
58
- type: CollectionEventType;
59
- data: CollectionEventData;
60
- metadata: CollectionEventMetadata;
61
- }
@@ -1,6 +0,0 @@
1
- import { IncomingEvent } from "../models/CollectionEvent";
2
- import { HashObject } from "../interfaces";
3
- export declare const CollectionApiClientHelper: {
4
- shouldLog(event: IncomingEvent): boolean;
5
- formatData(event: IncomingEvent): HashObject<any> | HashObject<any>[];
6
- };
@@ -1,14 +0,0 @@
1
- import { CoreAnalyticsType } from "../models/AnalyticsEvent";
2
- import { HashObject } from "../interfaces";
3
- declare type DataFormatter = (data: HashObject, event: CoreAnalyticsType) => HashObject;
4
- export interface DataFormatterHash {
5
- [eventType: string]: DataFormatter;
6
- }
7
- export declare const DataFormatHelper: {
8
- /**
9
- * Object will be logged to sink as is
10
- */
11
- passthrough(data: HashObject<any>): HashObject<any>;
12
- getEditData(data: HashObject<any>, event: CoreAnalyticsType): HashObject<any>;
13
- };
14
- export {};
@@ -1,19 +0,0 @@
1
- import { CoreAnalyticsType } from "../models/AnalyticsEvent";
2
- /**
3
- * Manage which events we want to log
4
- *
5
- * @description
6
- * All events have a UserAction type, however, that same type can be used to represent
7
- * different types of actions. For example, `UserAction.Rename` is used for events involving
8
- * the renaming of folders, libraries and videos (from different parts of the product).
9
- *
10
- * So if a situation arises where we only want to collect events for a certain entity or from a
11
- * certain part of the product. We can add a custom callback below and filter based on the event's actionContext.
12
- */
13
- export declare const EventWhitelistHelper: {
14
- allow: () => boolean;
15
- restrict: () => boolean;
16
- };
17
- export interface EventWhitelistHash {
18
- [eventType: string]: (event: CoreAnalyticsType) => boolean;
19
- }
@@ -1,4 +0,0 @@
1
- export declare const TypeHelper: {
2
- isObject(obj: any): boolean;
3
- isFunction(fn: (...args: any[]) => any): boolean;
4
- };
@@ -1,10 +0,0 @@
1
- import { HashObject, Subtitle, Resource } from "../interfaces";
2
- import { CoreAnalyticsType } from "../models/AnalyticsEvent";
3
- export declare const UploadDataFormatHelper: {
4
- getUploadData(data: any, event: CoreAnalyticsType): HashObject<any>;
5
- formatVideoUpload(data: any, event: CoreAnalyticsType): HashObject<any>[];
6
- getStartVideoUploadData(files: File[]): HashObject<any>[];
7
- getDiscardVideoUploadData(uploads: HashObject<any> | HashObject<any>[]): HashObject<any>[];
8
- getCompleteUploadData(videos: HashObject<any>[]): HashObject<any>[];
9
- formatResourceUpload(item: Resource | Subtitle): HashObject<any>;
10
- };
@@ -1,3 +0,0 @@
1
- export declare const UrlHelper: {
2
- safeUrlConcat(baseUrl: string, path: string): string;
3
- };
@@ -1,10 +0,0 @@
1
- import { VersionData } from "../interfaces/VersionData";
2
- /**
3
- * Test order is important for all UARegex tests. Reordering them will break functionality.
4
- */
5
- export declare const UserAgentHelper: {
6
- getDeviceType(): string;
7
- getOperatingSystem(): VersionData;
8
- getBrowser(): VersionData;
9
- isTouchScreen(): boolean;
10
- };
@@ -1,42 +0,0 @@
1
- import { HashObject, Video } from "../interfaces";
2
- export interface VideoWatchAnalyticsEvent {
3
- model: Video;
4
- playbackStatus: PlaybackStatus;
5
- }
6
- export interface PlaybackStatus {
7
- position: number;
8
- chapter: number;
9
- totalDuration: number;
10
- totalWatched: number;
11
- hasStarted?: boolean;
12
- }
13
- interface BaseVideoData {
14
- id: string;
15
- title: string;
16
- trackingCode: string;
17
- duration: number;
18
- }
19
- interface BaseAssocData {
20
- id: string;
21
- title?: string;
22
- }
23
- export interface VideoAnalyticsPayload {
24
- video: BaseVideoData;
25
- rating?: string;
26
- series?: BaseAssocData;
27
- folder?: BaseAssocData;
28
- owner?: BaseAssocData;
29
- playlist?: BaseAssocData;
30
- playbackStatus?: PlaybackStatus;
31
- }
32
- export declare const VideoDataFormatHelper: {
33
- getVideoData(options: VideoWatchAnalyticsEvent): VideoAnalyticsPayload;
34
- /**
35
- * Map to the same properties recorded in Online.
36
- * @see _toLogMasterVideo() in AnalyticsService in Online
37
- *
38
- * TODO: Video origin and user channel logging - both of these need to be re-worked properly.
39
- */
40
- getLegacyVideoData(options: VideoWatchAnalyticsEvent): HashObject<any>;
41
- };
42
- export {};
@@ -1,5 +0,0 @@
1
- export declare const CommonChannels: {
2
- SHELL: string;
3
- ALERT: string;
4
- POPUP: string;
5
- };
@@ -1,37 +0,0 @@
1
- import { ObjectHash } from 'backbone';
2
- export interface AppLink {
3
- application: string;
4
- action: string;
5
- args?: (string | number)[];
6
- params?: string | ObjectHash;
7
- }
8
- export interface AppLinkHash {
9
- [selector: string]: AppLink;
10
- }
11
- export interface AppLinkOptions {
12
- replace?: boolean;
13
- }
14
- export declare const AppLinkUtility: {
15
- routingStarted(): void;
16
- routingEnded(): void;
17
- hasActiveRoute(): boolean;
18
- };
19
- export declare const AppLinkHelper: {
20
- /**
21
- * Build a href string from an AppLink object
22
- * @param appLink
23
- */
24
- getHref(appLink: AppLink): string;
25
- /**
26
- * This is the reverse process of extracting params out of a route.
27
- * (e.g. Will take the route '/videos/:id' and an array of args = [123]
28
- * and return '/videos/123')
29
- */
30
- buildRoute(route: string, appLink: AppLink): string;
31
- /**
32
- * Manually trigger an AppLink
33
- * @param appLink
34
- */
35
- trigger(appLink: AppLink, options?: AppLinkOptions): void;
36
- getCurrentAppLink(): AppLink;
37
- };
@@ -1,99 +0,0 @@
1
- /// <reference types="backbone" />
2
- import * as Marionette from 'backbone.marionette';
3
- import { Shell } from './Shell';
4
- import { BaseApplication, BaseApplicationOptions } from './BaseApplication';
5
- import { AppLink } from './AppLink';
6
- import { MiddlewareFunction } from './Middleware';
7
- export interface ExecuteRouteOptions {
8
- isAppRoute: boolean;
9
- }
10
- /**
11
- * This should only ever be used by the shell
12
- * creating a new instance of the AppRoute
13
- */
14
- export interface BaseAppRouterOptions extends Marionette.AppRouterOptions {
15
- appConstructor: typeof BaseApplication;
16
- /**
17
- * These will be passed into the appConstructor
18
- * when creating an instance of the Application
19
- */
20
- appOptions?: BaseApplicationOptions;
21
- shell: Shell;
22
- }
23
- /**
24
- * Every Application must have an AppRouter
25
- */
26
- export declare class BaseAppRouter extends Marionette.AppRouter {
27
- /**
28
- * A hash of urls to method names on the Application.
29
- * Exactly the same implementation as Backbone Router routes
30
- * except the methods exist on the Application.
31
- * See http://backbonejs.org/#Router-routes
32
- */
33
- protected appRoutes?: Marionette.AppRoutes;
34
- protected appLinks?: string[];
35
- protected externalRoutes?: Marionette.AppRoutes;
36
- /**
37
- * The channelName used to trigger the appLinks
38
- * on backbone.radio. This will match the Application's
39
- * channelName.
40
- */
41
- protected channelName?: string;
42
- /**
43
- * These are async middleware functions that are run
44
- * before any route on this router is executed.
45
- *
46
- * They can be used to prevent access to a router using
47
- * asyncronous code.
48
- */
49
- protected filters: MiddlewareFunction<AppLink>[];
50
- /**
51
- * See BaseAppRouterOptions above.
52
- */
53
- protected options?: BaseAppRouterOptions;
54
- constructor(options?: BaseAppRouterOptions);
55
- private bindDisposal;
56
- private addRouteLookup;
57
- /**
58
- * Creates all the reverse route lookups
59
- * and binds all the appLinks to the radio channel
60
- */
61
- private processInternalRoutes;
62
- private processExternalRoutes;
63
- private processAppLinks;
64
- /**
65
- * This is the heart of the AppRouter. Every single route both page loads
66
- * and appLinks will go through this method.
67
- *
68
- * This will return false if onBeforeAction returns false
69
- * and the window history will not be altered.
70
- */
71
- private executeRoute;
72
- /**
73
- * Instantiates and starts the application if there was
74
- * not already an instance.
75
- *
76
- * Why is the application stores on this.controller?
77
- * In Marionette AppRouters hold reference to a controller
78
- * which in turn is responsibile for maintaining reference to an application.
79
- * We've restructured this architecture so that AppRouters directly hold
80
- * the instance of the Application, but are still leveraging Marionette's
81
- * use of appRoutes on the controller.
82
- */
83
- private createApp;
84
- private destroyApp;
85
- /**
86
- * Overriding Marionette.AppRouter's _addAppRoute so that
87
- * execute route is called instead of the method directly.
88
- *
89
- * We do this so that executeRoute can be called for every single
90
- * route, whether it's a page load or an appLink. This will make it easier
91
- * to modify the action
92
- */
93
- private _addAppRoute;
94
- private toEventName;
95
- private toMethodName;
96
- private validateAppLink;
97
- listenTo(object: any, eventMap: Backbone.EventMap): this;
98
- listenTo(obj: string | Backbone.Events, events: string, callback: (...args: any) => any): this;
99
- }
@@ -1,76 +0,0 @@
1
- import { ObjectHash } from 'backbone';
2
- import * as Marionette from 'backbone.marionette';
3
- import { Shell } from './Shell';
4
- import { BaseLayoutView, BaseLayoutViewOptions } from './BaseLayoutView';
5
- import { LayoutService, LayoutOptions } from './LayoutService';
6
- import { BaseAppRouter } from './BaseAppRouter';
7
- export interface BaseApplicationOptions extends Marionette.ApplicationOptions {
8
- shell: Shell;
9
- layoutService: LayoutService;
10
- channelName?: string;
11
- }
12
- export declare class BaseApplication extends Marionette.Application {
13
- /**
14
- * Layout service is used to retreive the layout on each route
15
- */
16
- private layoutService;
17
- /**
18
- * The layout that should be used to render all content into the DOM
19
- */
20
- protected layout?: BaseLayoutView;
21
- /**
22
- * This is specified by all children of Core.Application
23
- * to determine which layout to load in from layout service,
24
- * and what options to instantiate it with.
25
- */
26
- protected layoutOptions: LayoutOptions<BaseLayoutViewOptions>;
27
- /**
28
- * A reference to the shell is always kept as a
29
- * way to both render the layout into the dom
30
- * and keep reference to global services
31
- */
32
- protected shell: Shell;
33
- /**
34
- * An instance of the Core.AppRouter is created
35
- * for each Application in order to listen to applink
36
- * events. The application instance is only then instantiated
37
- * when the Application route is hit
38
- */
39
- static router: typeof BaseAppRouter;
40
- /**
41
- * Provides the ability to define useful error messages.
42
- */
43
- name: string;
44
- /** When overridden determines which options are
45
- * mixed into the instance */
46
- props: string[];
47
- /**
48
- * Used by application actions to set default options.
49
- */
50
- private defaultQueryParams;
51
- /**
52
- * Shell and layoutService will be mixed into each instance
53
- * of Core.Applicataion
54
- */
55
- get defaultProps(): string[];
56
- /**
57
- * The constructor will merge in props and ensure any required properties
58
- * are defined
59
- * @constructor
60
- */
61
- constructor(options?: BaseApplicationOptions);
62
- private getGlobalRadioChannel;
63
- /**
64
- * This method is triggered by Core.AppRouter when it loads
65
- * in a route for this application. It will swap in the appropriate
66
- * layout before hitting the application's action.
67
- *
68
- */
69
- private onLoadLayout;
70
- private onShowPopup;
71
- protected onShowAlert(options: ObjectHash): void;
72
- protected setDefaultQueryParams(params: ObjectHash): void;
73
- getAndClearDefaultQueryParams(): ObjectHash;
74
- listenTo(object: any, eventMap: Backbone.EventMap): this;
75
- listenTo(obj: string | Backbone.Events, events: string, callback: (...args: any) => any): this;
76
- }
@@ -1,6 +0,0 @@
1
- /// <reference types="backbone" />
2
- import * as Marionette from 'backbone.marionette';
3
- export declare class BaseBehavior extends Marionette.Behavior {
4
- listenTo(object: any, eventMap: Backbone.EventMap): this;
5
- listenTo(obj: string | Backbone.Events, events: string, callback: (...args: any) => any): this;
6
- }
@@ -1,7 +0,0 @@
1
- import * as Backbone from 'backbone';
2
- import { BaseModel } from './BaseModel';
3
- export declare class BaseCollection<TModel extends BaseModel = BaseModel> extends Backbone.Collection<TModel> {
4
- parent?: BaseModel | BaseCollection;
5
- listenTo(object: any, eventMap: Backbone.EventMap): this;
6
- listenTo(obj: string | Backbone.Events, events: string, callback: (...args: any) => any): this;
7
- }
@@ -1,16 +0,0 @@
1
- /// <reference types="backbone" />
2
- import * as Marionette from 'backbone.marionette';
3
- import { BaseCollection } from './BaseCollection';
4
- import { CoreView } from './BaseView';
5
- import { BaseModel } from './BaseModel';
6
- export interface BaseCollectionViewOptions<TModel extends BaseModel = BaseModel> extends Marionette.CollectionViewOptions<TModel> {
7
- channelName?: string;
8
- }
9
- export declare class BaseCollectionView<TModel extends BaseModel = BaseModel, TView extends CoreView<TModel> = CoreView<TModel>, TCollection extends BaseCollection<TModel> = BaseCollection<TModel>> extends Marionette.CollectionView<TModel, TView, TCollection> {
10
- protected options: BaseCollectionViewOptions<TModel>;
11
- constructor(options?: BaseCollectionViewOptions<TModel>);
12
- serializeModel(): any;
13
- serializeCollection(): any[];
14
- listenTo(object: any, eventMap: Backbone.EventMap): this;
15
- listenTo(obj: string | Backbone.Events, events: string, callback: (...args: any) => any): this;
16
- }
@@ -1,18 +0,0 @@
1
- export declare class BaseError extends Error {
2
- name: string;
3
- constructor(message: string);
4
- }
5
- /**
6
- * You can use these if you want to leverage the convenience
7
- * of the error set up without actually throwing the error
8
- */
9
- export declare abstract class SilentError extends BaseError {
10
- get name(): string;
11
- }
12
- export declare class CoreError extends Error {
13
- get name(): string;
14
- }
15
- declare const ErrorHelper: {
16
- throw(error: BaseError): void;
17
- };
18
- export { ErrorHelper };
@@ -1,11 +0,0 @@
1
- import { BaseView, BaseViewOptions } from './BaseView';
2
- import { Store } from 'redux';
3
- export interface BaseLayoutViewOptions extends BaseViewOptions {
4
- store?: Store;
5
- }
6
- export declare class BaseLayoutView extends BaseView {
7
- protected options: BaseLayoutViewOptions;
8
- constructor(options: BaseLayoutViewOptions);
9
- static getCacheKey(options?: BaseLayoutViewOptions): string;
10
- unmountRegion(regionName: string): void;
11
- }
@@ -1,27 +0,0 @@
1
- import * as Backbone from 'backbone';
2
- import { BaseCollection } from './BaseCollection';
3
- export declare class BaseModel extends Backbone.Model {
4
- parent?: BaseModel | BaseCollection;
5
- collection: BaseCollection;
6
- /**
7
- * Mechanism to allow properties/functions to be attached to
8
- * the instance of a model at runtime.
9
- * @param propertyHash
10
- *
11
- * I feel like this implementation is a bit naive,
12
- * but it will suffice for the time being - Mike
13
- */
14
- private mixin;
15
- /**
16
- * Helper to facilitate model validation at runtime
17
- * @param validation
18
- */
19
- addValidation(validation: any): void;
20
- /**
21
- * Backbone Validation mixin functions
22
- */
23
- preValidate: (attr: any, value: any) => any;
24
- validate(attributes?: any, options?: any): any;
25
- listenTo(object: any, eventMap: Backbone.EventMap): this;
26
- listenTo(obj: string | Backbone.Events, events: string, callback: (...args: any) => any): this;
27
- }