@clickview/library-editor 1.1.3-dev.0 → 1.1.3-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/bundle.js +2 -100023
  2. package/dist/bundle.js.map +1 -1
  3. package/dist/cv-app-dev.js +104026 -0
  4. package/dist/cv-app-dev.js.map +1 -0
  5. package/dist/cv-svg-dev.js +1449 -0
  6. package/dist/cv-svg-dev.js.map +1 -0
  7. package/dist/en.json +1 -1419
  8. package/dist/library-editor-app.css +316 -2599
  9. package/dist/library-editor-app.css.map +1 -1
  10. package/dist/src/apps/dashboard/components/dashboard-notifications/DashboardNotificationsComponents.d.ts +1 -1
  11. package/dist/src/apps/index.d.ts +1 -1
  12. package/dist/src/apps/library-editor/components/sort-select/SortSelectComponent.d.ts +1 -1
  13. package/dist/src/apps/library-editor/services/ExportDataService.d.ts +1 -1
  14. package/dist/src/apps/notifications/utils/Constants.d.ts +52 -0
  15. package/dist/src/apps/notifications/utils/NotificationsHelper.d.ts +13 -4
  16. package/dist/src/apps/notifications/utils/index.d.ts +1 -0
  17. package/dist/src/apps/search/components/index.d.ts +2 -0
  18. package/dist/src/apps/search/components/instant-search/index.d.ts +4 -0
  19. package/dist/src/apps/search/components/instant-search/recent-search/RecentSearchResultComponent.d.ts +15 -0
  20. package/dist/src/apps/search/components/instant-search/series/SeriesSearchResultComponent.d.ts +9 -0
  21. package/dist/src/apps/search/components/instant-search/tag/TagSearchResultComponent.d.ts +9 -0
  22. package/dist/src/apps/search/components/instant-search/video-result/VideoSearchResultComponent.d.ts +15 -0
  23. package/dist/src/apps/search/components/search-context/SearchContextComponent.d.ts +18 -0
  24. package/dist/src/apps/search/components/search-tips/SearchTipsComponent.d.ts +11 -0
  25. package/dist/src/apps/search/services/ContextualSearchService.d.ts +37 -0
  26. package/dist/src/apps/search/services/SearchDataService.d.ts +1 -1
  27. package/dist/src/apps/search/views/search-bar/SearchBarView.d.ts +102 -0
  28. package/dist/src/apps/search/views/search-bar/templates/index.d.ts +9 -0
  29. package/dist/src/apps/staff-requests/views/staff-requests/StaffRequestsView.d.ts +1 -1
  30. package/dist/src/index.d.ts +6 -0
  31. package/dist/src/shared/behaviors/index.d.ts +1 -0
  32. package/dist/src/shared/behaviors/popover/PopoverBehavior.d.ts +40 -0
  33. package/dist/src/shared/behaviors/tooltip/TooltipBehavior.d.ts +12 -0
  34. package/dist/src/shared/components/index.d.ts +2 -0
  35. package/dist/src/shared/components/thumbnail/ThumbnailComponent.d.ts +32 -0
  36. package/dist/src/shared/constants/ImageUrls.d.ts +1 -0
  37. package/dist/src/shared/constants/Services.d.ts +1 -0
  38. package/dist/src/shared/constants/empty-state-components/EmptyStateComponents.d.ts +1 -1
  39. package/dist/src/shared/enums/SortTypes.d.ts +7 -0
  40. package/dist/src/shared/enums/index.d.ts +1 -0
  41. package/dist/src/shared/interfaces/LibraryFoldersIdentifier.d.ts +2 -1
  42. package/dist/src/shared/interfaces/RecentVideoCollectionIdentifier.d.ts +1 -1
  43. package/dist/src/shared/interfaces/RecentVideoSubjectCollectionIdentifier.d.ts +1 -1
  44. package/dist/src/shared/interfaces/Tooltip.d.ts +6 -0
  45. package/dist/src/shared/interfaces/VideoCollectionIdentifier.d.ts +2 -1
  46. package/dist/src/shared/interfaces/index.d.ts +1 -0
  47. package/dist/src/shared/services/ContextService.d.ts +38 -0
  48. package/dist/src/shared/services/LanguageService.d.ts +16 -0
  49. package/dist/src/shared/services/UserDataService.d.ts +1 -1
  50. package/dist/src/shared/utils/MaskHelper.d.ts +15 -0
  51. package/dist/src/shared/utils/SortHelper.d.ts +1 -2
  52. package/dist/src/shared/utils/index.d.ts +2 -0
  53. package/dist/src/shared/utils/search/InstantSearchHelper.d.ts +21 -0
  54. package/dist/src/shared/utils/search/RecentSearchHelper.d.ts +12 -0
  55. package/dist/src/shared/utils/search/SearchTypes.d.ts +28 -0
  56. package/dist/src/shared/utils/search/TypeaheadHelper.d.ts +76 -0
  57. package/dist/src/shared/utils/search/raw-search-components/confirm-selection/ConfirmSelectionComponent.d.ts +12 -0
  58. package/package.json +6 -6
@@ -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
+ };
@@ -1,7 +1,6 @@
1
1
  import { ObjectHash } from 'backbone';
2
2
  import { Core } from '@clickview/common';
3
- import { SortType } from '@clickview/shared';
4
- import { ExportServiceSortType } from "../enums";
3
+ import { SortType, ExportServiceSortType } from "../enums";
5
4
  declare const SortHelper: {
6
5
  GetCurrentSortType(): SortType;
7
6
  GetSortViewModel(): Core.Model;
@@ -20,5 +20,7 @@ export * from './TabHelper';
20
20
  export * from './VideoHelper';
21
21
  export * from './CancelProcessingHelper';
22
22
  export * from './CollectionHelper';
23
+ export * from './EmptyStateHelper';
23
24
  export * from './LazyLoadHelper';
24
25
  export * from './SpinnerHelper';
26
+ export * from './handlebars';
@@ -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.3-dev.0",
4
+ "version": "1.1.3-rc.0",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  "author": "Shale Kuzmanovski, Michael McDonnell",
31
31
  "license": "ISC",
32
32
  "devDependencies": {
33
- "@clickview/tooling": "0.0.13-dev.0",
33
+ "@clickview/tooling": "0.0.12",
34
34
  "@fortawesome/fontawesome": "1.1.8",
35
35
  "@types/clipboard": "2.0.1",
36
36
  "@types/cropperjs": "1.1.5",
@@ -61,10 +61,10 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@babel/polyfill": "7.4.4",
64
- "@clickview/analytics": "1.0.3-dev.0",
65
- "@clickview/common": "1.0.3-dev.0",
66
- "@clickview/shared": "1.0.3-dev.0",
67
- "@clickview/styles": "1.0.3-dev.0",
64
+ "@clickview/analytics": "1.0.3-rc.0",
65
+ "@clickview/common": "1.0.3-rc.0",
66
+ "@clickview/shared": "1.0.3-rc.0",
67
+ "@clickview/styles": "1.0.2",
68
68
  "autotrack": "2.4.1",
69
69
  "bootstrap": "4.3.1",
70
70
  "clipboard": "2.0.4",