warqadui 0.0.96 → 0.0.98

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.mts CHANGED
@@ -179,7 +179,7 @@ declare const CardFooter: ({ children, className, }: {
179
179
  interface ModalProps {
180
180
  isOpen: boolean;
181
181
  onClose: () => void;
182
- title: string;
182
+ title: React__default.ReactNode;
183
183
  children: React__default.ReactNode;
184
184
  isLoading?: boolean;
185
185
  width?: number;
@@ -198,7 +198,7 @@ interface ConfirmModalProps {
198
198
  /**
199
199
  * Detailed message describing the action being confirmed.
200
200
  */
201
- description: string;
201
+ description: React__default.ReactNode;
202
202
  /**
203
203
  * The word the user must type to enable the confirm button.
204
204
  * @default "delete"
@@ -383,6 +383,7 @@ declare const Enums: {
383
383
  journalTypes: readonly ["journal"];
384
384
  viaTypes: readonly ["direct", "via account"];
385
385
  actionTypes: readonly ["credit", "debit"];
386
+ transactionTypes: readonly ["journal", "payment", "money transfer", "expense"];
386
387
  };
387
388
 
388
389
  interface ThemeConfig {
@@ -396,17 +397,24 @@ interface StoreConfig {
396
397
  email?: string;
397
398
  logo?: string;
398
399
  }
400
+ type apiConfig = {
401
+ accountStatementApi?: string;
402
+ walletReportApi?: string;
403
+ };
399
404
  type EnumsConfig = {
400
405
  [K in keyof typeof Enums]: string[] | readonly string[];
401
406
  };
402
407
  interface WarqadConfig {
403
408
  api?: string;
409
+ apiConfig?: apiConfig;
404
410
  theme?: ThemeConfig;
405
411
  store?: StoreConfig;
406
412
  enums?: Partial<EnumsConfig>;
407
413
  }
408
414
  interface WarqadConfigContextType {
409
415
  config: WarqadConfig & {
416
+ api: string;
417
+ apiConfig: Required<apiConfig>;
410
418
  theme: Required<ThemeConfig>;
411
419
  store: Required<StoreConfig>;
412
420
  enums: EnumsConfig;
@@ -416,6 +424,8 @@ interface WarqadConfigContextType {
416
424
  * Hook to access the current Warqad configuration.
417
425
  */
418
426
  declare const useWarqadConfig: () => WarqadConfig & {
427
+ api: string;
428
+ apiConfig: Required<apiConfig>;
419
429
  theme: Required<ThemeConfig>;
420
430
  store: Required<StoreConfig>;
421
431
  enums: EnumsConfig;
@@ -636,8 +646,23 @@ interface SimpleTableProps<TData> {
636
646
  enableSearch?: boolean;
637
647
  emptyState?: React__default.ReactNode;
638
648
  skeletonCount?: number;
649
+ fixed?: boolean;
650
+ }
651
+ declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, skeletonCount, fixed, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
652
+
653
+ interface SummaryColumn<T> {
654
+ title: React__default.ReactNode;
655
+ key?: string;
656
+ render?: (row: T, index: number) => React__default.ReactNode;
657
+ className?: string;
658
+ }
659
+ interface SummaryTableProps<T> {
660
+ title?: string;
661
+ columns: SummaryColumn<T>[];
662
+ data: T[];
663
+ className?: string;
639
664
  }
640
- declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, skeletonCount, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
665
+ declare function SummaryTable<T>({ title, columns, data, className, }: SummaryTableProps<T>): react_jsx_runtime.JSX.Element;
641
666
 
642
667
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
643
668
  variant?: "primary" | "danger" | "warning" | "success";
@@ -827,7 +852,7 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
827
852
  params?: Record<string, any>;
828
853
  startPage?: number;
829
854
  }) => {
830
- A4DataView: ({ columns, data, error, info, index, title, subtitle, printable, rowPadding, verticalLines, headers, tableTitle, startPage: componentStartPage, isLoading: externalLoading, }: {
855
+ A4DataView: ({ columns, data, error, info, index, title, subtitle, printable, rowPadding, verticalLines, headers, tableTitle, startPage: componentStartPage, isLoading: externalLoading, fixed, }: {
831
856
  tableTitle?: string;
832
857
  columns?: SimpleTableColumn<any>[];
833
858
  data?: any[];
@@ -842,6 +867,7 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
842
867
  headers?: React.ReactNode;
843
868
  startPage?: number;
844
869
  isLoading?: boolean;
870
+ fixed?: boolean;
845
871
  }) => react_jsx_runtime.JSX.Element;
846
872
  data: any;
847
873
  isLoading: boolean;
@@ -982,7 +1008,14 @@ declare const CategoryCard: React__default.FC<{
982
1008
  }>;
983
1009
 
984
1010
  declare const Views: {
985
- Transaction: () => react_jsx_runtime.JSX.Element;
1011
+ Transaction: ({ id, type, close, reverseable, }: {
1012
+ id: string;
1013
+ type: "" | "journal" | "payment" | "money transfer" | "expense" | undefined;
1014
+ close: () => void;
1015
+ reverseable?: {
1016
+ reload: () => void;
1017
+ };
1018
+ }) => react_jsx_runtime.JSX.Element;
986
1019
  CategoryView: React$1.FC<CategoryViewProps>;
987
1020
  CategoryCard: React$1.FC<{
988
1021
  item: CategoryItem;
@@ -1267,20 +1300,20 @@ declare const createAccountSchema: z$1.ZodObject<{
1267
1300
  name: z$1.ZodString;
1268
1301
  email: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodOptional<z$1.ZodString>, string | undefined, string | undefined>, string | undefined, string | undefined>;
1269
1302
  phoneNumber: z$1.ZodOptional<z$1.ZodString>;
1270
- sex: z$1.ZodEnum<["male", "female"]>;
1303
+ sex: z$1.ZodOptional<z$1.ZodEnum<["male", "female"]>>;
1271
1304
  branch: z$1.ZodOptional<z$1.ZodString>;
1272
1305
  currency: z$1.ZodOptional<z$1.ZodString>;
1273
1306
  }, "strip", z$1.ZodTypeAny, {
1274
1307
  name: string;
1275
- sex: "male" | "female";
1276
1308
  email?: string | undefined;
1309
+ sex?: "male" | "female" | undefined;
1277
1310
  phoneNumber?: string | undefined;
1278
1311
  branch?: string | undefined;
1279
1312
  currency?: string | undefined;
1280
1313
  }, {
1281
1314
  name: string;
1282
- sex: "male" | "female";
1283
1315
  email?: string | undefined;
1316
+ sex?: "male" | "female" | undefined;
1284
1317
  phoneNumber?: string | undefined;
1285
1318
  branch?: string | undefined;
1286
1319
  currency?: string | undefined;
@@ -1394,14 +1427,15 @@ type WalletFieldProps<T extends FieldValues> = {
1394
1427
  label: string;
1395
1428
  form: UseFormReturn<T>;
1396
1429
  placeholder?: string;
1397
- api: string;
1430
+ api?: string;
1398
1431
  filter?: string[];
1399
1432
  showBalance?: boolean;
1400
1433
  v?: number;
1401
1434
  required?: boolean;
1402
1435
  disabled?: boolean;
1436
+ obj?: Path<T>;
1403
1437
  };
1404
- declare function Wallet<T extends FieldValues>({ name, label, placeholder, api, form, filter, v, showBalance, required, disabled, }: WalletFieldProps<T>): react_jsx_runtime.JSX.Element;
1438
+ declare function Wallet<T extends FieldValues>({ name, label, placeholder, api, form, filter, v, showBalance, required, disabled, obj, }: WalletFieldProps<T>): react_jsx_runtime.JSX.Element;
1405
1439
 
1406
1440
  declare const WalletField: {
1407
1441
  Wallet: typeof Wallet;
@@ -1639,8 +1673,9 @@ declare const createPackSchema: z$1.ZodObject<{
1639
1673
  type CreatePackSchemaType = z$1.infer<typeof createPackSchema>;
1640
1674
  type PackProductItemSchemaType = z$1.infer<typeof packProductItemSchema>;
1641
1675
 
1642
- declare function Journals({ url }: {
1676
+ declare function Journals({ url, journalType, }: {
1643
1677
  url?: string;
1678
+ journalType?: string;
1644
1679
  }): react_jsx_runtime.JSX.Element;
1645
1680
 
1646
1681
  type accountType = (typeof Enums.accountTypes)[number] | "all";
@@ -1662,6 +1697,7 @@ declare const journalSchema: z$1.ZodObject<{
1662
1697
  rate: z$1.ZodOptional<z$1.ZodNumber>;
1663
1698
  exchangedAmount: z$1.ZodOptional<z$1.ZodNumber>;
1664
1699
  fee: z$1.ZodNumber;
1700
+ note: z$1.ZodOptional<z$1.ZodString>;
1665
1701
  }, "strip", z$1.ZodTypeAny, {
1666
1702
  account: string;
1667
1703
  date: string;
@@ -1669,6 +1705,7 @@ declare const journalSchema: z$1.ZodObject<{
1669
1705
  amount: number;
1670
1706
  journalVia: "direct" | "via account";
1671
1707
  fee: number;
1708
+ note?: string | undefined;
1672
1709
  action?: "credit" | "debit" | undefined;
1673
1710
  viaAccount?: string | undefined;
1674
1711
  viaAccountObject?: any;
@@ -1682,6 +1719,7 @@ declare const journalSchema: z$1.ZodObject<{
1682
1719
  amount: number;
1683
1720
  journalVia: "direct" | "via account";
1684
1721
  fee: number;
1722
+ note?: string | undefined;
1685
1723
  action?: "credit" | "debit" | undefined;
1686
1724
  viaAccount?: string | undefined;
1687
1725
  viaAccountObject?: any;
@@ -1691,6 +1729,129 @@ declare const journalSchema: z$1.ZodObject<{
1691
1729
  }>;
1692
1730
  type JournalSchemaType = z$1.infer<typeof journalSchema>;
1693
1731
 
1732
+ declare function Payments({ url, paymentType, }: {
1733
+ url?: string;
1734
+ paymentType?: string;
1735
+ }): react_jsx_runtime.JSX.Element;
1736
+
1737
+ declare function PaymentForm({ accountType, }: {
1738
+ accountType?: (typeof Enums.accountTypes)[number] | "all";
1739
+ }): react_jsx_runtime.JSX.Element;
1740
+
1741
+ declare const paymentSchema: z$1.ZodObject<{
1742
+ date: z$1.ZodEffects<z$1.ZodString, string, string>;
1743
+ amount: z$1.ZodNumber;
1744
+ account: z$1.ZodString;
1745
+ action: z$1.ZodEnum<["credit", "debit"]>;
1746
+ branch: z$1.ZodOptional<z$1.ZodString>;
1747
+ fee: z$1.ZodOptional<z$1.ZodNumber>;
1748
+ note: z$1.ZodOptional<z$1.ZodString>;
1749
+ wallet: z$1.ZodString;
1750
+ description: z$1.ZodString;
1751
+ accountObject: z$1.ZodOptional<z$1.ZodAny>;
1752
+ walletObject: z$1.ZodOptional<z$1.ZodAny>;
1753
+ rate: z$1.ZodOptional<z$1.ZodNumber>;
1754
+ }, "strip", z$1.ZodTypeAny, {
1755
+ account: string;
1756
+ date: string;
1757
+ description: string;
1758
+ amount: number;
1759
+ action: "credit" | "debit";
1760
+ wallet: string;
1761
+ note?: string | undefined;
1762
+ branch?: string | undefined;
1763
+ accountObject?: any;
1764
+ rate?: number | undefined;
1765
+ fee?: number | undefined;
1766
+ walletObject?: any;
1767
+ }, {
1768
+ account: string;
1769
+ date: string;
1770
+ description: string;
1771
+ amount: number;
1772
+ action: "credit" | "debit";
1773
+ wallet: string;
1774
+ note?: string | undefined;
1775
+ branch?: string | undefined;
1776
+ accountObject?: any;
1777
+ rate?: number | undefined;
1778
+ fee?: number | undefined;
1779
+ walletObject?: any;
1780
+ }>;
1781
+ type PaymentSchemaType = z$1.infer<typeof paymentSchema>;
1782
+
1783
+ declare function MoneyTransfers({ url }: {
1784
+ url?: string;
1785
+ }): react_jsx_runtime.JSX.Element;
1786
+
1787
+ declare function MoneyTransferForm(): react_jsx_runtime.JSX.Element;
1788
+
1789
+ declare const moneyTransferSchema: z$1.ZodObject<{
1790
+ date: z$1.ZodEffects<z$1.ZodString, string, string>;
1791
+ amount: z$1.ZodNumber;
1792
+ branch: z$1.ZodOptional<z$1.ZodString>;
1793
+ note: z$1.ZodOptional<z$1.ZodString>;
1794
+ fromWallet: z$1.ZodString;
1795
+ toWallet: z$1.ZodString;
1796
+ fromWalletObject: z$1.ZodOptional<z$1.ZodAny>;
1797
+ toWalletObject: z$1.ZodOptional<z$1.ZodAny>;
1798
+ rate: z$1.ZodOptional<z$1.ZodNumber>;
1799
+ }, "strip", z$1.ZodTypeAny, {
1800
+ date: string;
1801
+ amount: number;
1802
+ fromWallet: string;
1803
+ toWallet: string;
1804
+ note?: string | undefined;
1805
+ branch?: string | undefined;
1806
+ rate?: number | undefined;
1807
+ fromWalletObject?: any;
1808
+ toWalletObject?: any;
1809
+ }, {
1810
+ date: string;
1811
+ amount: number;
1812
+ fromWallet: string;
1813
+ toWallet: string;
1814
+ note?: string | undefined;
1815
+ branch?: string | undefined;
1816
+ rate?: number | undefined;
1817
+ fromWalletObject?: any;
1818
+ toWalletObject?: any;
1819
+ }>;
1820
+ type MoneyTransferSchemaType = z$1.infer<typeof moneyTransferSchema>;
1821
+
1822
+ declare function Expenses({ url }: {
1823
+ url?: string;
1824
+ }): react_jsx_runtime.JSX.Element;
1825
+
1826
+ declare function ExpenseForm(): react_jsx_runtime.JSX.Element;
1827
+
1828
+ declare const expenseSchema: z$1.ZodObject<{
1829
+ description: z$1.ZodString;
1830
+ date: z$1.ZodEffects<z$1.ZodString, string, string>;
1831
+ amount: z$1.ZodNumber;
1832
+ branch: z$1.ZodOptional<z$1.ZodString>;
1833
+ wallet: z$1.ZodString;
1834
+ note: z$1.ZodOptional<z$1.ZodString>;
1835
+ walletObject: z$1.ZodOptional<z$1.ZodAny>;
1836
+ }, "strip", z$1.ZodTypeAny, {
1837
+ date: string;
1838
+ description: string;
1839
+ amount: number;
1840
+ wallet: string;
1841
+ note?: string | undefined;
1842
+ branch?: string | undefined;
1843
+ walletObject?: any;
1844
+ }, {
1845
+ date: string;
1846
+ description: string;
1847
+ amount: number;
1848
+ wallet: string;
1849
+ note?: string | undefined;
1850
+ branch?: string | undefined;
1851
+ walletObject?: any;
1852
+ }>;
1853
+ type ExpenseSchemaType = z$1.infer<typeof expenseSchema>;
1854
+
1694
1855
  declare function Breadcrumbs(): react_jsx_runtime.JSX.Element;
1695
1856
 
1696
1857
  interface ErrorPageProps {
@@ -1711,4 +1872,12 @@ declare const ErrorPage: (({ title, message, statusCode, action, className, }: E
1711
1872
  400: (props: ErrorPageProps) => react_jsx_runtime.JSX.Element;
1712
1873
  };
1713
1874
 
1714
- export { AccountFields, AccountForm, type AccountType, Accounts, AdminProtectedRoute, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Categories, CategoryCard, CategoryField, CategoryForm, type CategoryItem, ClassicSpin, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, type FetchFunction, type FetchProps, Fields, Guard, InfoGrid, Input, type InputProps, JournalForm, type JournalSchemaType, Journals, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, ProductField, ProductForm, Products, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProtectedRoute, type PutFunction, ResetPasswordPage, type Role, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, UnProtectedRoute, type UseModalReturn, UserForm, UserProfile, Users, Views, WalletField, WalletForm, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, packProductItemSchema, packTypes, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig, verifyUserEmailSchema, type verifyUserEmailSchemaType };
1875
+ declare const AccountReport: () => react_jsx_runtime.JSX.Element;
1876
+
1877
+ declare const WalletReport: () => react_jsx_runtime.JSX.Element;
1878
+
1879
+ declare const AccountStatements: () => react_jsx_runtime.JSX.Element;
1880
+
1881
+ declare const WalletStatements: () => react_jsx_runtime.JSX.Element;
1882
+
1883
+ export { AccountFields, AccountForm, AccountReport, AccountStatements, type AccountType, Accounts, AdminProtectedRoute, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Categories, CategoryCard, CategoryField, CategoryForm, type CategoryItem, ClassicSpin, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, ExpenseForm, type ExpenseSchemaType, Expenses, type FetchFunction, type FetchProps, Fields, Guard, InfoGrid, Input, type InputProps, JournalForm, type JournalSchemaType, Journals, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, MoneyTransferForm, type MoneyTransferSchemaType, MoneyTransfers, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, PaymentForm, type PaymentSchemaType, Payments, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, ProductField, ProductForm, Products, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProtectedRoute, type PutFunction, ResetPasswordPage, type Role, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, type SummaryColumn, SummaryTable, type SummaryTableProps, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, UnProtectedRoute, type UseModalReturn, UserForm, UserProfile, Users, Views, WalletField, WalletForm, WalletReport, WalletStatements, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, type apiConfig, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, expenseSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, moneyTransferSchema, packProductItemSchema, packTypes, paymentSchema, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig, verifyUserEmailSchema, type verifyUserEmailSchemaType };
package/dist/index.d.ts CHANGED
@@ -179,7 +179,7 @@ declare const CardFooter: ({ children, className, }: {
179
179
  interface ModalProps {
180
180
  isOpen: boolean;
181
181
  onClose: () => void;
182
- title: string;
182
+ title: React__default.ReactNode;
183
183
  children: React__default.ReactNode;
184
184
  isLoading?: boolean;
185
185
  width?: number;
@@ -198,7 +198,7 @@ interface ConfirmModalProps {
198
198
  /**
199
199
  * Detailed message describing the action being confirmed.
200
200
  */
201
- description: string;
201
+ description: React__default.ReactNode;
202
202
  /**
203
203
  * The word the user must type to enable the confirm button.
204
204
  * @default "delete"
@@ -383,6 +383,7 @@ declare const Enums: {
383
383
  journalTypes: readonly ["journal"];
384
384
  viaTypes: readonly ["direct", "via account"];
385
385
  actionTypes: readonly ["credit", "debit"];
386
+ transactionTypes: readonly ["journal", "payment", "money transfer", "expense"];
386
387
  };
387
388
 
388
389
  interface ThemeConfig {
@@ -396,17 +397,24 @@ interface StoreConfig {
396
397
  email?: string;
397
398
  logo?: string;
398
399
  }
400
+ type apiConfig = {
401
+ accountStatementApi?: string;
402
+ walletReportApi?: string;
403
+ };
399
404
  type EnumsConfig = {
400
405
  [K in keyof typeof Enums]: string[] | readonly string[];
401
406
  };
402
407
  interface WarqadConfig {
403
408
  api?: string;
409
+ apiConfig?: apiConfig;
404
410
  theme?: ThemeConfig;
405
411
  store?: StoreConfig;
406
412
  enums?: Partial<EnumsConfig>;
407
413
  }
408
414
  interface WarqadConfigContextType {
409
415
  config: WarqadConfig & {
416
+ api: string;
417
+ apiConfig: Required<apiConfig>;
410
418
  theme: Required<ThemeConfig>;
411
419
  store: Required<StoreConfig>;
412
420
  enums: EnumsConfig;
@@ -416,6 +424,8 @@ interface WarqadConfigContextType {
416
424
  * Hook to access the current Warqad configuration.
417
425
  */
418
426
  declare const useWarqadConfig: () => WarqadConfig & {
427
+ api: string;
428
+ apiConfig: Required<apiConfig>;
419
429
  theme: Required<ThemeConfig>;
420
430
  store: Required<StoreConfig>;
421
431
  enums: EnumsConfig;
@@ -636,8 +646,23 @@ interface SimpleTableProps<TData> {
636
646
  enableSearch?: boolean;
637
647
  emptyState?: React__default.ReactNode;
638
648
  skeletonCount?: number;
649
+ fixed?: boolean;
650
+ }
651
+ declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, skeletonCount, fixed, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
652
+
653
+ interface SummaryColumn<T> {
654
+ title: React__default.ReactNode;
655
+ key?: string;
656
+ render?: (row: T, index: number) => React__default.ReactNode;
657
+ className?: string;
658
+ }
659
+ interface SummaryTableProps<T> {
660
+ title?: string;
661
+ columns: SummaryColumn<T>[];
662
+ data: T[];
663
+ className?: string;
639
664
  }
640
- declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, skeletonCount, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
665
+ declare function SummaryTable<T>({ title, columns, data, className, }: SummaryTableProps<T>): react_jsx_runtime.JSX.Element;
641
666
 
642
667
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
643
668
  variant?: "primary" | "danger" | "warning" | "success";
@@ -827,7 +852,7 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
827
852
  params?: Record<string, any>;
828
853
  startPage?: number;
829
854
  }) => {
830
- A4DataView: ({ columns, data, error, info, index, title, subtitle, printable, rowPadding, verticalLines, headers, tableTitle, startPage: componentStartPage, isLoading: externalLoading, }: {
855
+ A4DataView: ({ columns, data, error, info, index, title, subtitle, printable, rowPadding, verticalLines, headers, tableTitle, startPage: componentStartPage, isLoading: externalLoading, fixed, }: {
831
856
  tableTitle?: string;
832
857
  columns?: SimpleTableColumn<any>[];
833
858
  data?: any[];
@@ -842,6 +867,7 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
842
867
  headers?: React.ReactNode;
843
868
  startPage?: number;
844
869
  isLoading?: boolean;
870
+ fixed?: boolean;
845
871
  }) => react_jsx_runtime.JSX.Element;
846
872
  data: any;
847
873
  isLoading: boolean;
@@ -982,7 +1008,14 @@ declare const CategoryCard: React__default.FC<{
982
1008
  }>;
983
1009
 
984
1010
  declare const Views: {
985
- Transaction: () => react_jsx_runtime.JSX.Element;
1011
+ Transaction: ({ id, type, close, reverseable, }: {
1012
+ id: string;
1013
+ type: "" | "journal" | "payment" | "money transfer" | "expense" | undefined;
1014
+ close: () => void;
1015
+ reverseable?: {
1016
+ reload: () => void;
1017
+ };
1018
+ }) => react_jsx_runtime.JSX.Element;
986
1019
  CategoryView: React$1.FC<CategoryViewProps>;
987
1020
  CategoryCard: React$1.FC<{
988
1021
  item: CategoryItem;
@@ -1267,20 +1300,20 @@ declare const createAccountSchema: z$1.ZodObject<{
1267
1300
  name: z$1.ZodString;
1268
1301
  email: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodOptional<z$1.ZodString>, string | undefined, string | undefined>, string | undefined, string | undefined>;
1269
1302
  phoneNumber: z$1.ZodOptional<z$1.ZodString>;
1270
- sex: z$1.ZodEnum<["male", "female"]>;
1303
+ sex: z$1.ZodOptional<z$1.ZodEnum<["male", "female"]>>;
1271
1304
  branch: z$1.ZodOptional<z$1.ZodString>;
1272
1305
  currency: z$1.ZodOptional<z$1.ZodString>;
1273
1306
  }, "strip", z$1.ZodTypeAny, {
1274
1307
  name: string;
1275
- sex: "male" | "female";
1276
1308
  email?: string | undefined;
1309
+ sex?: "male" | "female" | undefined;
1277
1310
  phoneNumber?: string | undefined;
1278
1311
  branch?: string | undefined;
1279
1312
  currency?: string | undefined;
1280
1313
  }, {
1281
1314
  name: string;
1282
- sex: "male" | "female";
1283
1315
  email?: string | undefined;
1316
+ sex?: "male" | "female" | undefined;
1284
1317
  phoneNumber?: string | undefined;
1285
1318
  branch?: string | undefined;
1286
1319
  currency?: string | undefined;
@@ -1394,14 +1427,15 @@ type WalletFieldProps<T extends FieldValues> = {
1394
1427
  label: string;
1395
1428
  form: UseFormReturn<T>;
1396
1429
  placeholder?: string;
1397
- api: string;
1430
+ api?: string;
1398
1431
  filter?: string[];
1399
1432
  showBalance?: boolean;
1400
1433
  v?: number;
1401
1434
  required?: boolean;
1402
1435
  disabled?: boolean;
1436
+ obj?: Path<T>;
1403
1437
  };
1404
- declare function Wallet<T extends FieldValues>({ name, label, placeholder, api, form, filter, v, showBalance, required, disabled, }: WalletFieldProps<T>): react_jsx_runtime.JSX.Element;
1438
+ declare function Wallet<T extends FieldValues>({ name, label, placeholder, api, form, filter, v, showBalance, required, disabled, obj, }: WalletFieldProps<T>): react_jsx_runtime.JSX.Element;
1405
1439
 
1406
1440
  declare const WalletField: {
1407
1441
  Wallet: typeof Wallet;
@@ -1639,8 +1673,9 @@ declare const createPackSchema: z$1.ZodObject<{
1639
1673
  type CreatePackSchemaType = z$1.infer<typeof createPackSchema>;
1640
1674
  type PackProductItemSchemaType = z$1.infer<typeof packProductItemSchema>;
1641
1675
 
1642
- declare function Journals({ url }: {
1676
+ declare function Journals({ url, journalType, }: {
1643
1677
  url?: string;
1678
+ journalType?: string;
1644
1679
  }): react_jsx_runtime.JSX.Element;
1645
1680
 
1646
1681
  type accountType = (typeof Enums.accountTypes)[number] | "all";
@@ -1662,6 +1697,7 @@ declare const journalSchema: z$1.ZodObject<{
1662
1697
  rate: z$1.ZodOptional<z$1.ZodNumber>;
1663
1698
  exchangedAmount: z$1.ZodOptional<z$1.ZodNumber>;
1664
1699
  fee: z$1.ZodNumber;
1700
+ note: z$1.ZodOptional<z$1.ZodString>;
1665
1701
  }, "strip", z$1.ZodTypeAny, {
1666
1702
  account: string;
1667
1703
  date: string;
@@ -1669,6 +1705,7 @@ declare const journalSchema: z$1.ZodObject<{
1669
1705
  amount: number;
1670
1706
  journalVia: "direct" | "via account";
1671
1707
  fee: number;
1708
+ note?: string | undefined;
1672
1709
  action?: "credit" | "debit" | undefined;
1673
1710
  viaAccount?: string | undefined;
1674
1711
  viaAccountObject?: any;
@@ -1682,6 +1719,7 @@ declare const journalSchema: z$1.ZodObject<{
1682
1719
  amount: number;
1683
1720
  journalVia: "direct" | "via account";
1684
1721
  fee: number;
1722
+ note?: string | undefined;
1685
1723
  action?: "credit" | "debit" | undefined;
1686
1724
  viaAccount?: string | undefined;
1687
1725
  viaAccountObject?: any;
@@ -1691,6 +1729,129 @@ declare const journalSchema: z$1.ZodObject<{
1691
1729
  }>;
1692
1730
  type JournalSchemaType = z$1.infer<typeof journalSchema>;
1693
1731
 
1732
+ declare function Payments({ url, paymentType, }: {
1733
+ url?: string;
1734
+ paymentType?: string;
1735
+ }): react_jsx_runtime.JSX.Element;
1736
+
1737
+ declare function PaymentForm({ accountType, }: {
1738
+ accountType?: (typeof Enums.accountTypes)[number] | "all";
1739
+ }): react_jsx_runtime.JSX.Element;
1740
+
1741
+ declare const paymentSchema: z$1.ZodObject<{
1742
+ date: z$1.ZodEffects<z$1.ZodString, string, string>;
1743
+ amount: z$1.ZodNumber;
1744
+ account: z$1.ZodString;
1745
+ action: z$1.ZodEnum<["credit", "debit"]>;
1746
+ branch: z$1.ZodOptional<z$1.ZodString>;
1747
+ fee: z$1.ZodOptional<z$1.ZodNumber>;
1748
+ note: z$1.ZodOptional<z$1.ZodString>;
1749
+ wallet: z$1.ZodString;
1750
+ description: z$1.ZodString;
1751
+ accountObject: z$1.ZodOptional<z$1.ZodAny>;
1752
+ walletObject: z$1.ZodOptional<z$1.ZodAny>;
1753
+ rate: z$1.ZodOptional<z$1.ZodNumber>;
1754
+ }, "strip", z$1.ZodTypeAny, {
1755
+ account: string;
1756
+ date: string;
1757
+ description: string;
1758
+ amount: number;
1759
+ action: "credit" | "debit";
1760
+ wallet: string;
1761
+ note?: string | undefined;
1762
+ branch?: string | undefined;
1763
+ accountObject?: any;
1764
+ rate?: number | undefined;
1765
+ fee?: number | undefined;
1766
+ walletObject?: any;
1767
+ }, {
1768
+ account: string;
1769
+ date: string;
1770
+ description: string;
1771
+ amount: number;
1772
+ action: "credit" | "debit";
1773
+ wallet: string;
1774
+ note?: string | undefined;
1775
+ branch?: string | undefined;
1776
+ accountObject?: any;
1777
+ rate?: number | undefined;
1778
+ fee?: number | undefined;
1779
+ walletObject?: any;
1780
+ }>;
1781
+ type PaymentSchemaType = z$1.infer<typeof paymentSchema>;
1782
+
1783
+ declare function MoneyTransfers({ url }: {
1784
+ url?: string;
1785
+ }): react_jsx_runtime.JSX.Element;
1786
+
1787
+ declare function MoneyTransferForm(): react_jsx_runtime.JSX.Element;
1788
+
1789
+ declare const moneyTransferSchema: z$1.ZodObject<{
1790
+ date: z$1.ZodEffects<z$1.ZodString, string, string>;
1791
+ amount: z$1.ZodNumber;
1792
+ branch: z$1.ZodOptional<z$1.ZodString>;
1793
+ note: z$1.ZodOptional<z$1.ZodString>;
1794
+ fromWallet: z$1.ZodString;
1795
+ toWallet: z$1.ZodString;
1796
+ fromWalletObject: z$1.ZodOptional<z$1.ZodAny>;
1797
+ toWalletObject: z$1.ZodOptional<z$1.ZodAny>;
1798
+ rate: z$1.ZodOptional<z$1.ZodNumber>;
1799
+ }, "strip", z$1.ZodTypeAny, {
1800
+ date: string;
1801
+ amount: number;
1802
+ fromWallet: string;
1803
+ toWallet: string;
1804
+ note?: string | undefined;
1805
+ branch?: string | undefined;
1806
+ rate?: number | undefined;
1807
+ fromWalletObject?: any;
1808
+ toWalletObject?: any;
1809
+ }, {
1810
+ date: string;
1811
+ amount: number;
1812
+ fromWallet: string;
1813
+ toWallet: string;
1814
+ note?: string | undefined;
1815
+ branch?: string | undefined;
1816
+ rate?: number | undefined;
1817
+ fromWalletObject?: any;
1818
+ toWalletObject?: any;
1819
+ }>;
1820
+ type MoneyTransferSchemaType = z$1.infer<typeof moneyTransferSchema>;
1821
+
1822
+ declare function Expenses({ url }: {
1823
+ url?: string;
1824
+ }): react_jsx_runtime.JSX.Element;
1825
+
1826
+ declare function ExpenseForm(): react_jsx_runtime.JSX.Element;
1827
+
1828
+ declare const expenseSchema: z$1.ZodObject<{
1829
+ description: z$1.ZodString;
1830
+ date: z$1.ZodEffects<z$1.ZodString, string, string>;
1831
+ amount: z$1.ZodNumber;
1832
+ branch: z$1.ZodOptional<z$1.ZodString>;
1833
+ wallet: z$1.ZodString;
1834
+ note: z$1.ZodOptional<z$1.ZodString>;
1835
+ walletObject: z$1.ZodOptional<z$1.ZodAny>;
1836
+ }, "strip", z$1.ZodTypeAny, {
1837
+ date: string;
1838
+ description: string;
1839
+ amount: number;
1840
+ wallet: string;
1841
+ note?: string | undefined;
1842
+ branch?: string | undefined;
1843
+ walletObject?: any;
1844
+ }, {
1845
+ date: string;
1846
+ description: string;
1847
+ amount: number;
1848
+ wallet: string;
1849
+ note?: string | undefined;
1850
+ branch?: string | undefined;
1851
+ walletObject?: any;
1852
+ }>;
1853
+ type ExpenseSchemaType = z$1.infer<typeof expenseSchema>;
1854
+
1694
1855
  declare function Breadcrumbs(): react_jsx_runtime.JSX.Element;
1695
1856
 
1696
1857
  interface ErrorPageProps {
@@ -1711,4 +1872,12 @@ declare const ErrorPage: (({ title, message, statusCode, action, className, }: E
1711
1872
  400: (props: ErrorPageProps) => react_jsx_runtime.JSX.Element;
1712
1873
  };
1713
1874
 
1714
- export { AccountFields, AccountForm, type AccountType, Accounts, AdminProtectedRoute, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Categories, CategoryCard, CategoryField, CategoryForm, type CategoryItem, ClassicSpin, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, type FetchFunction, type FetchProps, Fields, Guard, InfoGrid, Input, type InputProps, JournalForm, type JournalSchemaType, Journals, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, ProductField, ProductForm, Products, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProtectedRoute, type PutFunction, ResetPasswordPage, type Role, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, UnProtectedRoute, type UseModalReturn, UserForm, UserProfile, Users, Views, WalletField, WalletForm, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, packProductItemSchema, packTypes, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig, verifyUserEmailSchema, type verifyUserEmailSchemaType };
1875
+ declare const AccountReport: () => react_jsx_runtime.JSX.Element;
1876
+
1877
+ declare const WalletReport: () => react_jsx_runtime.JSX.Element;
1878
+
1879
+ declare const AccountStatements: () => react_jsx_runtime.JSX.Element;
1880
+
1881
+ declare const WalletStatements: () => react_jsx_runtime.JSX.Element;
1882
+
1883
+ export { AccountFields, AccountForm, AccountReport, AccountStatements, type AccountType, Accounts, AdminProtectedRoute, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Categories, CategoryCard, CategoryField, CategoryForm, type CategoryItem, ClassicSpin, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, ExpenseForm, type ExpenseSchemaType, Expenses, type FetchFunction, type FetchProps, Fields, Guard, InfoGrid, Input, type InputProps, JournalForm, type JournalSchemaType, Journals, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, MoneyTransferForm, type MoneyTransferSchemaType, MoneyTransfers, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, PaymentForm, type PaymentSchemaType, Payments, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, ProductField, ProductForm, Products, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProtectedRoute, type PutFunction, ResetPasswordPage, type Role, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, type SummaryColumn, SummaryTable, type SummaryTableProps, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, UnProtectedRoute, type UseModalReturn, UserForm, UserProfile, Users, Views, WalletField, WalletForm, WalletReport, WalletStatements, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, type apiConfig, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, expenseSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, moneyTransferSchema, packProductItemSchema, packTypes, paymentSchema, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig, verifyUserEmailSchema, type verifyUserEmailSchemaType };