manucap 3.0.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.
Files changed (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/@types/index.d.ts +62 -0
  4. package/dist/dist.css +3730 -0
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.js +209323 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/indexLibrary.d.ts +13 -0
  9. package/dist/indexLibrary.spec.d.ts +1 -0
  10. package/dist/manucap/CompleteButton.d.ts +9 -0
  11. package/dist/manucap/CompleteButton.spec.d.ts +1 -0
  12. package/dist/manucap/CueListToolbar.d.ts +11 -0
  13. package/dist/manucap/CueListToolbar.spec.d.ts +1 -0
  14. package/dist/manucap/ManuCap.d.ts +23 -0
  15. package/dist/manucap/ManuCap.spec.d.ts +1 -0
  16. package/dist/manucap/common/DateTime.d.ts +7 -0
  17. package/dist/manucap/common/DateTime.spec.d.ts +1 -0
  18. package/dist/manucap/common/JoiError.d.ts +8 -0
  19. package/dist/manucap/cues/CueErrorAlert.d.ts +3 -0
  20. package/dist/manucap/cues/CueErrorAlert.spec.d.ts +1 -0
  21. package/dist/manucap/cues/CueErrorLine.d.ts +8 -0
  22. package/dist/manucap/cues/CueErrorLine.spec.d.ts +1 -0
  23. package/dist/manucap/cues/comments/CueComments.d.ts +9 -0
  24. package/dist/manucap/cues/comments/CueComments.spec.d.ts +1 -0
  25. package/dist/manucap/cues/comments/commentsSlices.d.ts +4 -0
  26. package/dist/manucap/cues/cueLine/CueActionsPanel.d.ts +10 -0
  27. package/dist/manucap/cues/cueLine/CueActionsPanel.spec.d.ts +2 -0
  28. package/dist/manucap/cues/cueLine/CueLine.d.ts +18 -0
  29. package/dist/manucap/cues/cueLine/CueLine.fake.children.spec.d.ts +3 -0
  30. package/dist/manucap/cues/cueLine/CueLine.real.children.spec.d.ts +1 -0
  31. package/dist/manucap/cues/cueLine/CueLineCounts.d.ts +9 -0
  32. package/dist/manucap/cues/cueLine/CueLineCounts.spec.d.ts +2 -0
  33. package/dist/manucap/cues/cueLine/CueLineFlap.d.ts +13 -0
  34. package/dist/manucap/cues/cueLine/CueLineFlap.spec.d.ts +1 -0
  35. package/dist/manucap/cues/cueLine/PlayCueButton.d.ts +8 -0
  36. package/dist/manucap/cues/cueLine/PlayCueButton.spec.d.ts +2 -0
  37. package/dist/manucap/cues/cueUtils.d.ts +62 -0
  38. package/dist/manucap/cues/cueUtils.spec.d.ts +1 -0
  39. package/dist/manucap/cues/cueVerifications.d.ts +14 -0
  40. package/dist/manucap/cues/cueVerifications.spec.d.ts +1 -0
  41. package/dist/manucap/cues/cuesList/CuesList.d.ts +12 -0
  42. package/dist/manucap/cues/cuesList/CuesList.fake.line.spec.d.ts +1 -0
  43. package/dist/manucap/cues/cuesList/CuesList.spec.d.ts +1 -0
  44. package/dist/manucap/cues/cuesList/cuesListActions.d.ts +40 -0
  45. package/dist/manucap/cues/cuesList/cuesListActions.spec.d.ts +1 -0
  46. package/dist/manucap/cues/cuesList/cuesListScrollSlice.d.ts +17 -0
  47. package/dist/manucap/cues/cuesList/cuesListScrollSlice.spec.d.ts +1 -0
  48. package/dist/manucap/cues/cuesList/cuesListSlices.d.ts +82 -0
  49. package/dist/manucap/cues/cuesList/cuesListTestUtils.d.ts +4 -0
  50. package/dist/manucap/cues/cuesList/cuesListTimeMatching.d.ts +6 -0
  51. package/dist/manucap/cues/cuesList/useMatchedCuesAsCsv.d.ts +4 -0
  52. package/dist/manucap/cues/cuesList/useMatchedCuesAsCsv.spec.d.ts +1 -0
  53. package/dist/manucap/cues/edit/AddCueLineButton.d.ts +8 -0
  54. package/dist/manucap/cues/edit/AddCueLineButton.spec.d.ts +2 -0
  55. package/dist/manucap/cues/edit/CueCategoryButton.d.ts +8 -0
  56. package/dist/manucap/cues/edit/CueCategoryButton.spec.d.ts +1 -0
  57. package/dist/manucap/cues/edit/CueEdit.d.ts +12 -0
  58. package/dist/manucap/cues/edit/CueEdit.fake.debounce.spec.d.ts +2 -0
  59. package/dist/manucap/cues/edit/CueEdit.fake.editor.spec.d.ts +2 -0
  60. package/dist/manucap/cues/edit/CueExtraCharacters.d.ts +7 -0
  61. package/dist/manucap/cues/edit/CueExtraCharacters.spec.d.ts +1 -0
  62. package/dist/manucap/cues/edit/CueTextEditor.composition.spec.d.ts +2 -0
  63. package/dist/manucap/cues/edit/CueTextEditor.d.ts +18 -0
  64. package/dist/manucap/cues/edit/CueTextEditor.fake.debounce.spec.d.ts +2 -0
  65. package/dist/manucap/cues/edit/CueTextEditor.real.debounce.spec.d.ts +2 -0
  66. package/dist/manucap/cues/edit/CueTextEditor.spellcheck.keyboard.shortcuts.spec.d.ts +2 -0
  67. package/dist/manucap/cues/edit/DeleteCueLineButton.d.ts +6 -0
  68. package/dist/manucap/cues/edit/DeleteCueLineButton.spec.d.ts +2 -0
  69. package/dist/manucap/cues/edit/InlineStyleButton.d.ts +11 -0
  70. package/dist/manucap/cues/edit/InlineStyleButton.spec.d.ts +1 -0
  71. package/dist/manucap/cues/edit/PositionButton.d.ts +8 -0
  72. package/dist/manucap/cues/edit/PositionButton.spec.d.ts +2 -0
  73. package/dist/manucap/cues/edit/SplitCueLineButton.d.ts +6 -0
  74. package/dist/manucap/cues/edit/SplitCueLineButton.spec.d.ts +2 -0
  75. package/dist/manucap/cues/edit/TimeEditor.d.ts +11 -0
  76. package/dist/manucap/cues/edit/TimeEditor.spec.d.ts +1 -0
  77. package/dist/manucap/cues/edit/cueEditorSlices.d.ts +25 -0
  78. package/dist/manucap/cues/edit/cueEditorSlices.spec.d.ts +1 -0
  79. package/dist/manucap/cues/edit/cueTextConverter.d.ts +4 -0
  80. package/dist/manucap/cues/edit/cueTextConverter.spec.d.ts +1 -0
  81. package/dist/manucap/cues/edit/editUtils.d.ts +3 -0
  82. package/dist/manucap/cues/merge/MergeEditor.d.ts +3 -0
  83. package/dist/manucap/cues/merge/MergeEditor.spec.d.ts +1 -0
  84. package/dist/manucap/cues/merge/mergeSlices.d.ts +11 -0
  85. package/dist/manucap/cues/merge/mergeSlices.spec.d.ts +1 -0
  86. package/dist/manucap/cues/saveCueDeleteSlices.d.ts +12 -0
  87. package/dist/manucap/cues/saveCueDeleteSlices.spec.d.ts +1 -0
  88. package/dist/manucap/cues/saveCueUpdateSlices.d.ts +13 -0
  89. package/dist/manucap/cues/saveCueUpdateSlices.spec.d.ts +1 -0
  90. package/dist/manucap/cues/saveSlices.d.ts +16 -0
  91. package/dist/manucap/cues/saveSlices.spec.d.ts +1 -0
  92. package/dist/manucap/cues/searchReplace/SearchReplaceEditor.d.ts +3 -0
  93. package/dist/manucap/cues/searchReplace/SearchReplaceEditor.spec.d.ts +1 -0
  94. package/dist/manucap/cues/searchReplace/SearchReplaceMatch.d.ts +6 -0
  95. package/dist/manucap/cues/searchReplace/SearchReplaceMatch.spec.d.ts +1 -0
  96. package/dist/manucap/cues/searchReplace/model.d.ts +16 -0
  97. package/dist/manucap/cues/searchReplace/searchReplaceSlices.d.ts +22 -0
  98. package/dist/manucap/cues/searchReplace/searchReplaceSlices.spec.d.ts +1 -0
  99. package/dist/manucap/cues/spellCheck/SpellCheckIssue.d.ts +17 -0
  100. package/dist/manucap/cues/spellCheck/SpellCheckIssue.spec.d.ts +1 -0
  101. package/dist/manucap/cues/spellCheck/model.d.ts +33 -0
  102. package/dist/manucap/cues/spellCheck/spellCheckFetch.d.ts +5 -0
  103. package/dist/manucap/cues/spellCheck/spellCheckerUtils.d.ts +6 -0
  104. package/dist/manucap/cues/spellCheck/spellCheckerUtils.spec.d.ts +1 -0
  105. package/dist/manucap/cues/spellCheck/spellcheckerSettingsSlice.spec.d.ts +1 -0
  106. package/dist/manucap/cues/view/ClickCueWrapper.d.ts +13 -0
  107. package/dist/manucap/cues/view/ClickCueWrapper.spec.d.ts +2 -0
  108. package/dist/manucap/cues/view/CueView.d.ts +21 -0
  109. package/dist/manucap/cues/view/CueView.spec.d.ts +2 -0
  110. package/dist/manucap/cues/view/InsertCueButton.d.ts +3 -0
  111. package/dist/manucap/cues/view/sourceCueSlices.d.ts +11 -0
  112. package/dist/manucap/cues/view/sourceCueSlices.spec.d.ts +1 -0
  113. package/dist/manucap/loadingIndicatorSlices.d.ts +2 -0
  114. package/dist/manucap/loadingIndicatorSlices.spec.d.ts +1 -0
  115. package/dist/manucap/manuCapReducers.d.ts +65 -0
  116. package/dist/manucap/model.d.ts +174 -0
  117. package/dist/manucap/player/EditingVideoPlayer.d.ts +10 -0
  118. package/dist/manucap/player/EditingVideoPlayer.fake.player.spec.d.ts +2 -0
  119. package/dist/manucap/player/EditingVideoPlayer.spec.d.ts +1 -0
  120. package/dist/manucap/player/VideoPlayer.d.ts +48 -0
  121. package/dist/manucap/player/VideoPlayer.fake.player.spec.d.ts +1 -0
  122. package/dist/manucap/player/VideoPlayer.spec.d.ts +1 -0
  123. package/dist/manucap/player/VideoPlayer.wavesurfer.spec.d.ts +1 -0
  124. package/dist/manucap/player/playbackSlices.d.ts +11 -0
  125. package/dist/manucap/player/playbackSlices.spec.d.ts +1 -0
  126. package/dist/manucap/player/textTrackOptionsConversion.d.ts +3 -0
  127. package/dist/manucap/player/textTrackOptionsConversion.spec.d.ts +1 -0
  128. package/dist/manucap/player/waveformSlices.d.ts +4 -0
  129. package/dist/manucap/player/waveformSlices.spec.d.ts +1 -0
  130. package/dist/manucap/spellcheckerSettingsSlice.d.ts +4 -0
  131. package/dist/manucap/toolbox/CaptionOverlapToggle.d.ts +8 -0
  132. package/dist/manucap/toolbox/CaptionOverlapToggle.spec.d.ts +1 -0
  133. package/dist/manucap/toolbox/CueCommentsToggle.d.ts +6 -0
  134. package/dist/manucap/toolbox/CueCommentsToggle.spec.d.ts +1 -0
  135. package/dist/manucap/toolbox/ImportTrackCuesButton.d.ts +7 -0
  136. package/dist/manucap/toolbox/ImportTrackCuesButton.spec.d.ts +1 -0
  137. package/dist/manucap/toolbox/MergeCuesButton.d.ts +6 -0
  138. package/dist/manucap/toolbox/MergeCuesButton.spec.d.ts +1 -0
  139. package/dist/manucap/toolbox/SeachReplaceButton.spec.d.ts +1 -0
  140. package/dist/manucap/toolbox/SearchReplaceButton.d.ts +3 -0
  141. package/dist/manucap/toolbox/SyncCuesButton.d.ts +6 -0
  142. package/dist/manucap/toolbox/SyncCuesButton.spec.d.ts +1 -0
  143. package/dist/manucap/toolbox/TimecodesLockToggle.d.ts +6 -0
  144. package/dist/manucap/toolbox/TimecodesLockToggle.spec.d.ts +1 -0
  145. package/dist/manucap/toolbox/ToggleButton.d.ts +11 -0
  146. package/dist/manucap/toolbox/ToggleButton.spec.d.ts +1 -0
  147. package/dist/manucap/toolbox/Toolbox.d.ts +11 -0
  148. package/dist/manucap/toolbox/Toolbox.spec.d.ts +1 -0
  149. package/dist/manucap/toolbox/WaveformToggle.d.ts +6 -0
  150. package/dist/manucap/toolbox/WaveformToggle.spec.d.ts +1 -0
  151. package/dist/manucap/toolbox/captionSpecifications/CaptionSpecificationsButton.d.ts +3 -0
  152. package/dist/manucap/toolbox/captionSpecifications/CaptionSpecificationsButton.spec.d.ts +2 -0
  153. package/dist/manucap/toolbox/captionSpecifications/CaptionSpecificationsForm.d.ts +7 -0
  154. package/dist/manucap/toolbox/captionSpecifications/CaptionSpecificationsForm.spec.d.ts +1 -0
  155. package/dist/manucap/toolbox/captionSpecifications/CaptionSpecificationsModal.d.ts +7 -0
  156. package/dist/manucap/toolbox/captionSpecifications/CaptionSpecificationsModal.spec.d.ts +1 -0
  157. package/dist/manucap/toolbox/captionSpecifications/captionSpecificationSlice.d.ts +11 -0
  158. package/dist/manucap/toolbox/captionSpecifications/captionSpecificationSlice.spec.d.ts +1 -0
  159. package/dist/manucap/toolbox/export/ExportSourceTrackCuesButton.d.ts +6 -0
  160. package/dist/manucap/toolbox/export/ExportSourceTrackCuesButton.spec.d.ts +1 -0
  161. package/dist/manucap/toolbox/export/ExportTrackCuesButton.d.ts +7 -0
  162. package/dist/manucap/toolbox/export/ExportTrackCuesButton.spec.d.ts +1 -0
  163. package/dist/manucap/toolbox/keyboardShortcuts/KeyboardShortcutLabel.d.ts +11 -0
  164. package/dist/manucap/toolbox/keyboardShortcuts/KeyboardShortcutLabel.spec.d.ts +1 -0
  165. package/dist/manucap/toolbox/keyboardShortcuts/KeyboardShortcuts.d.ts +7 -0
  166. package/dist/manucap/toolbox/keyboardShortcuts/KeyboardShortcuts.spec.d.ts +1 -0
  167. package/dist/manucap/toolbox/keyboardShortcuts/KeyboardShortcutsModal.d.ts +7 -0
  168. package/dist/manucap/toolbox/keyboardShortcuts/KeyboardShortcutsModal.spec.d.ts +1 -0
  169. package/dist/manucap/toolbox/model.d.ts +17 -0
  170. package/dist/manucap/toolbox/shift/ShiftTimeButton.d.ts +6 -0
  171. package/dist/manucap/toolbox/shift/ShiftTimeButton.spec.d.ts +1 -0
  172. package/dist/manucap/toolbox/shift/ShiftTimeModal.d.ts +7 -0
  173. package/dist/manucap/toolbox/shift/ShiftTimeModal.spec.d.ts +2 -0
  174. package/dist/manucap/toolbox/subtitleSpecifications/SubtitleSpecificationsButton.d.ts +3 -0
  175. package/dist/manucap/toolbox/subtitleSpecifications/SubtitleSpecificationsButton.spec.d.ts +2 -0
  176. package/dist/manucap/toolbox/subtitleSpecifications/SubtitleSpecificationsForm.d.ts +7 -0
  177. package/dist/manucap/toolbox/subtitleSpecifications/SubtitleSpecificationsForm.spec.d.ts +1 -0
  178. package/dist/manucap/toolbox/subtitleSpecifications/SubtitleSpecificationsModal.d.ts +7 -0
  179. package/dist/manucap/toolbox/subtitleSpecifications/SubtitleSpecificationsModal.spec.d.ts +1 -0
  180. package/dist/manucap/toolbox/subtitleSpecifications/subtitleSpecificationSlice.d.ts +11 -0
  181. package/dist/manucap/toolbox/subtitleSpecifications/subtitleSpecificationSlice.spec.d.ts +1 -0
  182. package/dist/manucap/trackSlices.d.ts +13 -0
  183. package/dist/manucap/trackSlices.spec.d.ts +1 -0
  184. package/dist/manucap/userSlices.d.ts +10 -0
  185. package/dist/manucap/userSlices.spec.d.ts +1 -0
  186. package/dist/manucap/utils/manuCapUtils.d.ts +3 -0
  187. package/dist/manucap/utils/manuCapUtils.spec.d.ts +1 -0
  188. package/dist/manucap/utils/shortcutConstants.d.ts +41 -0
  189. package/dist/manucap/utils/shortcutConstants.spec.d.ts +1 -0
  190. package/dist/manucap/utils/timeUtils.d.ts +10 -0
  191. package/dist/manucap/utils/timeUtils.spec.d.ts +1 -0
  192. package/dist/testUtils/initBrowserEnvironment.d.ts +1 -0
  193. package/dist/testUtils/testUtils.d.ts +13 -0
  194. package/dist/testUtils/testingStore.d.ts +4 -0
  195. package/package.json +154 -0
@@ -0,0 +1,11 @@
1
+ import { EditorState } from "draft-js";
2
+ import { ReactElement } from "react";
3
+ interface Props {
4
+ editorIndex: number;
5
+ inlineStyle: string;
6
+ label: ReactElement;
7
+ editorState: EditorState;
8
+ setEditorState: Function;
9
+ }
10
+ declare const InlineStyleButton: (props: Props) => ReactElement;
11
+ export default InlineStyleButton;
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,8 @@
1
+ import { Position } from "../cueUtils";
2
+ import { ReactElement } from "react";
3
+ interface Props {
4
+ vttCue: VTTCue;
5
+ changePosition: (position: Position) => void;
6
+ }
7
+ declare const PositionButton: (props: Props) => ReactElement;
8
+ export default PositionButton;
@@ -0,0 +1,2 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
2
+ import "video.js";
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from "react";
2
+ interface Props {
3
+ cueIndex: number;
4
+ }
5
+ declare const SplitCueLineButton: (props: Props) => ReactElement;
6
+ export default SplitCueLineButton;
@@ -0,0 +1,2 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
2
+ import "video.js";
@@ -0,0 +1,11 @@
1
+ import { ReactElement } from "react";
2
+ interface Props {
3
+ time?: number;
4
+ onChange: (time: number) => void;
5
+ autoFocus?: boolean;
6
+ }
7
+ declare const TimeEditor: {
8
+ (props: Props): ReactElement;
9
+ defaultProps: Partial<Props>;
10
+ };
11
+ export default TimeEditor;
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,25 @@
1
+ import { Dispatch } from "react";
2
+ import { PayloadAction } from "@reduxjs/toolkit";
3
+ import { CueChange, CueError, ManuCapAction } from "../../model";
4
+ import { AppThunk } from "../../manuCapReducers";
5
+ export interface CueIndexAction extends ManuCapAction {
6
+ idx: number;
7
+ }
8
+ export declare const editingCueIndexSlice: import("@reduxjs/toolkit").Slice<number, {
9
+ updateEditingCueIndex: (_state: number, action: PayloadAction<CueIndexAction>) => number;
10
+ }, "editingCueIndex">;
11
+ declare type FocusedInputType = "EDITOR" | "START_TIME";
12
+ export declare const focusedInputSlice: import("@reduxjs/toolkit").Slice<FocusedInputType, {
13
+ updateFocusedInput: (_state: FocusedInputType, action: PayloadAction<FocusedInputType>) => FocusedInputType;
14
+ }, "focusedInput">;
15
+ export declare const updateEditingCueIndexNoThunk: (dispatch: Dispatch<ManuCapAction>, idx: number) => void;
16
+ export declare const updateEditingCueIndex: (idx: number, matchedCueIndex?: number) => AppThunk;
17
+ export declare const validationErrorSlice: import("@reduxjs/toolkit").Slice<CueError[], {
18
+ setValidationErrors: (_state: CueError[], action: PayloadAction<CueError[]>) => CueError[];
19
+ }, "validationError">;
20
+ export declare const setValidationErrors: (errors: CueError[]) => AppThunk;
21
+ export declare const lastCueChangeSlice: import("@reduxjs/toolkit").Slice<CueChange | null, {
22
+ recordCueChange: (_state: import("immer/dist/internal").WritableDraft<CueChange> | null, action: PayloadAction<CueChange | null>) => CueChange | null;
23
+ }, "lastCueChange">;
24
+ export declare const clearLastCueChange: () => AppThunk;
25
+ export {};
@@ -0,0 +1 @@
1
+ import "video.js";
@@ -0,0 +1,4 @@
1
+ import { ContentState } from "draft-js";
2
+ export declare const convertVttToHtml: (vtt: string) => string;
3
+ export declare const convertHtmlToVtt: (html: string) => string;
4
+ export declare const getVttText: (currentContent: ContentState) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { EditorState } from "draft-js";
2
+ export declare const replaceContent: (editorState: EditorState, replacement: string, start: number, end: number) => EditorState;
3
+ export declare const replaceVttCueContent: (vttCue: VTTCue, replacement: string, start: number, end: number) => VTTCue;
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from "react";
2
+ declare const MergeEditor: () => ReactElement | null;
3
+ export default MergeEditor;
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,11 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ import { AppThunk } from "../../manuCapReducers";
3
+ import { CuesWithRowIndex } from "../../model";
4
+ export declare const mergeVisibleSlice: import("@reduxjs/toolkit").Slice<boolean, {
5
+ setMergeVisible: (_state: boolean, action: PayloadAction<boolean>) => boolean;
6
+ }, "mergeVisible">;
7
+ export declare const showMerge: (visible: boolean) => AppThunk;
8
+ export declare const rowsToMergeSlice: import("@reduxjs/toolkit").Slice<CuesWithRowIndex[], {
9
+ addRowCues: (state: import("immer/dist/internal").WritableDraft<CuesWithRowIndex>[], action: PayloadAction<CuesWithRowIndex>) => void;
10
+ removeRowCues: (state: import("immer/dist/internal").WritableDraft<CuesWithRowIndex>[], action: PayloadAction<CuesWithRowIndex>) => void;
11
+ }, "rowsToMerge">;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ import { CueDto, SaveTrackCue } from "../model";
3
+ export interface SaveCueDelete {
4
+ deleteCue: ((trackCue: SaveTrackCue) => void) | null;
5
+ }
6
+ export declare const saveCueDeleteSlice: import("@reduxjs/toolkit").Slice<SaveCueDelete, {
7
+ setDeleteCueCallback: (state: import("immer/dist/internal").WritableDraft<SaveCueDelete>, action: {
8
+ payload: (trackCue: SaveTrackCue) => void;
9
+ type: string;
10
+ }) => void;
11
+ }, "saveCueDelete">;
12
+ export declare const callSaveCueDelete: (getState: Function, cueToDelete: CueDto) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ import { SaveTrackCue } from "../model";
3
+ import { AppThunk } from "../manuCapReducers";
4
+ export interface SaveCueUpdateCallback {
5
+ updateCue: ((trackCue: SaveTrackCue) => void) | null;
6
+ }
7
+ export declare const saveCueUpdateSlice: import("@reduxjs/toolkit").Slice<SaveCueUpdateCallback, {
8
+ setUpdateCueCallback: (state: import("immer/dist/internal").WritableDraft<SaveCueUpdateCallback>, action: {
9
+ payload: (trackCue: SaveTrackCue) => void;
10
+ type: string;
11
+ }) => void;
12
+ }, "saveCueUpdate">;
13
+ export declare const callSaveCueUpdate: (cueIndex: number) => AppThunk;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ import { AppThunk } from "../manuCapReducers";
3
+ import { Dispatch } from "react";
4
+ import { CueDto, ManuCapAction, Track } from "../model";
5
+ interface SaveActionWithPayload extends ManuCapAction {
6
+ cues: CueDto[];
7
+ editingTrack: Track | null;
8
+ shouldCreateNewVersion: boolean;
9
+ }
10
+ export declare const saveTrackSlice: import("@reduxjs/toolkit").Slice<Function | null, {
11
+ set: (_state: Function | null, action: PayloadAction<Function>) => Function;
12
+ call: (state: Function | null, action: PayloadAction<SaveActionWithPayload>) => Function | null;
13
+ }, "callSaveTrack">;
14
+ export declare const setSaveTrack: (saveTrack: Function) => AppThunk;
15
+ export declare const callSaveTrack: (dispatch: Dispatch<PayloadAction<ManuCapAction>>, getState: Function) => void;
16
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from "react";
2
+ declare const SearchReplaceEditor: () => ReactElement | null;
3
+ export default SearchReplaceEditor;
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from "react";
2
+ interface Props {
3
+ children: ReactElement;
4
+ }
5
+ export declare const SearchReplaceMatch: (props: Props) => ReactElement;
6
+ export {};
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,16 @@
1
+ export declare type SearchDirection = "NEXT" | "PREVIOUS";
2
+ export interface SearchReplace {
3
+ find: string;
4
+ replacement: string;
5
+ matchCase: boolean;
6
+ direction: SearchDirection;
7
+ indices: SearchReplaceIndices;
8
+ }
9
+ export interface SearchReplaceIndices {
10
+ matchedCueIndex: number;
11
+ sourceCueIndex: number;
12
+ targetCueIndex: number;
13
+ offset: number;
14
+ offsetIndex: number;
15
+ matchLength: number;
16
+ }
@@ -0,0 +1,22 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ import { AppThunk } from "../../manuCapReducers";
3
+ import { SearchDirection, SearchReplace, SearchReplaceIndices } from "./model";
4
+ export declare const searchReplaceVisibleSlice: import("@reduxjs/toolkit").Slice<boolean, {
5
+ setSearchReplaceVisible: (_state: boolean, action: PayloadAction<boolean>) => boolean;
6
+ }, "searchReplaceVisible">;
7
+ export declare const searchReplaceSlice: import("@reduxjs/toolkit").Slice<SearchReplace, {
8
+ setFind: (_state: import("immer/dist/internal").WritableDraft<SearchReplace>, action: PayloadAction<string>) => void;
9
+ setReplacement: (_state: import("immer/dist/internal").WritableDraft<SearchReplace>, action: PayloadAction<string>) => void;
10
+ setMatchCase: (_state: import("immer/dist/internal").WritableDraft<SearchReplace>, action: PayloadAction<boolean>) => void;
11
+ setDirection: (_state: import("immer/dist/internal").WritableDraft<SearchReplace>, action: PayloadAction<SearchDirection>) => void;
12
+ replaceMatchSignal: (state: import("immer/dist/internal").WritableDraft<SearchReplace>, action: PayloadAction<string>) => void;
13
+ setIndices: (state: import("immer/dist/internal").WritableDraft<SearchReplace>, action: PayloadAction<SearchReplaceIndices>) => void;
14
+ }, "searchReplace">;
15
+ export declare const setFind: (find: string) => AppThunk;
16
+ export declare const setReplacement: (replacement: string) => AppThunk;
17
+ export declare const setMatchCase: (matchCase: boolean) => AppThunk;
18
+ export declare const showSearchReplace: (visible: boolean) => AppThunk;
19
+ export declare const searchCueText: (text: string, find: string, matchCase: boolean) => Array<number>;
20
+ export declare const searchNextCues: () => AppThunk;
21
+ export declare const searchPreviousCues: () => AppThunk;
22
+ export declare const replaceCurrentMatch: (replacement: string) => AppThunk;
@@ -0,0 +1,17 @@
1
+ import { ReactElement, RefObject } from "react";
2
+ import { SpellCheck } from "./model";
3
+ interface Props {
4
+ children: ReactElement;
5
+ spellCheck: SpellCheck;
6
+ start: number;
7
+ end: number;
8
+ correctSpelling: (replacement: string, start: number, end: number) => void;
9
+ spellCheckerMatchingOffset: number | null;
10
+ setSpellCheckerMatchingOffset: (id: number | null) => void;
11
+ editorRef: RefObject<HTMLInputElement>;
12
+ bindCueViewModeKeyboardShortcut: () => void;
13
+ unbindCueViewModeKeyboardShortcut: () => void;
14
+ trackId: string;
15
+ }
16
+ export declare const SpellCheckIssue: (props: Props) => ReactElement | null;
17
+ export {};
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,33 @@
1
+ export interface Replacement {
2
+ value: string;
3
+ }
4
+ export interface SpellCheckHash {
5
+ keyword: string;
6
+ ruleId: string;
7
+ }
8
+ export interface SpellcheckRule {
9
+ id: string;
10
+ }
11
+ export interface SpellcheckContext {
12
+ length: number;
13
+ offset: number;
14
+ text: string;
15
+ }
16
+ export interface Match {
17
+ context: SpellcheckContext;
18
+ message: string;
19
+ replacements: Replacement[];
20
+ offset: number;
21
+ length: number;
22
+ rule: SpellcheckRule;
23
+ }
24
+ export interface SpellCheck {
25
+ matches: Match[];
26
+ }
27
+ export interface SpellCheckIgnore {
28
+ hashes: Array<string>;
29
+ creationDate: Date;
30
+ }
31
+ export interface SpellCheckIgnoreStorage {
32
+ trackId: SpellCheckIgnore;
33
+ }
@@ -0,0 +1,5 @@
1
+ import { SpellCheck } from "./model";
2
+ import { SpellcheckerSettings, ManuCapAction } from "../../model";
3
+ import { Dispatch } from "react";
4
+ export declare const addSpellCheck: (dispatch: Dispatch<ManuCapAction | void>, index: number, spellCheck: SpellCheck, trackId?: string) => void;
5
+ export declare const fetchSpellCheck: (text: string, spellCheckerSettings: SpellcheckerSettings, language: string) => Promise<SpellCheck>;
@@ -0,0 +1,6 @@
1
+ import { Match } from "./model";
2
+ export declare const getMatchText: (match: Match) => string;
3
+ export declare const generateSpellcheckHash: (keyword: string, ruleId: string) => string;
4
+ export declare const addIgnoredKeyword: (trackId: string, keyword: string, ruleId: string) => void;
5
+ export declare const hasIgnoredKeyword: (match: Match, trackId?: string) => boolean;
6
+ export declare const languageToolLanguageMapping: Map<string, string>;
@@ -0,0 +1 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
@@ -0,0 +1,13 @@
1
+ import { ReactElement } from "react";
2
+ export interface CueViewProps {
3
+ targetCueIndex?: number;
4
+ targetCuesLength: number;
5
+ sourceCuesIndexes: number[];
6
+ nextTargetCueIndex: number;
7
+ className?: string;
8
+ children?: ReactElement;
9
+ editDisabled?: boolean;
10
+ matchedCueIndex?: number;
11
+ }
12
+ declare const ClickCueWrapper: (props: CueViewProps) => ReactElement;
13
+ export default ClickCueWrapper;
@@ -0,0 +1,2 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
2
+ import "video.js";
@@ -0,0 +1,21 @@
1
+ import { ReactElement } from "react";
2
+ import { CueDto, LanguageDirection } from "../../model";
3
+ export interface CueViewProps {
4
+ rowIndex: number;
5
+ cue: CueDto;
6
+ isTargetCue: boolean;
7
+ targetCuesLength: number;
8
+ showGlossaryTerms: boolean;
9
+ sourceCuesIndexes: number[];
10
+ nextTargetCueIndex: number;
11
+ matchedNestedIndex?: number;
12
+ targetCueIndex?: number;
13
+ languageDirection?: LanguageDirection;
14
+ className?: string;
15
+ hideText?: boolean;
16
+ glossaryTerm?: string;
17
+ setGlossaryTerm?: (glossaryTerm?: string) => void;
18
+ editDisabled?: boolean;
19
+ }
20
+ declare const CueView: (props: CueViewProps) => ReactElement;
21
+ export default CueView;
@@ -0,0 +1,2 @@
1
+ import "../../../testUtils/initBrowserEnvironment";
2
+ import "video.js";
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from "react";
2
+ declare const InsertCueButton: () => ReactElement;
3
+ export default InsertCueButton;
@@ -0,0 +1,11 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ import { CueDto, ManuCapAction } from "../../model";
3
+ import { AppThunk } from "../../manuCapReducers";
4
+ interface CuesAction extends ManuCapAction {
5
+ cues: CueDto[];
6
+ }
7
+ export declare const sourceCuesSlice: import("@reduxjs/toolkit").Slice<CueDto[], {
8
+ updateSourceCues: (_state: import("immer/dist/internal").WritableDraft<CueDto>[], action: PayloadAction<CuesAction>) => CueDto[];
9
+ }, "sourceCues">;
10
+ export declare const updateSourceCues: (cues: CueDto[]) => AppThunk;
11
+ export {};
@@ -0,0 +1 @@
1
+ import "video.js";
@@ -0,0 +1,2 @@
1
+ import { LoadingIndicator } from "./model";
2
+ export declare const loadingIndicatorSlices: import("@reduxjs/toolkit").Slice<LoadingIndicator, {}, "loadingIndicator">;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
1
+ import { Action } from "@reduxjs/toolkit";
2
+ import { ThunkAction } from "redux-thunk";
3
+ export declare const Reducers: {
4
+ cues: import("redux").Reducer<import("./model").CueDto[], import("redux").AnyAction>;
5
+ editingTrack: import("redux").Reducer<import("./model").Track | null, import("redux").AnyAction>;
6
+ captionSpecifications: import("redux").Reducer<import("./toolbox/model").CaptionSpecification | null, import("redux").AnyAction>;
7
+ sourceCues: import("redux").Reducer<import("./model").CueDto[], import("redux").AnyAction>;
8
+ videoSectionToPlay: import("redux").Reducer<import("./player/playbackSlices").PlayVideoAction, import("redux").AnyAction>;
9
+ loadingIndicator: import("redux").Reducer<import("./model").LoadingIndicator, import("redux").AnyAction>;
10
+ saveTrack: import("redux").Reducer<Function | null, import("redux").AnyAction>;
11
+ saveCueUpdate: import("redux").Reducer<import("./cues/saveCueUpdateSlices").SaveCueUpdateCallback, import("redux").AnyAction>;
12
+ saveCueDelete: import("redux").Reducer<import("./cues/saveCueDeleteSlices").SaveCueDelete, import("redux").AnyAction>;
13
+ spellCheckerSettings: import("redux").Reducer<any, import("redux").AnyAction>;
14
+ searchReplace: import("redux").Reducer<import("./cues/searchReplace/model").SearchReplace, import("redux").AnyAction>;
15
+ searchReplaceVisible: import("redux").Reducer<boolean, import("redux").AnyAction>;
16
+ mergeVisible: import("redux").Reducer<boolean, import("redux").AnyAction>;
17
+ rowsToMerge: import("redux").Reducer<import("./model").CuesWithRowIndex[], import("redux").AnyAction>;
18
+ captionUser: import("redux").Reducer<import("./model").User | null, import("redux").AnyAction>;
19
+ editingCueIndex: import("redux").Reducer<number, import("redux").AnyAction>;
20
+ lastCueChange: import("redux").Reducer<import("./model").CueChange | null, import("redux").AnyAction>;
21
+ validationErrors: import("redux").Reducer<import("./model").CueError[], import("redux").AnyAction>;
22
+ focusedCueIndex: import("redux").Reducer<number | null, import("redux").AnyAction>;
23
+ matchedCues: import("redux").Reducer<import("./cues/cuesList/cuesListTimeMatching").MatchedCuesWithEditingFocus, import("redux").AnyAction>;
24
+ currentPlayerTime: import("redux").Reducer<number, import("redux").AnyAction>;
25
+ commentsVisible: import("redux").Reducer<boolean, import("redux").AnyAction>;
26
+ waveformVisible: import("redux").Reducer<boolean, import("redux").AnyAction>;
27
+ currentCueErrorIndex: import("redux").Reducer<number, import("redux").AnyAction>;
28
+ focusedInput: import("redux").Reducer<"EDITOR" | "START_TIME", import("redux").AnyAction>;
29
+ };
30
+ declare const manuCapReducers: import("redux").Reducer<import("redux").CombinedState<{
31
+ cues: import("./model").CueDto[];
32
+ editingTrack: import("./model").Track | null;
33
+ captionSpecifications: import("./toolbox/model").CaptionSpecification | null;
34
+ sourceCues: import("./model").CueDto[];
35
+ videoSectionToPlay: import("./player/playbackSlices").PlayVideoAction;
36
+ loadingIndicator: import("./model").LoadingIndicator;
37
+ saveTrack: Function | null;
38
+ saveCueUpdate: import("./cues/saveCueUpdateSlices").SaveCueUpdateCallback;
39
+ saveCueDelete: import("./cues/saveCueDeleteSlices").SaveCueDelete;
40
+ spellCheckerSettings: any;
41
+ searchReplace: import("./cues/searchReplace/model").SearchReplace;
42
+ searchReplaceVisible: boolean;
43
+ mergeVisible: boolean;
44
+ rowsToMerge: import("./model").CuesWithRowIndex[];
45
+ captionUser: import("./model").User | null;
46
+ editingCueIndex: number;
47
+ lastCueChange: import("./model").CueChange | null;
48
+ validationErrors: import("./model").CueError[];
49
+ focusedCueIndex: number | null;
50
+ matchedCues: import("./cues/cuesList/cuesListTimeMatching").MatchedCuesWithEditingFocus;
51
+ currentPlayerTime: number;
52
+ commentsVisible: boolean;
53
+ waveformVisible: boolean;
54
+ currentCueErrorIndex: number;
55
+ focusedInput: "EDITOR" | "START_TIME";
56
+ }>, import("redux").AnyAction>;
57
+ export default manuCapReducers;
58
+ export declare type ManuCapState = ReturnType<typeof manuCapReducers>;
59
+ /**
60
+ * We are forced to use `as {} as AnyAction` casting then we are executing actions with `testingStore.dispatch`.
61
+ * This seems to be related problem: https://github.com/reduxjs/redux-toolkit/issues/321.
62
+ * But no suggestions from that issue work nor mentioned fix didn't work. I couldn't figure out any other fix than
63
+ * applying ugly cast workaround.
64
+ */
65
+ export declare type AppThunk = ThunkAction<void, ManuCapState, unknown, Action<string>>;
@@ -0,0 +1,174 @@
1
+ import { SpellCheck } from "./cues/spellCheck/model";
2
+ export declare type TrackType = "CAPTION" | "TRANSLATION";
3
+ export declare type LanguageDirection = "RTL" | "LTR";
4
+ export interface Language {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly direction?: LanguageDirection;
8
+ countryCode?: string;
9
+ alpha1Code?: string;
10
+ alpha2TCode?: string;
11
+ alpha2BCode?: string;
12
+ code?: string | null;
13
+ localizedName?: string;
14
+ }
15
+ export declare type CueCategory = "DIALOGUE" | "ONSCREEN_TEXT" | "AUDIO_DESCRIPTION" | "LYRICS";
16
+ export interface GlossaryMatchDto {
17
+ source: string;
18
+ replacements: string[];
19
+ }
20
+ export declare enum CueLineState {
21
+ NONE = 0,
22
+ GOOD = 1,
23
+ ERROR = 2
24
+ }
25
+ export declare const CUE_LINE_STATE_CLASSES: Map<CueLineState, {
26
+ dividerClass: string;
27
+ flapClass: string;
28
+ }>;
29
+ export interface CueDto {
30
+ id?: string;
31
+ readonly vttCue: VTTCue;
32
+ readonly cueCategory: CueCategory;
33
+ editUuid?: string;
34
+ editDisabled?: boolean;
35
+ spellCheck?: SpellCheck;
36
+ glossaryMatches?: GlossaryMatchDto[];
37
+ errors?: CueError[] | null;
38
+ comments?: CueComment[];
39
+ trackVersionId?: string;
40
+ trackVersionLockingVersion?: number;
41
+ addId?: string;
42
+ }
43
+ export interface CueDtoWithIndex {
44
+ index: number;
45
+ cue: CueDto;
46
+ }
47
+ export interface CueLineDto {
48
+ sourceCues?: CueDtoWithIndex[];
49
+ targetCues?: CueDtoWithIndex[];
50
+ }
51
+ export interface CuesWithRowIndex {
52
+ index: number;
53
+ cues?: CueDtoWithIndex[];
54
+ }
55
+ export interface LanguageCues {
56
+ readonly languageId: string;
57
+ readonly cues: CueDto[];
58
+ }
59
+ export interface TrackVersionDto extends Track {
60
+ trackVersionId: string;
61
+ completion: number;
62
+ }
63
+ export interface Track {
64
+ readonly type: TrackType;
65
+ readonly language: Language;
66
+ readonly default: boolean;
67
+ readonly mediaTitle: string;
68
+ readonly mediaLength: number;
69
+ readonly mediaChunkStart?: number;
70
+ readonly mediaChunkEnd?: number;
71
+ readonly sourceLanguage?: Language;
72
+ trackSource?: boolean;
73
+ readonly progress: number;
74
+ overlapEnabled?: boolean;
75
+ timecodesUnlocked?: boolean;
76
+ id?: string;
77
+ createdBy: User;
78
+ currentVersion: TrackVersionDto;
79
+ createdAt: string;
80
+ title: string;
81
+ trackId: string;
82
+ name: string;
83
+ }
84
+ export interface SpellcheckerSettings {
85
+ enabled: boolean;
86
+ domain: string | null | undefined;
87
+ }
88
+ export interface User {
89
+ userId: string;
90
+ firstname: string;
91
+ lastname: string;
92
+ email: string;
93
+ systemAdmin: string;
94
+ displayName: string;
95
+ }
96
+ /**
97
+ * This is marker interface for all the actions that can be dispatched
98
+ */
99
+ export interface ManuCapAction {
100
+ }
101
+ export interface TimeGapLimit {
102
+ minGap: number;
103
+ maxGap: number;
104
+ }
105
+ export interface LoadingIndicator {
106
+ cuesLoaded: boolean;
107
+ sourceCuesLoaded: boolean;
108
+ }
109
+ export interface CueChange {
110
+ changeType: "ADD" | "EDIT" | "REMOVE" | "SPLIT" | "MERGE" | "UPDATE_ALL";
111
+ index: number;
112
+ vttCue?: VTTCue;
113
+ }
114
+ /**
115
+ * Declare video cue scroll position
116
+ * @author Mario Dennis
117
+ * @param FIRST - scrolls to first cue item
118
+ * @param LAST - scrolls to last cue item
119
+ * @param CURRENT - scroll to cue item currently being edited
120
+ * @param PLAYBACK - scroll to currently playing media track cue item
121
+ * @param LAST_TRANSLATED - scroll to last translated cue
122
+ */
123
+ export declare enum ScrollPosition {
124
+ NONE = 0,
125
+ FIRST = 1,
126
+ LAST = 2,
127
+ CURRENT = 3,
128
+ PLAYBACK = 4,
129
+ LAST_TRANSLATED = 5,
130
+ NEXT_PAGE = 6,
131
+ PREVIOUS_PAGE = 7,
132
+ ERROR = 8
133
+ }
134
+ export declare enum CueError {
135
+ LINE_CHAR_LIMIT_EXCEEDED = "Max Characters Per Line Exceeded",
136
+ LINE_COUNT_EXCEEDED = "Max Lines Per Caption Exceeded",
137
+ TIME_GAP_LIMIT_EXCEEDED = "Min/Max Caption Duration In Seconds Exceeded",
138
+ TIME_GAP_OVERLAP = "Cue Overlap",
139
+ SPELLCHECK_ERROR = "Spelling Error(s)",
140
+ INVALID_RANGE_START = "Invalid Start Time",
141
+ INVALID_RANGE_END = "Invalid End Time",
142
+ OUT_OF_CHUNK_RAGE = "Out of Chunk Range",
143
+ MERGE_ERROR = "Merged caption is too long/Not enough captions selected",
144
+ SPLIT_ERROR = "Caption is too short to split",
145
+ CHARS_PER_SECOND_EXCEEDED = "Max Characters Per Second Exceeded"
146
+ }
147
+ export interface CueComment {
148
+ id?: string;
149
+ userId?: string;
150
+ userName?: string;
151
+ author?: string;
152
+ comment: string;
153
+ date: string;
154
+ }
155
+ export interface WaveformRegion {
156
+ id: number;
157
+ start: number;
158
+ end: number;
159
+ }
160
+ export interface TrackCues {
161
+ editingTrack: Track | null;
162
+ cues: CueDto[];
163
+ }
164
+ export interface SaveTrackCue {
165
+ editingTrack: Track;
166
+ cue: CueDto;
167
+ onAddCueSaveSuccess: (cueDto: CueDto) => void;
168
+ }
169
+ export interface SaveActionParameters {
170
+ cues: CueDto[];
171
+ editingTrack: Track;
172
+ shouldCreateNewVersion: boolean;
173
+ }
174
+ export declare type SaveState = "NONE" | "TRIGGERED" | "SAVED" | "ERROR";