@simpoobusiness/sdk 2.0.85 → 2.0.86

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.
Files changed (46) hide show
  1. package/README.md +9 -3
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/assets/icons/calendar.d.ts +6 -0
  4. package/dist/assets/icons/index.d.ts +11 -0
  5. package/dist/assets/icons/info.d.ts +5 -0
  6. package/dist/assets/icons/trash.d.ts +5 -0
  7. package/dist/assets/icons.d.ts +1 -0
  8. package/dist/assets/images/calendar.d.ts +6 -0
  9. package/dist/components/atoms/date-range-display.d.ts +2 -0
  10. package/dist/components/atoms/datePicker.d.ts +24 -0
  11. package/dist/components/atoms/dateRangePicker.d.ts +7 -0
  12. package/dist/components/layouts/report-layout.d.ts +7 -0
  13. package/dist/components/modals/cash-breakdown.d.ts +6 -0
  14. package/dist/components/modals/payment-method-details.d.ts +6 -0
  15. package/dist/components/modals/sales-channel-details.d.ts +6 -0
  16. package/dist/components/molecule/empty/itemEmpty.d.ts +9 -0
  17. package/dist/components/molecule/empty/norecord-found.d.ts +8 -0
  18. package/dist/components/molecule/radial-chart.d.ts +4 -0
  19. package/dist/components/molecule/tabs.d.ts +2 -1
  20. package/dist/components/molecule/usermanagement/donutChart.d.ts +21 -0
  21. package/dist/components/ui/button.d.ts +1 -1
  22. package/dist/components/ui/calendar.d.ts +9 -0
  23. package/dist/components/ui/chart.d.ts +62 -0
  24. package/dist/components/ui/progress.d.ts +4 -0
  25. package/dist/components/widgets/reports/sales-report/SalesReport.d.ts +1 -0
  26. package/dist/components/widgets/reports/sales-report/customers-summary.d.ts +5 -0
  27. package/dist/components/widgets/reports/sales-report/payment-methods.d.ts +5 -0
  28. package/dist/components/widgets/reports/sales-report/sales-bar-chart.d.ts +5 -0
  29. package/dist/components/widgets/reports/sales-report/sales-by-category.d.ts +5 -0
  30. package/dist/components/widgets/reports/sales-report/sales-by-employees.d.ts +5 -0
  31. package/dist/components/widgets/reports/sales-report/sales-channels.d.ts +5 -0
  32. package/dist/components/widgets/reports/sales-report/sales-invoice-tab.d.ts +5 -0
  33. package/dist/components/widgets/reports/sales-report/sales-item-tab.d.ts +5 -0
  34. package/dist/components/widgets/reports/sales-report/sales-overview.d.ts +5 -0
  35. package/dist/components/widgets/reports/sales-report/sales-report-tabs.d.ts +5 -0
  36. package/dist/embed.d.ts +2 -0
  37. package/dist/index.d.ts +1 -0
  38. package/dist/simpoo-sdk.css +1 -1
  39. package/dist/simpoo-sdk.js +40 -40
  40. package/dist/simpoo-sdk.js.map +1 -1
  41. package/dist/store/actions/utility.d.ts +5 -0
  42. package/dist/store/index.d.ts +6 -0
  43. package/dist/store/reducers/reports.d.ts +5 -0
  44. package/package.json +19 -13
  45. package/dist/assets/image-placeholdere1821db1b147e2aa.png +0 -0
  46. package/dist/assets/placeholder-image94ba15ea00cc66fe.svg +0 -4
