ptechcore_ui 1.0.36 → 1.0.39

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
@@ -876,10 +876,27 @@ interface SearchableSelectOption {
876
876
  content?: React$1.ReactNode;
877
877
  image?: string;
878
878
  }
879
+ interface SearchableSelectProps {
880
+ options: SearchableSelectOption[];
881
+ value?: string | number;
882
+ placeholder?: string;
883
+ searchPlaceholder?: string;
884
+ onSelect: (option: SearchableSelectOption) => void;
885
+ onRemove?: () => void;
886
+ disabled?: boolean;
887
+ allowClear?: boolean;
888
+ filterFunction?: (option: SearchableSelectOption, searchTerm: string) => boolean;
889
+ addElement?: () => void;
890
+ refresh?: () => void;
891
+ }
892
+ declare const SearchableSelect: React$1.FC<SearchableSelectProps>;
879
893
 
880
894
  interface SelectProps$1 {
881
895
  value?: any;
882
896
  onSelect: (option: SearchableSelectOption) => void;
897
+ allowClear?: boolean;
898
+ onRemove?: () => void;
899
+ label?: string;
883
900
  }
884
901
  declare const SelectVendor: React.FC<SelectProps$1>;
885
902
  declare const SelectUser: React.FC<SelectProps$1>;
@@ -1663,4 +1680,148 @@ declare const formatDateFR: (date: Date | string, format?: "short" | "long") =>
1663
1680
  */
1664
1681
  declare const formatCurrency: (amount: number, currency?: string, showDecimals?: boolean) => string;
1665
1682
 
