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