@fileflow/sdk 0.1.30 → 0.1.32
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/dist/ImportWizard-4E5fcskQ.js +64 -0
- package/dist/ImportWizard-4E5fcskQ.js.map +1 -0
- package/dist/{ImportWizard-wwdBs7gE.mjs → ImportWizard-DoopWzxk.mjs} +1144 -1214
- package/dist/ImportWizard-DoopWzxk.mjs.map +1 -0
- package/dist/{KYCWizard-D9W8V70o.mjs → KYCWizard-BbVeACaA.mjs} +2 -2
- package/dist/{KYCWizard-D9W8V70o.mjs.map → KYCWizard-BbVeACaA.mjs.map} +1 -1
- package/dist/{KYCWizard-DecrJ0MW.js → KYCWizard-CMQUzKSL.js} +2 -2
- package/dist/{KYCWizard-DecrJ0MW.js.map → KYCWizard-CMQUzKSL.js.map} +1 -1
- package/dist/import.d.ts +9 -24
- package/dist/import.js +1 -1
- package/dist/import.mjs +1 -1
- package/dist/{index-Dn3cI9sZ.mjs → index-B_sBDXNZ.mjs} +212 -212
- package/dist/{index-Dn3cI9sZ.mjs.map → index-B_sBDXNZ.mjs.map} +1 -1
- package/dist/{index-RFYSKfrk.js → index-CQzYw3WX.js} +13 -13
- package/dist/{index-RFYSKfrk.js.map → index-CQzYw3WX.js.map} +1 -1
- package/dist/index.d.ts +9 -24
- package/dist/index.js +1 -1
- package/dist/index.mjs +3 -3
- package/dist/kyc.js +1 -1
- package/dist/kyc.mjs +1 -1
- package/dist/styles.css +62 -6
- package/package.json +1 -1
- package/dist/ImportWizard-G3oGN0nc.js +0 -79
- package/dist/ImportWizard-G3oGN0nc.js.map +0 -1
- package/dist/ImportWizard-wwdBs7gE.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KYCWizard-DecrJ0MW.js","sources":["../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/car.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/house.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/image.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield.js","../src/store/kyc-store.ts","../src/kyc/components/DocumentUploader.tsx","../src/kyc/components/DocumentStatus.tsx","../src/kyc/components/KYCWizard.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2\",\n key: \"5owen\"\n }\n ],\n [\"circle\", { cx: \"7\", cy: \"17\", r: \"2\", key: \"u2ysq9\" }],\n [\"path\", { d: \"M9 17h6\", key: \"r8uit2\" }],\n [\"circle\", { cx: \"17\", cy: \"17\", r: \"2\", key: \"axvx0g\" }]\n];\nconst Car = createLucideIcon(\"car\", __iconNode);\n\nexport { __iconNode, Car as default };\n//# sourceMappingURL=car.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 6v6l4 2\", key: \"mmk7yg\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n];\nconst Clock = createLucideIcon(\"clock\", __iconNode);\n\nexport { __iconNode, Clock as default };\n//# sourceMappingURL=clock.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\",\n key: \"1oefj6\"\n }\n ],\n [\"path\", { d: \"M14 2v5a1 1 0 0 0 1 1h5\", key: \"wfsgrz\" }],\n [\"path\", { d: \"M10 9H8\", key: \"b1mrlr\" }],\n [\"path\", { d: \"M16 13H8\", key: \"t4e002\" }],\n [\"path\", { d: \"M16 17H8\", key: \"z1uh3a\" }]\n];\nconst FileText = createLucideIcon(\"file-text\", __iconNode);\n\nexport { __iconNode, FileText as default };\n//# sourceMappingURL=file-text.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\", key: \"5wwlr5\" }],\n [\n \"path\",\n {\n d: \"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\",\n key: \"r6nss1\"\n }\n ]\n];\nconst House = createLucideIcon(\"house\", __iconNode);\n\nexport { __iconNode, House as default };\n//# sourceMappingURL=house.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", ry: \"2\", key: \"1m3agn\" }],\n [\"circle\", { cx: \"9\", cy: \"9\", r: \"2\", key: \"af1f0g\" }],\n [\"path\", { d: \"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\", key: \"1xmnt7\" }]\n];\nconst Image = createLucideIcon(\"image\", __iconNode);\n\nexport { __iconNode, Image as default };\n//# sourceMappingURL=image.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\"\n }\n ],\n [\"path\", { d: \"m9 12 2 2 4-4\", key: \"dzmm74\" }]\n];\nconst ShieldCheck = createLucideIcon(\"shield-check\", __iconNode);\n\nexport { __iconNode, ShieldCheck as default };\n//# sourceMappingURL=shield-check.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\"\n }\n ]\n];\nconst Shield = createLucideIcon(\"shield\", __iconNode);\n\nexport { __iconNode, Shield as default };\n//# sourceMappingURL=shield.js.map\n","import { create } from 'zustand';\nimport type { \n DocumentType, \n KYCDocument, \n DocumentStatus,\n FraudFlag,\n ExtractedData,\n} from '@fileflow/shared';\n\nexport type KYCStep = 'select' | 'upload' | 'processing' | 'review' | 'complete';\n\nexport interface DocumentState {\n id: string | null;\n type: DocumentType;\n status: DocumentStatus;\n file: File | null;\n previewUrl: string | null;\n extractedData: ExtractedData | null;\n confidence: number;\n fraudFlags: FraudFlag[];\n error: string | null;\n}\n\nexport interface KYCState {\n // Session\n sessionId: string | null;\n status: string;\n step: KYCStep;\n \n // Required documents\n requiredDocuments: DocumentType[];\n currentDocumentType: DocumentType | null;\n \n // Document states\n documents: Map<DocumentType, DocumentState>;\n \n // Verification\n isVerified: boolean;\n verificationStatus: object | null;\n \n // UI state\n isLoading: boolean;\n error: string | null;\n}\n\nexport interface KYCActions {\n // Initialize\n setSessionId: (sessionId: string) => void;\n setRequiredDocuments: (documents: DocumentType[]) => void;\n \n // Document management\n setCurrentDocumentType: (type: DocumentType) => void;\n setDocumentFile: (type: DocumentType, file: File) => void;\n setDocumentStatus: (type: DocumentType, status: DocumentStatus) => void;\n setDocumentData: (type: DocumentType, data: Partial<DocumentState>) => void;\n clearDocumentPreview: (type: DocumentType) => void;\n \n // Navigation\n setStep: (step: KYCStep) => void;\n nextDocument: () => void;\n \n // Verification\n setVerificationStatus: (status: object) => void;\n setVerified: (verified: boolean) => void;\n \n // Status\n setStatus: (status: string) => void;\n setLoading: (loading: boolean) => void;\n setError: (error: string | null) => void;\n \n // Helpers\n getNextRequiredDocument: () => DocumentType | null;\n areAllDocumentsUploaded: () => boolean;\n areAllDocumentsProcessed: () => boolean;\n \n // Reset\n reset: () => void;\n}\n\nconst createEmptyDocumentState = (type: DocumentType): DocumentState => ({\n id: null,\n type,\n status: 'uploaded',\n file: null,\n previewUrl: null,\n extractedData: null,\n confidence: 0,\n fraudFlags: [],\n error: null,\n});\n\nconst initialState: KYCState = {\n sessionId: null,\n status: 'idle',\n step: 'select',\n requiredDocuments: [],\n currentDocumentType: null,\n documents: new Map(),\n isVerified: false,\n verificationStatus: null,\n isLoading: false,\n error: null,\n};\n\nexport const useKYCStore = create<KYCState & KYCActions>((set, get) => ({\n ...initialState,\n\n setSessionId: (sessionId) => set({ sessionId }),\n\n setRequiredDocuments: (documents) => {\n const docsMap = new Map<DocumentType, DocumentState>();\n for (const type of documents) {\n docsMap.set(type, createEmptyDocumentState(type));\n }\n set({ \n requiredDocuments: documents, \n documents: docsMap,\n currentDocumentType: documents[0] || null,\n });\n },\n\n setCurrentDocumentType: (type) => set({ currentDocumentType: type }),\n\n setDocumentFile: (type, file) => {\n const { documents } = get();\n const doc = documents.get(type) || createEmptyDocumentState(type);\n \n // Create preview URL\n const previewUrl = URL.createObjectURL(file);\n \n const updated = new Map(documents);\n updated.set(type, {\n ...doc,\n file,\n previewUrl,\n status: 'uploaded',\n error: null,\n });\n \n set({ documents: updated });\n },\n\n setDocumentStatus: (type, status) => {\n const { documents } = get();\n const doc = documents.get(type);\n if (doc) {\n const updated = new Map(documents);\n updated.set(type, { ...doc, status });\n set({ documents: updated });\n }\n },\n\n setDocumentData: (type, data) => {\n const { documents } = get();\n const doc = documents.get(type);\n if (doc) {\n const updated = new Map(documents);\n updated.set(type, { ...doc, ...data });\n set({ documents: updated });\n }\n },\n\n clearDocumentPreview: (type) => {\n const { documents } = get();\n const doc = documents.get(type);\n if (doc?.previewUrl) {\n URL.revokeObjectURL(doc.previewUrl);\n }\n },\n\n setStep: (step) => set({ step }),\n\n nextDocument: () => {\n const { requiredDocuments, currentDocumentType, documents } = get();\n const currentIndex = currentDocumentType \n ? requiredDocuments.indexOf(currentDocumentType) \n : -1;\n \n // Find next document that needs upload\n for (let i = currentIndex + 1; i < requiredDocuments.length; i++) {\n const type = requiredDocuments[i];\n const doc = documents.get(type);\n if (!doc?.file) {\n set({ currentDocumentType: type });\n return;\n }\n }\n \n // All documents uploaded, move to processing/review\n set({ \n currentDocumentType: null,\n step: 'processing',\n });\n },\n\n setVerificationStatus: (status) => set({ verificationStatus: status }),\n \n setVerified: (verified) => set({ isVerified: verified }),\n\n setStatus: (status) => set({ status }),\n \n setLoading: (isLoading) => set({ isLoading }),\n \n setError: (error) => set({ error }),\n\n getNextRequiredDocument: () => {\n const { requiredDocuments, documents } = get();\n for (const type of requiredDocuments) {\n const doc = documents.get(type);\n if (!doc?.file) {\n return type;\n }\n }\n return null;\n },\n\n areAllDocumentsUploaded: () => {\n const { requiredDocuments, documents } = get();\n return requiredDocuments.every((type) => {\n const doc = documents.get(type);\n return doc?.file !== null;\n });\n },\n\n areAllDocumentsProcessed: () => {\n const { requiredDocuments, documents } = get();\n return requiredDocuments.every((type) => {\n const doc = documents.get(type);\n return doc?.status === 'completed' || doc?.status === 'requires_review';\n });\n },\n\n reset: () => {\n // Clean up preview URLs\n const { documents } = get();\n for (const doc of documents.values()) {\n if (doc.previewUrl) {\n URL.revokeObjectURL(doc.previewUrl);\n }\n }\n set(initialState);\n },\n}));\n","import React, { useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport { Upload, FileText, Image, AlertCircle, X } from 'lucide-react';\nimport { clsx } from 'clsx';\nimport { useKYCStore } from '../../store/kyc-store';\nimport type { DocumentType } from '@fileflow/shared';\nimport { DOCUMENT_TYPES } from '@fileflow/shared';\n\ninterface DocumentUploaderProps {\n documentType: DocumentType;\n onFileSelect?: (file: File) => void;\n}\n\nexport const DocumentUploader: React.FC<DocumentUploaderProps> = ({\n documentType,\n onFileSelect,\n}) => {\n const { documents, setDocumentFile, isLoading } = useKYCStore();\n const documentState = documents.get(documentType);\n const documentInfo = DOCUMENT_TYPES[documentType];\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: unknown[]) => {\n if (rejectedFiles.length > 0) {\n return;\n }\n\n if (acceptedFiles.length > 0) {\n const file = acceptedFiles[0];\n setDocumentFile(documentType, file);\n onFileSelect?.(file);\n }\n },\n [documentType, onFileSelect, setDocumentFile]\n );\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDrop,\n accept: {\n 'application/pdf': ['.pdf'],\n 'image/jpeg': ['.jpg', '.jpeg'],\n 'image/png': ['.png'],\n },\n maxSize: documentInfo.maxFileSize,\n multiple: false,\n disabled: isLoading,\n });\n\n const formatFileSize = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n };\n\n const getFileIcon = () => {\n if (documentState?.file?.type === 'application/pdf') {\n return <FileText className=\"ff-w-6 ff-h-6\" />;\n }\n return <Image className=\"ff-w-6 ff-h-6\" />;\n };\n\n const clearFile = (e: React.MouseEvent) => {\n e.stopPropagation();\n useKYCStore.getState().clearDocumentPreview(documentType);\n setDocumentFile(documentType, null as unknown as File);\n };\n\n // Show preview if file is selected\n if (documentState?.file && documentState.previewUrl) {\n return (\n <div className=\"ff-space-y-4\">\n {/* Document Info */}\n <div className=\"ff-p-4 ff-rounded-xl\" style={{ backgroundColor: 'var(--ff-primary-20)', border: '1px solid var(--ff-primary-50)' }}>\n <div className=\"ff-flex ff-items-center ff-gap-3\">\n <div className=\"ff-p-2 ff-rounded-lg\" style={{ backgroundColor: 'var(--ff-primary-30)' }}>\n <span style={{ color: 'var(--ff-primary-90)' }}>{getFileIcon()}</span>\n </div>\n <div className=\"ff-flex-1 ff-min-w-0\">\n <p className=\"ff-font-medium ff-truncate\" style={{ color: 'var(--ff-primary-110)' }}>\n {documentState.file.name}\n </p>\n <p className=\"ff-text-sm\" style={{ color: 'var(--ff-primary-90)' }}>\n {formatFileSize(documentState.file.size)}\n </p>\n </div>\n <button\n onClick={clearFile}\n className=\"ff-p-1.5 ff-rounded-full ff-transition-colors\"\n style={{ color: 'var(--ff-primary-90)' }}\n aria-label=\"Remove file\"\n >\n <X className=\"ff-w-5 ff-h-5\" />\n </button>\n </div>\n </div>\n\n {/* Preview */}\n <div className=\"ff-document-preview ff-aspect-[3/4] ff-max-h-96\">\n {documentState.file.type === 'application/pdf' ? (\n <iframe\n src={documentState.previewUrl}\n className=\"ff-w-full ff-h-full ff-rounded-xl\"\n title=\"Document preview\"\n />\n ) : (\n <img\n src={documentState.previewUrl}\n alt=\"Document preview\"\n className=\"ff-w-full ff-h-full ff-object-contain ff-rounded-xl\"\n />\n )}\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"ff-space-y-6\">\n {/* Document Type Info */}\n <div className=\"ff-text-center ff-mb-4\">\n <h3 className=\"ff-text-lg ff-font-semibold\" style={{ color: 'var(--ff-text-primary)' }}>{documentInfo.label}</h3>\n <p className=\"ff-text-sm ff-mt-1\" style={{ color: 'var(--ff-text-muted)' }}>{documentInfo.description}</p>\n </div>\n\n {/* Dropzone - Demo style */}\n <div\n {...getRootProps()}\n className={clsx(\n 'ff-dropzone',\n isDragActive && 'ff-dropzone-active',\n isLoading && 'ff-opacity-50 ff-cursor-not-allowed'\n )}\n >\n <input {...getInputProps()} />\n <div className=\"ff-dropzone-icon-wrapper\">\n <Upload className=\"ff-dropzone-icon\" />\n </div>\n <h3 className=\"ff-dropzone-text\">\n {isDragActive ? 'Drop your document here' : 'Upload your document'}\n </h3>\n <p className=\"ff-dropzone-hint\">Drag and drop or click to select</p>\n <label className=\"ff-inline-block\">\n <span className={clsx(\n 'ff-btn ff-btn-primary',\n isLoading && 'ff-opacity-50 ff-cursor-wait'\n )}>\n {isLoading ? 'Processing...' : 'Choose file'}\n </span>\n </label>\n <div className=\"ff-flex ff-flex-wrap ff-justify-center ff-gap-2 ff-mt-3\">\n {documentInfo.acceptedFormats.map((format) => (\n <span \n key={format} \n className=\"ff-px-2 ff-py-1 ff-rounded ff-text-xs\"\n style={{ backgroundColor: 'var(--ff-bg-tertiary)', color: 'var(--ff-text-muted)' }}\n >\n {format.toUpperCase()}\n </span>\n ))}\n <span className=\"ff-px-2 ff-py-1 ff-text-xs\" style={{ color: 'var(--ff-text-muted)' }}>\n Max {formatFileSize(documentInfo.maxFileSize)}\n </span>\n </div>\n </div>\n\n {/* Error */}\n {documentState?.error && (\n <div className=\"ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm\" style={{ backgroundColor: 'var(--ff-error-light)', color: 'var(--ff-error)' }}>\n <AlertCircle className=\"ff-w-4 ff-h-4 ff-flex-shrink-0\" />\n <p>{documentState.error}</p>\n </div>\n )}\n\n {/* Tips */}\n <div className=\"ff-rounded-xl ff-p-4\" style={{ backgroundColor: 'var(--ff-bg-secondary)' }}>\n <h4 className=\"ff-text-sm ff-font-medium ff-mb-2\" style={{ color: 'var(--ff-text-secondary)' }}>Tips for best results:</h4>\n <ul className=\"ff-text-sm ff-space-y-1 ff-list-disc ff-list-inside\" style={{ color: 'var(--ff-text-muted)' }}>\n <li>Ensure all text is clearly visible and readable</li>\n <li>Avoid glare, shadows, or blurry images</li>\n <li>Include all four corners of the document</li>\n <li>Use good lighting when taking photos</li>\n </ul>\n </div>\n </div>\n );\n};\n","import React from 'react';\nimport { CheckCircle, XCircle, AlertTriangle, Loader2, Clock } from 'lucide-react';\nimport { clsx } from 'clsx';\nimport { useKYCStore } from '../../store/kyc-store';\nimport type { DocumentType, DocumentStatus as DocStatus } from '@fileflow/shared';\nimport { DOCUMENT_TYPES } from '@fileflow/shared';\n\ninterface DocumentStatusProps {\n documentType: DocumentType;\n showDetails?: boolean;\n}\n\nexport const DocumentStatus: React.FC<DocumentStatusProps> = ({\n documentType,\n showDetails = true,\n}) => {\n const { documents } = useKYCStore();\n const documentState = documents.get(documentType);\n const documentInfo = DOCUMENT_TYPES[documentType];\n\n const getStatusConfig = (status?: DocStatus) => {\n switch (status) {\n case 'completed':\n return {\n icon: CheckCircle,\n iconColor: 'var(--ff-success)',\n bgColor: 'var(--ff-success-light)',\n label: 'Verified',\n labelColor: 'var(--ff-success)',\n description: 'Document successfully processed',\n };\n case 'requires_review':\n return {\n icon: AlertTriangle,\n iconColor: 'var(--ff-warning)',\n bgColor: 'var(--ff-warning-light)',\n label: 'Review Required',\n labelColor: 'var(--ff-warning)',\n description: 'Manual verification may be needed',\n };\n case 'failed':\n return {\n icon: XCircle,\n iconColor: 'var(--ff-error)',\n bgColor: 'var(--ff-error-light)',\n label: 'Failed',\n labelColor: 'var(--ff-error)',\n description: 'Unable to process document',\n };\n case 'processing':\n return {\n icon: Loader2,\n iconColor: 'var(--ff-primary-90)',\n bgColor: 'var(--ff-primary-20)',\n label: 'Processing',\n labelColor: 'var(--ff-primary-90)',\n description: 'Analyzing document...',\n };\n case 'uploaded':\n return {\n icon: Clock,\n iconColor: 'var(--ff-text-secondary)',\n bgColor: 'var(--ff-bg-tertiary)',\n label: 'Pending',\n labelColor: 'var(--ff-text-secondary)',\n description: 'Waiting to be processed',\n };\n default:\n return {\n icon: Clock,\n iconColor: 'var(--ff-text-muted)',\n bgColor: 'var(--ff-bg-tertiary)',\n label: 'Not Uploaded',\n labelColor: 'var(--ff-text-muted)',\n description: 'Upload document to continue',\n };\n }\n };\n\n const statusConfig = getStatusConfig(documentState?.status);\n const Icon = statusConfig.icon;\n\n const getConfidenceColor = (confidence: number) => {\n if (confidence >= 0.8) return 'var(--ff-success)';\n if (confidence >= 0.6) return 'var(--ff-warning)';\n return 'var(--ff-error)';\n };\n\n return (\n <div className=\"ff-space-y-3\">\n {/* Status Header */}\n <div className=\"ff-flex ff-items-center ff-gap-3\">\n <div className=\"ff-p-2 ff-rounded-xl\" style={{ backgroundColor: statusConfig.bgColor }}>\n <Icon\n className={clsx(\n 'ff-w-5 ff-h-5',\n documentState?.status === 'processing' && 'ff-animate-spin'\n )}\n style={{ color: statusConfig.iconColor }}\n />\n </div>\n <div>\n <p className=\"ff-font-medium\" style={{ color: 'var(--ff-text-primary)' }}>{documentInfo.label}</p>\n <p className=\"ff-text-sm\" style={{ color: statusConfig.labelColor }}>{statusConfig.label}</p>\n </div>\n </div>\n\n {/* Confidence Score */}\n {documentState?.confidence !== undefined && documentState.confidence > 0 && (\n <div className=\"ff-space-y-1\">\n <div className=\"ff-flex ff-items-center ff-justify-between ff-text-sm\">\n <span style={{ color: 'var(--ff-text-secondary)' }}>Confidence</span>\n <span className=\"ff-font-medium\" style={{ color: getConfidenceColor(documentState.confidence) }}>\n {Math.round(documentState.confidence * 100)}%\n </span>\n </div>\n <div className=\"ff-progress\">\n <div\n className=\"ff-progress-bar\"\n style={{ \n width: `${documentState.confidence * 100}%`,\n backgroundColor: getConfidenceColor(documentState.confidence)\n }}\n />\n </div>\n </div>\n )}\n\n {/* Fraud Flags */}\n {showDetails && documentState?.fraudFlags && documentState.fraudFlags.length > 0 && (\n <div className=\"ff-space-y-2\">\n <p className=\"ff-text-sm ff-font-medium\" style={{ color: 'var(--ff-text-secondary)' }}>Issues Detected</p>\n <div className=\"ff-space-y-1\">\n {documentState.fraudFlags.map((flag, index) => (\n <div\n key={index}\n className=\"ff-flex ff-items-start ff-gap-2 ff-p-2 ff-rounded-lg ff-text-sm\"\n style={{\n backgroundColor: flag.severity === 'high' ? 'var(--ff-error-light)' : flag.severity === 'medium' ? 'var(--ff-warning-light)' : 'var(--ff-bg-tertiary)',\n color: flag.severity === 'high' ? 'var(--ff-error)' : flag.severity === 'medium' ? 'var(--ff-warning)' : 'var(--ff-text-secondary)',\n }}\n >\n {flag.severity === 'high' ? (\n <XCircle className=\"ff-w-4 ff-h-4 ff-flex-shrink-0 ff-mt-0.5\" />\n ) : (\n <AlertTriangle className=\"ff-w-4 ff-h-4 ff-flex-shrink-0 ff-mt-0.5\" />\n )}\n <span>{flag.message}</span>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Extracted Data Preview */}\n {showDetails &&\n documentState?.extractedData &&\n documentState.status === 'completed' && (\n <div className=\"ff-rounded-xl ff-p-3\" style={{ backgroundColor: 'var(--ff-bg-tertiary)' }}>\n <p className=\"ff-text-sm ff-font-medium ff-mb-2\" style={{ color: 'var(--ff-text-secondary)' }}>\n Extracted Information\n </p>\n <dl className=\"ff-space-y-1 ff-text-sm\">\n {'fullName' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Name</dt>\n <dd className=\"ff-font-medium\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.fullName}\n </dd>\n </div>\n )}\n {'dateOfBirth' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Date of Birth</dt>\n <dd style={{ color: 'var(--ff-text-primary)' }}>{documentState.extractedData.dateOfBirth}</dd>\n </div>\n )}\n {documentState.extractedData.documentType === 'passport' &&\n 'passportNumber' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Passport #</dt>\n <dd className=\"ff-font-mono\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.passportNumber}\n </dd>\n </div>\n )}\n {documentState.extractedData.documentType === 'drivers_license' &&\n 'licenseNumber' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>License #</dt>\n <dd className=\"ff-font-mono\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.licenseNumber}\n </dd>\n </div>\n )}\n {'address' in documentState.extractedData && documentState.extractedData.address && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Address</dt>\n <dd className=\"ff-text-right\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.address.city},{' '}\n {documentState.extractedData.address.province}\n </dd>\n </div>\n )}\n </dl>\n </div>\n )}\n </div>\n );\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport {\n FileText,\n Car,\n Home,\n CheckCircle,\n X,\n Loader2,\n ChevronRight,\n ShieldCheck,\n Shield,\n} from 'lucide-react';\nimport { clsx } from 'clsx';\nimport { useKYCStore, type KYCStep } from '../../store/kyc-store';\nimport { getClient } from '../../api/client';\nimport { DocumentUploader } from './DocumentUploader';\nimport { DocumentStatus } from './DocumentStatus';\nimport { StyleProvider } from '../../styles/StyleProvider';\nimport type { DocumentType, KYCSession, KYCDocument } from '@fileflow/shared';\nimport { DOCUMENT_TYPES } from '@fileflow/shared';\n\n// KYC steps for the step indicator\nconst KYC_STEP_LABELS = ['select', 'upload', 'review', 'complete'] as const;\n\ninterface KYCWizardProps {\n requiredDocuments: DocumentType[];\n onComplete?: (session: KYCSession) => void;\n onCancel?: () => void;\n onError?: (error: Error) => void;\n}\n\nconst DOCUMENT_ICONS: Record<DocumentType, React.ElementType> = {\n passport: FileText,\n drivers_license: Car,\n proof_of_address: Home,\n};\n\nexport const KYCWizard: React.FC<KYCWizardProps> = ({\n requiredDocuments,\n onComplete,\n onCancel,\n onError,\n}) => {\n const {\n sessionId,\n step,\n currentDocumentType,\n documents,\n isVerified,\n verificationStatus,\n isLoading,\n error,\n setSessionId,\n setRequiredDocuments,\n setCurrentDocumentType,\n setDocumentStatus,\n setDocumentData,\n setStep,\n nextDocument,\n setVerificationStatus,\n setVerified,\n setLoading,\n setError,\n areAllDocumentsUploaded,\n areAllDocumentsProcessed,\n reset,\n } = useKYCStore();\n\n const [pollingDocument, setPollingDocument] = useState<string | null>(null);\n\n // Initialize\n useEffect(() => {\n setRequiredDocuments(requiredDocuments);\n initializeSession();\n\n return () => {\n // Cleanup polling on unmount\n setPollingDocument(null);\n };\n }, [requiredDocuments]);\n\n const initializeSession = async () => {\n try {\n setLoading(true);\n const client = getClient();\n const result = await client.createKYCSession(requiredDocuments);\n setSessionId(result.sessionId);\n setStep('upload');\n } catch (err) {\n const error = err as Error;\n setError(error.message);\n onError?.(error);\n } finally {\n setLoading(false);\n }\n };\n\n const handleFileSelect = useCallback(\n async (file: File) => {\n if (!sessionId || !currentDocumentType) return;\n\n try {\n setLoading(true);\n setError(null);\n\n const client = getClient();\n const result = await client.uploadKYCDocument(sessionId, currentDocumentType, file);\n\n setDocumentData(currentDocumentType, {\n id: result.documentId,\n status: 'processing',\n });\n\n // Start polling for document status\n setPollingDocument(result.documentId);\n pollDocumentStatus(result.documentId);\n } catch (err) {\n const error = err as Error;\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: error.message,\n });\n onError?.(error);\n } finally {\n setLoading(false);\n }\n },\n [sessionId, currentDocumentType]\n );\n\n const pollDocumentStatus = async (documentId: string) => {\n const maxAttempts = 30;\n const maxConsecutiveErrors = 3; // Stop after 3 consecutive errors\n let attempts = 0;\n let consecutiveErrors = 0;\n\n const poll = async () => {\n if (attempts >= maxAttempts) {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: 'Processing timed out. Please try again.',\n });\n }\n return;\n }\n\n // Stop polling if we've had too many consecutive errors\n if (consecutiveErrors >= maxConsecutiveErrors) {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: 'Failed to check document status. Please refresh and try again.',\n });\n }\n return;\n }\n\n try {\n const client = getClient();\n const result = await client.getKYCDocument(documentId);\n const doc = result.document as KYCDocument;\n\n // Reset consecutive errors on success\n consecutiveErrors = 0;\n\n const docType = doc.type as DocumentType;\n setDocumentData(docType, {\n id: doc.id,\n status: doc.status,\n extractedData: doc.extractedData,\n confidence: doc.confidence,\n fraudFlags: doc.fraudFlags,\n error: null, // Clear any previous errors\n });\n\n if (doc.status === 'completed' || doc.status === 'requires_review' || doc.status === 'failed') {\n setPollingDocument(null);\n\n // Check if all documents are processed\n if (areAllDocumentsUploaded()) {\n const allProcessed = areAllDocumentsProcessed();\n if (allProcessed) {\n setStep('review');\n }\n } else {\n // Move to next document\n nextDocument();\n }\n return;\n }\n\n // Continue polling\n attempts++;\n setTimeout(poll, 2000);\n } catch (err) {\n const error = err as Error & { status?: number };\n consecutiveErrors++;\n attempts++;\n \n // On 404, stop immediately - the document doesn't exist\n if (error.status === 404 || error.message?.includes('not found')) {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: 'Session not found or invalid state',\n });\n }\n return;\n }\n\n // On other errors, retry with backoff (up to maxConsecutiveErrors times)\n if (consecutiveErrors < maxConsecutiveErrors) {\n setTimeout(poll, 3000 * consecutiveErrors); // Exponential backoff\n } else {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: error.message || 'Failed to process document',\n });\n }\n }\n }\n };\n\n poll();\n };\n\n const handleVerify = async () => {\n if (!sessionId) return;\n\n try {\n setLoading(true);\n setError(null);\n\n const client = getClient();\n const result = await client.verifyKYCSession(sessionId, true);\n\n setVerificationStatus(result.verificationStatus);\n const status = result.verificationStatus as { isVerified: boolean };\n setVerified(status.isVerified);\n setStep('complete');\n\n onComplete?.(result as unknown as KYCSession);\n } catch (err) {\n const error = err as Error;\n setError(error.message);\n onError?.(error);\n } finally {\n setLoading(false);\n }\n };\n\n const handleCancel = () => {\n reset();\n onCancel?.();\n };\n\n const selectDocument = (type: DocumentType) => {\n setCurrentDocumentType(type);\n setStep('upload');\n };\n\n const isDocumentComplete = (type: DocumentType) => {\n const doc = documents.get(type);\n return doc?.status === 'completed' || doc?.status === 'requires_review';\n };\n\n // Get step index for the step indicator\n const getDisplayStepIndex = () => {\n const currentStep = step === 'processing' ? 'upload' : step;\n return KYC_STEP_LABELS.indexOf(currentStep as typeof KYC_STEP_LABELS[number]);\n };\n\n return (\n <StyleProvider>\n <div className=\"ff-container ff-modal\">\n {/* Modal Header - Demo style */}\n <div className=\"ff-modal-header\">\n <div className=\"ff-modal-header-left\">\n <div className=\"ff-flex ff-items-center ff-gap-3\">\n <div className=\"ff-modal-icon\">\n <Shield />\n </div>\n <h2 className=\"ff-modal-title\">Identity Verification</h2>\n </div>\n {/* Step Indicator - Demo style */}\n <div className=\"ff-steps ff-ml-4\">\n {KYC_STEP_LABELS.map((s, i) => (\n <React.Fragment key={s}>\n <div\n className={clsx(\n 'ff-step',\n getDisplayStepIndex() === i && 'ff-step-active',\n getDisplayStepIndex() > i && 'ff-step-complete',\n getDisplayStepIndex() < i && 'ff-step-pending'\n )}\n >\n {getDisplayStepIndex() > i ? '✓' : i + 1}\n </div>\n {i < KYC_STEP_LABELS.length - 1 && (\n <div className={clsx(\n 'ff-step-connector',\n getDisplayStepIndex() > i && 'ff-step-connector-complete'\n )} />\n )}\n </React.Fragment>\n ))}\n </div>\n </div>\n <button\n onClick={handleCancel}\n className=\"ff-modal-close\"\n >\n <X className=\"ff-w-5 ff-h-5\" />\n </button>\n </div>\n\n {/* Modal Body */}\n <div className=\"ff-modal-body\">\n {error && (\n <div className=\"ff-mb-4 ff-p-4 ff-rounded-lg ff-text-sm\" style={{ backgroundColor: 'var(--ff-error-light)', color: 'var(--ff-error)' }}>\n {error}\n </div>\n )}\n\n {/* Document Selection */}\n {step === 'select' && (\n <div className=\"ff-space-y-4\">\n <p className=\"ff-text-center ff-mb-6\" style={{ color: 'var(--ff-text-muted)' }}>\n Please upload the following documents to verify your identity\n </p>\n <div className=\"ff-grid ff-gap-3\">\n {requiredDocuments.map((type) => {\n const Icon = DOCUMENT_ICONS[type];\n const info = DOCUMENT_TYPES[type];\n const doc = documents.get(type);\n const isComplete = isDocumentComplete(type);\n\n return (\n <button\n key={type}\n onClick={() => selectDocument(type)}\n className={clsx(\n 'ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-xl ff-border-2 ff-text-left ff-transition-all ff-duration-150',\n isComplete\n ? 'ff-border-transparent'\n : 'ff-border-transparent hover:ff-border-transparent'\n )}\n style={{\n backgroundColor: isComplete ? 'var(--ff-success-light)' : 'var(--ff-bg-secondary)',\n borderColor: isComplete ? 'var(--ff-success)' : 'var(--ff-border-light)',\n }}\n >\n <div\n className=\"ff-p-3 ff-rounded-xl\"\n style={{\n backgroundColor: isComplete ? 'rgba(41, 142, 51, 0.15)' : 'var(--ff-bg-tertiary)',\n }}\n >\n {isComplete ? (\n <CheckCircle className=\"ff-w-6 ff-h-6\" style={{ color: 'var(--ff-success)' }} />\n ) : (\n <Icon className=\"ff-w-6 ff-h-6\" style={{ color: 'var(--ff-text-secondary)' }} />\n )}\n </div>\n <div className=\"ff-flex-1\">\n <p className=\"ff-font-medium\" style={{ color: 'var(--ff-text-primary)' }}>{info.label}</p>\n <p className=\"ff-text-sm\" style={{ color: 'var(--ff-text-muted)' }}>{info.description}</p>\n </div>\n <ChevronRight className=\"ff-w-5 ff-h-5\" style={{ color: 'var(--ff-text-muted)' }} />\n </button>\n );\n })}\n </div>\n </div>\n )}\n\n {/* Document Upload */}\n {step === 'upload' && currentDocumentType && (\n <div className=\"ff-py-4\">\n <div className=\"ff-max-w-lg ff-mx-auto\">\n <DocumentUploader documentType={currentDocumentType} onFileSelect={handleFileSelect} />\n </div>\n </div>\n )}\n\n {/* Processing */}\n {step === 'processing' && (\n <div className=\"ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12\">\n <Loader2 className=\"ff-w-12 ff-h-12 ff-animate-spin ff-mb-4\" style={{ color: 'var(--ff-primary-90)' }} />\n <h3 className=\"ff-text-lg ff-font-semibold ff-mb-2\" style={{ color: 'var(--ff-text-primary)' }}>\n Processing Documents\n </h3>\n <p style={{ color: 'var(--ff-text-muted)' }} className=\"ff-text-center\">\n We're analyzing your documents. This may take a moment...\n </p>\n </div>\n )}\n\n {/* Review */}\n {step === 'review' && (\n <div className=\"ff-space-y-6\">\n <div className=\"ff-text-center ff-mb-6\">\n <h3 className=\"ff-text-lg ff-font-semibold\" style={{ color: 'var(--ff-text-primary)' }}>Review Your Documents</h3>\n <p style={{ color: 'var(--ff-text-muted)' }}>\n Please review the extracted information before completing verification\n </p>\n </div>\n\n <div className=\"ff-grid ff-gap-4\">\n {requiredDocuments.map((type) => (\n <div\n key={type}\n className=\"ff-rounded-xl ff-p-4\"\n style={{ backgroundColor: 'var(--ff-bg-secondary)', border: '1px solid var(--ff-border-light)' }}\n >\n <DocumentStatus documentType={type} showDetails={true} />\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Complete */}\n {step === 'complete' && (\n <div className=\"ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12\">\n <div\n className=\"ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4\"\n style={{ backgroundColor: isVerified ? 'var(--ff-success-light)' : 'var(--ff-warning-light)' }}\n >\n {isVerified ? (\n <CheckCircle className=\"ff-w-10 ff-h-10\" style={{ color: 'var(--ff-success)' }} />\n ) : (\n <ShieldCheck className=\"ff-w-10 ff-h-10\" style={{ color: 'var(--ff-warning)' }} />\n )}\n </div>\n <h3 className=\"ff-text-xl ff-font-semibold ff-mb-2\" style={{ color: 'var(--ff-text-primary)' }}>\n {isVerified ? 'Verification Complete!' : 'Review Required'}\n </h3>\n <p style={{ color: 'var(--ff-text-muted)' }} className=\"ff-text-center\">\n {isVerified\n ? 'Your identity has been successfully verified.'\n : 'Additional review may be required. We will contact you if needed.'}\n </p>\n </div>\n )}\n </div>\n\n {/* Modal Footer */}\n {step !== 'complete' && (\n <div className=\"ff-modal-footer\">\n <button\n onClick={() => {\n if (step === 'upload') {\n setStep('select');\n } else if (step === 'review') {\n setStep('select');\n }\n }}\n disabled={isLoading}\n className=\"ff-btn ff-btn-secondary\"\n >\n Back\n </button>\n\n {step === 'review' && (\n <button\n onClick={handleVerify}\n disabled={isLoading || !areAllDocumentsProcessed()}\n className=\"ff-btn ff-btn-primary\"\n >\n {isLoading ? (\n <>\n <Loader2 className=\"ff-w-4 ff-h-4 ff-animate-spin\" />\n Verifying...\n </>\n ) : (\n 'Complete Verification'\n )}\n </button>\n )}\n\n {step === 'select' && areAllDocumentsUploaded() && (\n <button\n onClick={() => setStep('review')}\n className=\"ff-btn ff-btn-primary\"\n >\n Review & Verify\n </button>\n )}\n </div>\n )}\n </div>\n </StyleProvider>\n );\n};\n"],"names":["__iconNode","Car","createLucideIcon","Clock","FileText","House","Image","ShieldCheck","Shield","createEmptyDocumentState","type","initialState","useKYCStore","create","set","get","sessionId","documents","docsMap","file","doc","previewUrl","updated","status","data","step","requiredDocuments","currentDocumentType","currentIndex","i","verified","isLoading","error","DocumentUploader","documentType","onFileSelect","setDocumentFile","documentState","documentInfo","DOCUMENT_TYPES","onDrop","useCallback","acceptedFiles","rejectedFiles","getRootProps","getInputProps","isDragActive","useDropzone","formatFileSize","bytes","getFileIcon","_a","jsx","clearFile","e","jsxs","X","clsx","Upload","format","AlertCircle","DocumentStatus","showDetails","statusConfig","CheckCircle","AlertTriangle","XCircle","Loader2","Icon","getConfidenceColor","confidence","flag","index","KYC_STEP_LABELS","DOCUMENT_ICONS","Home","KYCWizard","onComplete","onCancel","onError","isVerified","verificationStatus","setSessionId","setRequiredDocuments","setCurrentDocumentType","setDocumentStatus","setDocumentData","setStep","nextDocument","setVerificationStatus","setVerified","setLoading","setError","areAllDocumentsUploaded","areAllDocumentsProcessed","reset","pollingDocument","setPollingDocument","useState","useEffect","initializeSession","result","getClient","err","handleFileSelect","pollDocumentStatus","documentId","attempts","consecutiveErrors","poll","docType","handleVerify","handleCancel","selectDocument","isDocumentComplete","getDisplayStepIndex","currentStep","StyleProvider","s","React","info","isComplete","ChevronRight","Fragment"],"mappings":"sGAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,GAAa,CACjB,CACE,OACA,CACE,EAAG,6KACH,IAAK,OACX,CACA,EACE,CAAC,SAAU,CAAE,GAAI,IAAK,GAAI,KAAM,EAAG,IAAK,IAAK,SAAU,EACvD,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAQ,CAAE,CAC1D,EACMC,GAAMC,EAAAA,iBAAiB,MAAOF,EAAU,ECrB9C;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,GAAa,CACjB,CAAC,OAAQ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sources":["../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/car.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/house.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/image.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js","../../../node_modules/.pnpm/lucide-react@0.563.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield.js","../src/store/kyc-store.ts","../src/kyc/components/DocumentUploader.tsx","../src/kyc/components/DocumentStatus.tsx","../src/kyc/components/KYCWizard.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2\",\n key: \"5owen\"\n }\n ],\n [\"circle\", { cx: \"7\", cy: \"17\", r: \"2\", key: \"u2ysq9\" }],\n [\"path\", { d: \"M9 17h6\", key: \"r8uit2\" }],\n [\"circle\", { cx: \"17\", cy: \"17\", r: \"2\", key: \"axvx0g\" }]\n];\nconst Car = createLucideIcon(\"car\", __iconNode);\n\nexport { __iconNode, Car as default };\n//# sourceMappingURL=car.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 6v6l4 2\", key: \"mmk7yg\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n];\nconst Clock = createLucideIcon(\"clock\", __iconNode);\n\nexport { __iconNode, Clock as default };\n//# sourceMappingURL=clock.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\",\n key: \"1oefj6\"\n }\n ],\n [\"path\", { d: \"M14 2v5a1 1 0 0 0 1 1h5\", key: \"wfsgrz\" }],\n [\"path\", { d: \"M10 9H8\", key: \"b1mrlr\" }],\n [\"path\", { d: \"M16 13H8\", key: \"t4e002\" }],\n [\"path\", { d: \"M16 17H8\", key: \"z1uh3a\" }]\n];\nconst FileText = createLucideIcon(\"file-text\", __iconNode);\n\nexport { __iconNode, FileText as default };\n//# sourceMappingURL=file-text.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\", key: \"5wwlr5\" }],\n [\n \"path\",\n {\n d: \"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\",\n key: \"r6nss1\"\n }\n ]\n];\nconst House = createLucideIcon(\"house\", __iconNode);\n\nexport { __iconNode, House as default };\n//# sourceMappingURL=house.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", ry: \"2\", key: \"1m3agn\" }],\n [\"circle\", { cx: \"9\", cy: \"9\", r: \"2\", key: \"af1f0g\" }],\n [\"path\", { d: \"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\", key: \"1xmnt7\" }]\n];\nconst Image = createLucideIcon(\"image\", __iconNode);\n\nexport { __iconNode, Image as default };\n//# sourceMappingURL=image.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\"\n }\n ],\n [\"path\", { d: \"m9 12 2 2 4-4\", key: \"dzmm74\" }]\n];\nconst ShieldCheck = createLucideIcon(\"shield-check\", __iconNode);\n\nexport { __iconNode, ShieldCheck as default };\n//# sourceMappingURL=shield-check.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\"\n }\n ]\n];\nconst Shield = createLucideIcon(\"shield\", __iconNode);\n\nexport { __iconNode, Shield as default };\n//# sourceMappingURL=shield.js.map\n","import { create } from 'zustand';\nimport type { \n DocumentType, \n KYCDocument, \n DocumentStatus,\n FraudFlag,\n ExtractedData,\n} from '@fileflow/shared';\n\nexport type KYCStep = 'select' | 'upload' | 'processing' | 'review' | 'complete';\n\nexport interface DocumentState {\n id: string | null;\n type: DocumentType;\n status: DocumentStatus;\n file: File | null;\n previewUrl: string | null;\n extractedData: ExtractedData | null;\n confidence: number;\n fraudFlags: FraudFlag[];\n error: string | null;\n}\n\nexport interface KYCState {\n // Session\n sessionId: string | null;\n status: string;\n step: KYCStep;\n \n // Required documents\n requiredDocuments: DocumentType[];\n currentDocumentType: DocumentType | null;\n \n // Document states\n documents: Map<DocumentType, DocumentState>;\n \n // Verification\n isVerified: boolean;\n verificationStatus: object | null;\n \n // UI state\n isLoading: boolean;\n error: string | null;\n}\n\nexport interface KYCActions {\n // Initialize\n setSessionId: (sessionId: string) => void;\n setRequiredDocuments: (documents: DocumentType[]) => void;\n \n // Document management\n setCurrentDocumentType: (type: DocumentType) => void;\n setDocumentFile: (type: DocumentType, file: File) => void;\n setDocumentStatus: (type: DocumentType, status: DocumentStatus) => void;\n setDocumentData: (type: DocumentType, data: Partial<DocumentState>) => void;\n clearDocumentPreview: (type: DocumentType) => void;\n \n // Navigation\n setStep: (step: KYCStep) => void;\n nextDocument: () => void;\n \n // Verification\n setVerificationStatus: (status: object) => void;\n setVerified: (verified: boolean) => void;\n \n // Status\n setStatus: (status: string) => void;\n setLoading: (loading: boolean) => void;\n setError: (error: string | null) => void;\n \n // Helpers\n getNextRequiredDocument: () => DocumentType | null;\n areAllDocumentsUploaded: () => boolean;\n areAllDocumentsProcessed: () => boolean;\n \n // Reset\n reset: () => void;\n}\n\nconst createEmptyDocumentState = (type: DocumentType): DocumentState => ({\n id: null,\n type,\n status: 'uploaded',\n file: null,\n previewUrl: null,\n extractedData: null,\n confidence: 0,\n fraudFlags: [],\n error: null,\n});\n\nconst initialState: KYCState = {\n sessionId: null,\n status: 'idle',\n step: 'select',\n requiredDocuments: [],\n currentDocumentType: null,\n documents: new Map(),\n isVerified: false,\n verificationStatus: null,\n isLoading: false,\n error: null,\n};\n\nexport const useKYCStore = create<KYCState & KYCActions>((set, get) => ({\n ...initialState,\n\n setSessionId: (sessionId) => set({ sessionId }),\n\n setRequiredDocuments: (documents) => {\n const docsMap = new Map<DocumentType, DocumentState>();\n for (const type of documents) {\n docsMap.set(type, createEmptyDocumentState(type));\n }\n set({ \n requiredDocuments: documents, \n documents: docsMap,\n currentDocumentType: documents[0] || null,\n });\n },\n\n setCurrentDocumentType: (type) => set({ currentDocumentType: type }),\n\n setDocumentFile: (type, file) => {\n const { documents } = get();\n const doc = documents.get(type) || createEmptyDocumentState(type);\n \n // Create preview URL\n const previewUrl = URL.createObjectURL(file);\n \n const updated = new Map(documents);\n updated.set(type, {\n ...doc,\n file,\n previewUrl,\n status: 'uploaded',\n error: null,\n });\n \n set({ documents: updated });\n },\n\n setDocumentStatus: (type, status) => {\n const { documents } = get();\n const doc = documents.get(type);\n if (doc) {\n const updated = new Map(documents);\n updated.set(type, { ...doc, status });\n set({ documents: updated });\n }\n },\n\n setDocumentData: (type, data) => {\n const { documents } = get();\n const doc = documents.get(type);\n if (doc) {\n const updated = new Map(documents);\n updated.set(type, { ...doc, ...data });\n set({ documents: updated });\n }\n },\n\n clearDocumentPreview: (type) => {\n const { documents } = get();\n const doc = documents.get(type);\n if (doc?.previewUrl) {\n URL.revokeObjectURL(doc.previewUrl);\n }\n },\n\n setStep: (step) => set({ step }),\n\n nextDocument: () => {\n const { requiredDocuments, currentDocumentType, documents } = get();\n const currentIndex = currentDocumentType \n ? requiredDocuments.indexOf(currentDocumentType) \n : -1;\n \n // Find next document that needs upload\n for (let i = currentIndex + 1; i < requiredDocuments.length; i++) {\n const type = requiredDocuments[i];\n const doc = documents.get(type);\n if (!doc?.file) {\n set({ currentDocumentType: type });\n return;\n }\n }\n \n // All documents uploaded, move to processing/review\n set({ \n currentDocumentType: null,\n step: 'processing',\n });\n },\n\n setVerificationStatus: (status) => set({ verificationStatus: status }),\n \n setVerified: (verified) => set({ isVerified: verified }),\n\n setStatus: (status) => set({ status }),\n \n setLoading: (isLoading) => set({ isLoading }),\n \n setError: (error) => set({ error }),\n\n getNextRequiredDocument: () => {\n const { requiredDocuments, documents } = get();\n for (const type of requiredDocuments) {\n const doc = documents.get(type);\n if (!doc?.file) {\n return type;\n }\n }\n return null;\n },\n\n areAllDocumentsUploaded: () => {\n const { requiredDocuments, documents } = get();\n return requiredDocuments.every((type) => {\n const doc = documents.get(type);\n return doc?.file !== null;\n });\n },\n\n areAllDocumentsProcessed: () => {\n const { requiredDocuments, documents } = get();\n return requiredDocuments.every((type) => {\n const doc = documents.get(type);\n return doc?.status === 'completed' || doc?.status === 'requires_review';\n });\n },\n\n reset: () => {\n // Clean up preview URLs\n const { documents } = get();\n for (const doc of documents.values()) {\n if (doc.previewUrl) {\n URL.revokeObjectURL(doc.previewUrl);\n }\n }\n set(initialState);\n },\n}));\n","import React, { useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport { Upload, FileText, Image, AlertCircle, X } from 'lucide-react';\nimport { clsx } from 'clsx';\nimport { useKYCStore } from '../../store/kyc-store';\nimport type { DocumentType } from '@fileflow/shared';\nimport { DOCUMENT_TYPES } from '@fileflow/shared';\n\ninterface DocumentUploaderProps {\n documentType: DocumentType;\n onFileSelect?: (file: File) => void;\n}\n\nexport const DocumentUploader: React.FC<DocumentUploaderProps> = ({\n documentType,\n onFileSelect,\n}) => {\n const { documents, setDocumentFile, isLoading } = useKYCStore();\n const documentState = documents.get(documentType);\n const documentInfo = DOCUMENT_TYPES[documentType];\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: unknown[]) => {\n if (rejectedFiles.length > 0) {\n return;\n }\n\n if (acceptedFiles.length > 0) {\n const file = acceptedFiles[0];\n setDocumentFile(documentType, file);\n onFileSelect?.(file);\n }\n },\n [documentType, onFileSelect, setDocumentFile]\n );\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDrop,\n accept: {\n 'application/pdf': ['.pdf'],\n 'image/jpeg': ['.jpg', '.jpeg'],\n 'image/png': ['.png'],\n },\n maxSize: documentInfo.maxFileSize,\n multiple: false,\n disabled: isLoading,\n });\n\n const formatFileSize = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n };\n\n const getFileIcon = () => {\n if (documentState?.file?.type === 'application/pdf') {\n return <FileText className=\"ff-w-6 ff-h-6\" />;\n }\n return <Image className=\"ff-w-6 ff-h-6\" />;\n };\n\n const clearFile = (e: React.MouseEvent) => {\n e.stopPropagation();\n useKYCStore.getState().clearDocumentPreview(documentType);\n setDocumentFile(documentType, null as unknown as File);\n };\n\n // Show preview if file is selected\n if (documentState?.file && documentState.previewUrl) {\n return (\n <div className=\"ff-space-y-4\">\n {/* Document Info */}\n <div className=\"ff-p-4 ff-rounded-xl\" style={{ backgroundColor: 'var(--ff-primary-20)', border: '1px solid var(--ff-primary-50)' }}>\n <div className=\"ff-flex ff-items-center ff-gap-3\">\n <div className=\"ff-p-2 ff-rounded-lg\" style={{ backgroundColor: 'var(--ff-primary-30)' }}>\n <span style={{ color: 'var(--ff-primary-90)' }}>{getFileIcon()}</span>\n </div>\n <div className=\"ff-flex-1 ff-min-w-0\">\n <p className=\"ff-font-medium ff-truncate\" style={{ color: 'var(--ff-primary-110)' }}>\n {documentState.file.name}\n </p>\n <p className=\"ff-text-sm\" style={{ color: 'var(--ff-primary-90)' }}>\n {formatFileSize(documentState.file.size)}\n </p>\n </div>\n <button\n onClick={clearFile}\n className=\"ff-p-1.5 ff-rounded-full ff-transition-colors\"\n style={{ color: 'var(--ff-primary-90)' }}\n aria-label=\"Remove file\"\n >\n <X className=\"ff-w-5 ff-h-5\" />\n </button>\n </div>\n </div>\n\n {/* Preview */}\n <div className=\"ff-document-preview ff-aspect-[3/4] ff-max-h-96\">\n {documentState.file.type === 'application/pdf' ? (\n <iframe\n src={documentState.previewUrl}\n className=\"ff-w-full ff-h-full ff-rounded-xl\"\n title=\"Document preview\"\n />\n ) : (\n <img\n src={documentState.previewUrl}\n alt=\"Document preview\"\n className=\"ff-w-full ff-h-full ff-object-contain ff-rounded-xl\"\n />\n )}\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"ff-space-y-6\">\n {/* Document Type Info */}\n <div className=\"ff-text-center ff-mb-4\">\n <h3 className=\"ff-text-lg ff-font-semibold\" style={{ color: 'var(--ff-text-primary)' }}>{documentInfo.label}</h3>\n <p className=\"ff-text-sm ff-mt-1\" style={{ color: 'var(--ff-text-muted)' }}>{documentInfo.description}</p>\n </div>\n\n {/* Dropzone - Demo style */}\n <div\n {...getRootProps()}\n className={clsx(\n 'ff-dropzone',\n isDragActive && 'ff-dropzone-active',\n isLoading && 'ff-opacity-50 ff-cursor-not-allowed'\n )}\n >\n <input {...getInputProps()} />\n <div className=\"ff-dropzone-icon-wrapper\">\n <Upload className=\"ff-dropzone-icon\" />\n </div>\n <h3 className=\"ff-dropzone-text\">\n {isDragActive ? 'Drop your document here' : 'Upload your document'}\n </h3>\n <p className=\"ff-dropzone-hint\">Drag and drop or click to select</p>\n <label className=\"ff-inline-block\">\n <span className={clsx(\n 'ff-btn ff-btn-primary',\n isLoading && 'ff-opacity-50 ff-cursor-wait'\n )}>\n {isLoading ? 'Processing...' : 'Choose file'}\n </span>\n </label>\n <div className=\"ff-flex ff-flex-wrap ff-justify-center ff-gap-2 ff-mt-3\">\n {documentInfo.acceptedFormats.map((format) => (\n <span \n key={format} \n className=\"ff-px-2 ff-py-1 ff-rounded ff-text-xs\"\n style={{ backgroundColor: 'var(--ff-bg-tertiary)', color: 'var(--ff-text-muted)' }}\n >\n {format.toUpperCase()}\n </span>\n ))}\n <span className=\"ff-px-2 ff-py-1 ff-text-xs\" style={{ color: 'var(--ff-text-muted)' }}>\n Max {formatFileSize(documentInfo.maxFileSize)}\n </span>\n </div>\n </div>\n\n {/* Error */}\n {documentState?.error && (\n <div className=\"ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm\" style={{ backgroundColor: 'var(--ff-error-light)', color: 'var(--ff-error)' }}>\n <AlertCircle className=\"ff-w-4 ff-h-4 ff-flex-shrink-0\" />\n <p>{documentState.error}</p>\n </div>\n )}\n\n {/* Tips */}\n <div className=\"ff-rounded-xl ff-p-4\" style={{ backgroundColor: 'var(--ff-bg-secondary)' }}>\n <h4 className=\"ff-text-sm ff-font-medium ff-mb-2\" style={{ color: 'var(--ff-text-secondary)' }}>Tips for best results:</h4>\n <ul className=\"ff-text-sm ff-space-y-1 ff-list-disc ff-list-inside\" style={{ color: 'var(--ff-text-muted)' }}>\n <li>Ensure all text is clearly visible and readable</li>\n <li>Avoid glare, shadows, or blurry images</li>\n <li>Include all four corners of the document</li>\n <li>Use good lighting when taking photos</li>\n </ul>\n </div>\n </div>\n );\n};\n","import React from 'react';\nimport { CheckCircle, XCircle, AlertTriangle, Loader2, Clock } from 'lucide-react';\nimport { clsx } from 'clsx';\nimport { useKYCStore } from '../../store/kyc-store';\nimport type { DocumentType, DocumentStatus as DocStatus } from '@fileflow/shared';\nimport { DOCUMENT_TYPES } from '@fileflow/shared';\n\ninterface DocumentStatusProps {\n documentType: DocumentType;\n showDetails?: boolean;\n}\n\nexport const DocumentStatus: React.FC<DocumentStatusProps> = ({\n documentType,\n showDetails = true,\n}) => {\n const { documents } = useKYCStore();\n const documentState = documents.get(documentType);\n const documentInfo = DOCUMENT_TYPES[documentType];\n\n const getStatusConfig = (status?: DocStatus) => {\n switch (status) {\n case 'completed':\n return {\n icon: CheckCircle,\n iconColor: 'var(--ff-success)',\n bgColor: 'var(--ff-success-light)',\n label: 'Verified',\n labelColor: 'var(--ff-success)',\n description: 'Document successfully processed',\n };\n case 'requires_review':\n return {\n icon: AlertTriangle,\n iconColor: 'var(--ff-warning)',\n bgColor: 'var(--ff-warning-light)',\n label: 'Review Required',\n labelColor: 'var(--ff-warning)',\n description: 'Manual verification may be needed',\n };\n case 'failed':\n return {\n icon: XCircle,\n iconColor: 'var(--ff-error)',\n bgColor: 'var(--ff-error-light)',\n label: 'Failed',\n labelColor: 'var(--ff-error)',\n description: 'Unable to process document',\n };\n case 'processing':\n return {\n icon: Loader2,\n iconColor: 'var(--ff-primary-90)',\n bgColor: 'var(--ff-primary-20)',\n label: 'Processing',\n labelColor: 'var(--ff-primary-90)',\n description: 'Analyzing document...',\n };\n case 'uploaded':\n return {\n icon: Clock,\n iconColor: 'var(--ff-text-secondary)',\n bgColor: 'var(--ff-bg-tertiary)',\n label: 'Pending',\n labelColor: 'var(--ff-text-secondary)',\n description: 'Waiting to be processed',\n };\n default:\n return {\n icon: Clock,\n iconColor: 'var(--ff-text-muted)',\n bgColor: 'var(--ff-bg-tertiary)',\n label: 'Not Uploaded',\n labelColor: 'var(--ff-text-muted)',\n description: 'Upload document to continue',\n };\n }\n };\n\n const statusConfig = getStatusConfig(documentState?.status);\n const Icon = statusConfig.icon;\n\n const getConfidenceColor = (confidence: number) => {\n if (confidence >= 0.8) return 'var(--ff-success)';\n if (confidence >= 0.6) return 'var(--ff-warning)';\n return 'var(--ff-error)';\n };\n\n return (\n <div className=\"ff-space-y-3\">\n {/* Status Header */}\n <div className=\"ff-flex ff-items-center ff-gap-3\">\n <div className=\"ff-p-2 ff-rounded-xl\" style={{ backgroundColor: statusConfig.bgColor }}>\n <Icon\n className={clsx(\n 'ff-w-5 ff-h-5',\n documentState?.status === 'processing' && 'ff-animate-spin'\n )}\n style={{ color: statusConfig.iconColor }}\n />\n </div>\n <div>\n <p className=\"ff-font-medium\" style={{ color: 'var(--ff-text-primary)' }}>{documentInfo.label}</p>\n <p className=\"ff-text-sm\" style={{ color: statusConfig.labelColor }}>{statusConfig.label}</p>\n </div>\n </div>\n\n {/* Confidence Score */}\n {documentState?.confidence !== undefined && documentState.confidence > 0 && (\n <div className=\"ff-space-y-1\">\n <div className=\"ff-flex ff-items-center ff-justify-between ff-text-sm\">\n <span style={{ color: 'var(--ff-text-secondary)' }}>Confidence</span>\n <span className=\"ff-font-medium\" style={{ color: getConfidenceColor(documentState.confidence) }}>\n {Math.round(documentState.confidence * 100)}%\n </span>\n </div>\n <div className=\"ff-progress\">\n <div\n className=\"ff-progress-bar\"\n style={{ \n width: `${documentState.confidence * 100}%`,\n backgroundColor: getConfidenceColor(documentState.confidence)\n }}\n />\n </div>\n </div>\n )}\n\n {/* Fraud Flags */}\n {showDetails && documentState?.fraudFlags && documentState.fraudFlags.length > 0 && (\n <div className=\"ff-space-y-2\">\n <p className=\"ff-text-sm ff-font-medium\" style={{ color: 'var(--ff-text-secondary)' }}>Issues Detected</p>\n <div className=\"ff-space-y-1\">\n {documentState.fraudFlags.map((flag, index) => (\n <div\n key={index}\n className=\"ff-flex ff-items-start ff-gap-2 ff-p-2 ff-rounded-lg ff-text-sm\"\n style={{\n backgroundColor: flag.severity === 'high' ? 'var(--ff-error-light)' : flag.severity === 'medium' ? 'var(--ff-warning-light)' : 'var(--ff-bg-tertiary)',\n color: flag.severity === 'high' ? 'var(--ff-error)' : flag.severity === 'medium' ? 'var(--ff-warning)' : 'var(--ff-text-secondary)',\n }}\n >\n {flag.severity === 'high' ? (\n <XCircle className=\"ff-w-4 ff-h-4 ff-flex-shrink-0 ff-mt-0.5\" />\n ) : (\n <AlertTriangle className=\"ff-w-4 ff-h-4 ff-flex-shrink-0 ff-mt-0.5\" />\n )}\n <span>{flag.message}</span>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Extracted Data Preview */}\n {showDetails &&\n documentState?.extractedData &&\n documentState.status === 'completed' && (\n <div className=\"ff-rounded-xl ff-p-3\" style={{ backgroundColor: 'var(--ff-bg-tertiary)' }}>\n <p className=\"ff-text-sm ff-font-medium ff-mb-2\" style={{ color: 'var(--ff-text-secondary)' }}>\n Extracted Information\n </p>\n <dl className=\"ff-space-y-1 ff-text-sm\">\n {'fullName' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Name</dt>\n <dd className=\"ff-font-medium\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.fullName}\n </dd>\n </div>\n )}\n {'dateOfBirth' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Date of Birth</dt>\n <dd style={{ color: 'var(--ff-text-primary)' }}>{documentState.extractedData.dateOfBirth}</dd>\n </div>\n )}\n {documentState.extractedData.documentType === 'passport' &&\n 'passportNumber' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Passport #</dt>\n <dd className=\"ff-font-mono\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.passportNumber}\n </dd>\n </div>\n )}\n {documentState.extractedData.documentType === 'drivers_license' &&\n 'licenseNumber' in documentState.extractedData && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>License #</dt>\n <dd className=\"ff-font-mono\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.licenseNumber}\n </dd>\n </div>\n )}\n {'address' in documentState.extractedData && documentState.extractedData.address && (\n <div className=\"ff-flex ff-justify-between\">\n <dt style={{ color: 'var(--ff-text-muted)' }}>Address</dt>\n <dd className=\"ff-text-right\" style={{ color: 'var(--ff-text-primary)' }}>\n {documentState.extractedData.address.city},{' '}\n {documentState.extractedData.address.province}\n </dd>\n </div>\n )}\n </dl>\n </div>\n )}\n </div>\n );\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport {\n FileText,\n Car,\n Home,\n CheckCircle,\n X,\n Loader2,\n ChevronRight,\n ShieldCheck,\n Shield,\n} from 'lucide-react';\nimport { clsx } from 'clsx';\nimport { useKYCStore, type KYCStep } from '../../store/kyc-store';\nimport { getClient } from '../../api/client';\nimport { DocumentUploader } from './DocumentUploader';\nimport { DocumentStatus } from './DocumentStatus';\nimport { StyleProvider } from '../../styles/StyleProvider';\nimport type { DocumentType, KYCSession, KYCDocument } from '@fileflow/shared';\nimport { DOCUMENT_TYPES } from '@fileflow/shared';\n\n// KYC steps for the step indicator\nconst KYC_STEP_LABELS = ['select', 'upload', 'review', 'complete'] as const;\n\ninterface KYCWizardProps {\n requiredDocuments: DocumentType[];\n onComplete?: (session: KYCSession) => void;\n onCancel?: () => void;\n onError?: (error: Error) => void;\n}\n\nconst DOCUMENT_ICONS: Record<DocumentType, React.ElementType> = {\n passport: FileText,\n drivers_license: Car,\n proof_of_address: Home,\n};\n\nexport const KYCWizard: React.FC<KYCWizardProps> = ({\n requiredDocuments,\n onComplete,\n onCancel,\n onError,\n}) => {\n const {\n sessionId,\n step,\n currentDocumentType,\n documents,\n isVerified,\n verificationStatus,\n isLoading,\n error,\n setSessionId,\n setRequiredDocuments,\n setCurrentDocumentType,\n setDocumentStatus,\n setDocumentData,\n setStep,\n nextDocument,\n setVerificationStatus,\n setVerified,\n setLoading,\n setError,\n areAllDocumentsUploaded,\n areAllDocumentsProcessed,\n reset,\n } = useKYCStore();\n\n const [pollingDocument, setPollingDocument] = useState<string | null>(null);\n\n // Initialize\n useEffect(() => {\n setRequiredDocuments(requiredDocuments);\n initializeSession();\n\n return () => {\n // Cleanup polling on unmount\n setPollingDocument(null);\n };\n }, [requiredDocuments]);\n\n const initializeSession = async () => {\n try {\n setLoading(true);\n const client = getClient();\n const result = await client.createKYCSession(requiredDocuments);\n setSessionId(result.sessionId);\n setStep('upload');\n } catch (err) {\n const error = err as Error;\n setError(error.message);\n onError?.(error);\n } finally {\n setLoading(false);\n }\n };\n\n const handleFileSelect = useCallback(\n async (file: File) => {\n if (!sessionId || !currentDocumentType) return;\n\n try {\n setLoading(true);\n setError(null);\n\n const client = getClient();\n const result = await client.uploadKYCDocument(sessionId, currentDocumentType, file);\n\n setDocumentData(currentDocumentType, {\n id: result.documentId,\n status: 'processing',\n });\n\n // Start polling for document status\n setPollingDocument(result.documentId);\n pollDocumentStatus(result.documentId);\n } catch (err) {\n const error = err as Error;\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: error.message,\n });\n onError?.(error);\n } finally {\n setLoading(false);\n }\n },\n [sessionId, currentDocumentType]\n );\n\n const pollDocumentStatus = async (documentId: string) => {\n const maxAttempts = 30;\n const maxConsecutiveErrors = 3; // Stop after 3 consecutive errors\n let attempts = 0;\n let consecutiveErrors = 0;\n\n const poll = async () => {\n if (attempts >= maxAttempts) {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: 'Processing timed out. Please try again.',\n });\n }\n return;\n }\n\n // Stop polling if we've had too many consecutive errors\n if (consecutiveErrors >= maxConsecutiveErrors) {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: 'Failed to check document status. Please refresh and try again.',\n });\n }\n return;\n }\n\n try {\n const client = getClient();\n const result = await client.getKYCDocument(documentId);\n const doc = result.document as KYCDocument;\n\n // Reset consecutive errors on success\n consecutiveErrors = 0;\n\n const docType = doc.type as DocumentType;\n setDocumentData(docType, {\n id: doc.id,\n status: doc.status,\n extractedData: doc.extractedData,\n confidence: doc.confidence,\n fraudFlags: doc.fraudFlags,\n error: null, // Clear any previous errors\n });\n\n if (doc.status === 'completed' || doc.status === 'requires_review' || doc.status === 'failed') {\n setPollingDocument(null);\n\n // Check if all documents are processed\n if (areAllDocumentsUploaded()) {\n const allProcessed = areAllDocumentsProcessed();\n if (allProcessed) {\n setStep('review');\n }\n } else {\n // Move to next document\n nextDocument();\n }\n return;\n }\n\n // Continue polling\n attempts++;\n setTimeout(poll, 2000);\n } catch (err) {\n const error = err as Error & { status?: number };\n consecutiveErrors++;\n attempts++;\n \n // On 404, stop immediately - the document doesn't exist\n if (error.status === 404 || error.message?.includes('not found')) {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: 'Session not found or invalid state',\n });\n }\n return;\n }\n\n // On other errors, retry with backoff (up to maxConsecutiveErrors times)\n if (consecutiveErrors < maxConsecutiveErrors) {\n setTimeout(poll, 3000 * consecutiveErrors); // Exponential backoff\n } else {\n setPollingDocument(null);\n if (currentDocumentType) {\n setDocumentData(currentDocumentType, {\n status: 'failed',\n error: error.message || 'Failed to process document',\n });\n }\n }\n }\n };\n\n poll();\n };\n\n const handleVerify = async () => {\n if (!sessionId) return;\n\n try {\n setLoading(true);\n setError(null);\n\n const client = getClient();\n const result = await client.verifyKYCSession(sessionId, true);\n\n setVerificationStatus(result.verificationStatus);\n const status = result.verificationStatus as { isVerified: boolean };\n setVerified(status.isVerified);\n setStep('complete');\n\n onComplete?.(result as unknown as KYCSession);\n } catch (err) {\n const error = err as Error;\n setError(error.message);\n onError?.(error);\n } finally {\n setLoading(false);\n }\n };\n\n const handleCancel = () => {\n reset();\n onCancel?.();\n };\n\n const selectDocument = (type: DocumentType) => {\n setCurrentDocumentType(type);\n setStep('upload');\n };\n\n const isDocumentComplete = (type: DocumentType) => {\n const doc = documents.get(type);\n return doc?.status === 'completed' || doc?.status === 'requires_review';\n };\n\n // Get step index for the step indicator\n const getDisplayStepIndex = () => {\n const currentStep = step === 'processing' ? 'upload' : step;\n return KYC_STEP_LABELS.indexOf(currentStep as typeof KYC_STEP_LABELS[number]);\n };\n\n return (\n <StyleProvider>\n <div className=\"ff-container ff-modal\">\n {/* Modal Header - Demo style */}\n <div className=\"ff-modal-header\">\n <div className=\"ff-modal-header-left\">\n <div className=\"ff-flex ff-items-center ff-gap-3\">\n <div className=\"ff-modal-icon\">\n <Shield />\n </div>\n <h2 className=\"ff-modal-title\">Identity Verification</h2>\n </div>\n {/* Step Indicator - Demo style */}\n <div className=\"ff-steps ff-ml-4\">\n {KYC_STEP_LABELS.map((s, i) => (\n <React.Fragment key={s}>\n <div\n className={clsx(\n 'ff-step',\n getDisplayStepIndex() === i && 'ff-step-active',\n getDisplayStepIndex() > i && 'ff-step-complete',\n getDisplayStepIndex() < i && 'ff-step-pending'\n )}\n >\n {getDisplayStepIndex() > i ? '✓' : i + 1}\n </div>\n {i < KYC_STEP_LABELS.length - 1 && (\n <div className={clsx(\n 'ff-step-connector',\n getDisplayStepIndex() > i && 'ff-step-connector-complete'\n )} />\n )}\n </React.Fragment>\n ))}\n </div>\n </div>\n <button\n onClick={handleCancel}\n className=\"ff-modal-close\"\n >\n <X className=\"ff-w-5 ff-h-5\" />\n </button>\n </div>\n\n {/* Modal Body */}\n <div className=\"ff-modal-body\">\n {error && (\n <div className=\"ff-mb-4 ff-p-4 ff-rounded-lg ff-text-sm\" style={{ backgroundColor: 'var(--ff-error-light)', color: 'var(--ff-error)' }}>\n {error}\n </div>\n )}\n\n {/* Document Selection */}\n {step === 'select' && (\n <div className=\"ff-space-y-4\">\n <p className=\"ff-text-center ff-mb-6\" style={{ color: 'var(--ff-text-muted)' }}>\n Please upload the following documents to verify your identity\n </p>\n <div className=\"ff-grid ff-gap-3\">\n {requiredDocuments.map((type) => {\n const Icon = DOCUMENT_ICONS[type];\n const info = DOCUMENT_TYPES[type];\n const doc = documents.get(type);\n const isComplete = isDocumentComplete(type);\n\n return (\n <button\n key={type}\n onClick={() => selectDocument(type)}\n className={clsx(\n 'ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-xl ff-border-2 ff-text-left ff-transition-all ff-duration-150',\n isComplete\n ? 'ff-border-transparent'\n : 'ff-border-transparent hover:ff-border-transparent'\n )}\n style={{\n backgroundColor: isComplete ? 'var(--ff-success-light)' : 'var(--ff-bg-secondary)',\n borderColor: isComplete ? 'var(--ff-success)' : 'var(--ff-border-light)',\n }}\n >\n <div\n className=\"ff-p-3 ff-rounded-xl\"\n style={{\n backgroundColor: isComplete ? 'rgba(41, 142, 51, 0.15)' : 'var(--ff-bg-tertiary)',\n }}\n >\n {isComplete ? (\n <CheckCircle className=\"ff-w-6 ff-h-6\" style={{ color: 'var(--ff-success)' }} />\n ) : (\n <Icon className=\"ff-w-6 ff-h-6\" style={{ color: 'var(--ff-text-secondary)' }} />\n )}\n </div>\n <div className=\"ff-flex-1\">\n <p className=\"ff-font-medium\" style={{ color: 'var(--ff-text-primary)' }}>{info.label}</p>\n <p className=\"ff-text-sm\" style={{ color: 'var(--ff-text-muted)' }}>{info.description}</p>\n </div>\n <ChevronRight className=\"ff-w-5 ff-h-5\" style={{ color: 'var(--ff-text-muted)' }} />\n </button>\n );\n })}\n </div>\n </div>\n )}\n\n {/* Document Upload */}\n {step === 'upload' && currentDocumentType && (\n <div className=\"ff-py-4\">\n <div className=\"ff-max-w-lg ff-mx-auto\">\n <DocumentUploader documentType={currentDocumentType} onFileSelect={handleFileSelect} />\n </div>\n </div>\n )}\n\n {/* Processing */}\n {step === 'processing' && (\n <div className=\"ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12\">\n <Loader2 className=\"ff-w-12 ff-h-12 ff-animate-spin ff-mb-4\" style={{ color: 'var(--ff-primary-90)' }} />\n <h3 className=\"ff-text-lg ff-font-semibold ff-mb-2\" style={{ color: 'var(--ff-text-primary)' }}>\n Processing Documents\n </h3>\n <p style={{ color: 'var(--ff-text-muted)' }} className=\"ff-text-center\">\n We're analyzing your documents. This may take a moment...\n </p>\n </div>\n )}\n\n {/* Review */}\n {step === 'review' && (\n <div className=\"ff-space-y-6\">\n <div className=\"ff-text-center ff-mb-6\">\n <h3 className=\"ff-text-lg ff-font-semibold\" style={{ color: 'var(--ff-text-primary)' }}>Review Your Documents</h3>\n <p style={{ color: 'var(--ff-text-muted)' }}>\n Please review the extracted information before completing verification\n </p>\n </div>\n\n <div className=\"ff-grid ff-gap-4\">\n {requiredDocuments.map((type) => (\n <div\n key={type}\n className=\"ff-rounded-xl ff-p-4\"\n style={{ backgroundColor: 'var(--ff-bg-secondary)', border: '1px solid var(--ff-border-light)' }}\n >\n <DocumentStatus documentType={type} showDetails={true} />\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Complete */}\n {step === 'complete' && (\n <div className=\"ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12\">\n <div\n className=\"ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4\"\n style={{ backgroundColor: isVerified ? 'var(--ff-success-light)' : 'var(--ff-warning-light)' }}\n >\n {isVerified ? (\n <CheckCircle className=\"ff-w-10 ff-h-10\" style={{ color: 'var(--ff-success)' }} />\n ) : (\n <ShieldCheck className=\"ff-w-10 ff-h-10\" style={{ color: 'var(--ff-warning)' }} />\n )}\n </div>\n <h3 className=\"ff-text-xl ff-font-semibold ff-mb-2\" style={{ color: 'var(--ff-text-primary)' }}>\n {isVerified ? 'Verification Complete!' : 'Review Required'}\n </h3>\n <p style={{ color: 'var(--ff-text-muted)' }} className=\"ff-text-center\">\n {isVerified\n ? 'Your identity has been successfully verified.'\n : 'Additional review may be required. We will contact you if needed.'}\n </p>\n </div>\n )}\n </div>\n\n {/* Modal Footer */}\n {step !== 'complete' && (\n <div className=\"ff-modal-footer\">\n <button\n onClick={() => {\n if (step === 'upload') {\n setStep('select');\n } else if (step === 'review') {\n setStep('select');\n }\n }}\n disabled={isLoading}\n className=\"ff-btn ff-btn-secondary\"\n >\n Back\n </button>\n\n {step === 'review' && (\n <button\n onClick={handleVerify}\n disabled={isLoading || !areAllDocumentsProcessed()}\n className=\"ff-btn ff-btn-primary\"\n >\n {isLoading ? (\n <>\n <Loader2 className=\"ff-w-4 ff-h-4 ff-animate-spin\" />\n Verifying...\n </>\n ) : (\n 'Complete Verification'\n )}\n </button>\n )}\n\n {step === 'select' && areAllDocumentsUploaded() && (\n <button\n onClick={() => setStep('review')}\n className=\"ff-btn ff-btn-primary\"\n >\n Review & Verify\n </button>\n )}\n </div>\n )}\n </div>\n </StyleProvider>\n );\n};\n"],"names":["__iconNode","Car","createLucideIcon","Clock","FileText","House","Image","ShieldCheck","Shield","createEmptyDocumentState","type","initialState","useKYCStore","create","set","get","sessionId","documents","docsMap","file","doc","previewUrl","updated","status","data","step","requiredDocuments","currentDocumentType","currentIndex","i","verified","isLoading","error","DocumentUploader","documentType","onFileSelect","setDocumentFile","documentState","documentInfo","DOCUMENT_TYPES","onDrop","useCallback","acceptedFiles","rejectedFiles","getRootProps","getInputProps","isDragActive","useDropzone","formatFileSize","bytes","getFileIcon","_a","jsx","clearFile","e","jsxs","X","clsx","Upload","format","AlertCircle","DocumentStatus","showDetails","statusConfig","CheckCircle","AlertTriangle","XCircle","Loader2","Icon","getConfidenceColor","confidence","flag","index","KYC_STEP_LABELS","DOCUMENT_ICONS","Home","KYCWizard","onComplete","onCancel","onError","isVerified","verificationStatus","setSessionId","setRequiredDocuments","setCurrentDocumentType","setDocumentStatus","setDocumentData","setStep","nextDocument","setVerificationStatus","setVerified","setLoading","setError","areAllDocumentsUploaded","areAllDocumentsProcessed","reset","pollingDocument","setPollingDocument","useState","useEffect","initializeSession","result","getClient","err","handleFileSelect","pollDocumentStatus","documentId","attempts","consecutiveErrors","poll","docType","handleVerify","handleCancel","selectDocument","isDocumentComplete","getDisplayStepIndex","currentStep","StyleProvider","s","React","info","isComplete","ChevronRight","Fragment"],"mappings":"sGAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,GAAa,CACjB,CACE,OACA,CACE,EAAG,6KACH,IAAK,OACX,CACA,EACE,CAAC,SAAU,CAAE,GAAI,IAAK,GAAI,KAAM,EAAG,IAAK,IAAK,SAAU,EACvD,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAQ,CAAE,CAC1D,EACMC,GAA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A,CAEJ,CAAA,CACF,CAEJ","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
package/dist/import.d.ts
CHANGED
|
@@ -118,36 +118,21 @@ export declare type ImportStep = 'upload' | 'mapping' | 'validation' | 'review'
|
|
|
118
118
|
export declare const ImportWizard: default_2.FC<ImportWizardProps>;
|
|
119
119
|
|
|
120
120
|
declare interface ImportWizardProps {
|
|
121
|
-
/**
|
|
122
|
-
* Template name to use for import schema.
|
|
123
|
-
* Use this instead of schema prop for built-in templates.
|
|
124
|
-
* Available templates: 'sample-contact', 'payspace-batch'
|
|
125
|
-
*/
|
|
121
|
+
/** Template name to use for import schema. */
|
|
126
122
|
template?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Custom import schema. Only used if template is not provided.
|
|
129
|
-
* @deprecated Prefer using template prop for built-in schemas
|
|
130
|
-
*/
|
|
123
|
+
/** Custom import schema. Only used if template is not provided. */
|
|
131
124
|
schema?: ImportSchema;
|
|
132
|
-
/**
|
|
133
|
-
* Display mode for the wizard.
|
|
134
|
-
* - 'modal' (default): Renders as a centered modal with overlay, shadow, and animations
|
|
135
|
-
* - 'embed': Renders inline without overlay/shadow, width: 100%, consumer controls sizing
|
|
136
|
-
*/
|
|
125
|
+
/** Display mode: 'modal' (default) or 'embed' (inline, user-resizable). */
|
|
137
126
|
mode?: 'modal' | 'embed';
|
|
138
|
-
/**
|
|
139
|
-
* Custom theme to override default SDK colors.
|
|
140
|
-
* Partial overrides are supported - only specify the colors you want to change.
|
|
141
|
-
*/
|
|
127
|
+
/** Custom theme to override default SDK colors. */
|
|
142
128
|
theme?: FileFlowTheme;
|
|
129
|
+
/** Enable Shadow DOM for bulletproof style isolation. */
|
|
130
|
+
useShadowDom?: boolean;
|
|
143
131
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* isolating styles from the host application in both directions.
|
|
147
|
-
*
|
|
148
|
-
* @default false
|
|
132
|
+
* External error to display on the complete step, overriding the SDK's own
|
|
133
|
+
* success state. Use this to pass backend errors received after onComplete.
|
|
149
134
|
*/
|
|
150
|
-
|
|
135
|
+
error?: string | null;
|
|
151
136
|
onComplete?: (result: ImportResult) => void;
|
|
152
137
|
onCancel?: () => void;
|
|
153
138
|
onError?: (error: Error) => void;
|
package/dist/import.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./ImportWizard-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./ImportWizard-4E5fcskQ.js");exports.ColumnMapper=r.ColumnMapper;exports.DataTable=r.DataTable;exports.FileUploader=r.FileUploader;exports.ImportWizard=r.ImportWizard;exports.ValidationSummary=r.ValidationSummary;exports.useImportStore=r.useImportStore;
|
|
2
2
|
//# sourceMappingURL=import.js.map
|
package/dist/import.mjs
CHANGED