@regcheq/ui-vue-2 1.6.0 → 1.8.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/dist/index.css +130 -26
- package/dist/index.esm.js +353 -22
- package/dist/index.js +353 -22
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -32733,6 +32733,16 @@ var script$g = {
|
|
|
32733
32733
|
type: String,
|
|
32734
32734
|
default: 'default',
|
|
32735
32735
|
validator: v => ['default', 'round'].includes(v)
|
|
32736
|
+
},
|
|
32737
|
+
// Escape hatch para casos puntuales que no cubren las variantes semánticas
|
|
32738
|
+
// (ej: un color dinámico que viene de datos). Pisan el color de la variante.
|
|
32739
|
+
bgColor: {
|
|
32740
|
+
type: String,
|
|
32741
|
+
default: null
|
|
32742
|
+
},
|
|
32743
|
+
textColor: {
|
|
32744
|
+
type: String,
|
|
32745
|
+
default: null
|
|
32736
32746
|
}
|
|
32737
32747
|
},
|
|
32738
32748
|
computed: {
|
|
@@ -32741,6 +32751,12 @@ var script$g = {
|
|
|
32741
32751
|
variant: this.variant,
|
|
32742
32752
|
roundness: this.roundness
|
|
32743
32753
|
});
|
|
32754
|
+
},
|
|
32755
|
+
inlineStyle() {
|
|
32756
|
+
const style = {};
|
|
32757
|
+
if (this.bgColor) style.backgroundColor = this.bgColor;
|
|
32758
|
+
if (this.textColor) style.color = this.textColor;
|
|
32759
|
+
return style;
|
|
32744
32760
|
}
|
|
32745
32761
|
}
|
|
32746
32762
|
};
|
|
@@ -32754,7 +32770,8 @@ var __vue_render__$g = function () {
|
|
|
32754
32770
|
var _h = _vm.$createElement;
|
|
32755
32771
|
var _c = _vm._self._c || _h;
|
|
32756
32772
|
return _c("span", _vm._g(_vm._b({
|
|
32757
|
-
class: _vm.classes
|
|
32773
|
+
class: _vm.classes,
|
|
32774
|
+
style: _vm.inlineStyle
|
|
32758
32775
|
}, "span", _vm.$attrs, false), _vm.$listeners), [_vm._t("left"), _vm._v(" "), _vm._t("default"), _vm._v(" "), _vm._t("right")], 2);
|
|
32759
32776
|
};
|
|
32760
32777
|
var __vue_staticRenderFns__$g = [];
|
|
@@ -34249,7 +34266,7 @@ var __vue_render__$5 = function () {
|
|
|
34249
34266
|
}
|
|
34250
34267
|
}, [_vm._v("\n Limpiar selección\n ")])]), _vm._v(" "), _c("Button", {
|
|
34251
34268
|
attrs: {
|
|
34252
|
-
variant: "
|
|
34269
|
+
variant: "secondary",
|
|
34253
34270
|
size: "md",
|
|
34254
34271
|
"icon-right": "Trash2"
|
|
34255
34272
|
},
|
|
@@ -37326,7 +37343,7 @@ function useTable(props, emit) {
|
|
|
37326
37343
|
const left = columnPinning.value.left || [];
|
|
37327
37344
|
if (!left.length) return {};
|
|
37328
37345
|
const offsets = {};
|
|
37329
|
-
let accumulated = props.selectable ? 40 : 0;
|
|
37346
|
+
let accumulated = (props.expandable ? props.expandColWidth || 40 : 0) + (props.selectable ? 40 : 0);
|
|
37330
37347
|
left.forEach(key => {
|
|
37331
37348
|
offsets[key] = accumulated;
|
|
37332
37349
|
const col = props.columns.find(c => c.key === key);
|
|
@@ -37585,11 +37602,64 @@ function useTable(props, emit) {
|
|
|
37585
37602
|
//
|
|
37586
37603
|
//
|
|
37587
37604
|
//
|
|
37605
|
+
//
|
|
37606
|
+
//
|
|
37607
|
+
//
|
|
37608
|
+
//
|
|
37609
|
+
//
|
|
37610
|
+
//
|
|
37611
|
+
//
|
|
37612
|
+
//
|
|
37613
|
+
//
|
|
37614
|
+
//
|
|
37615
|
+
//
|
|
37616
|
+
//
|
|
37617
|
+
//
|
|
37618
|
+
//
|
|
37619
|
+
//
|
|
37620
|
+
//
|
|
37621
|
+
//
|
|
37622
|
+
//
|
|
37623
|
+
//
|
|
37624
|
+
//
|
|
37625
|
+
//
|
|
37626
|
+
//
|
|
37627
|
+
//
|
|
37628
|
+
//
|
|
37629
|
+
//
|
|
37630
|
+
//
|
|
37631
|
+
//
|
|
37632
|
+
//
|
|
37633
|
+
//
|
|
37634
|
+
//
|
|
37635
|
+
//
|
|
37636
|
+
//
|
|
37637
|
+
//
|
|
37638
|
+
//
|
|
37639
|
+
//
|
|
37640
|
+
//
|
|
37641
|
+
//
|
|
37642
|
+
//
|
|
37643
|
+
//
|
|
37644
|
+
//
|
|
37645
|
+
//
|
|
37646
|
+
//
|
|
37647
|
+
//
|
|
37648
|
+
//
|
|
37649
|
+
//
|
|
37650
|
+
//
|
|
37651
|
+
//
|
|
37652
|
+
//
|
|
37653
|
+
//
|
|
37654
|
+
//
|
|
37655
|
+
//
|
|
37656
|
+
//
|
|
37588
37657
|
|
|
37589
37658
|
var script$4 = {
|
|
37590
37659
|
name: 'Table',
|
|
37591
37660
|
components: {
|
|
37592
|
-
Checkbox: __vue_component__$j
|
|
37661
|
+
Checkbox: __vue_component__$j,
|
|
37662
|
+
Tooltip: __vue_component__$f
|
|
37593
37663
|
},
|
|
37594
37664
|
props: {
|
|
37595
37665
|
rows: {
|
|
@@ -37618,6 +37688,28 @@ var script$4 = {
|
|
|
37618
37688
|
},
|
|
37619
37689
|
maxHeight: {
|
|
37620
37690
|
type: Number,
|
|
37691
|
+
default: 460
|
|
37692
|
+
},
|
|
37693
|
+
expandable: {
|
|
37694
|
+
type: Boolean,
|
|
37695
|
+
default: false
|
|
37696
|
+
},
|
|
37697
|
+
// Alto fijo (no máximo) del contenido expandido; con scroll interno si el
|
|
37698
|
+
// contenido no entra.
|
|
37699
|
+
expandedRowHeight: {
|
|
37700
|
+
type: Number,
|
|
37701
|
+
default: 265
|
|
37702
|
+
},
|
|
37703
|
+
// Ancho de la columna de expandir en px. Default 40 (solo el chevron);
|
|
37704
|
+
// subilo si usás el slot `expand-cell` para agregar contenido extra.
|
|
37705
|
+
expandColWidth: {
|
|
37706
|
+
type: Number,
|
|
37707
|
+
default: 40
|
|
37708
|
+
},
|
|
37709
|
+
// { title, subtitle } para el estado "sin datos". Si no se pasa, se usa
|
|
37710
|
+
// un fallback genérico — el texto específico de dominio vive en el consumidor.
|
|
37711
|
+
emptyState: {
|
|
37712
|
+
type: Object,
|
|
37621
37713
|
default: null
|
|
37622
37714
|
}
|
|
37623
37715
|
},
|
|
@@ -37639,7 +37731,9 @@ var script$4 = {
|
|
|
37639
37731
|
colKey: null,
|
|
37640
37732
|
x: 0,
|
|
37641
37733
|
y: 0
|
|
37642
|
-
}
|
|
37734
|
+
},
|
|
37735
|
+
truncatedCells: {},
|
|
37736
|
+
expandedRowId: null
|
|
37643
37737
|
};
|
|
37644
37738
|
},
|
|
37645
37739
|
computed: {
|
|
@@ -37651,6 +37745,23 @@ var script$4 = {
|
|
|
37651
37745
|
},
|
|
37652
37746
|
PinIcon() {
|
|
37653
37747
|
return Pin;
|
|
37748
|
+
},
|
|
37749
|
+
ExpandIcon() {
|
|
37750
|
+
return ChevronRight;
|
|
37751
|
+
},
|
|
37752
|
+
fullColspan() {
|
|
37753
|
+
return this.columns.length + (this.selectable ? 1 : 0) + (this.expandable ? 1 : 0);
|
|
37754
|
+
},
|
|
37755
|
+
resolvedEmptyState() {
|
|
37756
|
+
return {
|
|
37757
|
+
title: this.emptyState?.title || 'Sin datos',
|
|
37758
|
+
subtitle: this.emptyState?.subtitle || ''
|
|
37759
|
+
};
|
|
37760
|
+
},
|
|
37761
|
+
// Offset sticky de la columna de selección: se corre a la derecha
|
|
37762
|
+
// del ancho de la columna de expandir, cuando ambas están activas
|
|
37763
|
+
selectColOffset() {
|
|
37764
|
+
return this.expandable ? this.expandColWidth : 0;
|
|
37654
37765
|
}
|
|
37655
37766
|
},
|
|
37656
37767
|
methods: {
|
|
@@ -37688,6 +37799,13 @@ var script$4 = {
|
|
|
37688
37799
|
};
|
|
37689
37800
|
}
|
|
37690
37801
|
},
|
|
37802
|
+
// Cierra el popover del chevron antes de arrastrar: su posición se calcula
|
|
37803
|
+
// una sola vez al abrirlo, y reordenar columnas la invalida (bug de
|
|
37804
|
+
// posicionamiento si quedaba abierto apuntando a la columna vieja).
|
|
37805
|
+
handleDragStart(columnKey) {
|
|
37806
|
+
this.closeAll();
|
|
37807
|
+
this.onDragStart(columnKey);
|
|
37808
|
+
},
|
|
37691
37809
|
onChevronClick(columnKey, event) {
|
|
37692
37810
|
this.contextMenu = {
|
|
37693
37811
|
visible: false,
|
|
@@ -37701,12 +37819,19 @@ var script$4 = {
|
|
|
37701
37819
|
}
|
|
37702
37820
|
this.toggleChevron(columnKey);
|
|
37703
37821
|
const th = event.currentTarget.closest('th');
|
|
37704
|
-
const tableRect = this.$el.getBoundingClientRect();
|
|
37705
37822
|
const thRect = th.getBoundingClientRect();
|
|
37823
|
+
// Coordenadas de viewport (no relativas a la tabla): el popover es
|
|
37824
|
+
// position:fixed para no quedar clippado por el overflow:clip de .rq-table
|
|
37706
37825
|
this.chevronPopoverPos = {
|
|
37707
|
-
top: thRect.bottom
|
|
37708
|
-
left: Math.max(100, thRect.left
|
|
37826
|
+
top: thRect.bottom + 4,
|
|
37827
|
+
left: Math.max(100, thRect.left + thRect.width / 2)
|
|
37709
37828
|
};
|
|
37829
|
+
this.$nextTick(() => {
|
|
37830
|
+
if (this.$refs.chevronPopover) {
|
|
37831
|
+
this._chevronPopoverEl = this.$refs.chevronPopover;
|
|
37832
|
+
document.body.appendChild(this._chevronPopoverEl);
|
|
37833
|
+
}
|
|
37834
|
+
});
|
|
37710
37835
|
},
|
|
37711
37836
|
openContextMenu(colKey, event) {
|
|
37712
37837
|
this.closeChevron();
|
|
@@ -37728,6 +37853,61 @@ var script$4 = {
|
|
|
37728
37853
|
x: 0,
|
|
37729
37854
|
y: 0
|
|
37730
37855
|
};
|
|
37856
|
+
},
|
|
37857
|
+
toggleExpand(rowId) {
|
|
37858
|
+
this.expandedRowId = this.expandedRowId === rowId ? null : rowId;
|
|
37859
|
+
this.$emit('update:expanded-row-id', this.expandedRowId);
|
|
37860
|
+
if (this.expandedRowId) {
|
|
37861
|
+
this.$nextTick(() => this.scrollExpandedIntoView());
|
|
37862
|
+
}
|
|
37863
|
+
},
|
|
37864
|
+
// Al expandir una fila, scrollea el contenedor propio de la tabla para
|
|
37865
|
+
// hacer visible el contenido desplegado (no toca el scroll de la página).
|
|
37866
|
+
scrollExpandedIntoView() {
|
|
37867
|
+
const scroll = this.$el.querySelector('.rq-table__scroll');
|
|
37868
|
+
const expanded = this.$el.querySelector('.rq-table__tr--expanded');
|
|
37869
|
+
if (!scroll || !expanded) return;
|
|
37870
|
+
const scrollRect = scroll.getBoundingClientRect();
|
|
37871
|
+
const expandedRect = expanded.getBoundingClientRect();
|
|
37872
|
+
const bottomDelta = expandedRect.bottom - scrollRect.bottom;
|
|
37873
|
+
if (bottomDelta > 0) {
|
|
37874
|
+
// no scrollear más allá de dejar el inicio del contenido visible
|
|
37875
|
+
const topDelta = expandedRect.top - scrollRect.top;
|
|
37876
|
+
scroll.scrollTo({
|
|
37877
|
+
top: scroll.scrollTop + Math.min(bottomDelta, topDelta),
|
|
37878
|
+
behavior: 'smooth'
|
|
37879
|
+
});
|
|
37880
|
+
}
|
|
37881
|
+
},
|
|
37882
|
+
cellKey(rowId, headerId) {
|
|
37883
|
+
return `${rowId}::${headerId}`;
|
|
37884
|
+
},
|
|
37885
|
+
isTruncated(rowId, headerId) {
|
|
37886
|
+
return !!this.truncatedCells[this.cellKey(rowId, headerId)];
|
|
37887
|
+
},
|
|
37888
|
+
// Compara scrollWidth vs clientWidth de cada celda de texto plano para
|
|
37889
|
+
// saber cuáles están recortadas por el ellipsis y solo a esas envolverlas
|
|
37890
|
+
// en Tooltip. Se dispara por watchers, nunca desde el hook `updated`,
|
|
37891
|
+
// para no re-medir en loop cuando truncatedCells cambia.
|
|
37892
|
+
measureTruncatedCells() {
|
|
37893
|
+
if (!this.$el) return;
|
|
37894
|
+
const els = this.$el.querySelectorAll('.rq-table__cell-text[data-cell-key]');
|
|
37895
|
+
const result = {};
|
|
37896
|
+
els.forEach(el => {
|
|
37897
|
+
result[el.dataset.cellKey] = el.scrollWidth > el.clientWidth;
|
|
37898
|
+
});
|
|
37899
|
+
this.truncatedCells = result;
|
|
37900
|
+
}
|
|
37901
|
+
},
|
|
37902
|
+
watch: {
|
|
37903
|
+
tableRows() {
|
|
37904
|
+
this.$nextTick(this.measureTruncatedCells);
|
|
37905
|
+
},
|
|
37906
|
+
columns: {
|
|
37907
|
+
handler() {
|
|
37908
|
+
this.$nextTick(this.measureTruncatedCells);
|
|
37909
|
+
},
|
|
37910
|
+
deep: true
|
|
37731
37911
|
}
|
|
37732
37912
|
},
|
|
37733
37913
|
mounted() {
|
|
@@ -37735,12 +37915,28 @@ var script$4 = {
|
|
|
37735
37915
|
if (e.key === 'Escape') this.closeAll();
|
|
37736
37916
|
};
|
|
37737
37917
|
this._onDocumentClick = () => this.closeAll();
|
|
37918
|
+
this._onResize = () => this.measureTruncatedCells();
|
|
37919
|
+
// El popover del chevron es position:fixed (coordenadas de viewport);
|
|
37920
|
+
// si cualquier ancestro scrollea (capture:true, scroll no burbujea),
|
|
37921
|
+
// se cierra en vez de quedar desalineado de su columna.
|
|
37922
|
+
this._onScroll = () => this.closeChevron();
|
|
37738
37923
|
document.addEventListener('keydown', this._onKeydown);
|
|
37739
37924
|
document.addEventListener('click', this._onDocumentClick);
|
|
37925
|
+
window.addEventListener('resize', this._onResize);
|
|
37926
|
+
window.addEventListener('scroll', this._onScroll, true);
|
|
37927
|
+
this.$nextTick(this.measureTruncatedCells);
|
|
37740
37928
|
},
|
|
37741
37929
|
beforeDestroy() {
|
|
37742
37930
|
document.removeEventListener('keydown', this._onKeydown);
|
|
37743
37931
|
document.removeEventListener('click', this._onDocumentClick);
|
|
37932
|
+
window.removeEventListener('resize', this._onResize);
|
|
37933
|
+
window.removeEventListener('scroll', this._onScroll, true);
|
|
37934
|
+
// El popover del chevron se mueve a document.body al abrirse (fuera del
|
|
37935
|
+
// árbol de la tabla); si el componente se destruye con el popover abierto,
|
|
37936
|
+
// destruir el root de la tabla no lo alcanza — hay que sacarlo a mano.
|
|
37937
|
+
if (this._chevronPopoverEl && this._chevronPopoverEl.parentNode) {
|
|
37938
|
+
this._chevronPopoverEl.parentNode.removeChild(this._chevronPopoverEl);
|
|
37939
|
+
}
|
|
37744
37940
|
}
|
|
37745
37941
|
};
|
|
37746
37942
|
|
|
@@ -37767,11 +37963,20 @@ var __vue_render__$4 = function () {
|
|
|
37767
37963
|
return _c("tr", {
|
|
37768
37964
|
key: headerGroup.id,
|
|
37769
37965
|
staticClass: "rq-table__tr rq-table__tr--head"
|
|
37770
|
-
}, [_vm.
|
|
37771
|
-
staticClass: "rq-table__th rq-table__th--
|
|
37966
|
+
}, [_vm.expandable ? _c("th", {
|
|
37967
|
+
staticClass: "rq-table__th rq-table__th--expand",
|
|
37772
37968
|
style: {
|
|
37773
37969
|
position: "sticky",
|
|
37774
37970
|
left: 0,
|
|
37971
|
+
zIndex: 5,
|
|
37972
|
+
width: _vm.expandColWidth + "px",
|
|
37973
|
+
minWidth: _vm.expandColWidth + "px"
|
|
37974
|
+
}
|
|
37975
|
+
}) : _vm._e(), _vm._v(" "), _vm.selectable ? _c("th", {
|
|
37976
|
+
staticClass: "rq-table__th rq-table__th--select",
|
|
37977
|
+
style: {
|
|
37978
|
+
position: "sticky",
|
|
37979
|
+
left: _vm.selectColOffset + "px",
|
|
37775
37980
|
zIndex: 5
|
|
37776
37981
|
}
|
|
37777
37982
|
}, [_c("Checkbox", {
|
|
@@ -37797,7 +38002,7 @@ var __vue_render__$4 = function () {
|
|
|
37797
38002
|
},
|
|
37798
38003
|
on: {
|
|
37799
38004
|
dragstart: function ($event) {
|
|
37800
|
-
return _vm.
|
|
38005
|
+
return _vm.handleDragStart(header.id);
|
|
37801
38006
|
},
|
|
37802
38007
|
dragover: function ($event) {
|
|
37803
38008
|
$event.preventDefault();
|
|
@@ -37840,12 +38045,18 @@ var __vue_render__$4 = function () {
|
|
|
37840
38045
|
}, [_c("td", {
|
|
37841
38046
|
staticClass: "rq-table__td rq-table__td--empty",
|
|
37842
38047
|
attrs: {
|
|
37843
|
-
colspan: _vm.
|
|
38048
|
+
colspan: _vm.fullColspan
|
|
37844
38049
|
}
|
|
37845
38050
|
}, [_vm._t("empty", function () {
|
|
37846
|
-
return [_c("
|
|
38051
|
+
return [_c("div", {
|
|
38052
|
+
staticClass: "rq-table__empty-state"
|
|
38053
|
+
}, [_c("p", {
|
|
38054
|
+
staticClass: "rq-table__empty-title"
|
|
38055
|
+
}, [_vm._v(_vm._s(_vm.resolvedEmptyState.title))]), _vm._v(" "), _vm.resolvedEmptyState.subtitle ? _c("p", {
|
|
38056
|
+
staticClass: "rq-table__empty-subtitle"
|
|
38057
|
+
}, [_vm._v(_vm._s(_vm.resolvedEmptyState.subtitle))]) : _vm._e()])];
|
|
37847
38058
|
})], 2)]) : _vm._e(), _vm._v(" "), _vm._l(_vm.tableRows, function (row) {
|
|
37848
|
-
return _c("tr", {
|
|
38059
|
+
return [_c("tr", {
|
|
37849
38060
|
key: row.id,
|
|
37850
38061
|
staticClass: "rq-table__tr rq-table__tr--body",
|
|
37851
38062
|
on: {
|
|
@@ -37853,11 +38064,43 @@ var __vue_render__$4 = function () {
|
|
|
37853
38064
|
return _vm.$emit("row-click", row.original);
|
|
37854
38065
|
}
|
|
37855
38066
|
}
|
|
37856
|
-
}, [_vm.
|
|
37857
|
-
staticClass: "rq-table__td rq-table__td--
|
|
38067
|
+
}, [_vm.expandable ? _c("td", {
|
|
38068
|
+
staticClass: "rq-table__td rq-table__td--expand",
|
|
37858
38069
|
style: {
|
|
37859
38070
|
position: "sticky",
|
|
37860
38071
|
left: 0,
|
|
38072
|
+
zIndex: 2,
|
|
38073
|
+
width: _vm.expandColWidth + "px",
|
|
38074
|
+
minWidth: _vm.expandColWidth + "px"
|
|
38075
|
+
}
|
|
38076
|
+
}, [_c("div", {
|
|
38077
|
+
staticClass: "rq-table__expand-cell"
|
|
38078
|
+
}, [_c("button", {
|
|
38079
|
+
staticClass: "rq-table__expand-btn",
|
|
38080
|
+
class: {
|
|
38081
|
+
"rq-table__expand-btn--active": _vm.expandedRowId === row.id
|
|
38082
|
+
},
|
|
38083
|
+
attrs: {
|
|
38084
|
+
type: "button"
|
|
38085
|
+
},
|
|
38086
|
+
on: {
|
|
38087
|
+
click: function ($event) {
|
|
38088
|
+
$event.stopPropagation();
|
|
38089
|
+
return _vm.toggleExpand(row.id);
|
|
38090
|
+
}
|
|
38091
|
+
}
|
|
38092
|
+
}, [_c(_vm.ExpandIcon, {
|
|
38093
|
+
tag: "component",
|
|
38094
|
+
attrs: {
|
|
38095
|
+
size: 14
|
|
38096
|
+
}
|
|
38097
|
+
})], 1), _vm._v(" "), _vm._t("expand-cell", null, {
|
|
38098
|
+
row: row.original
|
|
38099
|
+
})], 2)]) : _vm._e(), _vm._v(" "), _vm.selectable ? _c("td", {
|
|
38100
|
+
staticClass: "rq-table__td rq-table__td--select",
|
|
38101
|
+
style: {
|
|
38102
|
+
position: "sticky",
|
|
38103
|
+
left: _vm.selectColOffset + "px",
|
|
37861
38104
|
zIndex: 2
|
|
37862
38105
|
},
|
|
37863
38106
|
on: {
|
|
@@ -37883,12 +38126,42 @@ var __vue_render__$4 = function () {
|
|
|
37883
38126
|
},
|
|
37884
38127
|
style: _vm.getColStyle(header)
|
|
37885
38128
|
}, [_vm._t("cell-" + header.id, function () {
|
|
37886
|
-
return [_vm.
|
|
38129
|
+
return [_vm.isTruncated(row.id, header.id) ? _c("Tooltip", {
|
|
38130
|
+
staticClass: "rq-table__cell-tooltip",
|
|
38131
|
+
attrs: {
|
|
38132
|
+
text: String(row.getValue(header.id))
|
|
38133
|
+
}
|
|
38134
|
+
}, [_c("span", {
|
|
38135
|
+
staticClass: "rq-table__cell-text",
|
|
38136
|
+
attrs: {
|
|
38137
|
+
"data-cell-key": _vm.cellKey(row.id, header.id)
|
|
38138
|
+
}
|
|
38139
|
+
}, [_vm._v(_vm._s(row.getValue(header.id)))])]) : _c("span", {
|
|
38140
|
+
staticClass: "rq-table__cell-text",
|
|
38141
|
+
attrs: {
|
|
38142
|
+
"data-cell-key": _vm.cellKey(row.id, header.id)
|
|
38143
|
+
}
|
|
38144
|
+
}, [_vm._v(_vm._s(row.getValue(header.id)))])];
|
|
37887
38145
|
}, {
|
|
37888
38146
|
row: row.original,
|
|
37889
38147
|
value: row.getValue(header.id)
|
|
37890
38148
|
})], 2);
|
|
37891
|
-
})], 2)
|
|
38149
|
+
})], 2), _vm._v(" "), _vm.expandable && _vm.expandedRowId === row.id ? _c("tr", {
|
|
38150
|
+
key: row.id + "-expanded",
|
|
38151
|
+
staticClass: "rq-table__tr rq-table__tr--expanded"
|
|
38152
|
+
}, [_c("td", {
|
|
38153
|
+
staticClass: "rq-table__td rq-table__td--expanded",
|
|
38154
|
+
attrs: {
|
|
38155
|
+
colspan: _vm.fullColspan
|
|
38156
|
+
}
|
|
38157
|
+
}, [_c("div", {
|
|
38158
|
+
staticClass: "rq-table__expanded-content",
|
|
38159
|
+
style: {
|
|
38160
|
+
height: _vm.expandedRowHeight + "px"
|
|
38161
|
+
}
|
|
38162
|
+
}, [_vm._t("expanded-row", null, {
|
|
38163
|
+
row: row.original
|
|
38164
|
+
})], 2)])]) : _vm._e()];
|
|
37892
38165
|
})], 2)])]), _vm._v(" "), _vm.contextMenu.visible ? _c("div", {
|
|
37893
38166
|
staticClass: "rq-table__context-menu",
|
|
37894
38167
|
style: {
|
|
@@ -37914,6 +38187,7 @@ var __vue_render__$4 = function () {
|
|
|
37914
38187
|
size: 14
|
|
37915
38188
|
}
|
|
37916
38189
|
}), _vm._v("\n " + _vm._s(_vm.contextMenu.colKey in _vm.pinnedLeftWidths ? "Desfijar columna" : "Fijar columna") + "\n ")], 1)]) : _vm._e(), _vm._v(" "), _vm.activeChevronKey ? _c("div", {
|
|
38190
|
+
ref: "chevronPopover",
|
|
37917
38191
|
staticClass: "rq-table__chevron-popover",
|
|
37918
38192
|
style: {
|
|
37919
38193
|
top: _vm.chevronPopoverPos.top + "px",
|
|
@@ -38023,6 +38297,24 @@ const dataTableVariants = cva('rq-data-table', {
|
|
|
38023
38297
|
//
|
|
38024
38298
|
//
|
|
38025
38299
|
//
|
|
38300
|
+
//
|
|
38301
|
+
//
|
|
38302
|
+
//
|
|
38303
|
+
//
|
|
38304
|
+
//
|
|
38305
|
+
//
|
|
38306
|
+
//
|
|
38307
|
+
//
|
|
38308
|
+
//
|
|
38309
|
+
//
|
|
38310
|
+
//
|
|
38311
|
+
//
|
|
38312
|
+
//
|
|
38313
|
+
//
|
|
38314
|
+
//
|
|
38315
|
+
//
|
|
38316
|
+
//
|
|
38317
|
+
//
|
|
38026
38318
|
|
|
38027
38319
|
var script$3 = {
|
|
38028
38320
|
name: 'DataTable',
|
|
@@ -38084,11 +38376,27 @@ var script$3 = {
|
|
|
38084
38376
|
},
|
|
38085
38377
|
maxHeight: {
|
|
38086
38378
|
type: Number,
|
|
38087
|
-
default:
|
|
38379
|
+
default: 460
|
|
38088
38380
|
},
|
|
38089
38381
|
deleteLabel: {
|
|
38090
38382
|
type: String,
|
|
38091
38383
|
default: 'Eliminar'
|
|
38384
|
+
},
|
|
38385
|
+
expandable: {
|
|
38386
|
+
type: Boolean,
|
|
38387
|
+
default: false
|
|
38388
|
+
},
|
|
38389
|
+
expandedRowHeight: {
|
|
38390
|
+
type: Number,
|
|
38391
|
+
default: 265
|
|
38392
|
+
},
|
|
38393
|
+
expandColWidth: {
|
|
38394
|
+
type: Number,
|
|
38395
|
+
default: 40
|
|
38396
|
+
},
|
|
38397
|
+
emptyState: {
|
|
38398
|
+
type: Object,
|
|
38399
|
+
default: null
|
|
38092
38400
|
}
|
|
38093
38401
|
},
|
|
38094
38402
|
data() {
|
|
@@ -38134,6 +38442,8 @@ var __vue_render__$3 = function () {
|
|
|
38134
38442
|
var _c = _vm._self._c || _h;
|
|
38135
38443
|
return _c("div", {
|
|
38136
38444
|
class: _vm.classes
|
|
38445
|
+
}, [_vm.showSearch || _vm.$slots.actions ? _c("div", {
|
|
38446
|
+
staticClass: "rq-data-table__search-row"
|
|
38137
38447
|
}, [_vm.showSearch ? _c("SearchInput", {
|
|
38138
38448
|
staticClass: "rq-data-table__search-bar",
|
|
38139
38449
|
attrs: {
|
|
@@ -38147,7 +38457,11 @@ var __vue_render__$3 = function () {
|
|
|
38147
38457
|
return _vm.$emit("update:search", $event);
|
|
38148
38458
|
}
|
|
38149
38459
|
}
|
|
38150
|
-
}) : _vm._e(), _vm._v(" "), _vm.
|
|
38460
|
+
}) : _vm._e(), _vm._v(" "), _vm.$slots.actions ? _c("div", {
|
|
38461
|
+
staticClass: "rq-data-table__actions"
|
|
38462
|
+
}, [_vm._t("actions")], 2) : _vm._e()], 1) : _vm._e(), _vm._v(" "), _vm.selectable ? _c("div", {
|
|
38463
|
+
staticClass: "rq-data-table__selection-slot"
|
|
38464
|
+
}, [_vm.selectedCount > 0 ? _c("SelectionBar", {
|
|
38151
38465
|
attrs: {
|
|
38152
38466
|
count: _vm.selectedCount,
|
|
38153
38467
|
"delete-label": _vm.deleteLabel
|
|
@@ -38158,7 +38472,7 @@ var __vue_render__$3 = function () {
|
|
|
38158
38472
|
return _vm.$emit("delete-selected", _vm.selectedRows);
|
|
38159
38473
|
}
|
|
38160
38474
|
}
|
|
38161
|
-
}) : _vm._e(), _vm._v(" "), _c("Table", {
|
|
38475
|
+
}) : _vm._e()], 1) : _vm._e(), _vm._v(" "), _c("Table", {
|
|
38162
38476
|
ref: "table",
|
|
38163
38477
|
attrs: {
|
|
38164
38478
|
columns: _vm.columns,
|
|
@@ -38167,7 +38481,11 @@ var __vue_render__$3 = function () {
|
|
|
38167
38481
|
"pinned-columns": _vm.pinnedColumns,
|
|
38168
38482
|
selectable: _vm.selectable,
|
|
38169
38483
|
"row-id": _vm.rowId,
|
|
38170
|
-
"max-height": _vm.maxHeight
|
|
38484
|
+
"max-height": _vm.maxHeight,
|
|
38485
|
+
expandable: _vm.expandable,
|
|
38486
|
+
"expanded-row-height": _vm.expandedRowHeight,
|
|
38487
|
+
"expand-col-width": _vm.expandColWidth,
|
|
38488
|
+
"empty-state": _vm.emptyState
|
|
38171
38489
|
},
|
|
38172
38490
|
on: {
|
|
38173
38491
|
"row-click": function ($event) {
|
|
@@ -38179,6 +38497,9 @@ var __vue_render__$3 = function () {
|
|
|
38179
38497
|
},
|
|
38180
38498
|
"update:pinned-columns": function ($event) {
|
|
38181
38499
|
return _vm.$emit("update:pinned-columns", $event);
|
|
38500
|
+
},
|
|
38501
|
+
"update:expanded-row-id": function ($event) {
|
|
38502
|
+
return _vm.$emit("update:expanded-row-id", $event);
|
|
38182
38503
|
}
|
|
38183
38504
|
},
|
|
38184
38505
|
scopedSlots: _vm._u([_vm._l(_vm.columns, function (col) {
|
|
@@ -38202,6 +38523,16 @@ var __vue_render__$3 = function () {
|
|
|
38202
38523
|
return [_vm._t("empty")];
|
|
38203
38524
|
},
|
|
38204
38525
|
proxy: true
|
|
38526
|
+
}, {
|
|
38527
|
+
key: "expanded-row",
|
|
38528
|
+
fn: function (slotProps) {
|
|
38529
|
+
return [_vm._t("expanded-row", null, null, slotProps)];
|
|
38530
|
+
}
|
|
38531
|
+
}, {
|
|
38532
|
+
key: "expand-cell",
|
|
38533
|
+
fn: function (slotProps) {
|
|
38534
|
+
return [_vm._t("expand-cell", null, null, slotProps)];
|
|
38535
|
+
}
|
|
38205
38536
|
}], null, true)
|
|
38206
38537
|
}), _vm._v(" "), _c("div", {
|
|
38207
38538
|
staticClass: "rq-data-table__pagination"
|