v-sistec-features 1.18.0-beta.1 → 1.18.0-beta.2

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.
@@ -1,7 +1,8 @@
1
- import { defineComponent as J, useSlots as ze, inject as Ve, onMounted as Te, computed as B, watch as X, resolveComponent as Ee, createElementBlock as n, openBlock as t, createCommentVNode as x, createElementVNode as e, withDirectives as de, withKeys as je, vModelText as ue, Fragment as $, renderList as E, createBlock as G, withCtx as F, createTextVNode as j, toDisplayString as w, normalizeClass as g, withModifiers as ie, ref as C, nextTick as ce, resolveDynamicComponent as pe, provide as De, readonly as Ie, renderSlot as A, createVNode as Y, unref as v, createStaticVNode as Ne, TransitionGroup as Ae, mergeProps as Pe, Transition as qe, normalizeStyle as Le } from "vue";
2
- import { _ as te, P as Oe } from "./Pagination-DtVDFQ07.js";
3
- import He from "vuedraggable";
4
- const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
1
+ import { defineComponent as J, useSlots as De, inject as ue, onMounted as Ee, computed as z, watch as X, resolveComponent as je, createElementBlock as l, openBlock as t, createCommentVNode as x, createElementVNode as e, withDirectives as ce, withKeys as Ie, vModelText as pe, Fragment as T, renderList as j, createBlock as W, withCtx as H, createTextVNode as I, toDisplayString as k, normalizeClass as g, withModifiers as de, ref as C, nextTick as _e, resolveDynamicComponent as me, provide as Ne, readonly as Ae, renderSlot as P, createVNode as Y, unref as h, createStaticVNode as Pe, TransitionGroup as qe, mergeProps as Le, Transition as Oe, normalizeStyle as He } from "vue";
2
+ import { D as Fe } from "./datatableConfig-BMFlKtgh.js";
3
+ import { _ as ae, P as Ue } from "./Pagination-DtVDFQ07.js";
4
+ import Ke from "vuedraggable";
5
+ const ve = Symbol("v-datatable-key"), ma = /* @__PURE__ */ J({
5
6
  __name: "VColumn",
6
7
  props: {
7
8
  field: { default: null },
@@ -22,61 +23,61 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
22
23
  increasing_value: { default: "" },
23
24
  class_rules: { default: () => ({}) }
24
25
  },
25
- setup(d) {
26
- const o = d, y = ze(), r = Ve(me);
27
- if (!r)
26
+ setup(u) {
27
+ const i = u, f = De(), n = ue(ve);
28
+ if (!n)
28
29
  throw new Error("VColumn deve ser usado dentro de um VDataTable.");
29
- const _ = ["text", "img", "date", "html"];
30
- return Te(() => {
31
- if (o.field !== null && !o.field)
30
+ const m = ["text", "img", "date", "html"];
31
+ return Ee(() => {
32
+ if (i.field !== null && !i.field)
32
33
  throw new Error('A propriedade "field" é obrigatória em VColumn.');
33
- if (!o.header)
34
+ if (!i.header)
34
35
  throw new Error('A propriedade "header" é obrigatória em VColumn.');
35
- if (o.field !== null && !_.includes(o.type))
36
- throw new Error(`O tipo "${o.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
37
- if (o.limite_text) {
38
- if (o.type !== "text")
36
+ if (i.field !== null && !m.includes(i.type))
37
+ throw new Error(`O tipo "${i.type}" não é suportado em VColumn. Tipos suportados: text, img, date, html.`);
38
+ if (i.limite_text) {
39
+ if (i.type !== "text")
39
40
  throw new Error('A propriedade "limite_text" só pode ser usada quando o tipo for "text".');
40
- if (typeof o.limite_text == "string" && isNaN(Number(o.limite_text)))
41
+ if (typeof i.limite_text == "string" && isNaN(Number(i.limite_text)))
41
42
  throw new Error('A propriedade "limite_text" deve ser um número quando for uma string.');
42
- if (isNaN(Number(o.limite_text)) || Number(o.limite_text) <= 0)
43
+ if (isNaN(Number(i.limite_text)) || Number(i.limite_text) <= 0)
43
44
  throw new Error('A propriedade "limite_text" deve ser um número maior que 0.');
44
45
  }
45
- r.addColumn({
46
- field: o.field,
47
- header: o.header,
48
- type: o.type,
49
- class_column: o.class_column,
50
- class_row: o.class_row,
51
- class_item: o.class_item,
52
- click: o.click,
53
- transform_function: o.transform_function,
54
- locked: o.locked,
55
- use_ordering: o.use_ordering,
56
- param_ordering: o.param_ordering,
57
- decreasing_value: o.decreasing_value,
58
- increasing_value: o.increasing_value,
59
- class_rules: o.class_rules,
60
- bodySlot: y.body,
61
- ...o.type === "text" && { limite_text: Number(o.limite_text) },
62
- ...o.type === "img" && { deactivate_img_preview: o.deactivate_img_preview },
63
- ...o.type === "date" && { format: o.format }
46
+ n.addColumn({
47
+ field: i.field,
48
+ header: i.header,
49
+ type: i.type,
50
+ class_column: i.class_column,
51
+ class_row: i.class_row,
52
+ class_item: i.class_item,
53
+ click: i.click,
54
+ transform_function: i.transform_function,
55
+ locked: i.locked,
56
+ use_ordering: i.use_ordering,
57
+ param_ordering: i.param_ordering,
58
+ decreasing_value: i.decreasing_value,
59
+ increasing_value: i.increasing_value,
60
+ class_rules: i.class_rules,
61
+ bodySlot: f.body,
62
+ ...i.type === "text" && { limite_text: Number(i.limite_text) },
63
+ ...i.type === "img" && { deactivate_img_preview: i.deactivate_img_preview },
64
+ ...i.type === "date" && { format: i.format }
64
65
  });
65
- }), (p, z) => null;
66
+ }), (p, V) => null;
66
67
  }
67
- }), Fe = { class: "dropdown d-flex" }, Ue = {
68
+ }), Ye = { class: "dropdown d-flex" }, Xe = {
68
69
  key: 0,
69
70
  href: "#",
70
71
  class: "btn dropdown-toggle",
71
72
  "data-bs-toggle": "dropdown",
72
73
  title: "Pesquisas Prédefinidas"
73
- }, Ke = { class: "input-icon" }, Ye = ["placeholder"], Xe = {
74
+ }, Ge = { class: "input-icon" }, We = ["placeholder"], Je = {
74
75
  key: 1,
75
76
  class: "input-icon-addon"
76
- }, We = {
77
+ }, Qe = {
77
78
  key: 1,
78
79
  class: "dropdown-menu"
79
- }, Ge = ["onClick"], Je = ["onClick"], Qe = /* @__PURE__ */ J({
80
+ }, Re = ["onClick"], Ze = ["onClick"], et = /* @__PURE__ */ J({
80
81
  __name: "SearchDatatable",
81
82
  props: {
82
83
  search: {},
@@ -88,41 +89,41 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
88
89
  deactivate_search_empty: { type: Boolean, default: !1 }
89
90
  },
90
91
  emits: ["update:search", "update:filter", "search", "clickedClearSearch"],
91
- setup(d, { emit: o }) {
92
- const y = d, r = o, _ = B({
93
- get: () => y.search,
94
- set: (c) => r("update:search", c)
95
- }), p = B({
96
- get: () => y.filter,
97
- set: (c) => r("update:filter", c)
92
+ setup(u, { emit: i }) {
93
+ const f = u, n = i, m = z({
94
+ get: () => f.search,
95
+ set: (o) => n("update:search", o)
96
+ }), p = z({
97
+ get: () => f.filter,
98
+ set: (o) => n("update:filter", o)
98
99
  });
99
100
  X(p, () => {
100
- r("search");
101
+ n("search");
101
102
  }), X(
102
- () => y.list_filter,
103
- (c) => {
104
- Array.isArray(c) ? (c.forEach((u, k) => {
105
- u?.type === 1 && !u.to && console.error(`Filtro na posição ${k} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
106
- }), y.item_use.includes(2) && c.length === 0 && console.error("Nenhum filtro foi passado. Certifique-se de que o array de filtros não está vazio.")) : console.error("list_filter deve ser um array.");
103
+ () => f.list_filter,
104
+ (o) => {
105
+ Array.isArray(o) ? (o.forEach((s, w) => {
106
+ s?.type === 1 && !s.to && console.error(`Filtro na posição ${w} é do tipo 'router-link' mas não possui a propriedade 'to'.`);
107
+ }), f.item_use.includes(2) && o.length === 0 && console.error("Nenhum filtro foi passado. Certifique-se de que o array de filtros não está vazio.")) : console.error("list_filter deve ser um array.");
107
108
  },
108
109
  { immediate: !0, deep: !0 }
109
110
  );
110
- function z(c) {
111
- p.value === c ? p.value = "" : p.value = c;
111
+ function V(o) {
112
+ p.value === o ? p.value = "" : p.value = o;
112
113
  }
113
- function V() {
114
- _.value = "", y.deactivate_search_on_clear || r("search"), r("clickedClearSearch");
114
+ function E() {
115
+ m.value = "", f.deactivate_search_on_clear || n("search"), n("clickedClearSearch");
115
116
  }
116
- function S(c) {
117
- c.click && typeof c.click == "function" ? c.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
117
+ function B(o) {
118
+ o.click && typeof o.click == "function" ? o.click() : console.error("O filtro selecionado não possui uma função de clique válida.");
118
119
  }
119
- function l() {
120
- y.deactivate_search_empty && _.value.trim() === "" || r("search");
120
+ function v() {
121
+ f.deactivate_search_empty && m.value.trim() === "" || n("search");
121
122
  }
122
- return (c, u) => {
123
- const k = Ee("router-link");
124
- return t(), n("div", Fe, [
125
- d.item_use.includes(2) ? (t(), n("a", Ue, [...u[2] || (u[2] = [
123
+ return (o, s) => {
124
+ const w = je("router-link");
125
+ return t(), l("div", Ye, [
126
+ u.item_use.includes(2) ? (t(), l("a", Xe, [...s[2] || (s[2] = [
126
127
  e("svg", {
127
128
  xmlns: "http://www.w3.org/2000/svg",
128
129
  class: "icon icon-tabler icon-tabler-filter",
@@ -143,23 +144,23 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
143
144
  e("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" })
144
145
  ], -1)
145
146
  ])])) : x("", !0),
146
- e("div", Ke, [
147
- de(e("input", {
147
+ e("div", Ge, [
148
+ ce(e("input", {
148
149
  type: "text",
149
150
  class: "form-control ms-1",
150
151
  id: "inputSearchVDataTable",
151
- "onUpdate:modelValue": u[0] || (u[0] = (f) => _.value = f),
152
- onKeyup: je(l, ["enter"]),
153
- placeholder: d.placeholder_search
154
- }, null, 40, Ye), [
155
- [ue, _.value]
152
+ "onUpdate:modelValue": s[0] || (s[0] = (c) => m.value = c),
153
+ onKeyup: Ie(v, ["enter"]),
154
+ placeholder: u.placeholder_search
155
+ }, null, 40, We), [
156
+ [pe, m.value]
156
157
  ]),
157
- _.value ? (t(), n("span", {
158
+ m.value ? (t(), l("span", {
158
159
  key: 0,
159
- onClick: u[1] || (u[1] = (f) => V()),
160
+ onClick: s[1] || (s[1] = (c) => E()),
160
161
  class: "inputClose",
161
162
  title: "Limpar pesquisa"
162
- }, [...u[3] || (u[3] = [
163
+ }, [...s[3] || (s[3] = [
163
164
  e("svg", {
164
165
  xmlns: "http://www.w3.org/2000/svg",
165
166
  width: "24",
@@ -180,7 +181,7 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
180
181
  e("path", { d: "M18 6l-12 12" }),
181
182
  e("path", { d: "M6 6l12 12" })
182
183
  ], -1)
183
- ])])) : (t(), n("span", Xe, [...u[4] || (u[4] = [
184
+ ])])) : (t(), l("span", Je, [...s[4] || (s[4] = [
184
185
  e("svg", {
185
186
  xmlns: "http://www.w3.org/2000/svg",
186
187
  width: "24",
@@ -203,213 +204,213 @@ const me = Symbol("v-datatable-key"), ua = /* @__PURE__ */ J({
203
204
  ], -1)
204
205
  ])]))
205
206
  ]),
206
- d.item_use.includes(2) ? (t(), n("div", We, [
207
- (t(!0), n($, null, E(y.list_filter, (f, T) => (t(), n($, { key: T }, [
208
- "type" in f && f.type === 1 && (!("visible" in f) || f.visible) ? (t(), G(k, {
207
+ u.item_use.includes(2) ? (t(), l("div", Qe, [
208
+ (t(!0), l(T, null, j(f.list_filter, (c, $) => (t(), l(T, { key: $ }, [
209
+ "type" in c && c.type === 1 && (!("visible" in c) || c.visible) ? (t(), W(w, {
209
210
  key: 0,
210
- to: f?.to,
211
+ to: c?.to,
211
212
  class: "dropdown-item cursor-pointer"
212
213
  }, {
213
- default: F(() => [
214
- j(w(f.text), 1)
214
+ default: H(() => [
215
+ I(k(c.text), 1)
215
216
  ]),
216
217
  _: 2
217
- }, 1032, ["to"])) : (!("type" in f) || f.type === 2) && (!("visible" in f) || f.visible) ? (t(), n("a", {
218
+ }, 1032, ["to"])) : (!("type" in c) || c.type === 2) && (!("visible" in c) || c.visible) ? (t(), l("a", {
218
219
  key: 1,
219
- onClick: ie((h) => z(String(f.value)), ["prevent"]),
220
- class: g(["dropdown-item cursor-pointer", p.value === f?.value ? "bg-info text-dark selected" : ""])
221
- }, w(f.text), 11, Ge)) : (!("type" in f) || f.type === 3) && (!("visible" in f) || f.visible) ? (t(), n("a", {
220
+ onClick: de((M) => V(String(c.value)), ["prevent"]),
221
+ class: g(["dropdown-item cursor-pointer", p.value === c?.value ? "bg-info text-dark selected" : ""])
222
+ }, k(c.text), 11, Re)) : (!("type" in c) || c.type === 3) && (!("visible" in c) || c.visible) ? (t(), l("a", {
222
223
  key: 2,
223
- onClick: ie((h) => S(f), ["prevent"]),
224
- class: g(["dropdown-item cursor-pointer", f?.active ? "bg-info text-dark selected" : ""])
225
- }, w(f.text), 11, Je)) : x("", !0)
224
+ onClick: de((M) => B(c), ["prevent"]),
225
+ class: g(["dropdown-item cursor-pointer", c?.active ? "bg-info text-dark selected" : ""])
226
+ }, k(c.text), 11, Ze)) : x("", !0)
226
227
  ], 64))), 128))
227
228
  ])) : x("", !0)
228
229
  ]);
229
230
  };
230
231
  }
231
- }), Re = /* @__PURE__ */ te(Qe, [["__scopeId", "data-v-ed591287"]]);
232
- function Ze() {
233
- const d = C(!1), o = C(""), y = C(0), r = C(0), _ = B(() => ({
232
+ }), tt = /* @__PURE__ */ ae(et, [["__scopeId", "data-v-ed591287"]]);
233
+ function at() {
234
+ const u = C(!1), i = C(""), f = C(0), n = C(0), m = z(() => ({
234
235
  position: "fixed",
235
236
  zIndex: 9999,
236
237
  pointerEvents: "none",
237
- top: `${r.value + 15}px`,
238
- left: `${y.value + 15}px`
238
+ top: `${n.value + 15}px`,
239
+ left: `${f.value + 15}px`
239
240
  }));
240
- function p(l) {
241
- const c = l.clientX, u = l.clientY, k = window.innerHeight, f = 15, T = 300;
242
- let h = u + f;
243
- h + T > k && (h = u - T - f, h < 0 && (h = 0)), y.value = c, r.value = h;
241
+ function p(v) {
242
+ const o = v.clientX, s = v.clientY, w = window.innerHeight, c = 15, $ = 300;
243
+ let M = s + c;
244
+ M + $ > w && (M = s - $ - c, M < 0 && (M = 0)), f.value = o, n.value = M;
244
245
  }
245
- function z(l, c) {
246
- d.value = !0, o.value = c, p(l);
246
+ function V(v, o) {
247
+ u.value = !0, i.value = o, p(v);
247
248
  }
248
- function V(l) {
249
- d.value && p(l);
249
+ function E(v) {
250
+ u.value && p(v);
250
251
  }
251
- function S() {
252
- d.value = !1;
252
+ function B() {
253
+ u.value = !1;
253
254
  }
254
255
  return {
255
- isHovering: d,
256
- previewSrc: o,
257
- previewStyle: _,
258
- handleMouseOver: z,
259
- handleMouseMove: V,
260
- handleMouseLeave: S
256
+ isHovering: u,
257
+ previewSrc: i,
258
+ previewStyle: m,
259
+ handleMouseOver: V,
260
+ handleMouseMove: E,
261
+ handleMouseLeave: B
261
262
  };
262
263
  }
263
- function et(d, o, y, r) {
264
- const _ = C([]);
264
+ function nt(u, i, f, n) {
265
+ const m = C([]);
265
266
  function p() {
266
- _.value = [];
267
+ m.value = [];
267
268
  }
268
- function z(l) {
269
- const c = l[o];
270
- return _.value.some((u) => u === c);
269
+ function V(v) {
270
+ const o = v[i];
271
+ return m.value.some((s) => s === o);
271
272
  }
272
- function V(l) {
273
- const c = l[o], u = _.value.findIndex((f) => f === c), k = u > -1;
274
- d ? (p(), k || (_.value.push(c), r && S(c))) : k ? _.value.splice(u, 1) : (_.value.push(c), r && S(c));
273
+ function E(v) {
274
+ const o = v[i], s = m.value.findIndex((c) => c === o), w = s > -1;
275
+ u ? (p(), w || (m.value.push(o), n && B(o))) : w ? m.value.splice(s, 1) : (m.value.push(o), n && B(o));
275
276
  }
276
- function S(l) {
277
- ce(() => {
278
- if (y) {
279
- const c = document.querySelector("#expand-item-" + l);
280
- c && c.scrollIntoView({ behavior: "smooth", block: "center" });
277
+ function B(v) {
278
+ _e(() => {
279
+ if (f) {
280
+ const o = document.querySelector("#expand-item-" + v);
281
+ o && o.scrollIntoView({ behavior: "smooth", block: "center" });
281
282
  return;
282
283
  } else
283
284
  setTimeout(() => {
284
- const c = document.querySelector("#expand-item-" + l);
285
- c && c.scrollIntoView({ behavior: "smooth", block: "center" });
285
+ const o = document.querySelector("#expand-item-" + v);
286
+ o && o.scrollIntoView({ behavior: "smooth", block: "center" });
286
287
  }, 600);
287
288
  });
288
289
  }
289
290
  return {
290
- expanded_items: _,
291
- is_item_expanded: z,
292
- expand_item_toggle: V,
291
+ expanded_items: m,
292
+ is_item_expanded: V,
293
+ expand_item_toggle: E,
293
294
  close_all_expanded_items: p
294
295
  };
295
296
  }
296
- function tt(d, o, y, r, _, p) {
297
- const z = C([]), V = B(() => (o.value.current_page = d.page_starts_at, d.endpoint)), S = B(() => ({
298
- [d.page_param_name]: o.value.current_page + 1,
299
- [d.page_size_param_name]: o.value.limit_per_page,
300
- [d.search_param_name]: o.value.search || "",
301
- [d.filter_param_name]: o.value.filter || ""
302
- })), l = B(() => {
303
- const q = {};
304
- for (const M of y.value)
305
- M.use_ordering && (r.value[M.header] === "increasing" ? q[M.param_ordering] = M.increasing_value || "increasing" : r.value[M.header] === "decreasing" && (q[M.param_ordering] = M.decreasing_value || "decreasing"));
306
- return q;
307
- }), { data: c, pending: u, error: k, execute: f, attempt: T } = d.fetch(V, {
308
- disable_request: () => d.disable_request,
297
+ function lt(u, i, f, n, m, p) {
298
+ const V = C([]), E = z(() => (i.value.current_page = u.page_starts_at, u.endpoint)), B = z(() => ({
299
+ [u.page_param_name]: i.value.current_page + 1,
300
+ [u.page_size_param_name]: i.value.limit_per_page,
301
+ [u.search_param_name]: i.value.search || "",
302
+ [u.filter_param_name]: i.value.filter || ""
303
+ })), v = z(() => {
304
+ const D = {};
305
+ for (const S of f.value)
306
+ S.use_ordering && (n.value[S.header] === "increasing" ? D[S.param_ordering] = S.increasing_value || "increasing" : n.value[S.header] === "decreasing" && (D[S.param_ordering] = S.decreasing_value || "decreasing"));
307
+ return D;
308
+ }), { data: o, pending: s, error: w, execute: c, attempt: $ } = u.fetch(E, {
309
+ disable_request: () => u.disable_request,
309
310
  params: () => {
310
- const q = typeof d.add_params == "function";
311
- let M = {};
312
- if (q) {
313
- const Q = d.add_params;
314
- M = Q();
311
+ const D = typeof u.add_params == "function";
312
+ let S = {};
313
+ if (D) {
314
+ const Q = u.add_params;
315
+ S = Q();
315
316
  } else
316
- M = d.add_params || {};
317
- return d.deactivate_default_params ? {
318
- ...M,
319
- ...l.value
317
+ S = u.add_params || {};
318
+ return u.deactivate_default_params ? {
319
+ ...S,
320
+ ...v.value
320
321
  } : {
321
- ...S.value,
322
- ...d.add_params,
323
- ...l.value
322
+ ...B.value,
323
+ ...u.add_params,
324
+ ...v.value
324
325
  };
325
326
  },
326
- retry: d.retry_attempts,
327
- retryDelay: d.retry_delay,
327
+ retry: u.retry_attempts,
328
+ retryDelay: u.retry_delay,
328
329
  paramsReactives: !1,
329
330
  immediate: !1
330
- }, d.fetch_name), h = C(!1), P = C(null), L = C(!1), U = B(() => u.value || h.value);
331
- async function D() {
332
- L.value || (L.value = !0), P.value && clearTimeout(P.value), h.value = !0, P.value = setTimeout(() => {
333
- h.value = !1;
334
- }, d.min_loading_delay), p(), _("beforeFetch"), await f(), _("afterFetch");
331
+ }, u.fetch_name), M = C(!1), q = C(null), y = C(!1), F = z(() => s.value || M.value);
332
+ async function U() {
333
+ y.value || (y.value = !0), q.value && clearTimeout(q.value), M.value = !0, q.value = setTimeout(() => {
334
+ M.value = !1;
335
+ }, u.min_loading_delay), p(), m("beforeFetch"), await c(), m("afterFetch");
335
336
  }
336
337
  function K() {
337
- o.value.current_page = d.page_starts_at, D();
338
+ i.value.current_page = u.page_starts_at, U();
338
339
  }
339
340
  return {
340
- items: z,
341
- pending: u,
342
- error: k,
343
- execute: f,
344
- response: c,
345
- attempt: T,
346
- default_params: S,
347
- fetchDataWithDelay: D,
341
+ items: V,
342
+ pending: s,
343
+ error: w,
344
+ execute: c,
345
+ response: o,
346
+ attempt: $,
347
+ default_params: B,
348
+ fetchDataWithDelay: U,
348
349
  reSearch: K,
349
- showLoadingState: U,
350
- first_fetch: L
350
+ showLoadingState: F,
351
+ first_fetch: y
351
352
  };
352
353
  }
353
- function at(d, o) {
354
- const y = C(null), r = C([]), _ = (l) => {
355
- const c = d.item_key;
356
- return r.value.some((u) => u[c] === l[c]);
357
- }, p = B(() => {
358
- if (!o.value.length) return !1;
359
- const l = o.value.filter((c) => _(c)).length;
360
- return l === 0 ? !1 : l === o.value.length ? !0 : "indeterminate";
361
- }), z = B(() => r.value.length > 0);
362
- X([p, y], ([l]) => {
363
- y.value && (l === "indeterminate" ? (y.value.checked = !1, y.value.indeterminate = !0) : (y.value.checked = l, y.value.indeterminate = !1));
354
+ function st(u, i) {
355
+ const f = C(null), n = C([]), m = (v) => {
356
+ const o = u.item_key;
357
+ return n.value.some((s) => s[o] === v[o]);
358
+ }, p = z(() => {
359
+ if (!i.value.length) return !1;
360
+ const v = i.value.filter((o) => m(o)).length;
361
+ return v === 0 ? !1 : v === i.value.length ? !0 : "indeterminate";
362
+ }), V = z(() => n.value.length > 0);
363
+ X([p, f], ([v]) => {
364
+ f.value && (v === "indeterminate" ? (f.value.checked = !1, f.value.indeterminate = !0) : (f.value.checked = v, f.value.indeterminate = !1));
364
365
  }, {
365
366
  immediate: !0,
366
367
  flush: "post"
367
368
  });
368
- function V() {
369
- const l = o.value;
370
- if (!l.length) return;
371
- const c = p.value;
372
- if (c === !0 || c === "indeterminate") {
373
- const u = l.map((k) => k[d.item_key]);
374
- r.value = r.value.filter(
375
- (k) => !u.includes(k[d.item_key])
369
+ function E() {
370
+ const v = i.value;
371
+ if (!v.length) return;
372
+ const o = p.value;
373
+ if (o === !0 || o === "indeterminate") {
374
+ const s = v.map((w) => w[u.item_key]);
375
+ n.value = n.value.filter(
376
+ (w) => !s.includes(w[u.item_key])
376
377
  );
377
378
  } else
378
- l.forEach((u) => {
379
- _(u) || r.value.push(u);
379
+ v.forEach((s) => {
380
+ m(s) || n.value.push(s);
380
381
  });
381
382
  }
382
- function S(l) {
383
- const c = d.item_key, u = r.value.findIndex((k) => k[c] === l[c]);
384
- u > -1 ? r.value.splice(u, 1) : r.value.push(l);
383
+ function B(v) {
384
+ const o = u.item_key, s = n.value.findIndex((w) => w[o] === v[o]);
385
+ s > -1 ? n.value.splice(s, 1) : n.value.push(v);
385
386
  }
386
387
  return {
387
- selectAllCheckbox: y,
388
- selected_items: r,
389
- isSelected: _,
388
+ selectAllCheckbox: f,
389
+ selected_items: n,
390
+ isSelected: m,
390
391
  selectAllState: p,
391
- atLeastOneSelected: z,
392
- toggleSelectAll: V,
393
- toggleItemSelection: S
392
+ atLeastOneSelected: V,
393
+ toggleSelectAll: E,
394
+ toggleItemSelection: B
394
395
  };
395
396
  }
396
- const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot = {
397
+ const rt = { class: "loading-container" }, ot = { key: 0 }, it = { key: 2 }, dt = {
397
398
  key: 5,
398
399
  class: "text-danger erro-custom-container"
399
- }, rt = { class: "badge bg-orange text-white erro-custom-text" }, it = { key: 0 }, dt = { key: 2 }, ut = {
400
+ }, ut = { class: "badge bg-orange text-white erro-custom-text" }, ct = { key: 0 }, pt = { key: 2 }, _t = {
400
401
  key: 5,
401
402
  class: "text-danger erro-custom-container"
402
- }, ct = { class: "badge bg-orange text-white erro-custom-text" }, pt = ["colspan"], mt = {
403
+ }, mt = { class: "badge bg-orange text-white erro-custom-text" }, vt = ["colspan"], ht = {
403
404
  key: 0,
404
405
  class: "d-flex flex-column justify-content-center align-items-center",
405
406
  style: { height: "6rem" }
406
- }, _t = {
407
+ }, gt = {
407
408
  key: 1,
408
409
  style: { height: "3rem" }
409
410
  }, ft = {
410
411
  key: 2,
411
412
  class: "p-3 text-center text-secondary"
412
- }, ht = /* @__PURE__ */ J({
413
+ }, yt = /* @__PURE__ */ J({
413
414
  __name: "VDataTableLoading",
414
415
  props: {
415
416
  columns: {},
@@ -420,96 +421,96 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
420
421
  attempt: {},
421
422
  pagination: {}
422
423
  },
423
- setup(d) {
424
- const o = d;
425
- return (y, r) => (t(), n("div", nt, [
426
- o.custom_loading ? (t(), G(pe(o.custom_loading), { key: 0 })) : (t(), n("table", {
424
+ setup(u) {
425
+ const i = u;
426
+ return (f, n) => (t(), l("div", rt, [
427
+ i.custom_loading ? (t(), W(me(i.custom_loading), { key: 0 })) : (t(), l("table", {
427
428
  key: 1,
428
- class: g(["table table-vcenter table-selectable", o.class_table])
429
+ class: g(["table table-vcenter table-selectable", i.class_table])
429
430
  }, [
430
431
  e("thead", null, [
431
432
  e("tr", null, [
432
- (t(!0), n($, null, E(d.columns, (_) => (t(), n("th", {
433
- key: _.field || _.header,
434
- class: g(_.class_column)
435
- }, w(_.header), 3))), 128))
433
+ (t(!0), l(T, null, j(u.columns, (m) => (t(), l("th", {
434
+ key: m.field || m.header,
435
+ class: g(m.class_column)
436
+ }, k(m.header), 3))), 128))
436
437
  ])
437
438
  ]),
438
439
  e("tbody", null, [
439
- o.type_loading === "placeholder" ? (t(!0), n($, { key: 0 }, E(d.pagination.limit_per_page, (_) => (t(), n("tr", {
440
- key: "placeholder-" + _,
440
+ i.type_loading === "placeholder" ? (t(!0), l(T, { key: 0 }, j(u.pagination.limit_per_page, (m) => (t(), l("tr", {
441
+ key: "placeholder-" + m,
441
442
  class: "placeholder-glow"
442
443
  }, [
443
- (t(!0), n($, null, E(d.columns, (p) => (t(), n("td", {
444
+ (t(!0), l(T, null, j(u.columns, (p) => (t(), l("td", {
444
445
  key: p.field || p.header,
445
446
  class: g(p.class_row)
446
447
  }, [
447
- p.bodySlot ? (t(), n("span", lt, [...r[0] || (r[0] = [
448
+ p.bodySlot ? (t(), l("span", ot, [...n[0] || (n[0] = [
448
449
  e("span", { class: "placeholder col-8" }, null, -1)
449
- ])])) : p.type === "text" ? (t(), n("span", {
450
+ ])])) : p.type === "text" ? (t(), l("span", {
450
451
  key: 1,
451
452
  class: g(p.class_item)
452
- }, [...r[1] || (r[1] = [
453
+ }, [...n[1] || (n[1] = [
453
454
  e("span", { class: "placeholder col-8" }, null, -1)
454
- ])], 2)) : p.type === "date" ? (t(), n("span", st, [...r[2] || (r[2] = [
455
+ ])], 2)) : p.type === "date" ? (t(), l("span", it, [...n[2] || (n[2] = [
455
456
  e("span", { class: "placeholder col-9" }, null, -1)
456
- ])])) : p.type === "html" ? (t(), n("div", {
457
+ ])])) : p.type === "html" ? (t(), l("div", {
457
458
  key: 3,
458
459
  class: g(p.class_item)
459
- }, [...r[3] || (r[3] = [
460
+ }, [...n[3] || (n[3] = [
460
461
  e("div", { class: "placeholder col-12" }, null, -1)
461
- ])], 2)) : p.type === "img" ? (t(), n("div", {
462
+ ])], 2)) : p.type === "img" ? (t(), l("div", {
462
463
  key: 4,
463
464
  class: g(p.class_item)
464
- }, [...r[4] || (r[4] = [
465
+ }, [...n[4] || (n[4] = [
465
466
  e("div", { class: "placeholder placeholder-img" }, null, -1)
466
- ])], 2)) : (t(), n("span", ot, [
467
- r[5] || (r[5] = j("tipo ", -1)),
468
- e("span", rt, w(p.type), 1),
469
- r[6] || (r[6] = j(" não suportado ", -1))
467
+ ])], 2)) : (t(), l("span", dt, [
468
+ n[5] || (n[5] = I("tipo ", -1)),
469
+ e("span", ut, k(p.type), 1),
470
+ n[6] || (n[6] = I(" não suportado ", -1))
470
471
  ]))
471
472
  ], 2))), 128))
472
- ]))), 128)) : o.type_loading === "spiner-table" ? (t(!0), n($, { key: 1 }, E(d.pagination.limit_per_page, (_) => (t(), n("tr", {
473
- key: "placeholder-" + _
473
+ ]))), 128)) : i.type_loading === "spiner-table" ? (t(!0), l(T, { key: 1 }, j(u.pagination.limit_per_page, (m) => (t(), l("tr", {
474
+ key: "placeholder-" + m
474
475
  }, [
475
- (t(!0), n($, null, E(d.columns, (p) => (t(), n("td", {
476
+ (t(!0), l(T, null, j(u.columns, (p) => (t(), l("td", {
476
477
  key: p.field || p.header,
477
478
  class: g(p.class_row)
478
479
  }, [
479
- p.bodySlot ? (t(), n("span", it, [...r[7] || (r[7] = [
480
+ p.bodySlot ? (t(), l("span", ct, [...n[7] || (n[7] = [
480
481
  e("span", {
481
482
  class: "spinner-border spinner-border-sm",
482
483
  role: "status",
483
484
  "aria-hidden": "true"
484
485
  }, null, -1)
485
- ])])) : p.type === "text" ? (t(), n("span", {
486
+ ])])) : p.type === "text" ? (t(), l("span", {
486
487
  key: 1,
487
488
  class: g(p.class_item)
488
- }, [...r[8] || (r[8] = [
489
+ }, [...n[8] || (n[8] = [
489
490
  e("span", {
490
491
  class: "spinner-border spinner-border-sm",
491
492
  role: "status",
492
493
  "aria-hidden": "true"
493
494
  }, null, -1)
494
- ])], 2)) : p.type === "date" ? (t(), n("span", dt, [...r[9] || (r[9] = [
495
+ ])], 2)) : p.type === "date" ? (t(), l("span", pt, [...n[9] || (n[9] = [
495
496
  e("span", {
496
497
  class: "spinner-border spinner-border-sm",
497
498
  role: "status",
498
499
  "aria-hidden": "true"
499
500
  }, null, -1)
500
- ])])) : p.type === "html" ? (t(), n("div", {
501
+ ])])) : p.type === "html" ? (t(), l("div", {
501
502
  key: 3,
502
503
  class: g(p.class_item)
503
- }, [...r[10] || (r[10] = [
504
+ }, [...n[10] || (n[10] = [
504
505
  e("span", {
505
506
  class: "spinner-border spinner-border-sm",
506
507
  role: "status",
507
508
  "aria-hidden": "true"
508
509
  }, null, -1)
509
- ])], 2)) : p.type === "img" ? (t(), n("div", {
510
+ ])], 2)) : p.type === "img" ? (t(), l("div", {
510
511
  key: 4,
511
512
  class: g(["", p.class_item])
512
- }, [...r[11] || (r[11] = [
513
+ }, [...n[11] || (n[11] = [
513
514
  e("span", { class: "placeholder-img d-flex justify-content-center align-items-center" }, [
514
515
  e("span", {
515
516
  class: "spinner-border spinner-border-sm",
@@ -517,53 +518,53 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
517
518
  "aria-hidden": "true"
518
519
  })
519
520
  ], -1)
520
- ])], 2)) : (t(), n("span", ut, [
521
- r[12] || (r[12] = j("tipo ", -1)),
522
- e("span", ct, w(p.type), 1),
523
- r[13] || (r[13] = j(" não suportado ", -1))
521
+ ])], 2)) : (t(), l("span", _t, [
522
+ n[12] || (n[12] = I("tipo ", -1)),
523
+ e("span", mt, k(p.type), 1),
524
+ n[13] || (n[13] = I(" não suportado ", -1))
524
525
  ]))
525
526
  ], 2))), 128))
526
- ]))), 128)) : o.type_loading === "spiner" ? (t(!0), n($, { key: 2 }, E(d.pagination.limit_per_page, (_) => (t(), n("tr", { key: _ }, [
527
+ ]))), 128)) : i.type_loading === "spiner" ? (t(!0), l(T, { key: 2 }, j(u.pagination.limit_per_page, (m) => (t(), l("tr", { key: m }, [
527
528
  e("td", {
528
- colspan: d.columns.length,
529
+ colspan: u.columns.length,
529
530
  class: "text-center p-0",
530
531
  style: { "border-bottom": "none" }
531
532
  }, [
532
- _ === Math.floor(d.pagination.limit_per_page / 2) + 1 ? (t(), n("div", mt, [...r[14] || (r[14] = [
533
+ m === Math.floor(u.pagination.limit_per_page / 2) + 1 ? (t(), l("div", ht, [...n[14] || (n[14] = [
533
534
  e("div", {
534
535
  class: "spinner-border",
535
536
  style: { width: "3rem", height: "3rem" },
536
537
  role: "status"
537
538
  }, null, -1),
538
539
  e("span", { class: "mt-2" }, "Carregando...", -1)
539
- ])])) : (t(), n("div", _t))
540
- ], 8, pt)
540
+ ])])) : (t(), l("div", gt))
541
+ ], 8, vt)
541
542
  ]))), 128)) : x("", !0)
542
543
  ])
543
544
  ], 2)),
544
- d.attempt && d.attempt.current > 1 ? (t(), n("div", ft, " A conexão falhou. Tentando novamente... (Tentativa " + w(d.attempt.current) + " de " + w(d.attempt.total) + ") ", 1)) : x("", !0)
545
+ u.attempt && u.attempt.current > 1 ? (t(), l("div", ft, " A conexão falhou. Tentando novamente... (Tentativa " + k(u.attempt.current) + " de " + k(u.attempt.total) + ") ", 1)) : x("", !0)
545
546
  ]));
546
547
  }
547
- }), vt = /* @__PURE__ */ te(ht, [["__scopeId", "data-v-3b019685"]]), gt = { class: "mx-2 d-inline-block" }, yt = {
548
+ }), kt = /* @__PURE__ */ ae(yt, [["__scopeId", "data-v-3b019685"]]), wt = { class: "mx-2 d-inline-block" }, xt = {
548
549
  key: 0,
549
550
  class: "alert alert-cyan d-flex justify-content-center align-items-center py-2",
550
551
  role: "alert"
551
- }, kt = { class: "alert-title m-0" }, wt = { class: "badge bg-azure text-azure-fg" }, xt = {
552
+ }, bt = { class: "alert-title m-0" }, Ct = { class: "badge bg-azure text-azure-fg" }, Mt = {
552
553
  key: 1,
553
554
  class: "feedback-container text-center"
554
- }, bt = {
555
+ }, St = {
555
556
  key: 0,
556
557
  class: "text-secondary"
557
- }, Ct = {
558
+ }, $t = {
558
559
  key: 1,
559
560
  class: "text-secondary"
560
- }, Mt = {
561
+ }, zt = {
561
562
  key: 2,
562
563
  class: "table-responsive"
563
- }, St = { key: 0 }, $t = { key: 0 }, Bt = {
564
+ }, Bt = { key: 0 }, Tt = { key: 0 }, Vt = {
564
565
  key: 1,
565
566
  class: "w-1"
566
- }, zt = { class: "header-ordering" }, Vt = ["onClick"], Tt = {
567
+ }, Dt = { class: "header-ordering" }, Et = ["onClick"], jt = {
567
568
  key: 0,
568
569
  xmlns: "http://www.w3.org/2000/svg",
569
570
  width: "16",
@@ -574,7 +575,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
574
575
  "stroke-width": "2",
575
576
  "stroke-linecap": "round",
576
577
  "stroke-linejoin": "round"
577
- }, Et = {
578
+ }, It = {
578
579
  key: 1,
579
580
  xmlns: "http://www.w3.org/2000/svg",
580
581
  width: "16",
@@ -585,7 +586,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
585
586
  "stroke-width": "2",
586
587
  "stroke-linecap": "round",
587
588
  "stroke-linejoin": "round"
588
- }, jt = {
589
+ }, Nt = {
589
590
  key: 2,
590
591
  xmlns: "http://www.w3.org/2000/svg",
591
592
  width: "16",
@@ -596,7 +597,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
596
597
  "stroke-width": "2",
597
598
  "stroke-linecap": "round",
598
599
  "stroke-linejoin": "round"
599
- }, Dt = { class: "header-ordering" }, It = ["onClick"], Nt = {
600
+ }, At = { class: "header-ordering" }, Pt = ["onClick"], qt = {
600
601
  key: 0,
601
602
  xmlns: "http://www.w3.org/2000/svg",
602
603
  width: "16",
@@ -607,7 +608,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
607
608
  "stroke-width": "2",
608
609
  "stroke-linecap": "round",
609
610
  "stroke-linejoin": "round"
610
- }, At = {
611
+ }, Lt = {
611
612
  key: 1,
612
613
  xmlns: "http://www.w3.org/2000/svg",
613
614
  width: "16",
@@ -618,7 +619,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
618
619
  "stroke-width": "2",
619
620
  "stroke-linecap": "round",
620
621
  "stroke-linejoin": "round"
621
- }, Pt = {
622
+ }, Ot = {
622
623
  key: 2,
623
624
  xmlns: "http://www.w3.org/2000/svg",
624
625
  width: "16",
@@ -629,10 +630,10 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
629
630
  "stroke-width": "2",
630
631
  "stroke-linecap": "round",
631
632
  "stroke-linejoin": "round"
632
- }, qt = {
633
+ }, Ht = {
633
634
  key: 0,
634
635
  class: "w-1"
635
- }, Lt = ["onClick"], Ot = {
636
+ }, Ft = ["onClick"], Ut = {
636
637
  key: 0,
637
638
  xmlns: "http://www.w3.org/2000/svg",
638
639
  width: "24",
@@ -644,7 +645,7 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
644
645
  "stroke-linecap": "round",
645
646
  "stroke-linejoin": "round",
646
647
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-right icon-transition-arrow"
647
- }, Ht = {
648
+ }, Kt = {
648
649
  key: 1,
649
650
  xmlns: "http://www.w3.org/2000/svg",
650
651
  width: "20",
@@ -656,43 +657,43 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
656
657
  "stroke-linecap": "round",
657
658
  "stroke-linejoin": "round",
658
659
  class: "icon icon-transition-plus"
659
- }, Ft = {
660
+ }, Yt = {
660
661
  key: 1,
661
662
  class: "w-1"
662
- }, Ut = ["checked", "onChange"], Kt = ["onClick"], Yt = ["onClick"], Xt = { key: 0 }, Wt = { key: 1 }, Gt = ["onClick", "innerHTML"], Jt = ["onClick"], Qt = ["src"], Rt = ["src"], Zt = {
663
+ }, Xt = ["checked", "onChange"], Gt = ["onClick"], Wt = ["onClick"], Jt = { key: 0 }, Qt = { key: 1 }, Rt = ["onClick", "innerHTML"], Zt = ["onClick"], ea = ["src"], ta = ["src"], aa = {
663
664
  key: 5,
664
665
  class: "text-danger erro-custom-container"
665
- }, ea = { class: "badge bg-orange text-white erro-custom-text" }, ta = ["id"], aa = ["colspan"], na = { key: 1 }, la = {
666
+ }, na = { class: "badge bg-orange text-white erro-custom-text" }, la = ["id"], sa = ["colspan"], ra = { key: 1 }, oa = {
666
667
  key: 2,
667
668
  class: "text-center p-4 text-secondary"
668
- }, sa = ["src"], oa = /* @__PURE__ */ J({
669
+ }, ia = ["src"], da = /* @__PURE__ */ J({
669
670
  __name: "VDataTable",
670
671
  props: {
671
672
  fetch: {},
672
673
  fetch_name: { default: "" },
673
674
  endpoint: {},
674
- type_loading: { default: "placeholder" },
675
+ type_loading: {},
675
676
  custom_loading: { default: null },
676
677
  deactivate_default_params: { type: Boolean, default: !1 },
677
- filter_param_name: { default: "filter" },
678
- search_param_name: { default: "search" },
679
- page_param_name: { default: "page" },
680
- page_size_param_name: { default: "page_size" },
678
+ filter_param_name: {},
679
+ search_param_name: {},
680
+ page_param_name: {},
681
+ page_size_param_name: {},
681
682
  add_params: { type: [Object, Function], default: () => ({}) },
682
683
  data_key: { default: "results" },
683
684
  total_key: { default: "count" },
684
685
  list_filter: { default: () => [] },
685
- first_text_page_size: { default: "Mostrar" },
686
- second_text_page_size: { default: "registros" },
687
- class_table: { default: "" },
688
- class_content: { default: "" },
689
- class_container: { default: "" },
690
- class_pagination: { default: "" },
691
- class_filters: { default: "" },
692
- class_page_size: { default: "" },
693
- min_loading_delay: { default: 600 },
694
- retry_attempts: { default: 3 },
695
- retry_delay: { default: 2e3 },
686
+ first_text_page_size: {},
687
+ second_text_page_size: {},
688
+ class_table: {},
689
+ class_content: {},
690
+ class_container: {},
691
+ class_pagination: {},
692
+ class_filters: {},
693
+ class_page_size: {},
694
+ min_loading_delay: {},
695
+ retry_attempts: {},
696
+ retry_delay: {},
696
697
  use_checkbox: { type: Boolean, default: !1 },
697
698
  use_expandable_items: { type: Boolean, default: !1 },
698
699
  close_expanded_item_on_expand_new: { type: Boolean, default: !1 },
@@ -701,390 +702,419 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
701
702
  deactivate_animation_expand: { type: Boolean, default: !1 },
702
703
  type_button_expand: { default: "arrow" },
703
704
  deactivate_search_empty: { type: Boolean, default: !1 },
704
- item_key: { default: "id" },
705
- limit_per_page: { default: 5 },
706
- page_starts_at: { default: 0 },
705
+ item_key: {},
706
+ limit_per_page: {},
707
+ page_starts_at: {},
707
708
  deactivate_selected_info: { type: Boolean, default: !1 },
708
709
  immediate: { type: Boolean, default: !0 },
709
- placeholder_search: { default: "Buscar..." },
710
+ placeholder_search: {},
710
711
  deactivate_search_on_clear: { type: Boolean, default: !1 },
711
712
  disable_request: { default: !1 }
712
713
  },
713
714
  emits: ["tradePage", "beforeFetch", "afterFetch", "clickedClearSearch"],
714
- setup(d, { expose: o, emit: y }) {
715
- const {
716
- isHovering: r,
717
- previewSrc: _,
718
- previewStyle: p,
719
- handleMouseOver: z,
720
- handleMouseMove: V,
721
- handleMouseLeave: S
722
- } = Ze(), l = d, c = y, u = C({}), k = C([]), f = C(0), T = C(!1), h = C({
723
- current_page: l.page_starts_at,
715
+ setup(u, { expose: i, emit: f }) {
716
+ const n = ue(Fe, {}), {
717
+ isHovering: m,
718
+ previewSrc: p,
719
+ previewStyle: V,
720
+ handleMouseOver: E,
721
+ handleMouseMove: B,
722
+ handleMouseLeave: v
723
+ } = at(), o = u, s = z(() => ({
724
+ // Primeiro, espelha todas as props originais.
725
+ ...o,
726
+ // Agora SOBRESCREVEMOS as propriedades que precisam de lógica Global/Default
727
+ // (Prioridade para Prop, mas aceita Global)
728
+ // === TEXTOS ===
729
+ first_text_page_size: o.first_text_page_size ?? n.first_text_page_size ?? "Mostrar",
730
+ second_text_page_size: o.second_text_page_size ?? n.second_text_page_size ?? "registros",
731
+ placeholder_search: o.placeholder_search ?? n.placeholder_search ?? "Buscar...",
732
+ // === CLASSES ===
733
+ class_table: o.class_table || n.class_table || "",
734
+ class_pagination: o.class_pagination || n.class_pagination || "",
735
+ class_container: o.class_container || n.class_container || "",
736
+ class_content: o.class_content || n.class_content || "",
737
+ class_filters: o.class_filters || n.class_filters || "",
738
+ class_page_size: o.class_page_size || n.class_page_size || "",
739
+ // === CONFIGURAÇÃO DE API ===
740
+ filter_param_name: o.filter_param_name ?? n.filter_param_name ?? "filter",
741
+ search_param_name: o.search_param_name ?? n.search_param_name ?? "search",
742
+ page_param_name: o.page_param_name ?? n.page_param_name ?? "page",
743
+ page_size_param_name: o.page_size_param_name ?? n.page_size_param_name ?? "page_size",
744
+ page_starts_at: o.page_starts_at ?? n.page_starts_at ?? 0,
745
+ item_key: o.item_key ?? n.item_key ?? "id",
746
+ // === COMPORTAMENTO ===
747
+ limit_per_page: o.limit_per_page ?? n.limit_per_page ?? 5,
748
+ type_loading: o.type_loading ?? n.type_loading ?? "placeholder",
749
+ min_loading_delay: o.min_loading_delay ?? n.min_loading_delay ?? 600,
750
+ retry_attempts: o.retry_attempts ?? n.retry_attempts ?? 3,
751
+ retry_delay: o.retry_delay ?? n.retry_delay ?? 2e3
752
+ })), w = f, c = C({}), $ = C([]), M = C(0), q = C(!1), y = C({
753
+ current_page: s.value.page_starts_at,
724
754
  // pagina atual
725
755
  count: 0,
726
756
  // total de itens
727
- limit_per_page: l.limit_per_page,
757
+ limit_per_page: s.value.limit_per_page,
728
758
  // limite de itens por página
729
759
  search: "",
730
760
  // termo de busca
731
761
  filter: ""
732
762
  // filtro selecionado
733
763
  }), {
734
- expand_item_toggle: P,
735
- close_all_expanded_items: L,
736
- is_item_expanded: U
737
- } = et(
738
- l.close_expanded_item_on_expand_new,
739
- l.item_key,
740
- l.deactivate_animation_expand,
741
- l.scroll_to_expanded_item
764
+ expand_item_toggle: F,
765
+ close_all_expanded_items: U,
766
+ is_item_expanded: K
767
+ } = nt(
768
+ s.value.close_expanded_item_on_expand_new,
769
+ s.value.item_key,
770
+ s.value.deactivate_animation_expand,
771
+ s.value.scroll_to_expanded_item
742
772
  ), {
743
773
  items: D,
744
- error: K,
745
- response: q,
746
- attempt: M,
747
- default_params: Q,
748
- fetchDataWithDelay: O,
749
- reSearch: I,
750
- showLoadingState: _e,
774
+ error: S,
775
+ response: Q,
776
+ attempt: R,
777
+ default_params: he,
778
+ fetchDataWithDelay: L,
779
+ reSearch: N,
780
+ showLoadingState: ge,
751
781
  first_fetch: fe
752
- } = tt(l, h, k, u, c, L), {
753
- selectAllCheckbox: ae,
754
- selected_items: H,
755
- isSelected: ne,
756
- atLeastOneSelected: he,
757
- toggleSelectAll: le,
758
- toggleItemSelection: ve
759
- } = at(l, D), R = B(
760
- () => k.value.filter((i) => i.locked)
761
- ), Z = B({
782
+ } = lt(s.value, y, $, c, w, U), {
783
+ selectAllCheckbox: ne,
784
+ selected_items: O,
785
+ isSelected: le,
786
+ atLeastOneSelected: ye,
787
+ toggleSelectAll: se,
788
+ toggleItemSelection: ke
789
+ } = st(s.value, D), Z = z(
790
+ () => $.value.filter((d) => d.locked)
791
+ ), ee = z({
762
792
  get() {
763
- return k.value.filter((i) => !i.locked);
793
+ return $.value.filter((d) => !d.locked);
764
794
  },
765
- set(i) {
766
- const s = R.value;
767
- k.value = [...i, ...s];
795
+ set(d) {
796
+ const r = Z.value;
797
+ $.value = [...d, ...r];
768
798
  }
769
- }), ge = B(() => [...Z.value, ...R.value]), ye = B(() => {
770
- let i = [1];
771
- return l.list_filter.length > 0 && i.push(2), i;
799
+ }), we = z(() => [...ee.value, ...Z.value]), xe = z(() => {
800
+ let d = [1];
801
+ return s.value.list_filter.length > 0 && d.push(2), d;
772
802
  });
773
- X(q, (i) => {
774
- i ? (D.value = i[l.data_key] || [], f.value = i[l.total_key] || 0, h.value.count = f.value) : (D.value = [], f.value = 0);
803
+ X(Q, (d) => {
804
+ d ? (D.value = d[s.value.data_key] || [], M.value = d[s.value.total_key] || 0, y.value.count = M.value) : (D.value = [], M.value = 0);
775
805
  }, { immediate: !0 });
776
- function ke() {
806
+ function be() {
777
807
  setTimeout(() => {
778
- T.value = !1;
808
+ q.value = !1;
779
809
  }, 500);
780
810
  }
781
- function we(i) {
782
- k.value.push(i);
811
+ function Ce(d) {
812
+ $.value.push(d);
783
813
  }
784
- De(me, { addColumn: we });
785
- const se = (i) => {
786
- const s = i.target, a = parseInt(s.value, 10);
787
- a > 0 && (h.value.limit_per_page = a, h.value.limit_per_page = a, I());
814
+ Ne(ve, { addColumn: Ce });
815
+ const re = (d) => {
816
+ const r = d.target, a = parseInt(r.value, 10);
817
+ a > 0 && (y.value.limit_per_page = a, y.value.limit_per_page = a, N());
788
818
  };
789
- function N(i, s, a = null) {
790
- if (!i) return s;
791
- const m = i.split(".");
792
- let b = s;
793
- for (const ee of m)
794
- b && typeof b == "object" && ee in b ? b = b[ee] : console.error(`Caminho inválido ou valor nulo em: ${i} na parte ${ee}`);
819
+ function A(d, r, a = null) {
820
+ if (!d) return r;
821
+ const _ = d.split(".");
822
+ let b = r;
823
+ for (const te of _)
824
+ b && typeof b == "object" && te in b ? b = b[te] : console.error(`Caminho inválido ou valor nulo em: ${d} na parte ${te}`);
795
825
  return a && (b = a(b)), b;
796
826
  }
797
- function xe(i, s) {
798
- return s && typeof s == "number" && s > 0 && typeof i == "string" && i.length > s ? i.substring(0, s) + "..." : i;
827
+ function Me(d, r) {
828
+ return r && typeof r == "number" && r > 0 && typeof d == "string" && d.length > r ? d.substring(0, r) + "..." : d;
799
829
  }
800
- function oe(i) {
801
- for (const a in u.value)
802
- a !== i && (u.value[a] = "none");
803
- const s = u.value[i] || "none";
804
- s === "none" ? u.value[i] = "increasing" : s === "increasing" ? u.value[i] = "decreasing" : u.value[i] = "none", I();
830
+ function oe(d) {
831
+ for (const a in c.value)
832
+ a !== d && (c.value[a] = "none");
833
+ const r = c.value[d] || "none";
834
+ r === "none" ? c.value[d] = "increasing" : r === "increasing" ? c.value[d] = "decreasing" : c.value[d] = "none", N();
805
835
  }
806
- function be(i) {
807
- i > 0 ? (h.value.limit_per_page = i, I()) : console.warn("O limite deve ser um número maior que zero.");
836
+ function Se(d) {
837
+ d > 0 ? (y.value.limit_per_page = d, N()) : console.warn("O limite deve ser um número maior que zero.");
808
838
  }
809
- function Ce(i) {
810
- h.value.search = i, I();
839
+ function $e(d) {
840
+ y.value.search = d, N();
811
841
  }
812
- function Me(i) {
813
- h.value.filter = i, I();
842
+ function ze(d) {
843
+ y.value.filter = d, N();
814
844
  }
815
- function Se(i) {
816
- i >= 0 && i <= Math.ceil(h.value.count / h.value.limit_per_page) ? (h.value.current_page = i, O()) : console.warn("Número de página inválido.");
845
+ function Be(d) {
846
+ d >= 0 && d <= Math.ceil(y.value.count / y.value.limit_per_page) ? (y.value.current_page = d, L()) : console.warn("Número de página inválido.");
817
847
  }
818
- function $e() {
819
- let i = k.value.length;
820
- return l.use_checkbox && (i += 1), l.use_expandable_items && (i += 1), i;
848
+ function Te() {
849
+ let d = $.value.length;
850
+ return s.value.use_checkbox && (d += 1), s.value.use_expandable_items && (d += 1), d;
821
851
  }
822
- function Be() {
823
- c("tradePage"), O();
852
+ function Ve() {
853
+ w("tradePage"), L();
824
854
  }
825
- const W = (i, s) => {
826
- const a = [i.class_item || ""];
827
- if (i.click && a.push("cursor-pointer"), i.class_rules)
828
- for (const [m, b] of Object.entries(i.class_rules))
829
- typeof b == "function" && b(s) && a.push(m);
855
+ const G = (d, r) => {
856
+ const a = [d.class_item || ""];
857
+ if (d.click && a.push("cursor-pointer"), d.class_rules)
858
+ for (const [_, b] of Object.entries(d.class_rules))
859
+ typeof b == "function" && b(r) && a.push(_);
830
860
  return a.join(" ").trim();
831
861
  };
832
- o({
833
- execute: O,
834
- reSearch: I,
835
- pagination: Ie(h),
836
- set_limit_per_page: be,
837
- set_search: Ce,
838
- set_filter: Me,
839
- set_page: Se,
840
- default_params: Q,
841
- selected_items: H,
842
- atLeastOneSelected: he,
843
- expand_item_toggle: P,
844
- close_all_expanded_items: L,
845
- selectAllCheckbox: ae
862
+ i({
863
+ execute: L,
864
+ reSearch: N,
865
+ pagination: Ae(y),
866
+ set_limit_per_page: Se,
867
+ set_search: $e,
868
+ set_filter: ze,
869
+ set_page: Be,
870
+ default_params: he,
871
+ selected_items: O,
872
+ atLeastOneSelected: ye,
873
+ expand_item_toggle: F,
874
+ close_all_expanded_items: U,
875
+ selectAllCheckbox: ne
846
876
  });
847
- const re = C(!1);
877
+ const ie = C(!1);
848
878
  return X(
849
- () => l.add_params,
879
+ () => s.value.add_params,
850
880
  () => {
851
- re.value ? I() : (re.value = !0, ce(() => {
852
- I();
881
+ ie.value ? N() : (ie.value = !0, _e(() => {
882
+ N();
853
883
  }));
854
884
  },
855
- { deep: !0, immediate: l.immediate }
856
- ), (i, s) => (t(), n("div", null, [
885
+ { deep: !0, immediate: s.value.immediate }
886
+ ), (d, r) => (t(), l("div", null, [
857
887
  e("div", {
858
- class: g(["", l.class_container])
888
+ class: g(["", s.value.class_container])
859
889
  }, [
860
- A(i.$slots, "default", {}, void 0, !0),
890
+ P(d.$slots, "default", {}, void 0, !0),
861
891
  e("div", {
862
- class: g(["", l.class_content])
892
+ class: g(["", s.value.class_content])
863
893
  }, [
864
894
  e("div", {
865
- class: g([l.class_filters, "d-flex justify-content-between align-items-start"])
895
+ class: g([s.value.class_filters, "d-flex justify-content-between align-items-start"])
866
896
  }, [
867
- A(i.$slots, "pageSize", {
868
- changePageSize: se,
869
- limit_per_page: h.value.limit_per_page
897
+ P(d.$slots, "pageSize", {
898
+ changePageSize: re,
899
+ limit_per_page: y.value.limit_per_page
870
900
  }, () => [
871
901
  e("div", {
872
- class: g(["text-secondary", l.class_page_size])
902
+ class: g(["text-secondary", s.value.class_page_size])
873
903
  }, [
874
- j(w(l.first_text_page_size) + " ", 1),
875
- e("div", gt, [
876
- de(e("input", {
904
+ I(k(s.value.first_text_page_size) + " ", 1),
905
+ e("div", wt, [
906
+ ce(e("input", {
877
907
  class: "form-control form-control-sm",
878
- onChange: se,
879
- "onUpdate:modelValue": s[0] || (s[0] = (a) => h.value.limit_per_page = a),
908
+ onChange: re,
909
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => y.value.limit_per_page = a),
880
910
  min: "1",
881
911
  size: "3",
882
912
  "aria-label": "Número de registros por página",
883
913
  type: "number"
884
914
  }, null, 544), [
885
915
  [
886
- ue,
887
- h.value.limit_per_page,
916
+ pe,
917
+ y.value.limit_per_page,
888
918
  void 0,
889
919
  { lazy: !0 }
890
920
  ]
891
921
  ])
892
922
  ]),
893
- j(" " + w(l.second_text_page_size), 1)
923
+ I(" " + k(s.value.second_text_page_size), 1)
894
924
  ], 2)
895
925
  ], !0),
896
- A(i.$slots, "fieldMiddle", {}, void 0, !0),
897
- Y(Re, {
898
- search: h.value.search,
899
- "onUpdate:search": s[1] || (s[1] = (a) => h.value.search = a),
900
- filter: h.value.filter,
901
- "onUpdate:filter": s[2] || (s[2] = (a) => h.value.filter = a),
902
- list_filter: l.list_filter,
903
- item_use: ye.value,
904
- onSearch: v(I),
905
- deactivate_search_on_clear: l.deactivate_search_on_clear,
906
- placeholder_search: l.placeholder_search,
907
- deactivate_search_empty: l.deactivate_search_empty,
908
- onClickedClearSearch: s[3] || (s[3] = (a) => i.$emit("clickedClearSearch"))
926
+ P(d.$slots, "fieldMiddle", {}, void 0, !0),
927
+ Y(tt, {
928
+ search: y.value.search,
929
+ "onUpdate:search": r[1] || (r[1] = (a) => y.value.search = a),
930
+ filter: y.value.filter,
931
+ "onUpdate:filter": r[2] || (r[2] = (a) => y.value.filter = a),
932
+ list_filter: s.value.list_filter,
933
+ item_use: xe.value,
934
+ onSearch: h(N),
935
+ deactivate_search_on_clear: s.value.deactivate_search_on_clear,
936
+ placeholder_search: s.value.placeholder_search,
937
+ deactivate_search_empty: s.value.deactivate_search_empty,
938
+ onClickedClearSearch: r[3] || (r[3] = (a) => d.$emit("clickedClearSearch"))
909
939
  }, null, 8, ["search", "filter", "list_filter", "item_use", "onSearch", "deactivate_search_on_clear", "placeholder_search", "deactivate_search_empty"])
910
940
  ], 2),
911
- A(i.$slots, "item-selected-info", {
912
- selected_items: v(H),
913
- clearSelection: () => H.value = []
941
+ P(d.$slots, "item-selected-info", {
942
+ selected_items: h(O),
943
+ clearSelection: () => O.value = []
914
944
  }, () => [
915
- l.use_checkbox && v(H).length > 0 && !l.deactivate_selected_info ? (t(), n("div", yt, [
916
- e("h4", kt, [
917
- s[10] || (s[10] = e("strong", null, "oi Itens Selecionados:", -1)),
918
- s[11] || (s[11] = j()),
919
- e("span", wt, w(v(H).length), 1)
945
+ s.value.use_checkbox && h(O).length > 0 && !s.value.deactivate_selected_info ? (t(), l("div", xt, [
946
+ e("h4", bt, [
947
+ r[10] || (r[10] = e("strong", null, "oi Itens Selecionados:", -1)),
948
+ r[11] || (r[11] = I()),
949
+ e("span", Ct, k(h(O).length), 1)
920
950
  ]),
921
951
  e("a", {
922
952
  class: "cursor-pointer",
923
- onClick: s[4] || (s[4] = (a) => H.value = [])
924
- }, [...s[12] || (s[12] = [
925
- Ne('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-trash" data-v-f73f9268><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-f73f9268></path><path d="M4 7l16 0" data-v-f73f9268></path><path d="M10 11l0 6" data-v-f73f9268></path><path d="M14 11l0 6" data-v-f73f9268></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-f73f9268></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-f73f9268></path></svg> Limpar Seleção', 2)
953
+ onClick: r[4] || (r[4] = (a) => O.value = [])
954
+ }, [...r[12] || (r[12] = [
955
+ Pe('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-trash" data-v-98ed0eed><path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-98ed0eed></path><path d="M4 7l16 0" data-v-98ed0eed></path><path d="M10 11l0 6" data-v-98ed0eed></path><path d="M14 11l0 6" data-v-98ed0eed></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" data-v-98ed0eed></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" data-v-98ed0eed></path></svg> Limpar Seleção', 2)
926
956
  ])])
927
957
  ])) : x("", !0)
928
958
  ], !0),
929
- v(_e) ? (t(), G(vt, {
959
+ h(ge) ? (t(), W(kt, {
930
960
  key: 0,
931
- columns: k.value,
932
- limit: h.value.limit_per_page,
933
- type_loading: l.type_loading,
934
- custom_loading: l.custom_loading,
935
- class_table: l.class_table,
936
- attempt: v(M),
937
- pagination: h.value
938
- }, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : v(K) ? (t(), n("div", xt, [
939
- s[13] || (s[13] = e("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
940
- v(M) ? (t(), n("p", bt, " Não foi possível carregar os dados após " + w(v(M).total) + " tentativa(s). ", 1)) : (t(), n("p", Ct, " Não foi possível carregar os dados. Verifique sua conexão. ")),
961
+ columns: $.value,
962
+ limit: y.value.limit_per_page,
963
+ type_loading: s.value.type_loading,
964
+ custom_loading: s.value.custom_loading,
965
+ class_table: s.value.class_table,
966
+ attempt: h(R),
967
+ pagination: y.value
968
+ }, null, 8, ["columns", "limit", "type_loading", "custom_loading", "class_table", "attempt", "pagination"])) : h(S) ? (t(), l("div", Mt, [
969
+ r[13] || (r[13] = e("h4", { class: "text-danger" }, "Ocorreu um Erro", -1)),
970
+ h(R) ? (t(), l("p", St, " Não foi possível carregar os dados após " + k(h(R).total) + " tentativa(s). ", 1)) : (t(), l("p", $t, " Não foi possível carregar os dados. Verifique sua conexão. ")),
941
971
  e("button", {
942
972
  class: "btn btn-primary mt-2",
943
- onClick: s[5] || (s[5] = //@ts-ignore
944
- (...a) => v(O) && v(O)(...a))
973
+ onClick: r[5] || (r[5] = //@ts-ignore
974
+ (...a) => h(L) && h(L)(...a))
945
975
  }, " Tentar Novamente ")
946
- ])) : v(D) ? (t(), n("div", Mt, [
947
- v(D).length > 0 ? (t(), n("div", St, [
976
+ ])) : h(D) ? (t(), l("div", zt, [
977
+ h(D).length > 0 ? (t(), l("div", Bt, [
948
978
  e("table", {
949
- class: g(["table table-vcenter table-selectable", l.class_table])
979
+ class: g(["table table-vcenter table-selectable", s.value.class_table])
950
980
  }, [
951
981
  e("thead", null, [
952
- Y(v(He), {
953
- modelValue: Z.value,
954
- "onUpdate:modelValue": s[7] || (s[7] = (a) => Z.value = a),
982
+ Y(h(Ke), {
983
+ modelValue: ee.value,
984
+ "onUpdate:modelValue": r[7] || (r[7] = (a) => ee.value = a),
955
985
  tag: "tr",
956
986
  "item-key": "header",
957
987
  animation: 400,
958
988
  "ghost-class": "ghost-item",
959
989
  "drag-class": "dragging-item",
960
- onStart: s[8] || (s[8] = (a) => T.value = !0),
961
- onEnd: s[9] || (s[9] = () => ke())
990
+ onStart: r[8] || (r[8] = (a) => q.value = !0),
991
+ onEnd: r[9] || (r[9] = () => be())
962
992
  }, {
963
- header: F(() => [
964
- l.use_expandable_items ? (t(), n("th", $t)) : x("", !0),
965
- l.use_checkbox ? (t(), n("th", Bt, [
993
+ header: H(() => [
994
+ s.value.use_expandable_items ? (t(), l("th", Tt)) : x("", !0),
995
+ s.value.use_checkbox ? (t(), l("th", Vt, [
966
996
  e("input", {
967
997
  class: "form-check-input m-0",
968
998
  type: "checkbox",
969
999
  ref_key: "selectAllCheckbox",
970
- ref: ae,
971
- onChange: s[6] || (s[6] = //@ts-ignore
972
- (...a) => v(le) && v(le)(...a)),
1000
+ ref: ne,
1001
+ onChange: r[6] || (r[6] = //@ts-ignore
1002
+ (...a) => h(se) && h(se)(...a)),
973
1003
  "aria-label": "Selecionar todos os itens na página"
974
1004
  }, null, 544)
975
1005
  ])) : x("", !0)
976
1006
  ]),
977
- item: F(({ element: a }) => [
978
- a.use_ordering ? (t(), n("th", {
1007
+ item: H(({ element: a }) => [
1008
+ a.use_ordering ? (t(), l("th", {
979
1009
  key: 0,
980
1010
  class: g(["header-draggable", a.class_column])
981
1011
  }, [
982
- e("div", zt, [
983
- e("span", null, w(a.header), 1),
1012
+ e("div", Dt, [
1013
+ e("span", null, k(a.header), 1),
984
1014
  e("span", {
985
1015
  onClick: () => oe(a.header),
986
1016
  class: "ms-2 cursor-pointer"
987
1017
  }, [
988
- !u.value[a.header] || u.value[a.header] === "none" ? (t(), n("svg", Tt, [...s[14] || (s[14] = [
1018
+ !c.value[a.header] || c.value[a.header] === "none" ? (t(), l("svg", jt, [...r[14] || (r[14] = [
989
1019
  e("path", { d: "m3 8 4-4 4 4" }, null, -1),
990
1020
  e("path", { d: "m11 16-4 4-4-4" }, null, -1),
991
1021
  e("path", { d: "M7 4v16" }, null, -1),
992
1022
  e("path", { d: "M15 8h6" }, null, -1),
993
1023
  e("path", { d: "M15 16h6" }, null, -1),
994
1024
  e("path", { d: "M13 12h8" }, null, -1)
995
- ])])) : u.value[a.header] === "decreasing" ? (t(), n("svg", Et, [...s[15] || (s[15] = [
1025
+ ])])) : c.value[a.header] === "decreasing" ? (t(), l("svg", It, [...r[15] || (r[15] = [
996
1026
  e("path", { d: "m3 16 4 4 4-4" }, null, -1),
997
1027
  e("path", { d: "M7 20V4" }, null, -1),
998
1028
  e("path", { d: "M11 4h10" }, null, -1),
999
1029
  e("path", { d: "M11 8h7" }, null, -1),
1000
1030
  e("path", { d: "M11 12h4" }, null, -1)
1001
- ])])) : u.value[a.header] === "increasing" ? (t(), n("svg", jt, [...s[16] || (s[16] = [
1031
+ ])])) : c.value[a.header] === "increasing" ? (t(), l("svg", Nt, [...r[16] || (r[16] = [
1002
1032
  e("path", { d: "m3 8 4-4 4 4" }, null, -1),
1003
1033
  e("path", { d: "M7 4v16" }, null, -1),
1004
1034
  e("path", { d: "M11 12h4" }, null, -1),
1005
1035
  e("path", { d: "M11 16h7" }, null, -1),
1006
1036
  e("path", { d: "M11 20h10" }, null, -1)
1007
1037
  ])])) : x("", !0)
1008
- ], 8, Vt)
1038
+ ], 8, Et)
1009
1039
  ])
1010
- ], 2)) : (t(), n("th", {
1040
+ ], 2)) : (t(), l("th", {
1011
1041
  key: 1,
1012
1042
  class: g(["header-draggable", a.class_column])
1013
- }, w(a.header), 3))
1043
+ }, k(a.header), 3))
1014
1044
  ]),
1015
- footer: F(() => [
1016
- (t(!0), n($, null, E(R.value, (a) => (t(), n($, {
1045
+ footer: H(() => [
1046
+ (t(!0), l(T, null, j(Z.value, (a) => (t(), l(T, {
1017
1047
  key: a.field || a.header
1018
1048
  }, [
1019
- a.use_ordering ? (t(), n("th", {
1049
+ a.use_ordering ? (t(), l("th", {
1020
1050
  key: 0,
1021
1051
  class: g(["header-locked header-ordering", a.class_column])
1022
1052
  }, [
1023
- e("div", Dt, [
1024
- e("span", null, w(a.header), 1),
1053
+ e("div", At, [
1054
+ e("span", null, k(a.header), 1),
1025
1055
  e("span", {
1026
1056
  onClick: () => oe(a.header),
1027
1057
  class: "ms-2 cursor-pointer"
1028
1058
  }, [
1029
- !u.value[a.header] || u.value[a.header] === "none" ? (t(), n("svg", Nt, [...s[17] || (s[17] = [
1059
+ !c.value[a.header] || c.value[a.header] === "none" ? (t(), l("svg", qt, [...r[17] || (r[17] = [
1030
1060
  e("path", { d: "m3 8 4-4 4 4" }, null, -1),
1031
1061
  e("path", { d: "m11 16-4 4-4-4" }, null, -1),
1032
1062
  e("path", { d: "M7 4v16" }, null, -1),
1033
1063
  e("path", { d: "M15 8h6" }, null, -1),
1034
1064
  e("path", { d: "M15 16h6" }, null, -1),
1035
1065
  e("path", { d: "M13 12h8" }, null, -1)
1036
- ])])) : u.value[a.header] === "decreasing" ? (t(), n("svg", At, [...s[18] || (s[18] = [
1066
+ ])])) : c.value[a.header] === "decreasing" ? (t(), l("svg", Lt, [...r[18] || (r[18] = [
1037
1067
  e("path", { d: "m3 16 4 4 4-4" }, null, -1),
1038
1068
  e("path", { d: "M7 20V4" }, null, -1),
1039
1069
  e("path", { d: "M11 4h10" }, null, -1),
1040
1070
  e("path", { d: "M11 8h7" }, null, -1),
1041
1071
  e("path", { d: "M11 12h4" }, null, -1)
1042
- ])])) : u.value[a.header] === "increasing" ? (t(), n("svg", Pt, [...s[19] || (s[19] = [
1072
+ ])])) : c.value[a.header] === "increasing" ? (t(), l("svg", Ot, [...r[19] || (r[19] = [
1043
1073
  e("path", { d: "m3 8 4-4 4 4" }, null, -1),
1044
1074
  e("path", { d: "M7 4v16" }, null, -1),
1045
1075
  e("path", { d: "M11 12h4" }, null, -1),
1046
1076
  e("path", { d: "M11 16h7" }, null, -1),
1047
1077
  e("path", { d: "M11 20h10" }, null, -1)
1048
1078
  ])])) : x("", !0)
1049
- ], 8, It)
1079
+ ], 8, Pt)
1050
1080
  ])
1051
- ], 2)) : (t(), n("th", {
1081
+ ], 2)) : (t(), l("th", {
1052
1082
  key: 1,
1053
1083
  class: g(["header-locked", a.class_column])
1054
- }, w(a.header), 3))
1084
+ }, k(a.header), 3))
1055
1085
  ], 64))), 128))
1056
1086
  ]),
1057
1087
  _: 1
1058
1088
  }, 8, ["modelValue"])
1059
1089
  ]),
1060
1090
  e("tbody", null, [
1061
- (t(!0), n($, null, E(v(D), (a) => (t(), n($, {
1062
- key: a[l.item_key]
1091
+ (t(!0), l(T, null, j(h(D), (a) => (t(), l(T, {
1092
+ key: a[s.value.item_key]
1063
1093
  }, [
1064
- Y(Ae, {
1094
+ Y(qe, {
1065
1095
  tag: "tr",
1066
- name: T.value ? "column-move" : ""
1096
+ name: q.value ? "column-move" : ""
1067
1097
  }, {
1068
- default: F(() => [
1069
- l.use_expandable_items ? (t(), n("td", qt, [
1070
- A(i.$slots, "expand-button", {
1098
+ default: H(() => [
1099
+ s.value.use_expandable_items ? (t(), l("td", Ht, [
1100
+ P(d.$slots, "expand-button", {
1071
1101
  item: a,
1072
- isExpanded: v(U)(a),
1073
- expand_item_toggle: v(P)
1102
+ isExpanded: h(K)(a),
1103
+ expand_item_toggle: h(F)
1074
1104
  }, () => [
1075
1105
  e("button", {
1076
1106
  type: "button",
1077
- class: g(["btn-clean btn-icon-anim", { "is-expanded": v(U)(a) }]),
1078
- onClick: (m) => v(P)(a)
1107
+ class: g(["btn-clean btn-icon-anim", { "is-expanded": h(K)(a) }]),
1108
+ onClick: (_) => h(F)(a)
1079
1109
  }, [
1080
- l.type_button_expand === "arrow" ? (t(), n("svg", Ot, [...s[20] || (s[20] = [
1110
+ s.value.type_button_expand === "arrow" ? (t(), l("svg", Ut, [...r[20] || (r[20] = [
1081
1111
  e("path", {
1082
1112
  stroke: "none",
1083
1113
  d: "M0 0h24v24H0z",
1084
1114
  fill: "none"
1085
1115
  }, null, -1),
1086
1116
  e("path", { d: "M9 6l6 6l-6 6" }, null, -1)
1087
- ])])) : (t(), n("svg", Ht, [...s[21] || (s[21] = [
1117
+ ])])) : (t(), l("svg", Kt, [...r[21] || (r[21] = [
1088
1118
  e("path", {
1089
1119
  stroke: "none",
1090
1120
  d: "M0 0h24v24H0z",
@@ -1096,142 +1126,142 @@ const nt = { class: "loading-container" }, lt = { key: 0 }, st = { key: 2 }, ot
1096
1126
  }, null, -1),
1097
1127
  e("path", { d: "M5 12l14 0" }, null, -1)
1098
1128
  ])]))
1099
- ], 10, Lt)
1129
+ ], 10, Ft)
1100
1130
  ], !0)
1101
1131
  ])) : x("", !0),
1102
- l.use_checkbox ? (t(), n("td", Ft, [
1132
+ s.value.use_checkbox ? (t(), l("td", Yt, [
1103
1133
  e("input", {
1104
1134
  class: "form-check-input m-0",
1105
1135
  type: "checkbox",
1106
- checked: v(ne)(a),
1107
- onChange: (m) => v(ve)(a),
1136
+ checked: h(le)(a),
1137
+ onChange: (_) => h(ke)(a),
1108
1138
  "aria-label": "Selecionar este item"
1109
- }, null, 40, Ut)
1139
+ }, null, 40, Xt)
1110
1140
  ])) : x("", !0),
1111
- (t(!0), n($, null, E(ge.value, (m) => (t(), n("td", {
1112
- key: m.field || m.header,
1113
- class: g(m.class_row)
1141
+ (t(!0), l(T, null, j(we.value, (_) => (t(), l("td", {
1142
+ key: _.field || _.header,
1143
+ class: g(_.class_row)
1114
1144
  }, [
1115
- m.bodySlot ? (t(), G(pe(m.bodySlot), {
1145
+ _.bodySlot ? (t(), W(me(_.bodySlot), {
1116
1146
  key: 0,
1117
1147
  item: a,
1118
- "is-selected": v(ne)(a)
1119
- }, null, 8, ["item", "is-selected"])) : m.type === "text" ? (t(), n("span", {
1148
+ "is-selected": h(le)(a)
1149
+ }, null, 8, ["item", "is-selected"])) : _.type === "text" ? (t(), l("span", {
1120
1150
  key: 1,
1121
- onClick: (b) => m.click ? m.click(a) : null,
1122
- class: g(W(m, a))
1123
- }, w(xe(N(m.field, a, m.transform_function), m.limite_text ?? null)), 11, Kt)) : m.type === "date" ? (t(), n("span", {
1151
+ onClick: (b) => _.click ? _.click(a) : null,
1152
+ class: g(G(_, a))
1153
+ }, k(Me(A(_.field, a, _.transform_function), _.limite_text ?? null)), 11, Gt)) : _.type === "date" ? (t(), l("span", {
1124
1154
  key: 2,
1125
- onClick: (b) => m.click ? m.click(a) : null,
1126
- class: g(W(m, a))
1155
+ onClick: (b) => _.click ? _.click(a) : null,
1156
+ class: g(G(_, a))
1127
1157
  }, [
1128
- m.format === "complete" ? (t(), n("span", Xt, w(new Date(N(m.field, a)).toLocaleString()), 1)) : x("", !0),
1129
- m.format === "simple" ? (t(), n("span", Wt, w(new Date(N(
1130
- m.field,
1158
+ _.format === "complete" ? (t(), l("span", Jt, k(new Date(A(_.field, a)).toLocaleString()), 1)) : x("", !0),
1159
+ _.format === "simple" ? (t(), l("span", Qt, k(new Date(A(
1160
+ _.field,
1131
1161
  a
1132
1162
  )).toLocaleDateString()), 1)) : x("", !0)
1133
- ], 10, Yt)) : m.type === "html" ? (t(), n("div", {
1163
+ ], 10, Wt)) : _.type === "html" ? (t(), l("div", {
1134
1164
  key: 3,
1135
- onClick: (b) => m.click ? m.click(a) : null,
1136
- class: g(W(m, a)),
1137
- innerHTML: N(m.field, a)
1138
- }, null, 10, Gt)) : m.type === "img" ? (t(), n("div", {
1165
+ onClick: (b) => _.click ? _.click(a) : null,
1166
+ class: g(G(_, a)),
1167
+ innerHTML: A(_.field, a)
1168
+ }, null, 10, Rt)) : _.type === "img" ? (t(), l("div", {
1139
1169
  key: 4,
1140
- onClick: (b) => m.click ? m.click(a) : null,
1141
- class: g(W(m, a))
1170
+ onClick: (b) => _.click ? _.click(a) : null,
1171
+ class: g(G(_, a))
1142
1172
  }, [
1143
- N(m.field, a) ? (t(), n("div", Pe({
1173
+ A(_.field, a) ? (t(), l("div", Le({
1144
1174
  key: 0,
1145
1175
  ref_for: !0
1146
- }, m.deactivate_img_preview ? {
1176
+ }, _.deactivate_img_preview ? {
1147
1177
  class: "container-img"
1148
1178
  } : {
1149
- onMouseover: (b) => v(z)(b, N(m.field, a)),
1150
- onMousemove: v(V),
1151
- onMouseleave: v(S),
1179
+ onMouseover: (b) => h(E)(b, A(_.field, a)),
1180
+ onMousemove: h(B),
1181
+ onMouseleave: h(v),
1152
1182
  class: "container-img container-img-preview"
1153
1183
  }), [
1154
1184
  e("img", {
1155
1185
  class: "img-tamanho",
1156
- src: N(m.field, a)
1157
- }, null, 8, Qt),
1186
+ src: A(_.field, a)
1187
+ }, null, 8, ea),
1158
1188
  e("img", {
1159
1189
  class: "img-tamanho-cover",
1160
- src: N(m.field, a)
1161
- }, null, 8, Rt),
1162
- s[22] || (s[22] = e("div", { class: "bg-img" }, null, -1))
1190
+ src: A(_.field, a)
1191
+ }, null, 8, ta),
1192
+ r[22] || (r[22] = e("div", { class: "bg-img" }, null, -1))
1163
1193
  ], 16)) : x("", !0)
1164
- ], 10, Jt)) : (t(), n("span", Zt, [
1165
- s[23] || (s[23] = j("tipo ", -1)),
1166
- e("span", ea, w(m.type), 1),
1167
- s[24] || (s[24] = j(" não suportado", -1))
1194
+ ], 10, Zt)) : (t(), l("span", aa, [
1195
+ r[23] || (r[23] = I("tipo ", -1)),
1196
+ e("span", na, k(_.type), 1),
1197
+ r[24] || (r[24] = I(" não suportado", -1))
1168
1198
  ]))
1169
1199
  ], 2))), 128))
1170
1200
  ]),
1171
1201
  _: 2
1172
1202
  }, 1032, ["name"]),
1173
- Y(qe, {
1174
- name: "expand-item-" + l.type_animation_expand,
1175
- css: !l.deactivate_animation_expand
1203
+ Y(Oe, {
1204
+ name: "expand-item-" + s.value.type_animation_expand,
1205
+ css: !s.value.deactivate_animation_expand
1176
1206
  }, {
1177
- default: F(() => [
1178
- v(U)(a) ? (t(), n("tr", {
1207
+ default: H(() => [
1208
+ h(K)(a) ? (t(), l("tr", {
1179
1209
  key: 0,
1180
- id: "expand-item-" + a[l.item_key],
1210
+ id: "expand-item-" + a[s.value.item_key],
1181
1211
  class: "expanded-item-row"
1182
1212
  }, [
1183
1213
  e("td", {
1184
- colspan: $e()
1214
+ colspan: Te()
1185
1215
  }, [
1186
- A(i.$slots, "after-row", { item: a }, void 0, !0)
1187
- ], 8, aa)
1188
- ], 8, ta)) : x("", !0)
1216
+ P(d.$slots, "after-row", { item: a }, void 0, !0)
1217
+ ], 8, sa)
1218
+ ], 8, la)) : x("", !0)
1189
1219
  ]),
1190
1220
  _: 2
1191
1221
  }, 1032, ["name", "css"])
1192
1222
  ], 64))), 128))
1193
1223
  ])
1194
1224
  ], 2)
1195
- ])) : v(fe) === !1 ? (t(), n("div", na, [
1196
- A(i.$slots, "idle-state", {}, void 0, !0)
1197
- ])) : (t(), n("div", la, [...s[25] || (s[25] = [
1225
+ ])) : h(fe) === !1 ? (t(), l("div", ra, [
1226
+ P(d.$slots, "idle-state", {}, void 0, !0)
1227
+ ])) : (t(), l("div", oa, [...r[25] || (r[25] = [
1198
1228
  e("p", { class: "m-0" }, "Nenhum item encontrado.", -1)
1199
1229
  ])]))
1200
1230
  ])) : x("", !0)
1201
1231
  ], 2)
1202
1232
  ], 2),
1203
- A(i.$slots, "pagination", {
1204
- pagination: h.value,
1205
- tradePage: v(O),
1206
- error: v(K)
1233
+ P(d.$slots, "pagination", {
1234
+ pagination: y.value,
1235
+ tradePage: h(L),
1236
+ error: h(S)
1207
1237
  }, () => [
1208
- !v(K) && h.value.count > 0 ? (t(), n("div", {
1238
+ !h(S) && y.value.count > 0 ? (t(), l("div", {
1209
1239
  key: 0,
1210
- class: g(["px-3", l.class_pagination])
1240
+ class: g(["px-3", s.value.class_pagination])
1211
1241
  }, [
1212
- Y(Oe, {
1213
- page_starts_at: l.page_starts_at,
1242
+ Y(Ue, {
1243
+ page_starts_at: s.value.page_starts_at,
1214
1244
  filtering: !0,
1215
- pagination: h.value,
1216
- onTradePage: Be
1245
+ pagination: y.value,
1246
+ onTradePage: Ve
1217
1247
  }, null, 8, ["page_starts_at", "pagination"])
1218
1248
  ], 2)) : x("", !0)
1219
1249
  ], !0),
1220
- v(r) ? (t(), n("div", {
1250
+ h(m) ? (t(), l("div", {
1221
1251
  key: 0,
1222
1252
  class: "image-preview-container",
1223
- style: Le(v(p))
1253
+ style: He(h(V))
1224
1254
  }, [
1225
1255
  e("img", {
1226
- src: v(_),
1256
+ src: h(p),
1227
1257
  alt: "Preview",
1228
1258
  class: "image-preview-large"
1229
- }, null, 8, sa)
1259
+ }, null, 8, ia)
1230
1260
  ], 4)) : x("", !0)
1231
1261
  ]));
1232
1262
  }
1233
- }), ca = /* @__PURE__ */ te(oa, [["__scopeId", "data-v-f73f9268"]]);
1263
+ }), va = /* @__PURE__ */ ae(da, [["__scopeId", "data-v-98ed0eed"]]);
1234
1264
  export {
1235
- ua as VColumn,
1236
- ca as VDataTable
1265
+ ma as VColumn,
1266
+ va as VDataTable
1237
1267
  };