@clickview/online 0.0.8-rc.2 → 0.0.8-rc.4

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 (94) hide show
  1. package/dist/en.json +1 -1
  2. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +1 -0
  3. package/dist/libs/shared/src/apps/playlists/components/playlist-list/PlaylistItem.d.ts +1 -1
  4. package/dist/libs/shared/src/apps/playlists/components/playlist-list/PlaylistList.d.ts +1 -1
  5. package/dist/libs/shared/src/apps/upload/constants/UploadConstants.d.ts +39 -0
  6. package/dist/libs/shared/src/apps/upload/enums/FileLifestyle.d.ts +4 -0
  7. package/dist/libs/shared/src/apps/upload/errors/file-type/FileTypeError.d.ts +15 -0
  8. package/dist/libs/shared/src/apps/upload/errors/internet-connectivity/InternetConnectivityError.d.ts +7 -0
  9. package/dist/libs/shared/src/apps/upload/services/DropzoneWrapper.d.ts +30 -0
  10. package/dist/libs/shared/src/apps/upload/services/UploadService.d.ts +66 -0
  11. package/dist/libs/shared/src/apps/upload/utils/FileExtensionsHelper.d.ts +9 -0
  12. package/dist/libs/shared/src/components/channel-form-field/ChannelFormField.d.ts +7 -0
  13. package/dist/libs/shared/src/components/confirmation-popup/ConfirmationPopup.d.ts +20 -0
  14. package/dist/libs/shared/src/components/edit-link/EditLink.d.ts +26 -0
  15. package/dist/libs/shared/src/components/edit-resource/EditResource.d.ts +15 -0
  16. package/dist/libs/shared/src/components/edit-video-links/EditVideoLinks.d.ts +11 -0
  17. package/dist/libs/shared/src/components/edit-video-resources/EditVideoResources.d.ts +20 -0
  18. package/dist/libs/shared/src/components/edit-video-subtitles/EditVideoSubtitles.d.ts +16 -0
  19. package/dist/libs/shared/src/components/file-select/FileSelect.d.ts +14 -0
  20. package/dist/libs/shared/src/components/file-select-button/FileSelectButton.d.ts +15 -0
  21. package/dist/libs/shared/src/components/file-upload-list/FileUploadList.d.ts +8 -0
  22. package/dist/libs/shared/src/components/forms/date-picker-form-field/DatePickerFormField.d.ts +16 -0
  23. package/dist/libs/shared/src/components/image-cropper/ImageCropper.d.ts +10 -0
  24. package/dist/libs/shared/src/components/image-select/ImageSelect.d.ts +13 -0
  25. package/dist/libs/shared/src/components/language-select/LanguageSelect.d.ts +8 -0
  26. package/dist/libs/shared/src/components/progress-bars/clips/ClipThumbnailProgressBar.d.ts +8 -0
  27. package/dist/libs/shared/src/components/progress-bars/interactives/InteractiveProgressBar.d.ts +11 -0
  28. package/dist/libs/shared/src/components/progress-bars/videos/VideoWatchProgressBar.d.ts +7 -0
  29. package/dist/libs/shared/src/components/rating-select/RatingSelect.d.ts +11 -0
  30. package/dist/libs/shared/src/components/resource-list/ResourceList.d.ts +14 -0
  31. package/dist/libs/shared/src/components/subtitle-list/SubtitleList.d.ts +9 -0
  32. package/dist/libs/shared/src/components/tags/TagItem.d.ts +4 -1
  33. package/dist/libs/shared/src/components/tags/TagList.d.ts +4 -2
  34. package/dist/libs/shared/src/components/thumbnails/video/VideoThumbnail.d.ts +27 -3
  35. package/dist/libs/shared/src/components/thumbnails/video/expandable/ExpandableVideoThumbnail.d.ts +2 -2
  36. package/dist/libs/shared/src/components/thumbnails/video/static/StaticVideoThumbnail.d.ts +2 -2
  37. package/dist/libs/shared/src/components/widgets/fixed-widget/FixedWidget.d.ts +3 -1
  38. package/dist/libs/shared/src/constants/ImageSizes.d.ts +8 -0
  39. package/dist/libs/shared/src/context/ImageStorageContext.d.ts +45 -0
  40. package/dist/libs/shared/src/enums/DateFormat.d.ts +7 -0
  41. package/dist/libs/shared/src/enums/MasterObjectTypes.d.ts +8 -0
  42. package/dist/libs/shared/src/enums/ObjectOwnerType.d.ts +4 -0
  43. package/dist/libs/shared/src/enums/UploadInteractionType.d.ts +4 -0
  44. package/dist/libs/shared/src/enums/WidgetContents.d.ts +3 -1
  45. package/dist/libs/shared/src/flight-requests/ImageRequests.d.ts +7 -0
  46. package/dist/libs/shared/src/flight-requests/LinkRequests.d.ts +11 -0
  47. package/dist/libs/shared/src/flight-requests/RatingRequests.d.ts +4 -0
  48. package/dist/libs/shared/src/flight-requests/ResourceRequests.d.ts +11 -0
  49. package/dist/libs/shared/src/flight-requests/SubtitleRequests.d.ts +9 -0
  50. package/dist/libs/shared/src/hooks/UseListenOn.d.ts +3 -0
  51. package/dist/libs/shared/src/hooks/useGetCollectionItems.d.ts +7 -0
  52. package/dist/libs/shared/src/interfaces/collections/SubtitleCollection.d.ts +3 -0
  53. package/dist/libs/shared/src/interfaces/models/Clip.d.ts +2 -1
  54. package/dist/libs/shared/src/interfaces/models/FileUpload.d.ts +20 -0
  55. package/dist/libs/shared/src/interfaces/models/Interactive.d.ts +4 -0
  56. package/dist/libs/shared/src/interfaces/models/Language.d.ts +4 -0
  57. package/dist/libs/shared/src/interfaces/models/Subtitle.d.ts +7 -0
  58. package/dist/libs/shared/src/interfaces/requests/UpdateObjectChannel.d.ts +3 -0
  59. package/dist/libs/shared/src/interfaces/requests/UpdateObjectRating.d.ts +3 -0
  60. package/dist/libs/shared/src/interfaces/requests/UpdateResourceRequest.d.ts +3 -0
  61. package/dist/libs/shared/src/legacy/behaviors/file-drop/FileDropBehavior.d.ts +19 -0
  62. package/dist/libs/shared/src/legacy/behaviors/file-drop/FileDropHelper.d.ts +4 -0
  63. package/dist/libs/shared/src/legacy/behaviors/file-select/FileSelectBehavior.d.ts +16 -0
  64. package/dist/libs/shared/src/legacy/components/file-select/FileSelectComponent.d.ts +29 -0
  65. package/dist/libs/shared/src/legacy/components/file-uploads/FileUploadComponent.d.ts +15 -0
  66. package/dist/libs/shared/src/legacy/components/resource-item/ResourceItemComponent.d.ts +22 -0
  67. package/dist/libs/shared/src/legacy/components/subtitle-item/SubtitleItemComponent.d.ts +17 -0
  68. package/dist/libs/shared/src/legacy/errors/too-many-files/TooManyFilesError.d.ts +7 -0
  69. package/dist/libs/shared/src/legacy/errors/too-many-resources/TooManyResourcesError.d.ts +8 -0
  70. package/dist/libs/shared/src/legacy/errors/too-many-subtitles/TooManySubtitlesError.d.ts +8 -0
  71. package/dist/libs/shared/src/legacy/utils/LangHelper.d.ts +5 -0
  72. package/dist/libs/shared/src/utils/ImageSelectHelper.d.ts +6 -0
  73. package/dist/libs/shared/src/utils/PermissionsHelper.d.ts +10 -0
  74. package/dist/libs/shared/src/utils/SubtitleHelper.d.ts +9 -0
  75. package/dist/libs/shared/src/views/delete-link/DeleteLinkView.d.ts +8 -0
  76. package/dist/libs/shared/src/views/delete-resource/DeleteResourceView.d.ts +8 -0
  77. package/dist/libs/shared/src/views/delete-subtitle/DeleteSubtitleView.d.ts +8 -0
  78. package/dist/libs/shared/src/views/dialog/DialogView.d.ts +9 -0
  79. package/dist/libs/shared/src/views/edit-link/EditLinkView.d.ts +8 -0
  80. package/dist/libs/shared/src/views/edit-resource/EditResourceView.d.ts +8 -0
  81. package/dist/libs/shared/src/views/image-upload/ImageUploadView.d.ts +9 -0
  82. package/dist/online-app.css +13 -7
  83. package/dist/online-app.css.map +1 -0
  84. package/dist/online-app.js +3 -3
  85. package/dist/online-app.js.map +1 -0
  86. package/dist/projects/online/src/apps/workspace/WorkspaceApplication.d.ts +19 -0
  87. package/dist/projects/online/src/apps/workspace/components/edit-workspace-video-details/EditWorkspaceVideoDetails.d.ts +9 -0
  88. package/dist/projects/online/src/apps/workspace/components/edit-workspace-video-details/partial-loading/PartialEditWorkspaceVideoDetails.d.ts +2 -0
  89. package/dist/projects/online/src/apps/workspace/context/WorkspaceAppContext.d.ts +4 -0
  90. package/dist/projects/online/src/apps/workspace/flight-requests/WorkspaceVideoRequests.d.ts +9 -0
  91. package/dist/projects/online/src/apps/workspace/views/edit-workspace-video/EditWorkspaceVideoView.d.ts +8 -0
  92. package/dist/projects/online/src/apps/workspace/views/edit-workspace-video/partial-loading/PartialEditVideoUploadArea.d.ts +2 -0
  93. package/dist/projects/online/src/index.d.ts +1 -0
  94. package/package.json +2 -2
