react-covideo-embed 1.0.95 → 1.0.97

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 (149) hide show
  1. package/build/index.js +576 -576
  2. package/build/index.js.map +1 -1
  3. package/build/react-covideo-embed.esm.js +5257 -5092
  4. package/build/react-covideo-embed.esm.js.map +1 -1
  5. package/dist/app/App.d.ts +1 -1
  6. package/dist/app/pages/insertVideo/InsertVideo.d.ts +1 -1
  7. package/dist/app/pages/insertVideo/components/CopyVideoButton.d.ts +1 -1
  8. package/dist/app/pages/insertVideo/components/InsertButton.d.ts +1 -1
  9. package/dist/app/pages/insertVideo/components/InsertVideoSettings.d.ts +2 -2
  10. package/dist/app/pages/insertVideo/components/VehicleSearch.d.ts +1 -1
  11. package/dist/app/pages/lesaTV/LesaTV.d.ts +1 -1
  12. package/dist/app/pages/lesaTV/components/PageInfo.d.ts +1 -1
  13. package/dist/app/pages/lesaTV/components/Search.d.ts +1 -1
  14. package/dist/app/pages/library/Library.d.ts +1 -1
  15. package/dist/app/pages/library/components/NoVideos.d.ts +1 -1
  16. package/dist/app/pages/library/components/PageInfo.d.ts +1 -1
  17. package/dist/app/pages/library/components/Search.d.ts +1 -1
  18. package/dist/app/pages/library/components/UserDropdown.d.ts +1 -1
  19. package/dist/app/pages/library/components/VideoItem.d.ts +1 -1
  20. package/dist/app/pages/library/components/VideoItemThumbnail.d.ts +2 -1
  21. package/dist/app/pages/login/Login.d.ts +1 -1
  22. package/dist/app/pages/login/PasswordForm.d.ts +1 -1
  23. package/dist/app/pages/login/SSOVerifying.d.ts +1 -1
  24. package/dist/app/pages/login/UsernameForm.d.ts +1 -1
  25. package/dist/app/pages/merge/Merge.d.ts +2 -1
  26. package/dist/app/pages/merge/components/Player.d.ts +2 -1
  27. package/dist/app/pages/merge/components/VideoMerge.d.ts +1 -1
  28. package/dist/app/pages/merge/components/VideoRow.d.ts +2 -1
  29. package/dist/app/pages/merge/components/VideoThumbnail.d.ts +2 -1
  30. package/dist/app/pages/noAccess/NoAccess.d.ts +1 -1
  31. package/dist/app/pages/preview/PreviewVideoPlayer.d.ts +1 -1
  32. package/dist/app/pages/previewUpload/PreviewUpload.d.ts +1 -1
  33. package/dist/app/pages/quickVideos/QuickVideos.d.ts +1 -1
  34. package/dist/app/pages/quickVideos/card/QuickVideoCard.d.ts +1 -1
  35. package/dist/app/pages/quickVideos/card/components/QuickVideoCardBodySection.d.ts +1 -1
  36. package/dist/app/pages/quickVideos/card/components/QuickVideoCardFooterSection.d.ts +1 -1
  37. package/dist/app/pages/quickVideos/card/components/QuickVideoCardHeader.d.ts +1 -1
  38. package/dist/app/pages/quickVideos/form/Manager.d.ts +1 -1
  39. package/dist/app/pages/quickVideos/form/Page.d.ts +1 -1
  40. package/dist/app/pages/quickVideos/form/View.d.ts +1 -1
  41. package/dist/app/pages/quickVideos/modals/QuickVideoAddVideoModal.d.ts +1 -1
  42. package/dist/app/pages/quickVideos/modals/QuickVideoDetailsModal.d.ts +1 -1
  43. package/dist/app/pages/quickVideos/modals/components/QuickVideoAddVideoListItem.d.ts +1 -1
  44. package/dist/app/pages/quickVideos/modals/components/QuickVideoDetailsModalFooter.d.ts +1 -1
  45. package/dist/app/pages/quickVideos/modals/components/QuickVideoDetailsModalForm.d.ts +1 -1
  46. package/dist/app/pages/quickVideos/modals/components/QuickVideoDetailsModalHeader.d.ts +1 -1
  47. package/dist/app/pages/quickVideos/modals/components/QuickVideoPart.d.ts +1 -1
  48. package/dist/app/pages/quickVideos/modals/components/QuickVideoUserConfigurationVideoDetails.d.ts +1 -1
  49. package/dist/app/pages/recordv1/ChooseRecordingOptions.d.ts +1 -1
  50. package/dist/app/pages/recordv1/Countdown.d.ts +1 -1
  51. package/dist/app/pages/recordv1/FolderDropdown.d.ts +1 -1
  52. package/dist/app/pages/recordv1/ModalRecordingVideoSettings.d.ts +2 -1
  53. package/dist/app/pages/recordv1/ModalTeleprompterRecord.d.ts +1 -1
  54. package/dist/app/pages/recordv1/ModalVideoTags.d.ts +2 -1
  55. package/dist/app/pages/recordv1/ProgressCircle.d.ts +1 -1
  56. package/dist/app/pages/recordv1/RecordBoth.d.ts +2 -1
  57. package/dist/app/pages/recordv1/RecordCam.d.ts +1 -1
  58. package/dist/app/pages/recordv1/RecordCamLoader.d.ts +1 -1
  59. package/dist/app/pages/recordv1/RecordHome.d.ts +1 -1
  60. package/dist/app/pages/recordv1/RecorderBody.d.ts +1 -1
  61. package/dist/app/pages/recordv1/RecordingHeadingWithRouteGuard.d.ts +1 -1
  62. package/dist/app/pages/recordv1/ScreenRecorder.d.ts +1 -1
  63. package/dist/app/pages/recordv1/Scroller.d.ts +2 -1
  64. package/dist/app/pages/recordv1/Teleprompter/BaseTeleprompterActions.d.ts +1 -1
  65. package/dist/app/pages/recordv1/Teleprompter/RecordingTeleprompterActions.d.ts +1 -1
  66. package/dist/app/pages/recordv1/Teleprompter/TeleprompterActions.d.ts +2 -1
  67. package/dist/app/pages/recordv1/Teleprompter/TeleprompterDisplay.d.ts +2 -1
  68. package/dist/app/pages/recordv1/UploadLoader.d.ts +1 -1
  69. package/dist/app/pages/recordv1/VideoTag.d.ts +1 -1
  70. package/dist/app/pages/recordv1/VideoUploadFolderDropdown.d.ts +1 -1
  71. package/dist/app/pages/recordv1/VirtualBackgroundsButton.d.ts +1 -1
  72. package/dist/app/pages/recordv1/detailsPreview/DetailsPreview.d.ts +2 -1
  73. package/dist/app/pages/recordv1/detailsPreview/form/DetailsPreviewAtrributesHeader.d.ts +1 -1
  74. package/dist/app/pages/recordv1/detailsPreview/form/DetailsPreviewHeader.d.ts +1 -1
  75. package/dist/app/pages/recordv1/detailsPreview/form/DetailsPreviewVideoAttributes.d.ts +2 -1
  76. package/dist/app/pages/recordv1/detailsPreview/form/DetailsRecordPreviewTags.d.ts +1 -1
  77. package/dist/app/pages/recordv1/detailsPreview/form/VideoRequestDetails.d.ts +1 -1
  78. package/dist/app/pages/recordv1/routes.d.ts +1 -1
  79. package/dist/app/pages/recordv1/virtualBackgrounds/FilesTabContent.d.ts +2 -1
  80. package/dist/app/pages/recordv1/virtualBackgrounds/VirtualBackgroundLibraryModal.d.ts +2 -1
  81. package/dist/app/pages/recordv1/virtualBackgrounds/VirtualBackgrounds.d.ts +2 -1
  82. package/dist/app/pages/video/Upload.d.ts +2 -1
  83. package/dist/app/pages/video/components/Preview.d.ts +1 -1
  84. package/dist/app/pages/video/components/videoPlayer/VideoPlayer.d.ts +1 -1
  85. package/dist/app/pages/video/components/videoPlayer/components/onScreenPlayButton.d.ts +2 -1
  86. package/dist/app/pages/video/components/videoPlayer/components/progressBar.d.ts +1 -1
  87. package/dist/app/pages/video/components/videoPlayer/components/trim/Handle.d.ts +2 -1
  88. package/dist/app/pages/video/components/videoPlayer/components/trim/TimelineRange.d.ts +1 -1
  89. package/dist/app/pages/video/components/videoPlayer/components/trim/Trim.d.ts +1 -1
  90. package/dist/app/pages/video/components/videoPlayer/components/trim/VideoPreviewTrack.d.ts +2 -1
  91. package/dist/app/pages/video/components/videoPlayer/components/videoControls.d.ts +1 -1
  92. package/dist/app/pages/video/videoDetails/components/AttributesFields.d.ts +2 -1
  93. package/dist/app/pages/vinReels/ModalVideoPreview.d.ts +2 -1
  94. package/dist/app/pages/vinReels/VinReels.d.ts +3 -2
  95. package/dist/app/pages/voiceover/Voiceover.d.ts +1 -1
  96. package/dist/app/pages/voiceover/components/AudioRecorder.d.ts +1 -1
  97. package/dist/app/pages/voiceover/components/VideoPreview.d.ts +1 -1
  98. package/dist/app/pages/wheelsTV/WheelsTV.d.ts +1 -1
  99. package/dist/app/pages/wheelsTV/components/PageInfo.d.ts +1 -1
  100. package/dist/app/pages/wheelsTV/components/Search.d.ts +1 -1
  101. package/dist/index.d.ts +2 -0
  102. package/dist/lib/components/AddonDropdown.d.ts +1 -1
  103. package/dist/lib/components/ButtonDropdown.d.ts +1 -1
  104. package/dist/lib/components/ButtonSwitch.d.ts +1 -1
  105. package/dist/lib/components/CheckboxInput.d.ts +2 -1
  106. package/dist/lib/components/CloseButton.d.ts +1 -1
  107. package/dist/lib/components/Container.d.ts +1 -1
  108. package/dist/lib/components/CountDown.d.ts +1 -1
  109. package/dist/lib/components/DragAndDrop.d.ts +1 -1
  110. package/dist/lib/components/InformationBox.d.ts +2 -1
  111. package/dist/lib/components/Label.d.ts +1 -1
  112. package/dist/lib/components/LoadingIndicator.d.ts +2 -1
  113. package/dist/lib/components/Logo.d.ts +1 -1
  114. package/dist/lib/components/MainWrapper.d.ts +1 -1
  115. package/dist/lib/components/NewDropdown.d.ts +1 -1
  116. package/dist/lib/components/PreviewVideoBar.d.ts +1 -1
  117. package/dist/lib/components/RouteLeavingGuard.d.ts +1 -1
  118. package/dist/lib/components/TopBar.d.ts +1 -1
  119. package/dist/lib/components/formik/FormikDropdown.d.ts +1 -1
  120. package/dist/lib/components/formik/FormikErrorMessage.d.ts +1 -1
  121. package/dist/lib/components/formik/FormikTextAreaField.d.ts +1 -1
  122. package/dist/lib/components/inputs/RadioInput.d.ts +1 -1
  123. package/dist/lib/components/mediaTools/index.d.ts +1 -1
  124. package/dist/lib/components/modal/Modal.d.ts +1 -1
  125. package/dist/lib/components/modal/ModalQuickShareMarkAsSent.d.ts +1 -1
  126. package/dist/lib/components/modals/Modal.d.ts +1 -1
  127. package/dist/lib/components/modals/ModalInputText.d.ts +1 -1
  128. package/dist/lib/components/modals/ModalLeave.d.ts +1 -1
  129. package/dist/lib/components/modals/ModalPrompt.d.ts +1 -1
  130. package/dist/lib/components/modals/ModalUpload.d.ts +1 -1
  131. package/dist/lib/components/modals/ModalVideoPreview.d.ts +2 -1
  132. package/dist/lib/components/toast-notifications/ToastNotification.d.ts +1 -1
  133. package/dist/lib/components/toast-notifications/index.d.ts +2 -1
  134. package/dist/lib/components/videoUpload/MultipleUploadList.d.ts +2 -1
  135. package/dist/lib/components/videoUpload/VideoUpload.d.ts +1 -1
  136. package/dist/lib/context/ActionDispatchContext.d.ts +1 -1
  137. package/dist/lib/context/AuthorizationContext.d.ts +1 -1
  138. package/dist/lib/context/ConfigurationContext.d.ts +2 -0
  139. package/dist/lib/context/ContactUsModalContext.d.ts +1 -1
  140. package/dist/lib/context/record/provider.d.ts +1 -1
  141. package/dist/lib/context/teleprompter/provider.d.ts +1 -1
  142. package/dist/lib/hooks/GTM/actions/recording/recordingSettings.d.ts +4 -0
  143. package/dist/lib/hooks/GTM/types.d.ts +2 -1
  144. package/dist/lib/hooks/GTM/useGTMAnalytics.d.ts +5 -0
  145. package/dist/lib/hooks/GTM/utils.d.ts +97 -0
  146. package/dist/lib/hooks/query/markAsSent/useQuickShareMarkAsSentMutation.d.ts +4 -1
  147. package/dist/lib/hooks/useQuickShare.d.ts +1 -1
  148. package/dist/lib/images/volumeOff.d.ts +2 -1
  149. package/package.json +4 -4
