@clickview/curator 1.0.17-rc.2 → 1.0.18-dev.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 (38) hide show
  1. package/dist/curator-app.css +2 -0
  2. package/dist/curator-app.js +3 -3
  3. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +5 -6
  4. package/dist/libs/analytics/src/interfaces/User.d.ts +11 -0
  5. package/dist/libs/common/src/backbone/utils/ConcurrencyHelper.d.ts +13 -0
  6. package/dist/libs/common/src/react/constants/ViewModelActions.d.ts +3 -0
  7. package/dist/libs/common/src/react/hooks/UseViewModel.d.ts +4 -0
  8. package/dist/libs/common/src/react/interfaces/ViewModelAction.d.ts +5 -0
  9. package/dist/libs/common/src/react/interfaces/ViewModelPayload.d.ts +5 -0
  10. package/dist/libs/common/src/react/reducers/ViewModelReducer.d.ts +3 -0
  11. package/dist/libs/shared/src/components/actions/ActionButton.d.ts +6 -2
  12. package/dist/libs/shared/src/components/actions/ActionsDropdown.d.ts +2 -1
  13. package/dist/libs/shared/src/interfaces/models/Library.d.ts +2 -0
  14. package/dist/libs/shared/src/interfaces/models/Video.d.ts +1 -0
  15. package/dist/libs/shared/src/interfaces/models/Widget.d.ts +2 -1
  16. package/dist/projects/curator/src/apps/release-notes/ReleaseNotesApplication.d.ts +15 -0
  17. package/dist/projects/curator/src/apps/release-notes/components/GenerateReleaseNotesForm.d.ts +9 -0
  18. package/dist/projects/curator/src/apps/release-notes/constants/GitLabPageLimit.d.ts +1 -0
  19. package/dist/projects/curator/src/apps/release-notes/constants/GitLabProjects.d.ts +3 -0
  20. package/dist/projects/curator/src/apps/release-notes/constants/MonorepoVersions.d.ts +1 -0
  21. package/dist/projects/curator/src/apps/release-notes/flight-requests/GitLabRequests.d.ts +9 -0
  22. package/dist/projects/curator/src/apps/release-notes/interfaces/GitLabProject.d.ts +4 -0
  23. package/dist/projects/curator/src/apps/release-notes/interfaces/ReleaseNotesConfig.d.ts +5 -0
  24. package/dist/projects/curator/src/apps/release-notes/utils/getMergeRequestDescriptionChanges.d.ts +1 -0
  25. package/dist/projects/curator/src/apps/release-notes/utils/getMonorepoMergeRequestDescriptionChanges.d.ts +2 -0
  26. package/dist/projects/curator/src/apps/release-notes/utils/serializeMergeRequestHeading.d.ts +1 -0
  27. package/dist/projects/curator/src/apps/release-notes/utils/serializeMonorepoMergeRequestSubheading.d.ts +1 -0
  28. package/dist/projects/curator/src/apps/release-notes/utils/shouldFilterMergeRequestHeading.d.ts +1 -0
  29. package/dist/projects/curator/src/apps/release-notes/validation/ReleaseNotesValidation.d.ts +3 -0
  30. package/dist/projects/curator/src/apps/release-notes/views/ReleaseNotesFormView.d.ts +2 -0
  31. package/dist/projects/curator/src/apps/release-notes/views/ReleaseNotesGeneratorView.d.ts +2 -0
  32. package/dist/projects/curator/src/index.d.ts +3 -1
  33. package/dist/projects/curator/src/shared/constants/CuratorActions.d.ts +4 -0
  34. package/dist/projects/curator/src/shared/constants/RadioChannels.d.ts +1 -0
  35. package/dist/projects/curator/src/shared/constants/ViewModelKeys.d.ts +3 -0
  36. package/dist/projects/curator/src/shared/services/LanguageDataService.d.ts +11 -0
  37. package/dist/projects/curator/src/shared/utils/StringHelper.d.ts +1 -0
  38. package/package.json +5 -3
