ingeniuscliq-core 0.0.1
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/classes/CoreBuilder.d.ts +3 -0
- package/dist/components/config.d.ts +1 -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/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/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.cjs +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +281 -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 +19 -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/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 +90 -0
|
@@ -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.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";const ee=require("react");var T={exports:{}},_={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var $;function re(){if($)return _;$=1;var l=Symbol.for("react.transitional.element"),b=Symbol.for("react.fragment");function f(d,a,s){var m=null;if(s!==void 0&&(m=""+s),a.key!==void 0&&(m=""+a.key),"key"in a){s={};for(var E in a)E!=="key"&&(s[E]=a[E])}else s=a;return a=s.ref,{$$typeof:l,type:d,key:m,ref:a!==void 0?a:null,props:s}}return _.Fragment=b,_.jsx=f,_.jsxs=f,_}var R={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var F;function te(){return F||(F=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case q:return"Profiler";case U:return"StrictMode";case G:return"Suspense";case X:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case W:return"Portal";case z:return(e.displayName||"Context")+".Provider";case J:return(e._context.displayName||"Context")+".Consumer";case V:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case h:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function b(e){return""+e}function f(e){try{b(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),b(e)}}function d(e){if(e===p)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===h)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function a(){var e=k.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function m(e){if(x.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function E(e,r){function t(){y||(y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function L(){var e=l(this.type);return N[e]||(N[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function M(e,r,t,n,c,u,A,S){return t=u.ref,e={$$typeof:g,type:e,key:r,props:u,_owner:c},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:L}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function w(e,r,t,n,c,u,A,S){var o=r.children;if(o!==void 0)if(n)if(Q(o)){for(n=0;n<o.length;n++)j(o[n]);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(o);if(x.call(r,"key")){o=l(e);var i=Object.keys(r).filter(function(K){return K!=="key"});n=0<i.length?"{key: someKey, "+i.join(": ..., ")+": ...}":"{key: someKey}",I[o+n]||(i=0<i.length?"{"+i.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,n,o,i,o),I[o+n]=!0)}if(o=null,t!==void 0&&(f(t),o=""+t),m(r)&&(f(r.key),o=""+r.key),"key"in r){t={};for(var P in r)P!=="key"&&(t[P]=r[P])}else t=r;return o&&E(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),M(e,o,u,c,a(),t,A,S)}function j(e){typeof e=="object"&&e!==null&&e.$$typeof===g&&e._store&&(e._store.validated=1)}var v=ee,g=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),z=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),k=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x=Object.prototype.hasOwnProperty,Q=Array.isArray,O=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var y,N={},C=v.react_stack_bottom_frame.bind(v,s)(),Y=O(d(s)),I={};R.Fragment=p,R.jsx=function(e,r,t,n,c){var u=1e4>k.recentlyCreatedOwnerStacks++;return w(e,r,t,!1,n,c,u?Error("react-stack-top-frame"):C,u?O(d(e)):Y)},R.jsxs=function(e,r,t,n,c){var u=1e4>k.recentlyCreatedOwnerStacks++;return w(e,r,t,!0,n,c,u?Error("react-stack-top-frame"):C,u?O(d(e)):Y)}})()),R}var D;function ne(){return D||(D=1,process.env.NODE_ENV==="production"?T.exports=re():T.exports=te()),T.exports}ne();
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/layouts/CoreBaseLayout';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import ee from "react";
|
|
2
|
+
var T = { exports: {} }, _ = {};
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var $;
|
|
13
|
+
function re() {
|
|
14
|
+
if ($) return _;
|
|
15
|
+
$ = 1;
|
|
16
|
+
var l = Symbol.for("react.transitional.element"), b = Symbol.for("react.fragment");
|
|
17
|
+
function f(d, a, s) {
|
|
18
|
+
var m = null;
|
|
19
|
+
if (s !== void 0 && (m = "" + s), a.key !== void 0 && (m = "" + a.key), "key" in a) {
|
|
20
|
+
s = {};
|
|
21
|
+
for (var E in a)
|
|
22
|
+
E !== "key" && (s[E] = a[E]);
|
|
23
|
+
} else s = a;
|
|
24
|
+
return a = s.ref, {
|
|
25
|
+
$$typeof: l,
|
|
26
|
+
type: d,
|
|
27
|
+
key: m,
|
|
28
|
+
ref: a !== void 0 ? a : null,
|
|
29
|
+
props: s
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return _.Fragment = b, _.jsx = f, _.jsxs = f, _;
|
|
33
|
+
}
|
|
34
|
+
var R = {};
|
|
35
|
+
/**
|
|
36
|
+
* @license React
|
|
37
|
+
* react-jsx-runtime.development.js
|
|
38
|
+
*
|
|
39
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the MIT license found in the
|
|
42
|
+
* LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
var F;
|
|
45
|
+
function te() {
|
|
46
|
+
return F || (F = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
|
+
function l(e) {
|
|
48
|
+
if (e == null) return null;
|
|
49
|
+
if (typeof e == "function")
|
|
50
|
+
return e.$$typeof === Z ? null : e.displayName || e.name || null;
|
|
51
|
+
if (typeof e == "string") return e;
|
|
52
|
+
switch (e) {
|
|
53
|
+
case p:
|
|
54
|
+
return "Fragment";
|
|
55
|
+
case q:
|
|
56
|
+
return "Profiler";
|
|
57
|
+
case U:
|
|
58
|
+
return "StrictMode";
|
|
59
|
+
case G:
|
|
60
|
+
return "Suspense";
|
|
61
|
+
case X:
|
|
62
|
+
return "SuspenseList";
|
|
63
|
+
case H:
|
|
64
|
+
return "Activity";
|
|
65
|
+
}
|
|
66
|
+
if (typeof e == "object")
|
|
67
|
+
switch (typeof e.tag == "number" && console.error(
|
|
68
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
+
), e.$$typeof) {
|
|
70
|
+
case W:
|
|
71
|
+
return "Portal";
|
|
72
|
+
case z:
|
|
73
|
+
return (e.displayName || "Context") + ".Provider";
|
|
74
|
+
case J:
|
|
75
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case V:
|
|
77
|
+
var r = e.render;
|
|
78
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
|
+
case B:
|
|
80
|
+
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
81
|
+
case h:
|
|
82
|
+
r = e._payload, e = e._init;
|
|
83
|
+
try {
|
|
84
|
+
return l(e(r));
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
function b(e) {
|
|
91
|
+
return "" + e;
|
|
92
|
+
}
|
|
93
|
+
function f(e) {
|
|
94
|
+
try {
|
|
95
|
+
b(e);
|
|
96
|
+
var r = !1;
|
|
97
|
+
} catch {
|
|
98
|
+
r = !0;
|
|
99
|
+
}
|
|
100
|
+
if (r) {
|
|
101
|
+
r = console;
|
|
102
|
+
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
103
|
+
return t.call(
|
|
104
|
+
r,
|
|
105
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
+
n
|
|
107
|
+
), b(e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function d(e) {
|
|
111
|
+
if (e === p) return "<>";
|
|
112
|
+
if (typeof e == "object" && e !== null && e.$$typeof === h)
|
|
113
|
+
return "<...>";
|
|
114
|
+
try {
|
|
115
|
+
var r = l(e);
|
|
116
|
+
return r ? "<" + r + ">" : "<...>";
|
|
117
|
+
} catch {
|
|
118
|
+
return "<...>";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function a() {
|
|
122
|
+
var e = k.A;
|
|
123
|
+
return e === null ? null : e.getOwner();
|
|
124
|
+
}
|
|
125
|
+
function s() {
|
|
126
|
+
return Error("react-stack-top-frame");
|
|
127
|
+
}
|
|
128
|
+
function m(e) {
|
|
129
|
+
if (x.call(e, "key")) {
|
|
130
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
131
|
+
if (r && r.isReactWarning) return !1;
|
|
132
|
+
}
|
|
133
|
+
return e.key !== void 0;
|
|
134
|
+
}
|
|
135
|
+
function E(e, r) {
|
|
136
|
+
function t() {
|
|
137
|
+
y || (y = !0, console.error(
|
|
138
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
|
+
r
|
|
140
|
+
));
|
|
141
|
+
}
|
|
142
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
143
|
+
get: t,
|
|
144
|
+
configurable: !0
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function L() {
|
|
148
|
+
var e = l(this.type);
|
|
149
|
+
return N[e] || (N[e] = !0, console.error(
|
|
150
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
152
|
+
}
|
|
153
|
+
function M(e, r, t, n, c, u, A, S) {
|
|
154
|
+
return t = u.ref, e = {
|
|
155
|
+
$$typeof: g,
|
|
156
|
+
type: e,
|
|
157
|
+
key: r,
|
|
158
|
+
props: u,
|
|
159
|
+
_owner: c
|
|
160
|
+
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
161
|
+
enumerable: !1,
|
|
162
|
+
get: L
|
|
163
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
164
|
+
configurable: !1,
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
writable: !0,
|
|
167
|
+
value: 0
|
|
168
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
169
|
+
configurable: !1,
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: null
|
|
173
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
174
|
+
configurable: !1,
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: A
|
|
178
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
179
|
+
configurable: !1,
|
|
180
|
+
enumerable: !1,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: S
|
|
183
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
184
|
+
}
|
|
185
|
+
function w(e, r, t, n, c, u, A, S) {
|
|
186
|
+
var o = r.children;
|
|
187
|
+
if (o !== void 0)
|
|
188
|
+
if (n)
|
|
189
|
+
if (Q(o)) {
|
|
190
|
+
for (n = 0; n < o.length; n++)
|
|
191
|
+
j(o[n]);
|
|
192
|
+
Object.freeze && Object.freeze(o);
|
|
193
|
+
} else
|
|
194
|
+
console.error(
|
|
195
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
|
+
);
|
|
197
|
+
else j(o);
|
|
198
|
+
if (x.call(r, "key")) {
|
|
199
|
+
o = l(e);
|
|
200
|
+
var i = Object.keys(r).filter(function(K) {
|
|
201
|
+
return K !== "key";
|
|
202
|
+
});
|
|
203
|
+
n = 0 < i.length ? "{key: someKey, " + i.join(": ..., ") + ": ...}" : "{key: someKey}", I[o + n] || (i = 0 < i.length ? "{" + i.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
205
|
+
let props = %s;
|
|
206
|
+
<%s {...props} />
|
|
207
|
+
React keys must be passed directly to JSX without using spread:
|
|
208
|
+
let props = %s;
|
|
209
|
+
<%s key={someKey} {...props} />`,
|
|
210
|
+
n,
|
|
211
|
+
o,
|
|
212
|
+
i,
|
|
213
|
+
o
|
|
214
|
+
), I[o + n] = !0);
|
|
215
|
+
}
|
|
216
|
+
if (o = null, t !== void 0 && (f(t), o = "" + t), m(r) && (f(r.key), o = "" + r.key), "key" in r) {
|
|
217
|
+
t = {};
|
|
218
|
+
for (var P in r)
|
|
219
|
+
P !== "key" && (t[P] = r[P]);
|
|
220
|
+
} else t = r;
|
|
221
|
+
return o && E(
|
|
222
|
+
t,
|
|
223
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
224
|
+
), M(
|
|
225
|
+
e,
|
|
226
|
+
o,
|
|
227
|
+
u,
|
|
228
|
+
c,
|
|
229
|
+
a(),
|
|
230
|
+
t,
|
|
231
|
+
A,
|
|
232
|
+
S
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function j(e) {
|
|
236
|
+
typeof e == "object" && e !== null && e.$$typeof === g && e._store && (e._store.validated = 1);
|
|
237
|
+
}
|
|
238
|
+
var v = ee, g = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), z = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), k = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
239
|
+
return null;
|
|
240
|
+
};
|
|
241
|
+
v = {
|
|
242
|
+
react_stack_bottom_frame: function(e) {
|
|
243
|
+
return e();
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var y, N = {}, C = v.react_stack_bottom_frame.bind(
|
|
247
|
+
v,
|
|
248
|
+
s
|
|
249
|
+
)(), Y = O(d(s)), I = {};
|
|
250
|
+
R.Fragment = p, R.jsx = function(e, r, t, n, c) {
|
|
251
|
+
var u = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
252
|
+
return w(
|
|
253
|
+
e,
|
|
254
|
+
r,
|
|
255
|
+
t,
|
|
256
|
+
!1,
|
|
257
|
+
n,
|
|
258
|
+
c,
|
|
259
|
+
u ? Error("react-stack-top-frame") : C,
|
|
260
|
+
u ? O(d(e)) : Y
|
|
261
|
+
);
|
|
262
|
+
}, R.jsxs = function(e, r, t, n, c) {
|
|
263
|
+
var u = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return w(
|
|
265
|
+
e,
|
|
266
|
+
r,
|
|
267
|
+
t,
|
|
268
|
+
!0,
|
|
269
|
+
n,
|
|
270
|
+
c,
|
|
271
|
+
u ? Error("react-stack-top-frame") : C,
|
|
272
|
+
u ? O(d(e)) : Y
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
})()), R;
|
|
276
|
+
}
|
|
277
|
+
var D;
|
|
278
|
+
function ne() {
|
|
279
|
+
return D || (D = 1, process.env.NODE_ENV === "production" ? T.exports = re() : T.exports = te()), T.exports;
|
|
280
|
+
}
|
|
281
|
+
ne();
|
|
@@ -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 {};
|