react-covideo-embed 1.0.78 → 1.0.80

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 (31) hide show
  1. package/build/app/pages/login/PasswordForm.d.ts +7 -0
  2. package/build/app/pages/login/SSOVerifying.d.ts +6 -0
  3. package/build/app/pages/login/UsernameForm.d.ts +6 -0
  4. package/build/app/pages/login/styles.d.ts +16 -0
  5. package/build/app/pages/login/types.d.ts +3 -0
  6. package/build/app/pages/login/utils.d.ts +1 -0
  7. package/build/app/pages/noAccess/NoAccess.d.ts +5 -0
  8. package/build/app/pages/recordv1/detailsPreview/types.d.ts +2 -4
  9. package/build/app/pages/recordv1/useVideoRecorderUpload.d.ts +4 -0
  10. package/build/index.js +99 -93
  11. package/build/index.js.LICENSE.txt +12 -2
  12. package/build/lib/api/auth/useCheckUsernameMutation.d.ts +10 -0
  13. package/build/lib/api/auth/useLoginMutation.d.ts +11 -0
  14. package/build/lib/api/videos/useVideoQuery.d.ts +2 -0
  15. package/build/lib/api/vinReel/useCopyVINReelMutation.d.ts +1 -1
  16. package/build/lib/api/vinReel/useGetVINReelsQuery.d.ts +1 -0
  17. package/build/lib/components/formik/FormikInputField.d.ts +1 -0
  18. package/build/lib/const/AccessRole.d.ts +5 -0
  19. package/build/lib/const/Folder.d.ts +5 -0
  20. package/build/lib/hooks/GTM/actions/video/saveNewVideoInteraction.d.ts +1 -1
  21. package/build/lib/hooks/GTM/actions/video/types.d.ts +2 -0
  22. package/build/lib/hooks/GTM/actions/video/utils.d.ts +86 -0
  23. package/build/lib/hooks/GTM/actions/videoPlayer/index.d.ts +1 -0
  24. package/build/lib/hooks/GTM/actions/videoPlayer/interaction.d.ts +4 -0
  25. package/build/lib/hooks/GTM/actions/videoPlayer/types.d.ts +5 -0
  26. package/build/lib/hooks/GTM/types.d.ts +2 -1
  27. package/build/lib/hooks/GTM/useGTMAnalytics.d.ts +11 -9
  28. package/build/lib/utils/automotiveRolePermissionChecks.d.ts +0 -1
  29. package/package.json +2 -2
  30. package/styled.d.ts +1 -1
  31. package/build/app/pages/login/SSOLogin.d.ts +0 -5
@@ -613,9 +613,19 @@ and limitations under the License.
613
613
 
