v-sistec-features 1.1.1 → 1.2.1

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-d20778cd]{overflow-x:auto}.state-feedback[data-v-d20778cd]{padding:1rem;text-align:center}.state-feedback.error[data-v-d20778cd]{color:red}.pagination-controls[data-v-d20778cd]{margin-top:1rem;display:flex;justify-content:space-between}.placeholder-img[data-v-d20778cd]{width:40px;height:40px;border-radius:4px}.container-img[data-v-d20778cd]{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-d20778cd]{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-d20778cd]{object-fit:contain;width:100%;height:100%;z-index:2}.container-img.container-img-preview[data-v-d20778cd]{cursor:pointer}.container-img.container-img-preview[data-v-d20778cd]: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-d20778cd]{opacity:.3}.erro-custom-container[data-v-d20778cd]{display:inline-block;padding:.2em .6em;border-radius:4px;background-color:#fff;font-weight:700;text-transform:uppercase}.erro-custom-text[data-v-d20778cd]{font-size:.8em;text-transform:uppercase;font-weight:700}.bg-img[data-v-d20778cd]{background-color:#0000004d;position:absolute;top:0;width:100%;height:100%;z-index:1}.image-preview-container[data-v-d20778cd]{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-d20778cd]{display:block;max-width:250px;max-height:250px;border-radius:4px}.form-check-input[data-v-d20778cd]{border-width:1px!important;border-color:#00000064!important;width:17px;height:17px}[data-bs-theme=dark] .form-check-input[data-v-d20778cd]{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 ge, onMounted as te, computed as T, createElementBlock as a, createCommentVNode as b, openBlock as n, createElementVNode as s, toDisplayString as g, withModifiers as j, Fragment as M, renderList as z, normalizeClass as _, watch as q, resolveComponent as ve, 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,7 +11,8 @@ 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
18
  const u = y, o = fe(), f = ge(se);
@@ -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, v = T(() => o.pagination.limit_per_page ? Math.ceil(o.pagination.count / o.pagination.limit_per_page) : 0), C = T(() => o.pagination.current_page + 1 < v.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
90
  o.pagination.current_page = v.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(() => {
95
+ }, c = T(() => {
94
96
  if (v.value <= 7)
95
97
  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([
98
+ const $ = o.pagination.current_page + 1, m = v.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 " + 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),
117
+ v.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
+ }, g(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,
@@ -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, v = 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
  });
@@ -207,9 +209,9 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
207
209
  }
208
210
  return (l, d) => {
209
211
  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", {
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,16 +223,16 @@ 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",
@@ -238,15 +240,15 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
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, v.value]
242
244
  ]),
243
- v.value ? (t(), a("span", {
245
+ v.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,19 +281,19 @@ 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"
@@ -300,7 +302,7 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
300
302
  N(g(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" : ""])
@@ -310,9 +312,9 @@ const se = Symbol("v-datatable-key"), zt = /* @__PURE__ */ K({
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), v = 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);
@@ -342,14 +344,14 @@ function Ye() {
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
+ }, gt = ["checked", "onChange"], vt = ["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: {},
@@ -413,7 +415,8 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
413
415
  retry_attempts: { default: 3 },
414
416
  retry_delay: { default: 2e3 },
415
417
  use_checkbox: { type: Boolean, default: !1 },
416
- item_key: { default: "id" }
418
+ item_key: { default: "id" },
419
+ limit_per_page: { default: 5 }
417
420
  },
418
421
  setup(y, { expose: u }) {
419
422
  const {
@@ -423,63 +426,63 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
423
426
  handleMouseOver: C,
424
427
  handleMouseMove: A,
425
428
  handleMouseLeave: E
426
- } = Ye(), l = y, d = $(5), k = $([]), c = $([]), S = $(0), m = $([]), h = $(null), x = $(!1), H = $(null), p = $({
429
+ } = 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
430
  current_page: 0,
428
431
  // pagina atual
429
432
  count: 0,
430
433
  // total de itens
431
- limit_per_page: 5,
434
+ limit_per_page: l.limit_per_page,
432
435
  // limite de itens por página
433
436
  search: "",
434
437
  // termo de busca
435
438
  filter: ""
436
439
  // filtro selecionado
437
- }), { data: B, pending: le, error: U, execute: re, attempt: V } = l.fetch(l.endpoint, {
440
+ }), { data: B, pending: le, error: K, execute: re, attempt: V } = l.fetch(l.endpoint, {
438
441
  params: () => l.deactivate_default_params ? l.add_params && typeof l.add_params == "function" ? l.add_params() : {
439
442
  ...l.add_params
440
443
  } : l.add_params && typeof l.add_params == "function" ? {
441
- ...Y.value,
444
+ ...U.value,
442
445
  ...l.add_params()
443
446
  } : {
444
- ...Y.value,
447
+ ...U.value,
445
448
  ...l.add_params
446
449
  },
447
450
  retry: l.retry_attempts,
448
451
  retryDelay: l.retry_delay,
449
452
  paramsReactives: !1,
450
453
  immediate: !1
451
- }, l.fetch_name), oe = z(() => {
454
+ }, l.fetch_name), oe = T(() => {
452
455
  let i = [1];
453
456
  return l.list_filter.length > 0 && i.push(2), i;
454
- }), Y = z(() => ({
457
+ }), U = T(() => ({
455
458
  [l.page_param_name]: p.value.current_page + 1,
456
459
  [l.page_size_param_name]: p.value.limit_per_page,
457
460
  [l.search_param_name]: p.value.search || "",
458
461
  [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(() => {
462
+ })), ie = T(() => le.value || x.value), I = (i) => {
463
+ const t = l.item_key;
464
+ return m.value.some((r) => r[t] === i[t]);
465
+ }, G = T(() => {
463
466
  if (!c.value.length) return !1;
464
- const i = c.value.filter((e) => I(e)).length;
467
+ const i = c.value.filter((t) => I(t)).length;
465
468
  return i === 0 ? !1 : i === c.value.length ? !0 : "indeterminate";
466
- }), ue = z(() => m.value.length > 0);
469
+ }), ue = T(() => m.value.length > 0);
467
470
  q([G, h], ([i]) => {
468
471
  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
472
  }, {
470
473
  immediate: !0,
471
474
  flush: "post"
472
475
  }), 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);
476
+ i ? (c.value = i[l.data_key] || [], $.value = i[l.total_key] || 0, p.value.count = $.value) : (c.value = [], $.value = 0);
474
477
  }, { immediate: !0 });
475
478
  function de() {
476
479
  const i = c.value;
477
480
  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]);
481
+ const t = G.value;
482
+ if (t === !0 || t === "indeterminate") {
483
+ const r = i.map((e) => e[l.item_key]);
481
484
  m.value = m.value.filter(
482
- (s) => !r.includes(s[l.item_key])
485
+ (e) => !r.includes(e[l.item_key])
483
486
  );
484
487
  } else
485
488
  i.forEach((r) => {
@@ -487,7 +490,7 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
487
490
  });
488
491
  }
489
492
  function ce(i) {
490
- const e = l.item_key, r = m.value.findIndex((s) => s[e] === i[e]);
493
+ const t = l.item_key, r = m.value.findIndex((e) => e[t] === i[t]);
491
494
  r > -1 ? m.value.splice(r, 1) : m.value.push(i);
492
495
  }
493
496
  function pe(i) {
@@ -499,221 +502,221 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
499
502
  x.value = !1;
500
503
  }, l.min_loading_delay), re();
501
504
  }
502
- function me() {
505
+ function _e() {
503
506
  p.value.current_page = 0, L();
504
507
  }
505
508
  const J = (i) => {
506
- const e = i.target, r = parseInt(e.value, 10);
509
+ const t = i.target, r = parseInt(t.value, 10);
507
510
  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
511
  };
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;
512
+ function D(i, t, r = null) {
513
+ if (!i) return t;
514
+ const e = i.split(".");
515
+ let S = t;
516
+ for (const Y of e)
517
+ S && typeof S == "object" && Y in S ? S = S[Y] : console.error(`Caminho inválido ou valor nulo em: ${i} na parte ${Y}`);
518
+ return r && (S = r(S)), S;
516
519
  }
517
- function _e(i, e) {
518
- return e && typeof e == "number" && e > 0 && typeof i == "string" && i.length > e ? i.substring(0, e) + "..." : i;
520
+ function me(i, t) {
521
+ return t && typeof t == "number" && t > 0 && typeof i == "string" && i.length > t ? i.substring(0, t) + "..." : i;
519
522
  }
520
523
  return u({
521
524
  execute: L,
522
525
  pagination: p,
523
- default_params: Y,
526
+ default_params: U,
524
527
  selected_items: m,
525
528
  atLeastOneSelected: ue
526
529
  }), te(() => {
527
530
  be(() => {
528
531
  L();
529
532
  });
530
- }), (i, e) => (t(), a("div", null, [
531
- n("div", {
533
+ }), (i, t) => (n(), a("div", null, [
534
+ s("div", {
532
535
  class: _(["", l.class_container])
533
536
  }, [
534
537
  O(i.$slots, "default", {}, void 0, !0),
535
- n("div", {
538
+ s("div", {
536
539
  class: _(["", l.class_content])
537
540
  }, [
538
- n("div", Fe, [
541
+ s("div", Ye, [
539
542
  O(i.$slots, "pageSize", {
540
543
  changePageSize: J,
541
544
  page_size: d.value
542
545
  }, () => [
543
- n("div", Xe, [
546
+ s("div", Xe, [
544
547
  N(g(l.first_text_page_size) + " ", 1),
545
- n("div", We, [
546
- ae(n("input", {
548
+ s("div", We, [
549
+ ne(s("input", {
547
550
  class: "form-control form-control-sm",
548
551
  onChange: J,
549
- "onUpdate:modelValue": e[0] || (e[0] = (r) => d.value = r),
552
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => d.value = r),
550
553
  min: "1",
551
554
  size: "3",
552
555
  "aria-label": "Número de nóticias por página"
553
556
  }, null, 544), [
554
- [ne, d.value]
557
+ [ae, d.value]
555
558
  ])
556
559
  ]),
557
560
  N(" " + g(l.second_text_page_size), 1)
558
561
  ])
559
562
  ], !0),
560
563
  O(i.$slots, "fieldMiddle", {}, void 0, !0),
561
- Q(Ue, {
564
+ Q(Ke, {
562
565
  search: p.value.search,
563
- "onUpdate:search": e[1] || (e[1] = (r) => p.value.search = r),
566
+ "onUpdate:search": t[1] || (t[1] = (r) => p.value.search = r),
564
567
  filter: p.value.filter,
565
- "onUpdate:filter": e[2] || (e[2] = (r) => p.value.filter = r),
568
+ "onUpdate:filter": t[2] || (t[2] = (r) => p.value.filter = r),
566
569
  list_filter: l.list_filter,
567
570
  item_use: oe.value,
568
- onSearch: me
571
+ onSearch: _e
569
572
  }, null, 8, ["search", "filter", "list_filter", "item_use"])
570
573
  ]),
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
+ l.use_checkbox && m.value.length > 0 ? (n(), a("div", Ge, [
575
+ s("h4", Je, [
576
+ t[4] || (t[4] = s("strong", null, "Itens Selecionados:", -1)),
574
577
  N(" " + g(m.value.length), 1)
575
578
  ]),
576
- n("button", {
579
+ s("button", {
577
580
  class: "btn btn-outline-danger ms-3 bold",
578
- onClick: e[3] || (e[3] = (r) => m.value = [])
581
+ onClick: t[3] || (t[3] = (r) => m.value = [])
579
582
  }, "Limpar Seleção")
580
583
  ])) : 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", {
584
+ ie.value ? (n(), a(M, { key: 1 }, [
585
+ l.custom_loading ? (n(), X(Z(l.custom_loading), { key: 0 })) : (n(), a("table", {
583
586
  key: 1,
584
587
  class: _(["table table-vcenter table-selectable", l.class_table])
585
588
  }, [
586
- n("thead", null, [
587
- n("tr", null, [
588
- (t(!0), a(M, null, P(k.value, (r) => (t(), a("th", {
589
+ s("thead", null, [
590
+ s("tr", null, [
591
+ (n(!0), a(M, null, z(k.value, (r) => (n(), a("th", {
589
592
  key: r.field || r.header,
590
593
  class: _(r.class_column)
591
594
  }, g(r.header), 3))), 128))
592
595
  ])
593
596
  ]),
594
- n("tbody", null, [
595
- l.type_loading === "placeholder" ? (t(!0), a(M, { key: 0 }, P(d.value, (r) => (t(), a("tr", {
597
+ s("tbody", null, [
598
+ l.type_loading === "placeholder" ? (n(!0), a(M, { key: 0 }, z(d.value, (r) => (n(), a("tr", {
596
599
  key: "placeholder-" + r,
597
600
  class: "placeholder-glow"
598
601
  }, [
599
- (t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
600
- key: s.field || s.header,
601
- class: _(s.class_row)
602
+ (n(!0), a(M, null, z(k.value, (e) => (n(), a("td", {
603
+ key: e.field || e.header,
604
+ class: _(e.class_row)
602
605
  }, [
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", {
606
+ e.bodySlot ? (n(), a("span", Qe, [...t[5] || (t[5] = [
607
+ s("span", { class: "placeholder col-8" }, null, -1)
608
+ ])])) : e.type === "text" ? (n(), a("span", {
606
609
  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", {
610
+ class: _(e.class_item)
611
+ }, [...t[6] || (t[6] = [
612
+ s("span", { class: "placeholder col-8" }, null, -1)
613
+ ])], 2)) : e.type === "date" ? (n(), a("span", Ze, [...t[7] || (t[7] = [
614
+ s("span", { class: "placeholder col-9" }, null, -1)
615
+ ])])) : e.type === "html" ? (n(), a("div", {
613
616
  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", {
617
+ class: _(e.class_item)
618
+ }, [...t[8] || (t[8] = [
619
+ s("div", { class: "placeholder col-12" }, null, -1)
620
+ ])], 2)) : e.type === "img" ? (n(), a("div", {
618
621
  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))
622
+ class: _(e.class_item)
623
+ }, [...t[9] || (t[9] = [
624
+ s("div", { class: "placeholder placeholder-img" }, null, -1)
625
+ ])], 2)) : (n(), a("span", Re, [
626
+ t[10] || (t[10] = N("tipo ", -1)),
627
+ s("span", et, g(e.type), 1),
628
+ t[11] || (t[11] = N(" não suportado ", -1))
626
629
  ]))
627
630
  ], 2))), 128))
628
- ]))), 128)) : l.type_loading === "spiner-table" ? (t(!0), a(M, { key: 1 }, P(d.value, (r) => (t(), a("tr", {
631
+ ]))), 128)) : l.type_loading === "spiner-table" ? (n(!0), a(M, { key: 1 }, z(d.value, (r) => (n(), a("tr", {
629
632
  key: "placeholder-" + r
630
633
  }, [
631
- (t(!0), a(M, null, P(k.value, (s) => (t(), a("td", {
632
- key: s.field || s.header,
633
- class: _(s.class_row)
634
+ (n(!0), a(M, null, z(k.value, (e) => (n(), a("td", {
635
+ key: e.field || e.header,
636
+ class: _(e.class_row)
634
637
  }, [
635
- s.bodySlot ? (t(), a("span", tt, [...e[12] || (e[12] = [
636
- n("span", {
638
+ e.bodySlot ? (n(), a("span", tt, [...t[12] || (t[12] = [
639
+ s("span", {
637
640
  class: "spinner-border spinner-border-sm",
638
641
  role: "status",
639
642
  "aria-hidden": "true"
640
643
  }, null, -1)
641
- ])])) : s.type === "text" ? (t(), a("span", {
644
+ ])])) : e.type === "text" ? (n(), a("span", {
642
645
  key: 1,
643
- class: _(s.class_item)
644
- }, [...e[13] || (e[13] = [
645
- n("span", {
646
+ class: _(e.class_item)
647
+ }, [...t[13] || (t[13] = [
648
+ s("span", {
646
649
  class: "spinner-border spinner-border-sm",
647
650
  role: "status",
648
651
  "aria-hidden": "true"
649
652
  }, null, -1)
650
- ])], 2)) : s.type === "date" ? (t(), a("span", at, [...e[14] || (e[14] = [
651
- n("span", {
653
+ ])], 2)) : e.type === "date" ? (n(), a("span", nt, [...t[14] || (t[14] = [
654
+ s("span", {
652
655
  class: "spinner-border spinner-border-sm",
653
656
  role: "status",
654
657
  "aria-hidden": "true"
655
658
  }, null, -1)
656
- ])])) : s.type === "html" ? (t(), a("div", {
659
+ ])])) : e.type === "html" ? (n(), a("div", {
657
660
  key: 3,
658
- class: _(s.class_item)
659
- }, [...e[15] || (e[15] = [
660
- n("span", {
661
+ class: _(e.class_item)
662
+ }, [...t[15] || (t[15] = [
663
+ s("span", {
661
664
  class: "spinner-border spinner-border-sm",
662
665
  role: "status",
663
666
  "aria-hidden": "true"
664
667
  }, null, -1)
665
- ])], 2)) : s.type === "img" ? (t(), a("div", {
668
+ ])], 2)) : e.type === "img" ? (n(), a("div", {
666
669
  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", {
670
+ class: _(["", e.class_item])
671
+ }, [...t[16] || (t[16] = [
672
+ s("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
673
+ s("span", {
671
674
  class: "spinner-border spinner-border-sm",
672
675
  role: "status",
673
676
  "aria-hidden": "true"
674
677
  })
675
678
  ], -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))
679
+ ])], 2)) : (n(), a("span", at, [
680
+ t[17] || (t[17] = N("tipo ", -1)),
681
+ s("span", st, g(e.type), 1),
682
+ t[18] || (t[18] = N(" não suportado ", -1))
680
683
  ]))
681
684
  ], 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", {
685
+ ]))), 128)) : l.type_loading === "spiner" ? (n(!0), a(M, { key: 2 }, z(d.value, (r) => (n(), a("tr", { key: r }, [
686
+ s("td", {
684
687
  colspan: k.value.length,
685
688
  class: "text-center p-0",
686
689
  style: { "border-bottom": "none" }
687
690
  }, [
688
- r === Math.floor(d.value / 2) + 1 ? (t(), a("div", rt, [...e[19] || (e[19] = [
689
- n("div", {
691
+ r === Math.floor(d.value / 2) + 1 ? (n(), a("div", rt, [...t[19] || (t[19] = [
692
+ s("div", {
690
693
  class: "spinner-border",
691
694
  style: { width: "3rem", height: "3rem" },
692
695
  role: "status"
693
696
  }, null, -1),
694
- n("span", { class: "mt-2" }, "Carregando...", -1)
695
- ])])) : (t(), a("div", ot))
697
+ s("span", { class: "mt-2" }, "Carregando...", -1)
698
+ ])])) : (n(), a("div", ot))
696
699
  ], 8, lt)
697
700
  ]))), 128)) : b("", !0)
698
701
  ])
699
702
  ], 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", {
703
+ w(V) && w(V).current > 1 ? (n(), a("div", it, " A conexão falhou. Tentando novamente... (Tentativa " + g(w(V).current) + " de " + g(w(V).total) + ") ", 1)) : b("", !0)
704
+ ], 64)) : w(K) ? (n(), a("div", ut, [
705
+ t[20] || (t[20] = s("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
706
+ w(V) ? (n(), a("p", dt, " Não foi possível carregar os dados após " + g(w(V).total) + " tentativa(s). ", 1)) : (n(), a("p", ct, " Não foi possível carregar os dados. Verifique sua conexão. ")),
707
+ s("button", {
705
708
  class: "btn btn-primary mt-2",
706
709
  onClick: L
707
710
  }, " Tentar Novamente ")
708
- ])) : c.value ? (t(), a("div", pt, [
709
- c.value.length > 0 ? (t(), a("div", mt, [
710
- n("table", {
711
+ ])) : c.value ? (n(), a("div", pt, [
712
+ c.value.length > 0 ? (n(), a("div", _t, [
713
+ s("table", {
711
714
  class: _(["table table-vcenter table-selectable", l.class_table])
712
715
  }, [
713
- n("thead", null, [
714
- n("tr", null, [
715
- l.use_checkbox ? (t(), a("th", _t, [
716
- n("input", {
716
+ s("thead", null, [
717
+ s("tr", null, [
718
+ l.use_checkbox ? (n(), a("th", mt, [
719
+ s("input", {
717
720
  class: "form-check-input m-0",
718
721
  type: "checkbox",
719
722
  ref_key: "selectAllCheckbox",
@@ -722,82 +725,89 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
722
725
  "aria-label": "Selecionar todos os itens na página"
723
726
  }, null, 544)
724
727
  ])) : b("", !0),
725
- (t(!0), a(M, null, P(k.value, (r) => (t(), a("th", {
728
+ (n(!0), a(M, null, z(k.value, (r) => (n(), a("th", {
726
729
  key: r.field || r.header,
727
730
  class: _(r.class_column)
728
731
  }, g(r.header), 3))), 128))
729
732
  ])
730
733
  ]),
731
- n("tbody", null, [
732
- (t(!0), a(M, null, P(c.value, (r) => (t(), a("tr", {
734
+ s("tbody", null, [
735
+ (n(!0), a(M, null, z(c.value, (r) => (n(), a("tr", {
733
736
  key: r[l.item_key]
734
737
  }, [
735
- l.use_checkbox ? (t(), a("td", ft, [
736
- n("input", {
738
+ l.use_checkbox ? (n(), a("td", ft, [
739
+ s("input", {
737
740
  class: "form-check-input m-0",
738
741
  type: "checkbox",
739
742
  checked: I(r),
740
- onChange: (s) => ce(r),
743
+ onChange: (e) => ce(r),
741
744
  "aria-label": "Selecionar este item"
742
745
  }, null, 40, gt)
743
746
  ])) : 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)
747
+ (n(!0), a(M, null, z(k.value, (e) => (n(), a("td", {
748
+ key: e.field || e.header,
749
+ class: _(e.class_row)
747
750
  }, [
748
- s.bodySlot ? (t(), X(Z(s.bodySlot), {
751
+ e.bodySlot ? (n(), X(Z(e.bodySlot), {
749
752
  key: 0,
750
753
  item: r,
751
754
  "is-selected": I(r)
752
- }, null, 8, ["item", "is-selected"])) : s.type === "text" ? (t(), a("span", {
755
+ }, null, 8, ["item", "is-selected"])) : e.type === "text" ? (n(), a("span", {
753
756
  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,
757
+ onClick: (S) => e.click ? e.click(r) : null,
758
+ class: _(e.class_item + (e.click ? " cursor-pointer" : ""))
759
+ }, g(me(D(e.field, r, e.transform_function), e.limite_text ?? null)), 11, vt)) : e.type === "date" ? (n(), a("span", {
760
+ key: 2,
761
+ onClick: (S) => e.click ? e.click(r) : null,
762
+ class: _(e.class_item + (e.click ? " cursor-pointer" : ""))
763
+ }, [
764
+ e.format === "complete" ? (n(), a("span", yt, g(new Date(D(e.field, r)).toLocaleString()), 1)) : b("", !0),
765
+ e.format === "simple" ? (n(), a("span", kt, g(new Date(D(
766
+ e.field,
759
767
  r
760
768
  )).toLocaleDateString()), 1)) : b("", !0)
761
- ])) : s.type === "html" ? (t(), a("div", {
769
+ ], 10, ht)) : e.type === "html" ? (n(), a("div", {
762
770
  key: 3,
763
- class: _(s.class_item),
764
- innerHTML: D(s.field, r)
765
- }, null, 10, kt)) : s.type === "img" ? (t(), a("div", {
771
+ onClick: (S) => e.click ? e.click(r) : null,
772
+ class: _(e.class_item + (e.click ? " cursor-pointer" : "")),
773
+ innerHTML: D(e.field, r)
774
+ }, null, 10, bt)) : e.type === "img" ? (n(), a("div", {
766
775
  key: 4,
767
- class: _(s.class_item)
776
+ onClick: (S) => e.click ? e.click(r) : null,
777
+ class: _(e.class_item + (e.click ? " cursor-pointer" : ""))
768
778
  }, [
769
- D(s.field, r) ? (t(), a("div", xe({
779
+ D(e.field, r) ? (n(), a("div", xe({
770
780
  key: 0,
771
781
  ref_for: !0
772
- }, s.deactivate_img_preview ? {
782
+ }, e.deactivate_img_preview ? {
773
783
  class: "container-img"
774
784
  } : {
775
- onMouseover: (T) => w(C)(T, D(s.field, r)),
785
+ onMouseover: (S) => w(C)(S, D(e.field, r)),
776
786
  onMousemove: w(A),
777
787
  onMouseleave: w(E),
778
788
  class: "container-img container-img-preview"
779
789
  }), [
780
- n("img", {
790
+ s("img", {
781
791
  class: "img-tamanho",
782
- src: D(s.field, r)
783
- }, null, 8, bt),
784
- n("img", {
792
+ src: D(e.field, r)
793
+ }, null, 8, wt),
794
+ s("img", {
785
795
  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))
796
+ src: D(e.field, r)
797
+ }, null, 8, Ct),
798
+ t[21] || (t[21] = s("div", { class: "bg-img" }, null, -1))
789
799
  ], 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))
800
+ ], 10, xt)) : (n(), a("span", $t, [
801
+ t[22] || (t[22] = N("tipo ", -1)),
802
+ s("span", St, g(e.type), 1),
803
+ t[23] || (t[23] = N(" não suportado", -1))
794
804
  ]))
795
805
  ], 2))), 128))
796
806
  ]))), 128))
797
807
  ])
798
808
  ], 2)
799
- ])) : (t(), a("div", St, [...e[24] || (e[24] = [
800
- n("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
809
+ ])) : (n(), a("div", Mt, [...t[24] || (t[24] = [
810
+ s("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
801
811
  ])]))
802
812
  ])) : b("", !0)
803
813
  ], 2)
@@ -805,9 +815,9 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
805
815
  O(i.$slots, "pagination", {
806
816
  pagination: p.value,
807
817
  tradePage: L,
808
- error: w(U)
818
+ error: w(K)
809
819
  }, () => [
810
- !w(U) && p.value.count > 0 ? (t(), a("div", {
820
+ !w(K) && p.value.count > 0 ? (n(), a("div", {
811
821
  key: 0,
812
822
  class: _(["mt-3 px-3", l.class_pagination])
813
823
  }, [
@@ -818,21 +828,21 @@ const Fe = { class: "d-flex justify-content-between align-items-start mb-2" }, X
818
828
  }, null, 8, ["pagination"])
819
829
  ], 2)) : b("", !0)
820
830
  ], !0),
821
- w(o) ? (t(), a("div", {
831
+ w(o) ? (n(), a("div", {
822
832
  key: 0,
823
833
  class: "image-preview-container",
824
834
  style: we(w(v))
825
835
  }, [
826
- n("img", {
836
+ s("img", {
827
837
  src: w(f),
828
838
  alt: "Preview",
829
839
  class: "image-preview-large"
830
- }, null, 8, Mt)
840
+ }, null, 8, Pt)
831
841
  ], 4)) : b("", !0)
832
842
  ]));
833
843
  }
834
- }), Tt = /* @__PURE__ */ W($t, [["__scopeId", "data-v-fa062ce8"]]);
844
+ }), At = /* @__PURE__ */ W(zt, [["__scopeId", "data-v-d20778cd"]]);
835
845
  export {
836
- zt as VColumn,
837
- Tt as VDataTable
846
+ Nt as VColumn,
847
+ At as VDataTable
838
848
  };
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.1",
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 {
@@ -284,6 +287,8 @@ interface VDataTableProps {
284
287
  use_checkbox?: boolean;
285
288
  // Define qual propriedade do item será usada como chave única para a seleção.
286
289
  item_key?: string;
290
+
291
+ limit_per_page?: number;
287
292
  }
288
293
 
289
294
  interface ExposedFunctions {
@@ -321,6 +326,7 @@ const props = withDefaults(defineProps<VDataTableProps>(), {
321
326
  item_key: 'id',
322
327
  first_text_page_size: 'Mostrar',
323
328
  second_text_page_size: 'registros',
329
+ limit_per_page: 5,
324
330
  });
325
331
 
326
332
 
@@ -342,7 +348,7 @@ const delayTimer = ref<ReturnType<typeof setTimeout> | null>(null);
342
348
  const pagination = ref<PaginationObject>({
343
349
  current_page: 0, // pagina atual
344
350
  count: 0, // total de itens
345
- limit_per_page: 5, // limite de itens por página
351
+ limit_per_page: props.limit_per_page, // limite de itens por página
346
352
  search: '', // termo de busca
347
353
  filter: '', // filtro selecionado
348
354
  })
@@ -504,7 +510,7 @@ provide(dataTableApiKey, { addColumn });
504
510
  // Função que gerencia o delay e a chamada da API
505
511
  function fetchDataWithDelay(): void {
506
512
  // Limpa timer anterior, se houver
507
- if (delayTimer.value) clearTimeout(delayTimer.value);
513
+ if (delayTimer.value) clearTimeout(delayTimer.value);
508
514
 
509
515
  isDelaying.value = true;
510
516
 
@@ -516,7 +522,7 @@ function fetchDataWithDelay(): void {
516
522
  }
517
523
 
518
524
  function reSearch(): void {
519
- pagination.value.current_page = 0;
525
+ pagination.value.current_page = 0;
520
526
  fetchDataWithDelay();
521
527
  }
522
528
 
@@ -526,7 +532,7 @@ const changePageSize = (event: Event): void => {
526
532
  if (newSize > 0) {
527
533
  page_size.value = newSize;
528
534
  pagination.value.limit_per_page = newSize; // Atualiza o limite de itens por página
529
- pagination.value.current_page = 0;
535
+ pagination.value.current_page = 0;
530
536
  fetchDataWithDelay();
531
537
  } else {
532
538
  // toast.showToast("Erro", "Tamanho da página deve ser maior que 0", 2);
@@ -539,15 +545,15 @@ function getSubItem(field: string | null, item: T, transform_function: ((value:
539
545
  const parts = field.split('.');
540
546
  let value_item = item;
541
547
 
542
- for(const part of parts){
543
- if (value_item && typeof value_item === 'object' && part in value_item){
548
+ for (const part of parts) {
549
+ if (value_item && typeof value_item === 'object' && part in value_item) {
544
550
  value_item = value_item[part];
545
551
  }
546
- else{
552
+ else {
547
553
  console.error(`Caminho inválido ou valor nulo em: ${field} na parte ${part}`);
548
554
  }
549
555
  }
550
-
556
+
551
557
  if (transform_function) {
552
558
  value_item = transform_function(value_item);
553
559
  }
@@ -568,7 +574,7 @@ function limiteText(text: string | null, limite: number | null): string | null {
568
574
  // =======================================================
569
575
 
570
576
  defineExpose<
571
- ExposedFunctions
577
+ ExposedFunctions
572
578
  >({
573
579
  execute: fetchDataWithDelay,
574
580
  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