@clickview/curator 1.0.24-dev.0 → 1.0.24-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 +1 -1
- package/dist/curator-app.css.map +1 -0
- package/dist/curator-app.js +3 -3
- package/dist/curator-app.js.map +1 -0
- package/dist/en.json +1 -1
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +3 -8
- package/dist/libs/common/src/backbone/constants/CommonServices.d.ts +1 -0
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseModel.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseService.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/BaseView.d.ts +2 -2
- package/dist/libs/common/src/backbone/core/LayoutService.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +1 -1
- package/dist/libs/common/src/backbone/core/Shell.d.ts +1 -1
- package/dist/libs/common/src/backbone/interfaces/BaseCollectionIdentifier.d.ts +1 -2
- package/dist/libs/common/src/backbone/interfaces/DataProvider.d.ts +1 -1
- package/dist/libs/common/src/backbone/services/LanguageService.d.ts +1 -1
- package/dist/libs/common/src/backbone/services/data-providers/AjaxDataProvider.d.ts +1 -1
- package/dist/libs/common/src/backbone/utils/FunctionHelper.d.ts +3 -3
- package/dist/libs/common/src/react/flight/FlightMiddleware.d.ts +1 -1
- package/dist/libs/common/src/react/flight/interfaces/HttpRequest.d.ts +0 -3
- package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +3 -4
- package/dist/libs/common/src/react/utils/FetchHelper.d.ts +1 -1
- package/dist/libs/shared/src/components/confirmation-popup/ConfirmationPopup.d.ts +2 -5
- package/dist/libs/shared/src/components/forms/form-buttons/FormButtons.d.ts +1 -2
- package/dist/libs/shared/src/components/forms/form-checkbox/FormCheckbox.d.ts +1 -1
- package/dist/libs/shared/src/components/forms/form-field/CharacterCounter.d.ts +2 -3
- package/dist/libs/shared/src/components/forms/form-field/FormField.d.ts +3 -4
- package/dist/libs/shared/src/components/forms/form-wrapper/FormWrapper.d.ts +1 -2
- package/dist/libs/shared/src/components/popup/Popup.d.ts +0 -14
- package/dist/libs/shared/src/components/search-bar/SearchBar.d.ts +0 -24
- package/dist/libs/shared/src/components/search-bar/SearchInput.d.ts +2 -6
- package/dist/libs/shared/src/constants/BootstrapKeys.d.ts +0 -1
- package/dist/libs/shared/src/enums/PermissionName.d.ts +23 -0
- package/dist/libs/shared/src/enums/PlayerMediaType.d.ts +1 -0
- package/dist/libs/shared/src/enums/ResourceFileType.d.ts +9 -0
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +1 -2
- package/dist/libs/shared/src/flight-requests/ThemeRequests.d.ts +0 -2
- package/dist/libs/shared/src/flight-requests/UserRequests.d.ts +1 -3
- package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +1 -3
- package/dist/libs/shared/src/images/svg/actions/index.d.ts +1 -3
- package/dist/libs/shared/src/interfaces/collections/index.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/models/Glance.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +11 -0
- package/dist/libs/shared/src/interfaces/models/Link.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/models/Resource.d.ts +3 -11
- package/dist/libs/shared/src/interfaces/models/Thumbnail.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/User.d.ts +1 -8
- package/dist/libs/shared/src/interfaces/models/index.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/interactive/ActionableItem.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/interactive/Interaction.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionType.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionTypeId.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/models/interactive/Interactive.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/interactive/Timepoint.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/interactive/index.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/requests/CreateOrUpdateClipRequest.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/requests/UpdateVideoRequest.d.ts +1 -5
- package/dist/libs/shared/src/interfaces/requests/index.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/services/BaseUserDataService.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/services/index.d.ts +0 -1
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +4 -5
- package/dist/libs/shared/src/utils/StateHelper.d.ts +9 -10
- package/dist/libs/shared/src/utils/SvgHelper.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/interfaces/data-requests/Series.d.ts +2 -1
- package/dist/projects/curator/src/apps/subjects/components/levels/select-levels/SelectLevels.d.ts +0 -1
- package/dist/projects/curator/src/apps/subjects/components/subjects/select-subjects/SelectSubjects.d.ts +0 -1
- package/dist/projects/curator/src/apps/videos/interfaces/data-requests/UpdateVideoRequest.d.ts +2 -1
- package/dist/projects/curator/src/index.d.ts +0 -20
- package/dist/projects/curator/src/shared/components/forms/file-select/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/forms/image-select/ImageSelect.d.ts +3 -4
- package/dist/projects/curator/src/shared/components/forms/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/image-cropper/ImageCropper.d.ts +10 -0
- package/dist/projects/curator/src/shared/components/image-cropper/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/rating-select/RatingSelect.d.ts +4 -4
- package/dist/projects/curator/src/shared/constants/FileExtensions.d.ts +3 -0
- package/dist/projects/curator/src/shared/constants/Services.d.ts +1 -0
- package/dist/projects/curator/src/shared/constants/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/context/ImageStorageContext.d.ts +45 -0
- package/dist/projects/curator/src/shared/context/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/flight-requests/RatingRequests.d.ts +4 -0
- package/dist/projects/curator/src/shared/interfaces/data-requests/UpdateObjectRating.d.ts +3 -0
- package/dist/projects/curator/src/shared/interfaces/data-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/layouts/curator-layout/CuratorLayoutView.d.ts +1 -1
- package/dist/projects/curator/src/shared/layouts/primitives/LayoutComponent.d.ts +1 -1
- package/dist/projects/curator/src/shared/services/ImageUploadDataService.d.ts +8 -0
- package/dist/projects/curator/src/shared/services/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/utils/ImageSelectHelper.d.ts +6 -0
- package/dist/projects/curator/src/shared/utils/PropHelper.d.ts +1 -2
- package/dist/projects/curator/src/shared/utils/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/views/image-upload/ImageUploadView.d.ts +8 -0
- package/dist/projects/curator/src/shared/views/image-upload/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/views/index.d.ts +1 -0
- package/package.json +47 -48
- package/.eslintrc.json +0 -3
- package/dist/libs/shared/src/enums/MasterObjectTypes.d.ts +0 -8
- package/dist/libs/shared/src/enums/ObjectStatus.d.ts +0 -5
- package/dist/libs/shared/src/utils/VideoDetailsHelper.d.ts +0 -21
|
@@ -19,6 +19,4 @@ import VisibleOn from './visible-on.svg';
|
|
|
19
19
|
import NoEdit from './no-edit.svg';
|
|
20
20
|
import EditClickView from './edit-clickview.svg';
|
|
21
21
|
import Share2 from './share2.svg';
|
|
22
|
-
|
|
23
|
-
import Print from './print.svg';
|
|
24
|
-
export { AddToPlaylist, Close, Delete, Edit, Expand, Minus, More, NewWindow, Plus, Preview, Search, Share, Upload, Down, Right, UpDown, VisibleOff, VisibleOn, NoEdit, EditClickView, Share2, Download, Print };
|
|
22
|
+
export { AddToPlaylist, Close, Delete, Edit, Expand, Minus, More, NewWindow, Plus, Preview, Search, Share, Upload, Down, Right, UpDown, VisibleOff, VisibleOn, NoEdit, EditClickView, Share2 };
|
|
@@ -5,9 +5,7 @@ export interface Config extends BaseObject {
|
|
|
5
5
|
imageCdnUrl: string;
|
|
6
6
|
countryCode: CountryCode;
|
|
7
7
|
webPlayerUrl: string;
|
|
8
|
-
gatewayApiUrl: string;
|
|
9
8
|
notificationServiceUrl?: string;
|
|
10
9
|
collectionApiUrls?: RegionalUrl;
|
|
11
10
|
collectionApiClientId?: string;
|
|
12
|
-
playerApiUrl?: string;
|
|
13
11
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { BaseObject } from "./..";
|
|
2
2
|
import { GlanceFormat } from "../../enums/GlanceFormat";
|
|
3
|
-
import { ThemeType } from "../../enums/ThemeType";
|
|
4
3
|
export interface Glance extends BaseObject {
|
|
5
4
|
theme: string;
|
|
6
5
|
format: GlanceFormat;
|
|
7
6
|
content: string;
|
|
8
|
-
type: ThemeType;
|
|
9
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseObject } from "./..";
|
|
2
|
+
import { User } from './User';
|
|
3
|
+
import { Thumbnail } from './Thumbnail';
|
|
4
|
+
import { Video } from './Video';
|
|
5
|
+
export interface InteractiveMetadata extends BaseObject {
|
|
6
|
+
interactiveId: string;
|
|
7
|
+
owner: User;
|
|
8
|
+
description?: string;
|
|
9
|
+
thumbnail?: Thumbnail;
|
|
10
|
+
video?: Video;
|
|
11
|
+
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { BaseObject } from './primitives';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { Pdf } from './Pdf';
|
|
5
|
-
export declare type ResourceType = 'teacher-pack' | 'student-activity' | 'additional-materials' | 'atom-guide';
|
|
6
|
-
interface ResourceMetadata {
|
|
7
|
-
type: FileType;
|
|
8
|
-
resourceType?: ResourceType;
|
|
2
|
+
interface ResourceMatadata {
|
|
3
|
+
type: string;
|
|
9
4
|
}
|
|
10
5
|
export interface Resource extends BaseObject {
|
|
11
6
|
url: string;
|
|
12
|
-
metadata:
|
|
13
|
-
fileId: string;
|
|
14
|
-
thumbnail: Thumbnail;
|
|
15
|
-
pdf?: Pdf;
|
|
7
|
+
metadata: ResourceMatadata;
|
|
16
8
|
}
|
|
17
9
|
export {};
|
|
@@ -2,10 +2,7 @@ import { BaseObject, Group, Avatar } from "./..";
|
|
|
2
2
|
import { UserRole } from "../../enums/UserRole";
|
|
3
3
|
import { CustomerType } from "../../enums/CustomerType";
|
|
4
4
|
import { OnlineUserRole } from "../../enums/UserRole";
|
|
5
|
-
import { UserGroup } from "../../enums/UserGroup";
|
|
6
|
-
import { ObjectStatus } from "../../enums/ObjectStatus";
|
|
7
5
|
import { CustomerCollection } from '../collections';
|
|
8
|
-
export declare type YearGroup = 'Kindergarten' | 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Year 6' | 'Year 7' | 'Year 8' | 'Year 9' | 'Year 10' | 'Year 11' | 'Year 12' | 'Year 13' | 'Staff';
|
|
9
6
|
/**
|
|
10
7
|
* Master User
|
|
11
8
|
*/
|
|
@@ -16,14 +13,10 @@ export interface User extends BaseObject {
|
|
|
16
13
|
bio: string;
|
|
17
14
|
email: string;
|
|
18
15
|
username: string;
|
|
19
|
-
status:
|
|
16
|
+
status: string;
|
|
20
17
|
role: UserRole;
|
|
21
18
|
customers: CustomerCollection;
|
|
22
|
-
yearGroup: YearGroup;
|
|
23
|
-
userType: UserGroup;
|
|
24
19
|
avatar?: Avatar;
|
|
25
|
-
isPrimaryContact: boolean;
|
|
26
|
-
roleId: OnlineUserRole;
|
|
27
20
|
}
|
|
28
21
|
export interface CuratorUser extends User {
|
|
29
22
|
userId: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HashObject } from "../../../../../common/src/react/interfaces/HashObject";
|
|
2
|
+
import { BaseObject } from "../primitives/BaseObject";
|
|
3
|
+
import { ActionableItem } from './ActionableItem';
|
|
4
|
+
import { InteractionType } from './InteractionType';
|
|
5
|
+
import { InteractionTypeId } from './InteractionTypeId';
|
|
6
|
+
export interface Interaction extends BaseObject {
|
|
7
|
+
typeId: InteractionTypeId;
|
|
8
|
+
type: InteractionType;
|
|
9
|
+
timepointId: string;
|
|
10
|
+
order: number;
|
|
11
|
+
interactiveId: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
data: HashObject;
|
|
15
|
+
actionableItems?: ActionableItem[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseObject } from "../primitives/BaseObject";
|
|
2
|
+
import { Interaction } from './Interaction';
|
|
3
|
+
export interface Timepoint extends BaseObject {
|
|
4
|
+
interactiveId: string;
|
|
5
|
+
shouldPause: number;
|
|
6
|
+
visibleAt: number;
|
|
7
|
+
visibleFor?: number;
|
|
8
|
+
interactions?: Interaction[];
|
|
9
|
+
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { UpdateObjectRating, UpdateObjectChannel, Thumbnail } from "./..";
|
|
2
1
|
export interface UpdateVideoRequest {
|
|
2
|
+
id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
description?: string;
|
|
5
|
-
rating: UpdateObjectRating;
|
|
6
|
-
dateBroadcast?: string;
|
|
7
|
-
channel?: UpdateObjectChannel;
|
|
8
|
-
thumbnail?: Thumbnail;
|
|
9
5
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CurrentUser } from "./..";
|
|
2
|
-
import { HashObject } from "../../../../common/src/react/interfaces";
|
|
3
2
|
export interface BaseUserDataService {
|
|
4
3
|
getCurrentUser(success?: (user: CurrentUser) => void, error?: () => void): void;
|
|
5
|
-
getWorkspace(success?: (workspace: HashObject) => void, error?: () => void): void;
|
|
6
4
|
}
|
|
@@ -20,13 +20,12 @@ export interface CategoryMapperImageOptions {
|
|
|
20
20
|
export declare const ImageHelper: {
|
|
21
21
|
createUrl(baseUrl: string, options?: ImageOptions): string;
|
|
22
22
|
createBannerUrl(banner: Banner, mappingOptions?: CategoryMapperImageOptions, imageOptions?: ImageOptions): string;
|
|
23
|
-
createResourceImage(baseUrl: string, resourceUrl: string, options?: ImageOptions): string;
|
|
24
23
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
* Ensures that strings are properly escaped before using them
|
|
25
|
+
* within a URL.
|
|
26
|
+
*/
|
|
28
27
|
Rfc3986EncodeURIComponent(str: string): string;
|
|
29
28
|
_createCategoryMappedUrl(mappingOptions: CategoryMapperImageOptions, options?: ImageOptions): string;
|
|
30
|
-
_createUrl(baseUrl: string,
|
|
29
|
+
_createUrl(baseUrl: string, options?: ImageOptions): string;
|
|
31
30
|
legacyCreateThumbnailUrl(thumbnail: string | Core.Model | HashObject<any>, options?: ImageOptions): string;
|
|
32
31
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { HashObject } from "../../../common/src/react/interfaces";
|
|
3
2
|
export declare const StateHelper: {
|
|
4
3
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getSetStateByKey<T extends
|
|
4
|
+
* Helper function to get the setState function for an individual key in a state object.
|
|
5
|
+
*
|
|
6
|
+
* @param setState React setState action
|
|
7
|
+
* @param key Property within the state object we're updating
|
|
8
|
+
* @param callback Optional callback to modify data before setting state. Uses identity fn by default.
|
|
9
|
+
*
|
|
10
|
+
* @returns Newly updated state object
|
|
11
|
+
*/
|
|
12
|
+
getSetStateByKey<T extends {}>(setState: import("react").Dispatch<import("react").SetStateAction<T>>, key: keyof T, callback?: (data: any, state?: T) => T[keyof T]): (data: any) => void;
|
|
14
13
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Poster, Banner
|
|
1
|
+
import { Poster, Banner } from "../../../../../../../libs/shared/src/interfaces";
|
|
2
|
+
import { UpdateObjectRating } from "../../../../shared/interfaces";
|
|
2
3
|
export interface CreateOrUpdateSeriesRequest {
|
|
3
4
|
name: string;
|
|
4
5
|
rating: UpdateObjectRating;
|
package/dist/projects/curator/src/apps/subjects/components/levels/select-levels/SelectLevels.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Level } from "../../../interfaces";
|
|
|
3
3
|
import { SubjectMemberType } from "../../../enums";
|
|
4
4
|
interface SelectLevelsFormValues {
|
|
5
5
|
backboneAudienceIds: string[];
|
|
6
|
-
addToAudiences: boolean;
|
|
7
6
|
}
|
|
8
7
|
interface SelectLevelsProps {
|
|
9
8
|
initialValues: SelectLevelsFormValues;
|
|
@@ -3,7 +3,6 @@ import { SubjectTree } from "../../../interfaces";
|
|
|
3
3
|
import { SubjectMemberType } from "../../../enums";
|
|
4
4
|
interface SelectSubjectsFormValues {
|
|
5
5
|
backboneClassificationIds: string[];
|
|
6
|
-
addToClassifications?: boolean;
|
|
7
6
|
}
|
|
8
7
|
interface SelectSubjectsProps {
|
|
9
8
|
initialValues: SelectSubjectsFormValues;
|
package/dist/projects/curator/src/apps/videos/interfaces/data-requests/UpdateVideoRequest.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Thumbnail, HeroBanner, Glance
|
|
1
|
+
import { Thumbnail, HeroBanner, Glance } from "../../../../../../../libs/shared/src/interfaces";
|
|
2
|
+
import { UpdateObjectRating } from "../../../../shared/interfaces";
|
|
2
3
|
import { CurationStatus } from "../../../../shared/enums/CurationStatus";
|
|
3
4
|
export interface UpdateVideoRequest {
|
|
4
5
|
name: string;
|
|
@@ -19,21 +19,11 @@ import '../../../libs/shared/src/apps/upload/errors/internet-connectivity/intern
|
|
|
19
19
|
import '../../../libs/shared/src/apps/upload/utils/upload-utils.lang.json';
|
|
20
20
|
import '../../../libs/shared/src/components/back-button/back-button.lang.json';
|
|
21
21
|
import '../../../libs/shared/src/components/badges/badge.lang.json';
|
|
22
|
-
import '../../../libs/shared/src/components/channel-form-field/channel-form-field.lang.json';
|
|
23
|
-
import '../../../libs/shared/src/components/confirmation-popup/confirmation-popup.lang.json';
|
|
24
22
|
import '../../../libs/shared/src/components/curriculum-links/curriculum-links.lang.json';
|
|
25
|
-
import '../../../libs/shared/src/components/edit-link/edit-link.lang.json';
|
|
26
|
-
import '../../../libs/shared/src/components/edit-resource/edit-resource.lang.json';
|
|
27
23
|
import '../../../libs/shared/src/components/edit-video-details/edit-video-details.lang.json';
|
|
28
|
-
import '../../../libs/shared/src/components/edit-video-links/edit-video-links.lang.json';
|
|
29
|
-
import '../../../libs/shared/src/components/edit-video-resources/edit-video-resources.lang.json';
|
|
30
|
-
import '../../../libs/shared/src/components/edit-video-subtitles/edit-video-subtitles.lang.json';
|
|
31
24
|
import '../../../libs/shared/src/components/favourite-button/favourite-button.lang.json';
|
|
32
25
|
import '../../../libs/shared/src/components/forms/form-buttons/form-buttons.lang.json';
|
|
33
|
-
import '../../../libs/shared/src/components/image-select/image-select.lang.json';
|
|
34
|
-
import '../../../libs/shared/src/components/language-select/language-select.lang.json';
|
|
35
26
|
import '../../../libs/shared/src/components/pagination/pagination.lang.json';
|
|
36
|
-
import '../../../libs/shared/src/components/rating-select/rating-select.lang.json';
|
|
37
27
|
import '../../../libs/shared/src/components/search-bar/search-bar.lang.json';
|
|
38
28
|
import '../../../libs/shared/src/components/video-list/components/video-item-description/video-item-description.lang.json';
|
|
39
29
|
import '../../../libs/shared/src/components/widgets/dynamic-widget/dynamic-widget.lang.json';
|
|
@@ -41,19 +31,9 @@ import '../../../libs/shared/src/components/widgets/fixed-widget/fixed-widget.la
|
|
|
41
31
|
import '../../../libs/shared/src/components/widgets/greeting-widget/greeting.lang.json';
|
|
42
32
|
import '../../../libs/shared/src/components/widgets/items/interactive-widget-item/interactive-widget-item.lang.json';
|
|
43
33
|
import '../../../libs/shared/src/components/widgets/items/subject-widget-item/subject-widget-item.lang.json';
|
|
44
|
-
import '../../../libs/shared/src/legacy/behaviors/file-drop/file-drop.lang.json';
|
|
45
|
-
import '../../../libs/shared/src/legacy/components/file-select/file-select.lang.json';
|
|
46
34
|
import '../../../libs/shared/src/legacy/components/pagination/pagination.lang.json';
|
|
47
|
-
import '../../../libs/shared/src/legacy/errors/too-many-files/too-many-files.lang.json';
|
|
48
|
-
import '../../../libs/shared/src/legacy/errors/too-many-resources/too-many-resources.lang.json';
|
|
49
|
-
import '../../../libs/shared/src/legacy/errors/too-many-subtitles/too-many-subtitles.lang.json';
|
|
50
35
|
import '../../../libs/shared/src/utils/shared-utils.lang.json';
|
|
51
36
|
import '../../../libs/shared/src/utils/video-actions/video-actions-helper.lang.json';
|
|
52
|
-
import '../../../libs/shared/src/views/delete-link/delete-link-view.lang.json';
|
|
53
|
-
import '../../../libs/shared/src/views/delete-resource/delete-resource-view.lang.json';
|
|
54
|
-
import '../../../libs/shared/src/views/delete-subtitle/delete-subtitle-view.lang.json';
|
|
55
|
-
import '../../../libs/shared/src/views/edit-link/edit-link-view.lang.json';
|
|
56
|
-
import '../../../libs/shared/src/views/edit-resource/edit-resource-view.lang.json';
|
|
57
37
|
export * from './shared/constants';
|
|
58
38
|
export * from './shared/layouts';
|
|
59
39
|
export * from './shared/services';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FileSelect';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { HashObject } from "../../../../../../../libs/common/src/react/interfaces";
|
|
3
2
|
import { ImageType } from "../../../../../../../libs/shared/src/enums/Images";
|
|
4
3
|
import { Image } from "../../../../../../../libs/shared/src/interfaces";
|
|
5
|
-
import { FileSelectProps } from "
|
|
6
|
-
interface ImageSelectProps<Values extends
|
|
4
|
+
import { FileSelectProps } from "../..";
|
|
5
|
+
interface ImageSelectProps<Values extends object> extends Omit<FileSelectProps, 'onFileSelect'> {
|
|
7
6
|
imageType: ImageType;
|
|
8
7
|
fieldName: keyof Values & string;
|
|
9
8
|
application: string;
|
|
@@ -11,5 +10,5 @@ interface ImageSelectProps<Values extends HashObject> extends Omit<FileSelectPro
|
|
|
11
10
|
label?: string;
|
|
12
11
|
setSelectedImage?: (image: Image) => void;
|
|
13
12
|
}
|
|
14
|
-
export declare function ImageSelect<Values extends
|
|
13
|
+
export declare function ImageSelect<Values extends object>(props: ImageSelectProps<Values>): React.ReactElement;
|
|
15
14
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface ImageCropperProps {
|
|
3
|
+
dataUrl: string;
|
|
4
|
+
minHeight: number;
|
|
5
|
+
minWidth: number;
|
|
6
|
+
onCrop: (dataUrl: string) => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function ImageCropper(props: ImageCropperProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageCropper';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
declare type ObjectWithRating<T extends
|
|
2
|
+
import { Rating } from "../../../../../../libs/shared/src/interfaces";
|
|
3
|
+
import { UpdateObjectRating } from "../../interfaces";
|
|
4
|
+
declare type ObjectWithRating<T extends object> = T & {
|
|
5
5
|
rating: UpdateObjectRating;
|
|
6
6
|
};
|
|
7
7
|
interface RatingSelectProps {
|
|
8
8
|
ratings: Rating[];
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare function RatingSelect<T extends ObjectWithRating<
|
|
11
|
+
export declare function RatingSelect<T extends ObjectWithRating<{}>>(props: RatingSelectProps): JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Image } from "../../../../../libs/shared/src/interfaces";
|
|
3
|
+
/**
|
|
4
|
+
* This context is used for transferring image
|
|
5
|
+
* data between different areas of the application.
|
|
6
|
+
*
|
|
7
|
+
* It stores base64 image files that have been read
|
|
8
|
+
* in from ImageSelect component for the purpose of
|
|
9
|
+
* being cropped and uploaded in ImageUploadView.
|
|
10
|
+
*
|
|
11
|
+
* Image objects uploaded in ImageUploadView can then be
|
|
12
|
+
* stored in the context for use in the component
|
|
13
|
+
* that initially requested the upload.
|
|
14
|
+
*/
|
|
15
|
+
interface IImageStorageContext {
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve the stored base64 dataUrl. This will
|
|
18
|
+
* reset the stored value after it is read.
|
|
19
|
+
*/
|
|
20
|
+
getDataUrl: () => string;
|
|
21
|
+
/**
|
|
22
|
+
* Set the stored dataUrl.
|
|
23
|
+
*/
|
|
24
|
+
setDataUrl: (dataUrl: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve the stored image object. This will
|
|
27
|
+
* reset the stored image object.
|
|
28
|
+
*/
|
|
29
|
+
getImage: () => Image;
|
|
30
|
+
/**
|
|
31
|
+
* Store an image after it has been successfully
|
|
32
|
+
* uploaded.
|
|
33
|
+
*/
|
|
34
|
+
setImage: (image: Image) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Flag to notify anything using this context
|
|
37
|
+
* that an image has been uploaded.
|
|
38
|
+
*/
|
|
39
|
+
imageUploaded: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const ImageStorageContext: React.Context<IImageStorageContext>;
|
|
42
|
+
export declare const ImageStorageContextProvider: ({ children }: {
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
}) => JSX.Element;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageStorageContext';
|
|
@@ -3,7 +3,7 @@ import { ObjectHash } from 'backbone';
|
|
|
3
3
|
import { Core } from "../../../../../../libs/common/src/backbone";
|
|
4
4
|
import { ReactLayoutView, ReactLayoutViewOptions } from "../../../../../../libs/common/src/react/core/ReactLayoutView";
|
|
5
5
|
export interface CuratorLayoutViewOptions extends ReactLayoutViewOptions {
|
|
6
|
-
provider?: (props: React.PropsWithChildren<
|
|
6
|
+
provider?: (props: React.PropsWithChildren<{}>) => React.ReactElement;
|
|
7
7
|
getTopNavView?: (currentAppLink: Core.AppLink) => React.ReactElement;
|
|
8
8
|
}
|
|
9
9
|
export declare abstract class CuratorLayoutView extends ReactLayoutView {
|
|
@@ -11,7 +11,7 @@ export interface LayoutComponentProps {
|
|
|
11
11
|
alert?: LayoutItem;
|
|
12
12
|
}
|
|
13
13
|
interface WithProviderProps extends LayoutComponentProps {
|
|
14
|
-
provider?: (props: React.PropsWithChildren<
|
|
14
|
+
provider?: (props: React.PropsWithChildren<{}>) => React.ReactElement;
|
|
15
15
|
}
|
|
16
16
|
declare const LayoutComponentWithProvider: (props: WithProviderProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
17
17
|
export { LayoutComponentWithProvider as LayoutComponent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseDataService } from "../../../../../libs/common/src/backbone/services/BaseDataService";
|
|
2
|
+
import { ImageType } from "../../../../../libs/shared/src/enums/Images";
|
|
3
|
+
import { Image } from "../../../../../libs/shared/src/interfaces";
|
|
4
|
+
export declare class ImageUploadDataService extends BaseDataService {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get channelName(): string;
|
|
7
|
+
uploadBase64Image(dataUrl: string, type: ImageType, callback?: (data: Image) => void, errorCallback?: () => void): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ImageType } from "../../../../../libs/shared/src/enums/Images";
|
|
2
|
+
export declare const ImageSelectHelper: {
|
|
3
|
+
onFileSelect(imageType: ImageType, files: FileList, onImageLoad: (image: HTMLImageElement) => void): void;
|
|
4
|
+
onReaderLoad(reader: FileReader, imageType: ImageType, onImageLoad: (image: HTMLImageElement) => void): void;
|
|
5
|
+
isImageValid(imageType: ImageType, image: HTMLImageElement): boolean;
|
|
6
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PopupViewProps } from "../../../../../../libs/shared/src/interfaces";
|
|
3
|
+
import { ImageType } from "../../../../../../libs/shared/src/enums/Images";
|
|
4
|
+
interface ImageUploadViewProps {
|
|
5
|
+
imageType: ImageType;
|
|
6
|
+
}
|
|
7
|
+
export declare function ImageUploadView({ imageType, closePopup }: ImageUploadViewProps & PopupViewProps): React.ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageUploadView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './image-upload';
|