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,32 @@
|
|
|
1
|
+
import { BaseType } from '../../../types/BaseType';
|
|
2
|
+
import { ICartActions } from './interfaces/CartActions';
|
|
3
|
+
/**
|
|
4
|
+
* CoreShopCart base type
|
|
5
|
+
*/
|
|
6
|
+
export interface CoreShopCart<T> {
|
|
7
|
+
items: CoreCartItem<T>[];
|
|
8
|
+
subtotal: number;
|
|
9
|
+
total: number;
|
|
10
|
+
itemized_subtotals: CoreCartItemSummary[];
|
|
11
|
+
}
|
|
12
|
+
export interface CoreShopCartStore<T> extends ICartActions<T> {
|
|
13
|
+
cart: CoreShopCart<T>;
|
|
14
|
+
cartItems: CoreCartItem<T>[];
|
|
15
|
+
}
|
|
16
|
+
export interface CoreCartItem<T> extends BaseType {
|
|
17
|
+
owner_type: string;
|
|
18
|
+
owner_id: string | number;
|
|
19
|
+
session_id: string;
|
|
20
|
+
productible_type: string;
|
|
21
|
+
productible_id: string | number;
|
|
22
|
+
quantity: number;
|
|
23
|
+
productible: T;
|
|
24
|
+
}
|
|
25
|
+
export interface CoreCartItemSummary {
|
|
26
|
+
item_id: string | number;
|
|
27
|
+
product_id: string | number;
|
|
28
|
+
product_name: string;
|
|
29
|
+
quantity: number;
|
|
30
|
+
unit_price: number;
|
|
31
|
+
subtotal: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { CoreShopCart, CoreCartItem } from '../CoreShopCart';
|
|
3
|
+
import { BaseApiResponse } from '../../../../types/contracts/BaseApiResponse';
|
|
4
|
+
export interface ICartActions<T> {
|
|
5
|
+
addToCart: (product_id: string | number, quantity: number) => void;
|
|
6
|
+
removeFromCart: (product_id: string | number) => void;
|
|
7
|
+
removeItemFromCart: (product_id: string | number) => void;
|
|
8
|
+
clearCart: () => void;
|
|
9
|
+
getCart: () => CoreShopCart<T>;
|
|
10
|
+
setCart: (cart: CoreShopCart<T>) => void;
|
|
11
|
+
getCartItems: () => CoreCartItem<T>[];
|
|
12
|
+
setCartItems: (cartItems: CoreCartItem<T>[]) => void;
|
|
13
|
+
fetchCart: () => Promise<BaseApiResponse<CoreShopCart<T>>>;
|
|
14
|
+
fetchCartItems: () => Promise<BaseApiResponse<CoreCartItem<T>[]>>;
|
|
15
|
+
}
|
|
16
|
+
export interface ICartActionsService<T> {
|
|
17
|
+
addToCart: (product_id: string | number, quantity: number) => Promise<AxiosResponse<BaseApiResponse<CoreCartItem<T>>>>;
|
|
18
|
+
removeFromCart: (product_id: string | number) => void;
|
|
19
|
+
removeItemFromCart: (product_id: string | number) => void;
|
|
20
|
+
clearCart: () => void;
|
|
21
|
+
getCart: () => Promise<AxiosResponse<BaseApiResponse<CoreShopCart<T>>>>;
|
|
22
|
+
getCartItems: () => Promise<AxiosResponse<BaseApiResponse<CoreCartItem<T>[]>>>;
|
|
23
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
import { BaseApiResponse } from '../types/contracts/BaseApiResponse';
|
|
3
|
+
export interface ICrudService {
|
|
4
|
+
getAll: <T>(params?: Record<string, any>) => Promise<AxiosResponse<T>>;
|
|
5
|
+
getById: <T>(idOrSlug: number | string) => Promise<AxiosResponse<T>>;
|
|
6
|
+
create: <T, TData>(data: TData) => Promise<AxiosResponse<BaseApiResponse<T>>>;
|
|
7
|
+
update: <T, TData>(idOrSlug: number | string, data: TData) => Promise<AxiosResponse<T>>;
|
|
8
|
+
deleteById: <T>(idOrSlug: number | string) => Promise<AxiosResponse<T>>;
|
|
9
|
+
}
|
|
10
|
+
interface CrudResource {
|
|
11
|
+
getAll: string;
|
|
12
|
+
get: string;
|
|
13
|
+
create: string;
|
|
14
|
+
update: string;
|
|
15
|
+
delete: string;
|
|
16
|
+
}
|
|
17
|
+
type CrudResourceProperty = keyof CrudResource;
|
|
18
|
+
export declare class BaseService implements ICrudService {
|
|
19
|
+
protected resource: string;
|
|
20
|
+
protected api: AxiosInstance;
|
|
21
|
+
protected apiPrefix: string;
|
|
22
|
+
protected crudResource: CrudResource;
|
|
23
|
+
constructor(resource: string, api?: AxiosInstance);
|
|
24
|
+
setCrudResourceProperty: (property: CrudResourceProperty, value: string) => void;
|
|
25
|
+
protected buildCrudResource: () => {
|
|
26
|
+
getAll: string;
|
|
27
|
+
get: string;
|
|
28
|
+
create: string;
|
|
29
|
+
update: string;
|
|
30
|
+
delete: string;
|
|
31
|
+
};
|
|
32
|
+
getAll: <T>(params?: Record<string, any>) => Promise<AxiosResponse<T>>;
|
|
33
|
+
getById: <T>(idOrSlug: number | string) => Promise<AxiosResponse<T>>;
|
|
34
|
+
create: <T, TData>(data: TData) => Promise<AxiosResponse<BaseApiResponse<T>>>;
|
|
35
|
+
update: <T, TData>(idOrSlug: number | string, data: TData) => Promise<AxiosResponse<T>>;
|
|
36
|
+
deleteById: <T>(idOrSlug: number | string) => Promise<AxiosResponse<T>>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CoreDesignTemplate {
|
|
2
|
+
template: string;
|
|
3
|
+
styles: CoreDesignTemplateStyles[];
|
|
4
|
+
settings: CoreDesignTemplateSettings;
|
|
5
|
+
}
|
|
6
|
+
export interface CoreDesignTemplateStyles {
|
|
7
|
+
key: string;
|
|
8
|
+
selected: string;
|
|
9
|
+
colorProperties: CoreDesignTemplateColorProperties[];
|
|
10
|
+
}
|
|
11
|
+
export interface CoreDesignTemplateColorProperties {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CoreDesignTemplateSettings {
|
|
17
|
+
name: string;
|
|
18
|
+
logo: string;
|
|
19
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ingeniuscliq-core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "IngeniusCliq Core UI y lógica compartida",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"./styles.css": "./dist/styles.css"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"create:module": "node core/commands/create-module.js",
|
|
24
|
+
"create:core-module": "node core/commands/create-core-module.js",
|
|
25
|
+
"rollback:core-module": "node core/commands/rollback-core-module.js",
|
|
26
|
+
"rollback:module": "node core/commands/rollback-module.js"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": ">=18.0.0",
|
|
30
|
+
"react-dom": ">=18.0.0",
|
|
31
|
+
"react-i18next": ">=15.0.0",
|
|
32
|
+
"i18next": ">=23.0.0",
|
|
33
|
+
"@tanstack/react-router": ">=1.130.0",
|
|
34
|
+
"@tanstack/react-query": "5.85.3"
|
|
35
|
+
},
|
|
36
|
+
"peerDependenciesMeta": {
|
|
37
|
+
"react-i18next": {
|
|
38
|
+
"optional": false
|
|
39
|
+
},
|
|
40
|
+
"i18next": {
|
|
41
|
+
"optional": false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@types/node": "24.2.1",
|
|
46
|
+
"@hookform/resolvers": "5.2.1",
|
|
47
|
+
"axios": "1.11.0",
|
|
48
|
+
"class-variance-authority": "0.7.1",
|
|
49
|
+
"clsx": "2.1.1",
|
|
50
|
+
"zod": "4.0.17",
|
|
51
|
+
"lucide-react": "0.539.0",
|
|
52
|
+
"tailwind-merge": "3.3.1",
|
|
53
|
+
"vaul": "1.1.2"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@radix-ui/react-accordion": "1.2.12",
|
|
57
|
+
"@radix-ui/react-alert-dialog": "1.1.15",
|
|
58
|
+
"@radix-ui/react-avatar": "1.1.10",
|
|
59
|
+
"@radix-ui/react-checkbox": "1.3.3",
|
|
60
|
+
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
61
|
+
"@radix-ui/react-label": "2.1.7",
|
|
62
|
+
"@radix-ui/react-navigation-menu": "1.2.14",
|
|
63
|
+
"@radix-ui/react-popover": "1.1.15",
|
|
64
|
+
"@radix-ui/react-radio-group": "1.3.8",
|
|
65
|
+
"@radix-ui/react-select": "2.2.6",
|
|
66
|
+
"@radix-ui/react-separator": "1.1.7",
|
|
67
|
+
"@radix-ui/react-slider": "1.3.6",
|
|
68
|
+
"@radix-ui/react-switch": "1.2.6",
|
|
69
|
+
"@radix-ui/react-tabs": "1.1.13",
|
|
70
|
+
"@radix-ui/react-tooltip": "1.2.8",
|
|
71
|
+
"react-day-picker": "9.8.1",
|
|
72
|
+
"embla-carousel-react": "8.6.0",
|
|
73
|
+
"next-themes": "0.4.6",
|
|
74
|
+
"react-hook-form": "7.62.0",
|
|
75
|
+
"sonner": "2.0.7",
|
|
76
|
+
"zustand": "5.0.7",
|
|
77
|
+
"react": ">=18.0.0",
|
|
78
|
+
"react-dom": ">=18.0.0",
|
|
79
|
+
"react-i18next": ">=15.0.0",
|
|
80
|
+
"i18next": ">=23.0.0",
|
|
81
|
+
"@tanstack/react-router": ">=1.130.0",
|
|
82
|
+
"@tanstack/react-query": "5.85.3",
|
|
83
|
+
"vite-tsconfig-paths": "5.1.4",
|
|
84
|
+
"@types/react": "19.1.10",
|
|
85
|
+
"@vitejs/plugin-react": "4.7.0",
|
|
86
|
+
"vite": "6.3.5",
|
|
87
|
+
"vite-plugin-dts": "4.5.4",
|
|
88
|
+
"typescript": "5.9.2"
|
|
89
|
+
}
|
|
90
|
+
}
|