@growy/strapi-plugin-encrypted-field 2.1.2 → 2.1.4

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/README.md CHANGED
@@ -20,7 +20,7 @@ Plugin oficial de **Growy AI** para Strapi que proporciona un campo personalizad
20
20
  - ✅ **Gestión de claves robusta** con validación y mensajes de error claros
21
21
  - ✅ **Datos cifrados** en base de datos con IV único y Auth Tag
22
22
  - ✅ **Reutilizable** en cualquier colección o componente
23
- - ✅ **Soporte completo** para componentes anidados y estructuras complejas
23
+ - ✅ **Compatible con Strapi 5** - Utiliza componentes actualizados del Design System v2
24
24
 
25
25
  ## Instalación
26
26
 
@@ -99,10 +99,12 @@ npm run develop
99
99
 
100
100
  ## Requisitos
101
101
 
102
- - **Strapi**: v5.0.0 o superior
102
+ - **Strapi**: v5.0.0 o superior (compatible con Design System v2)
103
103
  - **Node.js**: 18.x - 22.x
104
104
  - **npm**: 6.0.0 o superior
105
105
 
106
+ ⚠️ **Nota sobre Strapi 5**: Esta versión utiliza los componentes actualizados del Design System v2. Si tienes problemas con componentes de layout, asegúrate de que tu proyecto esté actualizado a Strapi 5.
107
+
106
108
  ## Validación de datos
107
109
 
108
110
  El plugin soporta validación antes del cifrado:
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { Layout, HeaderLayout, ContentLayout, Table, Pagination, Badge } from '@strapi/design-system';
2
+ import { Box, Typography, Table, Pagination, Badge } from '@strapi/design-system';
3
3
  import { useNotification } from '@strapi/strapi/admin';
4
4
 
5
5
  const AuditLogs = () => {
@@ -76,44 +76,47 @@ const AuditLogs = () => {
76
76
  ];
77
77
 
78
78
  return (
79
- <Layout>
80
- <HeaderLayout
81
- title="Logs de Auditoría - Campos Cifrados"
82
- subtitle="Registro de acciones realizadas sobre campos cifrados"
83
- />
84
- <ContentLayout>
85
- {loading ? (
86
- <div>Cargando...</div>
87
- ) : (
88
- <>
89
- <Table
90
- headers={tableHeaders}
91
- rows={logs.map(log => ({
92
- timestamp: formatTimestamp(log.timestamp),
93
- user: log.user,
94
- action: (
95
- <Badge color={getBadgeColor(log.action)}>
96
- {log.action === 'view' && 'Vista'}
97
- {log.action === 'copy' && 'Copiado'}
98
- {log.action === 'decrypt' && 'Descifrado'}
99
- </Badge>
100
- ),
101
- field: log.field,
102
- collection: log.collection,
103
- entry_id: log.entry_id,
104
- }))}
105
- />
106
- {pagination.total > pagination.pageSize && (
79
+ <Box padding={8}>
80
+ <Box paddingBottom={4}>
81
+ <Typography variant="alpha">Logs de Auditoría - Campos Cifrados</Typography>
82
+ <Typography variant="epsilon" textColor="neutral600">
83
+ Registro de acciones realizadas sobre campos cifrados
84
+ </Typography>
85
+ </Box>
86
+
87
+ {loading ? (
88
+ <Box>Cargando...</Box>
89
+ ) : (
90
+ <>
91
+ <Table
92
+ headers={tableHeaders}
93
+ rows={logs.map(log => ({
94
+ timestamp: formatTimestamp(log.timestamp),
95
+ user: log.user,
96
+ action: (
97
+ <Badge color={getBadgeColor(log.action)}>
98
+ {log.action === 'view' && 'Vista'}
99
+ {log.action === 'copy' && 'Copiado'}
100
+ {log.action === 'decrypt' && 'Descifrado'}
101
+ </Badge>
102
+ ),
103
+ field: log.field,
104
+ collection: log.collection,
105
+ entry_id: log.entry_id,
106
+ }))}
107
+ />
108
+ {pagination.total > pagination.pageSize && (
109
+ <Box paddingTop={4}>
107
110
  <Pagination
108
111
  activePage={pagination.page}
109
112
  pageCount={pagination.pageCount}
110
113
  onPageChange={handlePageChange}
111
114
  />
112
- )}
113
- </>
114
- )}
115
- </ContentLayout>
116
- </Layout>
115
+ </Box>
116
+ )}
117
+ </>
118
+ )}
119
+ </Box>
117
120
  );
118
121
  };
119
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@growy/strapi-plugin-encrypted-field",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Campo personalizado de texto cifrado para Strapi",
5
5
  "strapi": {
6
6
  "name": "encrypted-field",