react-covideo-embed 0.1.26 → 0.1.28

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 (42) hide show
  1. package/README.md +23 -0
  2. package/build/app/pages/insertVideo/InsertVideo.d.ts +0 -6
  3. package/build/app/pages/insertVideo/components/CopyVideoButton.d.ts +13 -0
  4. package/build/app/pages/insertVideo/components/InsertButton.d.ts +13 -0
  5. package/build/app/pages/library/Library.d.ts +0 -6
  6. package/build/app/pages/merge/components/VideoMerge.d.ts +0 -14
  7. package/build/app/pages/merge/components/VideoThumbnail.d.ts +0 -1
  8. package/build/index.d.ts +18 -0
  9. package/build/index.js +135 -135
  10. package/build/lib/api/quckshareApi.d.ts +2 -1
  11. package/build/lib/api/videoTagsApi.d.ts +2 -1
  12. package/build/lib/components/DragAndDrop.d.ts +2 -7
  13. package/build/lib/components/index.d.ts +0 -1
  14. package/build/lib/components/videoUpload/VideoUpload.d.ts +0 -6
  15. package/build/lib/components/videoUpload/styles.d.ts +0 -6
  16. package/build/lib/config.d.ts +3 -2
  17. package/build/lib/const/AutomotiveRole.d.ts +0 -4
  18. package/build/lib/const/index.d.ts +0 -1
  19. package/build/lib/context/ActionDispatchContext.d.ts +0 -1
  20. package/build/lib/context/ConfigurationContext.d.ts +7 -0
  21. package/build/lib/hooks/index.d.ts +0 -1
  22. package/build/lib/hooks/query/markAsSent/useQuickShareMarkAsSentMutation.d.ts +3 -2
  23. package/build/lib/hooks/useCreateVideo.d.ts +1 -1
  24. package/build/lib/hooks/useEncodeVideo.d.ts +1 -1
  25. package/build/lib/hooks/useMediaRecorder.d.ts +4 -18
  26. package/build/lib/hooks/useQueryFetch.d.ts +4 -7
  27. package/build/lib/hooks/useQueryState.d.ts +1 -1
  28. package/build/lib/hooks/useS3Upload.d.ts +1 -1
  29. package/build/lib/utils/automotiveRolePermissionChecks.d.ts +0 -6
  30. package/build/lib/utils/functions.d.ts +0 -1
  31. package/package.json +2 -2
  32. package/build/lib/components/inputs/CheckboxInput.d.ts +0 -18
  33. package/build/lib/components/inputs/index.d.ts +0 -2
  34. package/build/lib/components/modal/ModalLeave.d.ts +0 -15
  35. package/build/lib/const/InternalCustomers.d.ts +0 -9
  36. package/build/lib/hooks/useQuickShare.d.ts +0 -15
  37. package/build/lib/images/ArrowBackcon.d.ts +0 -2
  38. package/build/lib/images/CutIcon.d.ts +0 -2
  39. package/build/lib/images/DropdownIcon.d.ts +0 -1
  40. package/build/lib/images/InsertVideoIcon.d.ts +0 -2
  41. package/build/lib/images/MovieIcon.d.ts +0 -2
  42. package/build/lib/utils/object.d.ts +0 -3