614
614
  /**
615
615
  * @license React
616
- * react-is.production.min.js
616
+ * react-is.production.js
617
617
  *
618
- * Copyright (c) Facebook, Inc. and its affiliates.
618
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
619
+ *
620
+ * This source code is licensed under the MIT license found in the
621
+ * LICENSE file in the root directory of this source tree.
622
+ */
623
+
624
+ /**
625
+ * @license React
626
+ * use-sync-external-store-shim.production.js
627
+ *
628
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
619
629
  *
620
630
  * This source code is licensed under the MIT license found in the
621
631
  * LICENSE file in the root directory of this source tree.
@@ -0,0 +1,10 @@
1
+ import type { AxiosError } from 'axios';
2
+ interface ICheckUsernameParams {
3
+ username: string;
4
+ }
5
+ interface ICheckUsernameResponse {
6
+ userExist: boolean;
7
+ ssoLoginUrl: string | undefined;
8
+ }
9
+ export declare const useCheckUsernameMutation: () => import("react-query").UseMutationResult<ICheckUsernameResponse, AxiosError<any>, ICheckUsernameParams, unknown>;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import { AxiosError } from 'axios';
2
+ interface ILoginParams {
3
+ username: string;
4
+ password: string;
5
+ }
6
+ interface ILoginResponse {
7
+ accessToken: string;
8
+ refreshToken: string;
9
+ }
10
+ export declare const useLoginMutation: () => import("react-query").UseMutationResult<ILoginResponse, AxiosError<any>, ILoginParams, unknown>;
11
+ export {};
@@ -1,3 +1,4 @@
1
+ import { InventoryItem } from 'react-covideo-ai-assist/dist/ai-assist/types';
1
2
  export interface IVideoItemResponse {
2
3
  id: number;
3
4
  flvName: string;
@@ -44,6 +45,7 @@ export interface VideoRequest {
44
45
  emailStatus: string;
45
46
  createdAt: Date;
46
47
  deletedAt: null;
48
+ inventoryItem: InventoryItem;
47
49
  }
48
50
  export declare const getVideo: (videoId: string) => Promise<IVideoItemResponse>;
49
51
  export declare const useVideoQuery: (videoId: string) => import("react-query").UseQueryResult<IVideoItemResponse, unknown>;
@@ -1,5 +1,5 @@
1
1
  interface CopyVINReelData {
2
- vin: string;
2
+ itemId: number;
3
3
  videoTitle: string;
4
4
  }
5
5
  export declare const useCopyVINReelMutation: ({ onSuccessCallback, }: {
@@ -6,6 +6,7 @@ export declare enum VINReelStatus {
6
6
  PENDING = "pending"
7
7
  }
8
8
  export interface VINReel {
9
+ itemId: number;
9
10
  vin: string;
10
11
  customerId: number;
11
12
  dealerId: number;
@@ -1,5 +1,6 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { FlexProps } from '../styles/layout';
3
+ export declare const TextInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
3
4
  interface CustomInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
5
  name: string;
5
6
  label?: string;
@@ -0,0 +1,5 @@
1
+ export declare enum AccessRole {
2
+ USER = "1",
3
+ ADMIN = "3",
4
+ SUPERVISOR = "4"
5
+ }
@@ -4,6 +4,11 @@ export declare const DEFAULT_FOLDER_NAMES: {
4
4
  PRIMARY: string;
5
5
  PRIVATE: string;
6
6
  VAULT: string;
7
+ VIDEO_REPLIES: string;
8
+ VEHICLE_WALKAROUNDS: string;
9
+ APPOINTMENT_REMINDERS: string;
10
+ INTRODUCTIONS: string;
11
+ POST_SALE_THANK_YOU: string;
7
12
  };
8
13
  export declare const COMPANY_FOLDER_ID = -1;
9
14
  export declare const SHARED_FOLDER_PREFIX = "~~shared~~";
@@ -1,2 +1,2 @@
1
1
  import { GTMSaveNewVideoInteractionEventArguments } from './types';
2
- export declare function saveNewVideoInteractionEvent({ videoAttributes, type, vehicleData, mergedIds, }: GTMSaveNewVideoInteractionEventArguments): void;
2
+ export declare function saveNewVideoInteractionEvent({ videoAttributes, type, vehicleData, mergedIds, changedFieldKeys, changes, }: GTMSaveNewVideoInteractionEventArguments): void;
@@ -35,6 +35,8 @@ export interface GTMSaveNewVideoInteractionEventArguments {
35
35
  type: GTMSaveNewVideoInteractionTypes;
36
36
  vehicleData?: GTMVehicleAttributes;
37
37
  mergedIds?: number[];
38
+ changedFieldKeys?: string[];
39
+ changes?: Record<string, any>;
38
40
  }
39
41
  export type VideoAttributeInteractionInteractionEventArgs = {
40
42
  videoAttributes: CovideoGTMVideoAttributes;
@@ -1,3 +1,89 @@
1
1
  import { CovideoGTMVideoMessageProperties, GTMVideoMessageProperties } from './types';
2
2
  export declare function mapToGtmVideoMessageProperties(item?: CovideoGTMVideoMessageProperties): GTMVideoMessageProperties;
3
3
  export declare function getVideoDurationMs(file: File, timeoutMs?: number): Promise<number>;
4
+ interface GetChangedFieldsOptions {
5
+ initialValues: Record<string, any>;
6
+ currentValues: Record<string, any>;
7
+ trackedFields?: string[];
8
+ trackedArrayFields?: Record<string, string[]>;
9
+ onlyChangedList?: boolean;
10
+ }
11
+ /**
12
+ * BEFORE MAKING ANY CHANGES:
13
+ * PLEASE READ THIS COMMENT AND THE TESTS IN `test-getChangedFields.ts` TO UNDERSTAND HOW THIS FUNCTION WORKS.
14
+ *
15
+ * Compares `initialValues` vs `currentValues` and returns which tracked fields changed.
16
+ *
17
+ * The function works in two steps:
18
+ * 1) `flattenObject(...)` flattens the input objects into a `{ [path]: string }` map,
19
+ * but **only for paths you explicitly track** via `trackedFields` / `trackedArrayFields`.
20
+ * 2) `getChangedFields(...)` diffs the two flattened maps and returns:
21
+ * - `changed_fields`: list of changed field paths
22
+ * - optionally (`onlyChangedList: false`) `<path>_before` and `<path>_after` values
23
+ *
24
+ * @param initialValues - baseline object (e.g. values on load)
25
+ * @param currentValues - current object (e.g. values after user edits)
26
+ * @param trackedFields - list of field paths to track (supports dot paths)
27
+ * - Simple field: `"title"`
28
+ * - Nested field: `"company.name"` (tracks only that nested path)
29
+ * @param trackedArrayFields - map of array field name -> list of item subfields to track
30
+ * - Example: `{ links: ["linkText", "itemType"] }` tracks `links.<index>.linkText`, etc.
31
+ * - Note: this is intended for arrays of objects at the root key (or within that root branch)
32
+ * @param onlyChangedList - when true, return only `changed_fields`
33
+ *
34
+ * @returns An object containing:
35
+ * - `changed_fields: string[]`
36
+ * - and when `onlyChangedList` is false:
37
+ * - `<path>_before: string`
38
+ * - `<path>_after: string`
39
+ *
40
+ * @example
41
+ * // 1) Simple key/value pairs
42
+ * const res = getChangedFields({
43
+ * initialValues: { title: "A", company: "X", ignored: 123 },
44
+ * currentValues: { title: "B", company: "X", ignored: 999 },
45
+ * trackedFields: ["title", "company"],
46
+ * onlyChangedList: false,
47
+ * });
48
+ *
49
+ * // res.changed_fields -> ["title"]
50
+ * // res.title_before -> "A"
51
+ * // res.title_after -> "B"
52
+ *
53
+ * @example
54
+ * // 2) Nested object fields (dot paths)
55
+ * // Track specific nested properties with `trackedFields`:
56
+ * const res = getChangedFields({
57
+ * initialValues: {
58
+ * videoSource: { label: "OBS Virtual Camera", value: "abc" },
59
+ * },
60
+ * currentValues: {
61
+ * videoSource: { label: "FaceTime HD Camera", value: "def" },
62
+ * },
63
+ * trackedFields: ["videoSource.label"],
64
+ * onlyChangedList: true,
65
+ * });
66
+ *
67
+ * // res.changed_fields -> ["videoSource.label"]
68
+ *
69
+ * @example
70
+ * // 3) Array of objects
71
+ * // Track specific subfields on each array item using `trackedArrayFields`.
72
+ * const res = getChangedFields({
73
+ * initialValues,
74
+ * currentValues: data,
75
+ * trackedFields: ["title", "company"],
76
+ * trackedArrayFields: {
77
+ * links: ["linkText", "itemType", "fileThumbnail", "newWindow"],
78
+ * },
79
+ * onlyChangedList: false,
80
+ * });
81
+ *
82
+ * // If `links` changes, paths look like:
83
+ * // "links.0.linkText", "links.2.newWindow", ...
84
+ * // and you get before/after fields for each changed path.
85
+ */
86
+ export declare function getChangedFields({ initialValues, currentValues, trackedFields, trackedArrayFields, onlyChangedList, }: GetChangedFieldsOptions): {
87
+ changed_fields: string[];
88
+ };
89
+ export {};
@@ -0,0 +1 @@
1
+ export * from './interaction';
@@ -0,0 +1,4 @@
1
+ import { VideoPlayerInteraction } from './types';
2
+ export declare function videoPlayerInteractionsEvent({ action, }: {
3
+ action: VideoPlayerInteraction;
4
+ }): void;
@@ -0,0 +1,5 @@
1
+ export declare enum VideoPlayerInteraction {
2
+ PLAY = "Play",
3
+ PAUSE = "Pause",
4
+ COMPLETE = "Complete"
5
+ }
@@ -21,7 +21,8 @@ export declare enum GTMEventName {
21
21
  DISCARD_VIDEO = "Discard Video",
22
22
  RECENTLY_DELETED_INTERACTION = "Recently Deleted Interaction",
23
23
  NEW_LEAD_ADDED = "New Lead Added",
24
- CREATE_NEW_MEETING = "Create New Meeting"
24
+ CREATE_NEW_MEETING = "Create New Meeting",
25
+ VIDEO_PLAYER_INTERACTION = "Video Player Interaction"
25
26
  }