@@ -0,0 +1,6 @@
1
+ declare function CalendarIcon({ width, height, color, }: {
2
+ width?: number;
3
+ height?: number;
4
+ color?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default CalendarIcon;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @property {React.ReactElement} icon - The SVG icon element.
3
+ * @property {string} description -
4
+ * @description {This holds all simpooBusiness related icons assets}
5
+ * @format SVG
6
+ * @usage To use this asset just import the assets as a code block within your project i.e {icons.mascot}
7
+ * @renders SVG Component
8
+ *
9
+ */
10
+ export declare const icons: Icons;
11
+ export declare const settingsIcons: Icons;
@@ -0,0 +1,5 @@
1
+ declare function Info({ width, height, }: {
2
+ width?: number;
3
+ height?: number;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default Info;
@@ -0,0 +1,5 @@
1
+ declare function Trash({ width, height, }: {
2
+ width?: number;
3
+ height?: number;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default Trash;
@@ -1 +1,2 @@
1
1
  export declare const icons: Icons;
2
+ export declare const settingsIcons: Icons;
@@ -0,0 +1,6 @@
1
+ declare function CalendarIcon({ width, height, color, }: {
2
+ width?: number;
3
+ height?: number;
4
+ color?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default CalendarIcon;
@@ -0,0 +1,2 @@
1
+ declare function ReportDateRangeDisplay(): import("react/jsx-runtime").JSX.Element;
2
+ export default ReportDateRangeDisplay;
@@ -0,0 +1,24 @@
1
+ import { IDate } from "./dateRangePicker";
2
+ export interface DatePickerProps {
3
+ className?: string;
4
+ placeholder?: string;
5
+ label?: string;
6
+ required?: boolean;
7
+ optional?: boolean;
8
+ error?: string;
9
+ info?: string;
10
+ labelClass?: string;
11
+ value?: Date | undefined;
12
+ onChange?: (date: Date | undefined) => void;
13
+ dateFormatType?: string;
14
+ returnValue?: (date: IDate | any) => void;
15
+ align?: "start" | "center" | "end";
16
+ loading?: boolean;
17
+ showDateText?: boolean;
18
+ defaultRangeValue?: IDate;
19
+ disabled?: boolean;
20
+ showTime?: boolean;
21
+ showFutureDate?: boolean;
22
+ makeInitialNull?: boolean;
23
+ }
24
+ export declare const DatePicker: ({ label, labelClass, required, info, optional, className, placeholder, value, onChange, dateFormatType, loading, disabled, align, showTime, showFutureDate, makeInitialNull, error, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { DatePickerProps } from "./datePicker";
2
+ export interface IDate {
3
+ startDate: Date;
4
+ endDate: Date;
5
+ key: string;
6
+ }
7
+ export declare function DatePickerWithRange({ label, labelClass, required, info, optional, className, placeholder, returnValue, showDateText, align, defaultRangeValue, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from "react";
2
+ export default function ReportLayout({ children, main, addons, reportTitle, }: {
3
+ children: ReactNode;
4
+ main?: boolean;
5
+ addons?: ReactNode;
6
+ reportTitle?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ declare function CashBreakdown({ isOpen, onClose, data, }: {
2
+ isOpen: boolean;
3
+ onClose?: () => void;
4
+ data: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default CashBreakdown;
@@ -0,0 +1,6 @@
1
+ declare function PaymentMethodDetails({ isOpen, onClose, data, }: {
2
+ isOpen: boolean;
3
+ onClose?: () => void;
4
+ data: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default PaymentMethodDetails;
@@ -0,0 +1,6 @@
1
+ declare function SalesChannelDetails({ isOpen, onClose, data, }: {
2
+ isOpen: boolean;
3
+ onClose?: () => void;
4
+ data: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default SalesChannelDetails;
@@ -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,8 @@
1
+ export interface Emptyprops {
2
+ text?: string;
3
+ icon?: string;
4
+ className?: string;
5
+ }
6
+ export default function NoRecordFound({ props }: {
7
+ props?: Emptyprops;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function ChartComponent({ total_count, chartData, }: {
2
+ total_count: number;
3
+ chartData: {}[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
- declare function Tabs({ tabs, loading, }: {
1
+ declare function Tabs({ tabs, loading, tabsContainer, }: {
2
2
  tabs?: Tab[];
3
3
  loading?: boolean;
4
+ tabsContainer?: string;
4
5
  }): import("react/jsx-runtime").JSX.Element;
5
6
  export default Tabs;
@@ -0,0 +1,21 @@
1
+ export declare const description = "A donut chart with text";
2
+ export declare function generateColor(index: number, totalItems: number): string;
3
+ export type DynamicChartConfig = {
4
+ count: {
5
+ label: string;
6
+ };
7
+ } & Record<string, {
8
+ label: string;
9
+ color: string;
10
+ }>;
11
+ export type ChartData = {
12
+ label: string;
13
+ count: number;
14
+ fill: string;
15
+ };
16
+ export declare function DonutChart({ data, }: {
17
+ data: {
18
+ title: string;
19
+ value: number;
20
+ }[];
21
+ }): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
5
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { DayPicker } from "react-day-picker";
3
+ import "react-day-picker/style.css";
4
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
5
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
6
+ declare namespace Calendar {
7
+ var displayName: string;
8
+ }
9
+ export { Calendar };
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ import * as RechartsPrimitive from "recharts";
3
+ declare const THEMES: {
4
+ readonly light: "";
5
+ readonly dark: ".dark";
6
+ };
7
+ export type ChartConfig = {
8
+ [k in string]: {
9
+ label?: React.ReactNode;
10
+ icon?: React.ComponentType;
11
+ } & ({
12
+ color?: string;
13
+ theme?: never;
14
+ } | {
15
+ color?: never;
16
+ theme: Record<keyof typeof THEMES, string>;
17
+ });
18
+ };
19
+ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
20
+ config: ChartConfig;
21
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const ChartStyle: ({ id, config }: {
24
+ id: string;
25
+ config: ChartConfig;
26
+ }) => import("react/jsx-runtime").JSX.Element | null;
27
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
+ declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> & {
29
+ accessibilityLayer?: boolean;
30
+ active?: boolean | undefined;
31
+ includeHidden?: boolean | undefined;
32
+ allowEscapeViewBox?: import("recharts/types/util/types").AllowInDimension;
33
+ animationDuration?: import("recharts/types/util/types").AnimationDuration;
34
+ animationEasing?: import("recharts/types/util/types").AnimationTiming;
35
+ content?: import("recharts/types/component/Tooltip").ContentType<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> | undefined;
36
+ coordinate?: Partial<import("recharts/types/util/types").Coordinate>;
37
+ cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
38
+ filterNull?: boolean;
39
+ defaultIndex?: number;
40
+ isAnimationActive?: boolean;
41
+ offset?: number;
42
+ payloadUniqBy?: import("recharts/types/util/payload/getUniqPayload").UniqueOption<import("recharts/types/component/DefaultTooltipContent").Payload<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType>> | undefined;
43
+ position?: Partial<import("recharts/types/util/types").Coordinate>;
44
+ reverseDirection?: import("recharts/types/util/types").AllowInDimension;
45
+ shared?: boolean;
46
+ trigger?: "hover" | "click";
47
+ useTranslate3d?: boolean;
48
+ viewBox?: import("recharts/types/util/types").CartesianViewBox;
49
+ wrapperStyle?: React.CSSProperties;
50
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
51
+ hideLabel?: boolean;
52
+ hideIndicator?: boolean;
53
+ indicator?: "line" | "dot" | "dashed";
54
+ nameKey?: string;
55
+ labelKey?: string;
56
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
57
+ declare const ChartLegend: typeof RechartsPrimitive.Legend;
58
+ declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
59
+ hideIcon?: boolean;
60
+ nameKey?: string;
61
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
3
+ declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Progress };
@@ -0,0 +1 @@
1
+ export declare const SalesReport: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ declare function CustomersSummary({ data, loading }: {
2
+ data: any;
3
+ loading: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default CustomersSummary;
@@ -0,0 +1,5 @@
1
+ declare function PaymentMethods({ data, loading }: {
2
+ data: any;
3
+ loading: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default PaymentMethods;
@@ -0,0 +1,5 @@
1
+ declare function SalesBarChart({ loading, data }: {
2
+ loading: boolean;
3
+ data: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesBarChart;
@@ -0,0 +1,5 @@
1
+ declare function SalesByCategory({ employeeUUID, customerUUID, }: {
2
+ employeeUUID: string;
3
+ customerUUID: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesByCategory;
@@ -0,0 +1,5 @@
1
+ declare function SalesByEmployees({ employeeUUID, customerUUID, }: {
2
+ employeeUUID: string;
3
+ customerUUID: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesByEmployees;
@@ -0,0 +1,5 @@
1
+ declare function SalesChannels({ data, loading }: {
2
+ data: any;
3
+ loading: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesChannels;
@@ -0,0 +1,5 @@
1
+ declare function SalesInvoiceTab({ employeeUUID, customerUUID, }: {
2
+ employeeUUID: string;
3
+ customerUUID: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesInvoiceTab;
@@ -0,0 +1,5 @@
1
+ declare function SalesItemTab({ employeeUUID, customerUUID, }: {
2
+ employeeUUID: string;
3
+ customerUUID: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesItemTab;
@@ -0,0 +1,5 @@
1
+ declare function SalesOverview({ data, loading }: {
2
+ data: any;
3
+ loading: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesOverview;
@@ -0,0 +1,5 @@
1
+ declare function SalesReportTabs({ employeeUUID, customerUUID, }: {
2
+ employeeUUID: string;
3
+ customerUUID: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default SalesReportTabs;
package/dist/embed.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { SimpooEnvironment } from "./api/client";
2
2
  import "./styles/tailwind.css";
3
+ import "react-date-range/dist/styles.css";
4
+ import "react-date-range/dist/theme/default.css";
3
5
  /**
4
6
  * Initializes the Simpoo SDK with your configuration.
5
7
  * @param config - Object containing API key and other options.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { SimpooProvider } from "./context/SimpooProvider";
2
2
  export { InventoryTable } from "./components/widgets/inventory/InventoryTable";
3
+ export { SalesReport } from "./components/widgets/reports/sales-report/SalesReport";
3
4
  import "./styles/tailwind.css";