package/README.md CHANGED
@@ -64,10 +64,27 @@ Explore the capabilities of react-covideo-embed through our [Demo Project](https
64
64
  - **Parameters**:
65
65
  - `error`: `unknown` - The error occurred during video insert.
66
66
 
67
+ ### `onRecordButtonClick` (optional)
68
+
69
+ - **Type**: function
70
+ - **Description**: Callback triggered when the record button is clicked.
71
+ - **Parameters**:
72
+ - `data`: Object containing the data for recording a video.
73
+ - `token`: `string` - The auth token.
74
+
75
+ ### `onUploadButtonClick` (optional)
76
+
77
+ - **Type**: function
78
+ - **Description**: Callback triggered when the upload button is clicked.
79
+ - **Parameters**:
80
+ - `data`: Object containing the data for uploading a video.
81
+ - `token`: `string` - The auth token.
82
+
67
83
  ### `hideFeatures` (optional)
68
84
 
69
85
  - **Type**: `Array<Feature>`
70
86
  - **Description**: Determines which Covideo features to hide. Acceptable values are as follows:
87
+
71
88
  - `insert`
72
89
  - `recordScreen`
73
90
  - `recordBoth`
@@ -82,6 +99,12 @@ Explore the capabilities of react-covideo-embed through our [Demo Project](https
82
99
  - `landingPage`
83
100
  - `CTA`
84
101
  - `reactions`
102
+ - `aiAssist`
103
+
104
+ ### `apikey` (optional)
105
+
106
+ - **Type**: `string`
107
+ - **Description**: Used for tracking the origin of requests from this npm module.
85
108
 
86
109
  ## APIs/Functions
87
110
 
@@ -2,12 +2,6 @@ export type Option = {
2
2
  value: string;
3
3
  label: string;
4
4
  };
5
- export type VideoShareLinkData = {
6
- url: string;
7
- html: string;
8
- thumbnail: string;
9
- key?: string;
10
- };
11
5
  export type VideoShareSetData = {
12
6
  videoId: string;
13
7
  templateId: number;
@@ -0,0 +1,13 @@
1
+ import { VideoListItem } from 'lib/api';
2
+ import { VideoListAutomotiveItem } from 'lib/context';
3
+ import { VideoShareSetData } from '../InsertVideo';
4
+ type Props = {
5
+ video: VideoListAutomotiveItem | VideoListItem;
6
+ disable: boolean;
7
+ getMarkAsSentPayload: () => Promise<{
8
+ videoShareSetData: VideoShareSetData;
9
+ useAutomotive: boolean;
10
+ }>;
11
+ };
12
+ export declare const CopyVideoButton: ({ video, getMarkAsSentPayload, disable, }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { VideoListItem } from 'lib/api';
2
+ import { VideoListAutomotiveItem } from 'lib/context';
3
+ import { VideoShareSetData } from '../InsertVideo';
4
+ type Props = {
5
+ video: VideoListAutomotiveItem | VideoListItem;
6
+ disable: boolean;
7
+ getMarkAsSentPayload: () => Promise<{
8
+ videoShareSetData: VideoShareSetData;
9
+ useAutomotive: boolean;
10
+ }>;
11
+ };
12
+ export declare const InsertButton: ({ video, getMarkAsSentPayload, disable, }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1,9 +1,3 @@
1
- export type VideoListFilter = {
2
- folderId: string | number;
3
- searchQuery: string;
4
- page: number;
5
- size: number;
6
- };
7
1
  type Props = {
8
2
  handleUpdateToken: Function;
9
3
  };
@@ -1,15 +1 @@
1
- export declare const CloseContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export type VideosProps = {
3
- id: string;
4
- start: string;
5
- end: string;
6
- startSec: number;
7
- endSec: number;
8
- flvName: string;
9
- duration: number;
10
- trimDuration: number;
11
- width: number;
12
- ref: any;
13
- source: string;
14
- };
15
1
  export declare const VideoMerge: ({ videos, setVideos }: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- export declare const DragContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
1
  export declare const VideoThumbnail: ({ video, setVideos, setVideoRef, index, }: any) => import("react/jsx-runtime").JSX.Element;
package/build/index.d.ts CHANGED
@@ -31,6 +31,12 @@ export type ShareData = {
31
31
  html: string;
32
32
  token: string;
33
33
  };
34
+ export type RecordData = {
35
+ token: string;
36
+ };
37
+ export type UploadData = {
38
+ token: string;
39
+ };
34
40
  /**
35
41
  * Logout from Covideo.
36
42
  * If called, removes the auth token and other Covideo data from local storage.
@@ -47,6 +53,8 @@ export type CovideoEmbedProps = {
47
53
  env?: Environment | EnvironmentType;
48
54
  /** Which Covideo features to hide */
49
55
  hideFeatures?: Feature[] | FeatureType[];
56
+ /** Used for tracking the origin of requests from this npm module. */
57
+ apikey?: string;
50
58
  /**
51
59
  * Callback triggered when a video is inserted.
52
60
  * @param shareData - Contains the auth token, video url, thumbnail url and HTML of the inserted video.
@@ -57,5 +65,15 @@ export type CovideoEmbedProps = {
57
65
  * @param error - The error occurred during video insert.
58
66
  */
59
67
  onVideoInsertError?: (error: unknown) => void;
68
+ /**
69
+ * Callback triggered when the record button is clicked.
70
+ * @param data - Contains the auth token.
71
+ */
72
+ onRecordButtonClick?: (data: RecordData) => void;
73
+ /**
74
+ * Callback triggered when the upload button is clicked.
75
+ * @param data - Contains the auth token.
76
+ */
77
+ onUploadButtonClick?: (data: UploadData) => void;
60
78
  };
61
79
  export declare const CovideoEmbed: React.FC<CovideoEmbedProps>;