warqadui 0.0.48 → 0.0.51

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
@@ -4,6 +4,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react_hook_form from 'react-hook-form';
5
5
  import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
6
6
  import { ColumnDef, SortingState, ColumnFiltersState, RowData } from '@tanstack/react-table';
7
+ import * as z from 'zod';
7
8
  import * as react_to_print from 'react-to-print';
8
9
  import { UploadFile } from 'antd';
9
10
 
@@ -527,6 +528,54 @@ interface BrandingProps {
527
528
  }
528
529
  declare const Branding: React__default.FC<BrandingProps>;
529
530
 
531
+ type LoginTheme = "tech" | "travel" | "healthcare";
532
+ interface BaseLoginProps {
533
+ form: UseFormReturn<LoginSchema>;
534
+ onSubmit: (data: LoginSchema, form: UseFormReturn<LoginSchema>) => void;
535
+ image?: string;
536
+ theme?: LoginTheme;
537
+ title?: string;
538
+ subtitle?: string;
539
+ logo?: React__default.ReactNode;
540
+ footer?: React__default.ReactNode;
541
+ brandName?: string;
542
+ backUrl?: string;
543
+ }
544
+ declare const ThemedLogin: React__default.FC<BaseLoginProps>;
545
+
546
+ declare const defaultLoginSchema: z.ZodObject<{
547
+ email: z.ZodString;
548
+ password: z.ZodString;
549
+ }, "strip", z.ZodTypeAny, {
550
+ email: string;
551
+ password: string;
552
+ }, {
553
+ email: string;
554
+ password: string;
555
+ }>;
556
+ type LoginSchema = z.infer<typeof defaultLoginSchema>;
557
+ interface UseLoginProps {
558
+ theme?: LoginTheme;
559
+ image?: string;
560
+ schema?: z.ZodType<any, any, any>;
561
+ defaultValues?: any;
562
+ onSubmit: (data: any, form: UseFormReturn<LoginSchema>) => void;
563
+ brandName?: string;
564
+ title?: string;
565
+ subtitle?: string;
566
+ backUrl?: string;
567
+ }
568
+ declare const useLogin: (props: UseLoginProps) => {
569
+ form: UseFormReturn<{
570
+ email: string;
571
+ password: string;
572
+ }, any, {
573
+ email: string;
574
+ password: string;
575
+ }>;
576
+ Login: React__default.FC<{}>;
577
+ };
578
+
530
579
  interface FetchProps {
531
580
  url: string;
532
581
  body?: Record<string, any>;
@@ -602,6 +651,36 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
602
651
  reactToPrintFn: react_to_print.UseReactToPrintFn;
603
652
  };
604
653
 
654
+ declare const useA4CategoryView: ({ url, v, delay, params, startPage, }?: {
655
+ url?: string;
656
+ v?: 0 | 1 | 2;
657
+ delay?: number;
658
+ params?: Record<string, any>;
659
+ startPage?: number;
660
+ }) => {
661
+ A4CategoryView: ({ data, groups: incomingGroups, error, info, title, subtitle, printable, gridTitle, startPage: componentStartPage, isLoading: externalLoading, renderItem, gridColumns, }: {
662
+ gridTitle?: string;
663
+ data?: any[];
664
+ groups?: {
665
+ title: string;
666
+ items: any[];
667
+ }[];
668
+ error?: string | null;
669
+ info?: any[];
670
+ title?: string;
671
+ subtitle?: string;
672
+ printable?: boolean;
673
+ startPage?: number;
674
+ isLoading?: boolean;
675
+ renderItem: (item: any) => React.ReactNode;
676
+ gridColumns?: number;
677
+ }) => react_jsx_runtime.JSX.Element;
678
+ data: any;
679
+ isLoading: boolean;
680
+ get: FetchFunction;
681
+ reactToPrintFn: react_to_print.UseReactToPrintFn;
682
+ };
683
+
605
684
  declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
606
685
  url: string;
607
686
  v?: 0 | 1 | 2;
