ptechcore_ui 1.0.36 → 1.0.38
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 +1634 -83
- package/dist/index.d.cts +127 -1
- package/dist/index.d.ts +127 -1
- package/dist/index.js +1680 -83
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -880,6 +880,9 @@ interface SearchableSelectOption {
|
|
|
880
880
|
interface SelectProps$1 {
|
|
881
881
|
value?: any;
|
|
882
882
|
onSelect: (option: SearchableSelectOption) => void;
|
|
883
|
+
allowClear?: boolean;
|
|
884
|
+
onRemove?: () => void;
|
|
885
|
+
label?: string;
|
|
883
886
|
}
|
|
884
887
|
declare const SelectVendor: React.FC<SelectProps$1>;
|
|
885
888
|
declare const SelectUser: React.FC<SelectProps$1>;
|
|
@@ -1663,4 +1666,127 @@ declare const formatDateFR: (date: Date | string, format?: "short" | "long") =>
|
|
|
1663
1666
|
*/
|
|
1664
1667
|
declare const formatCurrency: (amount: number, currency?: string, showDecimals?: boolean) => string;
|
|
1665
1668
|
|
|
1666
|
-
|
|
1669
|
+
interface ModernCardProps {
|
|
1670
|
+
children: React$1.ReactNode;
|
|
1671
|
+
className?: string;
|
|
1672
|
+
hoverable?: boolean;
|
|
1673
|
+
bordered?: boolean;
|
|
1674
|
+
elevated?: boolean;
|
|
1675
|
+
gradient?: boolean;
|
|
1676
|
+
onClick?: () => void;
|
|
1677
|
+
}
|
|
1678
|
+
declare const ModernCard: React$1.FC<ModernCardProps>;
|
|
1679
|
+
interface CardHeaderProps {
|
|
1680
|
+
title: string;
|
|
1681
|
+
subtitle?: string;
|
|
1682
|
+
icon?: LucideIcon;
|
|
1683
|
+
action?: React$1.ReactNode;
|
|
1684
|
+
className?: string;
|
|
1685
|
+
children?: React$1.ReactNode;
|
|
1686
|
+
}
|
|
1687
|
+
declare const CardHeader: React$1.FC<CardHeaderProps>;
|
|
1688
|
+
interface CardBodyProps {
|
|
1689
|
+
children: React$1.ReactNode;
|
|
1690
|
+
className?: string;
|
|
1691
|
+
noPadding?: boolean;
|
|
1692
|
+
}
|
|
1693
|
+
declare const CardBody: React$1.FC<CardBodyProps>;
|
|
1694
|
+
interface StatCardProps {
|
|
1695
|
+
title: string;
|
|
1696
|
+
value: string | number;
|
|
1697
|
+
change?: {
|
|
1698
|
+
value: number;
|
|
1699
|
+
type: 'increase' | 'decrease';
|
|
1700
|
+
};
|
|
1701
|
+
icon?: LucideIcon;
|
|
1702
|
+
color?: 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
1703
|
+
className?: string;
|
|
1704
|
+
}
|
|
1705
|
+
declare const StatCard: React$1.FC<StatCardProps>;
|
|
1706
|
+
|
|
1707
|
+
interface ProcurementWorkspaceStats {
|
|
1708
|
+
purchase_requests: {
|
|
1709
|
+
total: number;
|
|
1710
|
+
draft: number;
|
|
1711
|
+
pending_approval: number;
|
|
1712
|
+
approved: number;
|
|
1713
|
+
in_sourcing: number;
|
|
1714
|
+
completed: number;
|
|
1715
|
+
rejected: number;
|
|
1716
|
+
trend: number;
|
|
1717
|
+
};
|
|
1718
|
+
rfqs: {
|
|
1719
|
+
total: number;
|
|
1720
|
+
draft: number;
|
|
1721
|
+
open: number;
|
|
1722
|
+
pending_evaluation: number;
|
|
1723
|
+
closed: number;
|
|
1724
|
+
};
|
|
1725
|
+
purchase_orders: {
|
|
1726
|
+
total: number;
|
|
1727
|
+
pending_delivery: number;
|
|
1728
|
+
delivered: number;
|
|
1729
|
+
total_value: number;
|
|
1730
|
+
trend: number;
|
|
1731
|
+
};
|
|
1732
|
+
receipts: {
|
|
1733
|
+
total: number;
|
|
1734
|
+
pending_validation: number;
|
|
1735
|
+
validated: number;
|
|
1736
|
+
};
|
|
1737
|
+
vendors: {
|
|
1738
|
+
total: number;
|
|
1739
|
+
active: number;
|
|
1740
|
+
};
|
|
1741
|
+
alerts: {
|
|
1742
|
+
overdue_deliveries: number;
|
|
1743
|
+
expiring_contracts: number;
|
|
1744
|
+
pending_approvals: number;
|
|
1745
|
+
};
|
|
1746
|
+
recent_activities: RecentActivity[];
|
|
1747
|
+
pending_tasks: PendingTask[];
|
|
1748
|
+
}
|
|
1749
|
+
interface RecentActivity {
|
|
1750
|
+
id: string;
|
|
1751
|
+
type: 'pr_created' | 'rfq_sent' | 'quote_received' | 'po_issued' | 'receipt_created' | 'approval_pending';
|
|
1752
|
+
title: string;
|
|
1753
|
+
description: string;
|
|
1754
|
+
timestamp: string | null;
|
|
1755
|
+
status: 'info' | 'success' | 'warning' | 'error';
|
|
1756
|
+
}
|
|
1757
|
+
interface PendingTask {
|
|
1758
|
+
id: string;
|
|
1759
|
+
type: 'approval' | 'evaluation' | 'receipt' | 'follow_up';
|
|
1760
|
+
title: string;
|
|
1761
|
+
priority: 'low' | 'medium' | 'high' | 'critical';
|
|
1762
|
+
dueDate: string;
|
|
1763
|
+
link: string;
|
|
1764
|
+
}
|
|
1765
|
+
declare const WorkspaceServices: {
|
|
1766
|
+
/**
|
|
1767
|
+
* Récupère les données du workspace Procurement (Achats)
|
|
1768
|
+
*/
|
|
1769
|
+
getProcurementWorkspace: (businessEntityId?: string) => Promise<ProcurementWorkspaceStats>;
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
type ModuleType = 'purchase' | 'accounting' | 'crm' | 'facility';
|
|
1773
|
+
interface ModuleConfig {
|
|
1774
|
+
id: ModuleType;
|
|
1775
|
+
label: string;
|
|
1776
|
+
description: string;
|
|
1777
|
+
icon: React$1.ElementType;
|
|
1778
|
+
color: string;
|
|
1779
|
+
bgColor: string;
|
|
1780
|
+
component: React$1.FC;
|
|
1781
|
+
}
|
|
1782
|
+
declare const WorkSpace: React$1.FC;
|
|
1783
|
+
|
|
1784
|
+
declare const PurchaseWorkspace: React$1.FC;
|
|
1785
|
+
|
|
1786
|
+
declare const AccountingWorkspace: React$1.FC;
|
|
1787
|
+
|
|
1788
|
+
declare const CrmWorkspace: React$1.FC;
|
|
1789
|
+
|
|
1790
|
+
declare const FacilityWorkspace: React$1.FC;
|
|
1791
|
+
|
|
1792
|
+
export { ACCOUNT_TYPE_LABELS, type Account, type AccountListResponse, AccountServices, type AccountType, AccountingWorkspace, Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, BALANCE_TYPE_LABELS, type BackendFile, type BackendFolder, type BalanceType, CHOICES, CardBody, CardHeader, type Client, type ClientListResponse, ClientServices, type ConfirmOptions, CountrySelector, CrmWorkspace, DataTable, DateInput, DocumentFooter, DocumentHeader, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FROM_MODULE_CHOICES, FacilityWorkspace, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, FormClient, FormVendor, type FromModule, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, MinimalVendorForm, Modal, ModernCard, type ModuleConfig, type ModuleType, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, type PendingTask, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, type ProcurementWorkspaceStats, PurchaseWorkspace, type RecentActivity, RewiseLayout, SYSCOHADA_CLASSES, SecondaryButton, SelectAccount, SelectClient, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, StatCard, TEMPLATE_FNE_CHOICES, TaxSelector, type TemplateFNE, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, TotalsSection, type Unit, UnitServices, type UseFileManagerApiReturn, type User, UserServices, type Vendor, type VendorListResponse, VendorServices, type ViewMode, WorkSpace, WorkspaceServices, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -880,6 +880,9 @@ interface SearchableSelectOption {
|
|
|
880
880
|
interface SelectProps$1 {
|
|
881
881
|
value?: any;
|
|
882
882
|
onSelect: (option: SearchableSelectOption) => void;
|
|
883
|
+
allowClear?: boolean;
|
|
884
|
+
onRemove?: () => void;
|
|
885
|
+
label?: string;
|
|
883
886
|
}
|
|
884
887
|
declare const SelectVendor: React.FC<SelectProps$1>;
|
|
885
888
|
declare const SelectUser: React.FC<SelectProps$1>;
|
|
@@ -1663,4 +1666,127 @@ declare const formatDateFR: (date: Date | string, format?: "short" | "long") =>
|
|
|
1663
1666
|
*/
|
|
1664
1667
|
declare const formatCurrency: (amount: number, currency?: string, showDecimals?: boolean) => string;
|
|
1665
1668
|
|
|
1666
|
-
|
|
1669
|
+
interface ModernCardProps {
|
|
1670
|
+
children: React$1.ReactNode;
|
|
1671
|
+
className?: string;
|
|
1672
|
+
hoverable?: boolean;
|
|
1673
|
+
bordered?: boolean;
|
|
1674
|
+
elevated?: boolean;
|
|
1675
|
+
gradient?: boolean;
|
|
1676
|
+
onClick?: () => void;
|
|
1677
|
+
}
|
|
1678
|
+
declare const ModernCard: React$1.FC<ModernCardProps>;
|
|
1679
|
+
interface CardHeaderProps {
|
|
1680
|
+
title: string;
|
|
1681
|
+
subtitle?: string;
|
|
1682
|
+
icon?: LucideIcon;
|
|
1683
|
+
action?: React$1.ReactNode;
|
|
1684
|
+
className?: string;
|
|
1685
|
+
children?: React$1.ReactNode;
|
|
1686
|
+
}
|
|
1687
|
+
declare const CardHeader: React$1.FC<CardHeaderProps>;
|
|
1688
|
+
interface CardBodyProps {
|
|
1689
|
+
children: React$1.ReactNode;
|
|
1690
|
+
className?: string;
|
|
1691
|
+
noPadding?: boolean;
|
|
1692
|
+
}
|
|
1693
|
+
declare const CardBody: React$1.FC<CardBodyProps>;
|
|
1694
|
+
interface StatCardProps {
|
|
1695
|
+
title: string;
|
|
1696
|
+
value: string | number;
|
|
1697
|
+
change?: {
|
|
1698
|
+
value: number;
|
|
1699
|
+
type: 'increase' | 'decrease';
|
|
1700
|
+
};
|
|
1701
|
+
icon?: LucideIcon;
|
|
1702
|
+
color?: 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
1703
|
+
className?: string;
|
|
1704
|
+
}
|
|
1705
|
+
declare const StatCard: React$1.FC<StatCardProps>;
|
|
1706
|
+
|
|
1707
|
+
interface ProcurementWorkspaceStats {
|
|
1708
|
+
purchase_requests: {
|
|
1709
|
+
total: number;
|
|
1710
|
+
draft: number;
|
|
1711
|
+
pending_approval: number;
|
|
1712
|
+
approved: number;
|
|
1713
|
+
in_sourcing: number;
|
|
1714
|
+
completed: number;
|
|
1715
|
+
rejected: number;
|
|
1716
|
+
trend: number;
|
|
1717
|
+
};
|
|
1718
|
+
rfqs: {
|
|
1719
|
+
total: number;
|
|
1720
|
+
draft: number;
|
|
1721
|
+
open: number;
|
|
1722
|
+
pending_evaluation: number;
|
|
1723
|
+
closed: number;
|
|
1724
|
+
};
|
|
1725
|
+
purchase_orders: {
|
|
1726
|
+
total: number;
|
|
1727
|
+
pending_delivery: number;
|
|
1728
|
+
delivered: number;
|
|
1729
|
+
total_value: number;
|
|
1730
|
+
trend: number;
|
|
1731
|
+
};
|
|
1732
|
+
receipts: {
|
|
1733
|
+
total: number;
|
|
1734
|
+
pending_validation: number;
|
|
1735
|
+
validated: number;
|
|
1736
|
+
};
|
|
1737
|
+
vendors: {
|
|
1738
|
+
total: number;
|
|
1739
|
+
active: number;
|
|
1740
|
+
};
|
|
1741
|
+
alerts: {
|
|
1742
|
+
overdue_deliveries: number;
|
|
1743
|
+
expiring_contracts: number;
|
|
1744
|
+
pending_approvals: number;
|
|
1745
|
+
};
|
|
1746
|
+
recent_activities: RecentActivity[];
|
|
1747
|
+
pending_tasks: PendingTask[];
|
|
1748
|
+
}
|
|
1749
|
+
interface RecentActivity {
|
|
1750
|
+
id: string;
|
|
1751
|
+
type: 'pr_created' | 'rfq_sent' | 'quote_received' | 'po_issued' | 'receipt_created' | 'approval_pending';
|
|
1752
|
+
title: string;
|
|
1753
|
+
description: string;
|
|
1754
|
+
timestamp: string | null;
|
|
1755
|
+
status: 'info' | 'success' | 'warning' | 'error';
|
|
1756
|
+
}
|
|
1757
|
+
interface PendingTask {
|
|
1758
|
+
id: string;
|
|
1759
|
+
type: 'approval' | 'evaluation' | 'receipt' | 'follow_up';
|
|
1760
|
+
title: string;
|
|
1761
|
+
priority: 'low' | 'medium' | 'high' | 'critical';
|
|
1762
|
+
dueDate: string;
|
|
1763
|
+
link: string;
|
|
1764
|
+
}
|
|
1765
|
+
declare const WorkspaceServices: {
|
|
1766
|
+
/**
|
|
1767
|
+
* Récupère les données du workspace Procurement (Achats)
|
|
1768
|
+
*/
|
|
1769
|
+
getProcurementWorkspace: (businessEntityId?: string) => Promise<ProcurementWorkspaceStats>;
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
type ModuleType = 'purchase' | 'accounting' | 'crm' | 'facility';
|
|
1773
|
+
interface ModuleConfig {
|
|
1774
|
+
id: ModuleType;
|
|
1775
|
+
label: string;
|
|
1776
|
+
description: string;
|
|
1777
|
+
icon: React$1.ElementType;
|
|
1778
|
+
color: string;
|
|
1779
|
+
bgColor: string;
|
|
1780
|
+
component: React$1.FC;
|
|
1781
|
+
}
|
|
1782
|
+
declare const WorkSpace: React$1.FC;
|
|
1783
|
+
|
|
1784
|
+
declare const PurchaseWorkspace: React$1.FC;
|
|
1785
|
+
|
|
1786
|
+
declare const AccountingWorkspace: React$1.FC;
|
|
1787
|
+
|
|
1788
|
+
declare const CrmWorkspace: React$1.FC;
|
|
1789
|
+
|
|
1790
|
+
declare const FacilityWorkspace: React$1.FC;
|
|
1791
|
+
|
|
1792
|
+
export { ACCOUNT_TYPE_LABELS, type Account, type AccountListResponse, AccountServices, type AccountType, AccountingWorkspace, Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, BALANCE_TYPE_LABELS, type BackendFile, type BackendFolder, type BalanceType, CHOICES, CardBody, CardHeader, type Client, type ClientListResponse, ClientServices, type ConfirmOptions, CountrySelector, CrmWorkspace, DataTable, DateInput, DocumentFooter, DocumentHeader, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FROM_MODULE_CHOICES, FacilityWorkspace, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, FormClient, FormVendor, type FromModule, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, MinimalVendorForm, Modal, ModernCard, type ModuleConfig, type ModuleType, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, type PendingTask, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, type ProcurementWorkspaceStats, PurchaseWorkspace, type RecentActivity, RewiseLayout, SYSCOHADA_CLASSES, SecondaryButton, SelectAccount, SelectClient, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, StatCard, TEMPLATE_FNE_CHOICES, TaxSelector, type TemplateFNE, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, TotalsSection, type Unit, UnitServices, type UseFileManagerApiReturn, type User, UserServices, type Vendor, type VendorListResponse, VendorServices, type ViewMode, WorkSpace, WorkspaceServices, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
|