@clickview/curator 1.0.15-dev.0 → 1.0.15-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.
- package/dist/curator-app.css.map +1 -1
- package/dist/curator-app.js +17 -1
- package/dist/curator-app.js.map +1 -1
- package/dist/libs/analytics/src/Analytics.d.ts +10 -0
- package/dist/libs/analytics/src/AnalyticsHelper.d.ts +30 -0
- package/dist/libs/analytics/src/constants/EventFirehose.d.ts +4 -0
- package/dist/libs/analytics/src/constants/GlobalChannels.d.ts +3 -0
- package/dist/libs/analytics/src/constants/Services.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +25 -3
- package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +49 -0
- package/dist/libs/analytics/src/services/ContextService.d.ts +19 -0
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +5 -1
- package/dist/projects/curator/src/apps/playlists/PlaylistsApplication.d.ts +0 -1
- package/dist/projects/curator/src/apps/playlists/services/PlaylistDataService.d.ts +22 -0
- package/dist/projects/curator/src/apps/playlists/services/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/services/SeriesDataService.d.ts +17 -0
- package/dist/projects/curator/src/apps/series/services/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/services/VideoDataService.d.ts +14 -0
- package/dist/projects/curator/src/apps/videos/services/index.d.ts +1 -0
- package/package.json +45 -45
- package/tooling/externals.js +0 -1
- package/dist/projects/curator/src/apps/subjects/components/levels/edit-level-nav/EditLevelNav.d.ts +0 -7
- package/dist/projects/curator/src/apps/subjects/components/levels/level-audiences/LevelAudiences.d.ts +0 -11
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/LevelMemberItem.d.ts +0 -12
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/LevelMemberList.d.ts +0 -25
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/LevelMemberListHeader.d.ts +0 -14
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/index.d.ts +0 -1
- package/dist/projects/curator/src/apps/subjects/enums/ObjectMemberType.d.ts +0 -10
- package/dist/projects/curator/src/apps/subjects/utils/LevelMemberHelper.d.ts +0 -8
- package/dist/projects/curator/src/apps/subjects/utils/LevelsNavHelper.d.ts +0 -4
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-level-members/EditLevelMembersUtils.d.ts +0 -16
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-level-members/EditLevelMembersView.d.ts +0 -16
- package/dist/projects/curator/src/apps/subjects/views/levels/level-audiences/LevelAudiencesView.d.ts +0 -6
- package/dist/projects/curator/src/apps/subjects/views/levels/level-nav/LevelNavView.d.ts +0 -6
- package/dist/projects/curator/src/apps/subjects/views/levels/levels-redirect/LevelsRedirectView.d.ts +0 -2
- package/dist/projects/curator/src/apps/subjects/views/levels/levels-redirect/index.d.ts +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnalyticsDataPayload } from "./models/AnalyticsEvent";
|
|
2
|
+
import { ActionContext, EventVersion } from "./interfaces";
|
|
3
|
+
export declare const Analytics: {
|
|
4
|
+
/**
|
|
5
|
+
* Push/emit all events along the analytics firehose
|
|
6
|
+
* @param eventType
|
|
7
|
+
* @param data Data to be passed to AnalyticsClient
|
|
8
|
+
*/
|
|
9
|
+
log<TType extends import("./interfaces").UserAction, TData extends AnalyticsDataPayload>(eventType: TType, data: TData, actionContext?: ActionContext, eventVersion?: EventVersion): void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { Core } from "../../common/src/backbone";
|
|
3
|
+
import { ActionContext, AnalyticsOptions, ActionDescriptor, InteractionTypeDescriptor, InteractionType } from "./interfaces";
|
|
4
|
+
export declare const AnalyticsHelper: {
|
|
5
|
+
logUserAction(data: ObjectHash | ObjectHash[], analyticsOptions: AnalyticsOptions): void;
|
|
6
|
+
logNavigate(appLink: Core.AppLink, options: ObjectHash): void;
|
|
7
|
+
mergeOptions(baseOptions: AnalyticsOptions, newOptions: AnalyticsOptions): AnalyticsOptions;
|
|
8
|
+
buildActionContext(options?: AnalyticsOptions): ActionContext;
|
|
9
|
+
buildUserActionEvent(options?: AnalyticsOptions): ObjectHash;
|
|
10
|
+
buildCurrentLocation(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Search logging helpers
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Create a search event that is depenedent on whether we page loaded into search
|
|
16
|
+
* or used the search bar directly.
|
|
17
|
+
*/
|
|
18
|
+
buildSearchEvent(query: string, descriptor: ActionDescriptor): ObjectHash;
|
|
19
|
+
buildInstantSearchEvent(query: string, suggestion: ObjectHash, source: string): ObjectHash;
|
|
20
|
+
/**
|
|
21
|
+
* Resources Helpers
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Map our general InteractionType to an appropriate anayltics descriptor type.
|
|
25
|
+
* The reason we do this is to maintain a seperation between analytics metadata and
|
|
26
|
+
* actual domain data.
|
|
27
|
+
* @param type
|
|
28
|
+
*/
|
|
29
|
+
mapInteractionType(type: InteractionType): InteractionTypeDescriptor;
|
|
30
|
+
};
|
|
@@ -56,6 +56,8 @@ export declare enum UserAction {
|
|
|
56
56
|
EditAssoc = "cv_product_edit_assoc",
|
|
57
57
|
Play = "cv_product_play",
|
|
58
58
|
Favourite = "cv_product_favourite",
|
|
59
|
+
Follow = "cv_product_follow",
|
|
60
|
+
Prefer = "cv_product_prefer",
|
|
59
61
|
SetAccess = "cv_product_set_access",
|
|
60
62
|
AddToLocalCache = "cv_product_add_to_lc",
|
|
61
63
|
/**
|
|
@@ -94,6 +96,14 @@ export declare enum EntityType {
|
|
|
94
96
|
ClassroomGroup = "classroom_group",
|
|
95
97
|
Classification = "classification",
|
|
96
98
|
ShareLink = "share_link",
|
|
99
|
+
Upload = "upload",
|
|
100
|
+
SearchResults = "search_results",
|
|
101
|
+
Audience = "audience",
|
|
102
|
+
/**
|
|
103
|
+
* `user` cannot be the value here because when we log these events to Snowflake, the event object
|
|
104
|
+
* puts the current user's data under the `user` key. If we were to log events with `user` as the entity
|
|
105
|
+
* name, this data would be overwritten and lost.
|
|
106
|
+
*/
|
|
97
107
|
User = "target_user"
|
|
98
108
|
}
|
|
99
109
|
export declare enum LocationContext {
|
|
@@ -128,12 +138,22 @@ export declare enum LocationContext {
|
|
|
128
138
|
PlaylistListHeader = "playlist_list_header",
|
|
129
139
|
PlaylistListItem = "playlist_list_item",
|
|
130
140
|
TeacherManager = "teacher_manager",
|
|
141
|
+
TeacherManagerListItem = "teacher_manager_list_item",
|
|
131
142
|
StudentManager = "student_manager",
|
|
143
|
+
StudentManagerListItem = "student_manager_list_item",
|
|
144
|
+
ClassroomsList = "classrooms_list",
|
|
132
145
|
ClassroomsListItem = "classrooms_list_item",
|
|
133
146
|
ClassroomOverview = "classroom_overview",
|
|
134
|
-
|
|
147
|
+
ClassroomOverviewStudentListItem = "classroom_overview_student_list_item",
|
|
148
|
+
ManageClassroomStudents = "manage_classroom_students",
|
|
135
149
|
ManageClassroomStudentListItem = "manage_classroom_student_list_item",
|
|
136
|
-
|
|
150
|
+
ManageClassroomGroups = "manage_classroom_groups",
|
|
151
|
+
ManageClassroomGroupListItem = "manage_classroom_group_list_item",
|
|
152
|
+
PlayPage = "play_page",
|
|
153
|
+
FloatingPlayer = "floating_player",
|
|
154
|
+
ContentUpdatesClassificationBanner = "content_updates_classification_banner",
|
|
155
|
+
PreferencesSettings = "preferences_settings",
|
|
156
|
+
MyUploads = "my_uploads"
|
|
137
157
|
}
|
|
138
158
|
export declare enum WorkflowPhase {
|
|
139
159
|
Start = "start",
|
|
@@ -188,7 +208,9 @@ export declare enum ClickDescriptor {
|
|
|
188
208
|
Title = "title",
|
|
189
209
|
ToggleHideValidListings = "toggle_hide_valid_listings",
|
|
190
210
|
LaunchImmersiveReader = "launch_immersive_reader",
|
|
191
|
-
CopyEmbedHtml = "copy_embed_html"
|
|
211
|
+
CopyEmbedHtml = "copy_embed_html",
|
|
212
|
+
Close = "close",
|
|
213
|
+
Open = "open"
|
|
192
214
|
}
|
|
193
215
|
export declare enum CustomerSettingDescriptor {
|
|
194
216
|
LibraryReview = "library_review"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ObjectHash } from 'backbone';
|
|
2
|
+
import { AnalyticsEventType, ActionContext } from "../interfaces";
|
|
3
|
+
import { EventVersion } from "../interfaces";
|
|
4
|
+
interface Enrichment {
|
|
5
|
+
[prop: string]: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DataObjectPayload extends ObjectHash {
|
|
8
|
+
}
|
|
9
|
+
export interface DataCollectionPayload extends Array<ObjectHash> {
|
|
10
|
+
}
|
|
11
|
+
export declare type AnalyticsDataPayload = DataObjectPayload | DataCollectionPayload;
|
|
12
|
+
/**
|
|
13
|
+
* Base AnalyticsEvent Object.
|
|
14
|
+
* Acts as a wrapper for our events, encapsulating the event type
|
|
15
|
+
* and a data payload.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AnalyticsEvent<TType extends AnalyticsEventType, TPayload extends AnalyticsDataPayload> {
|
|
18
|
+
type: TType;
|
|
19
|
+
data: TPayload;
|
|
20
|
+
actionContext: ActionContext;
|
|
21
|
+
eventVersion: EventVersion;
|
|
22
|
+
constructor(type: TType, data: TPayload, actionContext?: ActionContext, eventVersion?: EventVersion);
|
|
23
|
+
/**
|
|
24
|
+
* Utility function that allows us to create type guards.
|
|
25
|
+
* @param type EventType
|
|
26
|
+
*/
|
|
27
|
+
isType(type: TType): this is TType;
|
|
28
|
+
/**
|
|
29
|
+
* Mix different enrichments into the base AnalyticsEvent object
|
|
30
|
+
* to keep it as flat as possible.
|
|
31
|
+
*
|
|
32
|
+
* @param key Top level enrichment name
|
|
33
|
+
* @param value Either a string or set of KV Pairs
|
|
34
|
+
*/
|
|
35
|
+
enrich(key: string, value: string | Enrichment): void;
|
|
36
|
+
get(key: string): string | Enrichment;
|
|
37
|
+
/**
|
|
38
|
+
* Check that the incoming enrichment doesn't clash with
|
|
39
|
+
* a pre-existing enrichement.
|
|
40
|
+
*
|
|
41
|
+
* @param key
|
|
42
|
+
*/
|
|
43
|
+
private validateKey;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Alias our analytics type to make our function signatures and typings a little cleaner
|
|
47
|
+
*/
|
|
48
|
+
export declare type CoreAnalyticsType = AnalyticsEvent<AnalyticsEventType, AnalyticsDataPayload>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Core } from "../../../common/src/backbone";
|
|
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 contextHistory;
|
|
11
|
+
get name(): string;
|
|
12
|
+
static get Instance(): StaticContextService;
|
|
13
|
+
initialize(): void;
|
|
14
|
+
private setContext;
|
|
15
|
+
getCurrentContext(): ApplicationContext;
|
|
16
|
+
fromPageLoad(): boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const ContextService: StaticContextService;
|
|
19
|
+
export {};
|
|
@@ -32,6 +32,7 @@ export declare class BaseAppRouter extends Marionette.AppRouter {
|
|
|
32
32
|
*/
|
|
33
33
|
protected appRoutes?: Marionette.AppRoutes;
|
|
34
34
|
protected appLinks?: string[];
|
|
35
|
+
protected externalRoutes?: Marionette.AppRoutes;
|
|
35
36
|
/**
|
|
36
37
|
* The channelName used to trigger the appLinks
|
|
37
38
|
* on backbone.radio. This will match the Application's
|
|
@@ -52,11 +53,14 @@ export declare class BaseAppRouter extends Marionette.AppRouter {
|
|
|
52
53
|
protected options?: BaseAppRouterOptions;
|
|
53
54
|
constructor(options?: BaseAppRouterOptions);
|
|
54
55
|
private bindDisposal;
|
|
56
|
+
private addRouteLookup;
|
|
55
57
|
/**
|
|
56
58
|
* Creates all the reverse route lookups
|
|
57
59
|
* and binds all the appLinks to the radio channel
|
|
58
60
|
*/
|
|
59
|
-
private
|
|
61
|
+
private processInternalRoutes;
|
|
62
|
+
private processExternalRoutes;
|
|
63
|
+
private processAppLinks;
|
|
60
64
|
/**
|
|
61
65
|
* This is the heart of the AppRouter. Every single route both page loads
|
|
62
66
|
* and appLinks will go through this method.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseDataService } from "../../../../../../libs/common/src/backbone/services/BaseDataService";
|
|
2
|
+
import { DataServiceError } from "../../../../../../libs/common/src/backbone/interfaces";
|
|
3
|
+
import { FetchOptions } from "../../../../../../libs/common/src/react/utils/FetchHelper";
|
|
4
|
+
import { Playlist, VideoCollection, ReorderRequest } from "../../../../../../libs/shared/src/interfaces";
|
|
5
|
+
import { CreateOrUpdatePlaylistRequest } from "../../../../../../libs/shared/src/apps/playlists/interfaces";
|
|
6
|
+
export declare class PlaylistDataService extends BaseDataService {
|
|
7
|
+
get name(): string;
|
|
8
|
+
get channelName(): string;
|
|
9
|
+
getPlaylist(playlistId: string, callback?: (data: Playlist) => void, errorCallback?: () => void): Playlist;
|
|
10
|
+
getPlaylistsById(ids: string[], callback?: (data: Playlist[]) => void, errorCallback?: () => void): Playlist[];
|
|
11
|
+
createPlaylist(data: CreateOrUpdatePlaylistRequest, userId: string, callback?: (data: Playlist) => void, errorCallback?: () => void): void;
|
|
12
|
+
updatePlaylist(id: string, data: CreateOrUpdatePlaylistRequest, callback?: (data: Playlist) => void, errorCallback?: () => void): void;
|
|
13
|
+
deletePlaylist(playlistId: string, callback?: () => void, errorCallback?: () => void): void;
|
|
14
|
+
getPlaylistVideos(playlistId: string, callback?: (data: VideoCollection) => void, errorCallback?: () => void): VideoCollection;
|
|
15
|
+
reorderVideos(playlistId: string, reorderRequest: ReorderRequest, callback?: () => void): void;
|
|
16
|
+
removeVideoFromPlaylist(playlistId: string, videoId: string, callback?: () => void, errorCallback?: () => void): void;
|
|
17
|
+
}
|
|
18
|
+
export declare const PlaylistDataServiceHelper: {
|
|
19
|
+
getPlaylistFetchOptions: (playlistId: string, setData: (data: Playlist) => void, onError?: (error: DataServiceError) => void) => FetchOptions;
|
|
20
|
+
getPlaylistsByIdFetchOptions: (ids: string[], setData: (data: Playlist[]) => void, onError?: (error: DataServiceError) => void) => FetchOptions;
|
|
21
|
+
getPlaylistVideosFetchOptions: (playlistId: string, setData: (data: VideoCollection) => void, onError?: (error: DataServiceError) => void) => FetchOptions;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PlaylistDataService';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseDataService } from "../../../../../../libs/common/src/backbone/services/BaseDataService";
|
|
2
|
+
import { DataServiceError } from "../../../../../../libs/common/src/backbone/interfaces";
|
|
3
|
+
import { FetchOptions } from "../../../../../../libs/common/src/react/utils/FetchHelper";
|
|
4
|
+
import { Series } from "../../../../../../libs/shared/src/interfaces";
|
|
5
|
+
import { CreateOrUpdateSeriesRequest } from "../interfaces";
|
|
6
|
+
export declare class SeriesDataService extends BaseDataService {
|
|
7
|
+
get name(): string;
|
|
8
|
+
get channelName(): string;
|
|
9
|
+
getSeries(seriesId: string, callback?: (video: Series) => void, errorCallback?: () => void): Series;
|
|
10
|
+
getSeriesById(ids: string[], callback?: (data: Series[]) => void, errorCallback?: () => void): Series[];
|
|
11
|
+
createSeries(data: CreateOrUpdateSeriesRequest, callback?: (data: Series) => void, errorCallback?: () => void): void;
|
|
12
|
+
updateSeries(id: string, data: CreateOrUpdateSeriesRequest, callback?: (data: Series) => void, errorCallback?: () => void): void;
|
|
13
|
+
}
|
|
14
|
+
export declare const SeriesDataServiceHelper: {
|
|
15
|
+
getSeriesFetchOptions(seriesId: string, setData: (data: Series) => void, onError?: (error: DataServiceError) => void): FetchOptions;
|
|
16
|
+
getSeriesByIdFetchOptions: (ids: string[], setData: (data: Series[]) => void, onError?: (error: DataServiceError) => void) => FetchOptions;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SeriesDataService';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseDataService } from "../../../../../../libs/common/src/backbone/services/BaseDataService";
|
|
2
|
+
import { DataServiceError } from "../../../../../../libs/common/src/backbone/interfaces";
|
|
3
|
+
import { FetchOptions } from "../../../../../../libs/common/src/react/utils/FetchHelper";
|
|
4
|
+
import { Video } from "../../../../../../libs/shared/src/interfaces";
|
|
5
|
+
export declare class VideoDataService extends BaseDataService {
|
|
6
|
+
get name(): string;
|
|
7
|
+
get channelName(): string;
|
|
8
|
+
getVideo(videoId: string, callback?: (video: Video) => void, errorCallback?: () => void): Video;
|
|
9
|
+
getVideosById(ids: string[], callback?: (data: Video[]) => void, errorCallback?: () => void): Video[];
|
|
10
|
+
}
|
|
11
|
+
export declare const VideoDataServiceHelper: {
|
|
12
|
+
getVideoFetchOptions: (videoId: string, setData: (data: Video) => void, onError?: (error: DataServiceError) => void) => FetchOptions;
|
|
13
|
+
getVideosByIdFetchOptions: (ids: string[], setData: (data: Video[]) => void, onError?: (error: DataServiceError) => void) => FetchOptions;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VideoDataService';
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@clickview/curator",
|
|
3
|
-
"version": "1.0.15-
|
|
4
|
-
"description": "curator",
|
|
5
|
-
"main": "dist/curator-app.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start": "set NODE_ENV=development&& webpack -w --config ./tooling/webpack.config.js",
|
|
9
|
-
"build": "set NODE_ENV=production&& webpack --config ./tooling/webpack.config.js",
|
|
10
|
-
"dev-build": "set NODE_ENV=development&& webpack --config ./tooling/webpack.config.js"
|
|
11
|
-
},
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "http://gitlab.cvinternal.net/front-end/curator.git"
|
|
15
|
-
},
|
|
16
|
-
"cv": {
|
|
17
|
-
"publishable": true,
|
|
18
|
-
"rebuildable": true
|
|
19
|
-
},
|
|
20
|
-
"author": "Matt Trengrove",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@clickview/tooling": "0.0.16-
|
|
24
|
-
"@types/cropperjs": "1.3.0",
|
|
25
|
-
"@types/react-transition-group": "4.2.3",
|
|
26
|
-
"@types/yup": "0.26.24"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@clickview/styles": "1.0.6-
|
|
30
|
-
"cropperjs": "1.5.6",
|
|
31
|
-
"marked": "0.8.0",
|
|
32
|
-
"yup": "0.27.0"
|
|
33
|
-
},
|
|
34
|
-
"babel": {
|
|
35
|
-
"presets": [
|
|
36
|
-
[
|
|
37
|
-
"@babel/preset-env",
|
|
38
|
-
{
|
|
39
|
-
"corejs": 2,
|
|
40
|
-
"useBuiltIns": "entry"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@clickview/curator",
|
|
3
|
+
"version": "1.0.15-rc.0",
|
|
4
|
+
"description": "curator",
|
|
5
|
+
"main": "dist/curator-app.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "set NODE_ENV=development&& webpack -w --config ./tooling/webpack.config.js",
|
|
9
|
+
"build": "set NODE_ENV=production&& webpack --config ./tooling/webpack.config.js",
|
|
10
|
+
"dev-build": "set NODE_ENV=development&& webpack --config ./tooling/webpack.config.js"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "http://gitlab.cvinternal.net/front-end/curator.git"
|
|
15
|
+
},
|
|
16
|
+
"cv": {
|
|
17
|
+
"publishable": true,
|
|
18
|
+
"rebuildable": true
|
|
19
|
+
},
|
|
20
|
+
"author": "Matt Trengrove",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@clickview/tooling": "0.0.16-rc.0",
|
|
24
|
+
"@types/cropperjs": "1.3.0",
|
|
25
|
+
"@types/react-transition-group": "4.2.3",
|
|
26
|
+
"@types/yup": "0.26.24"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@clickview/styles": "1.0.6-rc.0",
|
|
30
|
+
"cropperjs": "1.5.6",
|
|
31
|
+
"marked": "0.8.0",
|
|
32
|
+
"yup": "0.27.0"
|
|
33
|
+
},
|
|
34
|
+
"babel": {
|
|
35
|
+
"presets": [
|
|
36
|
+
[
|
|
37
|
+
"@babel/preset-env",
|
|
38
|
+
{
|
|
39
|
+
"corejs": 2,
|
|
40
|
+
"useBuiltIns": "entry"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|
package/tooling/externals.js
CHANGED
|
@@ -13,7 +13,6 @@ const externalModules = {
|
|
|
13
13
|
'ReactTransitionGroup': [ /^react-transition-group$/i, /^reacttransitiongroup$/i ],
|
|
14
14
|
'ReactIntersectionObserver': [ /^react-intersection-observer$/i, /^reactintersectionobserver$/i ],
|
|
15
15
|
'Yup': /^yup$/i,
|
|
16
|
-
'Formik': /^formik$/i,
|
|
17
16
|
'Backbone.Validation': [ /^backbone-validation$/i, /^backbone\.validation$/i ],
|
|
18
17
|
'Bloodhound': /^bloodhound$/i,
|
|
19
18
|
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Audience } from "../../../../../../../../libs/shared/src/interfaces";
|
|
3
|
-
import { Presentation } from "../../../interfaces";
|
|
4
|
-
interface LevelAudiencesProps {
|
|
5
|
-
presentations: Presentation[];
|
|
6
|
-
audienceDictionary: {
|
|
7
|
-
[presentationId: string]: Audience[];
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare const LevelAudiences: (props: LevelAudiencesProps) => JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Core } from "../../../../../../../../libs/common/src/backbone";
|
|
3
|
-
import { ActionOptions } from "../../../../../../../../libs/shared/src/components/actions/Actions";
|
|
4
|
-
import { LevelMemberViewModel } from './LevelMemberList';
|
|
5
|
-
interface LevelMemberItemProps {
|
|
6
|
-
member: LevelMemberViewModel;
|
|
7
|
-
getMemberAppLink: (memberId: string) => Core.AppLink;
|
|
8
|
-
onToggleAudience: (audienceId: string, selected: boolean, memberId: string) => void;
|
|
9
|
-
actions?: ActionOptions[];
|
|
10
|
-
}
|
|
11
|
-
export declare function LevelMemberItem(props: LevelMemberItemProps): React.ReactElement;
|
|
12
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Core } from "../../../../../../../../libs/common/src/backbone";
|
|
3
|
-
import { Audience } from "../../../../../../../../libs/shared/src/interfaces";
|
|
4
|
-
import { ActionOptions } from "../../../../../../../../libs/shared/src/components/actions/Actions";
|
|
5
|
-
import { LevelMemberType } from "../../../enums";
|
|
6
|
-
declare type AudienceViewModel = {
|
|
7
|
-
id: string;
|
|
8
|
-
selected: boolean;
|
|
9
|
-
};
|
|
10
|
-
export interface LevelMemberViewModel {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
audiences?: AudienceViewModel[];
|
|
14
|
-
}
|
|
15
|
-
interface LevelMemberListProps {
|
|
16
|
-
members: LevelMemberViewModel[];
|
|
17
|
-
memberType: LevelMemberType;
|
|
18
|
-
audiences: Audience[];
|
|
19
|
-
getMemberAppLink: (memberId: string) => Core.AppLink;
|
|
20
|
-
getAudienceAppLink: (audienceId: string) => Core.AppLink;
|
|
21
|
-
onToggleAudience: (audienceId: string, selected: boolean, memberId?: string) => void;
|
|
22
|
-
getActions?: (itemId: string) => ActionOptions[];
|
|
23
|
-
}
|
|
24
|
-
export declare function LevelMemberList(props: LevelMemberListProps): React.ReactElement;
|
|
25
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Core } from "../../../../../../../../libs/common/src/backbone";
|
|
3
|
-
import { Audience } from "../../../../../../../../libs/shared/src/interfaces";
|
|
4
|
-
import { LevelMemberType } from "../../../enums";
|
|
5
|
-
interface LevelMemberListHeaderProps {
|
|
6
|
-
memberType: LevelMemberType;
|
|
7
|
-
hasActions: boolean;
|
|
8
|
-
audiences: Audience[];
|
|
9
|
-
getIsAudienceSelected: (audience: Audience) => boolean;
|
|
10
|
-
onToggleAudience: (audienceId: string, selected: boolean) => void;
|
|
11
|
-
getAudienceAppLink: (audienceId: string) => Core.AppLink;
|
|
12
|
-
}
|
|
13
|
-
export declare function LevelMemberListHeader(props: LevelMemberListHeaderProps): React.ReactElement;
|
|
14
|
-
export {};
|
package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LevelMemberList';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Core } from "../../../../../../libs/common/src/backbone";
|
|
2
|
-
import { ActionOptions } from "../../../../../../libs/shared/src/components/actions/Actions";
|
|
3
|
-
import { LevelMemberType, OwnerType } from "../enums";
|
|
4
|
-
export declare const LevelMemberHelper: {
|
|
5
|
-
singularizeMemberType(memberType: LevelMemberType): string;
|
|
6
|
-
getMemberAppLink(memberType: LevelMemberType, memberId: string): Core.AppLink;
|
|
7
|
-
getMemberActions(subjectId: string, ownerType: OwnerType, memberType: LevelMemberType, memberId: string): ActionOptions[];
|
|
8
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Flight } from "../../../../../../../../libs/common/src/react";
|
|
3
|
-
import { Core } from "../../../../../../../../libs/common/src/backbone";
|
|
4
|
-
import { BaseObject } from "../../../../../../../../libs/shared/src/interfaces";
|
|
5
|
-
import { SubjectDataService } from "../../../services";
|
|
6
|
-
import { LevelMemberType } from "../../../enums";
|
|
7
|
-
import { EditSubjectMembersState, EditSubjectMembersViewProps } from './EditSubjectMembersView';
|
|
8
|
-
declare type SetState = React.Dispatch<React.SetStateAction<EditSubjectMembersState>>;
|
|
9
|
-
export declare function getSetState(setState: SetState, key: keyof EditSubjectMembersState): (data: any) => void;
|
|
10
|
-
export declare function useFetchData(props: EditSubjectMembersViewProps, state: EditSubjectMembersState, setState: SetState): void;
|
|
11
|
-
export declare function useMapData(members: BaseObject[], props: EditSubjectMembersViewProps, state: EditSubjectMembersState, setState: SetState): void;
|
|
12
|
-
export declare function getMembersRequest(memberType: LevelMemberType, ids: string[]): Flight.Request;
|
|
13
|
-
export declare const getAudienceAppLink: (memberType: LevelMemberType, presentationId: string) => (audienceId: string) => Core.AppLink;
|
|
14
|
-
export declare function toggleObjectsInAudience(d: SubjectDataService, memberType: LevelMemberType, memberIds: string[], levelId: string, presentationId: string, audienceId: string, selected: boolean): void;
|
|
15
|
-
export declare function getActiveAction(memberType: LevelMemberType): string;
|
|
16
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Audience } from "../../../../../../../../libs/shared/src/interfaces";
|
|
3
|
-
import { LevelMemberViewModel } from "../../../components";
|
|
4
|
-
import { LevelMemberType } from "../../../enums";
|
|
5
|
-
import { Presentation } from "../../../interfaces";
|
|
6
|
-
export interface EditLevelMembersState {
|
|
7
|
-
presentations?: Presentation[];
|
|
8
|
-
audiences?: Audience[];
|
|
9
|
-
memberIds?: string[];
|
|
10
|
-
membersWithAudiences?: LevelMemberViewModel[];
|
|
11
|
-
}
|
|
12
|
-
export interface EditLevelMembersViewProps {
|
|
13
|
-
levelId: string;
|
|
14
|
-
memberType: LevelMemberType;
|
|
15
|
-
}
|
|
16
|
-
export declare function EditLevelMembersView(props: EditLevelMembersViewProps): React.ReactElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LevelsRedirectView';
|