@@ -54,3 +54,100 @@ export declare const TRACKED_PAGES: {
54
54
  readonly pageLocation: PageSection.VOICE_RECORDER;
55
55
  };
56
56
  };
57
+ interface GetChangedFieldsOptions {
58
+ initialValues: Record<string, any>;
59
+ currentValues: Record<string, any>;
60
+ trackedFields?: string[] | Record<string, string> | Array<string | Record<string, string>>;
61
+ trackedArrayFields?: Record<string, string[] | Record<string, string>>;
62
+ onlyChangedList?: boolean;
63
+ }
64
+ /**
65
+ * BEFORE MAKING ANY CHANGES:
66
+ * PLEASE READ THIS COMMENT AND THE TESTS IN `test-getChangedFields.ts` TO UNDERSTAND HOW THIS FUNCTION WORKS.
67
+ *
68
+ * Compares `initialValues` vs `currentValues` and returns which tracked fields changed.
69
+ *
70
+ * The function works in two steps:
71
+ * 1) `flattenObject(...)` flattens the input objects into a `{ [path]: string }` map,
72
+ * but **only for paths you explicitly track** via `trackedFields` / `trackedArrayFields`.
73
+ * 2) `getChangedFields(...)` diffs the two flattened maps and returns:
74
+ * - `changed_fields`: list of changed fields (labels when label mapping is provided)
75
+ * - optionally (`onlyChangedList: false`) `<path>_before` and `<path>_after` values
76
+ *
77
+ * @param initialValues - baseline object (e.g. values on load)
78
+ * @param currentValues - current object (e.g. values after user edits)
79
+ * @param trackedFields - list/object of field paths to track (supports dot paths)
80
+ * - Simple field: `"title"`
81
+ * - Nested field: `"company.name"` (tracks only that nested path)
82
+ * - Labeled: `{ title: "Title" }`
83
+ * @param trackedArrayFields - map of array field name -> list of item subfields to track
84
+ * - Example: `{ links: ["linkText", "itemType"] }` tracks `links.<index>.linkText`, etc.
85
+ * - Note: this is intended for arrays of objects at the root key (or within that root branch)
86
+ * @param onlyChangedList - when true, return only `changed_fields`
87
+ *
88
+ * @returns An object containing:
89
+ * - `changed_fields: string[]`
90
+ * - and when `onlyChangedList` is false:
91
+ * - `<path>_before: string`
92
+ * - `<path>_after: string`
93
+ *
94
+ * @example
95
+ * // 1) Simple key/value pairs
96
+ * const res = getChangedFields({
97
+ * initialValues: { title: "A", company: "X", ignored: 123 },
98
+ * currentValues: { title: "B", company: "X", ignored: 999 },
99
+ * trackedFields: ["title", "company"],
100
+ * onlyChangedList: false,
101
+ * });
102
+ *
103
+ * // res.changed_fields -> ["title"]
104
+ * // res.title_before -> "A"
105
+ * // res.title_after -> "B"
106
+ *
107
+ * @example
108
+ * // 2) Nested object fields (dot paths)
109
+ * // Track specific nested properties with `trackedFields`:
110
+ * const res = getChangedFields({
111
+ * initialValues: {
112
+ * videoSource: { label: "OBS Virtual Camera", value: "abc" },
113
+ * },
114
+ * currentValues: {
115
+ * videoSource: { label: "FaceTime HD Camera", value: "def" },
116
+ * },
117
+ * trackedFields: ["videoSource.label"],
118
+ * onlyChangedList: true,
119
+ * });
120
+ *
121
+ * // res.changed_fields -> ["videoSource.label"]
122
+ *
123
+ * @example
124
+ * // 3) Array of objects
125
+ * // Track specific subfields on each array item using `trackedArrayFields`.
126
+ * const res = getChangedFields({
127
+ * initialValues,
128
+ * currentValues: data,
129
+ * trackedFields: ["title", "company"],
130
+ * trackedArrayFields: {
131
+ * links: ["linkText", "itemType", "fileThumbnail", "newWindow"],
132
+ * },
133
+ * onlyChangedList: false,
134
+ * });
135
+ *
136
+ * // If `links` changes, paths look like:
137
+ * // "links.0.linkText", "links.2.newWindow", ...
138
+ * // and you get before/after fields for each changed path.
139
+ *
140
+ * @example
141
+ * // 4) Label mapping
142
+ * const res = getChangedFields({
143
+ * initialValues: { title: "Old" },
144
+ * currentValues: { title: "New" },
145
+ * trackedFields: [{ title: "Title" }],
146
+ * });
147
+ *
148
+ * // res.changed_fields -> ["Title"]
149
+ */
150
+ export declare function getChangedFields({ initialValues, currentValues, trackedFields, trackedArrayFields, onlyChangedList, }: GetChangedFieldsOptions): {
151
+ changed_fields: string[];
152
+ };
153
+ export {};
@@ -26,5 +26,8 @@ export interface IQuickShareMarkAsSentParams {
26
26
  reuseShortUrl?: boolean;
27
27
  }
