@innertia-solutions/nuxt-theme-spark 0.1.67 → 0.1.69

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.
@@ -221,6 +221,7 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
221
221
  :show-reload-button="showReloadButton"
222
222
  :click-row-to-open="clickRowToOpen"
223
223
  :preview-row-id="previewRow?.id ?? null"
224
+ :preview-mode="!!$slots.preview"
224
225
  @row-click="handleRowClick"
225
226
  @loaded="emit('loaded', $event)"
226
227
  >
@@ -21,6 +21,7 @@ const props = defineProps({
21
21
  gridClass: { type: String, default: 'grid grid-cols-2 lg:grid-cols-3 gap-4' },
22
22
  clickRowToOpen: { type: Boolean, default: false },
23
23
  previewRowId: { type: [String, Number], default: null },
24
+ previewMode: { type: Boolean, default: false },
24
25
  })
25
26
 
26
27
  const emit = defineEmits(['update:search', 'row-click', 'loaded'])
@@ -420,7 +421,7 @@ const resetPerPage = () => {
420
421
 
421
422
  // ─── Row click ────────────────────────────────────────────────────────────────
422
423
  const hasRowClickListener = computed(() => !!instance?.vnode?.props?.onRowClick)
423
- const isRowClickEnabled = computed(() => props.clickRowToOpen || hasRowClickListener.value)
424
+ const isRowClickEnabled = computed(() => props.clickRowToOpen || props.previewMode || hasRowClickListener.value)
424
425
 
425
426
  const interactiveSelector = [
426
427
  'a', 'button', 'input', 'select', 'textarea', 'label', 'summary',
@@ -436,6 +437,7 @@ const shouldIgnoreRowClick = (e) => {
436
437
  }
437
438
 
438
439
  const handleRowClick = (row, e) => {
440
+ console.log('[Table] click | isRowClickEnabled:', isRowClickEnabled.value, '| previewMode:', props.previewMode, '| hasListener:', hasRowClickListener.value, '| ignore:', shouldIgnoreRowClick(e))
439
441
  if (!isRowClickEnabled.value || shouldIgnoreRowClick(e)) return
440
442
  emit('row-click', row.original, e)
441
443
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/nuxt-theme-spark",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "description": "Innertia Solutions — Spark theme: backoffice, landing and mobile components and layouts",
5
5
  "keywords": [
6
6
  "nuxt",