ptechcore_ui 1.0.27 → 1.0.30
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/index.cjs +576 -40
- package/dist/index.d.cts +213 -1
- package/dist/index.d.ts +213 -1
- package/dist/index.js +562 -40
- package/package.json +58 -57
package/dist/index.d.cts
CHANGED
|
@@ -15,6 +15,7 @@ interface ModalProps {
|
|
|
15
15
|
title: string;
|
|
16
16
|
description?: string;
|
|
17
17
|
width?: string;
|
|
18
|
+
minContentHeight?: string;
|
|
18
19
|
open: boolean;
|
|
19
20
|
onClose: () => void;
|
|
20
21
|
children: React$1.ReactNode;
|
|
@@ -88,6 +89,12 @@ declare const RewiseLayout: React$1.FC<PrivateLayoutProps>;
|
|
|
88
89
|
|
|
89
90
|
declare const ToastContainer: React$1.FC;
|
|
90
91
|
|
|
92
|
+
interface TrackableModel {
|
|
93
|
+
id?: number | null;
|
|
94
|
+
created_at?: string;
|
|
95
|
+
updated_at?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
interface Module$1 {
|
|
92
99
|
id: number;
|
|
93
100
|
code: string;
|
|
@@ -257,6 +264,7 @@ interface SessionContextType {
|
|
|
257
264
|
logout: () => void;
|
|
258
265
|
showAuthModal: boolean;
|
|
259
266
|
setShowAuthModal: (data: boolean) => void;
|
|
267
|
+
refreshSession: () => Promise<void>;
|
|
260
268
|
vendors: Vendor[];
|
|
261
269
|
setVendors: (vendors: Vendor[]) => void;
|
|
262
270
|
loadingVendors: boolean;
|
|
@@ -380,6 +388,7 @@ declare const AuthServices: {
|
|
|
380
388
|
addUser: (payload: User) => Promise<unknown>;
|
|
381
389
|
login: (payload: LoginPayload) => Promise<unknown>;
|
|
382
390
|
getUserInformations: (token: string) => Promise<unknown>;
|
|
391
|
+
getUserInformationsByOldId: (id: number) => Promise<unknown>;
|
|
383
392
|
logout: () => Promise<unknown>;
|
|
384
393
|
};
|
|
385
394
|
|
|
@@ -557,6 +566,46 @@ declare const ApprovalServices: {
|
|
|
557
566
|
}>;
|
|
558
567
|
};
|
|
559
568
|
|
|
569
|
+
type UnitOccupancyStatus = 'occupiable' | 'non_occupiable' | 'in_negociated' | 'indeterminate';
|
|
570
|
+
type UnitStatus = 'long rental' | 'short rental' | 'other' | 'draft' | 'active';
|
|
571
|
+
type UnitDestination = 'Nl' | 'L';
|
|
572
|
+
type UnitArchived = 'archived' | 'not_archived';
|
|
573
|
+
interface Unit extends TrackableModel {
|
|
574
|
+
name?: string | null;
|
|
575
|
+
code?: string | null;
|
|
576
|
+
location?: string | null;
|
|
577
|
+
object_name?: string | null;
|
|
578
|
+
unit_description?: string | null;
|
|
579
|
+
unit_comment?: string | null;
|
|
580
|
+
area_gla?: number | null;
|
|
581
|
+
area_gfa?: number | null;
|
|
582
|
+
area_gfa_mezz?: number | null;
|
|
583
|
+
area_m_2?: number | null;
|
|
584
|
+
area_m_2_mezz?: number | null;
|
|
585
|
+
height?: number | null;
|
|
586
|
+
width?: number | null;
|
|
587
|
+
length?: number | null;
|
|
588
|
+
unit_destination?: UnitDestination;
|
|
589
|
+
no_leasable_occupancy_status?: string;
|
|
590
|
+
area_category?: string | null;
|
|
591
|
+
detail_cat?: string | null;
|
|
592
|
+
zoning?: number | null;
|
|
593
|
+
drawing?: string | null;
|
|
594
|
+
archived?: UnitArchived;
|
|
595
|
+
unit_start_date?: string | null;
|
|
596
|
+
unit_end_date?: string | null;
|
|
597
|
+
occupancy_status?: UnitOccupancyStatus;
|
|
598
|
+
status?: UnitStatus;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
declare const UnitServices: {
|
|
602
|
+
create: (data: Partial<Unit>) => Promise<unknown>;
|
|
603
|
+
get: (id: number) => Promise<unknown>;
|
|
604
|
+
list: (params?: any) => Promise<unknown>;
|
|
605
|
+
update: (id: number, data: Partial<Unit>) => Promise<unknown>;
|
|
606
|
+
delete: (id: number) => Promise<unknown>;
|
|
607
|
+
};
|
|
608
|
+
|
|
560
609
|
type ImportField = {
|
|
561
610
|
value: string;
|
|
562
611
|
label: string;
|
|
@@ -679,6 +728,7 @@ declare const SelectVendor: React.FC<SelectProps$1>;
|
|
|
679
728
|
declare const SelectUser: React.FC<SelectProps$1>;
|
|
680
729
|
declare const SelectDepartment: React.FC<SelectProps$1>;
|
|
681
730
|
declare const SelectCostCenter: React.FC<SelectProps$1>;
|
|
731
|
+
declare const SelectUnit: React.FC<SelectProps$1>;
|
|
682
732
|
|
|
683
733
|
interface SelectProps {
|
|
684
734
|
value?: any;
|
|
@@ -1286,4 +1336,166 @@ declare const getFileIcon: (mimeType?: string, isFolder?: boolean, isOpen?: bool
|
|
|
1286
1336
|
declare const formatFileSize: (bytes?: number) => string;
|
|
1287
1337
|
declare const formatDate: (date?: Date | string) => string;
|
|
1288
1338
|
|
|
1289
|
-
|
|
1339
|
+
interface PrintPreviewProps {
|
|
1340
|
+
/** Contenu à imprimer */
|
|
1341
|
+
children: ReactNode;
|
|
1342
|
+
/** Contrôle l'affichage du modal */
|
|
1343
|
+
isOpen: boolean;
|
|
1344
|
+
/** Callback pour fermer le modal */
|
|
1345
|
+
onClose: () => void;
|
|
1346
|
+
/** Titre affiché dans l'en-tête du modal */
|
|
1347
|
+
title?: string;
|
|
1348
|
+
/** Nom du fichier pour le PDF (sans extension) */
|
|
1349
|
+
documentName?: string;
|
|
1350
|
+
/** Largeur du document (ex: '210mm' pour A4) */
|
|
1351
|
+
pageWidth?: string;
|
|
1352
|
+
/** Hauteur minimale du document */
|
|
1353
|
+
pageMinHeight?: string;
|
|
1354
|
+
/** Orientation de la page */
|
|
1355
|
+
orientation?: 'portrait' | 'landscape';
|
|
1356
|
+
/** Callback appelé après l'impression */
|
|
1357
|
+
onAfterPrint?: () => void;
|
|
1358
|
+
/** Callback appelé avant l'impression */
|
|
1359
|
+
onBeforePrint?: () => Promise<void>;
|
|
1360
|
+
}
|
|
1361
|
+
interface PrintableDocumentProps {
|
|
1362
|
+
/** Contenu du document */
|
|
1363
|
+
children: ReactNode;
|
|
1364
|
+
/** Classes CSS additionnelles */
|
|
1365
|
+
className?: string;
|
|
1366
|
+
/** Style inline additionnel */
|
|
1367
|
+
style?: React$1.CSSProperties;
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Wrapper pour le contenu imprimable
|
|
1371
|
+
* Applique les styles de base pour l'impression
|
|
1372
|
+
*/
|
|
1373
|
+
declare const PrintableDocument: React$1.FC<PrintableDocumentProps>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Composant de prévisualisation d'impression
|
|
1376
|
+
* Affiche un modal avec le document et permet l'impression/export PDF
|
|
1377
|
+
*/
|
|
1378
|
+
declare const PrintPreview: React$1.FC<PrintPreviewProps>;
|
|
1379
|
+
/** Couleur verte standard pour les en-têtes */
|
|
1380
|
+
declare const PRINT_GREEN = "#2d7d46";
|
|
1381
|
+
interface DocumentHeaderProps {
|
|
1382
|
+
/** Nom de l'entreprise ou logo */
|
|
1383
|
+
companyName: string;
|
|
1384
|
+
/** Adresse (optionnel) */
|
|
1385
|
+
address?: string;
|
|
1386
|
+
/** Téléphone (optionnel) */
|
|
1387
|
+
phone?: string;
|
|
1388
|
+
/** Email (optionnel) */
|
|
1389
|
+
email?: string;
|
|
1390
|
+
/** Site web (optionnel) */
|
|
1391
|
+
website?: string;
|
|
1392
|
+
/** Titre du document (ex: DEVIS, BON DE COMMANDE) */
|
|
1393
|
+
documentTitle: string;
|
|
1394
|
+
/** Numéro du document */
|
|
1395
|
+
documentNumber: string;
|
|
1396
|
+
/** Date du document */
|
|
1397
|
+
date: string;
|
|
1398
|
+
/** Informations supplémentaires à afficher */
|
|
1399
|
+
extraInfo?: {
|
|
1400
|
+
label: string;
|
|
1401
|
+
value: string;
|
|
1402
|
+
}[];
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* En-tête de document standard
|
|
1406
|
+
*/
|
|
1407
|
+
declare const DocumentHeader: React$1.FC<DocumentHeaderProps>;
|
|
1408
|
+
interface InfoBoxProps {
|
|
1409
|
+
/** Titre de la box */
|
|
1410
|
+
title: string;
|
|
1411
|
+
/** Contenu de la box */
|
|
1412
|
+
children: ReactNode;
|
|
1413
|
+
/** Variante de couleur */
|
|
1414
|
+
variant?: 'green' | 'gray';
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Box d'information avec en-tête coloré
|
|
1418
|
+
*/
|
|
1419
|
+
declare const InfoBox: React$1.FC<InfoBoxProps>;
|
|
1420
|
+
interface DataTableColumn<T> {
|
|
1421
|
+
/** Clé de la propriété dans l'objet data */
|
|
1422
|
+
key: keyof T | string;
|
|
1423
|
+
/** Titre de la colonne */
|
|
1424
|
+
header: string;
|
|
1425
|
+
/** Largeur de la colonne (ex: '10%', '100px') */
|
|
1426
|
+
width?: string;
|
|
1427
|
+
/** Alignement du contenu */
|
|
1428
|
+
align?: 'left' | 'center' | 'right';
|
|
1429
|
+
/** Fonction de rendu personnalisé */
|
|
1430
|
+
render?: (value: any, item: T, index: number) => ReactNode;
|
|
1431
|
+
}
|
|
1432
|
+
interface DataTableProps<T> {
|
|
1433
|
+
/** Colonnes du tableau */
|
|
1434
|
+
columns: DataTableColumn<T>[];
|
|
1435
|
+
/** Données à afficher */
|
|
1436
|
+
data: T[];
|
|
1437
|
+
/** Nombre minimum de lignes vides à afficher */
|
|
1438
|
+
minEmptyRows?: number;
|
|
1439
|
+
/** Clé unique pour chaque ligne */
|
|
1440
|
+
keyExtractor: (item: T, index: number) => string | number;
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Tableau de données pour documents
|
|
1444
|
+
*/
|
|
1445
|
+
declare function DataTable<T>({ columns, data, minEmptyRows, keyExtractor }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1446
|
+
interface TotalsRowProps {
|
|
1447
|
+
/** Label de la ligne */
|
|
1448
|
+
label: string;
|
|
1449
|
+
/** Valeur à afficher */
|
|
1450
|
+
value: string | number;
|
|
1451
|
+
/** Est-ce la ligne de total final? */
|
|
1452
|
+
isTotal?: boolean;
|
|
1453
|
+
/** Couleur du texte pour la valeur */
|
|
1454
|
+
valueColor?: string;
|
|
1455
|
+
}
|
|
1456
|
+
interface TotalsSectionProps {
|
|
1457
|
+
/** Lignes de totaux */
|
|
1458
|
+
rows: TotalsRowProps[];
|
|
1459
|
+
/** Montant en lettres (optionnel) */
|
|
1460
|
+
amountInWords?: string;
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Section des totaux
|
|
1464
|
+
*/
|
|
1465
|
+
declare const TotalsSection: React$1.FC<TotalsSectionProps>;
|
|
1466
|
+
interface SignatureSectionProps {
|
|
1467
|
+
/** Date à afficher */
|
|
1468
|
+
date?: string;
|
|
1469
|
+
/** Label pour la signature de gauche */
|
|
1470
|
+
leftLabel?: string;
|
|
1471
|
+
/** Label pour la signature de droite */
|
|
1472
|
+
rightLabel?: string;
|
|
1473
|
+
/** Nom à afficher sous la signature de droite */
|
|
1474
|
+
rightName?: string;
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Section des signatures
|
|
1478
|
+
*/
|
|
1479
|
+
declare const SignatureSection: React$1.FC<SignatureSectionProps>;
|
|
1480
|
+
interface DocumentFooterProps {
|
|
1481
|
+
/** Lignes de texte à afficher */
|
|
1482
|
+
lines: string[];
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Pied de page du document
|
|
1486
|
+
*/
|
|
1487
|
+
declare const DocumentFooter: React$1.FC<DocumentFooterProps>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Convertit un nombre en lettres (français)
|
|
1490
|
+
*/
|
|
1491
|
+
declare const numberToWords: (num: number) => string;
|
|
1492
|
+
/**
|
|
1493
|
+
* Formate une date en français
|
|
1494
|
+
*/
|
|
1495
|
+
declare const formatDateFR: (date: Date | string, format?: "short" | "long") => string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Formate un montant en monnaie
|
|
1498
|
+
*/
|
|
1499
|
+
declare const formatCurrency: (amount: number, currency?: string, showDecimals?: boolean) => string;
|
|
1500
|
+
|
|
1501
|
+
export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, type BackendFile, type BackendFolder, CHOICES, type ConfirmOptions, CountrySelector, DataTable, DateInput, DocumentFooter, DocumentHeader, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, TotalsSection, type Unit, UnitServices, type UseFileManagerApiReturn, type User, UserServices, type ViewMode, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ interface ModalProps {
|
|
|
15
15
|
title: string;
|
|
16
16
|
description?: string;
|
|
17
17
|
width?: string;
|
|
18
|
+
minContentHeight?: string;
|
|
18
19
|
open: boolean;
|
|
19
20
|
onClose: () => void;
|
|
20
21
|
children: React$1.ReactNode;
|
|
@@ -88,6 +89,12 @@ declare const RewiseLayout: React$1.FC<PrivateLayoutProps>;
|
|
|
88
89
|
|
|
89
90
|
declare const ToastContainer: React$1.FC;
|
|
90
91
|
|
|
92
|
+
interface TrackableModel {
|
|
93
|
+
id?: number | null;
|
|
94
|
+
created_at?: string;
|
|
95
|
+
updated_at?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
interface Module$1 {
|
|
92
99
|
id: number;
|
|
93
100
|
code: string;
|
|
@@ -257,6 +264,7 @@ interface SessionContextType {
|
|
|
257
264
|
logout: () => void;
|
|
258
265
|
showAuthModal: boolean;
|
|
259
266
|
setShowAuthModal: (data: boolean) => void;
|
|
267
|
+
refreshSession: () => Promise<void>;
|
|
260
268
|
vendors: Vendor[];
|
|
261
269
|
setVendors: (vendors: Vendor[]) => void;
|
|
262
270
|
loadingVendors: boolean;
|
|
@@ -380,6 +388,7 @@ declare const AuthServices: {
|
|
|
380
388
|
addUser: (payload: User) => Promise<unknown>;
|
|
381
389
|
login: (payload: LoginPayload) => Promise<unknown>;
|
|
382
390
|
getUserInformations: (token: string) => Promise<unknown>;
|
|
391
|
+
getUserInformationsByOldId: (id: number) => Promise<unknown>;
|
|
383
392
|
logout: () => Promise<unknown>;
|
|
384
393
|
};
|
|
385
394
|
|
|
@@ -557,6 +566,46 @@ declare const ApprovalServices: {
|
|
|
557
566
|
}>;
|
|
558
567
|
};
|
|
559
568
|
|
|
569
|
+
type UnitOccupancyStatus = 'occupiable' | 'non_occupiable' | 'in_negociated' | 'indeterminate';
|
|
570
|
+
type UnitStatus = 'long rental' | 'short rental' | 'other' | 'draft' | 'active';
|
|
571
|
+
type UnitDestination = 'Nl' | 'L';
|
|
572
|
+
type UnitArchived = 'archived' | 'not_archived';
|
|
573
|
+
interface Unit extends TrackableModel {
|
|
574
|
+
name?: string | null;
|
|
575
|
+
code?: string | null;
|
|
576
|
+
location?: string | null;
|
|
577
|
+
object_name?: string | null;
|
|
578
|
+
unit_description?: string | null;
|
|
579
|
+
unit_comment?: string | null;
|
|
580
|
+
area_gla?: number | null;
|
|
581
|
+
area_gfa?: number | null;
|
|
582
|
+
area_gfa_mezz?: number | null;
|
|
583
|
+
area_m_2?: number | null;
|
|
584
|
+
area_m_2_mezz?: number | null;
|
|
585
|
+
height?: number | null;
|
|
586
|
+
width?: number | null;
|
|
587
|
+
length?: number | null;
|
|
588
|
+
unit_destination?: UnitDestination;
|
|
589
|
+
no_leasable_occupancy_status?: string;
|
|
590
|
+
area_category?: string | null;
|
|
591
|
+
detail_cat?: string | null;
|
|
592
|
+
zoning?: number | null;
|
|
593
|
+
drawing?: string | null;
|
|
594
|
+
archived?: UnitArchived;
|
|
595
|
+
unit_start_date?: string | null;
|
|
596
|
+
unit_end_date?: string | null;
|
|
597
|
+
occupancy_status?: UnitOccupancyStatus;
|
|
598
|
+
status?: UnitStatus;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
declare const UnitServices: {
|
|
602
|
+
create: (data: Partial<Unit>) => Promise<unknown>;
|
|
603
|
+
get: (id: number) => Promise<unknown>;
|
|
604
|
+
list: (params?: any) => Promise<unknown>;
|
|
605
|
+
update: (id: number, data: Partial<Unit>) => Promise<unknown>;
|
|
606
|
+
delete: (id: number) => Promise<unknown>;
|
|
607
|
+
};
|
|
608
|
+
|
|
560
609
|
type ImportField = {
|
|
561
610
|
value: string;
|
|
562
611
|
label: string;
|
|
@@ -679,6 +728,7 @@ declare const SelectVendor: React.FC<SelectProps$1>;
|
|
|
679
728
|
declare const SelectUser: React.FC<SelectProps$1>;
|
|
680
729
|
declare const SelectDepartment: React.FC<SelectProps$1>;
|
|
681
730
|
declare const SelectCostCenter: React.FC<SelectProps$1>;
|
|
731
|
+
declare const SelectUnit: React.FC<SelectProps$1>;
|
|
682
732
|
|
|
683
733
|
interface SelectProps {
|
|
684
734
|
value?: any;
|
|
@@ -1286,4 +1336,166 @@ declare const getFileIcon: (mimeType?: string, isFolder?: boolean, isOpen?: bool
|
|
|
1286
1336
|
declare const formatFileSize: (bytes?: number) => string;
|
|
1287
1337
|
declare const formatDate: (date?: Date | string) => string;
|
|
1288
1338
|
|
|
1289
|
-
|
|
1339
|
+
interface PrintPreviewProps {
|
|
1340
|
+
/** Contenu à imprimer */
|
|
1341
|
+
children: ReactNode;
|
|
1342
|
+
/** Contrôle l'affichage du modal */
|
|
1343
|
+
isOpen: boolean;
|
|
1344
|
+
/** Callback pour fermer le modal */
|
|
1345
|
+
onClose: () => void;
|
|
1346
|
+
/** Titre affiché dans l'en-tête du modal */
|
|
1347
|
+
title?: string;
|
|
1348
|
+
/** Nom du fichier pour le PDF (sans extension) */
|
|
1349
|
+
documentName?: string;
|
|
1350
|
+
/** Largeur du document (ex: '210mm' pour A4) */
|
|
1351
|
+
pageWidth?: string;
|
|
1352
|
+
/** Hauteur minimale du document */
|
|
1353
|
+
pageMinHeight?: string;
|
|
1354
|
+
/** Orientation de la page */
|
|
1355
|
+
orientation?: 'portrait' | 'landscape';
|
|
1356
|
+
/** Callback appelé après l'impression */
|
|
1357
|
+
onAfterPrint?: () => void;
|
|
1358
|
+
/** Callback appelé avant l'impression */
|
|
1359
|
+
onBeforePrint?: () => Promise<void>;
|
|
1360
|
+
}
|
|
1361
|
+
interface PrintableDocumentProps {
|
|
1362
|
+
/** Contenu du document */
|
|
1363
|
+
children: ReactNode;
|
|
1364
|
+
/** Classes CSS additionnelles */
|
|
1365
|
+
className?: string;
|
|
1366
|
+
/** Style inline additionnel */
|
|
1367
|
+
style?: React$1.CSSProperties;
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Wrapper pour le contenu imprimable
|
|
1371
|
+
* Applique les styles de base pour l'impression
|
|
1372
|
+
*/
|
|
1373
|
+
declare const PrintableDocument: React$1.FC<PrintableDocumentProps>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Composant de prévisualisation d'impression
|
|
1376
|
+
* Affiche un modal avec le document et permet l'impression/export PDF
|
|
1377
|
+
*/
|
|
1378
|
+
declare const PrintPreview: React$1.FC<PrintPreviewProps>;
|
|
1379
|
+
/** Couleur verte standard pour les en-têtes */
|
|
1380
|
+
declare const PRINT_GREEN = "#2d7d46";
|
|
1381
|
+
interface DocumentHeaderProps {
|
|
1382
|
+
/** Nom de l'entreprise ou logo */
|
|
1383
|
+
companyName: string;
|
|
1384
|
+
/** Adresse (optionnel) */
|
|
1385
|
+
address?: string;
|
|
1386
|
+
/** Téléphone (optionnel) */
|
|
1387
|
+
phone?: string;
|
|
1388
|
+
/** Email (optionnel) */
|
|
1389
|
+
email?: string;
|
|
1390
|
+
/** Site web (optionnel) */
|
|
1391
|
+
website?: string;
|
|
1392
|
+
/** Titre du document (ex: DEVIS, BON DE COMMANDE) */
|
|
1393
|
+
documentTitle: string;
|
|
1394
|
+
/** Numéro du document */
|
|
1395
|
+
documentNumber: string;
|
|
1396
|
+
/** Date du document */
|
|
1397
|
+
date: string;
|
|
1398
|
+
/** Informations supplémentaires à afficher */
|
|
1399
|
+
extraInfo?: {
|
|
1400
|
+
label: string;
|
|
1401
|
+
value: string;
|
|
1402
|
+
}[];
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* En-tête de document standard
|
|
1406
|
+
*/
|
|
1407
|
+
declare const DocumentHeader: React$1.FC<DocumentHeaderProps>;
|
|
1408
|
+
interface InfoBoxProps {
|
|
1409
|
+
/** Titre de la box */
|
|
1410
|
+
title: string;
|
|
1411
|
+
/** Contenu de la box */
|
|
1412
|
+
children: ReactNode;
|
|
1413
|
+
/** Variante de couleur */
|
|
1414
|
+
variant?: 'green' | 'gray';
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Box d'information avec en-tête coloré
|
|
1418
|
+
*/
|
|
1419
|
+
declare const InfoBox: React$1.FC<InfoBoxProps>;
|
|
1420
|
+
interface DataTableColumn<T> {
|
|
1421
|
+
/** Clé de la propriété dans l'objet data */
|
|
1422
|
+
key: keyof T | string;
|
|
1423
|
+
/** Titre de la colonne */
|
|
1424
|
+
header: string;
|
|
1425
|
+
/** Largeur de la colonne (ex: '10%', '100px') */
|
|
1426
|
+
width?: string;
|
|
1427
|
+
/** Alignement du contenu */
|
|
1428
|
+
align?: 'left' | 'center' | 'right';
|
|
1429
|
+
/** Fonction de rendu personnalisé */
|
|
1430
|
+
render?: (value: any, item: T, index: number) => ReactNode;
|
|
1431
|
+
}
|
|
1432
|
+
interface DataTableProps<T> {
|
|
1433
|
+
/** Colonnes du tableau */
|
|
1434
|
+
columns: DataTableColumn<T>[];
|
|
1435
|
+
/** Données à afficher */
|
|
1436
|
+
data: T[];
|
|
1437
|
+
/** Nombre minimum de lignes vides à afficher */
|
|
1438
|
+
minEmptyRows?: number;
|
|
1439
|
+
/** Clé unique pour chaque ligne */
|
|
1440
|
+
keyExtractor: (item: T, index: number) => string | number;
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Tableau de données pour documents
|
|
1444
|
+
*/
|
|
1445
|
+
declare function DataTable<T>({ columns, data, minEmptyRows, keyExtractor }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1446
|
+
interface TotalsRowProps {
|
|
1447
|
+
/** Label de la ligne */
|
|
1448
|
+
label: string;
|
|
1449
|
+
/** Valeur à afficher */
|
|
1450
|
+
value: string | number;
|
|
1451
|
+
/** Est-ce la ligne de total final? */
|
|
1452
|
+
isTotal?: boolean;
|
|
1453
|
+
/** Couleur du texte pour la valeur */
|
|
1454
|
+
valueColor?: string;
|
|
1455
|
+
}
|
|
1456
|
+
interface TotalsSectionProps {
|
|
1457
|
+
/** Lignes de totaux */
|
|
1458
|
+
rows: TotalsRowProps[];
|
|
1459
|
+
/** Montant en lettres (optionnel) */
|
|
1460
|
+
amountInWords?: string;
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Section des totaux
|
|
1464
|
+
*/
|
|
1465
|
+
declare const TotalsSection: React$1.FC<TotalsSectionProps>;
|
|
1466
|
+
interface SignatureSectionProps {
|
|
1467
|
+
/** Date à afficher */
|
|
1468
|
+
date?: string;
|
|
1469
|
+
/** Label pour la signature de gauche */
|
|
1470
|
+
leftLabel?: string;
|
|
1471
|
+
/** Label pour la signature de droite */
|
|
1472
|
+
rightLabel?: string;
|
|
1473
|
+
/** Nom à afficher sous la signature de droite */
|
|
1474
|
+
rightName?: string;
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Section des signatures
|
|
1478
|
+
*/
|
|
1479
|
+
declare const SignatureSection: React$1.FC<SignatureSectionProps>;
|
|
1480
|
+
interface DocumentFooterProps {
|
|
1481
|
+
/** Lignes de texte à afficher */
|
|
1482
|
+
lines: string[];
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Pied de page du document
|
|
1486
|
+
*/
|
|
1487
|
+
declare const DocumentFooter: React$1.FC<DocumentFooterProps>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Convertit un nombre en lettres (français)
|
|
1490
|
+
*/
|
|
1491
|
+
declare const numberToWords: (num: number) => string;
|
|
1492
|
+
/**
|
|
1493
|
+
* Formate une date en français
|
|
1494
|
+
*/
|
|
1495
|
+
declare const formatDateFR: (date: Date | string, format?: "short" | "long") => string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Formate un montant en monnaie
|
|
1498
|
+
*/
|
|
1499
|
+
declare const formatCurrency: (amount: number, currency?: string, showDecimals?: boolean) => string;
|
|
1500
|
+
|
|
1501
|
+
export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, type BackendFile, type BackendFolder, CHOICES, type ConfirmOptions, CountrySelector, DataTable, DateInput, DocumentFooter, DocumentHeader, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, TotalsSection, type Unit, UnitServices, type UseFileManagerApiReturn, type User, UserServices, type ViewMode, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
|