@@ -1,11 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { Core } from "../../../../../common/src/backbone";
3
- import { Video } from "../../../interfaces";
3
+ import { Video, Interactive, Clip } from "../../../interfaces";
4
4
  import { ThumbnailSize } from "../../../enums/ThumbnailSize";
5
5
  import { ThumbnailTextPosition } from "../../../enums/ThumbnailTextPosition";
6
6
  import { AnalyticsOptions, HashObject } from "../../../../../analytics/src/interfaces";
7
- export interface VideoThumbnailProps {
7
+ declare type BaseVideoThumbnailProps = {
8
8
  video: Video;
9
+ videoType?: 'video' | 'interactive' | 'clip';
10
+ interactive?: Interactive;
11
+ clip?: Clip;
9
12
  size: ThumbnailSize;
10
13
  type: 'expandable' | 'static';
11
14
  textPosition: ThumbnailTextPosition;
@@ -14,7 +17,28 @@ export interface VideoThumbnailProps {
14
17
  setFavourite?: (video: Video, shouldFavourite: boolean, onError?: () => void) => void;
15
18
  preload?: boolean;
16
19
  hovering?: boolean;
20
+ extraClasses?: string;
17
21
  analyticsData?: HashObject;
18
22
  analyticsOptions?: AnalyticsOptions;
23
+ };
24
+ declare type VideoThumbnailProps = BaseVideoThumbnailProps & {
25
+ videoType: 'video';
26
+ };
27
+ declare type InteractiveThumbnailProps = BaseVideoThumbnailProps & {
28
+ video: Video;
29
+ interactive: Interactive;
30
+ videoType: 'interactive';
31
+ };
32
+ declare type ClipThumbnailProps = BaseVideoThumbnailProps & {
33
+ video: Video;
34
+ clip: Clip;
35
+ videoType: 'clip';
36
+ };
37
+ export declare type UnionVideoThumbnailProps = VideoThumbnailProps | InteractiveThumbnailProps | ClipThumbnailProps;
38
+ export declare function VideoThumbnail(props: UnionVideoThumbnailProps): JSX.Element;
39
+ export declare namespace VideoThumbnail {
40
+ var defaultProps: {
41
+ videoType: string;
42
+ };
19
43
  }
20
- export declare function VideoThumbnail(props: VideoThumbnailProps): JSX.Element;
44
+ export {};
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { VideoThumbnailProps } from "../VideoThumbnail";
3
- export declare function ExpandableVideoThumbnail(props: VideoThumbnailProps): JSX.Element;
2
+ import { UnionVideoThumbnailProps } from "../VideoThumbnail";
3
+ export declare function ExpandableVideoThumbnail(props: UnionVideoThumbnailProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { VideoThumbnailProps } from "../VideoThumbnail";
3
- export declare function StaticVideoThumbnail(props: VideoThumbnailProps): JSX.Element;
2
+ import { UnionVideoThumbnailProps } from "../VideoThumbnail";
3
+ export declare function StaticVideoThumbnail(props: UnionVideoThumbnailProps): JSX.Element;
@@ -12,6 +12,7 @@ export interface FixedWidgetProps {
12
12
  type: WidgetType;
13
13
  contents: WidgetContents;
14
14
  thumbnailSize?: ThumbnailSize;
15
+ paddingSize?: '3' | '4';
15
16
  collection?: any;
16
17
  lazyLoad?: boolean;
17
18
  fetch?: (...args: any) => Flight.Response<any>;
@@ -19,7 +20,7 @@ export interface FixedWidgetProps {
19
20
  setData?: (data: any) => any;
20
21
  minimumItemCount?: number;
21
22
  childComponent: React.ElementType;
22
- childAppLink: Core.AppLink;
23
+ childAppLink?: Core.AppLink;
23
24
  appLink?: Core.AppLink;
24
25
  settingsAppLink?: Core.AppLink;
25
26
  analyticsData?: HashObject;
@@ -30,6 +31,7 @@ declare namespace FixedWidget {
30
31
  var defaultProps: {
31
32
  type: WidgetType;
32
33
  minimumItemCount: number;
34
+ paddingSize: string;
33
35
  };
34
36
  }
35
37
  declare const Memoized: React.MemoExoticComponent<typeof FixedWidget>;
@@ -0,0 +1,8 @@
1
+ interface IImageMinDimensions {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export declare const ImageMinDimensions: {
6
+ [index: string]: IImageMinDimensions;
7
+ };
8
+ export {};
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ import { Image } from "../interfaces";
3
+ /**
4
+ * This context is used for transferring image
5
+ * data between different areas of the application.
6
+ *
7
+ * It stores base64 image files that have been read
8
+ * in from ImageSelect component for the purpose of
9
+ * being cropped and uploaded in ImageUploadView.
10
+ *
11
+ * Image objects uploaded in ImageUploadView can then be
12
+ * stored in the context for use in the component
13
+ * that initially requested the upload.
14
+ */
15
+ interface IImageStorageContext {
16
+ /**
17
+ * Retrieve the stored base64 dataUrl. This will
18
+ * reset the stored value after it is read.
19
+ */
20
+ getDataUrl: () => string;
21
+ /**
22
+ * Set the stored dataUrl.
23
+ */
24
+ setDataUrl: (dataUrl: string) => void;
25
+ /**
26
+ * Retrieve the stored image object. This will
27
+ * reset the stored image object.
28
+ */
29
+ getImage: () => Image;
30
+ /**
31
+ * Store an image after it has been successfully
32
+ * uploaded.
33
+ */
34
+ setImage: (image: Image) => void;
35
+ /**
36
+ * Flag to notify anything using this context
37
+ * that an image has been uploaded.
38
+ */
39
+ imageUploaded: boolean;
40
+ }
41
+ export declare const ImageStorageContext: React.Context<IImageStorageContext>;
42
+ export declare const ImageStorageContextProvider: ({ children }: {
43
+ children?: React.ReactNode;
44
+ }) => JSX.Element;
45
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * For date formats see:
3
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
4
+ */
5
+ export declare enum DateFormat {
6
+ FullYear = "d MMMM yyyy"
7
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum MasterObjectTypes {
2
+ Folder = "category",
3
+ CategoryTree = "category_tree",
4
+ CustomLibrary = "custom_library",
5
+ HostedLibrary = "hosted_library",
6
+ Exchange = "exchange",
7
+ Workspace = "workspace"
8
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ObjectOwnerType {
2
+ Customer = 1,
3
+ ClickView = 2
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum InteractionType {
2
+ FileSelect = "file-select",
3
+ DragDrop = "drag-drop"
4
+ }
@@ -3,5 +3,7 @@ export declare enum WidgetContents {
3
3
  Series = "series",
4
4
  Subjects = "subjects",
5
5
  Playlists = "playlists",
6
- UserChannels = "user channels"
6
+ UserChannels = "user channels",
7
+ Interactives = "interactives",
8
+ Clips = "clips"
7
9
  }
@@ -0,0 +1,7 @@
1
+ import { Flight } from "../../../common/src/react";
2
+ import { Xhr } from "../../../common/src/backbone/interfaces/Xhr";
3
+ import { HashObject } from "../../../common/src/react/interfaces";
4
+ import { ImageType } from "../enums/Images";
5
+ export declare const ImageRequests: {
6
+ uploadBase64Image(dataUrl: string, type: ImageType, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
7
+ };
@@ -0,0 +1,11 @@
1
+ import { Flight } from "../../../common/src/react";
2
+ import { HashObject } from "../../../common/src/react/interfaces/HashObject";
3
+ import { Xhr } from "../../../common/src/backbone/interfaces/Xhr";
4
+ import { Link } from "../interfaces";
5
+ export declare const LinkRequests: {
6
+ link(id: string): Flight.Request;
7
+ videoLinks(videoId: string): Flight.Request;
8
+ addLink(videoId: string, link: any, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
9
+ updateLink(id: string, data: Link, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
10
+ deleteLink(id: string, videoId: string, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
11
+ };
@@ -0,0 +1,4 @@
1
+ import { Flight } from "../../../common/src/react";
2
+ export declare const RatingRequests: {
3
+ ratings(): Flight.Request;
4
+ };
@@ -0,0 +1,11 @@
1
+ import { Flight } from "../../../common/src/react";
2
+ import { HashObject } from "../../../common/src/react/interfaces/HashObject";
3
+ import { Xhr } from "../../../common/src/backbone/interfaces/Xhr";
4
+ import { UpdateResourceRequest } from "../interfaces";
5
+ export declare const ResourceRequests: {
6
+ resource(id: string): Flight.Request;
7
+ videoResources(videoId: string): Flight.Request;
8
+ addResource(videoId: string, resource: any, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
9
+ updateResource(id: string, data: UpdateResourceRequest, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
10
+ deleteResource(id: string, videoId: string, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
11
+ };
@@ -0,0 +1,9 @@
1
+ import { Flight } from "../../../common/src/react";
2
+ import { HashObject } from "../../../common/src/react/interfaces/HashObject";
3
+ import { Xhr } from "../../../common/src/backbone/interfaces/Xhr";
4
+ export declare const SubtitleRequests: {
5
+ subtitle(id: string): Flight.Request;
6
+ videoSubtitles(videoId: string): Flight.Request;
7
+ addSubtitle(videoId: string, subtitle: any, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
8
+ deleteSubtitle(id: string, videoId: string, success?: (data: HashObject<any>) => void, error?: (xhr: Xhr) => void, always?: () => void): Flight.Request;
9
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="backbone.radio" />
2
+ import { Radio, Model, Collection } from 'backbone';
3
+ export declare const useListenOn: (obj: Radio.Channel | Model | Collection<Model>, eventName: string, callback: (obj?: any) => void) => void;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { Core } from "../../../common/src/backbone";
3
+ /**
4
+ * Hook used to listen to updates on a Backbone Collection
5
+ * and trigger a re-render.
6
+ */
7
+ export declare function useGetCollectionItems<T>(getCollection: () => Core.Collection, onRemove?: () => void, dependencies?: React.DependencyList): T[];
@@ -0,0 +1,3 @@
1
+ import { BasePaginatedCollection, Subtitle } from "./..";
2
+ export interface SubtitleCollection extends BasePaginatedCollection<Subtitle> {
3
+ }
@@ -1,6 +1,7 @@
1
- import { BaseObject } from "./..";
1
+ import { BaseObject, User } from "./..";
2
2
  export interface Clip extends BaseObject {
3
3
  description: string;
4
4
  startTime: number;
5
5
  endTime: number;
6
+ owner: User;
6
7
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Interface for a file uploaded
3
+ * to FileApi
4
+ */
5
+ export interface FileUpload {
6
+ id: string;
7
+ file: {
8
+ cvUpload: {
9
+ uploadId: string;
10
+ ingestUrl: string;
11
+ };
12
+ };
13
+ fileInfo: {
14
+ id: string;
15
+ name: string;
16
+ extension: string;
17
+ size: number;
18
+ url: string;
19
+ };
20
+ }
@@ -1,5 +1,9 @@
1
1
  import { BaseObject } from "./..";
2
2
  import { User } from './User';
3
+ import { Thumbnail } from './Thumbnail';
3
4
  export interface Interactive extends BaseObject {
5
+ interactiveId: string;
4
6
  owner: User;
7
+ description?: string;
8
+ thumbnail?: Thumbnail;
5
9
  }
@@ -0,0 +1,4 @@
1
+ export interface Language {
2
+ code: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,7 @@
1
+ import { BaseObject } from './primitives';
2
+ export interface Subtitle extends BaseObject {
3
+ language: string;
4
+ metadata: {
5
+ autoGenerated?: boolean;
6
+ };
7
+ }
@@ -0,0 +1,3 @@
1
+ export interface UpdateObjectChannel {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface UpdateObjectRating {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface UpdateResourceRequest {
2
+ name: string;
3
+ }
@@ -0,0 +1,19 @@
1
+ import { Core } from "../../../../../common/src/backbone";
2
+ import { ObjectHash } from 'backbone';
3
+ interface FileDropBehaviorOptions {
4
+ channelName: string;
5
+ acceptMultiple: boolean;
6
+ }
7
+ export declare class FileDropBehavior extends Core.Behavior {
8
+ options: FileDropBehaviorOptions;
9
+ private locked;
10
+ initialize(): void;
11
+ get events(): ObjectHash;
12
+ private lock;
13
+ private unlock;
14
+ /**
15
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop
16
+ */
17
+ private onDrop;
18
+ }
19
+ export {};
@@ -0,0 +1,4 @@
1
+ declare const FileDropHelper: {
2
+ isFileDrag(event: any): boolean;
3
+ };
4
+ export { FileDropHelper };
@@ -0,0 +1,16 @@
1
+ import { Core } from "../../../../../common/src/backbone";
2
+ import { ObjectHash } from 'backbone';
3
+ interface FileSelectBehaviorOptions {
4
+ buttonSelector?: string;
5
+ channelName: string;
6
+ acceptMultiple: boolean;
7
+ mimeType: string;
8
+ }
9
+ export declare class FileSelectBehavior extends Core.Behavior {
10
+ options: FileSelectBehaviorOptions;
11
+ events(): ObjectHash;
12
+ private onClickSelect;
13
+ private onChangeFileSelect;
14
+ onRender(): void;
15
+ }
16
+ export {};
@@ -0,0 +1,29 @@
1
+ import { ObjectHash } from 'backbone';
2
+ import { Core } from "../../../../../common/src/backbone";
3
+ interface FileSelectComponentOptions extends Core.ComponentOptions {
4
+ title: string;
5
+ description: string;
6
+ alternateText: string;
7
+ mimeType: string;
8
+ channelName: string;
9
+ acceptMultiple?: boolean;
10
+ limitText: string;
11
+ isClickViewContent?: boolean;
12
+ }
13
+ export declare class FileSelectComponent extends Core.Component {
14
+ options: FileSelectComponentOptions;
15
+ constructor(options: FileSelectComponentOptions);
16
+ get name(): string;
17
+ get template(): any;
18
+ get lang(): string;
19
+ get elements(): ObjectHash;
20
+ get defaults(): ObjectHash;
21
+ get behaviors(): any[];
22
+ events(): ObjectHash;
23
+ private onDrop;
24
+ private onDragOver;
25
+ private onDragLeave;
26
+ viewOptions(): ObjectHash;
27
+ onRender(): void;
28
+ }
29
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ObjectHash } from 'backbone';
2
+ import { Core } from "../../../../../common/src/backbone";
3
+ export interface FileUploadComponentOptions extends Core.ComponentOptions {
4
+ onClickCancelUpload: (id: string) => void;
5
+ }
6
+ export declare class FileUploadComponent extends Core.Component {
7
+ options: FileUploadComponentOptions;
8
+ constructor(options: FileUploadComponentOptions);
9
+ initialize(): void;
10
+ get name(): string;
11
+ get template(): any;
12
+ events(): ObjectHash;
13
+ private onClickCancelUpload;
14
+ viewOptions(): ObjectHash;
15
+ }
@@ -0,0 +1,22 @@
1
+ import { ObjectHash } from 'backbone';
2
+ import { Core } from "../../../../../common/src/backbone";
3
+ import { AnalyticsOptions } from "../../../../../analytics/src/interfaces";
4
+ export interface ResourceItemComponentOptions extends Core.ComponentOptions {
5
+ editable: boolean;
6
+ videoId: string;
7
+ getEditAppLink: (resourceId: string) => Core.AppLink;
8
+ onClickDelete: (resource: Core.Model) => void;
9
+ analyticsOptions?: AnalyticsOptions;
10
+ }
11
+ export declare class ResourceItemComponent extends Core.Component {
12
+ options: ResourceItemComponentOptions;
13
+ constructor(options: ResourceItemComponentOptions);
14
+ get name(): string;
15
+ get template(): any;
16
+ get className(): string;
17
+ events(): ObjectHash;
18
+ get appLinks(): Core.AppLinkHash;
19
+ private onClickEdit;
20
+ private onClickDelete;
21
+ viewOptions(): ObjectHash;
22
+ }
@@ -0,0 +1,17 @@
1
+ import { Core } from "../../../../../common/src/backbone";
2
+ import { ObjectHash } from 'backbone';
3
+ export interface SubtitleItemComponentOptions extends Core.ComponentOptions {
4
+ onClickDelete: (resource: Core.Model) => void;
5
+ isClickViewContent?: boolean;
6
+ }
7
+ export declare class SubtitleItemComponent extends Core.Component {
8
+ options: SubtitleItemComponentOptions;
9
+ constructor(options: SubtitleItemComponentOptions);
10
+ get name(): string;
11
+ get template(): any;
12
+ get className(): string;
13
+ events(): ObjectHash;
14
+ private getEnglishName;
15
+ private onClickDelete;
16
+ viewOptions(): ObjectHash;
17
+ }
@@ -0,0 +1,7 @@
1
+ import { DialogError } from "../../../errors/primitives/DialogError";
2
+ import { DialogOptions } from "../../../interfaces";
3
+ export declare class TooManyFilesError extends DialogError {
4
+ constructor();
5
+ get name(): string;
6
+ get dialogOptions(): DialogOptions;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { DialogError } from "../../../errors/primitives/DialogError";
2
+ import { DialogOptions } from "../../../interfaces/DialogOptions";
3
+ export declare class TooManyResourcesError extends DialogError {
4
+ resourceLimit: number;
5
+ constructor(resourceLimit: number);
6
+ get name(): string;
7
+ get dialogOptions(): DialogOptions;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { DialogError } from "../../../errors/primitives/DialogError";
2
+ import { DialogOptions } from "../../../interfaces/DialogOptions";
3
+ export declare class TooManySubtitlesError extends DialogError {
4
+ subtileLimit: number;
5
+ constructor(subtitleLimit: number);
6
+ get name(): string;
7
+ get dialogOptions(): DialogOptions;
8
+ }
@@ -0,0 +1,5 @@
1
+ import * as Handlebars from 'handlebars';
2
+ export declare const LangHelper: {
3
+ register(): void;
4
+ isValid(key: string, options: Handlebars.HelperOptions): boolean;
5
+ };
@@ -0,0 +1,6 @@
1
+ import { ImageType } from "../enums/Images";
2
+ export declare const ImageSelectHelper: {
3
+ onFileSelect(imageType: ImageType, files: FileList, onImageLoad: (image: HTMLImageElement) => void): void;
4
+ onReaderLoad(reader: FileReader, imageType: ImageType, onImageLoad: (image: HTMLImageElement) => void): void;
5
+ isImageValid(imageType: ImageType, image: HTMLImageElement): boolean;
6
+ };
@@ -0,0 +1,10 @@
1
+ import { BaseObject, Customer, Video } from "../interfaces";
2
+ import { ObjectOwnerType } from "../enums/ObjectOwnerType";
3
+ interface ObjectWithCustomer extends BaseObject {
4
+ customer?: Customer;
5
+ }
6
+ export declare const PermissionsHelper: {
7
+ canEditVideo(video: Video): boolean;
8
+ filterObjectsByOwnerType<T extends ObjectWithCustomer>(objects: T[], owner: ObjectOwnerType, currentCustomerId?: string): T[];
9
+ };
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Subtitle } from "../interfaces";
2
+ export declare const SubtitleHelper: {
3
+ /**
4
+ *
5
+ * @param subtitle - the subtitle to get the English name for.
6
+ * @param allVideoSubtitles - the full list of subtitles on the video.
7
+ */
8
+ getEnglishName(subtitle: Subtitle, allVideoSubtitles?: Subtitle[]): string;
9
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PopupViewProps } from "../../interfaces";
3
+ interface DeleteLinkViewProps extends PopupViewProps {
4
+ linkId: string;
5
+ videoId: string;
6
+ }
7
+ export declare function DeleteLinkView(props: DeleteLinkViewProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PopupViewProps } from "../../interfaces";
3
+ interface DeleteResourceViewProps extends PopupViewProps {
4
+ resourceId: string;
5
+ videoId: string;
6
+ }
7
+ export declare function DeleteResourceView(props: DeleteResourceViewProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PopupViewProps } from "../../interfaces";
3
+ interface DeleteSubtitleViewProps extends PopupViewProps {
4
+ subtitleId: string;
5
+ videoId: string;
6
+ }
7
+ export declare function DeleteSubtitleView(props: DeleteSubtitleViewProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { PopupViewProps, DialogOptions } from "../../interfaces";
3
+ interface DialogViewProps extends DialogOptions {
4
+ onDone?: () => void;
5
+ onFail?: () => void;
6
+ }
7
+ declare type PropTypes = React.PropsWithChildren<DialogViewProps & PopupViewProps>;
8
+ export declare function DialogView(props: PropTypes): React.ReactElement;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PopupViewProps } from "../../interfaces";
3
+ interface EditLinkViewProps extends PopupViewProps {
4
+ linkId: string;
5
+ videoId: string;
6
+ }
7
+ export declare function EditLinkView(props: EditLinkViewProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PopupViewProps } from "../../interfaces";
3
+ interface EditResourceViewProps extends PopupViewProps {
4
+ resourceId: string;
5
+ videoId: string;
6
+ }
7
+ export declare function EditResourceView(props: EditResourceViewProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { PopupViewProps } from "../../interfaces";
3
+ import { ImageType } from "../../enums/Images";
4
+ interface ImageUploadViewProps extends PopupViewProps {
5
+ imageType: ImageType;
6
+ popupSize?: 'sm' | 'lg' | 'xl';
7
+ }
8
+ export declare function ImageUploadView(props: ImageUploadViewProps): React.ReactElement;
9
+ export {};