|
|
@@ -1,4 +1,3 @@
|
|
|
-/* preview-excel-document.component.css */
|
|
|
|
|
|
.preview-excel-container {
|
|
|
max-width: 100%;
|
|
|
@@ -7,7 +6,7 @@
|
|
|
flex-direction: column;
|
|
|
background: #fafafa;
|
|
|
overflow: hidden;
|
|
|
- position: relative; /* Agregado para contener elementos posicionados */
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.excel-table {
|
|
|
@@ -32,7 +31,7 @@
|
|
|
color: #adb5bd;
|
|
|
}
|
|
|
|
|
|
-/* Indicador visual para columnas de ID */
|
|
|
+
|
|
|
.id-column-header {
|
|
|
background: linear-gradient(to bottom, #e3f2fd, #bbdefb) !important;
|
|
|
position: relative;
|
|
|
@@ -76,8 +75,13 @@
|
|
|
}
|
|
|
|
|
|
.data-cell {
|
|
|
- transition: all 0.2s ease;
|
|
|
+ min-width: 140px;
|
|
|
+ max-width: 250px;
|
|
|
+ padding: 12px 16px;
|
|
|
+ border-right: 1px solid #dee2e6;
|
|
|
+ vertical-align: middle;
|
|
|
position: relative;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
.data-cell:hover {
|
|
|
@@ -89,25 +93,181 @@
|
|
|
}
|
|
|
|
|
|
.cell-input {
|
|
|
- transition: all 0.2s ease;
|
|
|
+ width: 100%;
|
|
|
+ border: 1px solid #aabaca;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 8px;
|
|
|
+ font-size: 13px;
|
|
|
+ font-family: 'Roboto', sans-serif;
|
|
|
+ background: white;
|
|
|
outline: none;
|
|
|
+ box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
|
|
|
+ text-align: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin: 0;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
+.data-cell .cell-content {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ /* Control de overflow para contenido de celda */
|
|
|
+ overflow: hidden;
|
|
|
+ word-wrap: break-word;
|
|
|
+ word-break: break-word;
|
|
|
+ hyphens: auto;
|
|
|
+
|
|
|
+ /* Para textos muy largos */
|
|
|
+
|
|
|
+ /* Mejor manejo de líneas múltiples */
|
|
|
+ white-space: pre-wrap; /* Permitir saltos de línea */
|
|
|
+
|
|
|
+ /* Padding interno para mejor legibilidad */
|
|
|
+ padding: 2px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.data-cell:hover .cell-content {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+.cell-input.disabled-cell {
|
|
|
+ background-color: #f8f9fa !important;
|
|
|
+ color: #6c757d !important;
|
|
|
+ cursor: not-allowed !important;
|
|
|
+ border-color: #e9ecef !important;
|
|
|
+ text-align: center !important;
|
|
|
+}
|
|
|
+
|
|
|
+.disabled-cell {
|
|
|
+ text-align: center !important;
|
|
|
+ display: flex !important;
|
|
|
+ align-items: center !important;
|
|
|
+ justify-content: center !important;
|
|
|
+}
|
|
|
+
|
|
|
+.excel-table td,
|
|
|
+.excel-table th {
|
|
|
+ vertical-align: middle;
|
|
|
+}
|
|
|
+
|
|
|
+.data-cell > * {
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+
|
|
|
+.cell-content {
|
|
|
+ min-height: 20px;
|
|
|
+ white-space: pre-wrap;
|
|
|
+ word-wrap: break-word;
|
|
|
+ font-family: 'Roboto', sans-serif;
|
|
|
+ color: #424242;
|
|
|
+ line-height: 1.4;
|
|
|
+ cursor: pointer;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.cell-input:focus {
|
|
|
- border-color: #1976d2 !important;
|
|
|
- box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
|
|
|
+ border-color: #007bff !important;
|
|
|
+ box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
.row-number {
|
|
|
- background: #f8f9fa !important;
|
|
|
+ width: 60px;
|
|
|
+ padding: 12px 8px;
|
|
|
+ border-right: 1px solid #dee2e6;
|
|
|
+ text-align: center;
|
|
|
font-weight: 500;
|
|
|
color: #6c757d;
|
|
|
- border-right: 2px solid #dee2e6 !important;
|
|
|
+ font-size: 12px;
|
|
|
+ background: #f8f9fa !important;
|
|
|
+ vertical-align: middle;
|
|
|
+}
|
|
|
+.row-number > div {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 4px;
|
|
|
+ height: 100%;
|
|
|
+ min-height: 20px;
|
|
|
}
|
|
|
|
|
|
+.row-number .mat-icon-button {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ color: #dc3545;
|
|
|
+ display: flex; /* Usar flexbox para centrar el ícono */
|
|
|
+ align-items: center; /* Centrar verticalmente el ícono */
|
|
|
+ justify-content: center; /* Centrar horizontalmente el ícono */
|
|
|
+ padding: 0; /* Eliminar padding por defecto */
|
|
|
+ margin: 0; /* Eliminar margen por defecto */
|
|
|
+}
|
|
|
+
|
|
|
+.row-number .mat-icon-button .mat-icon {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 1; /* Eliminar espacio extra */
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
.column-header {
|
|
|
- background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
|
|
|
- border-bottom: 2px solid #dee2e6;
|
|
|
+ min-width: 140px;
|
|
|
+ padding: 12px 16px;
|
|
|
+ border-right: 1px solid #dee2e6;
|
|
|
+ text-align: center; /* Centrar el texto del header */
|
|
|
+ font-weight: 600;
|
|
|
+ color: #495057;
|
|
|
+ font-size: 12px;
|
|
|
+ position: relative;
|
|
|
+ vertical-align: middle; /* Centrar verticalmente */
|
|
|
+}
|
|
|
+
|
|
|
+.column-header > div {
|
|
|
+ display: flex;
|
|
|
+ align-items: center; /* Centrar verticalmente */
|
|
|
+ justify-content: space-between; /* Distribuir espacio entre texto e ícono */
|
|
|
+ height: 100%;
|
|
|
+ min-height: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.column-header > div > span {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center; /* Centrar el texto del header */
|
|
|
+ gap: 4px;
|
|
|
+ flex-grow: 1; /* Ocupar el espacio disponible */
|
|
|
+}
|
|
|
+
|
|
|
+.column-header .mat-icon-button {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ color: #dc3545;
|
|
|
+ opacity: 0.7;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.column-header .mat-icon-button .mat-icon {
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
|
|
|
.table-container {
|
|
|
@@ -117,8 +277,8 @@
|
|
|
border-radius: 8px;
|
|
|
margin: 0 16px;
|
|
|
overflow: auto;
|
|
|
- margin-bottom: 0; /* Removido el margen inferior */
|
|
|
- min-height: 0; /* Permite que el flex funcione correctamente */
|
|
|
+ margin-bottom: 0;
|
|
|
+ min-height: 0;
|
|
|
}
|
|
|
|
|
|
.table-container::-webkit-scrollbar {
|
|
|
@@ -144,7 +304,7 @@
|
|
|
background: linear-gradient(to bottom, #ffffff, #f8f9fa);
|
|
|
border-bottom: 1px solid #e0e0e0;
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
|
- flex-shrink: 0; /* Evita que el header se encoja */
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
|
|
|
|
.table-summary {
|
|
|
@@ -157,8 +317,7 @@
|
|
|
font-size: 13px;
|
|
|
color: #6c757d;
|
|
|
min-height: 48px;
|
|
|
- /* Removido position: fixed y propiedades relacionadas */
|
|
|
- flex-shrink: 0; /* Evita que se encoja */
|
|
|
+ flex-shrink: 0;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
@@ -166,8 +325,7 @@
|
|
|
background: linear-gradient(to bottom, #ffffff, #f8f9fa);
|
|
|
border-top: 1px solid #e0e0e0;
|
|
|
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
|
|
|
- /* Removido position: fixed y propiedades relacionadas */
|
|
|
- flex-shrink: 0; /* Evita que se encoja */
|
|
|
+ flex-shrink: 0;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
@@ -175,6 +333,10 @@
|
|
|
animation: pulse 2s infinite;
|
|
|
}
|
|
|
|
|
|
+.sheet-selector{
|
|
|
+ margin-top: 15px;
|
|
|
+}
|
|
|
+
|
|
|
@keyframes pulse {
|
|
|
0% { opacity: 1; }
|
|
|
50% { opacity: 0.7; }
|
|
|
@@ -191,34 +353,27 @@
|
|
|
color: #6c757d;
|
|
|
}
|
|
|
|
|
|
-/* Responsive */
|
|
|
@media (max-width: 768px) {
|
|
|
- .excel-table {
|
|
|
- font-size: 12px;
|
|
|
+ .cell-input {
|
|
|
+ text-align: center;
|
|
|
+ padding: 6px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cell-content {
|
|
|
+ text-align: center;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
|
|
|
.column-header,
|
|
|
.data-cell {
|
|
|
- min-width: 100px;
|
|
|
- padding: 8px 12px;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
.row-number {
|
|
|
- width: 40px;
|
|
|
- padding: 8px 4px;
|
|
|
- }
|
|
|
-
|
|
|
- .header-controls {
|
|
|
- flex-direction: column;
|
|
|
- gap: 12px;
|
|
|
- }
|
|
|
-
|
|
|
- .edit-controls {
|
|
|
- justify-content: center;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* Mejoras de accesibilidad */
|
|
|
.excel-table:focus-within {
|
|
|
outline: 2px solid #1976d2;
|
|
|
outline-offset: 2px;
|
|
|
@@ -229,7 +384,6 @@ button:focus {
|
|
|
outline-offset: 2px;
|
|
|
}
|
|
|
|
|
|
-/* Estados de carga */
|
|
|
.loading-state {
|
|
|
opacity: 0.6;
|
|
|
pointer-events: none;
|
|
|
@@ -255,7 +409,6 @@ button:focus {
|
|
|
|
|
|
|
|
|
|
|
|
-/* Estilos adicionales para mejorar la experiencia de edición */
|
|
|
.cell-input:focus {
|
|
|
border-color: #007bff !important;
|
|
|
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
|
|
|
@@ -281,11 +434,90 @@ button:focus {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
|
|
|
-/* Animaciones suaves */
|
|
|
.preview-excel-container {
|
|
|
animation: fadeIn 0.3s ease-in-out;
|
|
|
}
|
|
|
|
|
|
+.edit-controls {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.edit-controls > button[mat-icon-button] {
|
|
|
+ border-radius: 10px;
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ padding: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.edit-controls > button[mat-icon-button] .mat-icon {
|
|
|
+ margin: 0 !important;
|
|
|
+ line-height: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.edit-controls ng-container {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+}
|
|
|
+
|
|
|
+.edit-controls ng-container button[mat-icon-button] {
|
|
|
+ border-radius: 8px;
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ padding: 0;
|
|
|
+ vertical-align: middle;
|
|
|
+}
|
|
|
+
|
|
|
+.edit-controls ng-container button[mat-icon-button] object {
|
|
|
+ width: 24px !important;
|
|
|
+ height: 24px !important;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.edit-controls * {
|
|
|
+ vertical-align: middle;
|
|
|
+}
|
|
|
+
|
|
|
+.header-controls {
|
|
|
+ display: flex;
|
|
|
+ gap: 16px;
|
|
|
+ width: 100%;
|
|
|
+ justify-content: end;
|
|
|
+ align-items: center;
|
|
|
+ min-height: 48px;
|
|
|
+}
|
|
|
+
|
|
|
+.header-controls > * {
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+}
|
|
|
+
|
|
|
+button[mat-icon-button][color="warn"],
|
|
|
+button[mat-icon-button][color="primary"] {
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+ align-self: center;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@keyframes fadeIn {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
@@ -297,7 +529,7 @@ button:focus {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* Responsive design */
|
|
|
+
|
|
|
@media (max-width: 768px) {
|
|
|
.header-controls {
|
|
|
flex-direction: column;
|