v-sistec-features 1.22.3 → 1.23.0

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