@clickview/library-editor 1.1.7 → 1.1.8
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 -1
- package/dist/cv-app-dev.js +104026 -0
- package/dist/cv-app-dev.js.map +1 -0
- package/dist/cv-svg-dev.js +1449 -0
- package/dist/cv-svg-dev.js.map +1 -0
- package/dist/library-editor-app.css.map +1 -1
- 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/{library-editor/errors/library-has-video/LibraryHasVideoError.d.ts → upload/errors/internet-connectivity/InternetConnectivityError.d.ts} +2 -2
- 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 +2 -2
|
@@ -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 {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
/// <reference types="jqueryui" />
|
|
3
|
+
/// <reference types="typeahead" />
|
|
4
|
+
/// <reference types="bootstrap" />
|
|
5
|
+
/// <reference types="dropzone" />
|
|
6
|
+
export interface MaskHelperOptions {
|
|
7
|
+
targetSelector?: string;
|
|
8
|
+
additionalClasses?: string;
|
|
9
|
+
fade?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const MaskHelper: {
|
|
12
|
+
showMask(options?: MaskHelperOptions): JQuery<HTMLElement>;
|
|
13
|
+
hideMask(maskEl?: JQuery<HTMLElement>): void;
|
|
14
|
+
getTarget(targetSelector?: string): JQuery<HTMLElement>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LangHelper';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
import { ObjectHash } from 'backbone';
|
|
3
|
+
import { RemoteSearch } from "./";
|
|
4
|
+
/**
|
|
5
|
+
* Specific logic for processing responses from domain v1/search/instant endpoint
|
|
6
|
+
*/
|
|
7
|
+
export declare const InstantSearchHelper: {
|
|
8
|
+
prepareQuery: (query: string, settings: JQueryAjaxSettings, options?: ObjectHash) => string;
|
|
9
|
+
bloodhoundConfig(source: string, options: ObjectHash): RemoteSearch<any>;
|
|
10
|
+
handleResult(data: ObjectHash, item: any, options?: ObjectHash): any[];
|
|
11
|
+
processVideoResult(collection: any[], item: any, options: ObjectHash): any[];
|
|
12
|
+
processTagsResult(collection: any[], item: any, options: ObjectHash): any[];
|
|
13
|
+
processSeriesResult(collection: any[], item: any, options: ObjectHash): any[];
|
|
14
|
+
processFolderResult(collection: any[], item: any, options?: ObjectHash): any[];
|
|
15
|
+
/**
|
|
16
|
+
* Manipulate
|
|
17
|
+
* @param collection
|
|
18
|
+
* @param options
|
|
19
|
+
*/
|
|
20
|
+
processCollection(collection: any[], options?: ObjectHash): any[];
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StorageHelper } from '@clickview/common';
|
|
2
|
+
export interface UpdateRecentSearchOptions<T> {
|
|
3
|
+
query: T;
|
|
4
|
+
add?: boolean;
|
|
5
|
+
remove?: boolean;
|
|
6
|
+
limit?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const RecentSearchHelper: {
|
|
9
|
+
getRecentSearches<T>(key: string, dataSource: StorageHelper): T[];
|
|
10
|
+
setRecentSearches<T_1>(key: string, recentSearches: T_1[], dataSource: StorageHelper): void;
|
|
11
|
+
updateRecentSearches<T_2>(key: string, dataSource: StorageHelper, options: UpdateRecentSearchOptions<T_2>): T_2[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="typeahead" />
|
|
2
|
+
import { ObjectHash } from 'backbone';
|
|
3
|
+
import { Series, Folder, Video, Channel, Producer, Distributor } from "../../models";
|
|
4
|
+
export declare type InstantSearch = Series | Folder | Video | Channel | Producer | Distributor;
|
|
5
|
+
export interface RemoteSearch<T> extends Bloodhound.BloodhoundOptions<T> {
|
|
6
|
+
remote: Bloodhound.RemoteOptions<T>;
|
|
7
|
+
}
|
|
8
|
+
export interface LocalSearch<T> extends Bloodhound.BloodhoundOptions<T> {
|
|
9
|
+
local: T[] | (() => T[]);
|
|
10
|
+
}
|
|
11
|
+
export declare type TypeaheadDataSource<T> = Bloodhound<T> | ((query: string, syncResults: (result: T[]) => void, asyncResults?: (result: T[]) => void) => void);
|
|
12
|
+
export interface InstantSearchBloodhound<T> {
|
|
13
|
+
bloodhound: TypeaheadDataSource<T>;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export declare type TypeaheadConfig<T> = Twitter.Typeahead.Dataset<T>;
|
|
17
|
+
export interface TypeaheadConfigHandler<T> {
|
|
18
|
+
(source?: InstantSearchBloodhound<T>, index?: number, options?: ObjectHash): Twitter.Typeahead.Dataset<T>;
|
|
19
|
+
}
|
|
20
|
+
export interface BloodhoundConfigHandler<T> {
|
|
21
|
+
(source: string, options?: ObjectHash): LocalSearch<T> | RemoteSearch<T>;
|
|
22
|
+
}
|
|
23
|
+
export interface TypeaheadSourceItem<T> {
|
|
24
|
+
name: string;
|
|
25
|
+
typeaheadConfig: TypeaheadConfigHandler<T>;
|
|
26
|
+
bloodhoundConfig?: BloodhoundConfigHandler<T>;
|
|
27
|
+
options?: ObjectHash;
|
|
28
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/// <reference types="typeahead" />
|
|
2
|
+
/// <reference types="jquery" />
|
|
3
|
+
import { ObjectHash } from 'backbone';
|
|
4
|
+
import * as Bloodhound from 'bloodhound';
|
|
5
|
+
import { TypeaheadDataSource, LocalSearch, RemoteSearch, TypeaheadConfig } from "./";
|
|
6
|
+
import { TypeaheadSourceItem } from "./SearchTypes";
|
|
7
|
+
export declare const TypeaheadHelper: {
|
|
8
|
+
/**
|
|
9
|
+
* This function will only allow our typeahead to fetch results when we
|
|
10
|
+
* have exceeded our min length. The reason for doing this is that we want to the typeahead
|
|
11
|
+
* to load our recent searches immediately when we click the input, but before we perform any searches. - Mike
|
|
12
|
+
*/
|
|
13
|
+
handleQuery<T>(dataSource?: TypeaheadDataSource<T>, options?: ObjectHash): TypeaheadDataSource<T>;
|
|
14
|
+
/**
|
|
15
|
+
* This function complements HandleQuery allowing us to override when and how typeahead templates are
|
|
16
|
+
* rendered. When the query doesn't meet our min length we will render a fallback template, which is
|
|
17
|
+
* essentially just an empty div. This is necessary to ensure we can display recent searchs when the
|
|
18
|
+
* typeahead is active (but less than the require length to trigger the search functionality). As we are
|
|
19
|
+
* dynamically generating the results for videos, folders and series we are deliberately using a closure
|
|
20
|
+
* to ensure we don't lose our template.
|
|
21
|
+
*
|
|
22
|
+
* It must also return <any> as the typeahead typings are shit.
|
|
23
|
+
* - Mike
|
|
24
|
+
*/
|
|
25
|
+
getTemplate(template: Function, options?: ObjectHash): any;
|
|
26
|
+
/**
|
|
27
|
+
* Provides mechanism to map a single search query against multiple bloodhound sources.
|
|
28
|
+
* Sources may be remote endpoints or local in-memory collections.
|
|
29
|
+
* @param sources
|
|
30
|
+
* @param options
|
|
31
|
+
*/
|
|
32
|
+
getSearchSources<T_1>(sources: TypeaheadSourceItem<T_1>[]): TypeaheadConfig<T_1>[];
|
|
33
|
+
/**
|
|
34
|
+
* Bloodhound helper
|
|
35
|
+
*/
|
|
36
|
+
buildBloodhound<T_2>(options: RemoteSearch<T_2> | LocalSearch<T_2>): Bloodhound<T_2>;
|
|
37
|
+
/**
|
|
38
|
+
* This is attached as a callback to the typeahead's render event.
|
|
39
|
+
* Where there is a real suggestion from the server, we will automatically
|
|
40
|
+
* set the cursor to that item, to make it simply to add. This is to encourage the
|
|
41
|
+
* re-use of existing entities.
|
|
42
|
+
*
|
|
43
|
+
* Note: With multiple suggestion sets, the render event will also be called multiple times
|
|
44
|
+
* along with this callback.
|
|
45
|
+
*/
|
|
46
|
+
selectFirstResult(e: JQueryEventObject, suggestions: any[], async: boolean, dataset: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Callback is designed to be attached to the stickit bindings for the typeahead form
|
|
49
|
+
* and emit events when a change is detected on the bound model. We do this to be
|
|
50
|
+
* able to detect whether an input has cleared from a previous selection,
|
|
51
|
+
*
|
|
52
|
+
* @param channelName
|
|
53
|
+
* @param event
|
|
54
|
+
*/
|
|
55
|
+
emitEventOnInput(channelName: string, eventName: string, type: string, wrapperOptions?: ObjectHash): Function;
|
|
56
|
+
/**
|
|
57
|
+
* I hate this.
|
|
58
|
+
*
|
|
59
|
+
* Basically what this function does is curry a callback with the original association's
|
|
60
|
+
* data. Then, depending on the user's interaction with the typeahead input, it will restore that
|
|
61
|
+
* data when a blur event is triggered.
|
|
62
|
+
*
|
|
63
|
+
* @param data raw clone of original assoc model
|
|
64
|
+
*
|
|
65
|
+
* Curried callback
|
|
66
|
+
* @param channelName
|
|
67
|
+
* @param propertyName
|
|
68
|
+
*/
|
|
69
|
+
resetAssociationOnBlur(data: ObjectHash): Function;
|
|
70
|
+
/**
|
|
71
|
+
* Create and render ConfirmSelection component for use as a
|
|
72
|
+
* @param options
|
|
73
|
+
*/
|
|
74
|
+
getConfirmSelectionTemplate(options?: ObjectHash): Function;
|
|
75
|
+
clearInputOnBlur(channelName: string): void;
|
|
76
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from '@clickview/common';
|
|
3
|
+
interface ConfirmSelectionComponentOptions extends Core.ComponentOptions {
|
|
4
|
+
}
|
|
5
|
+
export declare class ConfirmSelectionComponent extends Core.Component {
|
|
6
|
+
constructor(options: ConfirmSelectionComponentOptions);
|
|
7
|
+
get name(): string;
|
|
8
|
+
get template(): string;
|
|
9
|
+
get className(): string;
|
|
10
|
+
viewOptions(): ObjectHash;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickview/library-editor",
|
|
3
3
|
"description": "Library Editor",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.8",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@babel/polyfill": "7.4.4",
|
|
63
63
|
"@clickview/analytics": "1.0.4",
|
|
64
64
|
"@clickview/common": "1.0.4",
|
|
65
|
-
"@clickview/shared": "1.0.
|
|
65
|
+
"@clickview/shared": "1.0.6",
|
|
66
66
|
"@clickview/styles": "1.0.2",
|
|
67
67
|
"autotrack": "2.4.1",
|
|
68
68
|
"bootstrap": "4.3.1",
|