@greenborn/vue-table-editor 0.0.0-stage → 1.4.7
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/LICENSE +21 -0
- package/README.md +322 -2
- package/dist/vue-table-editor.css +1 -0
- package/dist/vue-table-editor.js +1574 -0
- package/dist/vue-table-editor.js.map +1 -0
- package/dist/vue-table-editor.umd.cjs +5 -0
- package/dist/vue-table-editor.umd.cjs.map +1 -0
- package/package.json +57 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2012lucho
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,323 @@
|
|
|
1
|
-
#
|
|
1
|
+
# vue-table-editor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Tabla genérica reutilizable y **autocontenida** para **Vue 3**. Lista de funcionalidades:
|
|
4
|
+
|
|
5
|
+
- Toolbar (refresh, CSV, CRUD, botones personalizados)
|
|
6
|
+
- Selección de columnas visibles (dropdown)
|
|
7
|
+
- Búsqueda global y filtro por columna
|
|
8
|
+
- Ordenamiento client-side y server-side
|
|
9
|
+
- Paginación client-side y server-side
|
|
10
|
+
- Scroll infinito (`IntersectionObserver`)
|
|
11
|
+
- Selección single / multiple + selección todo
|
|
12
|
+
- Columnas **redimensionables** (pointer events) y **reordenables** (drag & drop)
|
|
13
|
+
- Preferencias de columnas persistentes (orden, ancho, visibilidad)
|
|
14
|
+
- Edición inline con debounce y validación
|
|
15
|
+
- Grupos de columnas, `valueFormatters`, badges de color, formateo fecha/boolean/json
|
|
16
|
+
- Exportar a CSV
|
|
17
|
+
- CRUD (`api.create` / `api.edit` / `api.delete`) y acciones por fila
|
|
18
|
+
|
|
19
|
+
**Sin dependencias de UI**: no usa Bootstrap ni Bootstrap Icons. Incluye su propio CSS
|
|
20
|
+
autocontenido (`te-*`) y un set de iconos SVG embebido. Solo requiere `vue` como
|
|
21
|
+
**peer dependency**.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Instalación
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install vue-table-editor
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> `vue` es peer dependency. La app consumidora debe tenerlo instalado.
|
|
32
|
+
|
|
33
|
+
## Uso
|
|
34
|
+
|
|
35
|
+
### 1. Importar y registrar el componente
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import { TableEditor } from 'vue-table-editor'
|
|
39
|
+
import 'vue-table-editor/style.css'
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
components: { TableEditor },
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Con `<script setup>`:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { TableEditor } from 'vue-table-editor'
|
|
50
|
+
import 'vue-table-editor/style.css'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Template
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<TableEditor
|
|
57
|
+
ref="table"
|
|
58
|
+
id="productos"
|
|
59
|
+
:api="apiProductos"
|
|
60
|
+
:config="tableConfig"
|
|
61
|
+
@rowSelected="onRowSelected"
|
|
62
|
+
@rowDoubleClick="onRowDblClick"
|
|
63
|
+
/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 3. API (server-side / lazy)
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
import { BtnConfig } from 'vue-table-editor'
|
|
70
|
+
|
|
71
|
+
export default {
|
|
72
|
+
data() {
|
|
73
|
+
return {
|
|
74
|
+
selectedRow: null,
|
|
75
|
+
apiProductos: {
|
|
76
|
+
list: (params) => api.get('/productos/list', { params }).then(r => r.data),
|
|
77
|
+
create: (data) => api.post('/productos', data).then(r => r.data),
|
|
78
|
+
edit: (data) => api.put(`/productos/${data.id}`, data).then(r => r.data),
|
|
79
|
+
delete: (data) => api.delete(`/productos/${data.id}`).then(r => r.data),
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
computed: {
|
|
84
|
+
tableConfig() {
|
|
85
|
+
return {
|
|
86
|
+
lazy: true,
|
|
87
|
+
selectionMode: 'single',
|
|
88
|
+
elementName: { singular: 'Producto', gender: 'M' },
|
|
89
|
+
buttons: {
|
|
90
|
+
toolbar: [
|
|
91
|
+
{ key: 'create', icon: 'plus', severity: 'success', label: 'Nuevo',
|
|
92
|
+
onClick: () => this.abrirModal() },
|
|
93
|
+
{ key: 'edit', icon: 'pencil', severity: 'warning', label: 'Editar',
|
|
94
|
+
isDisabled: () => !this.selectedRow, onClick: () => this.abrirModal(this.selectedRow) },
|
|
95
|
+
{ key: 'delete', icon: 'trash', severity: 'danger', label: 'Eliminar',
|
|
96
|
+
isDisabled: () => !this.selectedRow, onClick: () => this.eliminar(this.selectedRow) },
|
|
97
|
+
],
|
|
98
|
+
rowActions: [
|
|
99
|
+
new BtnConfig({
|
|
100
|
+
key: 'ver', icon: 'eye', severity: 'info', label: 'Ver',
|
|
101
|
+
onClick: (row) => alert('Detalle: ' + row.id),
|
|
102
|
+
}),
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`api.list` debe devolver:
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
{ status: true, data: { rows, totalRecords, fields_def } }
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
donde `fields_def` define las columnas: `{ field, headerName, type, sortable, form_type, css }`.
|
|
118
|
+
|
|
119
|
+
### Cliente-side (sin backend)
|
|
120
|
+
|
|
121
|
+
```html
|
|
122
|
+
<TableEditor :data="{ rows, fields_def }" :config="{ selectionMode: 'multiple' }" />
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Iconos
|
|
126
|
+
|
|
127
|
+
Los botones aceptan un `icon` por nombre. El componente incluye un set SVG embebido:
|
|
128
|
+
|
|
129
|
+
`search`, `download`, `plus`, `pencil`, `trash`, `columns`, `eye`, `refresh`.
|
|
130
|
+
|
|
131
|
+
También acepta nombres legacy de Bootstrap Icons (`bi bi-plus-lg`, `bi bi-pencil`, etc.) y los
|
|
132
|
+
mapea automáticamente a los SVG incluidos.
|
|
133
|
+
|
|
134
|
+
## Severity de botones
|
|
135
|
+
|
|
136
|
+
`severity` usa variantes propias (`te-btn-*`):
|
|
137
|
+
|
|
138
|
+
| Severity | Estilo |
|
|
139
|
+
|----------|--------|
|
|
140
|
+
| `primary` | Relleno azul |
|
|
141
|
+
| `secondary` | Relleno gris |
|
|
142
|
+
| `success` | Relleno verde |
|
|
143
|
+
| `info` | Relleno cian |
|
|
144
|
+
| `warning` | Relleno ámbar |
|
|
145
|
+
| `danger` | Relleno rojo |
|
|
146
|
+
| `outline-primary` / `outline-secondary` / `outline-info` / `outline-success` / `outline-warning` / `outline-danger` | Contorno |
|
|
147
|
+
|
|
148
|
+
También se aceptan valores legacy con prefijo `btn-` (p. ej. `btn-primary`) y se normalizan.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Props
|
|
153
|
+
|
|
154
|
+
| Prop | Tipo | Default | Descripción |
|
|
155
|
+
|------|------|---------|-------------|
|
|
156
|
+
| `api` | Object | `null` | `{ list, create, edit, delete }` |
|
|
157
|
+
| `permisos` | Object | `{}` | `{ ver, crear, editar, eliminar }` |
|
|
158
|
+
| `config` | Object | `{}` | Configuración (ver abajo) |
|
|
159
|
+
| `data` | Object | `null` | `{ rows, fields_def }` para modo cliente-side |
|
|
160
|
+
| `id` | String | `null` | Clave de persistencia de preferencias |
|
|
161
|
+
|
|
162
|
+
## Config (`config`)
|
|
163
|
+
|
|
164
|
+
| Campo | Tipo | Default | Descripción |
|
|
165
|
+
|-------|------|---------|-------------|
|
|
166
|
+
| `lazy` | Boolean | `false` | Carga server-side vía `api.list` |
|
|
167
|
+
| `selectionMode` | String | `'single'` | `'single'`, `'multiple'` o `null` |
|
|
168
|
+
| `infiniteScroll` | Boolean | `false` | Scroll infinito (por defecto `true` si `lazy`) |
|
|
169
|
+
| `elementName` | Object | — | `{ singular, gender }` para etiquetas |
|
|
170
|
+
| `columnGroups` | Array | — | `[{ headerName, fields }]` |
|
|
171
|
+
| `inlineEditing` | Object | — | `{ campos: { [field]: cfg }, api, debounce_ms, onSave }` |
|
|
172
|
+
| `valueFormatters` | Object | — | `{ [field]: (row) => html }` |
|
|
173
|
+
| `showFilterRow` | Boolean | `false` | Fila de filtros por columna |
|
|
174
|
+
| `scrollHeight` | String | `null` | Altura de scroll |
|
|
175
|
+
| `mobileListView` | Boolean | `false` | En viewports angostos muestra las filas como tarjetas (lista) en vez de tabla. Columna 1 = título, resto = etiqueta/valor, acciones de fila debajo. La edición inline no aplica en esta vista |
|
|
176
|
+
| `mobileBreakpoint` | Number | `768` | Ancho máximo (px) en que se activa la vista lista cuando `mobileListView` es `true` |
|
|
177
|
+
| `pageSize` | Number | `25` | Filas por página |
|
|
178
|
+
| `pageSizeOptions` | Array | `[25,50,100,200]` | Opciones del selector |
|
|
179
|
+
| `hideToolbar` / `hideRefresh` / `hideCsvExport` | Boolean | `false` | Oculta elementos |
|
|
180
|
+
| `hideColumnSelector` | Boolean | `false` | Oculta el desplegable de visibilidad de columnas (la búsqueda global sigue visible) |
|
|
181
|
+
| `showPaginator` | Boolean | `true` | Muestra paginador |
|
|
182
|
+
| `defaultColumnProps` | Object | — | Props por defecto a todas las columnas |
|
|
183
|
+
| `columnOrder` | Array | — | Orden inicial de columnas |
|
|
184
|
+
| `preferencesStore` | Object | — | Adaptador de preferencias (si no se pasa, usa localStorage) |
|
|
185
|
+
| `buttons` | Object | — | `{ toolbar: BtnConfig[], rowActions: BtnConfig[] }` |
|
|
186
|
+
|
|
187
|
+
### Opciones de alineación (v1.1)
|
|
188
|
+
|
|
189
|
+
Todas son **opcionales y aditivas**; sin ellas el comportamiento es idéntico al de la 1.0.
|
|
190
|
+
|
|
191
|
+
| Campo | Tipo | Default | Descripción |
|
|
192
|
+
|-------|------|---------|-------------|
|
|
193
|
+
| `rowActionsMode` | String | `'column'` | `'column'` (columna "Acciones" por fila) o `'toolbar'` (botones de fila en la toolbar, habilitados al seleccionar) |
|
|
194
|
+
| `cardActions` | Boolean | `false` | Sólo aplica con `rowActionsMode: 'toolbar'`: si es `true`, además de la toolbar, los botones de acción de fila se muestran dentro de cada mobile-card (vista `mobileListView`). La tabla de escritorio nunca muestra columna de acciones en modo `'toolbar'`. |
|
|
195
|
+
| `lazyProtocol` | String | `'standard'` | `'standard'` envía `{page,pageSize,search}` con filtros planos; `'legacy'` envía `{page,rows,globalSearch}` y filtros `{value,matchMode:'contains'}`. La respuesta se normaliza aceptando tanto `status` como `stat`. |
|
|
196
|
+
| `dataPipeline` | Object | — | `{ processRows(rows,fields_def), processFields(fields_def,firstRow), processColumns(cols) }`. Usa `greenbornDataPipeline(styling)` para replicar el pipeline JSON/formatters/estilos del frontend. |
|
|
197
|
+
| `styling` | Object | — | `{ rowClass, rowClassFn, rowStyleFn, fieldClasses, fieldStyleFns }` para estilos dinámicos por fila/celda. |
|
|
198
|
+
| `extraFields` | Object | — | `{ create, edit, list }`: columnas adicionales para cada acción. |
|
|
199
|
+
| `permissionsCheck` | Function | — | `(permiso) => boolean`. Si se define, los botones CRUD built-in se ocultan cuando la prop `permisos.<accion>` no pasa el chequeo. |
|
|
200
|
+
| `crud.openModal` | Function | — | `(payload) => void`. Reemplaza los stubs de CRUD: recibe `{action,title,campos,modelo,onSubmit,guardado,selectedRows}`. Si no se define, se emiten `createRequest/editRequest`. |
|
|
201
|
+
| `crud.confirmDelete` | Function | — | `(ids) => Promise<boolean>\|boolean`. Si se define, ejecuta `api.delete` tras confirmar; si no, emite `deleteRequest`. |
|
|
202
|
+
| `editOnDoubleClick` | Boolean | `false` | Al hacer doble click en una fila, abre la edición (requiere `api.edit` y permiso). |
|
|
203
|
+
| `csvFetchAll` | Boolean | `false` | En modo `lazy`, exportar a CSV pidiendo todas las filas al servidor antes de descargar. |
|
|
204
|
+
|
|
205
|
+
### Actualización en vivo (v1.2)
|
|
206
|
+
|
|
207
|
+
Para datos que se reemplazan periódicamente (polling, sockets), al reasignar la prop
|
|
208
|
+
`data` con forma `{ rows, fields_def }`:
|
|
209
|
+
|
|
210
|
+
- Si la firma de `fields_def` no cambió, **no se reconstruyen las columnas**: se preserva
|
|
211
|
+
el estado de sesión (orden/ancho/ocultas) y no se re-leen preferencias persistidas.
|
|
212
|
+
- `config.trackBy` estabiliza las row keys: nombre de campo (ej. `'pid'`) o función
|
|
213
|
+
`(row, index) => key`. Sin `trackBy` se usa `row.id`, `row.__uid` o el índice.
|
|
214
|
+
|
|
215
|
+
```js
|
|
216
|
+
const config = {
|
|
217
|
+
trackBy: 'pid',
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Pipeline legacy** (paridad con el frontend):
|
|
222
|
+
|
|
223
|
+
```js
|
|
224
|
+
import { greenbornDataPipeline } from 'vue-table-editor'
|
|
225
|
+
|
|
226
|
+
const config = {
|
|
227
|
+
lazy: true,
|
|
228
|
+
lazyProtocol: 'legacy',
|
|
229
|
+
dataPipeline: greenbornDataPipeline(), // opcional: pasar el objeto styling
|
|
230
|
+
permissionsCheck: (p) => usuario?.permisos?.includes(p),
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Inne edit**: se añadieron `type: 'currency'`, `cfg.format(val)` y rollback automático al valor original si el guardado falla (respuesta `status === false` o `stat === false`). El editor inline ahora restaura el valor al cancelar (Esc).
|
|
235
|
+
|
|
236
|
+
## Eventos
|
|
237
|
+
|
|
238
|
+
| Evento | Payload | Descripción |
|
|
239
|
+
|--------|---------|-------------|
|
|
240
|
+
| `loaded` | `Boolean` | Datos cargados |
|
|
241
|
+
| `rowSelected` | `Object \| null \| Array` | Fila(s) seleccionada(s) |
|
|
242
|
+
| `rowDoubleClick` | `Object` | Fila con doble click |
|
|
243
|
+
| `createRequest` | `Object` | (v1.1) Solicitud de alta cuando no hay `crud.openModal` |
|
|
244
|
+
| `editRequest` | `Object` | (v1.1) Solicitud de edición cuando no hay `crud.openModal` |
|
|
245
|
+
| `deleteRequest` | `{ ids, action }` | (v1.1) Solicitud de borrado cuando no hay `crud.confirmDelete` |
|
|
246
|
+
|
|
247
|
+
## Dark mode
|
|
248
|
+
|
|
249
|
+
La librería incluye estilos para modo oscuro activados por el atributo
|
|
250
|
+
`[data-bs-theme="dark"]` (mismo convenio que Bootstrap).
|
|
251
|
+
|
|
252
|
+
## Métodos (vía `ref`)
|
|
253
|
+
|
|
254
|
+
| Método | Descripción |
|
|
255
|
+
|--------|-------------|
|
|
256
|
+
| `loadData(data?)` | Recarga datos |
|
|
257
|
+
| `applyConfig()` | Re-aplica configuración |
|
|
258
|
+
| `refresh()` | Recarga y resetea selección |
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Preferencias de columnas
|
|
263
|
+
|
|
264
|
+
Las preferencias (orden, ancho, visibilidad) se guardan automáticamente con debounce.
|
|
265
|
+
El valor guardado bajo la clave `te_cfg_<id>` es un JSON con la forma:
|
|
266
|
+
|
|
267
|
+
```json
|
|
268
|
+
{ "columnOrder": ["campo1", "campo2"], "columnWidths": { "campo1": "15rem" }, "hiddenFields": ["campo3"] }
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
`hiddenFields` lista los campos ocultos por el usuario; al cargar se aplican sobre las columnas
|
|
272
|
+
del `config`, siempre que quede al menos una visible.
|
|
273
|
+
|
|
274
|
+
Por defecto se usan **localStorage** (autónomo, sin servidor). Puedes inyectar tu propio
|
|
275
|
+
adaptador — por ejemplo un store Pinia del host — vía `config.preferencesStore`, siempre
|
|
276
|
+
que exponga:
|
|
277
|
+
|
|
278
|
+
```js
|
|
279
|
+
{
|
|
280
|
+
misValores: object,
|
|
281
|
+
valor(key): any,
|
|
282
|
+
guardarValores(data): Promise|void,
|
|
283
|
+
fetchMisPreferencias(): Promise|void,
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
También puedes registrar un adaptador global:
|
|
288
|
+
|
|
289
|
+
```js
|
|
290
|
+
import { setGlobalPreferencesAdapter } from 'vue-table-editor'
|
|
291
|
+
setGlobalPreferencesAdapter(miAdaptador)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Y crear adaptadores de localStorage con clave propia:
|
|
295
|
+
|
|
296
|
+
```js
|
|
297
|
+
import { createLocalStoragePrefsAdapter } from 'vue-table-editor'
|
|
298
|
+
const adapter = createLocalStoragePrefsAdapter('mi_clave')
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Demo local
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
cd vue-table-editor
|
|
307
|
+
npm install
|
|
308
|
+
npm run dev
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Incluye dos ejemplos: server-side (lazy, con API simulada) y cliente-side con edición inline.
|
|
312
|
+
|
|
313
|
+
## Build de la librería
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
npm run build
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Genera `dist/vue-table-editor.js`, `dist/vue-table-editor.umd.cjs` y `dist/vue-table-editor.css`.
|
|
320
|
+
|
|
321
|
+
## Licencia
|
|
322
|
+
|
|
323
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.te-wrapper{display:grid;grid-template-rows:auto 1fr auto;height:100%;font-size:.875rem}.te-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:#fff;border:1px solid #dee2e6;border-radius:.375rem .375rem 0 0;padding:.5rem 1rem;flex-wrap:wrap}.te-toolbar-start{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap}.te-toolbar-end{display:flex;align-items:center;gap:.5rem;white-space:nowrap}.te-toolbar-divider{color:#adb5bd;opacity:.6;margin:0 .15rem}.te-scroll-wrap{overflow:auto;border:1px solid #dee2e6;border-top:0;border-bottom:0;background:#fff;position:relative}.te-scroll-wrap::-webkit-scrollbar{width:8px;height:8px}.te-scroll-wrap::-webkit-scrollbar-track{background:#f1f1f1}.te-scroll-wrap::-webkit-scrollbar-thumb{background:#c1c7cd;border-radius:4px}.te-scroll-wrap::-webkit-scrollbar-thumb:hover{background:#a0a7ae}.te-table{width:1px;min-width:100%;border-collapse:collapse;table-layout:fixed}.te-col-filler{padding:0}.te-striped .te-tr:nth-child(2n){background:#fafbfc}.te-tr{transition:background .12s ease}.te-tr:hover{background:#e8ecf4!important}.te-tr.te-tr-highlight{background:#c7d9f5!important;color:#1a202c}.te-tr.te-tr-selected td{background:#dce8f5}.te-header-row .te-th,.te-header-group-row .te-th{position:sticky;z-index:2;padding:0;border-right:1px solid #eef1f6;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}.te-header-row .te-th{top:0;background:linear-gradient(180deg,#fff,#f2f5fa);font-weight:600;font-size:.8rem;color:#1f2b3d;letter-spacing:.02em;text-transform:uppercase;border-bottom:1px solid #d4dae3;box-shadow:0 1px #d4dae3}.te-header-row .te-th:last-child,.te-header-group-row .te-th:last-child{border-right:none}.te-th-content{display:flex;align-items:center;gap:.35rem;height:2.6rem;padding:0 .75rem;box-sizing:border-box;overflow:hidden}.te-th-label{display:inline-flex;align-items:center;gap:.35rem;overflow:hidden;text-overflow:ellipsis;cursor:pointer;white-space:nowrap;line-height:1.2}.te-th-label:hover{color:#1a56db}.te-th-label:hover .te-sort-icon-std{color:#3b82f6}.te-sort-icon-std{display:inline-flex;align-items:center;color:#b6bcc6;flex-shrink:0;transition:color .12s,opacity .12s;opacity:.75}.te-sort-icon-std .te-icon{width:.8rem;height:.8rem}.te-th-label:hover .te-sort-icon-std,.te-th-sorted .te-sort-icon-std{opacity:1}.te-th-sorted{color:#1a56db}.te-th-grip{color:#a6adb6;cursor:grab;flex-shrink:0;opacity:.55;transition:opacity .12s,color .12s;display:inline-flex}.te-th-grip .te-icon{width:1rem;height:1rem}.te-th:hover .te-th-grip,.te-th-grip:hover{opacity:1;color:#64748b}.te-th-grip:active{cursor:grabbing}.te-th[draggable=true]{cursor:grab}.te-th:active{cursor:grabbing}.te-header-group-row .te-th{top:0;z-index:3;background:linear-gradient(180deg,#e8edf4,#dfe5ee);font-weight:700;font-size:.82rem;color:#1e293b;text-align:center;border-bottom:2px solid #c6cfdb;height:2.2rem}.te-header-group-row .te-th .te-th-content{justify-content:center;height:2.2rem}.te-header-group-row .te-th-group-label{font-weight:700;text-transform:uppercase;letter-spacing:.03em}.te-header-row.te-has-groups .te-th{top:2.2rem;height:2.6rem}.te-th-dragging{opacity:.35;background:#e5e7eb!important}.te-th-dragover-left{background:#eff6ff!important;box-shadow:inset 3px 0 #3b82f6}.te-th-dragover-right{background:#eff6ff!important;box-shadow:inset -3px 0 #3b82f6}.te-drop-indicator{position:absolute;top:0;bottom:0;width:3px;z-index:5;background:#3b82f6;pointer-events:none}.te-drop-indicator:after{content:"";position:absolute;top:-4px;width:8px;height:8px;background:#3b82f6;border-radius:50%;left:-2.5px}.te-drop-left{left:-1.5px}.te-drop-right{right:-4px}.te-resize-handle{position:absolute;right:0;top:0;bottom:0;width:10px;cursor:col-resize;z-index:3;background:transparent;touch-action:none}.te-resize-handle:before{content:"";position:absolute;right:4px;top:15%;bottom:15%;width:2px;background:#e2e8f0;border-radius:1px;transition:background .12s}.te-resize-handle:hover:before,.te-resize-handle:active:before{background:#3b82f6}.te-resizing,body.te-resizing{-webkit-user-select:none!important;user-select:none!important}.te-filter-row .te-td{padding:.2rem 10px .2rem .4rem;background:#f8f9fa}.te-filter-input{width:100%;font-size:.8rem;padding:.2rem .4rem;border:1px solid #dee2e6;border-radius:3px;box-sizing:border-box}.te-filter-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.te-filter-select{background-color:#fff;cursor:pointer}.te-td{position:relative;box-sizing:border-box;padding:.4rem 10px .4rem .75rem;font-size:.875rem;line-height:1.45;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0}.te-td:last-child{border-right:none}.te-th{position:relative;box-sizing:border-box;overflow:hidden}.te-td-sel,.te-th-sel{text-align:center;min-width:2rem}.te-actions-wrap{display:flex;gap:.25rem;padding:.15rem .25rem}.te-td-acts{padding-left:.75rem;padding-right:.75rem}.te-empty{text-align:center;color:#999;padding:2rem}.te-color-badge{display:inline-block;padding:.1rem .5rem;border-radius:4px;border:1px solid rgba(0,0,0,.15);font-weight:600;font-size:.75rem}.te-avatar-img{width:32px;height:32px;border-radius:50%;object-fit:cover}.te-paginator{display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:#f8f9fa;border:1px solid #dee2e6;border-radius:0 0 8px 8px;padding:.4rem .75rem;font-size:.85rem;flex-wrap:wrap}.te-page-info{color:#6c757d;font-size:.85rem}.te-page-controls{display:flex;align-items:center;gap:.15rem}.te-page-btn{background:#fff;border:1px solid #dee2e6;border-radius:4px;padding:.25rem .5rem;cursor:pointer;font-size:.8rem;color:#495057;transition:background .12s}.te-page-btn:hover:not(:disabled){background:#e9ecef}.te-page-btn:disabled{opacity:.4;cursor:default}.te-page-current{padding:0 .5rem;font-weight:600;font-size:.85rem}.te-page-size{width:auto;min-width:70px}.te-loading-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#ffffffb3;display:flex;align-items:center;justify-content:center;z-index:10}.te-sentinel{text-align:center;padding:1rem;min-height:3rem}.te-loading-spinner{display:inline-block;width:1.5rem;height:1.5rem;border:2px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:te-spin .6s linear infinite}@keyframes te-spin{to{transform:rotate(360deg)}}.te-editing-input{width:100%;border:1px solid #3b82f6;border-radius:4px;padding:.2rem .4rem;font-size:inherit;font-family:inherit;background:#fff;outline:none;box-shadow:0 0 0 2px #3b82f640;box-sizing:border-box}.te-cell-wrap{display:flex;align-items:center;justify-content:space-between;gap:.25rem;width:100%;overflow:hidden}.te-cell-wrap>span{overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.te-inline-edit-btn{flex-shrink:0;opacity:0;width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:#e8ecf4;color:#4b5563;cursor:pointer;transition:opacity .15s,background .15s;font-size:.7rem;padding:0;line-height:1}.te-td-inline-edit:hover .te-inline-edit-btn{opacity:1}.te-inline-edit-btn:hover{background:#3b82f6;color:#fff}.te-cols-input{flex-shrink:0}.te-icon{width:16px;height:16px;flex-shrink:0;display:block}.te-btn-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1}.te-btn-icon .te-icon{width:14px;height:14px}.te-inline-edit-btn .te-icon{width:13px;height:13px}.te-search-icon .te-icon{width:14px;height:14px}.te-btn{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .75rem;font-size:.8rem;font-weight:500;line-height:1.4;border-radius:.375rem;border:1px solid transparent;cursor:pointer;transition:background .12s,color .12s,border-color .12s;background:transparent;color:inherit;white-space:nowrap}.te-btn:disabled{opacity:.45;cursor:default;pointer-events:none}.te-btn-primary{background:#3b82f6;color:#fff}.te-btn-primary:hover:not(:disabled){background:#2f6fe0}.te-btn-secondary{background:#6c757d;color:#fff}.te-btn-secondary:hover:not(:disabled){background:#5a6268}.te-btn-success{background:#198754;color:#fff}.te-btn-success:hover:not(:disabled){background:#157347}.te-btn-info{background:#0dcaf0;color:#000}.te-btn-info:hover:not(:disabled){background:#31d2f2}.te-btn-warning{background:#ffc107;color:#000}.te-btn-warning:hover:not(:disabled){background:#ffca2c}.te-btn-danger{background:#dc3545;color:#fff}.te-btn-danger:hover:not(:disabled){background:#c02a3a}.te-btn-outline-primary{border-color:#3b82f6;color:#3b82f6}.te-btn-outline-primary:hover:not(:disabled){background:#3b82f6;color:#fff}.te-btn-outline-secondary{border-color:#6c757d;color:#6c757d}.te-btn-outline-secondary:hover:not(:disabled){background:#6c757d;color:#fff}.te-btn-outline-info{border-color:#31d2f2;color:#0dcaf0}.te-btn-outline-info:hover:not(:disabled){background:#0dcaf0;color:#fff}.te-btn-outline-danger{border-color:#dc3545;color:#dc3545}.te-btn-outline-danger:hover:not(:disabled){background:#dc3545;color:#fff}.te-btn-outline-success{border-color:#198754;color:#198754}.te-btn-outline-success:hover:not(:disabled){background:#198754;color:#fff}.te-btn-outline-warning{border-color:#ffc107;color:#e0a800}.te-btn-outline-warning:hover:not(:disabled){background:#ffc107;color:#000}.te-dropdown{position:relative;display:inline-block}.te-dropdown-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:20;background:#fff;border:1px solid #dee2e6;border-radius:.375rem;box-shadow:0 6px 16px #0000001f;padding:.35rem;min-width:220px;max-height:280px;overflow:auto}.te-dropdown-item{display:flex;align-items:center;gap:.5rem;padding:.35rem .5rem;border-radius:.25rem;cursor:pointer;font-size:.85rem}.te-dropdown-item:hover{background:#f0f2f5}.te-checkbox{width:1rem;height:1rem;accent-color:#3b82f6;cursor:pointer;flex-shrink:0;margin:0}.te-search{position:relative;display:inline-flex;align-items:center;width:200px}.te-search-icon{position:absolute;left:.5rem;color:#9ca3af;font-size:.9rem;pointer-events:none;display:inline-flex}.te-search-input{width:100%;font-size:.8rem;padding:.35rem .5rem .35rem 1.75rem;border:1px solid #dee2e6;border-radius:.375rem;background:#fff}.te-search-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.te-select{font-size:.8rem;padding:.25rem .4rem;border:1px solid #dee2e6;border-radius:.375rem;background:#fff;min-width:70px}.te-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.te-mono{font-family:SF Mono,Cascadia Code,Consolas,Liberation Mono,monospace!important}[data-bs-theme=dark] .te-wrapper{color:#e2e8f0}[data-bs-theme=dark] .te-toolbar,[data-bs-theme=dark] .te-scroll-wrap{background:#1e1e2e;border-color:#3a3a50}[data-bs-theme=dark] .te-scroll-wrap::-webkit-scrollbar-track{background:#2a2a3d}[data-bs-theme=dark] .te-scroll-wrap::-webkit-scrollbar-thumb{background:#4a4a65;border-radius:4px}[data-bs-theme=dark] .te-scroll-wrap::-webkit-scrollbar-thumb:hover{background:#5a5a75}[data-bs-theme=dark] .te-striped .te-tr:nth-child(2n){background:#2a2a3d}[data-bs-theme=dark] .te-tr:hover{background:#2a3a5c!important}[data-bs-theme=dark] .te-tr.te-tr-highlight{background:#1e3a5f!important;color:#e0e0e0}[data-bs-theme=dark] .te-tr.te-tr-selected td{background:#1e3050}[data-bs-theme=dark] .te-header-row .te-th{background:#2a2a3d;color:#e0e0e0;border-bottom-color:#4a4a65;border-right-color:#3a3a50}[data-bs-theme=dark] .te-header-row.te-has-groups .te-th{background:#333348}[data-bs-theme=dark] .te-header-group-row .te-th{background:#333348;color:#e0e0e0;border-right-color:#3a3a50}[data-bs-theme=dark] .te-th-label:hover{color:#60a5fa}[data-bs-theme=dark] .te-sort-icon-std{color:#64748b}[data-bs-theme=dark] .te-th-sorted{color:#60a5fa}[data-bs-theme=dark] .te-th-dragging{opacity:.35;background:#3a3a50!important}[data-bs-theme=dark] .te-th-dragover-left{background:#1e3050!important;box-shadow:inset 3px 0 #60a5fa}[data-bs-theme=dark] .te-th-dragover-right{background:#1e3050!important;box-shadow:inset -3px 0 #60a5fa}[data-bs-theme=dark] .te-drop-indicator{background:#60a5fa}[data-bs-theme=dark] .te-drop-indicator:after{background:#60a5fa}[data-bs-theme=dark] .te-resize-handle:before{background:#3a3a50}[data-bs-theme=dark] .te-resize-handle:hover:before,[data-bs-theme=dark] .te-resize-handle:active:before{background:#60a5fa}[data-bs-theme=dark] .te-filter-row .te-td{background:#252536}[data-bs-theme=dark] .te-filter-input{background:#2a2a3d;color:#e0e0e0;border-color:#3a3a50}[data-bs-theme=dark] .te-filter-input:focus{border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}[data-bs-theme=dark] .te-filter-select{background-color:#2a2a3d}[data-bs-theme=dark] .te-td{border-bottom-color:#2a2a3d;border-right-color:#2a2a3d}[data-bs-theme=dark] .te-empty{color:#6b7280}[data-bs-theme=dark] .te-paginator{background:#252536;border-color:#3a3a50}[data-bs-theme=dark] .te-page-info{color:#94a3b8}[data-bs-theme=dark] .te-page-btn{background:#1e1e2e;border-color:#3a3a50;color:#cbd5e1}[data-bs-theme=dark] .te-page-btn:hover:not(:disabled){background:#333348}[data-bs-theme=dark] .te-select{background:#1e1e2e;border-color:#3a3a50;color:#cbd5e1}[data-bs-theme=dark] .te-loading-overlay{background:#000000bf}[data-bs-theme=dark] .te-loading-spinner{border-color:#3a3a50;border-top-color:#60a5fa}[data-bs-theme=dark] .te-editing-input{border-color:#60a5fa;background:#2a2a3d;color:#e0e0e0;box-shadow:0 0 0 2px #60a5fa33}[data-bs-theme=dark] .te-inline-edit-btn{background:#3a3a50;color:#94a3b8}[data-bs-theme=dark] .te-inline-edit-btn:hover{background:#60a5fa;color:#fff}[data-bs-theme=dark] .te-dropdown-menu{background:#1e1e2e;border-color:#3a3a50}[data-bs-theme=dark] .te-dropdown-item:hover{background:#333348}[data-bs-theme=dark] .te-search-input{background:#1e1e2e;border-color:#3a3a50;color:#e2e8f0}[data-bs-theme=dark] .te-search-input:focus{border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}[data-bs-theme=dark] .te-search-icon{color:#64748b}[data-bs-theme=dark] .te-btn-outline-secondary{border-color:#6c757d;color:#94a3b8}[data-bs-theme=dark] .te-btn-outline-secondary:hover:not(:disabled){background:#6c757d;color:#fff}[data-bs-theme=dark] .te-btn-outline-info{border-color:#31d2f2;color:#7dd3fc}[data-bs-theme=dark] .te-checkbox{accent-color:#60a5fa}[data-bs-theme=dark] .te-toolbar-divider{color:#4a4a65}.te-mobile-list{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;padding:.5rem;background:#f5f7fa;align-items:start}@media (min-width: 768px){.te-mobile-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 992px){.te-mobile-list{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1200px){.te-mobile-list{grid-template-columns:repeat(4,minmax(0,1fr))}}.te-mobile-card{background:#fff;border:1px solid #dee2e6;border-radius:.375rem;padding:.6rem .75rem;cursor:pointer;transition:background .12s ease}.te-mobile-card:hover{background:#e8ecf4}.te-mobile-card.te-tr-selected{background:#dce8f5;border-color:#93b4e0}.te-mobile-card.te-tr-highlight{background:#c7d9f5}.te-mobile-card-head{display:flex;align-items:center;gap:.5rem;font-weight:600;color:#1f2b3d;margin-bottom:.35rem;min-width:0}.te-mobile-card-sel{display:inline-flex;align-items:center;flex-shrink:0}.te-mobile-card-title{word-break:break-word;min-width:0}.te-mobile-card-body{display:grid;grid-template-columns:minmax(5rem,40%) 1fr;gap:.2rem .75rem;margin:0;font-size:.85rem}.te-mobile-card-body dt{color:#6b7280;font-weight:500;margin:0}.te-mobile-card-body dd{margin:0;word-break:break-word}.te-mobile-card-actions{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.5rem;padding-top:.5rem;border-top:1px solid #eef1f6}.te-mobile-empty{background:#fff;border:1px solid #dee2e6;border-radius:.375rem;padding:1rem;text-align:center;color:#6b7280}
|