@clickview/library-editor 1.1.13-rc.1 → 1.1.13
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/bundle.js.map +1 -0
- package/dist/library-editor-app.css.map +1 -0
- package/dist/src/apps/library-editor/components/folder-link-list/FolderLinkComponent.d.ts +14 -0
- package/dist/src/apps/library-editor/components/folder-link-list/FolderLinkComponentCollection.d.ts +13 -0
- package/dist/src/apps/notifications/collections/NotificationCollection.d.ts +6 -0
- package/dist/src/apps/notifications/components/index.d.ts +3 -0
- package/dist/src/apps/notifications/components/notification-items/notification-item/NotificationItemComponent.d.ts +23 -0
- package/dist/src/apps/notifications/components/notification-list/NotificationListComponent.d.ts +26 -0
- package/dist/src/apps/notifications/components/notification-status/NotificationStatusComponent.d.ts +9 -0
- package/dist/src/apps/notifications/models/Notification.d.ts +3 -0
- package/dist/src/apps/notifications/models/index.d.ts +1 -0
- package/dist/src/apps/notifications/services/NotificationDataService.d.ts +14 -0
- package/dist/src/apps/notifications/services/NotificationService.d.ts +33 -0
- package/dist/src/apps/notifications/services/NotificationSocketService.d.ts +8 -0
- package/dist/src/apps/notifications/services/data-providers/NotificationsSocketDataProvider.d.ts +4 -0
- package/dist/src/apps/notifications/services/index.d.ts +4 -0
- package/dist/src/apps/notifications/utils/NotificationAppLinkHelper.d.ts +10 -0
- package/dist/src/apps/notifications/utils/NotificationsHelper.d.ts +1 -1
- package/dist/src/apps/notifications/views/header/NotificationHeaderView.d.ts +14 -0
- package/dist/src/apps/notifications/views/index.d.ts +3 -0
- package/dist/src/apps/notifications/views/notifications/NotificationsView.d.ts +26 -0
- package/dist/src/apps/notifications/views/popover/NotificationsPopoverView.d.ts +33 -0
- package/dist/src/apps/search/components/index.d.ts +2 -0
- package/dist/src/apps/search/components/instant-search/index.d.ts +4 -0
- package/dist/src/apps/search/components/instant-search/recent-search/RecentSearchResultComponent.d.ts +15 -0
- package/dist/src/apps/search/components/instant-search/series/SeriesSearchResultComponent.d.ts +9 -0
- package/dist/src/apps/search/components/instant-search/tag/TagSearchResultComponent.d.ts +9 -0
- package/dist/src/apps/search/components/instant-search/video-result/VideoSearchResultComponent.d.ts +15 -0
- package/dist/src/apps/search/components/search-context/SearchContextComponent.d.ts +18 -0
- package/dist/src/apps/search/components/search-tips/SearchTipsComponent.d.ts +11 -0
- package/dist/src/apps/search/services/ContextualSearchService.d.ts +37 -0
- package/dist/src/apps/search/views/search-bar/SearchBarView.d.ts +102 -0
- package/dist/src/apps/search/views/search-bar/templates/index.d.ts +9 -0
- package/dist/src/apps/upload/enums/FileLifestyle.d.ts +4 -0
- package/dist/src/apps/upload/enums/PendingItemStatus.d.ts +5 -0
- package/dist/src/apps/upload/errors/internet-connectivity/InternetConnectivityError.d.ts +7 -0
- package/dist/src/apps/upload/services/DropzoneWrapper.d.ts +30 -0
- package/dist/src/apps/upload/services/UploadService.d.ts +64 -0
- package/dist/src/apps/upload/utils/PendingItemsHelper.d.ts +9 -0
- package/dist/src/apps/upload/utils/index.d.ts +1 -0
- package/dist/src/shared/behaviors/empty-state/EmptyStateBehavior.d.ts +22 -0
- package/dist/src/shared/behaviors/popover/PopoverBehavior.d.ts +40 -0
- package/dist/src/shared/behaviors/tooltip/TooltipBehavior.d.ts +12 -0
- package/dist/src/shared/collections/PendingItemsCollection.d.ts +8 -0
- package/dist/src/shared/components/empty-state/EmptyStateComponent.d.ts +24 -0
- package/dist/src/shared/components/pagination/PaginationComponent.d.ts +28 -0
- package/dist/src/shared/components/thumbnail/ThumbnailComponent.d.ts +32 -0
- package/dist/src/shared/enums/AppLinkReferrer.d.ts +3 -0
- package/dist/src/shared/enums/CurationStatus.d.ts +12 -0
- package/dist/src/shared/errors/file-type/FileTypeError.d.ts +15 -0
- package/dist/src/shared/errors/primitives/AlertError.d.ts +4 -0
- package/dist/src/shared/errors/primitives/DialogError.d.ts +9 -0
- package/dist/src/shared/errors/primitives/ErrorPageError.d.ts +7 -0
- package/dist/src/shared/errors/primitives/index.d.ts +3 -0
- package/dist/src/shared/interfaces/CollectionIdentifier.d.ts +7 -0
- package/dist/src/shared/interfaces/Tooltip.d.ts +6 -0
- package/dist/src/shared/services/ContextService.d.ts +38 -0
- package/dist/src/shared/services/LanguageDataService.d.ts +12 -0
- package/dist/src/shared/services/LanguageService.d.ts +16 -0
- package/dist/src/shared/utils/EmptyStateHelper.d.ts +4 -0
- package/dist/src/shared/utils/FileExtensionsHelper.d.ts +9 -0
- package/dist/src/shared/utils/MaskHelper.d.ts +15 -0
- package/dist/src/shared/utils/handlebars/LangHelper.d.ts +5 -0
- package/dist/src/shared/utils/handlebars/index.d.ts +1 -0
- package/dist/src/shared/utils/search/InstantSearchHelper.d.ts +21 -0
- package/dist/src/shared/utils/search/RecentSearchHelper.d.ts +12 -0
- package/dist/src/shared/utils/search/SearchTypes.d.ts +28 -0
- package/dist/src/shared/utils/search/TypeaheadHelper.d.ts +76 -0
- package/dist/src/shared/utils/search/raw-search-components/confirm-selection/ConfirmSelectionComponent.d.ts +12 -0
- package/package.json +5 -5
package/dist/src/apps/search/components/instant-search/video-result/VideoSearchResultComponent.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export declare class VideoSearchResultComponent extends Core.Component<any> {
|
|
4
|
+
get name(): string;
|
|
5
|
+
get template(): string;
|
|
6
|
+
get className(): string;
|
|
7
|
+
regions(): ObjectHash;
|
|
8
|
+
events(): ObjectHash;
|
|
9
|
+
private onClick;
|
|
10
|
+
private getCollection;
|
|
11
|
+
private getUrl;
|
|
12
|
+
private renderThumbnail;
|
|
13
|
+
viewOptions(): ObjectHash;
|
|
14
|
+
onRender(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export declare class SearchContextComponent extends Core.Component {
|
|
4
|
+
initialize(): void;
|
|
5
|
+
get name(): string;
|
|
6
|
+
get template(): string;
|
|
7
|
+
get tagName(): string;
|
|
8
|
+
get className(): string;
|
|
9
|
+
get behaviors(): any[];
|
|
10
|
+
get elements(): ObjectHash;
|
|
11
|
+
events(): ObjectHash;
|
|
12
|
+
private onClick;
|
|
13
|
+
private onMouseEnter;
|
|
14
|
+
private onMouseLeave;
|
|
15
|
+
private toggleFocus;
|
|
16
|
+
viewOptions(): ObjectHash;
|
|
17
|
+
onBeforeRender(): boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export declare class SearchTipsComponent extends Core.Component {
|
|
4
|
+
initialize(): void;
|
|
5
|
+
get name(): string;
|
|
6
|
+
get template(): string;
|
|
7
|
+
get lang(): string;
|
|
8
|
+
get behaviors(): any[];
|
|
9
|
+
private renderTips;
|
|
10
|
+
viewOptions(): ObjectHash;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Core } from '@clickview/common';
|
|
2
|
+
export interface SearchContext {
|
|
3
|
+
appLink: Core.AppLink;
|
|
4
|
+
searchTag: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
filterParam: string;
|
|
7
|
+
filterValue?: string;
|
|
8
|
+
setFilterValue: (context: SearchContext, self: any) => void;
|
|
9
|
+
}
|
|
10
|
+
declare class StaticContextualSearchService extends Core.Service {
|
|
11
|
+
private static instance;
|
|
12
|
+
private searchContext;
|
|
13
|
+
static get Instance(): StaticContextualSearchService;
|
|
14
|
+
initialize(): void;
|
|
15
|
+
get name(): string;
|
|
16
|
+
get lang(): string;
|
|
17
|
+
getSearchContext(): Core.Model;
|
|
18
|
+
/**
|
|
19
|
+
* Event listeners
|
|
20
|
+
*/
|
|
21
|
+
private onRouteChange;
|
|
22
|
+
private onTypeaheadToggle;
|
|
23
|
+
/**
|
|
24
|
+
* Context mutation methods
|
|
25
|
+
*/
|
|
26
|
+
private setSearchContext;
|
|
27
|
+
private updateSearchContext;
|
|
28
|
+
private setFilterValue;
|
|
29
|
+
private resetSearchContext;
|
|
30
|
+
/**
|
|
31
|
+
* Validation methods
|
|
32
|
+
*/
|
|
33
|
+
private isValidSearchContext;
|
|
34
|
+
private inSearchView;
|
|
35
|
+
}
|
|
36
|
+
export declare const ContextualSearchService: StaticContextualSearchService;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export interface SearchBarViewOptions extends Core.ViewOptions {
|
|
4
|
+
showRecentSearch?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class SearchBarView extends Core.View {
|
|
7
|
+
protected options: SearchBarViewOptions;
|
|
8
|
+
private currentUser;
|
|
9
|
+
private libraryCollection;
|
|
10
|
+
private storageHelper;
|
|
11
|
+
private recentSearchEngine;
|
|
12
|
+
private viewCache;
|
|
13
|
+
private searchInput;
|
|
14
|
+
private searchContext;
|
|
15
|
+
private preventToggleEvent;
|
|
16
|
+
constructor(options: SearchBarViewOptions);
|
|
17
|
+
initialize(): void;
|
|
18
|
+
get name(): string;
|
|
19
|
+
get title(): boolean;
|
|
20
|
+
get tagName(): string;
|
|
21
|
+
get template(): any;
|
|
22
|
+
get lang(): string;
|
|
23
|
+
get channelName(): string;
|
|
24
|
+
get className(): string;
|
|
25
|
+
get defaults(): ObjectHash;
|
|
26
|
+
get elements(): ObjectHash;
|
|
27
|
+
events(): ObjectHash;
|
|
28
|
+
get bindings(): ObjectHash;
|
|
29
|
+
regions(): ObjectHash;
|
|
30
|
+
private get recentSearchKey();
|
|
31
|
+
private bindListeners;
|
|
32
|
+
/**
|
|
33
|
+
* View Cache management
|
|
34
|
+
*/
|
|
35
|
+
private getOrCacheView;
|
|
36
|
+
private clearViewCache;
|
|
37
|
+
private getDynamicTemplate;
|
|
38
|
+
private getLimits;
|
|
39
|
+
/**
|
|
40
|
+
* Recent search logic
|
|
41
|
+
*/
|
|
42
|
+
private updateSearchHistory;
|
|
43
|
+
private handleRecentSearch;
|
|
44
|
+
private onDeleteRecentSearch;
|
|
45
|
+
private getInstantSearchAppLink;
|
|
46
|
+
/**
|
|
47
|
+
* Typeahead event handlers
|
|
48
|
+
*/
|
|
49
|
+
private onTypeaheadSelect;
|
|
50
|
+
private onClickSearch;
|
|
51
|
+
private onSubmit;
|
|
52
|
+
private submitQuery;
|
|
53
|
+
private resetQuery;
|
|
54
|
+
private updateInitialQuery;
|
|
55
|
+
private logSearch;
|
|
56
|
+
/**
|
|
57
|
+
* When the user clicks away from the typeahead, the close event will be fired, unbinding the delete
|
|
58
|
+
* event for recent search. Re-selecting the typehead will open it BUT it won't re-fetch the results and
|
|
59
|
+
* render event won't be fired. We need to manually re-bind the click handlers to ensure the delete
|
|
60
|
+
* functionality is retained.
|
|
61
|
+
*/
|
|
62
|
+
private onTypeaheadOpen;
|
|
63
|
+
private onBeforeTypeaheadClose;
|
|
64
|
+
private onTypeaheadClose;
|
|
65
|
+
private showMask;
|
|
66
|
+
private hideMask;
|
|
67
|
+
private alignTypeahead;
|
|
68
|
+
private onTypeaheadRender;
|
|
69
|
+
private initTypeaheadListeners;
|
|
70
|
+
private initNoLibrariesTypeaheadListeners;
|
|
71
|
+
private onKeydown;
|
|
72
|
+
private onResetSearchContext;
|
|
73
|
+
/**
|
|
74
|
+
* Bloodhound & Typeadhead configs
|
|
75
|
+
*/
|
|
76
|
+
private getRecentSearchBloodhound;
|
|
77
|
+
private getDynamicBloodhoundConfig;
|
|
78
|
+
private getDynamicTypeaheadConfig;
|
|
79
|
+
private getDynamicOptions;
|
|
80
|
+
/**
|
|
81
|
+
* Typeahead sources
|
|
82
|
+
*/
|
|
83
|
+
private getRecentSearchSources;
|
|
84
|
+
private getDirectSearchSources;
|
|
85
|
+
private getDynamicSearchSources;
|
|
86
|
+
private getSources;
|
|
87
|
+
private getNoLibrariesSource;
|
|
88
|
+
private initializeTypeahead;
|
|
89
|
+
private hasLibraries;
|
|
90
|
+
private getLibraryIds;
|
|
91
|
+
/**
|
|
92
|
+
* Render methods
|
|
93
|
+
*/
|
|
94
|
+
viewOptions(): ObjectHash;
|
|
95
|
+
get requiredResources(): Core.RequiredResourceHash;
|
|
96
|
+
private renderSearchTips;
|
|
97
|
+
private renderSearch;
|
|
98
|
+
private renderPartialSearch;
|
|
99
|
+
private renderSearchContext;
|
|
100
|
+
onRender(): void;
|
|
101
|
+
onClose(): void;
|
|
102
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import FolderResult from './FolderResult.hbs';
|
|
2
|
+
import DirectSearchResult from './DirectSearchResult.hbs';
|
|
3
|
+
import Loading from './Loading.hbs';
|
|
4
|
+
import NotFound from './NotFound.hbs';
|
|
5
|
+
import ResultFooter from './ResultFooter.hbs';
|
|
6
|
+
import ResultHeader from './ResultHeader.hbs';
|
|
7
|
+
import RecentSearchHeader from './RecentSearchHeader.hbs';
|
|
8
|
+
import NoLibraries from './NoLibraries.hbs';
|
|
9
|
+
export { FolderResult, DirectSearchResult, Loading, NotFound, ResultFooter, ResultHeader, RecentSearchHeader, NoLibraries };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DialogError } from "../../../../shared/errors/primitives";
|
|
2
|
+
import { DialogViewOptions } from "../../../../shared/components";
|
|
3
|
+
export declare class InternetConnectivityError extends DialogError {
|
|
4
|
+
constructor();
|
|
5
|
+
get name(): string;
|
|
6
|
+
get dialogOptions(): DialogViewOptions;
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as Dropzone from 'dropzone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export interface UploadApiWrapperOptions extends Core.ServiceOptions {
|
|
4
|
+
maxFileSize: number;
|
|
5
|
+
chunkSize: number;
|
|
6
|
+
chunkingEnabled: boolean;
|
|
7
|
+
loggingEnabled: boolean;
|
|
8
|
+
acceptedFiles: string;
|
|
9
|
+
channelName: string;
|
|
10
|
+
}
|
|
11
|
+
export interface UploadApiWrapper {
|
|
12
|
+
addFile(file: File): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
start(): void;
|
|
15
|
+
getId(file: File): string;
|
|
16
|
+
removeFile(file: File): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class DropzoneWrapper extends Core.Service implements UploadApiWrapper {
|
|
19
|
+
private dropzone;
|
|
20
|
+
options: UploadApiWrapperOptions;
|
|
21
|
+
get name(): string;
|
|
22
|
+
constructor(options: UploadApiWrapperOptions);
|
|
23
|
+
initialize(options: UploadApiWrapperOptions): void;
|
|
24
|
+
getId(file: File): string;
|
|
25
|
+
addFile(file: Dropzone.DropzoneFile): void;
|
|
26
|
+
removeFile(file: Dropzone.DropzoneFile): void;
|
|
27
|
+
start(): void;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
static isValidFile(file: File, acceptedFiles: string): boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Core } from '@clickview/common';
|
|
2
|
+
import { FileLifestyle } from '../enums/FileLifestyle';
|
|
3
|
+
interface UploadItem extends Core.Model {
|
|
4
|
+
file: File;
|
|
5
|
+
name: string;
|
|
6
|
+
progress: number;
|
|
7
|
+
}
|
|
8
|
+
export declare enum UploadType {
|
|
9
|
+
Video = 0,
|
|
10
|
+
LearningResource = 1,
|
|
11
|
+
Subtitle = 2
|
|
12
|
+
}
|
|
13
|
+
declare class UploadService extends Core.Service {
|
|
14
|
+
protected uploadType: UploadType;
|
|
15
|
+
protected fileLifestyle: FileLifestyle;
|
|
16
|
+
private uploader;
|
|
17
|
+
private progressViewModel;
|
|
18
|
+
private uploadDataService;
|
|
19
|
+
private collection;
|
|
20
|
+
initialize(): void;
|
|
21
|
+
get channelName(): string;
|
|
22
|
+
get lang(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Dropzone is initialized once after the first upload is requested and it's chunk size
|
|
25
|
+
* is set for the rest of the uploads. If we happen to have multiple ingest
|
|
26
|
+
* servers that have different chunk max / min sizes, this may voilate those
|
|
27
|
+
* sizes.
|
|
28
|
+
*/
|
|
29
|
+
private initUploader;
|
|
30
|
+
private bindListeners;
|
|
31
|
+
private onProgress;
|
|
32
|
+
isUploading(): boolean;
|
|
33
|
+
getCollection(): Core.Collection<UploadItem>;
|
|
34
|
+
setOverallProgress(): void;
|
|
35
|
+
isValidFile(file: File): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Request uploads from fileApi and starts uploading.
|
|
38
|
+
* @param files Array of browser File objects
|
|
39
|
+
* @returns Returns false if any of the files did not match the accepted file list.
|
|
40
|
+
*/
|
|
41
|
+
addFiles(files: File[]): void;
|
|
42
|
+
private requestUploads;
|
|
43
|
+
addFile(file: File): void;
|
|
44
|
+
cancelUpload(id: string): void;
|
|
45
|
+
private onSuccess;
|
|
46
|
+
cancelAllUploads(): void;
|
|
47
|
+
private getAcceptedFiles;
|
|
48
|
+
}
|
|
49
|
+
export declare class VideoUploadService extends UploadService {
|
|
50
|
+
protected get uploadType(): UploadType;
|
|
51
|
+
get name(): string;
|
|
52
|
+
get fileLifestyle(): FileLifestyle;
|
|
53
|
+
}
|
|
54
|
+
export declare class SubtitleUploadService extends UploadService {
|
|
55
|
+
protected get uploadType(): UploadType;
|
|
56
|
+
get name(): string;
|
|
57
|
+
get fileLifestyle(): FileLifestyle;
|
|
58
|
+
}
|
|
59
|
+
export declare class LearningResourceUploadService extends UploadService {
|
|
60
|
+
protected get uploadType(): UploadType;
|
|
61
|
+
get name(): string;
|
|
62
|
+
get fileLifestyle(): FileLifestyle;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Core } from '@clickview/common';
|
|
2
|
+
declare const PendingItemsHelper: {
|
|
3
|
+
getStatus(model: Core.Model): string;
|
|
4
|
+
hasError(model: Core.Model): boolean;
|
|
5
|
+
isDone(model: Core.Model): boolean;
|
|
6
|
+
getProgress(model: Core.Model): number;
|
|
7
|
+
hasExpired(model: Core.Model, maxSessionLength: number): boolean;
|
|
8
|
+
};
|
|
9
|
+
export { PendingItemsHelper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PendingItemsHelper';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
import { EmptyStateComponentOptions, EmptyStateComponent } from "../../components";
|
|
4
|
+
interface EmptyStateBehaviorOptions {
|
|
5
|
+
region: string;
|
|
6
|
+
type: number;
|
|
7
|
+
shouldRender: () => boolean;
|
|
8
|
+
componentOptions?: EmptyStateComponentOptions;
|
|
9
|
+
emptyStateComponents: {
|
|
10
|
+
[type: number]: (self: any) => EmptyStateComponentOptions;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare class EmptyStateBehavior extends Core.Behavior {
|
|
14
|
+
options: EmptyStateBehaviorOptions;
|
|
15
|
+
get defaults(): ObjectHash;
|
|
16
|
+
set defaults(defaults: ObjectHash);
|
|
17
|
+
private shouldRender;
|
|
18
|
+
getComponent(): EmptyStateComponent;
|
|
19
|
+
renderEmptyState(): void;
|
|
20
|
+
onRender(): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export declare enum PopoverPlacement {
|
|
4
|
+
auto = "auto",
|
|
5
|
+
top = "top",
|
|
6
|
+
bottom = "bottom",
|
|
7
|
+
left = "left",
|
|
8
|
+
right = "right"
|
|
9
|
+
}
|
|
10
|
+
export declare type PopoverSize = 'popover-sm' | 'popover-md' | 'popover-lg';
|
|
11
|
+
export interface PopoverBehaviorOptions {
|
|
12
|
+
toggleEventName?: string;
|
|
13
|
+
renderContent: (region: string) => void;
|
|
14
|
+
placement?: PopoverPlacement;
|
|
15
|
+
title?: string;
|
|
16
|
+
containerSelector?: string;
|
|
17
|
+
size?: PopoverSize;
|
|
18
|
+
boundary?: any;
|
|
19
|
+
customClasses?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class PopoverBehavior extends Core.Behavior {
|
|
22
|
+
options: PopoverBehaviorOptions;
|
|
23
|
+
private popoverInitialized;
|
|
24
|
+
get defaults(): ObjectHash;
|
|
25
|
+
set defaults(defaults: ObjectHash);
|
|
26
|
+
get ui(): ObjectHash;
|
|
27
|
+
set ui(ui: ObjectHash);
|
|
28
|
+
events(): ObjectHash;
|
|
29
|
+
private bindListeners;
|
|
30
|
+
private bindBodyClickListener;
|
|
31
|
+
private bindDropdownListener;
|
|
32
|
+
private onPopoverInserted;
|
|
33
|
+
private onPopoverHidden;
|
|
34
|
+
private toggle;
|
|
35
|
+
private hide;
|
|
36
|
+
private onClickPopover;
|
|
37
|
+
private onClickOutside;
|
|
38
|
+
private getTrigger;
|
|
39
|
+
private onAttach;
|
|
40
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export declare class TooltipBehavior extends Core.Behavior {
|
|
4
|
+
get defaults(): ObjectHash;
|
|
5
|
+
set defaults(defaults: ObjectHash);
|
|
6
|
+
get ui(): ObjectHash;
|
|
7
|
+
set ui(ui: ObjectHash);
|
|
8
|
+
private getElement;
|
|
9
|
+
private getOptions;
|
|
10
|
+
onRender(): void;
|
|
11
|
+
onBeforeDetach(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
export declare type EmptyStateImageSize = 'sm' | 'lg';
|
|
4
|
+
export interface EmptyStateComponentOptions extends Core.ComponentOptions {
|
|
5
|
+
imageUrl: string;
|
|
6
|
+
heading?: string | (() => string);
|
|
7
|
+
description?: string | (() => string);
|
|
8
|
+
appLink?: Core.AppLinkHash;
|
|
9
|
+
customClass?: string;
|
|
10
|
+
customImageClass?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class EmptyStateComponent extends Core.Component {
|
|
13
|
+
protected options: EmptyStateComponentOptions;
|
|
14
|
+
constructor(options: EmptyStateComponentOptions);
|
|
15
|
+
get name(): string;
|
|
16
|
+
get className(): string;
|
|
17
|
+
get template(): string;
|
|
18
|
+
get defaults(): ObjectHash;
|
|
19
|
+
get appLinks(): Core.AppLinkHash;
|
|
20
|
+
private getImageClass;
|
|
21
|
+
private getHeading;
|
|
22
|
+
private getDescription;
|
|
23
|
+
viewOptions(): ObjectHash;
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core, Cursors } from '@clickview/common';
|
|
3
|
+
import { AnalyticsOptions } from '@clickview/analytics';
|
|
4
|
+
interface PaginationComponentOptions extends Core.ComponentOptions {
|
|
5
|
+
cursors: Cursors;
|
|
6
|
+
appLink: Core.AppLink;
|
|
7
|
+
collectionId?: string;
|
|
8
|
+
allowFirstPageCursor?: boolean;
|
|
9
|
+
analyticsOptions?: AnalyticsOptions;
|
|
10
|
+
cursorParamName?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class PaginationComponent extends Core.Component {
|
|
13
|
+
options: PaginationComponentOptions;
|
|
14
|
+
constructor(options: PaginationComponentOptions);
|
|
15
|
+
get defaults(): ObjectHash;
|
|
16
|
+
get name(): string;
|
|
17
|
+
get template(): any;
|
|
18
|
+
get lang(): string;
|
|
19
|
+
get appLinks(): Core.AppLinkHash;
|
|
20
|
+
events(): ObjectHash;
|
|
21
|
+
private buildCursor;
|
|
22
|
+
private onClickPrevious;
|
|
23
|
+
private onClickNext;
|
|
24
|
+
private logAction;
|
|
25
|
+
viewOptions(): ObjectHash;
|
|
26
|
+
onBeforeRender(): boolean;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
import { Video } from "../../models";
|
|
4
|
+
import { ImageOptions } from "../../utils";
|
|
5
|
+
export interface ThumbnailComponentOptions extends Core.ComponentOptions {
|
|
6
|
+
model: Video;
|
|
7
|
+
onClickHandler?: Function;
|
|
8
|
+
thumbnailOptions?: ImageOptions;
|
|
9
|
+
playIcon?: boolean;
|
|
10
|
+
lazyload?: boolean;
|
|
11
|
+
appLink?: Core.AppLink;
|
|
12
|
+
href?: string;
|
|
13
|
+
channelName?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class ThumbnailComponent extends Core.Component<Video> {
|
|
16
|
+
protected options: ThumbnailComponentOptions;
|
|
17
|
+
constructor(options: ThumbnailComponentOptions);
|
|
18
|
+
initialize(): void;
|
|
19
|
+
get name(): string;
|
|
20
|
+
get template(): string;
|
|
21
|
+
get tagName(): string;
|
|
22
|
+
get className(): string;
|
|
23
|
+
get elements(): ObjectHash;
|
|
24
|
+
events(): ObjectHash;
|
|
25
|
+
get appLinks(): Core.AppLinkHash;
|
|
26
|
+
get attributes(): ObjectHash;
|
|
27
|
+
private showPlayIcon;
|
|
28
|
+
private onClick;
|
|
29
|
+
private onImageLoad;
|
|
30
|
+
viewOptions(): ObjectHash;
|
|
31
|
+
onRender(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This enum maps directly to the CurationStatus enum in the
|
|
3
|
+
* NuGet package ClickView.Models from master.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CurationStatus {
|
|
6
|
+
Draft = 0,
|
|
7
|
+
Published = 1,
|
|
8
|
+
Archive = 2,
|
|
9
|
+
Pending = 3,
|
|
10
|
+
Rejected = 4,
|
|
11
|
+
Processing = 5
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DialogError } from "../primitives";
|
|
2
|
+
import { DialogViewOptions } from "../../components";
|
|
3
|
+
/**
|
|
4
|
+
* TODO: Create a more useful message here.
|
|
5
|
+
* Perhaps using the mime types listen on MDN
|
|
6
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
|
|
7
|
+
* or in the list of all the official mime types
|
|
8
|
+
* https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
9
|
+
*/
|
|
10
|
+
export declare class FileTypeError extends DialogError {
|
|
11
|
+
constructor(message: string, files: File[], acceptedFiles: string);
|
|
12
|
+
get name(): string;
|
|
13
|
+
get lang(): string;
|
|
14
|
+
get dialogOptions(): DialogViewOptions;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Core } from '@clickview/common';
|
|
2
|
+
import { DialogViewOptions } from "../../components";
|
|
3
|
+
export declare abstract class DialogError extends Core.SilentError {
|
|
4
|
+
dialogOptions: DialogViewOptions;
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
get name(): string;
|
|
7
|
+
onDone(): void;
|
|
8
|
+
onFail(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseCollectionIdentifier, BaseCollectionIdentifierOptions } from '@clickview/common';
|
|
2
|
+
import { SortType } from "../enums";
|
|
3
|
+
export interface CollectionIdentifierOptions extends BaseCollectionIdentifierOptions<SortType> {
|
|
4
|
+
}
|
|
5
|
+
export declare class CollectionIdentifier extends BaseCollectionIdentifier<SortType> {
|
|
6
|
+
protected getSortTypeParam(): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Core } from '@clickview/common';
|
|
2
|
+
interface ApplicationContext {
|
|
3
|
+
pageLoad: boolean;
|
|
4
|
+
appLink: Core.AppLink;
|
|
5
|
+
}
|
|
6
|
+
export interface AppContextServiceOptions {
|
|
7
|
+
}
|
|
8
|
+
export declare class StaticContextService extends Core.Service {
|
|
9
|
+
private static instance;
|
|
10
|
+
private routeHistory;
|
|
11
|
+
private contextHistory;
|
|
12
|
+
get name(): string;
|
|
13
|
+
static get Instance(): StaticContextService;
|
|
14
|
+
initialize(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Context specific methods.
|
|
17
|
+
* The Context History keeps track of ALL APPLINKS.
|
|
18
|
+
*/
|
|
19
|
+
private setContext;
|
|
20
|
+
getCurrentContext(): ApplicationContext;
|
|
21
|
+
getPreviousContext(): ApplicationContext;
|
|
22
|
+
/**
|
|
23
|
+
* Route specific methods.
|
|
24
|
+
* The Route History works the same way as the Context History, except
|
|
25
|
+
* it will ONLY take applinks that change the route. This is useful
|
|
26
|
+
* for things like tracking state for in-application back buttons where we
|
|
27
|
+
* would not be interested in applinks that do not map to routes.
|
|
28
|
+
*/
|
|
29
|
+
private updateRouteHistory;
|
|
30
|
+
getCurrentRoute(): ApplicationContext;
|
|
31
|
+
getPreviousRoute(): ApplicationContext;
|
|
32
|
+
/**
|
|
33
|
+
* Other utilities
|
|
34
|
+
*/
|
|
35
|
+
fromPageLoad(): boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const ContextService: StaticContextService;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { BaseDataService } from '@clickview/common';
|
|
3
|
+
interface LanguageConfig {
|
|
4
|
+
locale: string;
|
|
5
|
+
phrases: ObjectHash;
|
|
6
|
+
}
|
|
7
|
+
export declare class LanguageDataService extends BaseDataService {
|
|
8
|
+
get name(): string;
|
|
9
|
+
get channelName(): string;
|
|
10
|
+
getLanguageConfig(callback?: (languageConfig: LanguageConfig) => void): void;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Core } from '@clickview/common';
|
|
2
|
+
import { LanguageConfig } from "../models/LanguageConfig";
|
|
3
|
+
interface LanguageInterpolationOptions {
|
|
4
|
+
smartCount?: number;
|
|
5
|
+
[propName: string]: any;
|
|
6
|
+
}
|
|
7
|
+
declare class StaticLanguageService extends Core.Service {
|
|
8
|
+
private static instance;
|
|
9
|
+
private polyglot;
|
|
10
|
+
static get Instance(): StaticLanguageService;
|
|
11
|
+
get name(): string;
|
|
12
|
+
setConfig(config: LanguageConfig): void;
|
|
13
|
+
getPhrase(namespace: string, phraseKey: string, options?: LanguageInterpolationOptions): string;
|
|
14
|
+
}
|
|
15
|
+
export declare const LanguageService: StaticLanguageService;
|
|
16
|
+
export {};
|