limbo-component 1.0.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -10
- package/LICENSE +13 -32
- package/README.md +63 -33
- package/dist/limbo.cjs.js +5 -5
- package/dist/limbo.cjs.map +1 -1
- package/dist/limbo.css +1 -1
- package/dist/limbo.es.js +2501 -788
- package/dist/limbo.es.map +1 -1
- package/dist/limbo.min.js +6 -6
- package/dist/limbo.min.js.map +1 -1
- package/dist/limbo.umd.js +8 -8
- package/dist/limbo.umd.js.map +1 -1
- package/dist/types/App.d.ts +2 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/components/CropperView.d.ts +2 -3
- package/dist/types/components/CropperView.d.ts.map +1 -1
- package/dist/types/components/Gallery.d.ts +1 -0
- package/dist/types/components/Gallery.d.ts.map +1 -1
- package/dist/types/components/ImageCard.d.ts +1 -0
- package/dist/types/components/ImageCard.d.ts.map +1 -1
- package/dist/types/components/ImageVariantsModal.d.ts +17 -0
- package/dist/types/components/ImageVariantsModal.d.ts.map +1 -0
- package/dist/types/components/Pagination.d.ts +7 -0
- package/dist/types/components/Pagination.d.ts.map +1 -0
- package/dist/types/components/TabAI.d.ts +2 -2
- package/dist/types/components/TabAI.d.ts.map +1 -1
- package/dist/types/components/TabPortals.d.ts +2 -2
- package/dist/types/components/TabPortals.d.ts.map +1 -1
- package/dist/types/components/TabStock.d.ts +1 -2
- package/dist/types/components/TabStock.d.ts.map +1 -1
- package/dist/types/components/TokenExpiredModal.d.ts +9 -0
- package/dist/types/components/TokenExpiredModal.d.ts.map +1 -0
- package/dist/types/components/UploadForm.d.ts.map +1 -1
- package/dist/types/core/LimboCore.d.ts +4 -0
- package/dist/types/core/LimboCore.d.ts.map +1 -1
- package/dist/types/hooks/useAiServices.d.ts +1 -1
- package/dist/types/hooks/useAiServices.d.ts.map +1 -1
- package/dist/types/hooks/useCreateVariant.d.ts +13 -0
- package/dist/types/hooks/useCreateVariant.d.ts.map +1 -0
- package/dist/types/hooks/useExternalImages.d.ts +9 -1
- package/dist/types/hooks/useExternalImages.d.ts.map +1 -1
- package/dist/types/hooks/useImageParams.d.ts +1 -1
- package/dist/types/hooks/useImageParams.d.ts.map +1 -1
- package/dist/types/hooks/useImageVariants.d.ts +20 -0
- package/dist/types/hooks/useImageVariants.d.ts.map +1 -0
- package/dist/types/hooks/useImages.d.ts +1 -0
- package/dist/types/hooks/useImages.d.ts.map +1 -1
- package/dist/types/hooks/useIsAllowedAll.d.ts.map +1 -1
- package/dist/types/hooks/usePortalSources.d.ts +1 -1
- package/dist/types/hooks/usePortalSources.d.ts.map +1 -1
- package/dist/types/hooks/useStockServices.d.ts +1 -1
- package/dist/types/hooks/useStockServices.d.ts.map +1 -1
- package/dist/types/hooks/useTokenExpiration.d.ts +10 -0
- package/dist/types/hooks/useTokenExpiration.d.ts.map +1 -0
- package/dist/types/services/aiApi.d.ts +4 -2
- package/dist/types/services/aiApi.d.ts.map +1 -1
- package/dist/types/services/apiClient.d.ts +22 -12
- package/dist/types/services/apiClient.d.ts.map +1 -1
- package/dist/types/services/assetsApi.d.ts +13 -6
- package/dist/types/services/assetsApi.d.ts.map +1 -1
- package/dist/types/services/imageParamsApi.d.ts +1 -1
- package/dist/types/services/imageParamsApi.d.ts.map +1 -1
- package/dist/types/services/portalsApi.d.ts +2 -2
- package/dist/types/services/portalsApi.d.ts.map +1 -1
- package/dist/types/services/responseAdapters.d.ts +6 -6
- package/dist/types/services/responseAdapters.d.ts.map +1 -1
- package/dist/types/services/stockApi.d.ts +3 -3
- package/dist/types/services/stockApi.d.ts.map +1 -1
- package/package.json +11 -3
- package/dist/types/services/authService.d.ts +0 -65
- package/dist/types/services/authService.d.ts.map +0 -1
package/dist/types/App.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function App({ apiKey, prod, url, features, modeUI, ui, callbacks, instanceId, }: {
|
|
1
|
+
export default function App({ apiKey, prod, url, features, modeUI, ui, callbacks, instanceId, itemsPerPage, }: {
|
|
2
2
|
apiKey: any;
|
|
3
3
|
prod?: boolean;
|
|
4
4
|
url?: boolean;
|
|
@@ -14,5 +14,6 @@ export default function App({ apiKey, prod, url, features, modeUI, ui, callbacks
|
|
|
14
14
|
};
|
|
15
15
|
callbacks?: {};
|
|
16
16
|
instanceId?: any;
|
|
17
|
+
itemsPerPage?: number;
|
|
17
18
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
//# sourceMappingURL=App.d.ts.map
|
package/dist/types/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.jsx"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;4CAsTC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export default function CropperView({ image, onSave, onCancel, onDelete, deleting,
|
|
1
|
+
export default function CropperView({ image, onSave, onCancel, onDelete, deleting, onVariantCreated, }: {
|
|
2
2
|
image: any;
|
|
3
3
|
onSave: any;
|
|
4
4
|
onCancel: any;
|
|
5
5
|
onDelete: any;
|
|
6
6
|
deleting?: boolean;
|
|
7
|
-
|
|
8
|
-
prod?: boolean;
|
|
7
|
+
onVariantCreated?: any;
|
|
9
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
//# sourceMappingURL=CropperView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CropperView.d.ts","sourceRoot":"","sources":["../../../src/components/CropperView.jsx"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"CropperView.d.ts","sourceRoot":"","sources":["../../../src/components/CropperView.jsx"],"names":[],"mappings":"AAMA;;;;;;;4CA4tCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gallery.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery.jsx"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"Gallery.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery.jsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;4CAoMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCard.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCard.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImageCard.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCard.jsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;4CAycC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default function ImageVariantsModal({ image, isOpen, onClose, onSelect, onDelete, onCrop, onVariantDeleted, allowedActions, }: {
|
|
2
|
+
image: any;
|
|
3
|
+
isOpen: any;
|
|
4
|
+
onClose: any;
|
|
5
|
+
onSelect: any;
|
|
6
|
+
onDelete: any;
|
|
7
|
+
onCrop: any;
|
|
8
|
+
onVariantDeleted: any;
|
|
9
|
+
allowedActions?: {
|
|
10
|
+
select: boolean;
|
|
11
|
+
download: boolean;
|
|
12
|
+
copy: boolean;
|
|
13
|
+
delete: boolean;
|
|
14
|
+
crop: boolean;
|
|
15
|
+
};
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=ImageVariantsModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageVariantsModal.d.ts","sourceRoot":"","sources":["../../../src/components/ImageVariantsModal.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;4CA8fC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination.jsx"],"names":[],"mappings":"AAEA;;;;;4CAmIC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function TabAI({
|
|
2
|
-
apiKey: any;
|
|
1
|
+
export default function TabAI({ prod, disabled, onSelected, onGenerated }: {
|
|
3
2
|
prod: any;
|
|
4
3
|
disabled: any;
|
|
4
|
+
onSelected: any;
|
|
5
5
|
onGenerated: any;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=TabAI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabAI.d.ts","sourceRoot":"","sources":["../../../src/components/TabAI.jsx"],"names":[],"mappings":"AAKA;;;;;
|
|
1
|
+
{"version":3,"file":"TabAI.d.ts","sourceRoot":"","sources":["../../../src/components/TabAI.jsx"],"names":[],"mappings":"AAKA;;;;;4CAsTC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default function TabPortals({
|
|
2
|
-
apiKey: any;
|
|
1
|
+
export default function TabPortals({ prod, disabled, onSelected }: {
|
|
3
2
|
prod: any;
|
|
4
3
|
disabled: any;
|
|
4
|
+
onSelected: any;
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=TabPortals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPortals.d.ts","sourceRoot":"","sources":["../../../src/components/TabPortals.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabPortals.d.ts","sourceRoot":"","sources":["../../../src/components/TabPortals.jsx"],"names":[],"mappings":"AAmCA;;;;4CA4iBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabStock.d.ts","sourceRoot":"","sources":["../../../src/components/TabStock.jsx"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"TabStock.d.ts","sourceRoot":"","sources":["../../../src/components/TabStock.jsx"],"names":[],"mappings":"AAKA;;;;4CA4XC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal que se muestra cuando el token JWT ha expirado
|
|
3
|
+
* Obliga al usuario a reabrir el componente para obtener un nuevo token
|
|
4
|
+
*/
|
|
5
|
+
export default function TokenExpiredModal({ isOpen, onClose }: {
|
|
6
|
+
isOpen: any;
|
|
7
|
+
onClose: any;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=TokenExpiredModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenExpiredModal.d.ts","sourceRoot":"","sources":["../../../src/components/TokenExpiredModal.jsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH;;;4CAgDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadForm.d.ts","sourceRoot":"","sources":["../../../src/components/UploadForm.jsx"],"names":[],"mappings":"AAaA;;;;;
|
|
1
|
+
{"version":3,"file":"UploadForm.d.ts","sourceRoot":"","sources":["../../../src/components/UploadForm.jsx"],"names":[],"mappings":"AAaA;;;;;4CA0IC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimboCore.d.ts","sourceRoot":"","sources":["../../../src/core/LimboCore.js"],"names":[],"mappings":"AASA;;;GAGG;AACH;IAEI,sBAAiC;IACjC,2BAAsC;IACtC,6BAAwC;IACxC,qBAAgC;IAChC,qBAAgC;IAChC,oBAA+B;IAC/B,4FAAoD;IAMtD;;OAEG;IACH,uCAcC;IAED;;OAEG;IACH,iEAGC;IAED;;OAEG;IACH,oDAEC;IAED;;OAEG;IACH,iCAaC;IAED;;OAEG;IACH;;;;;MAEC;IAED;;OAEG;IACH;;;;MA0CC;IAED;;OAEG;IACH,oCAWC;IAED;;OAEG;IACH,qCAmBC;IAED;;OAEG;IACH,+DAGC;IAED;;OAEG;IACH,sBAEC;IAED;;OAEG;IACH,gBAKC;IAED;;;;;;;MASC;IAED;;OAEG;IACH,gCAKC;IAED;;OAEG;IACH;;;aAmBC;CACF;
|
|
1
|
+
{"version":3,"file":"LimboCore.d.ts","sourceRoot":"","sources":["../../../src/core/LimboCore.js"],"names":[],"mappings":"AASA;;;GAGG;AACH;IAEI,sBAAiC;IACjC,2BAAsC;IACtC,6BAAwC;IACxC,qBAAgC;IAChC,qBAAgC;IAChC,oBAA+B;IAC/B,4FAAoD;IAMtD;;OAEG;IACH,uCAcC;IAED;;OAEG;IACH,2BAGC;IAED;;OAEG;IACH,iEAGC;IAED;;OAEG;IACH,oDAEC;IAED;;OAEG;IACH,iCAaC;IAED;;OAEG;IACH;;;;;MAEC;IAED;;OAEG;IACH;;;;MA0CC;IAED;;OAEG;IACH,oCAWC;IAED;;OAEG;IACH,qCAmBC;IAED;;OAEG;IACH,+DAGC;IAED;;OAEG;IACH,sBAEC;IAED;;OAEG;IACH,gBAKC;IAED;;;;;;;MASC;IAED;;OAEG;IACH,gCAKC;IAED;;OAEG;IACH;;;aAmBC;CACF;8BA1P6B,oBAAoB;gCAClB,sBAAsB;iCACrB,uBAAuB;6BAC3B,mBAAmB;6BACnB,mBAAmB;6BACnB,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAiServices.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAiServices.js"],"names":[],"mappings":"AAMA;;;;;
|
|
1
|
+
{"version":3,"file":"useAiServices.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAiServices.js"],"names":[],"mappings":"AAMA;;;;;EAuCC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para crear variantes de imagen (recortes, redimensionados, etc.)
|
|
3
|
+
* En lugar de crear una nueva imagen, crea una variante de la imagen original
|
|
4
|
+
*/
|
|
5
|
+
export default function useCreateVariant(): {
|
|
6
|
+
createVariant: (assetId: any, variantConfig: any) => Promise<any>;
|
|
7
|
+
createCropVariant: (assetId: string, cropData: any, options?: any) => Promise<any>;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
error: any;
|
|
10
|
+
createdVariant: any;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useCreateVariant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateVariant.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCreateVariant.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;;iCA4Ca,MAAM;;;;;EAkClB"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export default function useExternalImages(apiKey: any, prod?: boolean): {
|
|
2
|
-
search: (params: any) => Promise<
|
|
2
|
+
search: (params: any) => Promise<{
|
|
3
|
+
success: any;
|
|
4
|
+
data: any;
|
|
5
|
+
images: any[];
|
|
6
|
+
} | {
|
|
7
|
+
success: boolean;
|
|
8
|
+
images: any[];
|
|
9
|
+
data?: undefined;
|
|
10
|
+
}>;
|
|
3
11
|
loading: boolean;
|
|
4
12
|
error: any;
|
|
5
13
|
images: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExternalImages.d.ts","sourceRoot":"","sources":["../../../src/hooks/useExternalImages.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"useExternalImages.d.ts","sourceRoot":"","sources":["../../../src/hooks/useExternalImages.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;EAkDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useImageParams.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImageParams.js"],"names":[],"mappings":"AAMA;;;;;;
|
|
1
|
+
{"version":3,"file":"useImageParams.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImageParams.js"],"names":[],"mappings":"AAMA;;;;;;EAyCC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para gestionar las variantes de una imagen
|
|
3
|
+
* Permite cargar y mostrar las variantes de un asset específico
|
|
4
|
+
*/
|
|
5
|
+
export default function useImageVariants(): {
|
|
6
|
+
loadVariants: (assetId: any) => Promise<any>;
|
|
7
|
+
getVariants: (assetId: any) => any;
|
|
8
|
+
isLoading: (assetId: any) => any;
|
|
9
|
+
getError: (assetId: any) => any;
|
|
10
|
+
clearVariants: (assetId: any) => void;
|
|
11
|
+
refreshVariants: (assetId: any) => Promise<any>;
|
|
12
|
+
removeVariant: (assetId: any, variantId: any) => Promise<{
|
|
13
|
+
success: boolean;
|
|
14
|
+
error?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
success: boolean;
|
|
17
|
+
error: any;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useImageVariants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useImageVariants.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImageVariants.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;;;;;;;;;;;;;;EAqHC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useImages.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImages.js"],"names":[],"mappings":"AAOA
|
|
1
|
+
{"version":3,"file":"useImages.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImages.js"],"names":[],"mappings":"AAOA;;;;;;;EAiFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsAllowedAll.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsAllowedAll.js"],"names":[],"mappings":"AAOA;;;;;
|
|
1
|
+
{"version":3,"file":"useIsAllowedAll.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsAllowedAll.js"],"names":[],"mappings":"AAOA;;;;;EAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePortalSources.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePortalSources.js"],"names":[],"mappings":"AAMA;;;;;
|
|
1
|
+
{"version":3,"file":"usePortalSources.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePortalSources.js"],"names":[],"mappings":"AAMA;;;;;EA2CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStockServices.d.ts","sourceRoot":"","sources":["../../../src/hooks/useStockServices.js"],"names":[],"mappings":"AAMA;;;;;
|
|
1
|
+
{"version":3,"file":"useStockServices.d.ts","sourceRoot":"","sources":["../../../src/hooks/useStockServices.js"],"names":[],"mappings":"AAMA;;;;;EAuCC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para manejar la expiración de tokens JWT
|
|
3
|
+
* Detecta respuestas 401 con error de token expirado y muestra un modal de aviso
|
|
4
|
+
*/
|
|
5
|
+
export default function useTokenExpiration(): {
|
|
6
|
+
isTokenExpired: boolean;
|
|
7
|
+
checkTokenExpiration: (error: any) => boolean;
|
|
8
|
+
handleTokenExpiredClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useTokenExpiration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTokenExpiration.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTokenExpiration.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;;;;EAmDC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export function getAiServices(
|
|
2
|
-
export function generateAiImage(
|
|
1
|
+
export function getAiServices(prod?: boolean): Promise<any>;
|
|
2
|
+
export function generateAiImage(params: any, prod?: boolean): Promise<any>;
|
|
3
|
+
export function getAiParams(params?: {}, prod?: boolean): Promise<any>;
|
|
4
|
+
export function getAiJobStatus(jobId: any, prod?: boolean): Promise<any>;
|
|
3
5
|
//# sourceMappingURL=aiApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiApi.d.ts","sourceRoot":"","sources":["../../../src/services/aiApi.js"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"aiApi.d.ts","sourceRoot":"","sources":["../../../src/services/aiApi.js"],"names":[],"mappings":"AAKA,4DAEC;AAED,2EAEC;AAED,uEAIC;AAED,yEAEC"}
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configure global API settings -
|
|
2
|
+
* Configure global API settings - Simplified
|
|
3
|
+
* @param {Object} config - Configuration object
|
|
4
|
+
* @param {string} config.publicKey - Public key del portal (requerido)
|
|
5
|
+
* @param {string} [config.token] - JWT token (opcional, generado por backend)
|
|
6
|
+
* @param {boolean} [config.prod] - Use production URL
|
|
3
7
|
*/
|
|
4
|
-
export function configureApiClient(config:
|
|
8
|
+
export function configureApiClient(config: {
|
|
9
|
+
publicKey: string;
|
|
10
|
+
token?: string;
|
|
11
|
+
prod?: boolean;
|
|
12
|
+
}): void;
|
|
13
|
+
export function getBaseUrl({ prod }?: {
|
|
14
|
+
prod?: boolean;
|
|
15
|
+
}): string;
|
|
5
16
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @param {
|
|
17
|
+
* Set JWT token (generated by backend)
|
|
18
|
+
* @param {string} token - JWT token
|
|
8
19
|
*/
|
|
9
|
-
export function
|
|
20
|
+
export function setToken(token: string): void;
|
|
10
21
|
/**
|
|
11
|
-
* Get current
|
|
22
|
+
* Get current configuration
|
|
12
23
|
*/
|
|
13
|
-
export function
|
|
14
|
-
prod: boolean;
|
|
15
|
-
apiKey: any;
|
|
24
|
+
export function getConfig(): {
|
|
16
25
|
publicKey: any;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
token: any;
|
|
27
|
+
authMode: any;
|
|
28
|
+
tokenEndpoint: any;
|
|
29
|
+
prod: boolean;
|
|
20
30
|
};
|
|
21
31
|
export function callApi({ endpoint, method, body, prod, basePath, customHeaders, isFormData, useJWT, }: {
|
|
22
32
|
endpoint: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiClient.d.ts","sourceRoot":"","sources":["../../../src/services/apiClient.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apiClient.d.ts","sourceRoot":"","sources":["../../../src/services/apiClient.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,2CAJG;IAAuB,SAAS,EAAxB,MAAM;IACU,KAAK,GAArB,MAAM;IACW,IAAI,GAArB,OAAO;CACjB,QAgBA;AAGD;;WAEC;AAyDD;;;GAGG;AACH,gCAFW,MAAM,QAIhB;AAED;;GAEG;AACH;;;;;;EAEC;AAGD;;;;;;;;;iBAuEC"}
|
|
@@ -6,25 +6,27 @@
|
|
|
6
6
|
export function listAssets(params?: any): Promise<any>;
|
|
7
7
|
/**
|
|
8
8
|
* Upload new asset
|
|
9
|
-
* Maps to: POST /api/
|
|
9
|
+
* Maps to: POST /api/assets
|
|
10
10
|
*/
|
|
11
11
|
export function uploadAsset(file: any, uploaded_by?: any, store_original?: boolean): Promise<any>;
|
|
12
12
|
/**
|
|
13
13
|
* Get specific asset
|
|
14
|
-
* Maps to: GET /api/
|
|
14
|
+
* Maps to: GET /api/assets/{id}
|
|
15
15
|
*/
|
|
16
16
|
export function getAsset(assetId: any, includeVariants?: boolean, includeMetadata?: boolean): Promise<any>;
|
|
17
17
|
/**
|
|
18
18
|
* Delete asset (soft delete)
|
|
19
|
-
* Maps to: DELETE /api/
|
|
19
|
+
* Maps to: DELETE /api/assets/{id}
|
|
20
20
|
*/
|
|
21
21
|
export function deleteAsset(assetId: any): Promise<any>;
|
|
22
22
|
/**
|
|
23
23
|
* Generate new variant for asset
|
|
24
|
-
* Maps to: POST /api/
|
|
24
|
+
* Maps to: POST /api/assets/{id}/variants
|
|
25
25
|
*/
|
|
26
|
-
export function generateVariant(assetId: any, { variant_name, crop_params, preset_aspect, preset_size, output_format, }: {
|
|
26
|
+
export function generateVariant(assetId: any, { variant_name, width, height, crop_params, preset_aspect, preset_size, output_format, }: {
|
|
27
27
|
variant_name: any;
|
|
28
|
+
width: any;
|
|
29
|
+
height: any;
|
|
28
30
|
crop_params: any;
|
|
29
31
|
preset_aspect?: any;
|
|
30
32
|
preset_size?: any;
|
|
@@ -32,9 +34,14 @@ export function generateVariant(assetId: any, { variant_name, crop_params, prese
|
|
|
32
34
|
}): Promise<any>;
|
|
33
35
|
/**
|
|
34
36
|
* List variants for asset
|
|
35
|
-
* Maps to: GET /api/
|
|
37
|
+
* Maps to: GET /api/assets/{id}/variants
|
|
36
38
|
*/
|
|
37
39
|
export function listVariants(assetId: any): Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Delete variant
|
|
42
|
+
* Maps to: DELETE /api/assets/{assetId}/variants/{variantId}
|
|
43
|
+
*/
|
|
44
|
+
export function deleteVariant(assetId: any, variantId: any): Promise<any>;
|
|
38
45
|
/**
|
|
39
46
|
* Legacy compatibility: getImage
|
|
40
47
|
* @deprecated Use getAsset instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assetsApi.d.ts","sourceRoot":"","sources":["../../../src/services/assetsApi.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assetsApi.d.ts","sourceRoot":"","sources":["../../../src/services/assetsApi.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,0CAFa,OAAO,KAAQ,CAkB3B;AAED;;;GAGG;AACH,kGAoBC;AAED;;;GAGG;AACH,2GAkBC;AAED;;;GAGG;AACH,wDAaC;AAED;;;GAGG;AACH;;;;;;;;iBAuCC;AAED;;;GAGG;AACH,yDAeC;AAED;;;GAGG;AACH,0EAaC;AAKD;;;GAGG;AACH,6DAGC;AAED;;;GAGG;AACH,+EAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageParamsApi.d.ts","sourceRoot":"","sources":["../../../src/services/imageParamsApi.js"],"names":[],"mappings":"AAIA;;;
|
|
1
|
+
{"version":3,"file":"imageParamsApi.d.ts","sourceRoot":"","sources":["../../../src/services/imageParamsApi.js"],"names":[],"mappings":"AAIA;;;iCAmBC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function getExternalImageSources(
|
|
2
|
-
export function getExternalImages(
|
|
1
|
+
export function getExternalImageSources(prod?: boolean): Promise<any>;
|
|
2
|
+
export function getExternalImages(params: any, prod?: boolean): Promise<any>;
|
|
3
3
|
//# sourceMappingURL=portalsApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portalsApi.d.ts","sourceRoot":"","sources":["../../../src/services/portalsApi.js"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"portalsApi.d.ts","sourceRoot":"","sources":["../../../src/services/portalsApi.js"],"names":[],"mappings":"AAKA,sEAMC;AAED,6EAQC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Response Adapters - FASE 1.2
|
|
3
|
-
*
|
|
4
|
-
* Adaptadores para transformar respuestas de api-limbo v2 al formato
|
|
5
|
-
* esperado por component-limbo legacy, manteniendo compatibilidad.
|
|
6
|
-
*/
|
|
7
1
|
/**
|
|
8
2
|
* Convierte respuesta de asset individual de v2 a formato legacy
|
|
9
3
|
* @param {Object} v2Response - Respuesta de api-limbo v2
|
|
@@ -16,6 +10,12 @@ export function adaptAssetFromV2(v2Response: any): any;
|
|
|
16
10
|
* @returns {Object} Formato compatible con component-limbo
|
|
17
11
|
*/
|
|
18
12
|
export function adaptAssetsListFromV2(v2Response: any): any;
|
|
13
|
+
/**
|
|
14
|
+
* Adaptador específico para respuestas de listado de variantes
|
|
15
|
+
* @param {Object} v2Response - Respuesta de api-limbo v2 para variantes
|
|
16
|
+
* @returns {Object} Formato compatible con component-limbo
|
|
17
|
+
*/
|
|
18
|
+
export function adaptVariantsListFromV2(v2Response: any): any;
|
|
19
19
|
/**
|
|
20
20
|
* Convierte variantes de v2 a formato legacy
|
|
21
21
|
* @param {Array} v2Variants - Array de variantes v2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responseAdapters.d.ts","sourceRoot":"","sources":["../../../src/services/responseAdapters.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"responseAdapters.d.ts","sourceRoot":"","sources":["../../../src/services/responseAdapters.js"],"names":[],"mappings":"AA8DA;;;;GAIG;AACH,uDAsCC;AAED;;;;GAIG;AACH,4DA4CC;AAED;;;;GAIG;AACH,8DAqCC;AAED;;;;GAIG;AACH,8DAiBC;AAED;;;;GAIG;AACH,wDAkCC;AAED;;;;GAIG;AACH,mEAwBC;AAED;;;;GAIG;AACH,wCAHW,KAAK,GACH,KAAK,CAkBjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getStockServices(
|
|
2
|
-
export function searchStockImages(
|
|
3
|
-
export function downloadStockImage(
|
|
1
|
+
export function getStockServices(prod?: boolean): Promise<any>;
|
|
2
|
+
export function searchStockImages(params: any, prod?: boolean): Promise<any>;
|
|
3
|
+
export function downloadStockImage(params: any, prod?: boolean): Promise<any>;
|
|
4
4
|
//# sourceMappingURL=stockApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stockApi.d.ts","sourceRoot":"","sources":["../../../src/services/stockApi.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"stockApi.d.ts","sourceRoot":"","sources":["../../../src/services/stockApi.js"],"names":[],"mappings":"AAKA,+DAEC;AAED,6EAEC;AAED,8EAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "limbo-component",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Limbo - Highly configurable React image manager component for web portals",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"esm"
|
|
35
35
|
],
|
|
36
36
|
"author": "LefebvreWEB",
|
|
37
|
-
"license": "
|
|
37
|
+
"license": "ISC",
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "vite",
|
|
40
40
|
"build": "node scripts/build.cjs",
|
|
@@ -72,5 +72,13 @@
|
|
|
72
72
|
"terser": "^5.44.0",
|
|
73
73
|
"typescript": "^5.9.2",
|
|
74
74
|
"vite": "^7.1.2"
|
|
75
|
-
}
|
|
75
|
+
},
|
|
76
|
+
"repository": {
|
|
77
|
+
"type": "git",
|
|
78
|
+
"url": "git+https://github.com/Lefebvre-El-Derecho-SA/component-image-manager-bundle.git"
|
|
79
|
+
},
|
|
80
|
+
"bugs": {
|
|
81
|
+
"url": "https://github.com/Lefebvre-El-Derecho-SA/component-image-manager-bundle/issues"
|
|
82
|
+
},
|
|
83
|
+
"homepage": "https://github.com/Lefebvre-El-Derecho-SA/component-image-manager-bundle#readme"
|
|
76
84
|
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 🔐 JWT Authentication Service
|
|
3
|
-
* Handles server-to-server JWT flow with api-limbo
|
|
4
|
-
*/
|
|
5
|
-
export class AuthService {
|
|
6
|
-
currentToken: any;
|
|
7
|
-
tokenExpiry: number;
|
|
8
|
-
refreshPromise: Promise<{
|
|
9
|
-
success: boolean;
|
|
10
|
-
token: any;
|
|
11
|
-
expires_in: any;
|
|
12
|
-
portal: any;
|
|
13
|
-
policies: any;
|
|
14
|
-
error?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
success: boolean;
|
|
17
|
-
error: any;
|
|
18
|
-
token?: undefined;
|
|
19
|
-
expires_in?: undefined;
|
|
20
|
-
portal?: undefined;
|
|
21
|
-
policies?: undefined;
|
|
22
|
-
}>;
|
|
23
|
-
/**
|
|
24
|
-
* Authenticate and get JWT token
|
|
25
|
-
* Maps to: POST /auth/token
|
|
26
|
-
*/
|
|
27
|
-
authenticate(apiKey: any, publicKey: any, prod?: boolean): Promise<{
|
|
28
|
-
success: boolean;
|
|
29
|
-
token: any;
|
|
30
|
-
expires_in: any;
|
|
31
|
-
portal: any;
|
|
32
|
-
policies: any;
|
|
33
|
-
error?: undefined;
|
|
34
|
-
} | {
|
|
35
|
-
success: boolean;
|
|
36
|
-
error: any;
|
|
37
|
-
token?: undefined;
|
|
38
|
-
expires_in?: undefined;
|
|
39
|
-
portal?: undefined;
|
|
40
|
-
policies?: undefined;
|
|
41
|
-
}>;
|
|
42
|
-
/**
|
|
43
|
-
* Get current valid token (auto-refresh if needed)
|
|
44
|
-
*/
|
|
45
|
-
getValidToken(apiKey: any, publicKey: any, prod?: boolean): Promise<any>;
|
|
46
|
-
/**
|
|
47
|
-
* Check if current token is valid
|
|
48
|
-
*/
|
|
49
|
-
isTokenValid(): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Clear current token (logout)
|
|
52
|
-
*/
|
|
53
|
-
clearToken(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Get token info
|
|
56
|
-
*/
|
|
57
|
-
getTokenInfo(): {
|
|
58
|
-
hasToken: boolean;
|
|
59
|
-
isValid: boolean;
|
|
60
|
-
expiresAt: Date;
|
|
61
|
-
expiresIn: number;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export const authService: AuthService;
|
|
65
|
-
//# sourceMappingURL=authService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authService.d.ts","sourceRoot":"","sources":["../../../src/services/authService.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IAEI,kBAAwB;IACxB,oBAAuB;IACvB;;;;;;;;;;;;;;OAA0B;IAG5B;;;OAGG;IACH;;;;;;;;;;;;;;OAuCC;IAED;;OAEG;IACH,yEAiBC;IAED;;OAEG;IACH,wBAEC;IAED;;OAEG;IACH,mBAIC;IAED;;OAEG;IACH;;;;;MASC;CACF;AAGD,sCAA6C"}
|