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