@innertia-solutions/innertia-nuxt 0.1.32 → 0.1.33

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.
@@ -23,10 +23,14 @@ const props = defineProps({
23
23
 
24
24
  // Column visibility — map { [colKey]: boolean }. Si null, todas visibles.
25
25
  columnVisibility: { type: Object, default: null },
26
+
27
+ // Resalta la fila cuyo id coincide (selección externa via @row-click).
28
+ selectedId: { type: [String, Number], default: null },
26
29
  })
27
30
 
28
31
  const emit = defineEmits(['toggle', 'row-click', 'check'])
29
32
 
33
+ const isSelected = computed(() => props.selectedId != null && props.node.id === props.selectedId)
30
34
  const isExpanded = computed(() => props.expanded.has(props.node.id))
31
35
  const isLoading = computed(() => props.loadingSet.has(props.node.id))
32
36
  const hasChildren = computed(() => !!props.node.has_children)
@@ -79,7 +83,7 @@ const indentPx = computed(() => props.depth * 20)
79
83
  class="bg-card hover:bg-layer-hover transition-colors"
80
84
  :class="[
81
85
  clickableRows ? 'cursor-pointer' : '',
82
- isChecked ? 'bg-primary/5' : '',
86
+ isSelected ? 'bg-primary/10 hover:bg-primary/10' : (isChecked ? 'bg-primary/5' : ''),
83
87
  ]"
84
88
  @click="onRowClick"
85
89
  >
@@ -154,6 +158,7 @@ const indentPx = computed(() => props.depth * 20)
154
158
  :checked-set="checkedSet"
155
159
  :indeterminate-set="indeterminateSet"
156
160
  :column-visibility="columnVisibility"
161
+ :selected-id="selectedId"
157
162
  @toggle="(n) => emit('toggle', n)"
158
163
  @row-click="(n) => emit('row-click', n)"
159
164
  @check="(n) => emit('check', n)"
@@ -171,7 +176,7 @@ const indentPx = computed(() => props.depth * 20)
171
176
  class="group flex items-center gap-1.5 px-2 py-1 rounded-control hover:bg-muted-hover transition-colors"
172
177
  :class="[
173
178
  clickableRows ? 'cursor-pointer' : '',
174
- isChecked ? 'bg-primary/5' : '',
179
+ isSelected ? 'bg-primary/10 hover:bg-primary/10' : (isChecked ? 'bg-primary/5' : ''),
175
180
  ]"
176
181
  :style="{ paddingLeft: (indentPx + 8) + 'px' }"
177
182
  @click="onRowClick"
@@ -245,6 +250,7 @@ const indentPx = computed(() => props.depth * 20)
245
250
  :checked-set="checkedSet"
246
251
  :indeterminate-set="indeterminateSet"
247
252
  :column-visibility="columnVisibility"
253
+ :selected-id="selectedId"
248
254
  @toggle="(n) => emit('toggle', n)"
249
255
  @row-click="(n) => emit('row-click', n)"
250
256
  @check="(n) => emit('check', n)"
@@ -75,6 +75,9 @@ const props = defineProps({
75
75
  autoClosePreview: { type: Boolean, default: true },
76
76
  /** Porcentaje inicial de la tabla (0-100). El resto lo ocupa el preview. */
77
77
  splitRatio: { type: Number, default: 55 },
78
+
79
+ // Resalta la fila seleccionada (id del nodo). Para selección externa via @row-click.
80
+ selectedId: { type: [String, Number], default: null },
78
81
  })
79
82
 
80
83
  const sizeStyle = computed(() => {
@@ -861,6 +864,7 @@ defineExpose({
861
864
  :checked-set="checkedSet"
862
865
  :indeterminate-set="indeterminateSet"
863
866
  :column-visibility="columnVisibility"
867
+ :selected-id="selectedId"
864
868
  @toggle="toggle"
865
869
  @check="toggleCheck"
866
870
  @row-click="handleRowClick"
@@ -904,6 +908,7 @@ defineExpose({
904
908
  :checked-set="checkedSet"
905
909
  :indeterminate-set="indeterminateSet"
906
910
  :column-visibility="columnVisibility"
911
+ :selected-id="selectedId"
907
912
  @toggle="toggle"
908
913
  @check="toggleCheck"
909
914
  @row-click="handleRowClick"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/innertia-nuxt",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Innertia Solutions — Nuxt layer unificada: core, auth, multitenancy, theme y app contexts",
5
5
  "keywords": [
6
6
  "nuxt",