1666
- export { ACCOUNT_TYPE_LABELS, type Account, type AccountListResponse, AccountServices, type AccountType, Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, BALANCE_TYPE_LABELS, type BackendFile, type BackendFolder, type BalanceType, CHOICES, type Client, type ClientListResponse, ClientServices, type ConfirmOptions, CountrySelector, DataTable, DateInput, DocumentFooter, DocumentHeader, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FROM_MODULE_CHOICES, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, FormClient, FormVendor, type FromModule, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, MinimalVendorForm, Modal, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, RewiseLayout, SYSCOHADA_CLASSES, SecondaryButton, SelectAccount, SelectClient, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, 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, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
1683
+ interface ModernCardProps {
1684
+ children: React$1.ReactNode;
1685
+ className?: string;
1686
+ hoverable?: boolean;
1687
+ bordered?: boolean;
1688
+ elevated?: boolean;
1689
+ gradient?: boolean;
1690
+ onClick?: () => void;
1691
+ }
1692
+ declare const ModernCard: React$1.FC<ModernCardProps>;
1693
+ interface CardHeaderProps {
1694
+ title: string;
1695
+ subtitle?: string;
1696
+ icon?: LucideIcon;
1697
+ action?: React$1.ReactNode;
1698
+ className?: string;
1699
+ children?: React$1.ReactNode;
1700
+ }
1701
+ declare const CardHeader: React$1.FC<CardHeaderProps>;
1702
+ interface CardBodyProps {
1703
+ children: React$1.ReactNode;
1704
+ className?: string;
1705
+ noPadding?: boolean;
1706
+ }
1707
+ declare const CardBody: React$1.FC<CardBodyProps>;
1708
+ interface StatCardProps {
1709
+ title: string;
1710
+ value: string | number;
1711
+ change?: {
1712
+ value: number;
1713
+ type: 'increase' | 'decrease';
1714
+ };
1715
+ icon?: LucideIcon;
1716
+ color?: 'primary' | 'success' | 'warning' | 'error' | 'info';
1717
+ className?: string;
1718
+ }
1719
+ declare const StatCard: React$1.FC<StatCardProps>;
1720
+
1721
+ interface ProcurementWorkspaceStats {
1722
+ purchase_requests: {
1723
+ total: number;
1724
+ draft: number;
1725
+ pending_approval: number;
1726
+ approved: number;
1727
+ in_sourcing: number;
1728
+ completed: number;
1729
+ rejected: number;
1730
+ trend: number;
1731
+ };
1732
+ rfqs: {
1733
+ total: number;
1734
+ draft: number;
1735
+ open: number;
1736
+ pending_evaluation: number;
1737
+ closed: number;
1738
+ };
1739
+ purchase_orders: {
1740
+ total: number;
1741
+ pending_delivery: number;
1742
+ delivered: number;
1743
+ total_value: number;
1744
+ trend: number;
1745
+ };
1746
+ receipts: {
1747
+ total: number;
1748
+ pending_validation: number;
1749
+ validated: number;
1750
+ };
1751
+ vendors: {
1752
+ total: number;
1753
+ active: number;
1754
+ };
1755
+ alerts: {
1756
+ overdue_deliveries: number;
1757
+ expiring_contracts: number;
1758
+ pending_approvals: number;
1759
+ };
1760
+ recent_activities: RecentActivity[];
1761
+ pending_tasks: PendingTask[];
1762
+ }
1763
+ interface RecentActivity {
1764
+ id: string;
1765
+ type: 'pr_created' | 'rfq_sent' | 'quote_received' | 'po_issued' | 'receipt_created' | 'approval_pending';
1766
+ title: string;
1767
+ description: string;
1768
+ timestamp: string | null;
1769
+ status: 'info' | 'success' | 'warning' | 'error';
1770
+ }
1771
+ interface PendingTask {
1772
+ id: string;
1773
+ type: 'approval' | 'evaluation' | 'receipt' | 'follow_up';
1774
+ title: string;
1775
+ priority: 'low' | 'medium' | 'high' | 'critical';
1776
+ dueDate: string;
1777
+ link: string;
1778
+ }
1779
+ declare const WorkspaceServices: {
1780
+ /**
1781
+ * Récupère les données du workspace Procurement (Achats)
1782
+ */
1783
+ getProcurementWorkspace: (businessEntityId?: string) => Promise<ProcurementWorkspaceStats>;
1784
+ };
1785
+
1786
+ type ModuleType = 'purchase' | 'accounting' | 'crm' | 'facility';
1787
+ interface ModuleConfig {
1788
+ id: ModuleType;
1789
+ label: string;
1790
+ description: string;
1791
+ icon: React$1.ElementType;
1792
+ color: string;
1793
+ bgColor: string;
1794
+ component: React$1.FC;
1795
+ }
1796
+ declare const WorkSpace: React$1.FC;
1797
+
1798
+ declare const PurchaseWorkspace: React$1.FC;
1799
+
1800
+ declare const AccountingWorkspace: React$1.FC;
1801
+
1802
+ declare const CrmWorkspace: React$1.FC;
1803
+
1804
+ declare const FacilityWorkspace: React$1.FC;
1805
+
1806
+ declare const HRConnectPage: React$1.FC;
1807
+
1808
+ declare const MeetingHubPage: React$1.FC;
1809
+
1810
+ declare const BudgetPage: React$1.FC;
1811
+
1812
+ declare const ChatEquipePage: React$1.FC;
1813
+
1814
+ declare const ActifsPage: React$1.FC;
1815
+
1816
+ declare const PlanningPage: React$1.FC;
1817
+
1818
+ declare const TaskPilot: React$1.FC;
1819
+
1820
+ declare const PurchaseRequestsPage: () => react_jsx_runtime.JSX.Element;
1821
+
1822
+ declare const WorkSpaceRoutes: React.FC<{
1823
+ module_name: string;
1824
+ module_description: string;
1825
+ }>;
1826
+
1827
+ export { ACCOUNT_TYPE_LABELS, type Account, type AccountListResponse, AccountServices, type AccountType, AccountingWorkspace, ActifsPage, Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, BALANCE_TYPE_LABELS, type BackendFile, type BackendFolder, type BalanceType, BudgetPage, CHOICES, CardBody, CardHeader, ChatEquipePage, 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, HRConnectPage, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, MeetingHubPage, type MenuItem, MinimalVendorForm, Modal, ModernCard, type ModuleConfig, type ModuleType, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, type PendingTask, PlanningPage, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, type ProcurementWorkspaceStats, PurchaseRequestsPage, PurchaseWorkspace, type RecentActivity, RewiseLayout, SYSCOHADA_CLASSES, SearchableSelect, type SearchableSelectOption, SecondaryButton, SelectAccount, SelectClient, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, StatCard, TEMPLATE_FNE_CHOICES, TaskPilot, 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, WorkSpaceRoutes, WorkspaceServices, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
package/dist/index.d.ts CHANGED
@@ -876,10 +876,27 @@ interface SearchableSelectOption {
876
876
  content?: React$1.ReactNode;
877
877
  image?: string;
878
878
  }
879
+ interface SearchableSelectProps {
880
+ options: SearchableSelectOption[];
881
+ value?: string | number;
882
+ placeholder?: string;
883
+ searchPlaceholder?: string;
884
+ onSelect: (option: SearchableSelectOption) => void;
885
+ onRemove?: () => void;
886
+ disabled?: boolean;
887
+ allowClear?: boolean;
888
+ filterFunction?: (option: SearchableSelectOption, searchTerm: string) => boolean;
889
+ addElement?: () => void;
890
+ refresh?: () => void;
891
+ }
892
+ declare const SearchableSelect: React$1.FC<SearchableSelectProps>;
879
893
 
880
894
  interface SelectProps$1 {
881
895
  value?: any;
882
896
  onSelect: (option: SearchableSelectOption) => void;
897
+ allowClear?: boolean;
898
+ onRemove?: () => void;
899
+ label?: string;
883
900
  }
884
901
  declare const SelectVendor: React.FC<SelectProps$1>;
885
902
  declare const SelectUser: React.FC<SelectProps$1>;
@@ -1663,4 +1680,148 @@ declare const formatDateFR: (date: Date | string, format?: "short" | "long") =>
1663
1680
  */
1664
1681
  declare const formatCurrency: (amount: number, currency?: string, showDecimals?: boolean) => string;
1665
1682
 
1666
- export { ACCOUNT_TYPE_LABELS, type Account, type AccountListResponse, AccountServices, type AccountType, Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, BALANCE_TYPE_LABELS, type BackendFile, type BackendFolder, type BalanceType, CHOICES, type Client, type ClientListResponse, ClientServices, type ConfirmOptions, CountrySelector, DataTable, DateInput, DocumentFooter, DocumentHeader, EntityFileManager, type EntityFileManagerProps, type EntityType, FDrawer, FROM_MODULE_CHOICES, FetchApi, FileInput, type FileItem, FileManager, type FileManagerProps, FileManagerProvider, type FileManagerTexts, ForeignCurrencySelector, FormClient, FormVendor, type FromModule, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, MinimalVendorForm, Modal, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, RewiseLayout, SYSCOHADA_CLASSES, SecondaryButton, SelectAccount, SelectClient, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, 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, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };
1683
+ interface ModernCardProps {
1684
+ children: React$1.ReactNode;
1685
+ className?: string;
1686
+ hoverable?: boolean;
1687
+ bordered?: boolean;
1688
+ elevated?: boolean;
1689
+ gradient?: boolean;
1690
+ onClick?: () => void;
1691
+ }
1692
+ declare const ModernCard: React$1.FC<ModernCardProps>;
1693
+ interface CardHeaderProps {
1694
+ title: string;
1695
+ subtitle?: string;
1696
+ icon?: LucideIcon;
1697
+ action?: React$1.ReactNode;
1698
+ className?: string;
1699
+ children?: React$1.ReactNode;
1700
+ }
1701
+ declare const CardHeader: React$1.FC<CardHeaderProps>;
1702
+ interface CardBodyProps {
1703
+ children: React$1.ReactNode;
1704
+ className?: string;
1705
+ noPadding?: boolean;
1706
+ }
1707
+ declare const CardBody: React$1.FC<CardBodyProps>;
1708
+ interface StatCardProps {
1709
+ title: string;
1710
+ value: string | number;
1711
+ change?: {
1712
+ value: number;
1713
+ type: 'increase' | 'decrease';
1714
+ };
1715
+ icon?: LucideIcon;
1716
+ color?: 'primary' | 'success' | 'warning' | 'error' | 'info';
1717
+ className?: string;
1718
+ }
1719
+ declare const StatCard: React$1.FC<StatCardProps>;
1720
+
1721
+ interface ProcurementWorkspaceStats {
1722
+ purchase_requests: {
1723
+ total: number;
1724
+ draft: number;
1725
+ pending_approval: number;
1726
+ approved: number;
1727
+ in_sourcing: number;
1728
+ completed: number;
1729
+ rejected: number;
1730
+ trend: number;
1731
+ };
1732
+ rfqs: {
1733
+ total: number;
1734
+ draft: number;
1735
+ open: number;
1736
+ pending_evaluation: number;
1737
+ closed: number;
1738
+ };
1739
+ purchase_orders: {
1740
+ total: number;
1741
+ pending_delivery: number;
1742
+ delivered: number;
1743
+ total_value: number;
1744
+ trend: number;
1745
+ };
1746
+ receipts: {
1747
+ total: number;
1748
+ pending_validation: number;
1749
+ validated: number;
1750
+ };
1751
+ vendors: {
1752
+ total: number;
1753
+ active: number;
1754
+ };
1755
+ alerts: {
1756
+ overdue_deliveries: number;
1757
+ expiring_contracts: number;
1758
+ pending_approvals: number;
1759
+ };
1760
+ recent_activities: RecentActivity[];
1761
+ pending_tasks: PendingTask[];
1762
+ }
1763
+ interface RecentActivity {
1764
+ id: string;
1765
+ type: 'pr_created' | 'rfq_sent' | 'quote_received' | 'po_issued' | 'receipt_created' | 'approval_pending';
1766
+ title: string;
1767
+ description: string;
1768
+ timestamp: string | null;
1769
+ status: 'info' | 'success' | 'warning' | 'error';
1770
+ }
1771
+ interface PendingTask {
1772
+ id: string;
1773
+ type: 'approval' | 'evaluation' | 'receipt' | 'follow_up';
1774
+ title: string;
1775
+ priority: 'low' | 'medium' | 'high' | 'critical';
1776
+ dueDate: string;
1777
+ link: string;
1778
+ }
1779
+ declare const WorkspaceServices: {
1780
+ /**
1781
+ * Récupère les données du workspace Procurement (Achats)
1782
+ */
1783
+ getProcurementWorkspace: (businessEntityId?: string) => Promise<ProcurementWorkspaceStats>;
1784
+ };
1785
+
1786
+ type ModuleType = 'purchase' | 'accounting' | 'crm' | 'facility';
1787
+ interface ModuleConfig {
1788
+ id: ModuleType;
1789
+ label: string;
1790
+ description: string;
1791
+ icon: React$1.ElementType;
1792
+ color: string;
1793
+ bgColor: string;
1794
+ component: React$1.FC;
1795
+ }
1796
+ declare const WorkSpace: React$1.FC;
1797
+
1798
+ declare const PurchaseWorkspace: React$1.FC;
1799
+
1800
+ declare const AccountingWorkspace: React$1.FC;
1801
+
1802
+ declare const CrmWorkspace: React$1.FC;
1803
+
1804
+ declare const FacilityWorkspace: React$1.FC;
1805
+
1806
+ declare const HRConnectPage: React$1.FC;
1807
+
1808
+ declare const MeetingHubPage: React$1.FC;
1809
+
1810
+ declare const BudgetPage: React$1.FC;
1811
+
1812
+ declare const ChatEquipePage: React$1.FC;
1813
+
1814
+ declare const ActifsPage: React$1.FC;
1815
+
1816
+ declare const PlanningPage: React$1.FC;
1817
+
1818
+ declare const TaskPilot: React$1.FC;
1819
+
1820
+ declare const PurchaseRequestsPage: () => react_jsx_runtime.JSX.Element;
1821
+
1822
+ declare const WorkSpaceRoutes: React.FC<{
1823
+ module_name: string;
1824
+ module_description: string;
1825
+ }>;
1826
+
1827
+ export { ACCOUNT_TYPE_LABELS, type Account, type AccountListResponse, AccountServices, type AccountType, AccountingWorkspace, ActifsPage, Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, BALANCE_TYPE_LABELS, type BackendFile, type BackendFolder, type BalanceType, BudgetPage, CHOICES, CardBody, CardHeader, ChatEquipePage, 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, HRConnectPage, InfoBox, InputField, InvoiceTypeSelector, LegalFormSelector, MeetingHubPage, type MenuItem, MinimalVendorForm, Modal, ModernCard, type ModuleConfig, type ModuleType, NumberInput, PRINT_GREEN, Pages, PaymentMethodSelector, type PendingTask, PlanningPage, PrimaryButton, PrintPreview, type PrintPreviewProps, PrintableDocument, type PrintableDocumentProps, type ProcurementWorkspaceStats, PurchaseRequestsPage, PurchaseWorkspace, type RecentActivity, RewiseLayout, SYSCOHADA_CLASSES, SearchableSelect, type SearchableSelectOption, SecondaryButton, SelectAccount, SelectClient, SelectCostCenter, SelectDepartment, SelectInput, SelectUnit, SelectUser, SelectVendor, SessionProvider, SignatureSection, StatCard, TEMPLATE_FNE_CHOICES, TaskPilot, 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, WorkSpaceRoutes, WorkspaceServices, fileManagerApi, formatCurrency, formatDate, formatDateFR, formatFileSize, getFileIcon, numberToWords, useAlert, useFileManager, useFileManagerApi, useSession, useToast };