ptechcore_ui 1.0.29 → 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.d.cts CHANGED
@@ -388,6 +388,7 @@ declare const AuthServices: {
388
388
  addUser: (payload: User) => Promise<unknown>;
389
389
  login: (payload: LoginPayload) => Promise<unknown>;
390
390
  getUserInformations: (token: string) => Promise<unknown>;
391
+ getUserInformationsByOldId: (id: number) => Promise<unknown>;
391
392
  logout: () => Promise<unknown>;
392
393
  };
393
394
 
@@ -1335,4 +1336,166 @@ declare const getFileIcon: (mimeType?: string, isFolder?: boolean, isOpen?: bool
1335
1336
  declare const formatFileSize: (bytes?: number) => string;
1336
1337
  declare const formatDate: (date?: Date | string) => string;
1337
1338
 
1338
- export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, type BackendFile, type BackendFolder, CHOICES, type ConfirmOptions, CountrySelector, DateInput, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, Pages, PaymentMethodSelector, PrimaryButton, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, type Unit, UnitServices, type UseFileManagerApiReturn, type User, UserServices, type ViewMode, fileManagerApi, formatDate, formatFileSize, getFileIcon, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
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
@@ -388,6 +388,7 @@ declare const AuthServices: {
388
388
  addUser: (payload: User) => Promise<unknown>;
389
389
  login: (payload: LoginPayload) => Promise<unknown>;
390
390
  getUserInformations: (token: string) => Promise<unknown>;
391
+ getUserInformationsByOldId: (id: number) => Promise<unknown>;
391
392
  logout: () => Promise<unknown>;
392
393
  };
393
394
 
@@ -1335,4 +1336,166 @@ declare const getFileIcon: (mimeType?: string, isFolder?: boolean, isOpen?: bool
1335
1336
  declare const formatFileSize: (bytes?: number) => string;
1336
1337
  declare const formatDate: (date?: Date | string) => string;
1337
1338
 
1338
- export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, type BackendFile, type BackendFolder, CHOICES, type ConfirmOptions, CountrySelector, DateInput, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, Pages, PaymentMethodSelector, PrimaryButton, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, type Unit, UnitServices, type UseFileManagerApiReturn, type User, UserServices, type ViewMode, fileManagerApi, formatDate, formatFileSize, getFileIcon, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
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 };