admins-components 1.3.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- var ee = Object.defineProperty;
2
- var te = (p, l, t) => l in p ? ee(p, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[l] = t;
3
- var x = (p, l, t) => te(p, typeof l != "symbol" ? l + "" : l, t);
4
- import { defineComponent as w, createElementBlock as a, openBlock as s, createElementVNode as d, toDisplayString as C, resolveComponent as K, Fragment as _, renderList as $, createVNode as z, createBlock as B, createCommentVNode as m, watch as H, ref as y, onMounted as M, unref as le, normalizeStyle as j, createTextVNode as N, normalizeClass as L, computed as F, onUnmounted as oe } from "vue";
5
- const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /* @__PURE__ */ w({
1
+ var ie = Object.defineProperty;
2
+ var ae = (f, o, e) => o in f ? ie(f, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : f[o] = e;
3
+ var M = (f, o, e) => ae(f, typeof o != "symbol" ? o + "" : o, e);
4
+ import { defineComponent as D, createElementBlock as a, openBlock as i, createElementVNode as r, toDisplayString as w, resolveComponent as Y, Fragment as C, renderList as B, createVNode as A, createBlock as E, createCommentVNode as g, watch as V, ref as y, onMounted as z, onUnmounted as Z, unref as re, normalizeStyle as G, normalizeClass as x, createTextVNode as N, computed as H, reactive as de, nextTick as ce } from "vue";
5
+ const ue = { class: "form-check" }, pe = ["checked", "id"], ve = ["for"], W = /* @__PURE__ */ D({
6
6
  __name: "CheckBox",
7
7
  props: {
8
8
  id: {},
@@ -10,60 +10,60 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
10
10
  checked: { type: Boolean }
11
11
  },
12
12
  emits: ["changed"],
13
- setup(p) {
14
- return (l, t) => (s(), a("div", ne, [
15
- d("input", {
13
+ setup(f) {
14
+ return (o, e) => (i(), a("div", ue, [
15
+ r("input", {
16
16
  class: "form-check-input",
17
17
  type: "checkbox",
18
- checked: l.checked,
18
+ checked: o.checked,
19
19
  value: "",
20
- id: l.id,
21
- onChange: t[0] || (t[0] = (e) => l.$emit("changed", {
22
- id: l.id,
23
- checked: e.target.checked
20
+ id: o.id,
21
+ onChange: e[0] || (e[0] = (t) => o.$emit("changed", {
22
+ id: o.id,
23
+ checked: t.target.checked
24
24
  }))
25
- }, null, 40, se),
26
- d("label", {
25
+ }, null, 40, pe),
26
+ r("label", {
27
27
  class: "form-check-label",
28
- for: l.id
29
- }, C(l.label), 9, ie)
28
+ for: o.id
29
+ }, w(o.label), 9, ve)
30
30
  ]));
31
31
  }
32
- }), ae = { class: "cbl-childrend-container" }, re = /* @__PURE__ */ w({
32
+ }), fe = { class: "cbl-childrend-container" }, me = /* @__PURE__ */ D({
33
33
  __name: "CheckBoxList",
34
34
  props: {
35
35
  items: {},
36
36
  callback: { type: Function }
37
37
  },
38
- setup(p) {
39
- return (l, t) => {
40
- const e = K("CheckBoxList", !0);
41
- return s(!0), a(_, null, $(l.items, (o) => (s(), a("div", {
42
- key: o.id,
38
+ setup(f) {
39
+ return (o, e) => {
40
+ const t = Y("CheckBoxList", !0);
41
+ return i(!0), a(C, null, B(o.items, (l) => (i(), a("div", {
42
+ key: l.id,
43
43
  class: "cbl-container"
44
44
  }, [
45
- z(V, {
46
- id: o.id,
47
- label: o.label,
48
- checked: o.checked,
49
- onChanged: t[0] || (t[0] = (r) => l.callback(r.id, r.checked))
45
+ A(W, {
46
+ id: l.id,
47
+ label: l.label,
48
+ checked: l.checked,
49
+ onChanged: e[0] || (e[0] = (d) => o.callback(d.id, d.checked))
50
50
  }, null, 8, ["id", "label", "checked"]),
51
- d("div", ae, [
52
- o.childrend ? (s(), B(e, {
51
+ r("div", fe, [
52
+ l.childrend ? (i(), E(t, {
53
53
  key: 0,
54
- items: o.childrend,
55
- callback: l.callback
56
- }, null, 8, ["items", "callback"])) : m("", !0)
54
+ items: l.childrend,
55
+ callback: o.callback
56
+ }, null, 8, ["items", "callback"])) : g("", !0)
57
57
  ])
58
58
  ]))), 128);
59
59
  };
60
60
  }
61
- }), de = (p, l) => {
62
- const t = p.__vccOpts || p;
63
- for (const [e, o] of l)
64
- t[e] = o;
65
- return t;
66
- }, ue = /* @__PURE__ */ de(re, [["__scopeId", "data-v-ae2832c5"]]), ce = ["id"], pe = ["disabled"], ve = { class: "dd-label" }, fe = { class: "dd-item-list" }, ge = ["onClick"], O = /* @__PURE__ */ w({
61
+ }), ge = (f, o) => {
62
+ const e = f.__vccOpts || f;
63
+ for (const [t, l] of o)
64
+ e[t] = l;
65
+ return e;
66
+ }, ye = /* @__PURE__ */ ge(me, [["__scopeId", "data-v-ae2832c5"]]), be = ["id"], he = ["disabled"], ke = { class: "dd-label" }, _e = ["id"], $e = { class: "dd-item-list" }, we = ["id", "onClick"], K = /* @__PURE__ */ D({
67
67
  __name: "DropDown",
68
68
  props: {
69
69
  id: {},
@@ -77,110 +77,147 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
77
77
  disabled: { type: Boolean }
78
78
  },
79
79
  emits: ["selected", "filtered"],
80
- setup(p, { emit: l }) {
81
- const t = p;
82
- H(t.options, () => {
83
- t.filterevent && (c.value = t.options.value);
84
- }), H(
85
- () => t.selected,
80
+ setup(f, { emit: o }) {
81
+ const e = f;
82
+ V(e.options, () => {
83
+ e.filterevent && ($.value = e.options.value);
84
+ }), V(
85
+ () => e.selected,
86
86
  () => {
87
87
  v();
88
88
  }
89
- ), H(
90
- () => t.label,
89
+ ), V(
90
+ () => e.label,
91
91
  () => {
92
92
  v();
93
93
  }
94
94
  );
95
- const e = l, o = (h) => {
96
- t.storeselected || (f.value = h.label), e("selected", h);
97
- }, r = "törlés", f = y(""), v = () => {
98
- if (t.options.value) {
99
- const h = t.options.value.find((k) => k.id == t.selected);
100
- h ? f.value = h.label : (i(""), f.value = t.label);
95
+ const t = o, l = (h) => {
96
+ e.storeselected || (m.value = h.label), t("selected", h);
97
+ }, d = "törlés", m = y(""), p = y(null);
98
+ V(
99
+ () => p.value,
100
+ () => {
101
+ p.value && document.getElementById(p.value.id).scrollIntoView();
102
+ }
103
+ );
104
+ const v = () => {
105
+ if (e.options.value) {
106
+ const h = e.options.value.find((_) => _.id == e.selected);
107
+ h ? m.value = h.label : (b(""), m.value = e.label);
108
+ }
109
+ }, s = (h) => {
110
+ const _ = () => p ? $.value.indexOf(p.value, 0) : -1, T = document.getElementById(`${e.id}-clear-btn`);
111
+ if (T == h.target && h.key == "ArrowDown") {
112
+ F.value.focus(), p.value = $.value[0];
113
+ return;
114
+ }
115
+ if (F.value && F.value == h.target) {
116
+ if (h.key == "ArrowUp") {
117
+ const j = _();
118
+ if (j < 1) {
119
+ T && T.focus();
120
+ return;
121
+ }
122
+ p.value = $.value[j - 1];
123
+ return;
124
+ }
125
+ if (h.key == "ArrowDown") {
126
+ const j = _();
127
+ if (j >= $.value.length - 1) return;
128
+ p.value = $.value[j + 1];
129
+ return;
130
+ }
131
+ if (h.key == "Enter") {
132
+ if (!p.value) return;
133
+ l(p.value), S.value == "block" && (S.value = "none");
134
+ return;
135
+ }
101
136
  }
137
+ }, u = () => {
138
+ S.value == "block" && (S.value = "none");
139
+ }, n = () => {
140
+ S.value == "block" && (S.value = "none");
102
141
  };
103
- M(() => {
104
- t.label && (f.value = t.label), v(), g = "", document.addEventListener("click", function() {
105
- S.value == "block" && (S.value = "none");
106
- }), window.addEventListener("scrolled", function() {
107
- S.value == "block" && (S.value = "none");
108
- }), b();
142
+ z(() => {
143
+ e.label && (m.value = e.label), v(), c = "", document.addEventListener("click", u), window.addEventListener("scrolled", n), I(), document.addEventListener("keydown", s);
144
+ }), Z(() => {
145
+ document.removeEventListener("keydown", s), document.removeEventListener("click", u), window.removeEventListener("scrolled", n);
109
146
  });
110
- let g = "";
111
- const i = (h) => {
112
- g = h, t.filterevent ? e("filtered", h) : h == "" ? c.value = t.options.value : c.value = t.options.value.filter(
113
- (k) => k.label.toLowerCase().includes(h.toLowerCase())
114
- );
115
- }, c = y([]), n = () => {
116
- o({ label: t.label, id: "" }), i("");
117
- }, u = () => {
147
+ let c = "";
148
+ const b = (h) => {
149
+ c = h, e.filterevent ? t("filtered", h) : h == "" ? $.value = e.options.value : $.value = e.options.value.filter((_) => _.label.toLowerCase().includes(h.toLowerCase()));
150
+ }, $ = y([]), P = () => {
151
+ l({ label: e.label, id: "" }), b("");
152
+ }, O = () => {
118
153
  if (S.value == "block") {
119
154
  S.value = "none";
120
155
  return;
121
156
  }
122
157
  setTimeout(() => {
123
158
  S.value = "block";
124
- }, 10), setTimeout(b, 20);
125
- }, b = () => {
126
- const h = D.value, k = E.value;
127
- t.opentop ? k.style.top = h.getBoundingClientRect().y - k.offsetHeight + "px" : (k.style.top = h.getBoundingClientRect().y + h.offsetHeight + "px", h.getBoundingClientRect().y - k.getBoundingClientRect().y != -h.offsetHeight && (k.style.top = parseInt(k.style.top.substring(0, k.style.top.length - 2)) + (h.getBoundingClientRect().y - k.getBoundingClientRect().y) + h.offsetHeight + "px")), P.value && P.value.focus();
128
- }, D = y(null), E = y(null), S = y("none"), P = y(null);
129
- return (h, k) => (s(), a("div", {
159
+ }, 10), setTimeout(I, 20);
160
+ }, I = () => {
161
+ const h = k.value, _ = R.value;
162
+ e.opentop ? _.style.top = h.getBoundingClientRect().y - _.offsetHeight + "px" : (_.style.top = h.getBoundingClientRect().y + h.offsetHeight + "px", h.getBoundingClientRect().y - _.getBoundingClientRect().y != -h.offsetHeight && (_.style.top = parseInt(_.style.top.substring(0, _.style.top.length - 2)) + (h.getBoundingClientRect().y - _.getBoundingClientRect().y) + h.offsetHeight + "px")), F.value && F.value.focus();
163
+ }, k = y(null), R = y(null), S = y("none"), F = y(null);
164
+ return (h, _) => (i(), a("div", {
130
165
  id: h.id,
131
166
  class: "dd-flex"
132
167
  }, [
133
- d("button", {
168
+ r("button", {
134
169
  ref_key: "DropDownTriggerButton",
135
- ref: D,
170
+ ref: k,
136
171
  class: "btn btn-outline-secondary dd-toggle dd-flex",
137
172
  type: "button",
138
173
  disabled: h.disabled,
139
- onClick: k[0] || (k[0] = (T) => {
140
- i(le(g)), u();
174
+ onClick: _[0] || (_[0] = () => {
175
+ b(re(c)), O();
141
176
  })
142
177
  }, [
143
- d("div", ve, C(f.value), 1)
144
- ], 8, pe),
145
- d("div", {
178
+ r("div", ke, w(m.value), 1)
179
+ ], 8, he),
180
+ r("div", {
146
181
  class: "dd-menu",
147
- style: j({ display: S.value }),
182
+ style: G({ display: S.value }),
148
183
  ref_key: "DropDownMenu",
149
- ref: E
184
+ ref: R
150
185
  }, [
151
- f.value != t.label ? (s(), a("button", {
186
+ m.value != e.label ? (i(), a("button", {
152
187
  key: 0,
188
+ id: `${h.id}-clear-btn`,
153
189
  type: "button",
154
190
  class: "btn btn-outline-secondary dd-button",
155
- onClick: k[1] || (k[1] = (T) => n())
156
- }, C(r))) : m("", !0),
157
- h.disableFilter ? m("", !0) : (s(), a("input", {
191
+ onClick: _[1] || (_[1] = (T) => P())
192
+ }, w(d), 8, _e)) : g("", !0),
193
+ h.disableFilter ? g("", !0) : (i(), a("input", {
158
194
  key: 1,
159
195
  ref_key: "ddSearch",
160
- ref: P,
196
+ ref: F,
161
197
  type: "text ",
162
198
  class: "form-control",
163
199
  placeholder: "keresés",
164
- onInput: k[2] || (k[2] = (T) => i(T.target.value)),
165
- onClick: k[3] || (k[3] = (T) => T.stopPropagation())
200
+ onInput: _[2] || (_[2] = (T) => b(T.target.value)),
201
+ onClick: _[3] || (_[3] = (T) => T.stopPropagation())
166
202
  }, null, 544)),
167
- d("div", fe, [
168
- (s(!0), a(_, null, $(c.value, (T) => (s(), a("div", {
203
+ r("div", $e, [
204
+ (i(!0), a(C, null, B($.value, (T) => (i(), a("div", {
205
+ id: T.id,
169
206
  key: T.id,
170
- class: "dd-item",
171
- onClick: (Pt) => o(T)
207
+ class: x(["dd-item", { "dd-item-preselected": T == p.value }]),
208
+ onClick: (j) => l(T)
172
209
  }, [
173
- T.icon ? (s(), a("i", {
210
+ T.icon ? (i(), a("i", {
174
211
  key: 0,
175
- class: L([T.icon, "dd-item__icon"])
176
- }, null, 2)) : m("", !0),
177
- N(C(T.label), 1)
178
- ], 8, ge))), 128))
212
+ class: x([T.icon, "dd-item__icon"])
213
+ }, null, 2)) : g("", !0),
214
+ N(w(T.label), 1)
215
+ ], 10, we))), 128))
179
216
  ])
180
217
  ], 4)
181
- ], 8, ce));
218
+ ], 8, be));
182
219
  }
183
- }), me = ["id"], ye = ["disabled"], be = { class: "ddc-row" }, he = { class: "ddc-label" }, ke = { class: "dd-item-list" }, _e = ["onClick"], Ce = { class: "ddc-item" }, $e = { class: "ddc-label" }, we = "törlés", U = /* @__PURE__ */ w({
220
+ }), Ce = ["id"], De = ["disabled"], Be = { class: "ddc-row" }, Te = { class: "ddc-label" }, Ie = { class: "dd-item-list" }, Se = ["onClick"], Ee = { class: "ddc-item" }, Le = { class: "ddc-label" }, xe = "törlés", ee = /* @__PURE__ */ D({
184
221
  __name: "DropDownCallBack",
185
222
  props: {
186
223
  id: {},
@@ -189,84 +226,84 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
189
226
  enabled: { type: Boolean },
190
227
  options: {}
191
228
  },
192
- setup(p) {
193
- const l = p, t = (c) => {
194
- c == l.default && e.value.callback(""), e.value = c, e.value.callback(e.value.value);
195
- }, e = y(l.default), o = () => {
196
- if (l.selected && l.options.value) {
197
- const c = l.options.value.find(
198
- (n) => n.value == l.selected
229
+ setup(f) {
230
+ const o = f, e = (u) => {
231
+ u == o.default && t.value.callback(""), t.value = u, t.value.callback(t.value.value);
232
+ }, t = y(o.default), l = () => {
233
+ if (o.selected && o.options.value) {
234
+ const u = o.options.value.find(
235
+ (n) => n.value == o.selected
199
236
  );
200
- c && (e.value = c);
237
+ u && (t.value = u);
201
238
  }
202
239
  };
203
- M(() => {
204
- o(), document.addEventListener("click", function() {
205
- i.value == "block" && (i.value = "none");
240
+ z(() => {
241
+ l(), document.addEventListener("click", function() {
242
+ s.value == "block" && (s.value = "none");
206
243
  });
207
244
  });
208
- const r = () => {
245
+ const d = () => {
209
246
  setTimeout(() => {
210
- i.value = "block";
247
+ s.value = "block";
211
248
  }, 10), setTimeout(() => {
212
- g.value = f.value.offsetHeight;
249
+ v.value = m.value.offsetHeight;
213
250
  }, 20);
214
- }, f = y(null), v = y(null), g = y(0), i = y("none");
215
- return (c, n) => (s(), a("div", {
251
+ }, m = y(null), p = y(null), v = y(0), s = y("none");
252
+ return (u, n) => (i(), a("div", {
216
253
  class: "ddc-flex",
217
- id: c.id
254
+ id: u.id
218
255
  }, [
219
- d("button", {
256
+ r("button", {
220
257
  ref_key: "DropDownTriggerButton",
221
- ref: f,
258
+ ref: m,
222
259
  class: "btn btn-outline-secondary ddc-button",
223
260
  type: "button",
224
- disabled: !c.enabled,
225
- onClick: n[0] || (n[0] = (u) => r())
261
+ disabled: !u.enabled,
262
+ onClick: n[0] || (n[0] = (c) => d())
226
263
  }, [
227
- d("span", be, [
228
- d("i", {
229
- class: L([e.value.icon, "ddc-icon"])
264
+ r("span", Be, [
265
+ r("i", {
266
+ class: x([t.value.icon, "ddc-icon"])
230
267
  }, null, 2),
231
- d("span", he, C(e.value.label), 1)
268
+ r("span", Te, w(t.value.label), 1)
232
269
  ])
233
- ], 8, ye),
234
- d("div", {
270
+ ], 8, De),
271
+ r("div", {
235
272
  class: "ddc-menu",
236
- style: j({ display: i.value, "margin-top": g.value + "px" }),
273
+ style: G({ display: s.value, "margin-top": v.value + "px" }),
237
274
  ref_key: "DropDownMenu",
238
- ref: v
275
+ ref: p
239
276
  }, [
240
- e.value != l.default ? (s(), a("button", {
277
+ t.value != o.default ? (i(), a("button", {
241
278
  key: 0,
242
279
  type: "button",
243
280
  class: "btn btn-outline-secondary ddc-button",
244
- onClick: n[1] || (n[1] = (u) => t(l.default))
245
- }, C(we))) : m("", !0),
246
- d("div", ke, [
247
- (s(!0), a(_, null, $(c.options.value, (u) => (s(), a("div", {
248
- key: u.label,
281
+ onClick: n[1] || (n[1] = (c) => e(o.default))
282
+ }, w(xe))) : g("", !0),
283
+ r("div", Ie, [
284
+ (i(!0), a(C, null, B(u.options.value, (c) => (i(), a("div", {
285
+ key: c.label,
249
286
  class: "ddc-item",
250
- onClick: (b) => t(u)
287
+ onClick: (b) => e(c)
251
288
  }, [
252
- d("span", Ce, [
253
- d("i", {
254
- class: L([u.icon, "ddc-icon"])
289
+ r("span", Ee, [
290
+ r("i", {
291
+ class: x([c.icon, "ddc-icon"])
255
292
  }, null, 2),
256
- d("span", $e, C(u.label), 1)
293
+ r("span", Le, w(c.label), 1)
257
294
  ])
258
- ], 8, _e))), 128))
295
+ ], 8, Se))), 128))
259
296
  ])
260
297
  ], 4)
261
- ], 8, me));
298
+ ], 8, Ce));
262
299
  }
263
- }), De = ["id"], Be = {
300
+ }), Re = ["id"], Fe = {
264
301
  key: 0,
265
302
  class: "ddm-label"
266
- }, Te = {
303
+ }, Me = {
267
304
  key: 1,
268
305
  class: "ddm-label"
269
- }, Ie = ["onClick"], G = /* @__PURE__ */ w({
306
+ }, He = ["onClick"], U = /* @__PURE__ */ D({
270
307
  __name: "DropDownMenu",
271
308
  props: {
272
309
  label: {},
@@ -276,222 +313,295 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
276
313
  id: {},
277
314
  right: { type: Boolean }
278
315
  },
279
- setup(p) {
280
- const l = p;
281
- M(() => {
316
+ setup(f) {
317
+ const o = f;
318
+ z(() => {
282
319
  document.addEventListener("click", function() {
283
- t.value && (t.value = !1);
320
+ e.value && (e.value = !1);
284
321
  });
285
322
  });
286
- const t = y(!1), e = () => {
323
+ const e = y(!1), t = () => {
287
324
  setTimeout(() => {
288
- t.value = !0;
289
- }, 10), setTimeout(o, 20);
290
- }, o = () => {
291
- const g = r.value, i = f.value;
292
- i.style.top = g.getBoundingClientRect().y + g.offsetHeight + "px", g.getBoundingClientRect().y - i.getBoundingClientRect().y != -g.offsetHeight && (i.style.top = parseInt(i.style.top.substring(0, i.style.top.length - 2)) + (g.getBoundingClientRect().y - i.getBoundingClientRect().y) + g.offsetHeight + "px"), i.style.left = g.getBoundingClientRect().x - (l.right ? 100 : 0) + "px";
293
- }, r = y(null), f = y(null), v = y(0);
294
- return (g, i) => (s(), a("div", {
325
+ e.value = !0;
326
+ }, 10), setTimeout(l, 20);
327
+ }, l = () => {
328
+ const v = d.value, s = m.value;
329
+ s.style.top = v.getBoundingClientRect().y + v.offsetHeight + "px", v.getBoundingClientRect().y - s.getBoundingClientRect().y != -v.offsetHeight && (s.style.top = parseInt(s.style.top.substring(0, s.style.top.length - 2)) + (v.getBoundingClientRect().y - s.getBoundingClientRect().y) + v.offsetHeight + "px"), s.style.left = v.getBoundingClientRect().x - (o.right ? 100 : 0) + "px";
330
+ }, d = y(null), m = y(null), p = y(0);
331
+ return (v, s) => (i(), a("div", {
295
332
  class: "d-flex",
296
- id: g.id
333
+ id: v.id
297
334
  }, [
298
- d("button", {
335
+ r("button", {
299
336
  ref_key: "DropDownTriggerButton",
300
- ref: r,
337
+ ref: d,
301
338
  class: "btn btn-outline-secondary",
302
339
  type: "button",
303
- onClick: i[0] || (i[0] = (c) => e())
340
+ onClick: s[0] || (s[0] = (u) => t())
304
341
  }, [
305
- g.label ? (s(), a("span", Be, C(g.label), 1)) : m("", !0),
306
- g.icon ? (s(), a("span", Te, [
307
- d("i", {
308
- class: L(g.icon)
342
+ v.label ? (i(), a("span", Fe, w(v.label), 1)) : g("", !0),
343
+ v.icon ? (i(), a("span", Me, [
344
+ r("i", {
345
+ class: x(v.icon)
309
346
  }, null, 2)
310
- ])) : m("", !0)
347
+ ])) : g("", !0)
311
348
  ], 512),
312
- t.value ? (s(), a("div", {
349
+ e.value ? (i(), a("div", {
313
350
  key: 0,
314
351
  class: "ddm-menu",
315
352
  ref_key: "DropDownMenu",
316
- ref: f,
317
- style: j({ "margin-top": v.value + "px" })
353
+ ref: m,
354
+ style: G({ "margin-top": p.value + "px" })
318
355
  }, [
319
- (s(!0), a(_, null, $(g.options, (c) => (s(), a("div", {
320
- key: c.icon,
356
+ (i(!0), a(C, null, B(v.options, (u) => (i(), a("div", {
357
+ key: u.icon,
321
358
  class: "ddm-item",
322
- onClick: (n) => c.command(g.item)
359
+ onClick: (n) => u.command(v.item)
323
360
  }, [
324
- d("i", {
325
- class: L(c.icon)
361
+ r("i", {
362
+ class: x(u.icon)
326
363
  }, null, 2),
327
- N(C(c.label), 1)
328
- ], 8, Ie))), 128))
329
- ], 4)) : m("", !0)
330
- ], 8, De));
364
+ N(w(u.label), 1)
365
+ ], 8, He))), 128))
366
+ ], 4)) : g("", !0)
367
+ ], 8, Re));
331
368
  }
332
- }), Se = { class: "fltrc-container" }, Le = { class: "fltrc-container" }, xe = ["placeholder", "value"], Fe = {
369
+ }), ze = { class: "fltrc-container" }, Pe = { class: "fltrc-container" }, Oe = ["placeholder", "value"], je = {
333
370
  key: 1,
334
371
  class: "d-flex flex-row input-group align-items-center"
335
- }, Me = ["value"], Ee = ["value"], q = /* @__PURE__ */ w({
372
+ }, Ae = ["value"], Ne = ["value"], te = /* @__PURE__ */ D({
336
373
  __name: "FilterCompact",
337
374
  props: {
338
375
  items: {}
339
376
  },
340
- setup(p) {
341
- const l = p, t = y(0), e = y(0), o = F(() => l.items[t.value].filter), r = (c) => {
342
- let n = l.items[e.value];
343
- n.filter.filtered(n.filter.key, ""), t.value = c, e.value = c, i.value += 1;
344
- }, f = y(void 0);
345
- M(() => {
346
- let c = [];
347
- for (let n = 0; n < l.items.length; n++)
348
- c.push({
349
- icon: l.items[n].icon,
350
- label: l.items[n].label,
351
- command: () => r(n)
377
+ setup(f) {
378
+ const o = f, e = y(0), t = y(0), l = H(() => o.items[e.value].filter), d = (u) => {
379
+ let n = o.items[t.value];
380
+ n.filter.filtered(n.filter.key, ""), e.value = u, t.value = u, s.value += 1;
381
+ }, m = y(void 0);
382
+ z(() => {
383
+ let u = [];
384
+ for (let n = 0; n < o.items.length; n++)
385
+ u.push({
386
+ icon: o.items[n].icon,
387
+ label: o.items[n].label,
388
+ command: () => d(n)
352
389
  });
353
- f.value = c;
390
+ m.value = u;
354
391
  });
355
- const v = y({}), g = y(void 0), i = y(0);
356
- return (c, n) => (s(), a("div", Se, [
357
- f.value ? (s(), B(G, {
392
+ const p = y({}), v = y(void 0), s = y(0);
393
+ return (u, n) => (i(), a("div", ze, [
394
+ m.value ? (i(), E(U, {
358
395
  key: 0,
359
396
  id: "ddm",
360
- icon: c.items[t.value].icon,
361
- item: c.items[t.value],
397
+ icon: u.items[e.value].icon,
398
+ item: u.items[e.value],
362
399
  label: "",
363
- options: f.value
364
- }, null, 8, ["icon", "item", "options"])) : m("", !0),
365
- d("div", Le, [
366
- o.value.type == "text" ? (s(), a("input", {
400
+ options: m.value
401
+ }, null, 8, ["icon", "item", "options"])) : g("", !0),
402
+ r("div", Pe, [
403
+ l.value.type == "text" ? (i(), a("input", {
367
404
  key: 0,
368
405
  type: "text",
369
406
  class: "form-control",
370
- placeholder: o.value.placeholder,
371
- value: o.value.defaultv ?? "",
372
- onInput: n[0] || (n[0] = (u) => {
373
- o.value.filtered(
374
- o.value.key,
375
- u.target.value
376
- ), o.value.defaultv = u.target.value;
407
+ placeholder: l.value.placeholder,
408
+ value: l.value.defaultv ?? "",
409
+ onInput: n[0] || (n[0] = (c) => {
410
+ l.value.filtered(l.value.key, c.target.value), l.value.defaultv = c.target.value;
377
411
  })
378
- }, null, 40, xe)) : m("", !0),
379
- o.value.type == "date" ? (s(), a("div", Fe, [
380
- d("input", {
412
+ }, null, 40, Oe)) : g("", !0),
413
+ l.value.type == "date" ? (i(), a("div", je, [
414
+ r("input", {
381
415
  type: "date",
382
416
  class: "form-control",
383
- value: o.value.defFrom ?? "",
384
- onInput: n[1] || (n[1] = (u) => {
385
- v.value.from = u.target.value == "" ? null : u.target.value, o.value.defFrom = u.target.value == "" ? null : u.target.value, o.value.filtered(o.value.key, v.value);
417
+ value: l.value.defFrom ?? "",
418
+ onInput: n[1] || (n[1] = (c) => {
419
+ p.value.from = c.target.value == "" ? null : c.target.value, l.value.defFrom = c.target.value == "" ? null : c.target.value, l.value.filtered(l.value.key, p.value);
386
420
  })
387
- }, null, 40, Me),
388
- n[5] || (n[5] = d("span", { class: "input-group-text" }, "-", -1)),
389
- d("input", {
421
+ }, null, 40, Ae),
422
+ n[5] || (n[5] = r("span", { class: "input-group-text" }, "-", -1)),
423
+ r("input", {
390
424
  type: "date",
391
425
  class: "form-control",
392
- value: o.value.defTill ?? "",
393
- onInput: n[2] || (n[2] = (u) => {
394
- v.value.untill = u.target.value == "" ? null : u.target.value, o.value.defTill = u.target.value == "" ? null : u.target.value, o.value.filtered(o.value.key, v.value);
426
+ value: l.value.defTil ?? "",
427
+ onInput: n[2] || (n[2] = (c) => {
428
+ p.value.until = c.target.value == "" ? null : c.target.value, l.value.defTil = c.target.value == "" ? null : c.target.value, l.value.filtered(l.value.key, p.value);
395
429
  })
396
- }, null, 40, Ee)
397
- ])) : m("", !0),
398
- o.value.type == "dropdown" ? (s(), B(O, {
399
- key: i.value,
400
- selected: g.value,
401
- options: o.value.options,
402
- filterevent: o.value.filterevent,
403
- onFiltered: n[3] || (n[3] = (u) => {
404
- o.value.onfiltered && o.value.onfiltered(u);
430
+ }, null, 40, Ne)
431
+ ])) : g("", !0),
432
+ l.value.type == "dropdown" ? (i(), E(K, {
433
+ key: s.value,
434
+ selected: v.value,
435
+ options: l.value.options,
436
+ filterevent: l.value.filterevent,
437
+ onFiltered: n[3] || (n[3] = (c) => {
438
+ l.value.onfiltered && l.value.onfiltered(c);
405
439
  }),
406
- id: o.value.key,
407
- label: o.value.label,
408
- onSelected: n[4] || (n[4] = (u) => o.value.filtered(o.value.key, u.id))
409
- }, null, 8, ["selected", "options", "filterevent", "id", "label"])) : m("", !0)
440
+ id: l.value.key,
441
+ label: l.value.label,
442
+ onSelected: n[4] || (n[4] = (c) => l.value.filtered(l.value.key, c.id))
443
+ }, null, 8, ["selected", "options", "filterevent", "id", "label"])) : g("", !0)
410
444
  ])
411
445
  ]));
412
446
  }
413
- }), Re = { class: "fltrctrl-container" }, He = ["placeholder", "value"], ze = {
447
+ }), Ve = ["id"], We = ["id"], Ge = { class: "dtrp-label" }, Ke = ["id"], Je = { class: "d-flex flex-column w-100 gap-2" }, Ue = ["id"], qe = ["id"], Qe = "Törlés", Xe = "Beállítás", Ye = /* @__PURE__ */ D({
448
+ __name: "DateRangePicker",
449
+ props: {
450
+ id: {},
451
+ label: {}
452
+ },
453
+ emits: ["changed"],
454
+ setup(f, { emit: o }) {
455
+ const e = f, t = o, l = y(!1), d = async () => {
456
+ l.value = !l.value, l.value && (await p(), O());
457
+ }, m = de({
458
+ top: "0px",
459
+ left: "0px"
460
+ }), p = async () => {
461
+ await ce();
462
+ const k = document.getElementById(`${e.id}-btn`).getBoundingClientRect(), R = document.getElementById(`${e.id}-popup`);
463
+ if (!R) return;
464
+ const S = R.getBoundingClientRect(), F = window.innerWidth;
465
+ m.top = k.top + k.height + "px", k.left < F / 3 ? m.left = k.left + "px" : k.left > 2 * F / 3 ? m.left = k.left + k.width - S.width + "px" : m.left = k.right - k.width / 2 - S.width / 2 + "px";
466
+ };
467
+ let v = "", s = "";
468
+ const u = (I) => {
469
+ v = I;
470
+ }, n = (I) => {
471
+ s = I;
472
+ }, c = y(""), b = async () => {
473
+ v != "" || s != "" ? c.value = `'${v}'-'${s}'` : c.value = e.label, await p();
474
+ };
475
+ z(() => {
476
+ b(), window.addEventListener("click", (I) => {
477
+ const k = document.getElementById(`${e.id}`);
478
+ k && !k.contains(I.target) && (l.value = !1);
479
+ });
480
+ });
481
+ const $ = () => {
482
+ s = "", v = "", b(), O(), l.value = !1, t("changed", { from: v == "" ? null : v, to: s == "" ? null : s });
483
+ }, P = () => {
484
+ b(), l.value = !1, t("changed", { from: v == "" ? null : v, to: s == "" ? null : s });
485
+ }, O = () => {
486
+ document.getElementById(`${e.id}-from`).value = v, document.getElementById(`${e.id}-to`).value = s;
487
+ };
488
+ return (I, k) => (i(), a("div", {
489
+ id: I.id,
490
+ class: "dtrp-flex"
491
+ }, [
492
+ r("button", {
493
+ id: I.id + "-btn",
494
+ class: "btn btn-outline-secondary dtrp-flex dtrp-button",
495
+ type: "button",
496
+ onClick: d
497
+ }, [
498
+ r("div", Ge, w(c.value), 1)
499
+ ], 8, We),
500
+ l.value ? (i(), a("div", {
501
+ key: 0,
502
+ id: I.id + "-popup",
503
+ class: "dtrp-popup d-flex",
504
+ style: G(m)
505
+ }, [
506
+ r("div", Je, [
507
+ k[2] || (k[2] = N(" Ettől ")),
508
+ r("input", {
509
+ id: I.id + "-from",
510
+ type: "date",
511
+ class: "form-control",
512
+ onChange: k[0] || (k[0] = (R) => u(R.target.value))
513
+ }, null, 40, Ue),
514
+ k[3] || (k[3] = N(" Eddig ")),
515
+ r("input", {
516
+ id: I.id + "-to",
517
+ type: "date",
518
+ class: "form-control",
519
+ onChange: k[1] || (k[1] = (R) => n(R.target.value))
520
+ }, null, 40, qe),
521
+ r("div", { class: "d-flex w-100 gap-2" }, [
522
+ r("button", {
523
+ class: "btn btn-outline-secondary w-50",
524
+ onClick: $
525
+ }, w(Qe)),
526
+ r("button", {
527
+ class: "btn btn-outline-primary w-50",
528
+ onClick: P
529
+ }, w(Xe))
530
+ ])
531
+ ])
532
+ ], 12, Ke)) : g("", !0)
533
+ ], 8, Ve));
534
+ }
535
+ }), Ze = { class: "fltrctrl-container" }, et = ["placeholder", "value"], tt = {
414
536
  key: 1,
415
537
  class: "d-flex flex-row input-group align-items-center"
416
- }, Ne = ["value"], Oe = ["value"];
417
- class Gt {
418
- constructor(l, t, e) {
419
- x(this, "type");
420
- this.key = l, this.placeholder = t, this.filtered = e, this.type = "text";
538
+ };
539
+ class sl {
540
+ constructor(o, e, t) {
541
+ M(this, "type");
542
+ this.key = o, this.placeholder = e, this.filtered = t, this.type = "text";
421
543
  }
422
544
  }
423
- class Wt {
424
- constructor(l, t, e, o, r, f) {
425
- x(this, "type");
426
- this.key = l, this.label = t, this.options = e, this.filterevent = o, this.onfiltered = r, this.filtered = f, this.type = "dropdown";
545
+ class il {
546
+ constructor(o, e, t, l, d, m) {
547
+ M(this, "type");
548
+ this.key = o, this.label = e, this.options = t, this.filterevent = l, this.onfiltered = d, this.filtered = m, this.type = "dropdown";
427
549
  }
428
550
  }
429
- class At {
430
- constructor(l, t, e, o, r) {
431
- x(this, "type");
432
- this.key = l, this.label = t, this.filtered = e, this.defFrom = o, this.defTill = r, this.type = "date";
551
+ class al {
552
+ constructor(o, e, t, l, d) {
553
+ M(this, "type");
554
+ this.key = o, this.label = e, this.filtered = t, this.defFrom = l, this.defTil = d, this.type = "date";
433
555
  }
434
556
  }
435
- const R = y({}), Q = /* @__PURE__ */ w({
557
+ const J = y({}), le = /* @__PURE__ */ D({
436
558
  __name: "FilterControl",
437
559
  props: {
438
560
  item: {}
439
561
  },
440
- setup(p) {
441
- const l = p;
442
- M(() => {
443
- var e;
444
- if (l.item.type == "dropdown") {
445
- const o = l.item;
446
- t.value = (e = o.options.value.find(
447
- (r) => r.id == l.item.defaultv
448
- )) == null ? void 0 : e.id;
562
+ setup(f) {
563
+ const o = f;
564
+ z(() => {
565
+ var t;
566
+ if (o.item.type == "dropdown") {
567
+ const l = o.item;
568
+ e.value = (t = l.options.value.find((d) => d.id == o.item.defaultv)) == null ? void 0 : t.id;
449
569
  }
450
570
  });
451
- const t = y(void 0);
452
- return (e, o) => (s(), a("div", Re, [
453
- e.item.type == "text" ? (s(), a("input", {
571
+ const e = y(void 0);
572
+ return (t, l) => (i(), a("div", Ze, [
573
+ t.item.type == "text" ? (i(), a("input", {
454
574
  key: 0,
455
575
  type: "text",
456
576
  class: "form-control",
457
- placeholder: e.item.placeholder,
458
- value: e.item.defaultv ?? "",
459
- onInput: o[0] || (o[0] = (r) => e.item.filtered(e.item.key, r.target.value))
460
- }, null, 40, He)) : m("", !0),
461
- e.item.type == "date" ? (s(), a("div", ze, [
462
- d("input", {
463
- type: "date",
464
- class: "form-control",
465
- value: e.item.defFrom ?? "",
466
- onInput: o[1] || (o[1] = (r) => {
467
- R.value.from = r.target.value == "" ? null : r.target.value, e.item.filtered(e.item.key, R.value);
577
+ placeholder: t.item.placeholder,
578
+ value: t.item.defaultv ?? "",
579
+ onInput: l[0] || (l[0] = (d) => t.item.filtered(t.item.key, d.target.value))
580
+ }, null, 40, et)) : g("", !0),
581
+ t.item.type == "date" ? (i(), a("div", tt, [
582
+ A(Ye, {
583
+ id: t.item.key + "-dtrp",
584
+ label: t.item.label,
585
+ onChanged: l[1] || (l[1] = (d) => {
586
+ J.value.from = d.from, J.value.until = d.to, t.item.filtered(t.item.key, J.value);
468
587
  })
469
- }, null, 40, Ne),
470
- o[5] || (o[5] = d("span", { class: "input-group-text" }, "-", -1)),
471
- d("input", {
472
- type: "date",
473
- class: "form-control",
474
- value: e.item.defTill ?? "",
475
- onInput: o[2] || (o[2] = (r) => {
476
- R.value.untill = r.target.value == "" ? null : r.target.value, e.item.filtered(e.item.key, R.value);
477
- })
478
- }, null, 40, Oe)
479
- ])) : m("", !0),
480
- e.item.type == "dropdown" ? (s(), B(O, {
588
+ }, null, 8, ["id", "label"])
589
+ ])) : g("", !0),
590
+ t.item.type == "dropdown" ? (i(), E(K, {
481
591
  key: 2,
482
- selected: t.value,
483
- options: y(e.item.options),
484
- filterevent: e.item.filterevent,
485
- onFiltered: o[3] || (o[3] = (r) => {
486
- e.item.onfiltered && e.item.onfiltered(r);
592
+ selected: e.value,
593
+ options: y(t.item.options),
594
+ filterevent: t.item.filterevent,
595
+ onFiltered: l[2] || (l[2] = (d) => {
596
+ t.item.onfiltered && t.item.onfiltered(d);
487
597
  }),
488
- id: e.item.key,
489
- label: e.item.label,
490
- onSelected: o[4] || (o[4] = (r) => e.item.filtered(e.item.key, r.id))
491
- }, null, 8, ["selected", "options", "filterevent", "id", "label"])) : m("", !0)
598
+ id: t.item.key,
599
+ label: t.item.label,
600
+ onSelected: l[3] || (l[3] = (d) => t.item.filtered(t.item.key, d.id))
601
+ }, null, 8, ["selected", "options", "filterevent", "id", "label"])) : g("", !0)
492
602
  ]));
493
603
  }
494
- }), W = /* @__PURE__ */ w({
604
+ }), q = /* @__PURE__ */ D({
495
605
  __name: "IconButton",
496
606
  props: {
497
607
  icon: {},
@@ -499,81 +609,81 @@ const R = y({}), Q = /* @__PURE__ */ w({
499
609
  big: { type: Boolean }
500
610
  },
501
611
  emits: ["click"],
502
- setup(p, { emit: l }) {
503
- const t = p, e = F(
504
- () => `${t.icon} ${t.big ? "ib-button-big" : ""}`
505
- ), o = l;
506
- return (r, f) => (s(), a("div", {
507
- onClick: f[0] || (f[0] = (v) => o("click")),
612
+ setup(f, { emit: o }) {
613
+ const e = f, t = H(
614
+ () => `${e.icon} ${e.big ? "ib-button-big" : ""}`
615
+ ), l = o;
616
+ return (d, m) => (i(), a("div", {
617
+ onClick: m[0] || (m[0] = (p) => l("click")),
508
618
  class: "ib-container"
509
619
  }, [
510
- d("div", {
511
- class: L(["ib-button", { "ib-button-active": r.active }])
620
+ r("div", {
621
+ class: x(["ib-button", { "ib-button-active": d.active }])
512
622
  }, [
513
- d("i", {
514
- class: L(e.value)
623
+ r("i", {
624
+ class: x(t.value)
515
625
  }, null, 2)
516
626
  ], 2)
517
627
  ]));
518
628
  }
519
- }), Pe = { class: "pc-container" }, je = ["value", "max"], X = /* @__PURE__ */ w({
629
+ }), lt = { class: "pc-container" }, ot = ["value", "max"], oe = /* @__PURE__ */ D({
520
630
  __name: "PaginatorControl",
521
631
  props: {
522
632
  settings: {}
523
633
  },
524
634
  emits: ["pagesize", "page"],
525
- setup(p, { emit: l }) {
526
- const t = p, e = l, o = () => {
527
- let i = y([]);
528
- return t.settings.value.sizes.forEach(
529
- (c) => i.value.push({ label: c.toString(), id: c.toString() })
530
- ), i;
531
- }, r = y(1);
532
- H(
533
- () => t.settings.value,
635
+ setup(f, { emit: o }) {
636
+ const e = f, t = o, l = () => {
637
+ let s = y([]);
638
+ return e.settings.value.sizes.forEach(
639
+ (u) => s.value.push({ label: u.toString(), id: u.toString() })
640
+ ), s;
641
+ }, d = y(1);
642
+ V(
643
+ () => e.settings.value,
534
644
  () => {
535
- r.value = 1;
645
+ d.value = 1;
536
646
  }
537
647
  );
538
- const f = F(
539
- () => Math.floor(t.settings.value.total / t.settings.value.pagesize) + 1
540
- ), v = () => {
541
- r.value > 1 && (r.value -= 1, e("page", r.value));
542
- }, g = () => {
543
- r.value < f.value && (r.value += 1, e("page", r.value));
648
+ const m = H(
649
+ () => Math.floor(e.settings.value.total / e.settings.value.pagesize) + 1
650
+ ), p = () => {
651
+ d.value > 1 && (d.value -= 1, t("page", d.value));
652
+ }, v = () => {
653
+ d.value < m.value && (d.value += 1, t("page", d.value));
544
654
  };
545
- return (i, c) => (s(), a("div", Pe, [
546
- d("button", {
655
+ return (s, u) => (i(), a("div", lt, [
656
+ r("button", {
547
657
  class: "btn btn-outline-secondary",
548
- onClick: v
658
+ onClick: p
549
659
  }, "<"),
550
- d("input", {
660
+ r("input", {
551
661
  class: "form-control pc-input",
552
662
  type: "number",
553
- value: r.value,
663
+ value: d.value,
554
664
  min: "1",
555
- max: f.value,
556
- onChange: c[0] || (c[0] = (n) => i.$emit("page", n.target.value))
557
- }, null, 40, je),
558
- N("/" + C(f.value) + " ", 1),
559
- d("button", {
665
+ max: m.value,
666
+ onChange: u[0] || (u[0] = (n) => s.$emit("page", n.target.value))
667
+ }, null, 40, ot),
668
+ N("/" + w(m.value) + " ", 1),
669
+ r("button", {
560
670
  class: "btn btn-outline-secondary",
561
- onClick: g
671
+ onClick: v
562
672
  }, ">"),
563
- z(O, {
673
+ A(K, {
564
674
  opentop: !0,
565
675
  class: "pc-dropdown",
566
676
  id: "pagecount",
567
677
  label: "10",
568
- selected: i.settings.value.pagesize.toString(),
569
- options: o(),
570
- onSelected: c[1] || (c[1] = (n) => {
571
- r.value = 1, i.$emit("pagesize", parseInt(n.id));
678
+ selected: s.settings.value.pagesize.toString(),
679
+ options: l(),
680
+ onSelected: u[1] || (u[1] = (n) => {
681
+ d.value = 1, s.$emit("pagesize", parseInt(n.id));
572
682
  })
573
683
  }, null, 8, ["selected", "options"])
574
684
  ]));
575
685
  }
576
- }), Ve = { class: "form-check" }, Ge = ["name", "id", "checked"], We = ["for"], Y = /* @__PURE__ */ w({
686
+ }), nt = { class: "form-check" }, st = ["name", "id", "checked"], it = ["for"], ne = /* @__PURE__ */ D({
577
687
  __name: "RadioButton",
578
688
  props: {
579
689
  group: {},
@@ -582,188 +692,183 @@ const R = y({}), Q = /* @__PURE__ */ w({
582
692
  selected: { type: Boolean }
583
693
  },
584
694
  emits: ["selected"],
585
- setup(p) {
586
- return (l, t) => (s(), a("div", Ve, [
587
- d("input", {
695
+ setup(f) {
696
+ return (o, e) => (i(), a("div", nt, [
697
+ r("input", {
588
698
  class: "form-check-input",
589
699
  type: "radio",
590
- name: l.group,
591
- id: l.id,
592
- checked: l.selected,
593
- onChange: t[0] || (t[0] = (e) => l.$emit("selected", l.id))
594
- }, null, 40, Ge),
595
- d("label", {
700
+ name: o.group,
701
+ id: o.id,
702
+ checked: o.selected,
703
+ onChange: e[0] || (e[0] = (t) => o.$emit("selected", o.id))
704
+ }, null, 40, st),
705
+ r("label", {
596
706
  class: "form-check-label",
597
- for: l.id
598
- }, C(l.label), 9, We)
707
+ for: o.id
708
+ }, w(o.label), 9, it)
599
709
  ]));
600
710
  }
601
- }), Ae = { class: "d-flex flex-column gap-2 justify-content-around" }, Je = /* @__PURE__ */ w({
711
+ }), at = { class: "d-flex flex-column gap-2 justify-content-around" }, rt = /* @__PURE__ */ D({
602
712
  __name: "RadioButtonGroup",
603
713
  props: {
604
714
  group: {},
605
715
  items: {}
606
716
  },
607
717
  emits: ["selected"],
608
- setup(p) {
609
- return (l, t) => (s(), a("div", Ae, [
610
- (s(!0), a(_, null, $(l.items, (e) => (s(), B(Y, {
611
- key: e.id,
612
- id: e.id,
613
- label: e.label,
614
- group: l.group,
615
- selected: e.selected,
616
- onSelected: t[0] || (t[0] = (o) => l.$emit("selected", o))
718
+ setup(f) {
719
+ return (o, e) => (i(), a("div", at, [
720
+ (i(!0), a(C, null, B(o.items, (t) => (i(), E(ne, {
721
+ key: t.id,
722
+ id: t.id,
723
+ label: t.label,
724
+ group: o.group,
725
+ selected: t.selected,
726
+ onSelected: e[0] || (e[0] = (l) => o.$emit("selected", l))
617
727
  }, null, 8, ["id", "label", "group", "selected"]))), 128))
618
728
  ]));
619
729
  }
620
- }), Ke = {
730
+ }), dt = {
621
731
  key: 0,
622
732
  class: "spinner-border",
623
733
  role: "status"
624
- }, Ue = /* @__PURE__ */ w({
734
+ }, ct = /* @__PURE__ */ D({
625
735
  __name: "SpinningProgress",
626
736
  props: {
627
737
  loading: { type: Boolean }
628
738
  },
629
- setup(p) {
630
- return (l, t) => l.loading ? (s(), a("div", Ke, t[0] || (t[0] = [
631
- d("span", { class: "visually-hidden" }, "Loading...", -1)
632
- ]))) : m("", !0);
739
+ setup(f) {
740
+ return (o, e) => o.loading ? (i(), a("div", dt, e[0] || (e[0] = [
741
+ r("span", { class: "visually-hidden" }, "Loading...", -1)
742
+ ]))) : g("", !0);
633
743
  }
634
- }), qe = { class: "t2l-table-view t2l-table-header-label" }, Qe = {
744
+ }), ut = {
745
+ key: 0,
746
+ class: "t2l-table-view t2l-table-header-label"
747
+ }, pt = {
635
748
  key: 0,
636
749
  class: "t2l-select"
637
- }, Xe = {
750
+ }, vt = {
638
751
  key: 1,
639
752
  class: "t2l-cell"
640
- }, Ye = { class: "t2l-table-view t2l-table-header-filter" }, Ze = {
753
+ }, ft = { class: "t2l-table-view t2l-table-header-filter" }, mt = {
641
754
  key: 0,
642
755
  class: "t2l-select"
643
- }, et = {
756
+ }, gt = {
644
757
  key: 1,
645
758
  class: "t2l-cell"
646
- }, tt = { class: "t2l-table-view t2l-rows" }, lt = {
759
+ }, yt = { class: "t2l-table-view t2l-rows" }, bt = {
647
760
  key: 0,
648
761
  class: "t2l-select"
649
- }, ot = ["id", "onChange"], nt = ["innerHTML"], st = {
762
+ }, ht = ["id", "onChange"], kt = ["innerHTML"], _t = {
650
763
  key: 1,
651
764
  class: "t2l-cell t2l-actions"
652
- }, it = ["title", "disabled", "onClick"], at = { class: "t2l-card-view t2l-card-filters" }, rt = { class: "t2l-card-filter-order" }, dt = { class: "t2l-card-filter-search" }, ut = { class: "t2l-card-view t2l-rows" }, ct = {
765
+ }, $t = ["title", "disabled", "onClick"], wt = { class: "t2l-card-view t2l-card-filters" }, Ct = { class: "t2l-card-filter-order" }, Dt = { class: "t2l-card-filter-search" }, Bt = { class: "t2l-card-view t2l-rows" }, Tt = {
653
766
  key: 0,
654
767
  class: "t2l-card-select"
655
- }, pt = ["id", "onChange"], vt = {
768
+ }, It = ["id", "onChange"], St = {
656
769
  key: 0,
657
770
  class: "t2l-property"
658
- }, ft = { class: "t2l-label" }, gt = ["innerHTML"], mt = { class: "d-flex align-items-center" }, yt = {
659
- key: 1,
771
+ }, Et = { class: "t2l-label" }, Lt = ["innerHTML"], xt = { class: "d-flex align-items-center" }, Rt = {
772
+ key: 2,
660
773
  class: "d-flex justify-content-center t2l-footer"
661
- }, bt = /* @__PURE__ */ w({
774
+ }, Ft = /* @__PURE__ */ D({
662
775
  __name: "TableToList",
663
776
  props: {
664
777
  items: {},
665
778
  config: {}
666
779
  },
667
780
  emits: ["pagesize", "page"],
668
- setup(p) {
669
- const l = p, t = F(
670
- () => l.config.columns.filter((i) => i.visible != !1)
671
- ), e = F(
672
- () => l.config.columns.filter((i) => i.visible != !1 && i.filter)
673
- ), o = F(
674
- () => t.value.filter(
675
- (i) => i.sort && i.sort.active && i.sort.active.value
676
- )
677
- ), r = F(() => Math.ceil(t.value.length / l.config.smColCount)), f = (i, c) => {
678
- var n = i - 1 + (c - 1) * r.value;
679
- return n < t.value.length ? t.value[n] : null;
680
- }, v = (i, c) => i.converter ? i.converter(c[i.property], c) : c[i.property], g = (i) => {
681
- if (i.sort && i.sort.active) {
682
- let c = !i.sort.active.value;
683
- l.config.columns.forEach((n) => {
781
+ setup(f) {
782
+ const o = f, e = H(() => o.config.columns.filter((s) => s.visible != !1)), t = H(() => o.config.columns.filter((s) => s.visible != !1 && s.filter)), l = H(() => e.value.filter((s) => s.sort && s.sort.active && s.sort.active.value)), d = H(() => Math.ceil(e.value.length / o.config.smColCount)), m = (s, u) => {
783
+ var n = s - 1 + (u - 1) * d.value;
784
+ return n < e.value.length ? e.value[n] : null;
785
+ }, p = (s, u) => s.converter ? s.converter(u[s.property], u) : u[s.property], v = (s) => {
786
+ if (s.sort && s.sort.active) {
787
+ let u = !s.sort.active.value;
788
+ o.config.columns.forEach((n) => {
684
789
  n.sort && n.sort.active && (n.sort.active.value = !1);
685
- }), i.sort.active.value = c, i.sort.callback(c ? i.property : "");
790
+ }), s.sort.active.value = u, s.sort.callback(u ? s.property : "");
686
791
  }
687
792
  };
688
- return (i, c) => (s(), a(_, null, [
689
- d("div", qe, [
690
- i.config.selectableId ? (s(), a("span", Qe)) : m("", !0),
691
- (s(!0), a(_, null, $(t.value, (n) => {
692
- var u, b;
693
- return s(), a("span", {
793
+ return (s, u) => (i(), a(C, null, [
794
+ s.config.compact ? g("", !0) : (i(), a("div", ut, [
795
+ s.config.selectableId ? (i(), a("span", pt)) : g("", !0),
796
+ (i(!0), a(C, null, B(e.value, (n) => {
797
+ var c, b;
798
+ return i(), a("span", {
694
799
  class: "t2l-cell",
695
800
  key: n.property
696
801
  }, [
697
- n.sort ? (s(), B(W, {
802
+ n.sort ? (i(), E(q, {
698
803
  key: 0,
699
804
  icon: n.sort.icon,
700
- onClick: (D) => g(n),
701
- active: (b = (u = n.sort) == null ? void 0 : u.active) == null ? void 0 : b.value
702
- }, null, 8, ["icon", "onClick", "active"])) : m("", !0),
703
- N(" " + C(n.label), 1)
805
+ onClick: ($) => v(n),
806
+ active: (b = (c = n.sort) == null ? void 0 : c.active) == null ? void 0 : b.value
807
+ }, null, 8, ["icon", "onClick", "active"])) : g("", !0),
808
+ N(" " + w(n.label), 1)
704
809
  ]);
705
810
  }), 128)),
706
- i.config.actionHeader ? (s(), a("span", Xe, C(i.config.actionHeader), 1)) : m("", !0)
707
- ]),
708
- d("div", Ye, [
709
- i.config.selectableId ? (s(), a("span", Ze)) : m("", !0),
710
- (s(!0), a(_, null, $(t.value, (n) => (s(), a("span", {
811
+ s.config.actionHeader ? (i(), a("span", vt, w(s.config.actionHeader), 1)) : g("", !0)
812
+ ])),
813
+ r("div", ft, [
814
+ s.config.selectableId ? (i(), a("span", mt)) : g("", !0),
815
+ (i(!0), a(C, null, B(e.value, (n) => (i(), a("span", {
711
816
  class: "t2l-cell",
712
817
  key: n.label
713
818
  }, [
714
- n.filter ? (s(), B(Q, {
819
+ n.filter ? (i(), E(le, {
715
820
  key: 0,
716
821
  item: n.filter
717
- }, null, 8, ["item"])) : m("", !0)
822
+ }, null, 8, ["item"])) : g("", !0)
718
823
  ]))), 128)),
719
- i.config.actionHeader ? (s(), a("span", et)) : m("", !0)
824
+ s.config.actionHeader ? (i(), a("span", gt)) : g("", !0)
720
825
  ]),
721
- d("div", tt, [
722
- (s(!0), a(_, null, $(i.items, (n) => (s(), a("div", {
826
+ r("div", yt, [
827
+ (i(!0), a(C, null, B(s.items, (n) => (i(), a("div", {
723
828
  key: n,
724
829
  class: "t2l-row"
725
830
  }, [
726
- i.config.selectableId ? (s(), a("div", lt, [
727
- d("input", {
831
+ s.config.selectableId ? (i(), a("div", bt, [
832
+ r("input", {
728
833
  class: "form-check-input",
729
834
  type: "checkbox",
730
- id: n[i.config.selectableId],
731
- onChange: (u) => n.selected = !n.selected
732
- }, null, 40, ot)
733
- ])) : m("", !0),
734
- (s(!0), a(_, null, $(t.value, (u) => (s(), a("div", {
835
+ id: n[s.config.selectableId],
836
+ onChange: (c) => n.selected = !n.selected
837
+ }, null, 40, ht)
838
+ ])) : g("", !0),
839
+ (i(!0), a(C, null, B(e.value, (c) => (i(), a("div", {
735
840
  class: "t2l-cell",
736
- key: u.property,
737
- innerHTML: v(u, n)
738
- }, null, 8, nt))), 128)),
739
- i.config.actions ? (s(), a("div", st, [
740
- (s(!0), a(_, null, $(i.config.actions, (u) => (s(), a("button", {
741
- key: u,
841
+ key: c.property,
842
+ innerHTML: p(c, n)
843
+ }, null, 8, kt))), 128)),
844
+ s.config.actions ? (i(), a("div", _t, [
845
+ (i(!0), a(C, null, B(s.config.actions, (c) => (i(), a("button", {
846
+ key: c,
742
847
  type: "button",
743
848
  class: "btn btn-outline-secondary",
744
- title: u.label,
745
- disabled: !u.enabled(n),
746
- onClick: (b) => u.command(n)
849
+ title: c.label,
850
+ disabled: !c.enabled(n),
851
+ onClick: (b) => c.command(n)
747
852
  }, [
748
- d("i", {
749
- class: L(u.icon)
853
+ r("i", {
854
+ class: x(c.icon)
750
855
  }, null, 2)
751
- ], 8, it))), 128))
752
- ])) : m("", !0)
856
+ ], 8, $t))), 128))
857
+ ])) : g("", !0)
753
858
  ]))), 128))
754
859
  ]),
755
- d("div", at, [
756
- d("div", rt, [
757
- z(U, {
860
+ r("div", wt, [
861
+ r("div", Ct, [
862
+ A(ee, {
758
863
  id: "card-filter-order",
759
864
  default: {
760
865
  icon: "fa-solid fa-chevron-down",
761
866
  label: "rendezés"
762
867
  },
763
- selected: o.value.length > 0 ? o.value[0].property : "",
764
- enabled: i.config.sortEnabled,
868
+ selected: l.value.length > 0 ? l.value[0].property : "",
869
+ enabled: s.config.sortEnabled,
765
870
  options: y(
766
- t.value.filter((n) => n.sort).map((n) => ({
871
+ e.value.filter((n) => n.sort).map((n) => ({
767
872
  icon: n.sort.icon,
768
873
  label: n.sort.label,
769
874
  value: n.property,
@@ -772,9 +877,9 @@ const R = y({}), Q = /* @__PURE__ */ w({
772
877
  )
773
878
  }, null, 8, ["selected", "enabled", "options"])
774
879
  ]),
775
- d("div", dt, [
776
- z(q, {
777
- items: e.value.map((n) => ({
880
+ r("div", Dt, [
881
+ A(te, {
882
+ items: t.value.map((n) => ({
778
883
  filter: n.filter,
779
884
  icon: n.filterIcon,
780
885
  label: n.label
@@ -782,333 +887,343 @@ const R = y({}), Q = /* @__PURE__ */ w({
782
887
  }, null, 8, ["items"])
783
888
  ])
784
889
  ]),
785
- d("div", ut, [
786
- (s(!0), a(_, null, $(i.items, (n, u) => (s(), a("div", {
890
+ r("div", Bt, [
891
+ (i(!0), a(C, null, B(s.items, (n, c) => (i(), a("div", {
787
892
  class: "t2l-row",
788
- key: u
893
+ key: c
789
894
  }, [
790
- i.config.selectableId ? (s(), a("div", ct, [
791
- d("input", {
895
+ s.config.selectableId ? (i(), a("div", Tt, [
896
+ r("input", {
792
897
  class: "form-check-input",
793
898
  type: "checkbox",
794
- id: n[i.config.selectableId],
899
+ id: n[s.config.selectableId],
795
900
  onChange: (b) => n.selected = !n.selected
796
- }, null, 40, pt)
797
- ])) : m("", !0),
798
- (s(!0), a(_, null, $(i.config.smColCount, (b) => (s(), a("div", {
901
+ }, null, 40, It)
902
+ ])) : g("", !0),
903
+ (i(!0), a(C, null, B(s.config.smColCount, (b) => (i(), a("div", {
799
904
  class: "t2l-card-col",
800
905
  key: b
801
906
  }, [
802
- (s(!0), a(_, null, $(r.value, (D) => (s(), a(_, { key: D }, [
803
- f(D, b) ? (s(), a("div", vt, [
804
- d("span", ft, C(f(D, b).label), 1),
805
- d("div", {
806
- innerHTML: v(f(D, b), n)
807
- }, null, 8, gt)
808
- ])) : m("", !0)
907
+ (i(!0), a(C, null, B(d.value, ($) => (i(), a(C, { key: $ }, [
908
+ m($, b) ? (i(), a("div", St, [
909
+ r("span", Et, w(m($, b).label), 1),
910
+ r("div", {
911
+ innerHTML: p(m($, b), n)
912
+ }, null, 8, Lt)
913
+ ])) : g("", !0)
809
914
  ], 64))), 128))
810
915
  ]))), 128)),
811
- d("div", mt, [
812
- l.config.actions ? (s(), B(G, {
916
+ r("div", xt, [
917
+ o.config.actions ? (i(), E(U, {
813
918
  key: 0,
814
919
  item: n,
815
- options: l.config.actions,
920
+ options: o.config.actions,
816
921
  label: "...",
817
- id: u.toString(),
922
+ id: c.toString(),
818
923
  right: !0
819
- }, null, 8, ["item", "options", "id"])) : m("", !0)
924
+ }, null, 8, ["item", "options", "id"])) : g("", !0)
820
925
  ])
821
926
  ]))), 128))
822
927
  ]),
823
- i.config.paginatorSettings ? (s(), B(X, {
824
- key: 0,
825
- settings: i.config.paginatorSettings,
826
- onPagesize: c[0] || (c[0] = (n) => i.$emit("pagesize", n)),
827
- onPage: c[1] || (c[1] = (n) => i.$emit("page", n))
828
- }, null, 8, ["settings"])) : m("", !0),
829
- i.config.paginatorSettings ? m("", !0) : (s(), a("div", yt, " Elemek: " + C(l.items.length), 1))
928
+ s.config.paginatorSettings ? (i(), E(oe, {
929
+ key: 1,
930
+ settings: s.config.paginatorSettings,
931
+ onPagesize: u[0] || (u[0] = (n) => s.$emit("pagesize", n)),
932
+ onPage: u[1] || (u[1] = (n) => s.$emit("page", n))
933
+ }, null, 8, ["settings"])) : g("", !0),
934
+ s.config.paginatorSettings ? g("", !0) : (i(), a("div", Rt, " Elemek: " + w(o.items.length), 1))
830
935
  ], 64));
831
936
  }
832
- }), ht = { class: "d-flex flex flex-row" }, kt = {
937
+ }), Mt = { class: "d-flex flex flex-row" }, Ht = {
833
938
  key: 1,
834
939
  class: "d-flex flex-column gap-2 options-body flex-grow-1"
835
- }, _t = { class: "d-flex flex-row" }, Ct = { class: "d-flex align-items-end" }, $t = ["disabled"], wt = /* @__PURE__ */ w({
940
+ }, zt = { class: "d-flex flex-grow-1 flex-column" }, Pt = { class: "d-flex flex-row" }, Ot = { class: "d-flex align-items-end" }, jt = ["disabled"], At = /* @__PURE__ */ D({
836
941
  __name: "TableToListOptions",
837
942
  props: {
838
943
  colCount: {},
839
- options: {}
944
+ options: {},
945
+ config: {}
840
946
  },
841
947
  emits: ["save"],
842
- setup(p, { emit: l }) {
843
- const t = p, e = y([]);
844
- M(() => {
845
- e.value = t.options, c();
948
+ setup(f, { emit: o }) {
949
+ const e = f, t = y([]);
950
+ z(() => {
951
+ t.value = e.options, u();
846
952
  });
847
- const o = F(
848
- () => t.colCount != 0 ? Math.ceil(t.options.length / t.colCount) : 0
849
- ), r = (n, u) => {
850
- var b = t.options[(n - 1) * o.value + u - 1];
953
+ const l = H(() => e.colCount != 0 ? Math.ceil(e.options.length / e.colCount) : 0), d = (n, c) => {
954
+ var b = e.options[(n - 1) * l.value + c - 1];
851
955
  return b;
852
- }, f = () => {
853
- v("save", e.value);
854
- }, v = l, g = y(!1), i = y(!0), c = () => {
855
- i.value = e.value.filter((n) => n.checked).length <= 1;
956
+ }, m = () => {
957
+ p("save", t.value);
958
+ }, p = o, v = y(!1), s = y(!0), u = () => {
959
+ s.value = t.value.filter((n) => n.checked).length <= 1;
856
960
  };
857
- return (n, u) => (s(), a("div", ht, [
858
- g.value ? m("", !0) : (s(), a("div", {
961
+ return (n, c) => (i(), a("div", Mt, [
962
+ v.value ? g("", !0) : (i(), a("div", {
859
963
  key: 0,
860
964
  class: "d-flex flex-row align-items-center gap-2 options-header justify-content-start",
861
- onClick: u[0] || (u[0] = (b) => g.value = !g.value)
862
- }, u[2] || (u[2] = [
863
- d("i", { class: "fa-solid fa-cog" }, null, -1),
864
- d("div", { class: "options-header-label" }, "beállítások", -1)
965
+ onClick: c[0] || (c[0] = (b) => v.value = !v.value)
966
+ }, c[3] || (c[3] = [
967
+ r("i", { class: "fa-solid fa-cog" }, null, -1),
968
+ r("div", { class: "options-header-label" }, "beállítások", -1)
865
969
  ]))),
866
- g.value ? (s(), a("div", kt, [
867
- u[4] || (u[4] = d("div", { class: "options-header-label" }, "Látható oszlopok", -1)),
868
- d("div", _t, [
869
- (s(!0), a(_, null, $(n.colCount, (b) => (s(), a("div", {
970
+ v.value ? (i(), a("div", Ht, [
971
+ c[5] || (c[5] = r("div", { class: "options-header-label" }, "Táblázat tulajdonságai", -1)),
972
+ r("div", zt, [
973
+ A(W, {
974
+ id: "compact",
975
+ label: "Kompakt",
976
+ checked: !!n.config.compact,
977
+ onChanged: c[1] || (c[1] = (b) => n.config.compact = b.checked)
978
+ }, null, 8, ["checked"])
979
+ ]),
980
+ c[6] || (c[6] = r("div", { class: "options-header-label" }, "Látható oszlopok", -1)),
981
+ r("div", Pt, [
982
+ (i(!0), a(C, null, B(n.colCount, (b) => (i(), a("div", {
870
983
  class: "d-flex flex-grow-1 flex-column",
871
984
  key: b
872
985
  }, [
873
- (s(!0), a(_, null, $(o.value, (D) => (s(), a(_, { key: D }, [
874
- r(b, D) ? (s(), B(V, {
986
+ (i(!0), a(C, null, B(l.value, ($) => (i(), a(C, { key: $ }, [
987
+ d(b, $) ? (i(), E(W, {
875
988
  key: 0,
876
- id: r(b, D).property,
877
- label: r(b, D).label,
878
- checked: r(b, D).checked,
879
- onChanged: u[1] || (u[1] = (E) => {
880
- e.value.find(
881
- (S) => S.property == E.id
882
- ).checked = E.checked, c();
989
+ id: d(b, $).property,
990
+ label: d(b, $).label,
991
+ checked: d(b, $).checked,
992
+ onChanged: c[2] || (c[2] = (P) => {
993
+ t.value.find((O) => O.property == P.id).checked = P.checked, u();
883
994
  })
884
- }, null, 8, ["id", "label", "checked"])) : m("", !0)
995
+ }, null, 8, ["id", "label", "checked"])) : g("", !0)
885
996
  ], 64))), 128))
886
997
  ]))), 128)),
887
- d("div", Ct, [
888
- d("button", {
998
+ r("div", Ot, [
999
+ r("button", {
889
1000
  class: "btn btn-outline-secondary",
890
1001
  type: "button",
891
- onClick: f,
892
- disabled: i.value
893
- }, u[3] || (u[3] = [
894
- d("i", { class: "fa-solid fa-save" }, null, -1)
895
- ]), 8, $t)
1002
+ onClick: m,
1003
+ disabled: s.value
1004
+ }, c[4] || (c[4] = [
1005
+ r("i", { class: "fa-solid fa-save" }, null, -1)
1006
+ ]), 8, jt)
896
1007
  ])
897
1008
  ])
898
- ])) : m("", !0)
1009
+ ])) : g("", !0)
899
1010
  ]));
900
1011
  }
901
- }), Dt = { class: "tlb-container d-flex flex-column flex-grow-1" }, Bt = { class: "d-flex flex-row tlb-item" }, Tt = { class: "d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item" }, It = ["id"], St = {
1012
+ }), Nt = { class: "tlb-container d-flex flex-column flex-grow-1" }, Vt = { class: "d-flex flex-row tlb-item" }, Wt = { class: "d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item" }, Gt = ["id"], Kt = {
902
1013
  key: 0,
903
1014
  class: "d-flex id"
904
- }, Lt = { class: "d-flex flex-row align-items-center tlb-children-container" }, xt = /* @__PURE__ */ w({
1015
+ }, Jt = { class: "d-flex flex-row align-items-center tlb-children-container" }, Ut = /* @__PURE__ */ D({
905
1016
  __name: "TextListBox",
906
1017
  props: {
907
1018
  items: {}
908
1019
  },
909
1020
  emits: ["deleted"],
910
- setup(p) {
911
- return (l, t) => {
912
- const e = K("TextListBox", !0);
913
- return s(), a("div", Dt, [
914
- (s(!0), a(_, null, $(l.items, (o) => (s(), a("div", {
1021
+ setup(f) {
1022
+ return (o, e) => {
1023
+ const t = Y("TextListBox", !0);
1024
+ return i(), a("div", Nt, [
1025
+ (i(!0), a(C, null, B(o.items, (l) => (i(), a("div", {
915
1026
  class: "d-flex flex-column",
916
- key: o.id
1027
+ key: l.id
917
1028
  }, [
918
- d("div", Bt, [
919
- d("div", Tt, [
920
- d("div", {
1029
+ r("div", Vt, [
1030
+ r("div", Wt, [
1031
+ r("div", {
921
1032
  class: "d-flex flex-grow-1",
922
- id: o.id
923
- }, C(o.label), 9, It),
924
- o.showId ? (s(), a("div", St, C(o.id), 1)) : m("", !0)
1033
+ id: l.id
1034
+ }, w(l.label), 9, Gt),
1035
+ l.showId ? (i(), a("div", Kt, w(l.id), 1)) : g("", !0)
925
1036
  ]),
926
- o.hideDelete ? m("", !0) : (s(), B(W, {
1037
+ l.hideDelete ? g("", !0) : (i(), E(q, {
927
1038
  key: 0,
928
1039
  icon: "fa-solid fa-trash",
929
- onClick: (r) => l.$emit("deleted", o.id)
1040
+ onClick: (d) => o.$emit("deleted", l.id)
930
1041
  }, null, 8, ["onClick"]))
931
1042
  ]),
932
- d("div", Lt, [
933
- o.childrend ? (s(), B(e, {
1043
+ r("div", Jt, [
1044
+ l.childrend ? (i(), E(t, {
934
1045
  key: 0,
935
- items: o.childrend,
936
- showId: o.showId,
937
- hideDelete: o.hideDelete
938
- }, null, 8, ["items", "showId", "hideDelete"])) : m("", !0)
1046
+ items: l.childrend,
1047
+ showId: l.showId,
1048
+ hideDelete: l.hideDelete
1049
+ }, null, 8, ["items", "showId", "hideDelete"])) : g("", !0)
939
1050
  ])
940
1051
  ]))), 128))
941
1052
  ]);
942
1053
  };
943
1054
  }
944
- }), Ft = {
1055
+ }), qt = {
945
1056
  key: 0,
946
1057
  class: "toast-container position-fixed bottom-0 start-50 translate-middle-x p-4 toast-zindex"
947
- }, Mt = { class: "toast-header" }, Et = { class: "me-auto" }, Rt = { class: "text-body-secondary" }, Ht = ["onClick"], zt = ["innerHTML"], A = 500, Z = /* @__PURE__ */ w({
1058
+ }, Qt = { class: "toast-header" }, Xt = { class: "me-auto" }, Yt = { class: "text-body-secondary" }, Zt = ["onClick"], el = ["innerHTML"], Q = 500, se = /* @__PURE__ */ D({
948
1059
  __name: "ToastComponent",
949
1060
  props: {
950
1061
  defaultDisplayDuration: {}
951
1062
  },
952
- setup(p, { expose: l }) {
953
- const t = p, e = y([]);
954
- return l({
955
- addToast: (r) => {
956
- r.displayDuration || (r.displayDuration = t.defaultDisplayDuration), r.id = /* @__PURE__ */ new Date(), e.value.filter(function(f) {
957
- return f.id !== r.id;
958
- }), e.value.push(r);
1063
+ setup(f, { expose: o }) {
1064
+ const e = f, t = y([]);
1065
+ return o({
1066
+ addToast: (d) => {
1067
+ d.displayDuration || (d.displayDuration = e.defaultDisplayDuration), d.id = /* @__PURE__ */ new Date(), t.value.filter(function(m) {
1068
+ return m.id !== d.id;
1069
+ }), t.value.push(d);
959
1070
  }
960
1071
  }), setInterval(() => {
961
- e.value = e.value.map((r) => (r.displayDuration -= A, r)), e.value = e.value.filter((r) => r.displayDuration > 0);
962
- }, A), (r, f) => e.value.length > 0 ? (s(), a("div", Ft, [
963
- (s(!0), a(_, null, $(e.value, (v) => (s(), a("div", {
964
- key: v.message,
965
- class: L(["toast d-block", {
966
- "toast-info": v.type === "info",
967
- "toast-success": v.type === "success",
968
- "toast-warning": v.type === "warning",
969
- "toast-error": v.type === "error"
1072
+ t.value = t.value.map((d) => (d.displayDuration -= Q, d)), t.value = t.value.filter((d) => d.displayDuration > 0);
1073
+ }, Q), (d, m) => t.value.length > 0 ? (i(), a("div", qt, [
1074
+ (i(!0), a(C, null, B(t.value, (p) => (i(), a("div", {
1075
+ key: p.message,
1076
+ class: x(["toast d-block", {
1077
+ "toast-info": p.type === "info",
1078
+ "toast-success": p.type === "success",
1079
+ "toast-warning": p.type === "warning",
1080
+ "toast-error": p.type === "error"
970
1081
  }]),
971
1082
  role: "alert",
972
1083
  "aria-live": "assertive",
973
1084
  "aria-atomic": "true"
974
1085
  }, [
975
- d("div", Mt, [
976
- d("strong", Et, C(v.title), 1),
977
- d("small", Rt, C(v.id.toLocaleTimeString()), 1),
978
- d("button", {
1086
+ r("div", Qt, [
1087
+ r("strong", Xt, w(p.title), 1),
1088
+ r("small", Yt, w(p.id.toLocaleTimeString()), 1),
1089
+ r("button", {
979
1090
  type: "button",
980
1091
  class: "btn-close",
981
1092
  "data-bs-dismiss": "toast",
982
1093
  "aria-label": "Close",
983
- onClick: (g) => e.value = e.value.filter((i) => i.id !== v.id)
984
- }, null, 8, Ht)
1094
+ onClick: (v) => t.value = t.value.filter((s) => s.id !== p.id)
1095
+ }, null, 8, Zt)
985
1096
  ]),
986
- d("div", {
1097
+ r("div", {
987
1098
  class: "toast-body",
988
- innerHTML: v.message
989
- }, null, 8, zt)
1099
+ innerHTML: p.message
1100
+ }, null, 8, el)
990
1101
  ], 2))), 128))
991
- ])) : m("", !0);
1102
+ ])) : g("", !0);
992
1103
  }
993
- }), Nt = /* @__PURE__ */ w({
1104
+ }), tl = /* @__PURE__ */ D({
994
1105
  __name: "ToastWrapper",
995
- setup(p) {
996
- const l = y(), t = [
1106
+ setup(f) {
1107
+ const o = y(), e = [
997
1108
  {
998
1109
  id: "toast-notification-message",
999
- handler: (e) => {
1000
- let o = e.detail;
1001
- l.value.addToast({
1002
- title: o.title,
1003
- message: o.message,
1004
- type: o.severity,
1005
- displayDuration: o.displayDuration ? o.displayDuration : 5e3
1110
+ handler: (t) => {
1111
+ let l = t.detail;
1112
+ o.value.addToast({
1113
+ title: l.title,
1114
+ message: l.message,
1115
+ type: l.severity,
1116
+ displayDuration: l.displayDuration ? l.displayDuration : 5e3
1006
1117
  });
1007
1118
  }
1008
1119
  },
1009
1120
  {
1010
1121
  id: "fetch-error",
1011
- handler: (e) => {
1012
- let o = e.detail;
1013
- l.value.addToast({
1014
- title: o.title,
1015
- message: o.message,
1122
+ handler: (t) => {
1123
+ let l = t.detail;
1124
+ o.value.addToast({
1125
+ title: l.title,
1126
+ message: l.message,
1016
1127
  type: "error",
1017
1128
  displayDuration: 1e4
1018
1129
  });
1019
1130
  }
1020
1131
  }
1021
1132
  ];
1022
- return M(() => {
1023
- t.forEach((e) => window.addEventListener(e.id, e.handler));
1024
- }), oe(() => {
1025
- t.forEach((e) => window.removeEventListener(e.id, e.handler));
1026
- }), (e, o) => (s(), B(Z, {
1133
+ return z(() => {
1134
+ e.forEach((t) => window.addEventListener(t.id, t.handler));
1135
+ }), Z(() => {
1136
+ e.forEach((t) => window.removeEventListener(t.id, t.handler));
1137
+ }), (t, l) => (i(), E(se, {
1027
1138
  ref_key: "toast",
1028
- ref: l,
1139
+ ref: o,
1029
1140
  defaultDisplayDuration: 5e3
1030
1141
  }, null, 512));
1031
1142
  }
1032
- }), I = class I {
1143
+ }), L = class L {
1033
1144
  };
1034
- x(I, "getId", (l, t) => `${l}_${t}`), x(I, "saveOptions", (l, t, e) => {
1035
- localStorage.setItem(I.getId(l, t), JSON.stringify(e)), window.location.reload();
1036
- }), x(I, "cleanOptions", (l, t) => {
1037
- for (let e = 0; e < localStorage.length; e++)
1038
- localStorage.key(e).includes(l) && localStorage.key(e) != I.getId(l, t) && localStorage.removeItem(localStorage.key(e));
1039
- }), x(I, "loadOptions", (l, t, e, o, r) => {
1040
- I.cleanOptions(l, t);
1041
- const f = I.getId(l, t);
1042
- if (localStorage.getItem(f))
1145
+ M(L, "getId", (o, e) => `${o}_${e}`), M(L, "saveOptions", (o, e, t, l) => {
1146
+ localStorage.setItem(
1147
+ L.getId(o, e),
1148
+ JSON.stringify({ ttlcos: l, ttlc: { compact: t.compact } })
1149
+ ), window.location.reload();
1150
+ }), M(L, "cleanOptions", (o, e) => {
1151
+ for (let t = 0; t < localStorage.length; t++)
1152
+ localStorage.key(t).includes(o) && localStorage.key(t) != L.getId(o, e) && localStorage.removeItem(localStorage.key(t));
1153
+ }), M(L, "loadOptions", (o, e, t, l, d) => {
1154
+ L.cleanOptions(o, e);
1155
+ const m = L.getId(o, e);
1156
+ if (localStorage.getItem(m))
1043
1157
  try {
1044
- r.value = JSON.parse(localStorage.getItem(f)), r.value.forEach(
1045
- (v) => o.columns.find((g) => g.property == v.property).visible = v.checked
1046
- );
1158
+ const p = JSON.parse(localStorage.getItem(m));
1159
+ d.value = p.ttlcos, d.value.forEach(
1160
+ (v) => l.columns.find((s) => s.property == v.property).visible = v.checked
1161
+ ), l.compact = p.ttlc.compact;
1047
1162
  } catch {
1048
- localStorage.removeItem(f), I.loadOptions(l, t, e, o, r);
1163
+ localStorage.removeItem(m), L.loadOptions(o, e, t, l, d);
1049
1164
  }
1050
1165
  else
1051
- e || (e = []), r.value = o.columns.map((v) => (v.visible = e.indexOf(v.property) == -1, {
1052
- label: v.label,
1053
- property: v.property,
1054
- checked: v.visible
1166
+ t || (t = []), d.value = l.columns.map((p) => (p.visible = t.indexOf(p.property) == -1, {
1167
+ label: p.label,
1168
+ property: p.property,
1169
+ checked: p.visible
1055
1170
  }));
1056
1171
  });
1057
- let J = I;
1058
- function Jt(p) {
1172
+ let X = L;
1173
+ function rl(f) {
1059
1174
  window.dispatchEvent(
1060
1175
  new CustomEvent("toast-notification-message", {
1061
- detail: p
1176
+ detail: f
1062
1177
  })
1063
1178
  );
1064
1179
  }
1065
- const Ot = {
1066
- CheckBox: V,
1067
- CheckBoxList: ue,
1068
- DropDown: O,
1069
- DropDownMenu: G,
1070
- DropDownCallBack: U,
1071
- FilterCompact: q,
1072
- FilterControl: Q,
1073
- IconButton: W,
1074
- PaginatorControl: X,
1075
- RadioButton: Y,
1076
- RadioButtonGroup: Je,
1077
- SpinningProgress: Ue,
1078
- TableToList: bt,
1079
- TableToListOptions: wt,
1080
- TextListBox: xt,
1081
- ToastComponent: Z,
1082
- ToastWrapper: Nt
1083
- }, Kt = {
1084
- install(p) {
1085
- Object.entries(Ot).forEach(([l, t]) => {
1086
- p.component(l, t);
1180
+ const ll = {
1181
+ CheckBox: W,
1182
+ CheckBoxList: ye,
1183
+ DropDown: K,
1184
+ DropDownMenu: U,
1185
+ DropDownCallBack: ee,
1186
+ FilterCompact: te,
1187
+ FilterControl: le,
1188
+ IconButton: q,
1189
+ PaginatorControl: oe,
1190
+ RadioButton: ne,
1191
+ RadioButtonGroup: rt,
1192
+ SpinningProgress: ct,
1193
+ TableToList: Ft,
1194
+ TableToListOptions: At,
1195
+ TextListBox: Ut,
1196
+ ToastComponent: se,
1197
+ ToastWrapper: tl
1198
+ }, dl = {
1199
+ install(f) {
1200
+ Object.entries(ll).forEach(([o, e]) => {
1201
+ f.component(o, e);
1087
1202
  });
1088
1203
  }
1089
1204
  };
1090
1205
  export {
1091
- V as CheckBox,
1092
- ue as CheckBoxList,
1093
- O as DropDown,
1094
- U as DropDownCallBack,
1095
- G as DropDownMenu,
1096
- q as FilterCompact,
1097
- Q as FilterControl,
1098
- At as FilterDate,
1099
- Wt as FilterDropDown,
1100
- Gt as FilterText,
1101
- W as IconButton,
1102
- X as PaginatorControl,
1103
- Y as RadioButton,
1104
- Je as RadioButtonGroup,
1105
- Ue as SpinningProgress,
1106
- J as TabelToListOptionsPersister,
1107
- bt as TableToList,
1108
- wt as TableToListOptions,
1109
- xt as TextListBox,
1110
- Z as ToastComponent,
1111
- Nt as ToastWrapper,
1112
- Kt as default,
1113
- Jt as sendMsgToToast
1206
+ W as CheckBox,
1207
+ ye as CheckBoxList,
1208
+ K as DropDown,
1209
+ ee as DropDownCallBack,
1210
+ U as DropDownMenu,
1211
+ te as FilterCompact,
1212
+ le as FilterControl,
1213
+ al as FilterDate,
1214
+ il as FilterDropDown,
1215
+ sl as FilterText,
1216
+ q as IconButton,
1217
+ oe as PaginatorControl,
1218
+ ne as RadioButton,
1219
+ rt as RadioButtonGroup,
1220
+ ct as SpinningProgress,
1221
+ X as TabelToListOptionsPersister,
1222
+ Ft as TableToList,
1223
+ At as TableToListOptions,
1224
+ Ut as TextListBox,
1225
+ se as ToastComponent,
1226
+ tl as ToastWrapper,
1227
+ dl as default,
1228
+ rl as sendMsgToToast
1114
1229
  };