v-sistec-features 1.1.1 → 1.2.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.
@@ -8,4 +8,4 @@
8
8
  * Copyright 2018-2025 The Tabler Authors
9
9
  * Copyright 2018-2025 codecalm.net Paweł Kuna
10
10
  * Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
11
- */[data-bs-theme-base=slate]{--tblr-gray-50:#f8fafc;--tblr-gray-100:#f1f5f9;--tblr-gray-200:#e2e8f0;--tblr-gray-300:#cbd5e1;--tblr-gray-400:#94a3b8;--tblr-gray-500:#64748b;--tblr-gray-600:#475569;--tblr-gray-700:#334155;--tblr-gray-800:#1e293b;--tblr-gray-900:#0f172a;--tblr-gray-950:#020617}[data-bs-theme-base=gray]{--tblr-gray-50:#f9fafb;--tblr-gray-100:#f3f4f6;--tblr-gray-200:#e5e7eb;--tblr-gray-300:#d1d5db;--tblr-gray-400:#9ca3af;--tblr-gray-500:#6b7280;--tblr-gray-600:#4b5563;--tblr-gray-700:#374151;--tblr-gray-800:#1f2937;--tblr-gray-900:#111827;--tblr-gray-950:#030712}[data-bs-theme-base=zinc]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f4f4f5;--tblr-gray-200:#e4e4e7;--tblr-gray-300:#d4d4d8;--tblr-gray-400:#a1a1aa;--tblr-gray-500:#71717a;--tblr-gray-600:#52525b;--tblr-gray-700:#3f3f46;--tblr-gray-800:#27272a;--tblr-gray-900:#18181b;--tblr-gray-950:#09090b}[data-bs-theme-base=neutral]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f5f5f5;--tblr-gray-200:#e5e5e5;--tblr-gray-300:#d4d4d4;--tblr-gray-400:#a3a3a3;--tblr-gray-500:#737373;--tblr-gray-600:#525252;--tblr-gray-700:#404040;--tblr-gray-800:#262626;--tblr-gray-900:#171717;--tblr-gray-950:#0a0a0a}[data-bs-theme-base=stone]{--tblr-gray-50:#fafaf9;--tblr-gray-100:#f5f5f4;--tblr-gray-200:#e7e5e4;--tblr-gray-300:#d6d3d1;--tblr-gray-400:#a8a29e;--tblr-gray-500:#78716c;--tblr-gray-600:#57534e;--tblr-gray-700:#44403c;--tblr-gray-800:#292524;--tblr-gray-900:#1c1917;--tblr-gray-950:#0c0a09}[data-bs-theme-base=pink]{--tblr-gray-50:#fdf2f8;--tblr-gray-100:#fce7f3;--tblr-gray-200:#fbcfe8;--tblr-gray-300:#f9a8d4;--tblr-gray-400:#f472b6;--tblr-gray-500:#ec4899;--tblr-gray-600:#db2777;--tblr-gray-700:#be185d;--tblr-gray-800:#9d174d;--tblr-gray-900:#831843;--tblr-gray-950:#500724}[data-bs-theme-primary=blue]{--tblr-primary:#066fd1;--tblr-primary-rgb:6,111,209}[data-bs-theme-primary=azure]{--tblr-primary:#4299e1;--tblr-primary-rgb:66,153,225}[data-bs-theme-primary=indigo]{--tblr-primary:#4263eb;--tblr-primary-rgb:66,99,235}[data-bs-theme-primary=purple]{--tblr-primary:#ae3ec9;--tblr-primary-rgb:174,62,201}[data-bs-theme-primary=pink]{--tblr-primary:#d6336c;--tblr-primary-rgb:214,51,108}[data-bs-theme-primary=red]{--tblr-primary:#d63939;--tblr-primary-rgb:214,57,57}[data-bs-theme-primary=orange]{--tblr-primary:#f76707;--tblr-primary-rgb:247,103,7}[data-bs-theme-primary=yellow]{--tblr-primary:#f59f00;--tblr-primary-rgb:245,159,0}[data-bs-theme-primary=lime]{--tblr-primary:#74b816;--tblr-primary-rgb:116,184,22}[data-bs-theme-primary=green]{--tblr-primary:#2fb344;--tblr-primary-rgb:47,179,68}[data-bs-theme-primary=teal]{--tblr-primary:#0ca678;--tblr-primary-rgb:12,166,120}[data-bs-theme-primary=cyan]{--tblr-primary:#17a2b8;--tblr-primary-rgb:23,162,184}[data-bs-theme-radius="0"]{--tblr-border-radius-scale:0}[data-bs-theme-radius="0.5"]{--tblr-border-radius-scale:.5}[data-bs-theme-radius="1"]{--tblr-border-radius-scale:1}[data-bs-theme-radius="1.5"]{--tblr-border-radius-scale:1.5}[data-bs-theme-radius="2"]{--tblr-border-radius-scale:2}[data-bs-theme-primary=inverted]{--tblr-primary:var(--tblr-gray-800);--tblr-primary-fg:var(--tblr-light);--tblr-primary-rgb:31,41,55}[data-bs-theme-primary=inverted] [data-bs-theme=dark],[data-bs-theme-primary=inverted][data-bs-theme=dark]{--tblr-primary:#f9fafb;--tblr-primary-fg:var(--tblr-dark);--tblr-primary-rgb:249,250,251}[data-bs-theme-font=monospace]{--tblr-body-font-family:var(--tblr-font-monospace);--tblr-body-font-size:80%}[data-bs-theme-font=sans-serif]{--tblr-body-font-family:var(--tblr-font-sans-serif)}[data-bs-theme-font=serif]{--tblr-body-font-family:var(--tblr-font-serif)}[data-bs-theme-font=comic]{--tblr-body-font-family:var(--tblr-font-comic)}.rotate-180[data-v-c189f089] svg{transform:rotate(180deg)}.page-select[data-v-c189f089]{background-color:var(--tblr-primary)!important;color:#fff!important;border:none!important}.page-estilo[data-v-c189f089]{border:none;--cor-escurecida: color-mix(in srgb, var(--tblr-primary), #000 25%);background:transparent;padding:1px 10px;border-radius:7px;margin:0!important;transition:color .15s ease-in-out,background-color .15s ease-in-out}.page-estilo[data-v-c189f089]:hover{background:var(--cor-escurecida);color:#fff}.btn[data-v-c189f089]{padding:0!important;margin:0!important;background:transparent!important;border:none!important;box-shadow:none!important}[data-v-c189f089] .btn-estilo svg{padding:0!important;margin:0!important}[data-v-c189f089] .btn-estilo:hover svg{stroke:var(--tblr-primary)}.icon-tabler[data-v-c189f089]{margin:0!important;padding:0!important}.inputClose[data-v-1b6ff54b]{color:var(--tblr-icon-color);z-index:10;position:absolute;top:50%;right:0;transform:translateY(-50%);font-size:1.2em;min-width:2.5rem;display:flex;justify-content:center}.inputClose[data-v-1b6ff54b]:hover{cursor:pointer}.selected[data-v-1b6ff54b]:hover{background-color:#b02a2a!important;color:#fff!important}.table-responsive[data-v-fa062ce8]{overflow-x:auto}.state-feedback[data-v-fa062ce8]{padding:1rem;text-align:center}.state-feedback.error[data-v-fa062ce8]{color:red}.pagination-controls[data-v-fa062ce8]{margin-top:1rem;display:flex;justify-content:space-between}.placeholder-img[data-v-fa062ce8]{width:40px;height:40px;border-radius:4px}.container-img[data-v-fa062ce8]{aspect-ratio:1;display:flex;justify-content:center;overflow:hidden;position:relative;max-width:40px;min-width:40px}.container-img .img-tamanho-cover[data-v-fa062ce8]{position:absolute;top:0;width:100%;height:100%;object-fit:cover;z-index:0;opacity:.5;filter:blur(4px)}.container-img .img-tamanho[data-v-fa062ce8]{object-fit:contain;width:100%;height:100%;z-index:2}.container-img.container-img-preview[data-v-fa062ce8]{cursor:pointer}.container-img.container-img-preview[data-v-fa062ce8]:hover{border-style:dashed;border-color:var(--tblr-primary);border-width:2px;transition:border-width .15s ease-in-out}.container-img.container-img-preview:hover .img-tamanho[data-v-fa062ce8]{opacity:.3}.erro-custom-container[data-v-fa062ce8]{display:inline-block;padding:.2em .6em;border-radius:4px;background-color:#fff;font-weight:700;text-transform:uppercase}.erro-custom-text[data-v-fa062ce8]{font-size:.8em;text-transform:uppercase;font-weight:700}.bg-img[data-v-fa062ce8]{background-color:#0000004d;position:absolute;top:0;width:100%;height:100%;z-index:1}.image-preview-container[data-v-fa062ce8]{position:fixed;z-index:9999;background-color:#fff;border-radius:8px;box-shadow:0 4px 12px #0003;padding:5px;pointer-events:none;transition:opacity .2s ease-in-out}.image-preview-container .image-preview-large[data-v-fa062ce8]{display:block;max-width:250px;max-height:250px;border-radius:4px}.form-check-input[data-v-fa062ce8]{border-width:1px!important;border-color:#00000064!important;width:17px;height:17px}[data-bs-theme=dark] .form-check-input[data-v-fa062ce8]{border-color:#ffffff5f!important}
11
+ */[data-bs-theme-base=slate]{--tblr-gray-50:#f8fafc;--tblr-gray-100:#f1f5f9;--tblr-gray-200:#e2e8f0;--tblr-gray-300:#cbd5e1;--tblr-gray-400:#94a3b8;--tblr-gray-500:#64748b;--tblr-gray-600:#475569;--tblr-gray-700:#334155;--tblr-gray-800:#1e293b;--tblr-gray-900:#0f172a;--tblr-gray-950:#020617}[data-bs-theme-base=gray]{--tblr-gray-50:#f9fafb;--tblr-gray-100:#f3f4f6;--tblr-gray-200:#e5e7eb;--tblr-gray-300:#d1d5db;--tblr-gray-400:#9ca3af;--tblr-gray-500:#6b7280;--tblr-gray-600:#4b5563;--tblr-gray-700:#374151;--tblr-gray-800:#1f2937;--tblr-gray-900:#111827;--tblr-gray-950:#030712}[data-bs-theme-base=zinc]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f4f4f5;--tblr-gray-200:#e4e4e7;--tblr-gray-300:#d4d4d8;--tblr-gray-400:#a1a1aa;--tblr-gray-500:#71717a;--tblr-gray-600:#52525b;--tblr-gray-700:#3f3f46;--tblr-gray-800:#27272a;--tblr-gray-900:#18181b;--tblr-gray-950:#09090b}[data-bs-theme-base=neutral]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f5f5f5;--tblr-gray-200:#e5e5e5;--tblr-gray-300:#d4d4d4;--tblr-gray-400:#a3a3a3;--tblr-gray-500:#737373;--tblr-gray-600:#525252;--tblr-gray-700:#404040;--tblr-gray-800:#262626;--tblr-gray-900:#171717;--tblr-gray-950:#0a0a0a}[data-bs-theme-base=stone]{--tblr-gray-50:#fafaf9;--tblr-gray-100:#f5f5f4;--tblr-gray-200:#e7e5e4;--tblr-gray-300:#d6d3d1;--tblr-gray-400:#a8a29e;--tblr-gray-500:#78716c;--tblr-gray-600:#57534e;--tblr-gray-700:#44403c;--tblr-gray-800:#292524;--tblr-gray-900:#1c1917;--tblr-gray-950:#0c0a09}[data-bs-theme-base=pink]{--tblr-gray-50:#fdf2f8;--tblr-gray-100:#fce7f3;--tblr-gray-200:#fbcfe8;--tblr-gray-300:#f9a8d4;--tblr-gray-400:#f472b6;--tblr-gray-500:#ec4899;--tblr-gray-600:#db2777;--tblr-gray-700:#be185d;--tblr-gray-800:#9d174d;--tblr-gray-900:#831843;--tblr-gray-950:#500724}[data-bs-theme-primary=blue]{--tblr-primary:#066fd1;--tblr-primary-rgb:6,111,209}[data-bs-theme-primary=azure]{--tblr-primary:#4299e1;--tblr-primary-rgb:66,153,225}[data-bs-theme-primary=indigo]{--tblr-primary:#4263eb;--tblr-primary-rgb:66,99,235}[data-bs-theme-primary=purple]{--tblr-primary:#ae3ec9;--tblr-primary-rgb:174,62,201}[data-bs-theme-primary=pink]{--tblr-primary:#d6336c;--tblr-primary-rgb:214,51,108}[data-bs-theme-primary=red]{--tblr-primary:#d63939;--tblr-primary-rgb:214,57,57}[data-bs-theme-primary=orange]{--tblr-primary:#f76707;--tblr-primary-rgb:247,103,7}[data-bs-theme-primary=yellow]{--tblr-primary:#f59f00;--tblr-primary-rgb:245,159,0}[data-bs-theme-primary=lime]{--tblr-primary:#74b816;--tblr-primary-rgb:116,184,22}[data-bs-theme-primary=green]{--tblr-primary:#2fb344;--tblr-primary-rgb:47,179,68}[data-bs-theme-primary=teal]{--tblr-primary:#0ca678;--tblr-primary-rgb:12,166,120}[data-bs-theme-primary=cyan]{--tblr-primary:#17a2b8;--tblr-primary-rgb:23,162,184}[data-bs-theme-radius="0"]{--tblr-border-radius-scale:0}[data-bs-theme-radius="0.5"]{--tblr-border-radius-scale:.5}[data-bs-theme-radius="1"]{--tblr-border-radius-scale:1}[data-bs-theme-radius="1.5"]{--tblr-border-radius-scale:1.5}[data-bs-theme-radius="2"]{--tblr-border-radius-scale:2}[data-bs-theme-primary=inverted]{--tblr-primary:var(--tblr-gray-800);--tblr-primary-fg:var(--tblr-light);--tblr-primary-rgb:31,41,55}[data-bs-theme-primary=inverted] [data-bs-theme=dark],[data-bs-theme-primary=inverted][data-bs-theme=dark]{--tblr-primary:#f9fafb;--tblr-primary-fg:var(--tblr-dark);--tblr-primary-rgb:249,250,251}[data-bs-theme-font=monospace]{--tblr-body-font-family:var(--tblr-font-monospace);--tblr-body-font-size:80%}[data-bs-theme-font=sans-serif]{--tblr-body-font-family:var(--tblr-font-sans-serif)}[data-bs-theme-font=serif]{--tblr-body-font-family:var(--tblr-font-serif)}[data-bs-theme-font=comic]{--tblr-body-font-family:var(--tblr-font-comic)}.rotate-180[data-v-c189f089] svg{transform:rotate(180deg)}.page-select[data-v-c189f089]{background-color:var(--tblr-primary)!important;color:#fff!important;border:none!important}.page-estilo[data-v-c189f089]{border:none;--cor-escurecida: color-mix(in srgb, var(--tblr-primary), #000 25%);background:transparent;padding:1px 10px;border-radius:7px;margin:0!important;transition:color .15s ease-in-out,background-color .15s ease-in-out}.page-estilo[data-v-c189f089]:hover{background:var(--cor-escurecida);color:#fff}.btn[data-v-c189f089]{padding:0!important;margin:0!important;background:transparent!important;border:none!important;box-shadow:none!important}[data-v-c189f089] .btn-estilo svg{padding:0!important;margin:0!important}[data-v-c189f089] .btn-estilo:hover svg{stroke:var(--tblr-primary)}.icon-tabler[data-v-c189f089]{margin:0!important;padding:0!important}.inputClose[data-v-1b6ff54b]{color:var(--tblr-icon-color);z-index:10;position:absolute;top:50%;right:0;transform:translateY(-50%);font-size:1.2em;min-width:2.5rem;display:flex;justify-content:center}.inputClose[data-v-1b6ff54b]:hover{cursor:pointer}.selected[data-v-1b6ff54b]:hover{background-color:#b02a2a!important;color:#fff!important}.table-responsive[data-v-693cabb6]{overflow-x:auto}.state-feedback[data-v-693cabb6]{padding:1rem;text-align:center}.state-feedback.error[data-v-693cabb6]{color:red}.pagination-controls[data-v-693cabb6]{margin-top:1rem;display:flex;justify-content:space-between}.placeholder-img[data-v-693cabb6]{width:40px;height:40px;border-radius:4px}.container-img[data-v-693cabb6]{aspect-ratio:1;display:flex;justify-content:center;overflow:hidden;position:relative;max-width:40px;min-width:40px}.container-img .img-tamanho-cover[data-v-693cabb6]{position:absolute;top:0;width:100%;height:100%;object-fit:cover;z-index:0;opacity:.5;filter:blur(4px)}.container-img .img-tamanho[data-v-693cabb6]{object-fit:contain;width:100%;height:100%;z-index:2}.container-img.container-img-preview[data-v-693cabb6]{cursor:pointer}.container-img.container-img-preview[data-v-693cabb6]:hover{border-style:dashed;border-color:var(--tblr-primary);border-width:2px;transition:border-width .15s ease-in-out}.container-img.container-img-preview:hover .img-tamanho[data-v-693cabb6]{opacity:.3}.erro-custom-container[data-v-693cabb6]{display:inline-block;padding:.2em .6em;border-radius:4px;background-color:#fff;font-weight:700;text-transform:uppercase}.erro-custom-text[data-v-693cabb6]{font-size:.8em;text-transform:uppercase;font-weight:700}.bg-img[data-v-693cabb6]{background-color:#0000004d;position:absolute;top:0;width:100%;height:100%;z-index:1}.image-preview-container[data-v-693cabb6]{position:fixed;z-index:9999;background-color:#fff;border-radius:8px;box-shadow:0 4px 12px #0003;padding:5px;pointer-events:none;transition:opacity .2s ease-in-out}.image-preview-container .image-preview-large[data-v-693cabb6]{display:block;max-width:250px;max-height:250px;border-radius:4px}.form-check-input[data-v-693cabb6]{border-width:1px!important;border-color:#00000064!important;width:17px;height:17px}[data-bs-theme=dark] .form-check-input[data-v-693cabb6]{border-color:#ffffff5f!important}
@@ -1,5 +1,5 @@
1
- import { defineComponent as K, useSlots as fe, inject as ge, onMounted as te, computed as z, createElementBlock as a, createCommentVNode as b, openBlock as t, createElementVNode as n, toDisplayString as g, withModifiers as j, Fragment as M, renderList as P, normalizeClass as _, watch as q, resolveComponent as ve, withDirectives as ae, withKeys as he, vModelText as ne, createBlock as X, withCtx as ye, createTextVNode as N, ref as $, provide as ke, nextTick as be, renderSlot as O, createVNode as Q, resolveDynamicComponent as Z, unref as w, mergeProps as xe, normalizeStyle as we } from "vue";
2
- const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
1
+ import { defineComponent as F, useSlots as fe, inject as ve, onMounted as te, computed as T, createElementBlock as a, createCommentVNode as b, openBlock as n, createElementVNode as s, toDisplayString as v, withModifiers as j, Fragment as M, renderList as z, normalizeClass as _, watch as q, resolveComponent as ge, withDirectives as ne, withKeys as he, vModelText as ae, createBlock as X, withCtx as ye, createTextVNode as N, ref as P, provide as ke, nextTick as be, renderSlot as O, createVNode as Q, resolveDynamicComponent as Z, unref as w, mergeProps as xe, normalizeStyle as we } from "vue";
2
+ const se = Symbol("v-datatable-key"), Nt = /* @__PURE__ */ F({
3
3
  __name: "VColumn",
4
4
  props: {
5
5
  field: { default: null },
@@ -11,19 +11,20 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
11
11
  format: { default: "complete" },
12
12
  deactivate_img_preview: { type: Boolean, default: !1 },
13
13
  limite_text: { default: null },
14
- transform_function: { type: [Function, null], default: null }
14
+ transform_function: { type: [Function, null], default: null },
15
+ click: { type: [Function, null], default: null }
15
16
  },
16
17
  setup(y) {
17
- const u = y, o = fe(), f = ge(se);
18
+ const u = y, o = fe(), f = ve(se);
18
19
  if (!f)
19
20
  throw new Error("VColumn deve ser usado dentro de um VDataTable.");
20
- const v = ["text", "img", "date", "html"];
21
+ const g = ["text", "img", "date", "html"];
21
22
  return te(() => {
22
23
  if (u.field !== null && !u.field)
23
24
  throw new Error('A propriedade "field" é obrigatória em VColumn.');
24
25
  if (!u.header)
25
26
  throw new Error('A propriedade "header" é obrigatória em VColumn.');
26
- if (u.field !== null && !v.includes(u.type))
27
+ if (u.field !== null && !g.includes(u.type))
27
28
  throw new Error(`O tipo "${u.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
28
29
  if (u.limite_text) {
29
30
  if (u.type !== "text")
@@ -40,6 +41,7 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
40
41
  class_column: u.class_column,
41
42
  class_row: u.class_row,
42
43
  class_item: u.class_item,
44
+ click: u.click,
43
45
  transform_function: u.transform_function,
44
46
  bodySlot: o.body,
45
47
  ...u.type === "text" && { limite_text: Number(u.limite_text) },
@@ -51,10 +53,10 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
51
53
  }), Ce = {
52
54
  key: 0,
53
55
  class: "d-flex align-items-center justify-content-between w-100"
54
- }, Se = {
56
+ }, $e = {
55
57
  key: 0,
56
58
  class: "d-flex align-items-center p-2 gap-2"
57
- }, Me = { class: "d-flex" }, $e = ["disabled"], Pe = ["disabled"], ze = { class: "d-flex gap-2" }, Te = ["onClick", "disabled"], Ne = {
59
+ }, Se = { class: "d-flex" }, Me = ["disabled"], Pe = ["disabled"], ze = { class: "d-flex gap-2" }, Te = ["onClick", "disabled"], Ne = {
58
60
  key: 1,
59
61
  class: "m-0 p-0"
60
62
  }, Ae = { class: "d-flex" }, De = ["disabled"], Ee = ["disabled"], R = `
@@ -72,7 +74,7 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
72
74
  <path stroke="none" d="M0 0h24v24H0z" fill="none" />
73
75
  <path d="M15 6l-6 6l6 6" />
74
76
  </svg>
75
- `, He = /* @__PURE__ */ K({
77
+ `, He = /* @__PURE__ */ F({
76
78
  __name: "PaginationDatatable",
77
79
  props: {
78
80
  pagination: {},
@@ -80,26 +82,26 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
80
82
  },
81
83
  emits: ["tradePage"],
82
84
  setup(y, { emit: u }) {
83
- const o = y, f = u, v = z(() => o.pagination.limit_per_page ? Math.ceil(o.pagination.count / o.pagination.limit_per_page) : 0), C = z(() => o.pagination.current_page + 1 < v.value ? o.pagination.current_page + 1 : null), A = () => {
85
+ const o = y, f = u, g = T(() => o.pagination.limit_per_page ? Math.ceil(o.pagination.count / o.pagination.limit_per_page) : 0), C = T(() => o.pagination.current_page + 1 < g.value ? o.pagination.current_page + 1 : null), A = () => {
84
86
  o.pagination.current_page++, f("tradePage");
85
- }, E = (S) => {
86
- o.pagination.current_page = S - 1, f("tradePage");
87
+ }, E = ($) => {
88
+ o.pagination.current_page = $ - 1, f("tradePage");
87
89
  }, l = () => {
88
- o.pagination.current_page = v.value - 1, f("tradePage");
90
+ o.pagination.current_page = g.value - 1, f("tradePage");
89
91
  }, d = () => {
90
92
  o.pagination.current_page = 0, f("tradePage");
91
93
  }, k = () => {
92
94
  o.pagination.current_page > 0 && (o.pagination.current_page--, f("tradePage"));
93
- }, c = z(() => {
94
- if (v.value <= 7)
95
- return Array.from({ length: v.value }, (p, B) => B + 1);
96
- const S = o.pagination.current_page + 1, m = v.value, h = /* @__PURE__ */ new Set([
95
+ }, c = T(() => {
96
+ if (g.value <= 7)
97
+ return Array.from({ length: g.value }, (p, B) => B + 1);
98
+ const $ = o.pagination.current_page + 1, m = g.value, h = /* @__PURE__ */ new Set([
97
99
  1,
98
100
  2,
99
101
  // Sempre mostra as 2 primeiras
100
- S - 1,
101
- S,
102
- S + 1,
102
+ $ - 1,
103
+ $,
104
+ $ + 1,
103
105
  // Mostra a atual e vizinhas
104
106
  m - 1,
105
107
  m
@@ -110,41 +112,41 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
110
112
  p < 1 || p > m || (p > H + 1 && x.push("..."), x.push(p), H = p);
111
113
  }), x;
112
114
  });
113
- return (S, m) => o.pagination.count > 0 ? (t(), a("div", Ce, [
114
- n("span", null, " Mostrando de " + g(o.pagination.count !== 0 ? o.pagination.limit_per_page * o.pagination.current_page + 1 : 0) + " até " + g(o.pagination.limit_per_page * (o.pagination.current_page + 1) < o.pagination.count ? o.pagination.limit_per_page * (o.pagination.current_page + 1) : o.pagination.count) + " de " + g(o.pagination.count) + " registros ", 1),
115
- v.value > 0 ? (t(), a("div", Se, [
116
- n("div", Me, [
117
- n("button", {
115
+ return ($, m) => o.pagination.count > 0 ? (n(), a("div", Ce, [
116
+ s("span", null, " Mostrando de " + v(o.pagination.count !== 0 ? o.pagination.limit_per_page * o.pagination.current_page + 1 : 0) + " até " + v(o.pagination.limit_per_page * (o.pagination.current_page + 1) < o.pagination.count ? o.pagination.limit_per_page * (o.pagination.current_page + 1) : o.pagination.count) + " de " + v(o.pagination.count) + " registros ", 1),
117
+ g.value > 0 ? (n(), a("div", $e, [
118
+ s("div", Se, [
119
+ s("button", {
118
120
  class: "btn btn-estilo",
119
121
  onClick: j(d, ["prevent"]),
120
122
  disabled: o.pagination.current_page === 0,
121
123
  innerHTML: R
122
- }, null, 8, $e),
123
- n("button", {
124
+ }, null, 8, Me),
125
+ s("button", {
124
126
  class: "btn btn-estilo",
125
127
  onClick: j(k, ["prevent"]),
126
128
  disabled: o.pagination.current_page === 0,
127
129
  innerHTML: ee
128
130
  }, null, 8, Pe)
129
131
  ]),
130
- n("div", ze, [
131
- (t(!0), a(M, null, P(c.value, (h, x) => (t(), a(M, { key: x }, [
132
- typeof h == "number" ? (t(), a("button", {
132
+ s("div", ze, [
133
+ (n(!0), a(M, null, z(c.value, (h, x) => (n(), a(M, { key: x }, [
134
+ typeof h == "number" ? (n(), a("button", {
133
135
  key: 0,
134
136
  class: _([o.pagination.current_page + 1 == h ? "page-select" : "", "page-estilo"]),
135
137
  onClick: j((H) => E(h), ["prevent"]),
136
138
  disabled: o.pagination.current_page + 1 == h
137
- }, g(h), 11, Te)) : (t(), a("span", Ne, "..."))
139
+ }, v(h), 11, Te)) : (n(), a("span", Ne, "..."))
138
140
  ], 64))), 128))
139
141
  ]),
140
- n("div", Ae, [
141
- n("button", {
142
+ s("div", Ae, [
143
+ s("button", {
142
144
  onClick: j(A, ["prevent"]),
143
145
  class: "btn btn-estilo rotate-180",
144
146
  disabled: !C.value,
145
147
  innerHTML: ee
146
148
  }, null, 8, De),
147
- n("button", {
149
+ s("button", {
148
150
  onClick: j(l, ["prevent"]),
149
151
  class: "btn btn-estilo rotate-180",
150
152
  disabled: !C.value,
@@ -156,8 +158,8 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
156
158
  }
157
159
  }), W = (y, u) => {
158
160
  const o = y.__vccOpts || y;
159
- for (const [f, v] of u)
160
- o[f] = v;
161
+ for (const [f, g] of u)
162
+ o[f] = g;
161
163
  return o;
162
164
  }, Le = /* @__PURE__ */ W(He, [["__scopeId", "data-v-c189f089"]]), Ve = { class: "dropdown d-flex" }, je = {
163
165
  key: 0,
@@ -171,7 +173,7 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
171
173
  }, Oe = {
172
174
  key: 1,
173
175
  class: "dropdown-menu"
174
- }, qe = ["onClick"], Ke = /* @__PURE__ */ K({
176
+ }, qe = ["onClick"], Fe = /* @__PURE__ */ F({
175
177
  __name: "SearchDatatable",
176
178
  props: {
177
179
  search: {},
@@ -181,10 +183,10 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
181
183
  },
182
184
  emits: ["update:search", "update:filter", "search"],
183
185
  setup(y, { emit: u }) {
184
- const o = y, f = u, v = z({
186
+ const o = y, f = u, g = T({
185
187
  get: () => o.search,
186
188
  set: (l) => f("update:search", l)
187
- }), C = z({
189
+ }), C = T({
188
190
  get: () => o.filter,
189
191
  set: (l) => f("update:filter", l)
190
192
  });
@@ -203,13 +205,13 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
203
205
  C.value === l ? C.value = "" : C.value = l;
204
206
  }
205
207
  function E() {
206
- v.value = "", f("search");
208
+ g.value = "", f("search");
207
209
  }
208
210
  return (l, d) => {
209
- const k = ve("router-link");
210
- return t(), a("div", Ve, [
211
- y.item_use.includes(2) ? (t(), a("a", je, [...d[3] || (d[3] = [
212
- n("svg", {
211
+ const k = ge("router-link");
212
+ return n(), a("div", Ve, [
213
+ y.item_use.includes(2) ? (n(), a("a", je, [...d[3] || (d[3] = [
214
+ s("svg", {
213
215
  xmlns: "http://www.w3.org/2000/svg",
214
216
  class: "icon icon-tabler icon-tabler-filter",
215
217
  width: "24",
@@ -221,32 +223,32 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
221
223
  "stroke-linecap": "round",
222
224
  "stroke-linejoin": "round"
223
225
  }, [
224
- n("path", {
226
+ s("path", {
225
227
  stroke: "none",
226
228
  d: "M0 0h24v24H0z",
227
229
  fill: "none"
228
230
  }),
229
- n("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" })
231
+ s("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" })
230
232
  ], -1)
231
233
  ])])) : b("", !0),
232
- n("div", Be, [
233
- ae(n("input", {
234
+ s("div", Be, [
235
+ ne(s("input", {
234
236
  type: "text",
235
237
  class: "form-control ms-1",
236
238
  id: "inputSearchLaudos",
237
- "onUpdate:modelValue": d[0] || (d[0] = (c) => v.value = c),
239
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => g.value = c),
238
240
  onKeyup: d[1] || (d[1] = he((c) => l.$emit("search"), ["enter"])),
239
241
  placeholder: "Buscar..."
240
242
  }, null, 544), [
241
- [ne, v.value]
243
+ [ae, g.value]
242
244
  ]),
243
- v.value ? (t(), a("span", {
245
+ g.value ? (n(), a("span", {
244
246
  key: 0,
245
247
  onClick: d[2] || (d[2] = (c) => E()),
246
248
  class: "inputClose",
247
249
  title: "Limpar pesquisa"
248
250
  }, [...d[4] || (d[4] = [
249
- n("svg", {
251
+ s("svg", {
250
252
  xmlns: "http://www.w3.org/2000/svg",
251
253
  width: "24",
252
254
  height: "24",
@@ -258,16 +260,16 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
258
260
  "stroke-linejoin": "round",
259
261
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
260
262
  }, [
261
- n("path", {
263
+ s("path", {
262
264
  stroke: "none",
263
265
  d: "M0 0h24v24H0z",
264
266
  fill: "none"
265
267
  }),
266
- n("path", { d: "M18 6l-12 12" }),
267
- n("path", { d: "M6 6l12 12" })
268
+ s("path", { d: "M18 6l-12 12" }),
269
+ s("path", { d: "M6 6l12 12" })
268
270
  ], -1)
269
- ])])) : (t(), a("span", Ie, [...d[5] || (d[5] = [
270
- n("svg", {
271
+ ])])) : (n(), a("span", Ie, [...d[5] || (d[5] = [
272
+ s("svg", {
271
273
  xmlns: "http://www.w3.org/2000/svg",
272
274
  width: "24",
273
275
  height: "24",
@@ -279,40 +281,40 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
279
281
  "stroke-linejoin": "round",
280
282
  class: "icon"
281
283
  }, [
282
- n("path", {
284
+ s("path", {
283
285
  stroke: "none",
284
286
  d: "M0 0h24v24H0z",
285
287
  fill: "none"
286
288
  }),
287
- n("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }),
288
- n("path", { d: "M21 21l-6 -6" })
289
+ s("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }),
290
+ s("path", { d: "M21 21l-6 -6" })
289
291
  ], -1)
290
292
  ])]))
291
293
  ]),
292
- y.item_use.includes(2) ? (t(), a("div", Oe, [
293
- (t(!0), a(M, null, P(o.list_filter, (c, S) => (t(), a(M, { key: S }, [
294
- "type" in c && c.type === 1 ? (t(), X(k, {
294
+ y.item_use.includes(2) ? (n(), a("div", Oe, [
295
+ (n(!0), a(M, null, z(o.list_filter, (c, $) => (n(), a(M, { key: $ }, [
296
+ "type" in c && c.type === 1 ? (n(), X(k, {
295
297
  key: 0,
296
298
  to: c?.to,
297
299
  class: "dropdown-item cursor-pointer"
298
300
  }, {
299
301
  default: ye(() => [
300
- N(g(c.text), 1)
302
+ N(v(c.text), 1)
301
303
  ]),
302
304
  _: 2
303
- }, 1032, ["to"])) : !("type" in c) || c.type === 2 ? (t(), a("a", {
305
+ }, 1032, ["to"])) : !("type" in c) || c.type === 2 ? (n(), a("a", {
304
306
  key: 1,
305
307
  onClick: j((m) => A(String(c.value)), ["prevent"]),
306
308
  class: _(["dropdown-item cursor-pointer", C.value === c?.value ? "bg-info text-dark selected" : ""])
307
- }, g(c.text), 11, qe)) : b("", !0)
309
+ }, v(c.text), 11, qe)) : b("", !0)
308
310
  ], 64))), 128))
309
311
  ])) : b("", !0)
310
312
  ]);
311
313
  };
312
314
  }
313
- }), Ue = /* @__PURE__ */ W(Ke, [["__scopeId", "data-v-1b6ff54b"]]);
314
- function Ye() {
315
- const y = $(!1), u = $(""), o = $(0), f = $(0), v = z(() => ({
315
+ }), Ke = /* @__PURE__ */ W(Fe, [["__scopeId", "data-v-1b6ff54b"]]);
316
+ function Ue() {
317
+ const y = P(!1), u = P(""), o = P(0), f = P(0), g = T(() => ({
316
318
  position: "fixed",
317
319
  zIndex: 9999,
318
320
  pointerEvents: "none",
@@ -320,9 +322,9 @@ function Ye() {
320
322
  left: `${o.value + 15}px`
321
323
  }));
322
324
  function C(d) {
323
- const k = d.clientX, c = d.clientY, S = window.innerHeight, m = 15, h = 300;
325
+ const k = d.clientX, c = d.clientY, $ = window.innerHeight, m = 15, h = 300;
324
326
  let x = c + m;
325
- x + h > S && (x = c - h - m, x < 0 && (x = 0)), o.value = k, f.value = x;
327
+ x + h > $ && (x = c - h - m, x < 0 && (x = 0)), o.value = k, f.value = x;
326
328
  }
327
329
  function A(d, k) {
328
330
  y.value = !0, u.value = k, C(d);
@@ -336,20 +338,20 @@ function Ye() {
336
338
  return {
337
339
  isHovering: y,
338
340
  previewSrc: u,
339
- previewStyle: v,
341
+ previewStyle: g,
340
342
  handleMouseOver: A,
341
343
  handleMouseMove: E,
342
344
  handleMouseLeave: l
343
345
  };
344
346
  }
345
- const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, Xe = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, Ge = {
347
+ const Ye = { class: "d-flex justify-content-between align-items-start mb-2" }, Xe = { class: "text-secondary" }, We = { class: "mx-2 d-inline-block" }, Ge = {
346
348
  key: 0,
347
349
  class: "alert alert-cyan d-flex justify-content-center align-items-center py-3",
348
350
  role: "alert"
349
351
  }, Je = { class: "alert-title m-0" }, Qe = { key: 0 }, Ze = { key: 2 }, Re = {
350
352
  key: 5,
351
353
  class: "text-danger erro-custom-container"
352
- }, et = { class: "badge bg-orange text-white erro-custom-text" }, tt = { key: 0 }, at = { key: 2 }, nt = {
354
+ }, et = { class: "badge bg-orange text-white erro-custom-text" }, tt = { key: 0 }, nt = { key: 2 }, at = {
353
355
  key: 5,
354
356
  class: "text-danger erro-custom-container"
355
357
  }, st = { class: "badge bg-orange text-white erro-custom-text" }, lt = ["colspan"], rt = {
@@ -374,19 +376,19 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
374
376
  }, pt = {
375
377
  key: 3,
376
378
  class: "table-responsive"
377
- }, mt = { key: 0 }, _t = {
379
+ }, _t = { key: 0 }, mt = {
378
380
  key: 0,
379
381
  class: "w-1"
380
382
  }, ft = {
381
383
  key: 0,
382
384
  class: "w-1"
383
- }, gt = ["checked", "onChange"], vt = { key: 2 }, ht = { key: 0 }, yt = { key: 1 }, kt = ["innerHTML"], bt = ["src"], xt = ["src"], wt = {
385
+ }, vt = ["checked", "onChange"], gt = ["onClick"], ht = ["onClick"], yt = { key: 0 }, kt = { key: 1 }, bt = ["onClick", "innerHTML"], xt = ["onClick"], wt = ["src"], Ct = ["src"], $t = {
384
386
  key: 5,
385
387
  class: "text-danger erro-custom-container"
386
- }, Ct = { class: "badge bg-orange text-white erro-custom-text" }, St = {
388
+ }, St = { class: "badge bg-orange text-white erro-custom-text" }, Mt = {
387
389
  key: 1,
388
390
  class: "text-center p-4 text-secondary"
389
- }, Mt = ["src"], $t = /* @__PURE__ */ K({
391
+ }, Pt = ["src"], zt = /* @__PURE__ */ F({
390
392
  __name: "VDataTable",
391
393
  props: {
392
394
  fetch: {},
@@ -419,11 +421,11 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
419
421
  const {
420
422
  isHovering: o,
421
423
  previewSrc: f,
422
- previewStyle: v,
424
+ previewStyle: g,
423
425
  handleMouseOver: C,
424
426
  handleMouseMove: A,
425
427
  handleMouseLeave: E
426
- } = Ye(), l = y, d = $(5), k = $([]), c = $([]), S = $(0), m = $([]), h = $(null), x = $(!1), H = $(null), p = $({
428
+ } = Ue(), l = y, d = P(5), k = P([]), c = P([]), $ = P(0), m = P([]), h = P(null), x = P(!1), H = P(null), p = P({
427
429
  current_page: 0,
428
430
  // pagina atual
429
431
  count: 0,
@@ -434,52 +436,52 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
434
436
  // termo de busca
435
437
  filter: ""
436
438
  // filtro selecionado
437
- }), { data: B, pending: le, error: U, execute: re, attempt: V } = l.fetch(l.endpoint, {
439
+ }), { data: B, pending: le, error: K, execute: re, attempt: V } = l.fetch(l.endpoint, {
438
440
  params: () => l.deactivate_default_params ? l.add_params && typeof l.add_params == "function" ? l.add_params() : {
439
441
  ...l.add_params
440
442
  } : l.add_params && typeof l.add_params == "function" ? {
441
- ...Y.value,
443
+ ...U.value,
442
444
  ...l.add_params()
443
445
  } : {
444
- ...Y.value,
446
+ ...U.value,
445
447
  ...l.add_params
446
448
  },
447
449
  retry: l.retry_attempts,
448
450
  retryDelay: l.retry_delay,
449
451
  paramsReactives: !1,
450
452
  immediate: !1
451
- }, l.fetch_name), oe = z(() => {
453
+ }, l.fetch_name), oe = T(() => {
452
454
  let i = [1];
453
455
  return l.list_filter.length > 0 && i.push(2), i;
454
- }), Y = z(() => ({
456
+ }), U = T(() => ({
455
457
  [l.page_param_name]: p.value.current_page + 1,
456
458
  [l.page_size_param_name]: p.value.limit_per_page,
457
459
  [l.search_param_name]: p.value.search || "",
458
460
  [l.filter_param_name]: p.value.filter || ""
459
- })), ie = z(() => le.value || x.value), I = (i) => {
460
- const e = l.item_key;
461
- return m.value.some((r) => r[e] === i[e]);
462
- }, G = z(() => {
461
+ })), ie = T(() => le.value || x.value), I = (i) => {
462
+ const t = l.item_key;
463
+ return m.value.some((r) => r[t] === i[t]);
464
+ }, G = T(() => {
463
465
  if (!c.value.length) return !1;
464
- const i = c.value.filter((e) => I(e)).length;
466
+ const i = c.value.filter((t) => I(t)).length;
465
467
  return i === 0 ? !1 : i === c.value.length ? !0 : "indeterminate";
466
- }), ue = z(() => m.value.length > 0);
468
+ }), ue = T(() => m.value.length > 0);
467
469
  q([G, h], ([i]) => {
468
470
  h.value && (i === "indeterminate" ? (console.log("entrei no indeterminate"), h.value.checked = !1, h.value.indeterminate = !0) : (h.value.checked = i, h.value.indeterminate = !1));
469
471
  }, {
470
472
  immediate: !0,
471
473
  flush: "post"
472
474
  }), q(B, (i) => {
473
- i ? (c.value = i[l.data_key] || [], S.value = i[l.total_key] || 0, p.value.count = S.value) : (c.value = [], S.value = 0);
475
+ i ? (c.value = i[l.data_key] || [], $.value = i[l.total_key] || 0, p.value.count = $.value) : (c.value = [], $.value = 0);
474
476
  }, { immediate: !0 });
475
477
  function de() {
476
478
  const i = c.value;
477
479
  if (!i.length) return;
478
- const e = G.value;
479
- if (e === !0 || e === "indeterminate") {
480
- const r = i.map((s) => s[l.item_key]);
480
+ const t = G.value;
481
+ if (t === !0 || t === "indeterminate") {
482
+ const r = i.map((e) => e[l.item_key]);
481
483
  m.value = m.value.filter(
482
- (s) => !r.includes(s[l.item_key])
484
+ (e) => !r.includes(e[l.item_key])
483
485
  );
484
486
  } else
485
487
  i.forEach((r) => {
@@ -487,7 +489,7 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
487
489
  });
488
490
  }
489
491
  function ce(i) {
490
- const e = l.item_key, r = m.value.findIndex((s) => s[e] === i[e]);
492
+ const t = l.item_key, r = m.value.findIndex((e) => e[t] === i[t]);
491
493
  r > -1 ? m.value.splice(r, 1) : m.value.push(i);
492
494
  }
493
495
  function pe(i) {
@@ -499,221 +501,221 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
499
501
  x.value = !1;
500
502
  }, l.min_loading_delay), re();
501
503
  }
502
- function me() {
504
+ function _e() {
503
505
  p.value.current_page = 0, L();
504
506
  }
505
507
  const J = (i) => {
506
- const e = i.target, r = parseInt(e.value, 10);
508
+ const t = i.target, r = parseInt(t.value, 10);
507
509
  r > 0 ? (d.value = r, p.value.limit_per_page = r, p.value.current_page = 0, L()) : d.value = p.value.limit_per_page;
508
510
  };
509
- function D(i, e, r = null) {
510
- if (!i) return e;
511
- const s = i.split(".");
512
- let T = e;
513
- for (const F of s)
514
- T && typeof T == "object" && F in T ? T = T[F] : console.error(`Caminho inválido ou valor nulo em: ${i} na parte ${F}`);
515
- return r && (T = r(T)), T;
511
+ function D(i, t, r = null) {
512
+ if (!i) return t;
513
+ const e = i.split(".");
514
+ let S = t;
515
+ for (const Y of e)
516
+ S && typeof S == "object" && Y in S ? S = S[Y] : console.error(`Caminho inválido ou valor nulo em: ${i} na parte ${Y}`);
517
+ return r && (S = r(S)), S;
516
518
  }
517
- function _e(i, e) {
518
- return e && typeof e == "number" && e > 0 && typeof i == "string" && i.length > e ? i.substring(0, e) + "..." : i;
519
+ function me(i, t) {
520
+ return t && typeof t == "number" && t > 0 && typeof i == "string" && i.length > t ? i.substring(0, t) + "..." : i;
519
521
  }
520
522
  return u({
521
523
  execute: L,
522
524
  pagination: p,
523
- default_params: Y,
525
+ default_params: U,
524
526
  selected_items: m,
525
527
  atLeastOneSelected: ue
526
528
  }), te(() => {
527
529
  be(() => {
528
530
  L();
529
531
  });
530
- }), (i, e) => (t(), a("div", null, [
531
- n("div", {
532
+ }), (i, t) => (n(), a("div", null, [
533
+ s("div", {
532
534
  class: _(["", l.class_container])
533
535
  }, [
534
536
  O(i.$slots, "default", {}, void 0, !0),
535
- n("div", {
537
+ s("div", {
536
538
  class: _(["", l.class_content])
537
539
  }, [
538
- n("div", Fe, [
540
+ s("div", Ye, [
539
541
  O(i.$slots, "pageSize", {
540
542
  changePageSize: J,
541
543
  page_size: d.value
542
544
  }, () => [
543
- n("div", Xe, [
544
- N(g(l.first_text_page_size) + " ", 1),
545
- n("div", We, [
546
- ae(n("input", {
545
+ s("div", Xe, [
546
+ N(v(l.first_text_page_size) + " ", 1),
547
+ s("div", We, [
548
+ ne(s("input", {
547
549
  class: "form-control form-control-sm",
548
550
  onChange: J,
549
- "onUpdate:modelValue": e[0] || (e[0] = (r) => d.value = r),
551
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => d.value = r),
550
552
  min: "1",
551
553
  size: "3",
552
554
  "aria-label": "Número de nóticias por página"
553
555
  }, null, 544), [
554
- [ne, d.value]
556
+ [ae, d.value]
555
557
  ])
556
558
  ]),
557
- N(" " + g(l.second_text_page_size), 1)
559
+ N(" " + v(l.second_text_page_size), 1)
558
560
  ])
559
561
  ], !0),
560
562
  O(i.$slots, "fieldMiddle", {}, void 0, !0),
561
- Q(Ue, {
563
+ Q(Ke, {
562
564
  search: p.value.search,
563
- "onUpdate:search": e[1] || (e[1] = (r) => p.value.search = r),
565
+ "onUpdate:search": t[1] || (t[1] = (r) => p.value.search = r),
564
566
  filter: p.value.filter,
565
- "onUpdate:filter": e[2] || (e[2] = (r) => p.value.filter = r),
567
+ "onUpdate:filter": t[2] || (t[2] = (r) => p.value.filter = r),
566
568
  list_filter: l.list_filter,
567
569
  item_use: oe.value,
568
- onSearch: me
570
+ onSearch: _e
569
571
  }, null, 8, ["search", "filter", "list_filter", "item_use"])
570
572
  ]),
571
- l.use_checkbox && m.value.length > 0 ? (t(), a("div", Ge, [
572
- n("h4", Je, [
573
- e[4] || (e[4] = n("strong", null, "Itens Selecionados:", -1)),
574
- N(" " + g(m.value.length), 1)
573
+ l.use_checkbox && m.value.length > 0 ? (n(), a("div", Ge, [
574
+ s("h4", Je, [
575
+ t[4] || (t[4] = s("strong", null, "Itens Selecionados:", -1)),
576
+ N(" " + v(m.value.length), 1)
575
577
  ]),
576
- n("button", {
578
+ s("button", {
577
579
  class: "btn btn-outline-danger ms-3 bold",
578
- onClick: e[3] || (e[3] = (r) => m.value = [])
580
+ onClick: t[3] || (t[3] = (r) => m.value = [])
579
581
  }, "Limpar Seleção")
580
582
  ])) : b("", !0),
581
- ie.value ? (t(), a(M, { key: 1 }, [
582
- l.custom_loading ? (t(), X(Z(l.custom_loading), { key: 0 })) : (t(), a("table", {
583
+ ie.value ? (n(), a(M, { key: 1 }, [
584
+ l.custom_loading ? (n(), X(Z(l.custom_loading), { key: 0 })) : (n(), a("table", {
583
585
  key: 1,
584
586
  class: _(["table table-vcenter table-selectable", l.class_table])
585
587
  }, [
586
- n("thead", null, [
587
- n("tr", null, [
588
- (t(!0), a(M, null, P(k.value, (r) => (t(), a("th", {
588
+ s("thead", null, [
589
+ s("tr", null, [
590
+ (n(!0), a(M, null, z(k.value, (r) => (n(), a("th", {
589
591
  key: r.field || r.header,
590
592
  class: _(r.class_column)
591
- }, g(r.header), 3))), 128))
593
+ }, v(r.header), 3))), 128))
592
594
  ])
593
595
  ]),
594
- n("tbody", null, [
595
- l.type_loading === "placeholder" ? (t(!0), a(M, { key: 0 }, P(d.value, (r) => (t(), a("tr", {
596
+ s("tbody", null, [
597
+ l.type_loading === "placeholder" ? (n(!0), a(M, { key: 0 }, z(d.value, (r) => (n(), a("tr", {
596
598
  key: "placeholder-" + r,
597
599
  class: "placeholder-glow"
598
600
  }, [
599
- (t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
600
- key: s.field || s.header,
601
- class: _(s.class_row)
601
+ (n(!0), a(M, null, z(k.value, (e) => (n(), a("td", {
602
+ key: e.field || e.header,
603
+ class: _(e.class_row)
602
604
  }, [
603
- s.bodySlot ? (t(), a("span", Qe, [...e[5] || (e[5] = [
604
- n("span", { class: "placeholder col-8" }, null, -1)
605
- ])])) : s.type === "text" ? (t(), a("span", {
605
+ e.bodySlot ? (n(), a("span", Qe, [...t[5] || (t[5] = [
606
+ s("span", { class: "placeholder col-8" }, null, -1)
607
+ ])])) : e.type === "text" ? (n(), a("span", {
606
608
  key: 1,
607
- class: _(s.class_item)
608
- }, [...e[6] || (e[6] = [
609
- n("span", { class: "placeholder col-8" }, null, -1)
610
- ])], 2)) : s.type === "date" ? (t(), a("span", Ze, [...e[7] || (e[7] = [
611
- n("span", { class: "placeholder col-9" }, null, -1)
612
- ])])) : s.type === "html" ? (t(), a("div", {
609
+ class: _(e.class_item)
610
+ }, [...t[6] || (t[6] = [
611
+ s("span", { class: "placeholder col-8" }, null, -1)
612
+ ])], 2)) : e.type === "date" ? (n(), a("span", Ze, [...t[7] || (t[7] = [
613
+ s("span", { class: "placeholder col-9" }, null, -1)
614
+ ])])) : e.type === "html" ? (n(), a("div", {
613
615
  key: 3,
614
- class: _(s.class_item)
615
- }, [...e[8] || (e[8] = [
616
- n("div", { class: "placeholder col-12" }, null, -1)
617
- ])], 2)) : s.type === "img" ? (t(), a("div", {
616
+ class: _(e.class_item)
617
+ }, [...t[8] || (t[8] = [
618
+ s("div", { class: "placeholder col-12" }, null, -1)
619
+ ])], 2)) : e.type === "img" ? (n(), a("div", {
618
620
  key: 4,
619
- class: _(s.class_item)
620
- }, [...e[9] || (e[9] = [
621
- n("div", { class: "placeholder placeholder-img" }, null, -1)
622
- ])], 2)) : (t(), a("span", Re, [
623
- e[10] || (e[10] = N("tipo ", -1)),
624
- n("span", et, g(s.type), 1),
625
- e[11] || (e[11] = N(" não suportado ", -1))
621
+ class: _(e.class_item)
622
+ }, [...t[9] || (t[9] = [
623
+ s("div", { class: "placeholder placeholder-img" }, null, -1)
624
+ ])], 2)) : (n(), a("span", Re, [
625
+ t[10] || (t[10] = N("tipo ", -1)),
626
+ s("span", et, v(e.type), 1),
627
+ t[11] || (t[11] = N(" não suportado ", -1))
626
628
  ]))
627
629
  ], 2))), 128))
628
- ]))), 128)) : l.type_loading === "spiner-table" ? (t(!0), a(M, { key: 1 }, P(d.value, (r) => (t(), a("tr", {
630
+ ]))), 128)) : l.type_loading === "spiner-table" ? (n(!0), a(M, { key: 1 }, z(d.value, (r) => (n(), a("tr", {
629
631
  key: "placeholder-" + r
630
632
  }, [
631
- (t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
632
- key: s.field || s.header,
633
- class: _(s.class_row)
633
+ (n(!0), a(M, null, z(k.value, (e) => (n(), a("td", {
634
+ key: e.field || e.header,
635
+ class: _(e.class_row)
634
636
  }, [
635
- s.bodySlot ? (t(), a("span", tt, [...e[12] || (e[12] = [
636
- n("span", {
637
+ e.bodySlot ? (n(), a("span", tt, [...t[12] || (t[12] = [
638
+ s("span", {
637
639
  class: "spinner-border spinner-border-sm",
638
640
  role: "status",
639
641
  "aria-hidden": "true"
640
642
  }, null, -1)
641
- ])])) : s.type === "text" ? (t(), a("span", {
643
+ ])])) : e.type === "text" ? (n(), a("span", {
642
644
  key: 1,
643
- class: _(s.class_item)
644
- }, [...e[13] || (e[13] = [
645
- n("span", {
645
+ class: _(e.class_item)
646
+ }, [...t[13] || (t[13] = [
647
+ s("span", {
646
648
  class: "spinner-border spinner-border-sm",
647
649
  role: "status",
648
650
  "aria-hidden": "true"
649
651
  }, null, -1)
650
- ])], 2)) : s.type === "date" ? (t(), a("span", at, [...e[14] || (e[14] = [
651
- n("span", {
652
+ ])], 2)) : e.type === "date" ? (n(), a("span", nt, [...t[14] || (t[14] = [
653
+ s("span", {
652
654
  class: "spinner-border spinner-border-sm",
653
655
  role: "status",
654
656
  "aria-hidden": "true"
655
657
  }, null, -1)
656
- ])])) : s.type === "html" ? (t(), a("div", {
658
+ ])])) : e.type === "html" ? (n(), a("div", {
657
659
  key: 3,
658
- class: _(s.class_item)
659
- }, [...e[15] || (e[15] = [
660
- n("span", {
660
+ class: _(e.class_item)
661
+ }, [...t[15] || (t[15] = [
662
+ s("span", {
661
663
  class: "spinner-border spinner-border-sm",
662
664
  role: "status",
663
665
  "aria-hidden": "true"
664
666
  }, null, -1)
665
- ])], 2)) : s.type === "img" ? (t(), a("div", {
667
+ ])], 2)) : e.type === "img" ? (n(), a("div", {
666
668
  key: 4,
667
- class: _(["", s.class_item])
668
- }, [...e[16] || (e[16] = [
669
- n("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
670
- n("span", {
669
+ class: _(["", e.class_item])
670
+ }, [...t[16] || (t[16] = [
671
+ s("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
672
+ s("span", {
671
673
  class: "spinner-border spinner-border-sm",
672
674
  role: "status",
673
675
  "aria-hidden": "true"
674
676
  })
675
677
  ], -1)
676
- ])], 2)) : (t(), a("span", nt, [
677
- e[17] || (e[17] = N("tipo ", -1)),
678
- n("span", st, g(s.type), 1),
679
- e[18] || (e[18] = N(" não suportado ", -1))
678
+ ])], 2)) : (n(), a("span", at, [
679
+ t[17] || (t[17] = N("tipo ", -1)),
680
+ s("span", st, v(e.type), 1),
681
+ t[18] || (t[18] = N(" não suportado ", -1))
680
682
  ]))
681
683
  ], 2))), 128))
682
- ]))), 128)) : l.type_loading === "spiner" ? (t(!0), a(M, { key: 2 }, P(d.value, (r) => (t(), a("tr", { key: r }, [
683
- n("td", {
684
+ ]))), 128)) : l.type_loading === "spiner" ? (n(!0), a(M, { key: 2 }, z(d.value, (r) => (n(), a("tr", { key: r }, [
685
+ s("td", {
684
686
  colspan: k.value.length,
685
687
  class: "text-center p-0",
686
688
  style: { "border-bottom": "none" }
687
689
  }, [
688
- r === Math.floor(d.value / 2) + 1 ? (t(), a("div", rt, [...e[19] || (e[19] = [
689
- n("div", {
690
+ r === Math.floor(d.value / 2) + 1 ? (n(), a("div", rt, [...t[19] || (t[19] = [
691
+ s("div", {
690
692
  class: "spinner-border",
691
693
  style: { width: "3rem", height: "3rem" },
692
694
  role: "status"
693
695
  }, null, -1),
694
- n("span", { class: "mt-2" }, "Carregando...", -1)
695
- ])])) : (t(), a("div", ot))
696
+ s("span", { class: "mt-2" }, "Carregando...", -1)
697
+ ])])) : (n(), a("div", ot))
696
698
  ], 8, lt)
697
699
  ]))), 128)) : b("", !0)
698
700
  ])
699
701
  ], 2)),
700
- w(V) && w(V).current > 1 ? (t(), a("div", it, " A conexão falhou. Tentando novamente... (Tentativa " + g(w(V).current) + " de " + g(w(V).total) + ") ", 1)) : b("", !0)
701
- ], 64)) : w(U) ? (t(), a("div", ut, [
702
- e[20] || (e[20] = n("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
703
- w(V) ? (t(), a("p", dt, " Não foi possível carregar os dados após " + g(w(V).total) + " tentativa(s). ", 1)) : (t(), a("p", ct, " Não foi possível carregar os dados. Verifique sua conexão. ")),
704
- n("button", {
702
+ w(V) && w(V).current > 1 ? (n(), a("div", it, " A conexão falhou. Tentando novamente... (Tentativa " + v(w(V).current) + " de " + v(w(V).total) + ") ", 1)) : b("", !0)
703
+ ], 64)) : w(K) ? (n(), a("div", ut, [
704
+ t[20] || (t[20] = s("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
705
+ w(V) ? (n(), a("p", dt, " Não foi possível carregar os dados após " + v(w(V).total) + " tentativa(s). ", 1)) : (n(), a("p", ct, " Não foi possível carregar os dados. Verifique sua conexão. ")),
706
+ s("button", {
705
707
  class: "btn btn-primary mt-2",
706
708
  onClick: L
707
709
  }, " Tentar Novamente ")
708
- ])) : c.value ? (t(), a("div", pt, [
709
- c.value.length > 0 ? (t(), a("div", mt, [
710
- n("table", {
710
+ ])) : c.value ? (n(), a("div", pt, [
711
+ c.value.length > 0 ? (n(), a("div", _t, [
712
+ s("table", {
711
713
  class: _(["table table-vcenter table-selectable", l.class_table])
712
714
  }, [
713
- n("thead", null, [
714
- n("tr", null, [
715
- l.use_checkbox ? (t(), a("th", _t, [
716
- n("input", {
715
+ s("thead", null, [
716
+ s("tr", null, [
717
+ l.use_checkbox ? (n(), a("th", mt, [
718
+ s("input", {
717
719
  class: "form-check-input m-0",
718
720
  type: "checkbox",
719
721
  ref_key: "selectAllCheckbox",
@@ -722,82 +724,89 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
722
724
  "aria-label": "Selecionar todos os itens na página"
723
725
  }, null, 544)
724
726
  ])) : b("", !0),
725
- (t(!0), a(M, null, P(k.value, (r) => (t(), a("th", {
727
+ (n(!0), a(M, null, z(k.value, (r) => (n(), a("th", {
726
728
  key: r.field || r.header,
727
729
  class: _(r.class_column)
728
- }, g(r.header), 3))), 128))
730
+ }, v(r.header), 3))), 128))
729
731
  ])
730
732
  ]),
731
- n("tbody", null, [
732
- (t(!0), a(M, null, P(c.value, (r) => (t(), a("tr", {
733
+ s("tbody", null, [
734
+ (n(!0), a(M, null, z(c.value, (r) => (n(), a("tr", {
733
735
  key: r[l.item_key]
734
736
  }, [
735
- l.use_checkbox ? (t(), a("td", ft, [
736
- n("input", {
737
+ l.use_checkbox ? (n(), a("td", ft, [
738
+ s("input", {
737
739
  class: "form-check-input m-0",
738
740
  type: "checkbox",
739
741
  checked: I(r),
740
- onChange: (s) => ce(r),
742
+ onChange: (e) => ce(r),
741
743
  "aria-label": "Selecionar este item"
742
- }, null, 40, gt)
744
+ }, null, 40, vt)
743
745
  ])) : b("", !0),
744
- (t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
745
- key: s.field || s.header,
746
- class: _(s.class_row)
746
+ (n(!0), a(M, null, z(k.value, (e) => (n(), a("td", {
747
+ key: e.field || e.header,
748
+ class: _(e.class_row)
747
749
  }, [
748
- s.bodySlot ? (t(), X(Z(s.bodySlot), {
750
+ e.bodySlot ? (n(), X(Z(e.bodySlot), {
749
751
  key: 0,
750
752
  item: r,
751
753
  "is-selected": I(r)
752
- }, null, 8, ["item", "is-selected"])) : s.type === "text" ? (t(), a("span", {
754
+ }, null, 8, ["item", "is-selected"])) : e.type === "text" ? (n(), a("span", {
753
755
  key: 1,
754
- class: _(s.class_item)
755
- }, g(_e(D(s.field, r, s.transform_function), s.limite_text ?? null)), 3)) : s.type === "date" ? (t(), a("span", vt, [
756
- s.format === "complete" ? (t(), a("span", ht, g(new Date(D(s.field, r)).toLocaleString()), 1)) : b("", !0),
757
- s.format === "simple" ? (t(), a("span", yt, g(new Date(D(
758
- s.field,
756
+ onClick: (S) => e.click ? e.click(r) : null,
757
+ class: _(e.class_item + (e.click ? " cursor-pointer" : ""))
758
+ }, v(me(D(e.field, r, e.transform_function), e.limite_text ?? null)), 11, gt)) : e.type === "date" ? (n(), a("span", {
759
+ key: 2,
760
+ onClick: (S) => e.click ? e.click(r) : null,
761
+ class: _(e.class_item + (e.click ? " cursor-pointer" : ""))
762
+ }, [
763
+ e.format === "complete" ? (n(), a("span", yt, v(new Date(D(e.field, r)).toLocaleString()), 1)) : b("", !0),
764
+ e.format === "simple" ? (n(), a("span", kt, v(new Date(D(
765
+ e.field,
759
766
  r
760
767
  )).toLocaleDateString()), 1)) : b("", !0)
761
- ])) : s.type === "html" ? (t(), a("div", {
768
+ ], 10, ht)) : e.type === "html" ? (n(), a("div", {
762
769
  key: 3,
763
- class: _(s.class_item),
764
- innerHTML: D(s.field, r)
765
- }, null, 10, kt)) : s.type === "img" ? (t(), a("div", {
770
+ onClick: (S) => e.click ? e.click(r) : null,
771
+ class: _(e.class_item + (e.click ? " cursor-pointer" : "")),
772
+ innerHTML: D(e.field, r)
773
+ }, null, 10, bt)) : e.type === "img" ? (n(), a("div", {
766
774
  key: 4,
767
- class: _(s.class_item)
775
+ onClick: (S) => e.click ? e.click(r) : null,
776
+ class: _(e.class_item + (e.click ? " cursor-pointer" : ""))
768
777
  }, [
769
- D(s.field, r) ? (t(), a("div", xe({
778
+ D(e.field, r) ? (n(), a("div", xe({
770
779
  key: 0,
771
780
  ref_for: !0
772
- }, s.deactivate_img_preview ? {
781
+ }, e.deactivate_img_preview ? {
773
782
  class: "container-img"
774
783
  } : {
775
- onMouseover: (T) => w(C)(T, D(s.field, r)),
784
+ onMouseover: (S) => w(C)(S, D(e.field, r)),
776
785
  onMousemove: w(A),
777
786
  onMouseleave: w(E),
778
787
  class: "container-img container-img-preview"
779
788
  }), [
780
- n("img", {
789
+ s("img", {
781
790
  class: "img-tamanho",
782
- src: D(s.field, r)
783
- }, null, 8, bt),
784
- n("img", {
791
+ src: D(e.field, r)
792
+ }, null, 8, wt),
793
+ s("img", {
785
794
  class: "img-tamanho-cover",
786
- src: D(s.field, r)
787
- }, null, 8, xt),
788
- e[21] || (e[21] = n("div", { class: "bg-img" }, null, -1))
795
+ src: D(e.field, r)
796
+ }, null, 8, Ct),
797
+ t[21] || (t[21] = s("div", { class: "bg-img" }, null, -1))
789
798
  ], 16)) : b("", !0)
790
- ], 2)) : (t(), a("span", wt, [
791
- e[22] || (e[22] = N("tipo ", -1)),
792
- n("span", Ct, g(s.type), 1),
793
- e[23] || (e[23] = N(" não suportado", -1))
799
+ ], 10, xt)) : (n(), a("span", $t, [
800
+ t[22] || (t[22] = N("tipo ", -1)),
801
+ s("span", St, v(e.type), 1),
802
+ t[23] || (t[23] = N(" não suportado", -1))
794
803
  ]))
795
804
  ], 2))), 128))
796
805
  ]))), 128))
797
806
  ])
798
807
  ], 2)
799
- ])) : (t(), a("div", St, [...e[24] || (e[24] = [
800
- n("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
808
+ ])) : (n(), a("div", Mt, [...t[24] || (t[24] = [
809
+ s("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
801
810
  ])]))
802
811
  ])) : b("", !0)
803
812
  ], 2)
@@ -805,9 +814,9 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
805
814
  O(i.$slots, "pagination", {
806
815
  pagination: p.value,
807
816
  tradePage: L,
808
- error: w(U)
817
+ error: w(K)
809
818
  }, () => [
810
- !w(U) && p.value.count > 0 ? (t(), a("div", {
819
+ !w(K) && p.value.count > 0 ? (n(), a("div", {
811
820
  key: 0,
812
821
  class: _(["mt-3 px-3", l.class_pagination])
813
822
  }, [
@@ -818,21 +827,21 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
818
827
  }, null, 8, ["pagination"])
819
828
  ], 2)) : b("", !0)
820
829
  ], !0),
821
- w(o) ? (t(), a("div", {
830
+ w(o) ? (n(), a("div", {
822
831
  key: 0,
823
832
  class: "image-preview-container",
824
- style: we(w(v))
833
+ style: we(w(g))
825
834
  }, [
826
- n("img", {
835
+ s("img", {
827
836
  src: w(f),
828
837
  alt: "Preview",
829
838
  class: "image-preview-large"
830
- }, null, 8, Mt)
839
+ }, null, 8, Pt)
831
840
  ], 4)) : b("", !0)
832
841
  ]));
833
842
  }
834
- }), Tt = /* @__PURE__ */ W($t, [["__scopeId", "data-v-fa062ce8"]]);
843
+ }), At = /* @__PURE__ */ W(zt, [["__scopeId", "data-v-693cabb6"]]);
835
844
  export {
836
- zt as VColumn,
837
- Tt as VDataTable
845
+ Nt as VColumn,
846
+ At as VDataTable
838
847
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "v-sistec-features",
3
3
  "private": false,
4
- "version": "1.1.1",
4
+ "version": "1.2.0",
5
5
  "author": "Márlon Bento Azevedo (https://github.com/marlon-bento)",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,6 +17,7 @@ interface VColumnProps {
17
17
  deactivate_img_preview?: boolean;
18
18
  limite_text?: number | string | null;
19
19
  transform_function?: ((value: any) => any) | null;
20
+ click?: Function | null;
20
21
  }
21
22
  const props = withDefaults(defineProps<VColumnProps>(), {
22
23
  field: null,
@@ -41,6 +42,7 @@ const props = withDefaults(defineProps<VColumnProps>(), {
41
42
 
42
43
  /* recebe função para alterar o que é mostrado */
43
44
  transform_function: null ,
45
+ click: null,
44
46
  });
45
47
 
46
48
  const slots = useSlots();
@@ -83,6 +85,7 @@ onMounted(() => {
83
85
  class_column: props.class_column,
84
86
  class_row: props.class_row,
85
87
  class_item: props.class_item,
88
+ click: props.click,
86
89
  transform_function: props.transform_function,
87
90
 
88
91
  bodySlot: slots.body,
@@ -8,8 +8,8 @@
8
8
  <div class="text-secondary">
9
9
  {{ props.first_text_page_size }}
10
10
  <div class="mx-2 d-inline-block">
11
- <input class="form-control form-control-sm" @change="changePageSize" v-model="page_size" min="1" size="3"
12
- aria-label="Número de nóticias por página" />
11
+ <input class="form-control form-control-sm" @change="changePageSize" v-model="page_size" min="1"
12
+ size="3" aria-label="Número de nóticias por página" />
13
13
  </div>
14
14
  {{ props.second_text_page_size }}
15
15
  </div>
@@ -45,7 +45,7 @@
45
45
  <template v-if="props.type_loading === 'placeholder'">
46
46
  <tr v-for="n in page_size" :key="'placeholder-' + n" class="placeholder-glow">
47
47
  <td v-for="col in columns" :key="col.field || col.header" :class="col.class_row">
48
- <span v-if="col.bodySlot" >
48
+ <span v-if="col.bodySlot">
49
49
  <span class="placeholder col-8"></span>
50
50
  </span>
51
51
  <span :class="col.class_item" v-else-if="col.type === 'text'">
@@ -71,7 +71,7 @@
71
71
  <template v-else-if="props.type_loading === 'spiner-table'">
72
72
  <tr v-for="n in page_size" :key="'placeholder-' + n">
73
73
  <td v-for="col in columns" :key="col.field || col.header" :class="col.class_row">
74
- <span v-if="col.bodySlot" >
74
+ <span v-if="col.bodySlot">
75
75
  <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
76
76
  </span>
77
77
  <span :class="col.class_item" v-else-if="col.type === 'text'">
@@ -153,22 +153,25 @@
153
153
  </td>
154
154
  <td v-for="col in columns" :key="col.field || col.header" :class="col.class_row">
155
155
  <component v-if="col.bodySlot" :is="col.bodySlot" :item="item" :is-selected="isSelected(item)" />
156
- <span :class="col.class_item" v-else-if="col.type === 'text'">
156
+ <span @click="col.click ? col.click(item) : null"
157
+ :class="col.class_item + (col.click ? ' cursor-pointer' : '') " v-else-if="col.type === 'text'">
157
158
  {{
158
159
  limiteText(getSubItem(col.field, item, col.transform_function), col.limite_text ?? null)
159
160
  }}</span>
160
161
 
161
- <span v-else-if="col.type === 'date'">
162
+ <span @click="col.click ? col.click(item) : null" v-else-if="col.type === 'date'"
163
+ :class="col.class_item + (col.click ? ' cursor-pointer' : '') "
164
+ >
162
165
  <span v-if="col.format === 'complete'">{{ new Date(getSubItem(col.field, item)).toLocaleString()
163
- }}</span>
166
+ }}</span>
164
167
  <span v-if="col.format === 'simple'"> {{ new Date(getSubItem(col.field,
165
168
  item)).toLocaleDateString()
166
- }} </span>
169
+ }} </span>
167
170
  </span>
168
- <div :class="col.class_item" v-else-if="col.type === 'html'" v-html="getSubItem(col.field, item)">
171
+ <div @click="col.click ? col.click(item) : null" :class="col.class_item + (col.click ? ' cursor-pointer' : '') " v-else-if="col.type === 'html'" v-html="getSubItem(col.field, item)">
169
172
  </div>
170
173
 
171
- <div :class="col.class_item" v-else-if="col.type === 'img'">
174
+ <div @click="col.click ? col.click(item) : null" :class="col.class_item + (col.click ? ' cursor-pointer' : '') " v-else-if="col.type === 'img'">
172
175
 
173
176
  <div v-if="getSubItem(col.field, item)" v-bind="col.deactivate_img_preview ? {
174
177
  class: 'container-img'
@@ -193,9 +196,9 @@
193
196
  </tbody>
194
197
  </table>
195
198
  </div>
196
- <div v-else class="text-center p-4 text-secondary">
197
- <p class="m-0">Nenhum item encontrado.</p>
198
- </div>
199
+ <div v-else class="text-center p-4 text-secondary">
200
+ <p class="m-0">Nenhum item encontrado.</p>
201
+ </div>
199
202
  </div>
200
203
 
201
204
  </div>
@@ -215,7 +218,7 @@
215
218
 
216
219
  </template>
217
220
 
218
- <script setup lang="ts" generic="T extends Record<string, any>" >
221
+ <script setup lang="ts" generic="T extends Record<string, any>">
219
222
  import { ref, provide, computed, watch, onMounted, nextTick, type Component, type Ref, type ComputedRef } from 'vue';
220
223
 
221
224
  import PaginationDatatable from './PaginationDatatable.vue';
@@ -223,13 +226,13 @@ import Search from './SearchDatatable.vue';
223
226
  import { useImagePreview } from '../composables/useImagePreview';
224
227
  import { dataTableApiKey, type ColumnConfiguration, type PaginationObject } from '../keys';
225
228
 
226
- const {
227
- isHovering,
228
- previewSrc,
229
- previewStyle,
230
- handleMouseOver,
231
- handleMouseMove,
232
- handleMouseLeave
229
+ const {
230
+ isHovering,
231
+ previewSrc,
232
+ previewStyle,
233
+ handleMouseOver,
234
+ handleMouseMove,
235
+ handleMouseLeave
233
236
  } = useImagePreview();
234
237
 
235
238
  interface VDataTableProps {
@@ -504,7 +507,7 @@ provide(dataTableApiKey, { addColumn });
504
507
  // Função que gerencia o delay e a chamada da API
505
508
  function fetchDataWithDelay(): void {
506
509
  // Limpa timer anterior, se houver
507
- if (delayTimer.value) clearTimeout(delayTimer.value);
510
+ if (delayTimer.value) clearTimeout(delayTimer.value);
508
511
 
509
512
  isDelaying.value = true;
510
513
 
@@ -516,7 +519,7 @@ function fetchDataWithDelay(): void {
516
519
  }
517
520
 
518
521
  function reSearch(): void {
519
- pagination.value.current_page = 0;
522
+ pagination.value.current_page = 0;
520
523
  fetchDataWithDelay();
521
524
  }
522
525
 
@@ -526,7 +529,7 @@ const changePageSize = (event: Event): void => {
526
529
  if (newSize > 0) {
527
530
  page_size.value = newSize;
528
531
  pagination.value.limit_per_page = newSize; // Atualiza o limite de itens por página
529
- pagination.value.current_page = 0;
532
+ pagination.value.current_page = 0;
530
533
  fetchDataWithDelay();
531
534
  } else {
532
535
  // toast.showToast("Erro", "Tamanho da página deve ser maior que 0", 2);
@@ -539,15 +542,15 @@ function getSubItem(field: string | null, item: T, transform_function: ((value:
539
542
  const parts = field.split('.');
540
543
  let value_item = item;
541
544
 
542
- for(const part of parts){
543
- if (value_item && typeof value_item === 'object' && part in value_item){
545
+ for (const part of parts) {
546
+ if (value_item && typeof value_item === 'object' && part in value_item) {
544
547
  value_item = value_item[part];
545
548
  }
546
- else{
549
+ else {
547
550
  console.error(`Caminho inválido ou valor nulo em: ${field} na parte ${part}`);
548
551
  }
549
552
  }
550
-
553
+
551
554
  if (transform_function) {
552
555
  value_item = transform_function(value_item);
553
556
  }
@@ -568,7 +571,7 @@ function limiteText(text: string | null, limite: number | null): string | null {
568
571
  // =======================================================
569
572
 
570
573
  defineExpose<
571
- ExposedFunctions
574
+ ExposedFunctions
572
575
  >({
573
576
  execute: fetchDataWithDelay,
574
577
  pagination,
@@ -13,6 +13,7 @@ export interface ColumnConfiguration {
13
13
  limite_text?: number;
14
14
  deactivate_img_preview?: boolean;
15
15
  format?: 'complete' | 'simple';
16
+ click: Function | null;
16
17
  }
17
18
 
18
19
  // A API que o VDataTable "fornece" para os filhos