28
28
  export declare const markQuickShareAsSent: (params: IQuickShareMarkAsSentParams) => Promise<any>;
29
- export declare const useQuickShareMarkAsSentMutation: (onSuccessCallback: () => void) => import("react-query").UseMutationResult<MarkAsSentResponse, unknown, IQuickShareMarkAsSentParams, unknown>;
29
+ export declare const useQuickShareMarkAsSentMutation: (onSuccessCallback: () => void, { videoTitle, videoUrl }?: {
30
+ videoTitle: string;
31
+ videoUrl: string;
32
+ }) => import("react-query").UseMutationResult<MarkAsSentResponse, unknown, IQuickShareMarkAsSentParams, unknown>;
30
33
  export {};
@@ -2,7 +2,7 @@ import { VideoListItem } from 'lib/api';
2
2
  import { VideoListAutomotiveItem, VideoRequest } from 'lib/context';
3
3
  import { IQuickShareMarkAsSentParams } from 'lib/hooks/query/markAsSent/useQuickShareMarkAsSentMutation';
4
4
  interface IProps {
5
- video: VideoListAutomotiveItem | VideoListItem | number | undefined;
5
+ video?: VideoListAutomotiveItem | VideoListItem | number;
6
6
  videoRequest?: VideoRequest;
7
7
  setShowModalQuickShareMarkAsSent: (showModalQuickShareMarkAsSent: boolean) => void;
8
8
  handleOnMarkAsSentSuccessCallback?: () => void;
@@ -1 +1,2 @@
1
- export function VolumeOffIcon(props: any): import("react/jsx-runtime").JSX.Element;
1
+ export function VolumeOffIcon(props: any): React.JSX.Element;
2
+ import * as React from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-covideo-embed",
3
- "version": "1.0.95",
3
+ "version": "1.0.97",
4
4
  "private": false,
5
5
  "description": "Covideo platform as an embeddable React component.",
6
6
  "main": "build/index.js",
@@ -74,9 +74,9 @@
74
74
  "devDependencies": {
75
75
  "@eslint/js": "^9.0.0",
76
76
  "@mediapipe/tasks-vision": "^0.10.15",
77
- "@storybook/addon-links": "^10.3.6",
78
- "@storybook/addon-themes": "^10.3.6",
79
- "@storybook/react-vite": "^10.3.6",
77
+ "@storybook/addon-links": "10.3.6",
78
+ "@storybook/addon-themes": "10.3.6",
79
+ "@storybook/react-vite": "10.3.6",
80
80
  "@types/color-convert": "^2.0.0",
81
81
  "@types/file-saver": "^2.0.5",
82
82
  "@types/js-cookie": "^3.0.6",