ingeniuscliq-core 0.0.12 → 0.0.13
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/assets/index.d.ts +4 -0
- package/dist/classes/CoreBuilder.d.ts +3 -0
- package/dist/components/config.d.ts +22 -0
- package/dist/components/customs/carousel/CustomCarousel.d.ts +7 -0
- package/dist/components/customs/carousel/CustomCarouselSection.d.ts +11 -0
- package/dist/components/customs/carousel/index.d.ts +2 -0
- package/dist/components/customs/form/CustomFormField.d.ts +12 -0
- package/dist/components/customs/form/FormInput.d.ts +16 -0
- package/dist/components/customs/form/FormTextArea.d.ts +9 -0
- package/dist/components/customs/form/FormWrapper.d.ts +8 -0
- package/dist/components/customs/index.d.ts +1 -0
- package/dist/components/customs/logo/Logo.d.ts +6 -0
- package/dist/components/customs/pagination/CustomPagination.d.ts +7 -0
- package/dist/components/customs/select/CustomSelect.d.ts +10 -0
- package/dist/components/customs/spinner/Spinner.d.ts +7 -0
- package/dist/components/layouts/CoreBaseLayout.d.ts +9 -0
- package/dist/components/templates/CoreHomeLayout.d.ts +5 -0
- package/dist/components/templates/CorePreviewLayout.d.ts +2 -0
- package/dist/components/templates/partials/CoreFooter.d.ts +1 -0
- package/dist/components/templates/partials/CoreHeader.d.ts +6 -0
- package/dist/components/templates/partials/CoreMainSearch.d.ts +8 -0
- package/dist/components/templates/partials/CoreNavbar.d.ts +8 -0
- package/dist/components/templates/partials/CoreSubMenu.d.ts +6 -0
- package/dist/components/templates/partials/CoreSubMenuHeader.d.ts +7 -0
- package/dist/components/templates/partials/DynamicHeader.d.ts +7 -0
- package/dist/components/templates/partials/DynamicMain.d.ts +5 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert-dialog.d.ts +14 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/calendar.d.ts +4 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/drawer.d.ts +13 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +13 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/stepper.d.ts +18 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/constants/menu.d.ts +2 -0
- package/dist/helpers/axiosGlobal.d.ts +7 -0
- package/dist/helpers/strings.d.ts +1 -0
- package/dist/helpers/template.d.ts +4 -0
- package/dist/helpers/tenant.d.ts +3 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/useI18n.d.ts +5 -0
- package/dist/hooks/useNotification.d.ts +6 -0
- package/dist/i18n/config.d.ts +130 -0
- package/dist/i18n/utils/loadModuleTranslations.d.ts +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/lib/utils.d.ts +2 -0
- package/dist/modules/CoreAuth/components/layouts/partials/AuthDecorator.d.ts +1 -0
- package/dist/modules/CoreAuth/components/layouts/partials/AuthProfileDeleteAccountForm.d.ts +1 -0
- package/dist/modules/CoreAuth/components/layouts/partials/AuthProfileForm.d.ts +1 -0
- package/dist/modules/CoreAuth/components/layouts/partials/AuthProfileUpdatePassForm.d.ts +1 -0
- package/dist/modules/CoreAuth/components/layouts/partials/AuthUserMenu.d.ts +1 -0
- package/dist/modules/CoreAuth/constants/auth.d.ts +5 -0
- package/dist/modules/CoreAuth/hooks/useAuth.d.ts +18 -0
- package/dist/modules/CoreAuth/index.d.ts +1 -0
- package/dist/modules/CoreAuth/services/base.d.ts +23 -0
- package/dist/modules/CoreAuth/stores/authStore.d.ts +22 -0
- package/dist/modules/CoreAuth/types/CoreAuth.d.ts +25 -0
- package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.d.ts +30 -0
- package/dist/modules/CoreCustomization/index.d.ts +1 -0
- package/dist/modules/CoreCustomization/services/base.d.ts +10 -0
- package/dist/modules/CoreCustomization/types/CoreCustomization.d.ts +22 -0
- package/dist/modules/CoreOrder/classes/CoreOrderBuilder.d.ts +23 -0
- package/dist/modules/CoreOrder/index.d.ts +1 -0
- package/dist/modules/CoreOrder/services/base.d.ts +7 -0
- package/dist/modules/CoreOrder/types/CoreOrder.d.ts +41 -0
- package/dist/modules/CoreOrder/types/interfaces/OrderActions.d.ts +14 -0
- package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts +23 -0
- package/dist/modules/CorePayForm/index.d.ts +1 -0
- package/dist/modules/CorePayForm/services/base.d.ts +7 -0
- package/dist/modules/CorePayForm/types/CorePayForm.d.ts +19 -0
- package/dist/modules/CoreProduct/classes/CoreProductBuilder.d.ts +25 -0
- package/dist/modules/CoreProduct/components/layouts/partials/TabHead.d.ts +6 -0
- package/dist/modules/CoreProduct/components/ui/cards/CoreProductCard.d.ts +15 -0
- package/dist/modules/CoreProduct/components/ui/cards/CoreProductCardActions.d.ts +18 -0
- package/dist/modules/CoreProduct/components/ui/cards/CoreProductCartItemAsideCard.d.ts +7 -0
- package/dist/modules/CoreProduct/components/ui/cards/CoreProductCartItemCard.d.ts +8 -0
- package/dist/modules/CoreProduct/components/ui/cards/CoreProductCartSummaryCard.d.ts +7 -0
- package/dist/modules/CoreProduct/components/ui/cards/addons/WarrantyLabel.d.ts +10 -0
- package/dist/modules/CoreProduct/components/ui/cards/skeletons/CoreProductCardSkeleton.d.ts +5 -0
- package/dist/modules/CoreProduct/components/ui/cards/skeletons/CoreProductCartItemCardSkeleton.d.ts +1 -0
- package/dist/modules/CoreProduct/components/ui/carousels/CoreProductImageCarousel.d.ts +8 -0
- package/dist/modules/CoreProduct/components/ui/containers/CoreProductGrid.d.ts +19 -0
- package/dist/modules/CoreProduct/index.d.ts +1 -0
- package/dist/modules/CoreProduct/services/base.d.ts +7 -0
- package/dist/modules/CoreProduct/types/CoreProduct.d.ts +33 -0
- package/dist/modules/CoreProduct/types/CoreProductCategory.d.ts +10 -0
- package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.d.ts +25 -0
- package/dist/modules/CoreShopCart/components/layouts/partials/CoreShopCartAside.d.ts +12 -0
- package/dist/modules/CoreShopCart/components/layouts/partials/CoreShopCartIcon.d.ts +7 -0
- package/dist/modules/CoreShopCart/components/ui/cards/CoreCartItemAsideCard.d.ts +9 -0
- package/dist/modules/CoreShopCart/components/ui/cards/skeletons/CoreCartItemAsideCardSkeleton.d.ts +4 -0
- package/dist/modules/CoreShopCart/components/ui/empty/EmptyCartItems.d.ts +1 -0
- package/dist/modules/CoreShopCart/components/ui/texts/CoreCartHintTitle.d.ts +8 -0
- package/dist/modules/CoreShopCart/components/ui/texts/CoreCartSubtotalText.d.ts +7 -0
- package/dist/modules/CoreShopCart/components/ui/texts/CoreCartSummaryHead.d.ts +6 -0
- package/dist/modules/CoreShopCart/components/ui/texts/CoreCartSummaryText.d.ts +7 -0
- package/dist/modules/CoreShopCart/constants/shopCart.d.ts +6 -0
- package/dist/modules/CoreShopCart/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/services/base.d.ts +16 -0
- package/dist/modules/CoreShopCart/types/CoreShopCart.d.ts +32 -0
- package/dist/modules/CoreShopCart/types/interfaces/CartActions.d.ts +23 -0
- package/dist/modules/index.d.ts +0 -0
- package/dist/services/base.d.ts +38 -0
- package/dist/stores/customizationStore.d.ts +21 -0
- package/dist/types/BaseStore.d.ts +7 -0
- package/dist/types/BaseType.d.ts +5 -0
- package/dist/types/CoreImage.d.ts +5 -0
- package/dist/types/CoreMenu.d.ts +6 -0
- package/dist/types/contracts/BaseApiResponse.d.ts +7 -0
- package/dist/types/contracts/BasePagination.d.ts +9 -0
- package/dist/types/interfaces/BaseImageType.d.ts +7 -0
- package/dist/types/interfaces/BaseSlugType.d.ts +3 -0
- package/dist/types/interfaces/BaseVisibleType.d.ts +3 -0
- package/dist/types/ui/carousel.d.ts +5 -0
- package/dist/types/ui/index.d.ts +8 -0
- package/dist/types/ui/template.d.ts +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
import { Input } from './input';
|
|
4
|
+
import { Separator } from './separator';
|
|
5
|
+
import { TooltipContent } from './tooltip';
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
type SidebarContextProps = {
|
|
8
|
+
state: "expanded" | "collapsed";
|
|
9
|
+
open: boolean;
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
openMobile: boolean;
|
|
12
|
+
setOpenMobile: (open: boolean) => void;
|
|
13
|
+
isMobile: boolean;
|
|
14
|
+
toggleSidebar: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare function useSidebar(): SidebarContextProps;
|
|
17
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
onOpenChange?: (open: boolean) => void;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<"div"> & {
|
|
23
|
+
side?: "left" | "right";
|
|
24
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
25
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
37
|
+
asChild?: boolean;
|
|
38
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<"button"> & {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
46
|
+
variant?: "default" | "outline" | null | undefined;
|
|
47
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
48
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
49
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
isActive?: boolean;
|
|
52
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
53
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<"button"> & {
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
showOnHover?: boolean;
|
|
57
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
|
|
60
|
+
showIcon?: boolean;
|
|
61
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<"a"> & {
|
|
65
|
+
asChild?: boolean;
|
|
66
|
+
size?: "sm" | "md";
|
|
67
|
+
isActive?: boolean;
|
|
68
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
+
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Slider };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface StepProps {
|
|
2
|
+
step: Step;
|
|
3
|
+
isCompleted?: boolean;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
firstStep?: boolean;
|
|
6
|
+
lastStep?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface Step {
|
|
9
|
+
title: string;
|
|
10
|
+
icon: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Step: React.FC<StepProps>;
|
|
13
|
+
interface StepperProps {
|
|
14
|
+
steps: Step[];
|
|
15
|
+
currentStep: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function Stepper({ steps, currentStep }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const api: import('axios').AxiosInstance;
|
|
2
|
+
/**
|
|
3
|
+
* Ensures the CSRF token is fetched once per session
|
|
4
|
+
* Use this function before making API calls that require CSRF protection
|
|
5
|
+
* @returns {Promise} A promise that resolves when the CSRF token is ready
|
|
6
|
+
*/
|
|
7
|
+
export declare const ensureCsrfToken: () => Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function capitalizeFirstLetter(word: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CoreDesignTemplate } from '../types/ui/template';
|
|
2
|
+
export declare const getTemplateComponents: (template?: CoreDesignTemplate, keyComponents?: string[]) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const getTemplateStyles: (template?: CoreDesignTemplate) => {} | undefined;
|
|
4
|
+
export declare const findComponentPath: (template: string, component: string) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsMobile(): boolean;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { default as i18n } from 'i18next';
|
|
2
|
+
export declare const resources: {
|
|
3
|
+
readonly en: {
|
|
4
|
+
readonly translation: {
|
|
5
|
+
readonly modules: {};
|
|
6
|
+
readonly messages: {
|
|
7
|
+
loading: string;
|
|
8
|
+
success: {
|
|
9
|
+
create: string;
|
|
10
|
+
update: string;
|
|
11
|
+
delete: string;
|
|
12
|
+
};
|
|
13
|
+
error: {
|
|
14
|
+
required: string;
|
|
15
|
+
invalid: string;
|
|
16
|
+
notFound: string;
|
|
17
|
+
};
|
|
18
|
+
confirmation: {
|
|
19
|
+
delete: string;
|
|
20
|
+
cancel: string;
|
|
21
|
+
};
|
|
22
|
+
validation: {
|
|
23
|
+
name: string;
|
|
24
|
+
lastname: string;
|
|
25
|
+
email: string;
|
|
26
|
+
password: string;
|
|
27
|
+
passwordConfirmation: string;
|
|
28
|
+
passwordConfirmationNotMatch: string;
|
|
29
|
+
customer_name: string;
|
|
30
|
+
customer_email: string;
|
|
31
|
+
customer_phone: {
|
|
32
|
+
required: string;
|
|
33
|
+
prefix: string;
|
|
34
|
+
length: string;
|
|
35
|
+
};
|
|
36
|
+
customer_address: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly fields: {
|
|
40
|
+
name: string;
|
|
41
|
+
lastname: string;
|
|
42
|
+
email: string;
|
|
43
|
+
password: string;
|
|
44
|
+
password_confirmation: string;
|
|
45
|
+
phone: string;
|
|
46
|
+
address: string;
|
|
47
|
+
note: string;
|
|
48
|
+
customer_name: string;
|
|
49
|
+
customer_email: string;
|
|
50
|
+
customer_phone: string;
|
|
51
|
+
customer_address: string;
|
|
52
|
+
};
|
|
53
|
+
readonly menu: {
|
|
54
|
+
store: string;
|
|
55
|
+
about: string;
|
|
56
|
+
contact: string;
|
|
57
|
+
};
|
|
58
|
+
readonly auth: {
|
|
59
|
+
login: string;
|
|
60
|
+
register: string;
|
|
61
|
+
noAccount: string;
|
|
62
|
+
alreadyHaveAccount: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly es: {
|
|
67
|
+
readonly translation: {
|
|
68
|
+
readonly modules: {};
|
|
69
|
+
readonly messages: {
|
|
70
|
+
loading: string;
|
|
71
|
+
success: {
|
|
72
|
+
create: string;
|
|
73
|
+
update: string;
|
|
74
|
+
delete: string;
|
|
75
|
+
};
|
|
76
|
+
error: {
|
|
77
|
+
required: string;
|
|
78
|
+
invalid: string;
|
|
79
|
+
notFound: string;
|
|
80
|
+
};
|
|
81
|
+
confirmation: {
|
|
82
|
+
delete: string;
|
|
83
|
+
cancel: string;
|
|
84
|
+
};
|
|
85
|
+
validation: {
|
|
86
|
+
name: string;
|
|
87
|
+
lastname: string;
|
|
88
|
+
email: string;
|
|
89
|
+
password: string;
|
|
90
|
+
passwordConfirmation: string;
|
|
91
|
+
passwordConfirmationNotMatch: string;
|
|
92
|
+
customer_name: string;
|
|
93
|
+
customer_email: string;
|
|
94
|
+
customer_phone: {
|
|
95
|
+
required: string;
|
|
96
|
+
prefix: string;
|
|
97
|
+
length: string;
|
|
98
|
+
};
|
|
99
|
+
customer_address: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly fields: {
|
|
103
|
+
name: string;
|
|
104
|
+
lastname: string;
|
|
105
|
+
email: string;
|
|
106
|
+
password: string;
|
|
107
|
+
password_confirmation: string;
|
|
108
|
+
phone: string;
|
|
109
|
+
address: string;
|
|
110
|
+
note: string;
|
|
111
|
+
customer_name: string;
|
|
112
|
+
customer_email: string;
|
|
113
|
+
customer_phone: string;
|
|
114
|
+
customer_address: string;
|
|
115
|
+
};
|
|
116
|
+
readonly menu: {
|
|
117
|
+
store: string;
|
|
118
|
+
about: string;
|
|
119
|
+
contact: string;
|
|
120
|
+
};
|
|
121
|
+
readonly auth: {
|
|
122
|
+
login: string;
|
|
123
|
+
register: string;
|
|
124
|
+
noAccount: string;
|
|
125
|
+
alreadyHaveAccount: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export default i18n;
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AuthDecorator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AuthProfileDeleteAccountForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AuthProfileForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AuthProfileUpdatePassForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AuthUserMenu(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const LOGIN_ROUTE = "/api/login";
|
|
2
|
+
export declare const REGISTER_ROUTE = "/api/register";
|
|
3
|
+
export declare const LOGOUT_ROUTE = "/api/logout";
|
|
4
|
+
export declare const REFRESH_TOKEN_ROUTE = "/api/refresh-token";
|
|
5
|
+
export declare const USER_ROUTE = "/api/user";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CoreLoginCredentials, CoreRegisterCredentials, CoreUser } from '../types/CoreAuth';
|
|
2
|
+
export declare function useAuth(): {
|
|
3
|
+
user: CoreUser | null;
|
|
4
|
+
token: string | null;
|
|
5
|
+
refreshToken: string | null;
|
|
6
|
+
isAuthenticated: boolean;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
error: string | null;
|
|
9
|
+
getUser: () => Promise<any>;
|
|
10
|
+
login: <T extends CoreLoginCredentials>(credentials: T) => Promise<any>;
|
|
11
|
+
register: <T extends CoreRegisterCredentials>(credentials: T) => Promise<any>;
|
|
12
|
+
logout: () => Promise<void>;
|
|
13
|
+
refreshUserToken: () => Promise<any>;
|
|
14
|
+
updateUser: (userData: Partial<CoreUser>) => void;
|
|
15
|
+
setUser: (user: CoreUser | null) => void;
|
|
16
|
+
setError: (error: string | null) => void;
|
|
17
|
+
reset: () => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { CoreLoginCredentials, CoreRegisterCredentials } from '../types/CoreAuth';
|
|
3
|
+
interface CoreAuthRoutes {
|
|
4
|
+
login: string;
|
|
5
|
+
register: string;
|
|
6
|
+
logout: string;
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
user: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Base class that can be extended by concrete services
|
|
12
|
+
*/
|
|
13
|
+
export declare class CoreAuthBaseService {
|
|
14
|
+
private readonly api;
|
|
15
|
+
private readonly routes;
|
|
16
|
+
constructor(routes?: CoreAuthRoutes, api?: AxiosInstance);
|
|
17
|
+
getUser(): Promise<import('axios').AxiosResponse<any, any>>;
|
|
18
|
+
login<T extends CoreLoginCredentials>(credentials: T): Promise<import('axios').AxiosResponse<any, any>>;
|
|
19
|
+
register<T extends CoreRegisterCredentials>(credentials: T): Promise<import('axios').AxiosResponse<any, any>>;
|
|
20
|
+
logout(config?: AxiosRequestConfig): Promise<import('axios').AxiosResponse<any, any>>;
|
|
21
|
+
refreshToken(config?: AxiosRequestConfig): Promise<import('axios').AxiosResponse<any, any>>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CoreAuthStore, CoreUser } from '../types/CoreAuth';
|
|
2
|
+
export declare const useAuthStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreAuthStore<CoreUser>>, "persist"> & {
|
|
3
|
+
persist: {
|
|
4
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreAuthStore<CoreUser>, {
|
|
5
|
+
user: CoreUser | null;
|
|
6
|
+
token: string | null;
|
|
7
|
+
refreshToken: string | null;
|
|
8
|
+
isAuthenticated: boolean;
|
|
9
|
+
}>>) => void;
|
|
10
|
+
clearStorage: () => void;
|
|
11
|
+
rehydrate: () => Promise<void> | void;
|
|
12
|
+
hasHydrated: () => boolean;
|
|
13
|
+
onHydrate: (fn: (state: CoreAuthStore<CoreUser>) => void) => () => void;
|
|
14
|
+
onFinishHydration: (fn: (state: CoreAuthStore<CoreUser>) => void) => () => void;
|
|
15
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreAuthStore<CoreUser>, {
|
|
16
|
+
user: CoreUser | null;
|
|
17
|
+
token: string | null;
|
|
18
|
+
refreshToken: string | null;
|
|
19
|
+
isAuthenticated: boolean;
|
|
20
|
+
}>>;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseStore } from '../../../types/BaseStore';
|
|
2
|
+
import { BaseType } from '../../../types/BaseType';
|
|
3
|
+
export interface CoreUser extends BaseType {
|
|
4
|
+
name?: string;
|
|
5
|
+
lastname?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
address?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CoreLoginCredentials {
|
|
11
|
+
email: string;
|
|
12
|
+
password: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CoreRegisterCredentials extends CoreLoginCredentials {
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CoreAuthStore<T extends CoreUser> extends BaseStore {
|
|
18
|
+
user: T | null;
|
|
19
|
+
token: string | null;
|
|
20
|
+
refreshToken: string | null;
|
|
21
|
+
isAuthenticated: boolean;
|
|
22
|
+
setUser: (user: T | null) => void;
|
|
23
|
+
setToken: (token: string | null) => void;
|
|
24
|
+
setRefreshToken: (token: string | null) => void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CoreBuilder } from '../../../classes/CoreBuilder';
|
|
2
|
+
import { CoreDesignTemplateSettings, CoreDesignTemplateStyles } from '../../../types/ui/template';
|
|
3
|
+
import { CoreCustomizationStore } from '../types/CoreCustomization';
|
|
4
|
+
import { CoreCustomizationBaseService } from '../services/base';
|
|
5
|
+
export declare class CoreCustomizationBuilder implements CoreBuilder {
|
|
6
|
+
protected customizationService: CoreCustomizationBaseService;
|
|
7
|
+
protected initialState: Pick<CoreCustomizationStore, "template" | "components" | "styles" | "settings" | "loading" | "error">;
|
|
8
|
+
constructor(service?: CoreCustomizationBaseService, initialState?: any);
|
|
9
|
+
build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreCustomizationStore>, "persist"> & {
|
|
10
|
+
persist: {
|
|
11
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreCustomizationStore, {
|
|
12
|
+
template: string | null;
|
|
13
|
+
components: string[] | null;
|
|
14
|
+
styles: CoreDesignTemplateStyles[] | null;
|
|
15
|
+
settings: CoreDesignTemplateSettings | null;
|
|
16
|
+
}>>) => void;
|
|
17
|
+
clearStorage: () => void;
|
|
18
|
+
rehydrate: () => Promise<void> | void;
|
|
19
|
+
hasHydrated: () => boolean;
|
|
20
|
+
onHydrate: (fn: (state: CoreCustomizationStore) => void) => () => void;
|
|
21
|
+
onFinishHydration: (fn: (state: CoreCustomizationStore) => void) => () => void;
|
|
22
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreCustomizationStore, {
|
|
23
|
+
template: string | null;
|
|
24
|
+
components: string[] | null;
|
|
25
|
+
styles: CoreDesignTemplateStyles[] | null;
|
|
26
|
+
settings: CoreDesignTemplateSettings | null;
|
|
27
|
+
}>>;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseService } from '../../../services/base';
|
|
2
|
+
import { BaseApiResponse } from '../../../types/contracts/BaseApiResponse';
|
|
3
|
+
import { CoreDesignTemplate } from '../../../types/ui/template';
|
|
4
|
+
/**
|
|
5
|
+
* Base class that can be extended by concrete services
|
|
6
|
+
*/
|
|
7
|
+
export declare class CoreCustomizationBaseService extends BaseService {
|
|
8
|
+
constructor();
|
|
9
|
+
fetchTemplate(): Promise<import('axios').AxiosResponse<BaseApiResponse<CoreDesignTemplate>, any>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseType } from '../../../types/BaseType';
|
|
2
|
+
import { BaseStore } from '../../../types/BaseStore';
|
|
3
|
+
import { CoreDesignTemplate, CoreDesignTemplateSettings, CoreDesignTemplateStyles } from '../../../types/ui/template';
|
|
4
|
+
/**
|
|
5
|
+
* CoreCustomization base type
|
|
6
|
+
*/
|
|
7
|
+
export interface CoreCustomization extends BaseType {
|
|
8
|
+
template: string | null;
|
|
9
|
+
styles: CoreDesignTemplateStyles[] | null;
|
|
10
|
+
settings: CoreDesignTemplateSettings | null;
|
|
11
|
+
}
|
|
12
|
+
export interface CoreCustomizationStore extends BaseStore {
|
|
13
|
+
template: string | null;
|
|
14
|
+
components: string[] | null;
|
|
15
|
+
styles: CoreDesignTemplateStyles[] | null;
|
|
16
|
+
settings: CoreDesignTemplateSettings | null;
|
|
17
|
+
fetchTemplate: () => Promise<CoreDesignTemplate>;
|
|
18
|
+
setTemplate: (template: string) => void;
|
|
19
|
+
setComponents: (components: string[]) => void;
|
|
20
|
+
setStyles: (styles: CoreDesignTemplateStyles[]) => void;
|
|
21
|
+
setSettings: (settings: CoreDesignTemplateSettings) => void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CoreBuilder } from '../../../classes/CoreBuilder';
|
|
2
|
+
import { CoreOrderBaseService } from '../services/base';
|
|
3
|
+
import { CoreOrder, CoreOrderStore } from '../types/CoreOrder';
|
|
4
|
+
export declare class CoreOrderBuilder<T> implements CoreBuilder {
|
|
5
|
+
protected orderService: CoreOrderBaseService;
|
|
6
|
+
protected initialState: Pick<CoreOrderStore<T>, 'order'>;
|
|
7
|
+
constructor(orderService?: CoreOrderBaseService, initialState?: Pick<CoreOrderStore<T>, 'order'>);
|
|
8
|
+
build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreOrderStore<T>>, "persist"> & {
|
|
9
|
+
persist: {
|
|
10
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreOrderStore<T>, {
|
|
11
|
+
order: CoreOrder<T>;
|
|
12
|
+
}>>) => void;
|
|
13
|
+
clearStorage: () => void;
|
|
14
|
+
rehydrate: () => Promise<void> | void;
|
|
15
|
+
hasHydrated: () => boolean;
|
|
16
|
+
onHydrate: (fn: (state: CoreOrderStore<T>) => void) => () => void;
|
|
17
|
+
onFinishHydration: (fn: (state: CoreOrderStore<T>) => void) => () => void;
|
|
18
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreOrderStore<T>, {
|
|
19
|
+
order: CoreOrder<T>;
|
|
20
|
+
}>>;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseType } from '../../../types/BaseType';
|
|
2
|
+
import { IOrderActions } from './interfaces/OrderActions';
|
|
3
|
+
/**
|
|
4
|
+
* CoreOrder base type
|
|
5
|
+
*/
|
|
6
|
+
export interface CoreOrder<T> extends BaseType {
|
|
7
|
+
customer_name: string;
|
|
8
|
+
customer_email: string;
|
|
9
|
+
customer_phone: string;
|
|
10
|
+
customer_address: string;
|
|
11
|
+
note?: string;
|
|
12
|
+
order_number: string;
|
|
13
|
+
userable_type: string;
|
|
14
|
+
userable_id: number;
|
|
15
|
+
items_subtotal: number;
|
|
16
|
+
current_base_currency: string;
|
|
17
|
+
currency: string;
|
|
18
|
+
exchange_rate: number;
|
|
19
|
+
status: string;
|
|
20
|
+
base_total_amount_in_cents: number;
|
|
21
|
+
base_total_amount_formatted: string;
|
|
22
|
+
total_amount_in_cents: number;
|
|
23
|
+
total_amount_formatted: string;
|
|
24
|
+
status_name: string;
|
|
25
|
+
allowed_next_statuses: {
|
|
26
|
+
identifier: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}[];
|
|
29
|
+
products: T[];
|
|
30
|
+
}
|
|
31
|
+
export interface CoreOrderStore<T> extends IOrderActions<T> {
|
|
32
|
+
order: CoreOrder<T>;
|
|
33
|
+
}
|
|
34
|
+
export interface CoreOrderForm extends BaseType {
|
|
35
|
+
customer_name: string;
|
|
36
|
+
customer_email: string;
|
|
37
|
+
customer_phone: string;
|
|
38
|
+
customer_address: string;
|
|
39
|
+
note?: string;
|
|
40
|
+
payform_id?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { BaseApiResponse } from '../../../../types/contracts/BaseApiResponse';
|
|
3
|
+
import { CoreOrderForm, CoreOrder } from '../CoreOrder';
|
|
4
|
+
export interface IOrderActions<T> {
|
|
5
|
+
createOrder: (order: CoreOrderForm) => Promise<BaseApiResponse<CreateOrderResponse<CoreOrder<T>>>>;
|
|
6
|
+
fetchOrder: (order_id: string | number) => Promise<BaseApiResponse<CoreOrder<T>>>;
|
|
7
|
+
getOrder: () => CoreOrder<T>;
|
|
8
|
+
}
|
|
9
|
+
export interface IOrderActionsService<T> {
|
|
10
|
+
createOrder: (order: CoreOrderForm) => Promise<AxiosResponse<BaseApiResponse<CreateOrderResponse<CoreOrder<T>>>>>;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateOrderResponse<T> {
|
|
13
|
+
order: T;
|
|
14
|
+
}
|