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
@@ -1,4 +1,4 @@
1
- export type GetQuickshareParams = {
1
+ type GetQuickshareParams = {
2
2
  videoId: number | string;
3
3
  linksetId?: number | string;
4
4
  templateId?: number | string;
@@ -15,3 +15,4 @@ export type GetQuickshareParams = {
15
15
  reuseShortUrl?: boolean;
16
16
  };
17
17
  export declare const getQuickshareDetails: (videoId: string | number, params?: Omit<GetQuickshareParams, 'videoId'>) => Promise<any>;
18
+ export {};
@@ -1,4 +1,4 @@
1
- export type TagParams = {
1
+ type TagParams = {
2
2
  page?: number;
3
3
  size?: number;
4
4
  search?: string;
@@ -10,3 +10,4 @@ export declare const getTags: ({ page, size, search, all, sort, refresh, }: TagP
10
10
  export declare const putVideoTags: (videoId: string, data: object[]) => Promise<{
11
11
  videoTags: any;
12
12
  }>;
13
+ export {};
@@ -1,10 +1,5 @@
1
1
  import React from 'react';
2
- export interface IFileInfo {
3
- name: string;
4
- size: number;
5
- type: string;
6
- }
7
- export interface DragAndDropProps {
2
+ interface Props {
8
3
  accept?: string;
9
4
  cssInputClass?: string;
10
5
  fileEncoding?: string;
@@ -22,5 +17,5 @@ export interface DragAndDropProps {
22
17
  buttonBorder?: string;
23
18
  placeholder?: string;
24
19
  }
25
- declare const DragAndDrop: ({ accept, inputStyle, onDrop, text, width, height, marginTop, disabled, textStyle, backgroundColor, placeholder, }: DragAndDropProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const DragAndDrop: ({ accept, inputStyle, onDrop, text, width, height, marginTop, disabled, textStyle, backgroundColor, placeholder, }: Props) => import("react/jsx-runtime").JSX.Element;
26
21
  export default DragAndDrop;
@@ -10,7 +10,6 @@ export { CheckboxInput } from './CheckboxInput';
10
10
  export { RadioInput } from './inputs/RadioInput';
11
11
  export { Modal } from './modal/Modal';
12
12
  export { CloseButton } from './CloseButton';
13
- export { CountDown } from './CountDown';
14
13
  export { ModalRecordingSettings } from './modal/ModalRecordingSettings';
15
14
  export { ToastNotificationsProvider, useToastNotifications, } from './toast-notifications';
16
15
  export { MainWrapper } from './MainWrapper';
@@ -1,9 +1,3 @@
1
- export declare enum View {
2
- FORM = 0,
3
- UPLOADING = 1,
4
- CREATE = 2,
5
- ENCODE = 3
6
- }
7
1
  export interface IUploadingData {
8
2
  [key: string]: any;
9
3
  }
@@ -1,11 +1,6 @@
1
1
  export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export declare const ContentBody: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const ContentFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- type InputLabelProps = {
5
- isAddMoreEnabled?: boolean;
6
- disabled?: boolean;
7
- };
8
- export declare const InputLabel: import("styled-components").StyledComponent<"label", any, InputLabelProps, never>;
9
4
  export declare const UploadFieldContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
10
5
  export declare const FlexContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
11
6
  export declare const Skill: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -14,4 +9,3 @@ export declare const ProgressContainer: import("styled-components").StyledCompon
14
9
  export declare const UploadData: import("styled-components").StyledComponent<"div", any, {}, never>;
15
10
  export declare const UploadingHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
16
11
  export declare const CancelContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
17
- export {};
@@ -9,8 +9,10 @@ export declare let token: any;
9
9
  export declare let apiExpress: string;
10
10
  export declare const updateToken: (tokenNew: string, hasExternalJwt?: boolean) => void;
11
11
  export declare const updateEnv: (env: ENVIRONMENT) => void;
12
+ export declare const updateApiKey: (key: string | undefined) => void;
12
13
  export declare let options: {
13
14
  bearerToken: {
15
+ ApiKey?: string | undefined;
14
16
  Authorization: string;
15
17
  };
16
18
  headers: {
@@ -19,11 +21,10 @@ export declare let options: {
19
21
  };
20
22
  export declare const getUpdatedHeader: () => {
21
23
  bearerToken: {
24
+ ApiKey?: string | undefined;
22
25
  Authorization: string;
23
26
  };
24
27
  headers: {
25
28
  Authorization: any;
26
29
  };
27
30
  };
28
- export declare const apiOrigin = "https://www.covideo.com/api/v2.0";
29
- export declare const s3Origin = "https://eiy0talp86.execute-api.us-east-1.amazonaws.com/dev/";
@@ -6,7 +6,3 @@ export declare enum AutomotiveRole {
6
6
  SALESPERSON = "4",
7
7
  SALES_MANAGER = "5"
8
8
  }
9
- export declare const automotiveRoleOptions: {
10
- value: string;
11
- label: string;
12
- }[];
@@ -1,5 +1,4 @@
1
1
  export { VideoStatus } from './VideoStatus';
2
- export { AutomotiveRole, automotiveRoleOptions } from './AutomotiveRole';
3
2
  export { VideoEmailStatus } from './VideoEmailStatus';
4
3
  export { VideoTypeSales } from './VideoType';
5
4
  export { VideoType } from './VideoType';
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const ActionDispatchContext: import("react").Context<any>;
3
3
  export declare const ActionDispatchProvider: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
4
- export declare const ActionDispatchConsumer: import("react").Consumer<any>;
5
4
  export declare const useActionDispatchContextState: () => any;
@@ -12,6 +12,13 @@ interface ConfigurationProviderProps {
12
12
  onVideoInsertError?: (error: unknown) => void;
13
13
  children?: ReactNode;
14
14
  hideFeatures?: string[];
15
+ apikey?: string;
16
+ onRecordButtonClick?: (data: {
17
+ token: string;
18
+ }) => void;
19
+ onUploadButtonClick?: (data: {
20
+ token: string;
21
+ }) => void;
15
22
  }
16
23
  type ShowFeature = {
17
24
  showInsertFeature: boolean;
@@ -1,3 +1,2 @@
1
1
  import { VideoData as VideoDataType } from './useVideoStore';
2
- export { useMediaRecorder } from './useMediaRecorder';
3
2
  export type VideoData = VideoDataType;
@@ -1,4 +1,4 @@
1
- export interface MarkAsSentResponse {
1
+ interface MarkAsSentResponse {
2
2
  key: string;
3
3
  url: string;
4
4
  html: string;
@@ -6,7 +6,7 @@ export interface MarkAsSentResponse {
6
6
  legacyHtml: string;
7
7
  shortUrlCode: string;
8
8
  }
9
- export type QuickShareTypes = 'html_code' | 'url' | 'crm_code' | 'quickshare' | 'insert' | '';
9
+ type QuickShareTypes = 'html_code' | 'url' | 'crm_code' | 'quickshare' | 'insert' | '';
10
10
  export interface IQuickShareMarkAsSentParams {
11
11
  videoId: number | string;
12
12
  linksetId?: number | string;
@@ -25,3 +25,4 @@ export interface IQuickShareMarkAsSentParams {
25
25
  reuseShortUrl?: boolean;
26
26
  }
27
27
  export declare const useQuickShareMarkAsSentMutation: (onSuccessCallback: () => void) => import("react-query").UseMutationResult<MarkAsSentResponse, unknown, IQuickShareMarkAsSentParams, unknown>;
28
+ export {};
@@ -1,4 +1,4 @@
1
- export interface VideoData {
1
+ interface VideoData {
2
2
  title: string;
3
3
  filename: string;
4
4
  id?: number | string;
@@ -1,4 +1,4 @@
1
- export interface EncodeData {
1
+ interface EncodeData {
2
2
  videoId: string;
3
3
  customerId: string;
4
4
  }
@@ -1,8 +1,7 @@
1
- import { ReactElement } from 'react';
2
1
  export declare const MIME_TYPE = "video/webm;codecs=vp8,opus";
3
2
  export declare const CONTENT_TYPE = "video/webm";
4
3
  export declare const FILE_EXTENSION = "webm";
5
- export type ReactMediaRecorderRenderProps = {
4
+ type ReactMediaRecorderRenderProps = {
6
5
  error: string;
7
6
  muteAudio: () => void;
8
7
  unMuteAudio: () => void;
@@ -18,7 +17,7 @@ export type ReactMediaRecorderRenderProps = {
18
17
  previewAudioStream: MediaStream | null;
19
18
  clearBlobUrl: () => void;
20
19
  };
21
- export type ReactMediaRecorderHookProps = {
20
+ type ReactMediaRecorderHookProps = {
22
21
  audio?: boolean | MediaTrackConstraints;
23
22
  video?: boolean | MediaTrackConstraints;
24
23
  screen?: boolean;
@@ -28,19 +27,6 @@ export type ReactMediaRecorderHookProps = {
28
27
  mimeType?: string;
29
28
  quality?: string;
30
29
  };
31
- export type ReactMediaRecorderProps = ReactMediaRecorderHookProps & {
32
- render: (props: ReactMediaRecorderRenderProps) => ReactElement;
33
- };
34
- export type StatusMessages = 'media_aborted' | 'permission_denied' | 'no_specified_media_found' | 'media_in_use' | 'invalid_media_constraints' | 'no_constraints' | 'recorder_error' | 'idle' | 'acquiring_media' | 'delayed_start' | 'recording' | 'stopping' | 'stopped';
35
- export declare enum RecorderErrors {
36
- AbortError = "media_aborted",
37
- NotAllowedError = "permission_denied",
38
- NotFoundError = "no_specified_media_found",
39
- NotReadableError = "media_in_use",
40
- OverconstrainedError = "invalid_media_constraints",
41
- TypeError = "no_constraints",
42
- NONE = "",
43
- NO_RECORDER = "recorder_error"
44
- }
30
+ type StatusMessages = 'media_aborted' | 'permission_denied' | 'no_specified_media_found' | 'media_in_use' | 'invalid_media_constraints' | 'no_constraints' | 'recorder_error' | 'idle' | 'acquiring_media' | 'delayed_start' | 'recording' | 'stopping' | 'stopped';
45
31
  export declare function useMediaRecorder({ audio, video, onStop, blobPropertyBag, screen, mediaRecorderOptions, mimeType, quality, }: ReactMediaRecorderHookProps): ReactMediaRecorderRenderProps;
46
- export declare const ReactMediaRecorder: (props: ReactMediaRecorderProps) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
32
+ export {};
@@ -1,19 +1,16 @@
1
- import { AxiosRequestConfig, AxiosResponse, Method } from 'axios';
2
- export interface ExpandedAxiosResponse extends AxiosResponse<any> {
3
- success?: boolean;
4
- }
5
- export type UseQueryProps = {
1
+ import { AxiosRequestConfig, Method } from 'axios';
2
+ type UseQueryProps = {
6
3
  method?: Method;
7
4
  params?: {};
8
5
  pathname?: string;
9
- origin?: string;
10
6
  autoFetch?: boolean;
11
7
  showToastMessage?: boolean;
12
8
  };
13
- export declare const useQueryFetch: ({ method, pathname, origin, params, autoFetch, showToastMessage, }: UseQueryProps) => {
9
+ export declare const useQueryFetch: ({ method, pathname, params, autoFetch, showToastMessage, }: UseQueryProps) => {
14
10
  data: any;
15
11
  loading: boolean;
16
12
  error: boolean | null;
17
13
  fetchData: (requestConfig?: AxiosRequestConfig, id?: any) => Promise<void>;
18
14
  progress: number;
19
15
  };
16
+ export {};
@@ -1,4 +1,4 @@
1
- export type ActionType = {
1
+ type ActionType = {
2
2
  type: 'REQUEST';
3
3
  } | {
4
4
  type: 'SUCCESS';
@@ -1,4 +1,4 @@
1
- export interface UploadData {
1
+ interface UploadData {
2
2
  url: string;
3
3
  file: File;
4
4
  contentType?: string;
@@ -1,14 +1,8 @@
1
1
  import { UserData } from 'lib/context';
2
- export declare const hasCustomIMSLink: (userData: UserData) => boolean;
3
2
  export declare const checkIsIMSEnabled: (isAutomotiveSalesRole: boolean, userData: UserData) => boolean;
4
3
  export declare const checkIfAutomotive: (userData: UserData) => boolean;
5
4
  export declare const checkIfAutomotiveServiceRole: (userData: UserData) => boolean;
6
5
  export declare const checkIfAutomotiveSalesRole: (userData: UserData) => boolean;
7
- export declare const getAutomotiveRoleValueFromLabel: (automotiveRoleLabel: string) => string;
8
6
  export declare const checkIfVideoRequestFieldsRequired: (userData: UserData) => boolean;
9
- export declare const validateAutomotiveFields: (userData: UserData, data: any) => boolean;
10
7
  export declare const checkIfIMSEnabled: (userData: UserData) => boolean;
11
- export declare const checkIfVdpEnabled: (userData: UserData) => boolean;
12
- export declare const checkIfVdpAllowed: (userData: UserData) => boolean;
13
- export declare const getAutomotiveRoleAsString: (automotiveRole: number) => string;
14
8
  export declare const getMarkAsSentValue: (userData: UserData) => number;
@@ -16,6 +16,5 @@ export declare const checkIfVideoIsTrimmed: ({ trimStart, trimEnd, videoDuration
16
16
  export declare const isSafari: boolean;
17
17
  export declare const toMB: (KB: number) => string;
18
18
  export declare function capitalizeFirstLetter(string: string): string;
19
- export declare function extractUrls(str: string): [] | RegExpMatchArray;
20
19
  export declare function clearCookies(): void;
21
20
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-covideo-embed",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "private": false,
5
5
  "description": "Covideo platform as an embeddable React component.",
6
6
  "main": "./build/index.js",
@@ -55,7 +55,7 @@
55
55
  "rc-progress": "^3.4.1",
56
56
  "react-beautiful-dnd": "^13.1.1",
57
57
  "react-compound-slider": "^3.4.0",
58
- "react-covideo-ai-assist": "0.0.17",
58
+ "react-covideo-ai-assist": "0.0.19",
59
59
  "react-full-screen": "^1.1.1",
60
60
  "react-icons": "^4.7.1",
61
61
  "react-query": "^3.39.2",
@@ -1,18 +0,0 @@
1
- interface CheckboxI {
2
- id?: string;
3
- className?: string;
4
- boxSize?: 'sm' | 'lg' | null;
5
- onChange?: any;
6
- onClick?: any;
7
- checked?: boolean;
8
- disabled?: boolean;
9
- name?: string;
10
- blueCheck?: boolean;
11
- grayCheck?: boolean;
12
- checkGroupIndicator?: boolean;
13
- width?: string;
14
- ignoreGrayForAllSelect?: boolean;
15
- isAutomotive?: boolean;
16
- }
17
- export declare const CheckboxInput: (props: CheckboxI) => import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,2 +0,0 @@
1
- export { RadioInput } from './RadioInput';
2
- export { CheckboxInput } from './CheckboxInput';
@@ -1,15 +0,0 @@
1
- type Props = {
2
- open?: boolean;
3
- disabled?: boolean;
4
- title?: string;
5
- discardButtonText?: string;
6
- confirmButtonText?: string;
7
- text?: string;
8
- showDiscardIcon?: boolean;
9
- showSaveIcon?: boolean;
10
- onClickDiscardButton: () => void;
11
- onClickConfirmButton: () => void;
12
- handleModalClose?: () => void;
13
- };
14
- export declare const ModalLeave: ({ open, disabled, title, text, discardButtonText, confirmButtonText, onClickDiscardButton, onClickConfirmButton, showDiscardIcon, showSaveIcon, handleModalClose, }: Props) => import("react/jsx-runtime").JSX.Element | null;
15
- export {};
@@ -1,9 +0,0 @@
1
- export declare enum InternalCustomers {
2
- COVIDEO = "3",
3
- AUTOMOTIVE = "50303",
4
- DEV = "54188",
5
- INTERNAL = "57316",
6
- FREEMIUM_DEV = "58410",
7
- FREEMIUM_PRODUCT = "58371",
8
- AUTOMOTIVE_LEADS_DEV = "55174"
9
- }
@@ -1,15 +0,0 @@
1
- import { VideoListItem } from 'lib/api';
2
- import { VideoListAutomotiveItem, VideoRequest } from 'lib/context';
3
- import { IQuickShareMarkAsSentParams } from 'lib/hooks/query/markAsSent/useQuickShareMarkAsSentMutation';
4
- interface IProps {
5
- video: VideoListAutomotiveItem | VideoListItem | number | undefined;
6
- videoRequest?: VideoRequest;
7
- setShowModalQuickShareMarkAsSent: (showModalQuickShareMarkAsSent: boolean) => void;
8
- handleOnMarkAsSentSuccessCallback?: () => void;
9
- }
10
- export declare const useQuickShare: ({ video, videoRequest, setShowModalQuickShareMarkAsSent, handleOnMarkAsSentSuccessCallback, }: IProps) => {
11
- onQuickShareButtonClick: ({ videoActivityType, ...rest }: Omit<IQuickShareMarkAsSentParams, 'videoId'>) => void | Promise<import("lib/hooks/query/markAsSent/useQuickShareMarkAsSentMutation").MarkAsSentResponse>;
12
- isQuickshareLoading: boolean;
13
- onQuickShareMutationHandler: ({ markAsSentConfirmed, videoActivityType, ...rest }: Omit<IQuickShareMarkAsSentParams, 'videoId'>) => Promise<import("lib/hooks/query/markAsSent/useQuickShareMarkAsSentMutation").MarkAsSentResponse>;
14
- };
15
- export {};
@@ -1,2 +0,0 @@
1
- export default ArrowBackIcon;
2
- declare const ArrowBackIcon: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
@@ -1,2 +0,0 @@
1
- export default CutIcon;
2
- declare const CutIcon: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
@@ -1 +0,0 @@
1
- export function DropdownIcon(props: any): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export default InsertVideoIcon;
2
- declare const InsertVideoIcon: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
@@ -1,2 +0,0 @@
1
- export default MovieIcon;
2
- declare const MovieIcon: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
@@ -1,3 +0,0 @@
1
- export declare function isObject(item: any): any;
2
- export declare function mergeDeep(target: any, ...sources: any): object;
3
- export declare function anyInMap(arr: any[], map: Map<any, any>, id?: string): boolean;