@simpoobusiness/sdk 1.0.0

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.
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ declare function InfoCard({ children, trigger, fieldName, align, }: {
3
+ children: React.ReactNode;
4
+ trigger?: any;
5
+ fieldName?: string;
6
+ align?: "start" | "center" | "end";
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ export default InfoCard;
@@ -0,0 +1,4 @@
1
+ declare function StatusComponent({ status }: {
2
+ status: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export default StatusComponent;
@@ -0,0 +1,9 @@
1
+ export interface Emptyprops {
2
+ header?: string;
3
+ subText?: string;
4
+ icon?: string;
5
+ }
6
+ declare function ItemEmpty({ props }: {
7
+ props?: Emptyprops;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export default ItemEmpty;
@@ -0,0 +1,27 @@
1
+ import { type ColumnDef } from "@tanstack/react-table";
2
+ import { ReactNode } from "react";
3
+ import { Meta } from "./pagination-component";
4
+ import { Emptyprops } from "./ItemEmpty";
5
+ interface DataTableProps<TData, TValue> {
6
+ columns: ColumnDef<TData, TValue>[];
7
+ data: TData[];
8
+ tbhRowClass?: string;
9
+ tHeadClass?: string;
10
+ tbCellClass?: string;
11
+ meta?: Meta;
12
+ showBulkActions?: boolean;
13
+ showPaginate?: boolean;
14
+ emptyData?: boolean;
15
+ emptyProps?: Emptyprops;
16
+ loading?: boolean;
17
+ hasAccordion?: boolean;
18
+ accordionData?: (row: TData) => ReactNode;
19
+ bodyRowClass?: string;
20
+ tableContainerClass?: string;
21
+ firstCellClass?: string;
22
+ lastCellClass?: string;
23
+ showAccordionDropdown?: boolean;
24
+ onToggleAccordion?: (index: number, row: TData) => void;
25
+ }
26
+ export declare function Table<TData, TValue>({ columns, data, tbhRowClass, tHeadClass, tbCellClass, meta, showBulkActions, showPaginate, emptyData, emptyProps, loading, accordionData, hasAccordion, bodyRowClass, tableContainerClass, firstCellClass, lastCellClass, showAccordionDropdown, onToggleAccordion, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,13 @@
1
+ export interface Meta {
2
+ current_page: number;
3
+ last_page: number;
4
+ per_page: number;
5
+ total: number;
6
+ from: number;
7
+ to: number;
8
+ }
9
+ declare function PaginationComponent({ showBulkActions, meta, }: {
10
+ showBulkActions?: boolean;
11
+ meta?: Meta;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export default PaginationComponent;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
+ declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
4
+ declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
5
+ declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
+ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
+ declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
+ declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
+ declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const InventoryTable: React.FC;
@@ -0,0 +1,22 @@
1
+ import { ColumnDef } from "@tanstack/react-table";
2
+ export type Items = {
3
+ item_description: string;
4
+ all_quantity: number;
5
+ quantity: number;
6
+ type: string;
7
+ selling_price: number;
8
+ categories: Array<any>;
9
+ tags: string[];
10
+ status: string;
11
+ sku: string;
12
+ item_image: string;
13
+ barcode: Array<any>;
14
+ expired: number;
15
+ expiring: number;
16
+ unit: string;
17
+ uuid: string;
18
+ item_type_id: string;
19
+ reorder_level: string;
20
+ fullData: ItemData;
21
+ };
22
+ export declare const itemColumns: ColumnDef<Items>[];
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ interface SDKContextProps {
3
+ apiKey: string;
4
+ }
5
+ export declare const useSDK: () => SDKContextProps;
6
+ interface SDKProviderProps {
7
+ apiKey: string;
8
+ children: React.ReactNode;
9
+ }
10
+ export declare const SimpooProvider: React.FC<SDKProviderProps>;
11
+ export {};