26
27
  export declare enum PageLocation {
27
28
  SEND_SHARE = "Send & Share",
@@ -1,28 +1,30 @@
1
+ import { CovideoGTMVehicleItem } from './types';
1
2
  import { GTMSaveNewVideoInteractionEventArguments, GTMVideoInteractonEventArguments, GTMVideoMessageInteraction, VideoAttributeInteractionInteractionEventArgs } from './actions/video/types';
2
3
  import { selectRecordingTypeEvent, recordingToolIntearctionEvent, stopRecordingEvent, startRecordingEvent, addVideoAttributeEvent, discardVideoEvent } from './actions/recording';
4
+ import { videoPlayerInteractionsEvent } from './actions/videoPlayer';
3
5
  type TrackVideoInteractionArgs = {
4
- vin?: string;
6
+ vehicle?: CovideoGTMVehicleItem;
5
7
  } & Omit<GTMVideoInteractonEventArguments, 'vehicleData'>;
6
8
  type TrackSaveNewVideoArgs = {
7
- vin?: string;
9
+ vehicle?: CovideoGTMVehicleItem;
8
10
  } & Omit<GTMSaveNewVideoInteractionEventArguments, 'vehicleData'>;
9
11
  type TrackVideoAttributeInteractionArgs = VideoAttributeInteractionInteractionEventArgs & {
10
- vin?: string;
12
+ vehicle?: CovideoGTMVehicleItem;
11
13
  };
12
14
  type TrackGTMVideoMessageInteractionEvent = GTMVideoMessageInteraction & {
13
- vin?: string;
15
+ vehicle?: CovideoGTMVehicleItem;
14
16
  };
15
17
  export declare function useGTMAnalytics(): {
16
- trackGTMVideoInteractionEvent: (({ vin, ...rest }: TrackVideoInteractionArgs) => Promise<void>) | undefined;
17
- trackGTMVideoMessageInteractionEvent: (({ vin, ...rest }: TrackGTMVideoMessageInteractionEvent) => Promise<void>) | undefined;
18
- trackGTMSaveNewVideoInteractionEvent: (({ vin, ...rest }: TrackSaveNewVideoArgs) => Promise<void>) | undefined;
19
- trackGTMVideoAttributeInteractionInteractionEvent: (({ vin, videoAttributes }: TrackVideoAttributeInteractionArgs) => Promise<void>) | undefined;
18
+ trackGTMVideoInteractionEvent: (({ vehicle, ...rest }: TrackVideoInteractionArgs) => Promise<void>) | undefined;
19
+ trackGTMVideoMessageInteractionEvent: (({ vehicle, ...rest }: TrackGTMVideoMessageInteractionEvent) => Promise<void>) | undefined;
20
+ trackGTMSaveNewVideoInteractionEvent: (({ vehicle, ...rest }: TrackSaveNewVideoArgs) => Promise<void>) | undefined;
21
+ trackGTMVideoAttributeInteractionInteractionEvent: (({ vehicle, videoAttributes, }: TrackVideoAttributeInteractionArgs) => Promise<void>) | undefined;
20
22
  trackGTMRecordingToolIntearctionEvent: typeof recordingToolIntearctionEvent | undefined;
21
23
  trackGTMSelectRecordingTypeEvent: typeof selectRecordingTypeEvent | undefined;
22
24
  trackGTMStopRecordingEvent: typeof stopRecordingEvent | undefined;
23
25
  trackGTMStartRecordingEvent: typeof startRecordingEvent | undefined;
24
26
  trackGTMAddVideoAttributeEvent: typeof addVideoAttributeEvent | undefined;
25
27
  trackGTMDiscardVideoEvent: typeof discardVideoEvent | undefined;
26
- isFetchingVin: boolean;
28
+ trackVideoPlayerInteractionsEvent: typeof videoPlayerInteractionsEvent | undefined;
27
29
  };
28
30
  export {};
@@ -1,5 +1,4 @@
1
1
  import { UserData } from 'lib/context';
2
- export declare const checkIsIMSEnabled: (userData: UserData) => boolean;
3
2
  export declare const checkIfAutomotive: (userData: UserData) => boolean;
4
3
  export declare const checkIfAutomotiveServiceRole: (userData: UserData) => boolean;
5
4
  export declare const checkIfAutomotiveSalesRole: (userData: UserData) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-covideo-embed",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "private": false,
5
5
  "description": "Covideo platform as an embeddable React component.",
6
6
  "main": "./build/index.js",
@@ -78,7 +78,7 @@
78
78
  "rc-progress": "^3.4.1",
79
79
  "react-beautiful-dnd": "^13.1.1",
80
80
  "react-compound-slider": "^3.4.0",
81
- "react-covideo-ai-assist": "0.0.33",
81
+ "react-covideo-ai-assist": "0.0.41",
82
82
  "react-covideo-common": "0.1.71",
83
83
  "react-dropzone": "11.3.2",
84
84
  "react-full-screen": "^1.1.1",
package/styled.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import 'styled-components/macro';
1
+ import 'styled-components';
2
2
  //types
3
3
 
4
4
  type AvailableColorsType =
@@ -1,5 +0,0 @@
1
- type Props = {
2
- handleUpdateToken: Function;
3
- };
4
- export declare const SSOLogin: ({ handleUpdateToken }: Props) => JSX.Element;
5
- export {};