@striae-org/striae 3.2.1 → 3.2.2
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.
- package/app/components/actions/case-export/core-export.ts +2 -2
- package/app/components/actions/case-export/data-processing.ts +19 -4
- package/app/components/actions/case-export/download-handlers.ts +6 -5
- package/app/components/actions/case-export/metadata-helpers.ts +1 -1
- package/app/components/actions/case-import/annotation-import.ts +2 -2
- package/app/components/actions/case-import/confirmation-import.ts +3 -3
- package/app/components/actions/case-import/image-operations.ts +1 -1
- package/app/components/actions/case-import/orchestrator.ts +4 -4
- package/app/components/actions/case-import/storage-operations.ts +7 -7
- package/app/components/actions/case-import/validation.ts +3 -3
- package/app/components/actions/case-import/zip-processing.ts +3 -3
- package/app/components/actions/case-manage.ts +3 -3
- package/app/components/actions/confirm-export.ts +3 -3
- package/app/components/actions/generate-pdf.ts +3 -3
- package/app/components/actions/image-manage.ts +3 -3
- package/app/components/actions/notes-manage.ts +3 -3
- package/app/components/actions/signout.tsx +1 -1
- package/app/components/audit/user-audit-viewer.tsx +2 -3
- package/app/components/auth/auth-provider.tsx +2 -2
- package/app/components/auth/mfa-enrollment.tsx +3 -3
- package/app/components/auth/mfa-verification.tsx +4 -4
- package/app/components/canvas/box-annotations/box-annotations.tsx +2 -2
- package/app/components/canvas/canvas.tsx +1 -1
- package/app/components/canvas/confirmation/confirmation.tsx +1 -1
- package/app/components/sidebar/case-import/case-import.tsx +2 -2
- package/app/components/sidebar/case-import/components/CasePreviewSection.tsx +1 -1
- package/app/components/sidebar/case-import/components/ConfirmationDialog.tsx +1 -1
- package/app/components/sidebar/case-import/hooks/useFilePreview.ts +3 -3
- package/app/components/sidebar/case-import/hooks/useImportExecution.ts +2 -2
- package/app/components/sidebar/cases/case-sidebar.tsx +5 -4
- package/app/components/sidebar/cases/cases-modal.tsx +1 -1
- package/app/components/sidebar/files/files-modal.tsx +3 -2
- package/app/components/sidebar/notes/notes-sidebar.tsx +3 -3
- package/app/components/sidebar/sidebar-container.tsx +4 -3
- package/app/components/sidebar/sidebar.tsx +2 -2
- package/app/components/sidebar/upload/image-upload-zone.tsx +2 -2
- package/app/components/theme-provider/theme-provider.tsx +1 -1
- package/app/components/user/delete-account.tsx +1 -1
- package/app/components/user/manage-profile.tsx +2 -2
- package/app/components/user/mfa-phone-update.tsx +2 -2
- package/app/contexts/auth.context.ts +1 -1
- package/app/routes/auth/emailActionHandler.tsx +2 -2
- package/app/routes/auth/emailVerification.tsx +2 -2
- package/app/routes/auth/login.tsx +5 -5
- package/app/routes/auth/passwordReset.tsx +2 -2
- package/app/routes/striae/striae.tsx +2 -2
- package/app/services/audit/audit-console-logger.ts +46 -0
- package/app/services/audit/audit-export-csv.ts +126 -0
- package/app/services/audit/audit-export-report.ts +174 -0
- package/app/services/audit/audit-export-signing.ts +85 -0
- package/app/services/audit/audit-export.service.ts +334 -0
- package/app/services/audit/audit-file-type.ts +13 -0
- package/app/services/audit/audit-query-helpers.ts +88 -0
- package/app/services/audit/audit-worker-client.ts +95 -0
- package/app/services/audit/audit.service.ts +990 -0
- package/app/services/audit/builders/audit-entry-builder.ts +32 -0
- package/app/services/audit/builders/audit-event-builders-annotation.ts +150 -0
- package/app/services/audit/builders/audit-event-builders-case-file.ts +249 -0
- package/app/services/audit/builders/audit-event-builders-user-security.ts +449 -0
- package/app/services/audit/builders/audit-event-builders-workflow.ts +272 -0
- package/app/services/audit/builders/index.ts +40 -0
- package/app/services/audit/index.ts +2 -0
- package/app/types/case.ts +2 -2
- package/app/types/exceljs-bare.d.ts +3 -1
- package/app/types/user.ts +1 -1
- package/app/utils/audit-export-signature.ts +2 -2
- package/app/utils/confirmation-signature.ts +3 -3
- package/app/utils/data-operations.ts +5 -5
- package/app/utils/mfa-phone.ts +1 -1
- package/app/utils/mfa.ts +1 -1
- package/app/utils/permissions.ts +2 -2
- package/package.json +7 -8
- package/worker-configuration.d.ts +4435 -562
- package/workers/data-worker/src/data-worker.example.ts +3 -3
- package/workers/pdf-worker/src/{generated-assets.ts → assets/generated-assets.ts} +117 -117
- package/workers/pdf-worker/src/{format-striae.ts → formats/format-striae.ts} +535 -535
- package/workers/pdf-worker/src/pdf-worker.example.ts +1 -1
- package/app/services/audit-export.service.ts +0 -755
- package/app/services/audit.service.ts +0 -1474
- /package/app/services/{firebase-errors.ts → firebase/errors.ts} +0 -0
- /package/app/services/{firebase.ts → firebase/index.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
import { AnnotationData, CaseExportData, AllCasesExportData, ExportOptions } from '~/types';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
|
+
import { type AnnotationData, type CaseExportData, type AllCasesExportData, type ExportOptions } from '~/types';
|
|
3
3
|
import { fetchFiles } from '../image-manage';
|
|
4
4
|
import { getNotes } from '../notes-manage';
|
|
5
5
|
import { checkExistingCase, validateCaseNumber, listCases } from '../case-manage';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CaseExportData } from '~/types';
|
|
1
|
+
import { type CaseExportData } from '~/types';
|
|
2
2
|
import { calculateSHA256Secure } from '~/utils/SHA256';
|
|
3
3
|
import { CSV_HEADERS } from './types-constants';
|
|
4
4
|
import { addForensicDataWarning } from './metadata-helpers';
|
|
@@ -6,8 +6,23 @@ import { addForensicDataWarning } from './metadata-helpers';
|
|
|
6
6
|
export type TabularCell = string | number | boolean | null;
|
|
7
7
|
|
|
8
8
|
const MAX_SPREADSHEET_CELL_LENGTH = 32767;
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const DANGEROUS_FORMULA_PREFIX_PATTERN = /^\s*[=+\-@]/;
|
|
10
|
+
|
|
11
|
+
function stripUnsafeControlChars(input: string): string {
|
|
12
|
+
let output = '';
|
|
13
|
+
|
|
14
|
+
for (let index = 0; index < input.length; index += 1) {
|
|
15
|
+
const code = input.charCodeAt(index);
|
|
16
|
+
const isControlChar = code <= 0x1f || code === 0x7f;
|
|
17
|
+
const isAllowedWhitespace = code === 0x09 || code === 0x0a || code === 0x0d;
|
|
18
|
+
|
|
19
|
+
if (!isControlChar || isAllowedWhitespace) {
|
|
20
|
+
output += input[index];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return output;
|
|
25
|
+
}
|
|
11
26
|
|
|
12
27
|
/**
|
|
13
28
|
* Sanitize cell values before CSV/XLSX export.
|
|
@@ -24,7 +39,7 @@ export function sanitizeTabularCell(value: unknown): TabularCell {
|
|
|
24
39
|
return value;
|
|
25
40
|
}
|
|
26
41
|
|
|
27
|
-
let normalized = String(value)
|
|
42
|
+
let normalized = stripUnsafeControlChars(String(value));
|
|
28
43
|
|
|
29
44
|
if (normalized.length > MAX_SPREADSHEET_CELL_LENGTH) {
|
|
30
45
|
normalized = normalized.slice(0, MAX_SPREADSHEET_CELL_LENGTH);
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
import
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
|
+
import type * as ExcelJSModule from 'exceljs';
|
|
3
|
+
import { type FileData, type AllCasesExportData, type CaseExportData, type ExportOptions } from '~/types';
|
|
3
4
|
import { getImageUrl } from '../image-manage';
|
|
4
5
|
import { generateForensicManifestSecure, calculateSHA256Secure } from '~/utils/SHA256';
|
|
5
6
|
import { signForensicManifest } from '~/utils/data-operations';
|
|
6
|
-
import { ExportFormat, formatDateForFilename, CSV_HEADERS } from './types-constants';
|
|
7
|
+
import { type ExportFormat, formatDateForFilename, CSV_HEADERS } from './types-constants';
|
|
7
8
|
import { protectExcelWorksheet, addForensicDataWarning } from './metadata-helpers';
|
|
8
9
|
import { generateMetadataRows, generateCSVContent, processFileDataForTabular, sanitizeTabularMatrix } from './data-processing';
|
|
9
10
|
import { exportCaseData } from './core-export';
|
|
10
|
-
import { auditService } from '~/services/audit
|
|
11
|
+
import { auditService } from '~/services/audit';
|
|
11
12
|
|
|
12
13
|
type TabularRow = Array<string | number | boolean | null | undefined>;
|
|
13
|
-
type ExcelJsBrowserBundle = typeof
|
|
14
|
+
type ExcelJsBrowserBundle = typeof ExcelJSModule;
|
|
14
15
|
|
|
15
16
|
const EXCELJS_BROWSER_BUNDLE_SRC = '/vendor/exceljs.bare.min.js';
|
|
16
17
|
let excelJsBundlePromise: Promise<ExcelJsBrowserBundle> | null = null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import paths from '~/config/config.json';
|
|
3
3
|
import { getDataApiKey } from '~/utils/auth';
|
|
4
|
-
import { ConfirmationImportResult, ConfirmationImportData } from '~/types';
|
|
4
|
+
import { type ConfirmationImportResult, type ConfirmationImportData } from '~/types';
|
|
5
5
|
import { checkExistingCase } from '../case-manage';
|
|
6
6
|
import { validateExporterUid, validateConfirmationHash, validateConfirmationSignatureFile } from './validation';
|
|
7
|
-
import { auditService } from '~/services/audit
|
|
7
|
+
import { auditService } from '~/services/audit';
|
|
8
8
|
|
|
9
9
|
const DATA_WORKER_URL = paths.data_worker_url;
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import paths from '~/config/config.json';
|
|
2
2
|
import { getImageApiKey } from '~/utils/auth';
|
|
3
|
-
import { FileData, ImageUploadResponse } from '~/types';
|
|
3
|
+
import { type FileData, type ImageUploadResponse } from '~/types';
|
|
4
4
|
|
|
5
5
|
const IMAGE_WORKER_URL = paths.image_worker_url;
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
import { ImportOptions, ImportResult, ReadOnlyCaseMetadata, FileData } from '~/types';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
|
+
import { type ImportOptions, type ImportResult, type ReadOnlyCaseMetadata, type FileData } from '~/types';
|
|
3
3
|
import { checkExistingCase } from '../case-manage';
|
|
4
4
|
import {
|
|
5
5
|
extractForensicManifestData,
|
|
6
|
-
SignedForensicManifest,
|
|
6
|
+
type SignedForensicManifest,
|
|
7
7
|
validateCaseIntegritySecure as validateForensicIntegrity,
|
|
8
8
|
verifyForensicManifestSignature
|
|
9
9
|
} from '~/utils/SHA256';
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from './storage-operations';
|
|
20
20
|
import { uploadImageBlob } from './image-operations';
|
|
21
21
|
import { importAnnotations } from './annotation-import';
|
|
22
|
-
import { auditService } from '~/services/audit
|
|
22
|
+
import { auditService } from '~/services/audit';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Track the state of an import operation for cleanup purposes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import paths from '~/config/config.json';
|
|
3
3
|
import {
|
|
4
4
|
getDataApiKey,
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
validateUserSession
|
|
11
11
|
} from '~/utils/permissions';
|
|
12
12
|
import {
|
|
13
|
-
CaseExportData,
|
|
14
|
-
ExtendedUserData,
|
|
15
|
-
FileData,
|
|
16
|
-
CaseData,
|
|
17
|
-
ReadOnlyCaseMetadata
|
|
13
|
+
type CaseExportData,
|
|
14
|
+
type ExtendedUserData,
|
|
15
|
+
type FileData,
|
|
16
|
+
type CaseData,
|
|
17
|
+
type ReadOnlyCaseMetadata
|
|
18
18
|
} from '~/types';
|
|
19
19
|
import { deleteFile } from '../image-manage';
|
|
20
|
-
import { SignedForensicManifest } from '~/utils/SHA256';
|
|
20
|
+
import { type SignedForensicManifest } from '~/utils/SHA256';
|
|
21
21
|
|
|
22
22
|
const USER_WORKER_URL = paths.user_worker_url;
|
|
23
23
|
const DATA_WORKER_URL = paths.data_worker_url;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import paths from '~/config/config.json';
|
|
3
3
|
import { getUserApiKey } from '~/utils/auth';
|
|
4
|
-
import { CaseExportData, ConfirmationImportData } from '~/types';
|
|
5
|
-
import { calculateSHA256Secure, ManifestSignatureVerificationResult } from '~/utils/SHA256';
|
|
4
|
+
import { type CaseExportData, type ConfirmationImportData } from '~/types';
|
|
5
|
+
import { calculateSHA256Secure, type ManifestSignatureVerificationResult } from '~/utils/SHA256';
|
|
6
6
|
import { verifyConfirmationSignature } from '~/utils/confirmation-signature';
|
|
7
7
|
|
|
8
8
|
const USER_WORKER_URL = paths.user_worker_url;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
import { CaseExportData, CaseImportPreview } from '~/types';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
|
+
import { type CaseExportData, type CaseImportPreview } from '~/types';
|
|
3
3
|
import { validateCaseNumber } from '../case-manage';
|
|
4
4
|
import {
|
|
5
5
|
extractForensicManifestData,
|
|
6
|
-
SignedForensicManifest,
|
|
6
|
+
type SignedForensicManifest,
|
|
7
7
|
validateCaseIntegritySecure as validateForensicIntegrity,
|
|
8
8
|
verifyForensicManifestSignature
|
|
9
9
|
} from '~/utils/SHA256';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import {
|
|
3
3
|
canCreateCase,
|
|
4
4
|
getUserCases,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
duplicateCaseData,
|
|
14
14
|
deleteFileAnnotations
|
|
15
15
|
} from '~/utils/data-operations';
|
|
16
|
-
import { CaseData, ReadOnlyCaseData, FileData } from '~/types';
|
|
17
|
-
import { auditService } from '~/services/audit
|
|
16
|
+
import { type CaseData, type ReadOnlyCaseData, type FileData } from '~/types';
|
|
17
|
+
import { auditService } from '~/services/audit';
|
|
18
18
|
import { getImageApiKey } from '~/utils/auth';
|
|
19
19
|
import paths from '~/config/config.json';
|
|
20
20
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import { calculateSHA256Secure } from '~/utils/SHA256';
|
|
3
3
|
import { getUserData } from '~/utils/permissions';
|
|
4
4
|
import { getCaseData, updateCaseData, signConfirmationData } from '~/utils/data-operations';
|
|
5
|
-
import { ConfirmationData, CaseConfirmations, CaseDataWithConfirmations, ConfirmationImportData } from '~/types';
|
|
6
|
-
import { auditService } from '~/services/audit
|
|
5
|
+
import { type ConfirmationData, type CaseConfirmations, type CaseDataWithConfirmations, type ConfirmationImportData } from '~/types';
|
|
6
|
+
import { auditService } from '~/services/audit';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Store a confirmation for a specific image, linked to the original image ID
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import paths from '~/config/config.json';
|
|
2
|
-
import { AnnotationData } from '~/types/annotations';
|
|
3
|
-
import { auditService } from '~/services/audit
|
|
2
|
+
import { type AnnotationData } from '~/types/annotations';
|
|
3
|
+
import { auditService } from '~/services/audit';
|
|
4
4
|
import { getPdfApiKey } from '~/utils/auth';
|
|
5
|
-
import { User } from 'firebase/auth';
|
|
5
|
+
import type { User } from 'firebase/auth';
|
|
6
6
|
|
|
7
7
|
interface GeneratePDFParams {
|
|
8
8
|
user: User;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import paths from '~/config/config.json';
|
|
3
3
|
import {
|
|
4
4
|
getImageApiKey,
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from '~/utils/auth';
|
|
7
7
|
import { canUploadFile } from '~/utils/permissions';
|
|
8
8
|
import { getCaseData, updateCaseData, deleteFileAnnotations } from '~/utils/data-operations';
|
|
9
|
-
import { CaseData, FileData, ImageUploadResponse } from '~/types';
|
|
10
|
-
import { auditService } from '~/services/audit
|
|
9
|
+
import type { CaseData, FileData, ImageUploadResponse } from '~/types';
|
|
10
|
+
import { auditService } from '~/services/audit';
|
|
11
11
|
|
|
12
12
|
const IMAGE_URL = paths.image_worker_url;
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
import { AnnotationData } from '~/types/annotations';
|
|
3
|
-
import { saveFileAnnotations, getFileAnnotations, DataOperationOptions } from '~/utils/data-operations';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
|
+
import { type AnnotationData } from '~/types/annotations';
|
|
3
|
+
import { saveFileAnnotations, getFileAnnotations, type DataOperationOptions } from '~/utils/data-operations';
|
|
4
4
|
|
|
5
5
|
export const saveNotes = async (
|
|
6
6
|
user: User,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect, useContext, useCallback } from 'react';
|
|
2
2
|
import { AuthContext } from '~/contexts/auth.context';
|
|
3
|
-
import { auditService } from '~/services/audit
|
|
4
|
-
import {
|
|
5
|
-
import { ValidationAuditEntry, AuditAction, AuditResult, AuditTrail, UserData, WorkflowPhase } from '~/types';
|
|
3
|
+
import { auditService, auditExportService } from '~/services/audit';
|
|
4
|
+
import { type ValidationAuditEntry, type AuditAction, type AuditResult, type AuditTrail, type UserData, type WorkflowPhase } from '~/types';
|
|
6
5
|
import { getUserData } from '~/utils/permissions';
|
|
7
6
|
import styles from './user-audit.module.css';
|
|
8
7
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { auth } from '~/services/firebase';
|
|
4
4
|
import { useInactivityTimeout } from '~/hooks/useInactivityTimeout';
|
|
5
5
|
import { INACTIVITY_CONFIG } from '~/config/inactivity';
|
|
6
6
|
import { AuthContext } from '~/contexts/auth.context';
|
|
7
7
|
import { InactivityWarning } from '~/components/user/inactivity-warning';
|
|
8
|
-
import { auditService } from '~/services/audit
|
|
8
|
+
import { auditService } from '~/services/audit';
|
|
9
9
|
import { generateUniqueId } from '~/utils/id-generator';
|
|
10
10
|
|
|
11
11
|
interface AuthProviderProps {
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
PhoneMultiFactorGenerator,
|
|
7
7
|
RecaptchaVerifier,
|
|
8
8
|
multiFactor,
|
|
9
|
-
User
|
|
9
|
+
type User
|
|
10
10
|
} from 'firebase/auth';
|
|
11
|
-
import { handleAuthError, getValidationError } from '~/services/firebase
|
|
11
|
+
import { handleAuthError, getValidationError } from '~/services/firebase/errors';
|
|
12
12
|
import { SignOut } from '~/components/actions/signout';
|
|
13
|
-
import { auditService } from '~/services/audit
|
|
13
|
+
import { auditService } from '~/services/audit';
|
|
14
14
|
import styles from './mfa-enrollment.module.css';
|
|
15
15
|
|
|
16
16
|
interface MFAEnrollmentProps {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
PhoneAuthProvider,
|
|
4
4
|
PhoneMultiFactorGenerator,
|
|
5
5
|
RecaptchaVerifier,
|
|
6
|
-
MultiFactorResolver,
|
|
7
|
-
UserCredential
|
|
6
|
+
type MultiFactorResolver,
|
|
7
|
+
type UserCredential
|
|
8
8
|
} from 'firebase/auth';
|
|
9
9
|
import { auth } from '~/services/firebase';
|
|
10
|
-
import { handleAuthError, getValidationError } from '~/services/firebase
|
|
10
|
+
import { handleAuthError, getValidationError } from '~/services/firebase/errors';
|
|
11
11
|
import { SignOut } from '~/components/actions/signout';
|
|
12
|
-
import { auditService } from '~/services/audit
|
|
12
|
+
import { auditService } from '~/services/audit';
|
|
13
13
|
import { generateUniqueId } from '~/utils/id-generator';
|
|
14
14
|
import styles from './mfa-verification.module.css';
|
|
15
15
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useCallback, useMemo, useRef, useEffect, useContext } from 'react';
|
|
2
|
-
import { BoxAnnotation } from '~/types';
|
|
2
|
+
import { type BoxAnnotation } from '~/types';
|
|
3
3
|
import { AuthContext } from '~/contexts/auth.context';
|
|
4
|
-
import { auditService } from '~/services/audit
|
|
4
|
+
import { auditService } from '~/services/audit';
|
|
5
5
|
import { resolveEarliestAnnotationTimestamp } from '~/utils/annotation-timestamp';
|
|
6
6
|
import styles from './box-annotations.module.css';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState, useRef, useContext, useCallback } from 'react';
|
|
2
2
|
import { BoxAnnotations } from './box-annotations/box-annotations';
|
|
3
3
|
import { ConfirmationModal } from './confirmation/confirmation';
|
|
4
|
-
import { AnnotationData, BoxAnnotation, ConfirmationData } from '~/types/annotations';
|
|
4
|
+
import { type AnnotationData, type BoxAnnotation, type ConfirmationData } from '~/types/annotations';
|
|
5
5
|
import { AuthContext } from '~/contexts/auth.context';
|
|
6
6
|
import { storeConfirmation } from '~/components/actions/confirm-export';
|
|
7
7
|
import styles from './canvas.module.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useContext } from 'react';
|
|
2
|
-
import { ConfirmationData } from '~/types/annotations';
|
|
2
|
+
import { type ConfirmationData } from '~/types/annotations';
|
|
3
3
|
import { AuthContext } from '~/contexts/auth.context';
|
|
4
4
|
import { generateConfirmationId } from '~/utils/id-generator';
|
|
5
5
|
import styles from './confirmation.module.css';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState, useCallback } from 'react';
|
|
2
|
-
import { User } from 'firebase/auth';
|
|
2
|
+
import type { User } from 'firebase/auth';
|
|
3
3
|
import { previewCaseImport } from '~/components/actions/case-review';
|
|
4
|
-
import { CaseImportPreview } from '~/types';
|
|
5
|
-
import { ConfirmationPreview } from '../components/ConfirmationPreviewSection';
|
|
4
|
+
import { type CaseImportPreview } from '~/types';
|
|
5
|
+
import { type ConfirmationPreview } from '../components/ConfirmationPreviewSection';
|
|
6
6
|
|
|
7
7
|
type UnknownRecord = Record<string, unknown>;
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
|
-
import { User } from 'firebase/auth';
|
|
2
|
+
import type { User } from 'firebase/auth';
|
|
3
3
|
import { importCaseForReview, importConfirmationData } from '~/components/actions/case-review';
|
|
4
|
-
import { ImportResult, ConfirmationImportResult } from '~/types';
|
|
4
|
+
import { type ImportResult, type ConfirmationImportResult } from '~/types';
|
|
5
5
|
|
|
6
6
|
interface ProgressState {
|
|
7
7
|
stage: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
|
+
import type * as CaseExportActions from '../../actions/case-export';
|
|
2
3
|
import { useState, useEffect, useMemo, useCallback } from 'react';
|
|
3
4
|
import styles from './cases.module.css';
|
|
4
5
|
import { CasesModal } from './cases-modal';
|
|
5
6
|
import { FilesModal } from '../files/files-modal';
|
|
6
|
-
import { CaseExport, ExportFormat } from '../case-export/case-export';
|
|
7
|
+
import { CaseExport, type ExportFormat } from '../case-export/case-export';
|
|
7
8
|
import { ImageUploadZone } from '../upload/image-upload-zone';
|
|
8
9
|
import { UserAuditViewer } from '~/components/audit/user-audit-viewer';
|
|
9
10
|
import {
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
getUserData
|
|
28
29
|
} from '~/utils/permissions';
|
|
29
30
|
import { getFileAnnotations } from '~/utils/data-operations';
|
|
30
|
-
import { FileData, CaseActionType } from '~/types';
|
|
31
|
+
import { type FileData, type CaseActionType } from '~/types';
|
|
31
32
|
|
|
32
33
|
interface CaseSidebarProps {
|
|
33
34
|
user: User;
|
|
@@ -57,7 +58,7 @@ interface CaseSidebarProps {
|
|
|
57
58
|
|
|
58
59
|
const SUCCESS_MESSAGE_TIMEOUT = 3000;
|
|
59
60
|
|
|
60
|
-
type CaseExportActionsModule = typeof
|
|
61
|
+
type CaseExportActionsModule = typeof CaseExportActions;
|
|
61
62
|
|
|
62
63
|
let caseExportActionsPromise: Promise<CaseExportActionsModule> | null = null;
|
|
63
64
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
-
import { User } from 'firebase/auth';
|
|
2
|
+
import type { User } from 'firebase/auth';
|
|
3
3
|
import { listCases } from '~/components/actions/case-manage';
|
|
4
4
|
import { getFileAnnotations } from '~/utils/data-operations';
|
|
5
5
|
import { fetchFiles } from '~/components/actions/image-manage';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { useState, useContext, useEffect } from 'react';
|
|
2
3
|
import { AuthContext } from '~/contexts/auth.context';
|
|
3
4
|
import { deleteFile } from '~/components/actions/image-manage';
|
|
4
5
|
import { getFileAnnotations } from '~/utils/data-operations';
|
|
5
|
-
import { FileData } from '~/types';
|
|
6
|
+
import { type FileData } from '~/types';
|
|
6
7
|
import styles from './files-modal.module.css';
|
|
7
8
|
|
|
8
9
|
interface FilesModalProps {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
-
import { User } from 'firebase/auth';
|
|
2
|
+
import type { User } from 'firebase/auth';
|
|
3
3
|
import { ColorSelector } from '~/components/colors/colors';
|
|
4
4
|
import { NotesModal } from './notes-modal';
|
|
5
5
|
import { getNotes, saveNotes } from '~/components/actions/notes-manage';
|
|
6
|
-
import { AnnotationData } from '~/types/annotations';
|
|
6
|
+
import { type AnnotationData } from '~/types/annotations';
|
|
7
7
|
import { resolveEarliestAnnotationTimestamp } from '~/utils/annotation-timestamp';
|
|
8
|
-
import { auditService } from '~/services/audit
|
|
8
|
+
import { auditService } from '~/services/audit';
|
|
9
9
|
import styles from './notes.module.css';
|
|
10
10
|
|
|
11
11
|
interface NotesSidebarProps {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
-
import React
|
|
3
|
+
import type React from 'react';
|
|
4
|
+
import { useState, useEffect } from 'react';
|
|
4
5
|
import { Link } from 'react-router';
|
|
5
6
|
import { Sidebar } from './sidebar';
|
|
6
|
-
import { User } from 'firebase/auth';
|
|
7
|
-
import { FileData } from '~/types';
|
|
7
|
+
import type { User } from 'firebase/auth';
|
|
8
|
+
import { type FileData } from '~/types';
|
|
8
9
|
import styles from './sidebar.module.css';
|
|
9
10
|
import { getAppVersion } from '../../utils/version';
|
|
10
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import styles from './sidebar.module.css';
|
|
4
4
|
import { ManageProfile } from '../user/manage-profile';
|
|
@@ -7,7 +7,7 @@ import { CaseSidebar } from './cases/case-sidebar';
|
|
|
7
7
|
import { NotesSidebar } from './notes/notes-sidebar';
|
|
8
8
|
import { CaseImport } from './case-import/case-import';
|
|
9
9
|
import { Toast } from '../toast/toast';
|
|
10
|
-
import { FileData, ImportResult, ConfirmationImportResult } from '~/types';
|
|
10
|
+
import { type FileData, type ImportResult, type ConfirmationImportResult } from '~/types';
|
|
11
11
|
|
|
12
12
|
interface SidebarProps {
|
|
13
13
|
user: User;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
1
|
+
import type { User } from 'firebase/auth';
|
|
2
2
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import styles from './image-upload-zone.module.css';
|
|
4
4
|
import { uploadFile } from '~/components/actions/image-manage';
|
|
5
|
-
import { FileData } from '~/types';
|
|
5
|
+
import { type FileData } from '~/types';
|
|
6
6
|
|
|
7
7
|
interface ImageUploadZoneProps {
|
|
8
8
|
user: User;
|
|
@@ -3,7 +3,7 @@ import { signOut } from 'firebase/auth';
|
|
|
3
3
|
import { auth } from '~/services/firebase';
|
|
4
4
|
import paths from '~/config/config.json';
|
|
5
5
|
import { getUserApiKey } from '~/utils/auth';
|
|
6
|
-
import { auditService } from '~/services/audit
|
|
6
|
+
import { auditService } from '~/services/audit';
|
|
7
7
|
import styles from './delete-account.module.css';
|
|
8
8
|
|
|
9
9
|
interface DeletionProgress {
|
|
@@ -5,8 +5,8 @@ import { DeleteAccount } from './delete-account';
|
|
|
5
5
|
import { UserAuditViewer } from '../audit/user-audit-viewer';
|
|
6
6
|
import { AuthContext } from '~/contexts/auth.context';
|
|
7
7
|
import { getUserData, updateUserData } from '~/utils/permissions';
|
|
8
|
-
import { auditService } from '~/services/audit
|
|
9
|
-
import { handleAuthError, ERROR_MESSAGES } from '~/services/firebase
|
|
8
|
+
import { auditService } from '~/services/audit';
|
|
9
|
+
import { handleAuthError, ERROR_MESSAGES } from '~/services/firebase/errors';
|
|
10
10
|
import { FormField, FormButton, FormMessage } from '../form';
|
|
11
11
|
import { MfaPhoneUpdateSection } from './mfa-phone-update';
|
|
12
12
|
import styles from './manage-profile.module.css';
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
type MultiFactorResolver,
|
|
13
13
|
type User,
|
|
14
14
|
} from 'firebase/auth';
|
|
15
|
-
import { auditService } from '~/services/audit
|
|
15
|
+
import { auditService } from '~/services/audit';
|
|
16
16
|
import { auth } from '~/services/firebase';
|
|
17
|
-
import { ERROR_MESSAGES, getValidationError, handleAuthError } from '~/services/firebase
|
|
17
|
+
import { ERROR_MESSAGES, getValidationError, handleAuthError } from '~/services/firebase/errors';
|
|
18
18
|
import {
|
|
19
19
|
formatPhoneNumberForMfa,
|
|
20
20
|
getMaskedFactorDisplay,
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
verifyPasswordResetCode,
|
|
8
8
|
} from 'firebase/auth';
|
|
9
9
|
import { auth } from '~/services/firebase';
|
|
10
|
-
import { handleAuthError } from '~/services/firebase
|
|
10
|
+
import { handleAuthError } from '~/services/firebase/errors';
|
|
11
11
|
import { evaluatePasswordPolicy } from '~/utils/password-policy';
|
|
12
12
|
import { getSafeContinuePath } from '~/utils/auth-action-settings';
|
|
13
|
-
import { auditService } from '~/services/audit
|
|
13
|
+
import { auditService } from '~/services/audit';
|
|
14
14
|
import { Icon } from '~/components/icon/icon';
|
|
15
15
|
import styles from './emailActionHandler.module.css';
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { Link } from 'react-router';
|
|
3
|
-
import { sendEmailVerification, User } from 'firebase/auth';
|
|
4
|
-
import { auditService } from '~/services/audit
|
|
3
|
+
import { sendEmailVerification, type User } from 'firebase/auth';
|
|
4
|
+
import { auditService } from '~/services/audit';
|
|
5
5
|
import { buildActionCodeSettings } from '~/utils/auth-action-settings';
|
|
6
6
|
import styles from './login.module.css';
|
|
7
7
|
|