@@ -23,7 +23,9 @@ export declare enum UserAction {
23
23
  * The following events are listed in CollectionApi
24
24
  */
25
25
  Stream = "cv_product_stream",
26
+ StreamRaw = "cv_product_stream_raw",
26
27
  WebPlayerStream = "cv_product_webplayer_stream",
28
+ StreamProgress = "cv_product_stream_progress",
27
29
  Login = "cv_product_login",
28
30
  LoginSsoRedirect = "cv_product_login_sso_redirect",
29
31
  LoginFailed = "cv_product_login_failed",
@@ -99,12 +101,7 @@ export declare enum EntityType {
99
101
  Upload = "upload",
100
102
  SearchResults = "search_results",
101
103
  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
- */
107
- User = "target_user"
104
+ User = "user"
108
105
  }
109
106
  export declare enum LocationContext {
110
107
  TopNav = "top_nav",
@@ -151,6 +148,8 @@ export declare enum LocationContext {
151
148
  ManageClassroomGroupListItem = "manage_classroom_group_list_item",
152
149
  PlayPage = "play_page",
153
150
  FloatingPlayer = "floating_player",
151
+ InteractivePlayer = "interactive_player",
152
+ EmbeddedPlayer = "embedded_player",
154
153
  ContentUpdatesClassificationBanner = "content_updates_classification_banner",
155
154
  PreferencesSettings = "preferences_settings",
156
155
  MyUploads = "my_uploads"
@@ -1,6 +1,17 @@
1
1
  import { BaseObject } from "./";
2
+ export declare enum UserGroup {
3
+ Staff = "staff",
4
+ Learner = "learner",
5
+ Unknown = "unknown"
6
+ }
2
7
  export interface User extends BaseObject {
3
8
  countryCode?: string;
4
9
  customerId?: string;
10
+ customerGuid?: string;
11
+ customerName?: string;
12
+ crmId?: number;
5
13
  role?: string;
14
+ userGroup?: UserGroup;
15
+ yearGroup?: string;
16
+ isOpenCustomer?: boolean;
6
17
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Not really for concurrency 😂
3
+ * But useful in circumstances where we need to manually wait for
4
+ * a sequence of callbacks or other resources to execute and don't
5
+ * want the overhead of promises.
6
+ */
7
+ export declare class ConcurrencyHelper {
8
+ private value;
9
+ constructor(initialValue: number);
10
+ increment(): void;
11
+ decrement(): void;
12
+ getValue(): number;
13
+ }
@@ -0,0 +1,3 @@
1
+ export declare const ViewModelActions: {
2
+ UPDATE: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ declare type IUseViewModel<T> = [T, // State
2
+ (dataOrKey: T | keyof T, keyData?: any) => void];
3
+ export declare const useViewModel: <T = any>(viewModelKey: string, initialState?: T) => IUseViewModel<T>;
4
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ViewModelPayload } from "./ViewModelPayload";
2
+ export interface ViewModelAction {
3
+ type: string;
4
+ payload: ViewModelPayload;
5
+ }
@@ -0,0 +1,5 @@
1
+ export interface ViewModelPayload {
2
+ viewModelKey: string;
3
+ dataOrKey: any;
4
+ keyData?: any;
5
+ }
@@ -0,0 +1,3 @@
1
+ import { HashObject } from "../interfaces/HashObject";
2
+ import { ViewModelAction } from "../interfaces/ViewModelAction";
3
+ export declare function ViewModelReducer(state: HashObject, action: ViewModelAction): HashObject;
@@ -1,7 +1,11 @@
1
1
  import * as React from 'react';
2
- import { ActionOptions } from './Actions';
2
+ import { Core } from "../../../../common/src/backbone";
3
3
  interface ActionButtonProps {
4
- actionOptions: ActionOptions;
4
+ appLink?: Core.AppLink;
5
+ onClick?: (e: React.MouseEvent) => void;
6
+ svgName?: string;
7
+ className?: string;
8
+ tooltip?: string;
5
9
  }
6
10
  export declare function ActionButton(props: React.PropsWithChildren<ActionButtonProps>): JSX.Element;
7
11
  export {};
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { ActionOptions } from './Actions';
3
+ declare type DropdownActionOptions = Omit<ActionOptions, 'button' | 'tooltip'>;
3
4
  interface ActionsDropdownProps {
4
- actions: ActionOptions[];
5
+ actions: DropdownActionOptions[];
5
6
  className?: string;
6
7
  dropdownToggleClassName?: string;
7
8
  }
@@ -1,3 +1,5 @@
1
1
  import { BaseObject } from "./..";
2
2
  export interface Library extends BaseObject {
3
+ isHiddenLibrary: boolean;
4
+ type: 'custom_library' | 'hosted_library' | 'exchange' | 'workspace' | 'online_supplementary_library';
3
5
  }
@@ -23,4 +23,5 @@ export interface Video extends BaseObject {
23
23
  links?: LinkCollection;
24
24
  glance?: Glance;
25
25
  isFavourited?: boolean;
26
+ hasSubtitle?: boolean;
26
27
  }
@@ -6,7 +6,8 @@ import { BaseObject } from "./..";
6
6
  export declare enum WidgetType {
7
7
  Row = 0,
8
8
  LargeRow = 1,
9
- Hero = 2
9
+ Hero = 2,
10
+ ResourcesTile = 3
10
11
  }
11
12
  export interface Widget extends BaseObject {
12
13
  collectionId: number;
@@ -0,0 +1,15 @@
1
+ import { ObjectHash } from 'backbone';
2
+ import { Core } from "../../../../../libs/common/src/backbone";
3
+ import { CuratorLayoutView, CuratorLayoutViewOptions } from "../../shared/layouts";
4
+ export declare class ReleaseNotesApplication extends Core.Application {
5
+ protected layout: CuratorLayoutView;
6
+ get name(): string;
7
+ static get router(): any;
8
+ get channelName(): string;
9
+ get layoutOptions(): Core.LayoutOptions<CuratorLayoutViewOptions>;
10
+ index(): void;
11
+ form(): void;
12
+ generator(): void;
13
+ protected onShowAlert(options?: ObjectHash): void;
14
+ private getPopupProps;
15
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface GenerateReleaseNotesFormProps {
3
+ getMilestones: (projectId: string) => void;
4
+ milestones: string[];
5
+ getBranchNames: (projectId: string) => void;
6
+ branchNames: string[];
7
+ }
8
+ export declare function GenerateReleaseNotesForm(props: GenerateReleaseNotesFormProps): JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare const GITLAB_PAGE_LIMIT = 50;
@@ -0,0 +1,3 @@
1
+ import { GitLabProject } from '../interfaces/GitLabProject';
2
+ export declare const MONOREPO_PROJECT_ID = "798";
3
+ export declare const GitLabProjects: GitLabProject[];
@@ -0,0 +1 @@
1
+ export declare const monorepoVersionsTemplate = "# Final Package Versions\n\n| Package | Version |\n| ------------------------- | ------------------------ |\n| @clickview/analytics | <analytics-version> |\n| @clickview/styles | <styles-version> |\n| @clickview/tooling | <tooling-version> |\n| @clickview/curator | <curator-version> |\n| @clickview/library-editor | <library-editor-version> |\n| @clickview/lite | <lite-version> |\n| @clickview/online | <online-version> |\n";
@@ -0,0 +1,9 @@
1
+ import { Flight } from "../../../../../../libs/common/src/react";
2
+ import { HashObject } from "../../../../../../libs/common/src/react/interfaces";
3
+ export declare const GitLabRequests: {
4
+ milestones(projectId: string, success: (milestones: string[]) => void): Flight.Request;
5
+ branchNames(projectId: string, success: (branchNames: string[]) => void): Flight.Request;
6
+ mergeRequestsByMilestone(projectId: string, milestone: string, page: number, success: (data: HashObject<any>[]) => void): Flight.Request;
7
+ getFilesPaths(projectId: string, fileName: string, success: (data: HashObject<any>[]) => void): Flight.Request;
8
+ getFile(projectId: string, path: string, branchName: string, success: (data: HashObject<any>) => void): Flight.Request;
9
+ };
@@ -0,0 +1,4 @@
1
+ export interface GitLabProject {
2
+ id: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface ReleaseNotesConfig {
2
+ project: string;
3
+ milestone?: string;
4
+ branchName?: string;
5
+ }
@@ -0,0 +1 @@
1
+ export declare function getMergeRequestDescriptionChanges(descriptions: string[]): string;
@@ -0,0 +1,2 @@
1
+ import { HashObject } from "../../../../../../libs/common/src/react/interfaces";
2
+ export declare function getMonorepoMergeRequestDescriptionChanges(descriptions: string[], packageJsons: HashObject[]): string;
@@ -0,0 +1 @@
1
+ export declare function serializeMergeRequestHeading(heading: string): string;
@@ -0,0 +1 @@
1
+ export declare function serializeMonorepoMergeRequestSubheading(heading: string): string;
@@ -0,0 +1 @@
1
+ export declare function shouldFilterMergeRequestHeading(heading: string): boolean;
@@ -0,0 +1,3 @@
1
+ import * as Yup from 'yup';
2
+ import { ReleaseNotesConfig } from "../interfaces/ReleaseNotesConfig";
3
+ export declare const ReleaseNotesValidationSchema: Yup.ObjectSchema<Yup.Shape<object, ReleaseNotesConfig>>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function ReleaseNotesFormView(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function ReleaseNotesGeneratorView(): JSX.Element;
@@ -43,6 +43,7 @@ export * from './apps/subjects/SubjectsApplication';
43
43
  export * from './apps/themes/ThemesApplication';
44
44
  export * from './apps/videos/VideosApplication';
45
45
  export * from './apps/domain-options/DomainOptionsApplication';
46
+ export * from './apps/release-notes/ReleaseNotesApplication';
46
47
  import { InstanceManager } from "../../../libs/common/src/backbone/services/InstanceManager";
47
48
  import { FifoMemoryCache } from "../../../libs/common/src/backbone/services/caches/FifoMemoryCache";
48
49
  import { AjaxDataProvider } from "../../../libs/common/src/backbone/services/data-providers/AjaxDataProvider";
@@ -50,7 +51,8 @@ import { AlertType, BaseAlertService } from "../../../libs/common/src/backbone/s
50
51
  import { LanguageService } from "../../../libs/common/src/backbone/services/LanguageService";
51
52
  import { Flight } from "../../../libs/common/src/react";
52
53
  import { Core } from "../../../libs/common/src/backbone";
54
+ import { ViewModelReducer } from "../../../libs/common/src/react/reducers/ViewModelReducer";
53
55
  import { CacheDurations } from "../../../libs/shared/src/constants/CacheDurations";
54
56
  import { LanguageDataService } from "../../../libs/shared/src/services/LanguageDataService";
55
57
  import { AlertList } from "../../../libs/shared/src/components/alert/AlertList";
56
- export { Core, InstanceManager, FifoMemoryCache, AjaxDataProvider, AlertList, AlertType, BaseAlertService, LanguageService, Flight, CacheDurations, LanguageDataService };
58
+ export { Core, InstanceManager, FifoMemoryCache, AjaxDataProvider, AlertList, AlertType, BaseAlertService, LanguageService, Flight, CacheDurations, ViewModelReducer, LanguageDataService };
@@ -84,4 +84,8 @@ export declare const Actions: {
84
84
  EDIT_THEME: string;
85
85
  DELETE_THEME: string;
86
86
  };
87
+ ReleaseNotes: {
88
+ FORM: string;
89
+ GENERATOR: string;
90
+ };
87
91
  };
@@ -7,6 +7,7 @@ export declare const AppChannels: {
7
7
  SUBJECTS: string;
8
8
  THEMES: string;
9
9
  VIDEOS: string;
10
+ RELEASE_NOTES: string;
10
11
  };
11
12
  export declare const DataChannels: {
12
13
  IMAGE_UPLOAD: string;
@@ -0,0 +1,3 @@
1
+ export declare const ViewModelKeys: {
2
+ RELEASE_NOTES_CONFIG: string;
3
+ };
@@ -0,0 +1,11 @@
1
+ import { BaseDataService } from "../../../../../libs/common/src/backbone/services/BaseDataService";
2
+ interface LanguageConfig {
3
+ locale: string;
4
+ phrases: any;
5
+ }
6
+ export declare class LanguageDataService extends BaseDataService {
7
+ get name(): string;
8
+ get channelName(): string;
9
+ getLanguageConfig(callback?: (languageConfig: LanguageConfig) => void): void;
10
+ }
11
+ export {};
@@ -2,4 +2,5 @@
2
2
  export declare const StringHelper: {
3
3
  isEqual(str1: import("react").Key, str2: import("react").Key): boolean;
4
4
  capitalizeFirstLetter(str: string): string;
5
+ toTitleCase(str: string): string;
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/curator",
3
- "version": "1.0.17-rc.2",
3
+ "version": "1.0.18-dev.0",
4
4
  "description": "curator",
5
5
  "main": "dist/curator-app.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,15 +20,17 @@
20
20
  "author": "Matt Trengrove",
21
21
  "license": "ISC",
22
22
  "devDependencies": {
23
- "@clickview/tooling": "0.0.17",
23
+ "@clickview/tooling": "0.0.18-dev.0",
24
24
  "@types/cropperjs": "1.3.0",
25
+ "@types/react-copy-to-clipboard": "4.3.0",
25
26
  "@types/react-transition-group": "4.2.3",
26
27
  "@types/yup": "0.26.24"
27
28
  },
28
29
  "dependencies": {
29
- "@clickview/styles": "1.0.7",
30
+ "@clickview/styles": "1.0.8-dev.0",
30
31
  "cropperjs": "1.5.6",
31
32
  "marked": "0.8.0",
33
+ "react-copy-to-clipboard": "5.0.2",
32
34
  "yup": "0.27.0"
33
35
  },
34
36
  "babel": {