@@ -721,4 +800,27 @@ declare const useAntdImageUpload: ({ length }: {
721
800
  setFileList: React$1.Dispatch<React$1.SetStateAction<UploadFile<any>[]>>;
722
801
  };
723
802
 
724
- export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, 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, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4StatementView, useAntdImageUpload, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
803
+ interface CategoryItem {
804
+ id: string | number;
805
+ name: string;
806
+ price: string | number;
807
+ image: string;
808
+ }
809
+ interface CategoryViewProps {
810
+ categoryName: string;
811
+ items: CategoryItem[];
812
+ className?: string;
813
+ }
814
+ declare const CategoryCard: React__default.FC<{
815
+ item: CategoryItem;
816
+ }>;
817
+
818
+ declare const Views: {
819
+ Transaction: () => react_jsx_runtime.JSX.Element;
820
+ CategoryView: React$1.FC<CategoryViewProps>;
821
+ CategoryCard: React$1.FC<{
822
+ item: CategoryItem;
823
+ }>;
824
+ };
825
+
826
+ export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, 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, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react_hook_form from 'react-hook-form';
5
5
  import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
6
6
  import { ColumnDef, SortingState, ColumnFiltersState, RowData } from '@tanstack/react-table';
7
+ import * as z from 'zod';
7
8
  import * as react_to_print from 'react-to-print';
8
9
  import { UploadFile } from 'antd';
9
10
 
@@ -527,6 +528,54 @@ interface BrandingProps {
527
528
  }
528
529
  declare const Branding: React__default.FC<BrandingProps>;
529
530
 
531
+ type LoginTheme = "tech" | "travel" | "healthcare";
532
+ interface BaseLoginProps {
533
+ form: UseFormReturn<LoginSchema>;
534
+ onSubmit: (data: LoginSchema, form: UseFormReturn<LoginSchema>) => void;
535
+ image?: string;
536
+ theme?: LoginTheme;
537
+ title?: string;
538
+ subtitle?: string;
539
+ logo?: React__default.ReactNode;
540
+ footer?: React__default.ReactNode;
541
+ brandName?: string;
542
+ backUrl?: string;
543
+ }
544
+ declare const ThemedLogin: React__default.FC<BaseLoginProps>;
545
+
546
+ declare const defaultLoginSchema: z.ZodObject<{
547
+ email: z.ZodString;
548
+ password: z.ZodString;
549
+ }, "strip", z.ZodTypeAny, {
550
+ email: string;
551
+ password: string;
552
+ }, {
553
+ email: string;
554
+ password: string;
555
+ }>;
556
+ type LoginSchema = z.infer<typeof defaultLoginSchema>;
557
+ interface UseLoginProps {
558
+ theme?: LoginTheme;
559
+ image?: string;
560
+ schema?: z.ZodType<any, any, any>;
561
+ defaultValues?: any;
562
+ onSubmit: (data: any, form: UseFormReturn<LoginSchema>) => void;
563
+ brandName?: string;
564
+ title?: string;
565
+ subtitle?: string;
566
+ backUrl?: string;
567
+ }
568
+ declare const useLogin: (props: UseLoginProps) => {
569
+ form: UseFormReturn<{
570
+ email: string;
571
+ password: string;
572
+ }, any, {
573
+ email: string;
574
+ password: string;
575
+ }>;
576
+ Login: React__default.FC<{}>;
577
+ };
578
+
530
579
  interface FetchProps {
531
580
  url: string;
532
581
  body?: Record<string, any>;
@@ -602,6 +651,36 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
602
651
  reactToPrintFn: react_to_print.UseReactToPrintFn;
603
652
  };
604
653
 
654
+ declare const useA4CategoryView: ({ url, v, delay, params, startPage, }?: {
655
+ url?: string;
656
+ v?: 0 | 1 | 2;
657
+ delay?: number;
658
+ params?: Record<string, any>;
659
+ startPage?: number;
660
+ }) => {
661
+ A4CategoryView: ({ data, groups: incomingGroups, error, info, title, subtitle, printable, gridTitle, startPage: componentStartPage, isLoading: externalLoading, renderItem, gridColumns, }: {
662
+ gridTitle?: string;
663
+ data?: any[];
664
+ groups?: {
665
+ title: string;
666
+ items: any[];
667
+ }[];
668
+ error?: string | null;
669
+ info?: any[];
670
+ title?: string;
671
+ subtitle?: string;
672
+ printable?: boolean;
673
+ startPage?: number;
674
+ isLoading?: boolean;
675
+ renderItem: (item: any) => React.ReactNode;
676
+ gridColumns?: number;
677
+ }) => react_jsx_runtime.JSX.Element;
678
+ data: any;
679
+ isLoading: boolean;
680
+ get: FetchFunction;
681
+ reactToPrintFn: react_to_print.UseReactToPrintFn;
682
+ };
683
+
605
684
  declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
606
685
  url: string;
607
686
  v?: 0 | 1 | 2;
@@ -721,4 +800,27 @@ declare const useAntdImageUpload: ({ length }: {
721
800
  setFileList: React$1.Dispatch<React$1.SetStateAction<UploadFile<any>[]>>;
722
801
  };
723
802
 
724
- export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, 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, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4StatementView, useAntdImageUpload, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
803
+ interface CategoryItem {
804
+ id: string | number;
805
+ name: string;
806
+ price: string | number;
807
+ image: string;
808
+ }
809
+ interface CategoryViewProps {
810
+ categoryName: string;
811
+ items: CategoryItem[];
812
+ className?: string;
813
+ }
814
+ declare const CategoryCard: React__default.FC<{
815
+ item: CategoryItem;
816
+ }>;
817
+
818
+ declare const Views: {
819
+ Transaction: () => react_jsx_runtime.JSX.Element;
820
+ CategoryView: React$1.FC<CategoryViewProps>;
821
+ CategoryCard: React$1.FC<{
822
+ item: CategoryItem;
823
+ }>;
824
+ };
825
+
826
+ export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, 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, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };