admins-components 1.2.0 → 1.2.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.
Files changed (59) hide show
  1. package/dist/admins-components.css +1 -0
  2. package/dist/admins-components.js +959 -0
  3. package/dist/admins-components.umd.cjs +1 -0
  4. package/package.json +17 -1
  5. package/admins-components/.vscode/extensions.json +0 -3
  6. package/admins-components/README.md +0 -5
  7. package/admins-components/index.html +0 -13
  8. package/admins-components/package.json +0 -21
  9. package/admins-components/public/vite.svg +0 -1
  10. package/admins-components/src/App.vue +0 -30
  11. package/admins-components/src/assets/vue.svg +0 -1
  12. package/admins-components/src/components/HelloWorld.vue +0 -41
  13. package/admins-components/src/main.ts +0 -5
  14. package/admins-components/src/style.css +0 -79
  15. package/admins-components/src/vite-env.d.ts +0 -1
  16. package/admins-components/tsconfig.app.json +0 -14
  17. package/admins-components/tsconfig.json +0 -7
  18. package/admins-components/tsconfig.node.json +0 -24
  19. package/admins-components/vite.config.ts +0 -7
  20. package/index.html +0 -13
  21. package/src/App.vue +0 -5
  22. package/src/assets/dropdown.scss +0 -61
  23. package/src/assets/dropdowncallback.scss +0 -57
  24. package/src/assets/dropdownmenu.scss +0 -33
  25. package/src/assets/filtercompact.scss +0 -6
  26. package/src/assets/filtercontrol.scss +0 -23
  27. package/src/assets/iconbutton.scss +0 -31
  28. package/src/assets/main.scss +0 -38
  29. package/src/assets/paginatorcontrol.scss +0 -16
  30. package/src/assets/propertyselector.scss +0 -12
  31. package/src/assets/tabletolist.scss +0 -115
  32. package/src/assets/tabletolistoptions.scss +0 -22
  33. package/src/assets/textlistbox.scss +0 -16
  34. package/src/assets/toastcomponent.scss +0 -23
  35. package/src/components/CheckBox.vue +0 -25
  36. package/src/components/CheckBoxList.vue +0 -48
  37. package/src/components/DropDown.vue +0 -203
  38. package/src/components/DropDownCallBack.vue +0 -109
  39. package/src/components/DropDownMenu.vue +0 -88
  40. package/src/components/FilterCompact.vue +0 -146
  41. package/src/components/FilterControl.vue +0 -133
  42. package/src/components/IconButton.vue +0 -25
  43. package/src/components/PaginatorControl.vue +0 -82
  44. package/src/components/RadioButton.vue +0 -21
  45. package/src/components/RadioButtonGroup.vue +0 -28
  46. package/src/components/SpinningProgress.vue +0 -9
  47. package/src/components/TableToList.vue +0 -281
  48. package/src/components/TableToListOptions.vue +0 -99
  49. package/src/components/TextListBox.vue +0 -50
  50. package/src/components/ToastComponent.vue +0 -82
  51. package/src/components/ToastWrapper.vue +0 -44
  52. package/src/index.ts +0 -56
  53. package/src/main.ts +0 -5
  54. package/src/style.css +0 -79
  55. package/src/vite-env.d.ts +0 -1
  56. package/tsconfig.app.json +0 -14
  57. package/tsconfig.json +0 -7
  58. package/tsconfig.node.json +0 -24
  59. package/vite.config.ts +0 -49
@@ -0,0 +1,959 @@
1
+ import { defineComponent as $, createElementBlock as a, openBlock as o, createElementVNode as r, toDisplayString as h, resolveComponent as x, Fragment as _, renderList as C, createVNode as H, createBlock as D, createCommentVNode as p, watch as R, ref as m, onMounted as M, unref as O, normalizeStyle as P, createTextVNode as E, normalizeClass as T, computed as S, onUnmounted as W } from "vue";
2
+ const K = { class: "form-check" }, U = ["checked", "id"], q = ["for"], J = /* @__PURE__ */ $({
3
+ __name: "CheckBox",
4
+ props: {
5
+ id: {},
6
+ label: {},
7
+ checked: { type: Boolean }
8
+ },
9
+ emits: ["changed"],
10
+ setup(y) {
11
+ return (i, s) => (o(), a("div", K, [
12
+ r("input", {
13
+ class: "form-check-input",
14
+ type: "checkbox",
15
+ checked: i.checked,
16
+ value: "",
17
+ id: i.id,
18
+ onChange: s[0] || (s[0] = (t) => i.$emit("changed", {
19
+ id: i.id,
20
+ checked: t.target.checked
21
+ }))
22
+ }, null, 40, U),
23
+ r("label", {
24
+ class: "form-check-label",
25
+ for: i.id
26
+ }, h(i.label), 9, q)
27
+ ]));
28
+ }
29
+ }), Q = { class: "cbl-childrend-container" }, X = /* @__PURE__ */ $({
30
+ __name: "CheckBoxList",
31
+ props: {
32
+ items: {},
33
+ callback: { type: Function }
34
+ },
35
+ setup(y) {
36
+ return (i, s) => {
37
+ const t = x("CheckBoxList", !0);
38
+ return o(!0), a(_, null, C(i.items, (e) => (o(), a("div", {
39
+ key: e.id,
40
+ class: "cbl-container"
41
+ }, [
42
+ H(J, {
43
+ id: e.id,
44
+ label: e.label,
45
+ checked: e.checked,
46
+ onChanged: s[0] || (s[0] = (d) => i.callback(d.id, d.checked))
47
+ }, null, 8, ["id", "label", "checked"]),
48
+ r("div", Q, [
49
+ e.childrend ? (o(), D(t, {
50
+ key: 0,
51
+ items: e.childrend,
52
+ callback: i.callback
53
+ }, null, 8, ["items", "callback"])) : p("", !0)
54
+ ])
55
+ ]))), 128);
56
+ };
57
+ }
58
+ }), Y = (y, i) => {
59
+ const s = y.__vccOpts || y;
60
+ for (const [t, e] of i)
61
+ s[t] = e;
62
+ return s;
63
+ }, wt = /* @__PURE__ */ Y(X, [["__scopeId", "data-v-ae2832c5"]]), Z = ["id"], ee = ["disabled"], te = { class: "dd-label" }, le = { class: "dd-item-list" }, ne = ["onClick"], V = /* @__PURE__ */ $({
64
+ __name: "DropDown",
65
+ props: {
66
+ id: {},
67
+ label: {},
68
+ selected: {},
69
+ options: {},
70
+ opentop: { type: Boolean },
71
+ disableFilter: { type: Boolean },
72
+ storeselected: { type: Boolean },
73
+ filterevent: { type: Boolean },
74
+ disabled: { type: Boolean }
75
+ },
76
+ emits: ["selected", "filtered"],
77
+ setup(y, { emit: i }) {
78
+ const s = y;
79
+ R(s.options, () => {
80
+ s.filterevent && (u.value = s.options.value);
81
+ }), R(
82
+ () => s.selected,
83
+ () => {
84
+ g();
85
+ }
86
+ ), R(
87
+ () => s.label,
88
+ () => {
89
+ g();
90
+ }
91
+ );
92
+ const t = i, e = (b) => {
93
+ s.storeselected || (v.value = b.label), t("selected", b);
94
+ }, d = "törlés", v = m(""), g = () => {
95
+ if (s.options.value) {
96
+ const b = s.options.value.find((k) => k.id == s.selected);
97
+ b ? v.value = b.label : (n(""), v.value = s.label);
98
+ }
99
+ };
100
+ M(() => {
101
+ s.label && (v.value = s.label), g(), f = "", document.addEventListener("click", function() {
102
+ I.value == "block" && (I.value = "none");
103
+ }), window.addEventListener("scrolled", function() {
104
+ I.value == "block" && (I.value = "none");
105
+ }), w();
106
+ });
107
+ let f = "";
108
+ const n = (b) => {
109
+ f = b, s.filterevent ? t("filtered", b) : b == "" ? u.value = s.options.value : u.value = s.options.value.filter(
110
+ (k) => k.label.toLowerCase().includes(b.toLowerCase())
111
+ );
112
+ }, u = m([]), l = () => {
113
+ e({ label: s.label, id: "" }), n("");
114
+ }, c = () => {
115
+ if (I.value == "block") {
116
+ I.value = "none";
117
+ return;
118
+ }
119
+ setTimeout(() => {
120
+ I.value = "block";
121
+ }, 10), setTimeout(w, 20);
122
+ }, w = () => {
123
+ const b = L.value, k = N.value;
124
+ s.opentop ? k.style.top = b.getBoundingClientRect().y - k.offsetHeight + "px" : (k.style.top = b.getBoundingClientRect().y + b.offsetHeight + "px", b.getBoundingClientRect().y - k.getBoundingClientRect().y != -b.offsetHeight && (k.style.top = parseInt(k.style.top.substring(0, k.style.top.length - 2)) + (b.getBoundingClientRect().y - k.getBoundingClientRect().y) + b.offsetHeight + "px")), z.value && z.value.focus();
125
+ }, L = m(null), N = m(null), I = m("none"), z = m(null);
126
+ return (b, k) => (o(), a("div", {
127
+ id: b.id,
128
+ class: "dd-flex"
129
+ }, [
130
+ r("button", {
131
+ ref_key: "DropDownTriggerButton",
132
+ ref: L,
133
+ class: "btn btn-outline-secondary dd-toggle dd-flex",
134
+ type: "button",
135
+ disabled: b.disabled,
136
+ onClick: k[0] || (k[0] = (B) => {
137
+ n(O(f)), c();
138
+ })
139
+ }, [
140
+ r("div", te, h(v.value), 1)
141
+ ], 8, ee),
142
+ r("div", {
143
+ class: "dd-menu",
144
+ style: P({ display: I.value }),
145
+ ref_key: "DropDownMenu",
146
+ ref: N
147
+ }, [
148
+ v.value != s.label ? (o(), a("button", {
149
+ key: 0,
150
+ type: "button",
151
+ class: "btn btn-outline-secondary dd-button",
152
+ onClick: k[1] || (k[1] = (B) => l())
153
+ }, h(d))) : p("", !0),
154
+ b.disableFilter ? p("", !0) : (o(), a("input", {
155
+ key: 1,
156
+ ref_key: "ddSearch",
157
+ ref: z,
158
+ type: "text ",
159
+ class: "form-control",
160
+ placeholder: "keresés",
161
+ onInput: k[2] || (k[2] = (B) => n(B.target.value)),
162
+ onClick: k[3] || (k[3] = (B) => B.stopPropagation())
163
+ }, null, 544)),
164
+ r("div", le, [
165
+ (o(!0), a(_, null, C(u.value, (B) => (o(), a("div", {
166
+ key: B.id,
167
+ class: "dd-item",
168
+ onClick: ($t) => e(B)
169
+ }, [
170
+ B.icon ? (o(), a("i", {
171
+ key: 0,
172
+ class: T([B.icon, "dd-item__icon"])
173
+ }, null, 2)) : p("", !0),
174
+ E(h(B.label), 1)
175
+ ], 8, ne))), 128))
176
+ ])
177
+ ], 4)
178
+ ], 8, Z));
179
+ }
180
+ }), oe = ["id"], se = ["disabled"], ie = { class: "ddc-row" }, ae = { class: "ddc-label" }, re = { class: "dd-item-list" }, de = ["onClick"], ue = { class: "ddc-item" }, ce = { class: "ddc-label" }, pe = "törlés", ve = /* @__PURE__ */ $({
181
+ __name: "DropDownCallBack",
182
+ props: {
183
+ id: {},
184
+ default: {},
185
+ selected: {},
186
+ enabled: { type: Boolean },
187
+ options: {}
188
+ },
189
+ setup(y) {
190
+ const i = y, s = (u) => {
191
+ u == i.default && t.value.callback(""), t.value = u, t.value.callback(t.value.value);
192
+ }, t = m(i.default), e = () => {
193
+ if (i.selected && i.options.value) {
194
+ const u = i.options.value.find(
195
+ (l) => l.value == i.selected
196
+ );
197
+ u && (t.value = u);
198
+ }
199
+ };
200
+ M(() => {
201
+ e(), document.addEventListener("click", function() {
202
+ n.value == "block" && (n.value = "none");
203
+ });
204
+ });
205
+ const d = () => {
206
+ setTimeout(() => {
207
+ n.value = "block";
208
+ }, 10), setTimeout(() => {
209
+ f.value = v.value.offsetHeight;
210
+ }, 20);
211
+ }, v = m(null), g = m(null), f = m(0), n = m("none");
212
+ return (u, l) => (o(), a("div", {
213
+ class: "ddc-flex",
214
+ id: u.id
215
+ }, [
216
+ r("button", {
217
+ ref_key: "DropDownTriggerButton",
218
+ ref: v,
219
+ class: "btn btn-outline-secondary ddc-button",
220
+ type: "button",
221
+ disabled: !u.enabled,
222
+ onClick: l[0] || (l[0] = (c) => d())
223
+ }, [
224
+ r("span", ie, [
225
+ r("i", {
226
+ class: T([t.value.icon, "ddc-icon"])
227
+ }, null, 2),
228
+ r("span", ae, h(t.value.label), 1)
229
+ ])
230
+ ], 8, se),
231
+ r("div", {
232
+ class: "ddc-menu",
233
+ style: P({ display: n.value, "margin-top": f.value + "px" }),
234
+ ref_key: "DropDownMenu",
235
+ ref: g
236
+ }, [
237
+ t.value != i.default ? (o(), a("button", {
238
+ key: 0,
239
+ type: "button",
240
+ class: "btn btn-outline-secondary ddc-button",
241
+ onClick: l[1] || (l[1] = (c) => s(i.default))
242
+ }, h(pe))) : p("", !0),
243
+ r("div", re, [
244
+ (o(!0), a(_, null, C(u.options.value, (c) => (o(), a("div", {
245
+ key: c.label,
246
+ class: "ddc-item",
247
+ onClick: (w) => s(c)
248
+ }, [
249
+ r("span", ue, [
250
+ r("i", {
251
+ class: T([c.icon, "ddc-icon"])
252
+ }, null, 2),
253
+ r("span", ce, h(c.label), 1)
254
+ ])
255
+ ], 8, de))), 128))
256
+ ])
257
+ ], 4)
258
+ ], 8, oe));
259
+ }
260
+ }), fe = ["id"], me = {
261
+ key: 0,
262
+ class: "ddm-label"
263
+ }, ge = {
264
+ key: 1,
265
+ class: "ddm-label"
266
+ }, ye = ["onClick"], A = /* @__PURE__ */ $({
267
+ __name: "DropDownMenu",
268
+ props: {
269
+ label: {},
270
+ icon: {},
271
+ options: {},
272
+ item: {},
273
+ id: {},
274
+ right: { type: Boolean }
275
+ },
276
+ setup(y) {
277
+ const i = y;
278
+ M(() => {
279
+ document.addEventListener("click", function() {
280
+ s.value && (s.value = !1);
281
+ });
282
+ });
283
+ const s = m(!1), t = () => {
284
+ setTimeout(() => {
285
+ s.value = !0;
286
+ }, 10), setTimeout(e, 20);
287
+ }, e = () => {
288
+ const f = d.value, n = v.value;
289
+ n.style.top = f.getBoundingClientRect().y + f.offsetHeight + "px", f.getBoundingClientRect().y - n.getBoundingClientRect().y != -f.offsetHeight && (n.style.top = parseInt(n.style.top.substring(0, n.style.top.length - 2)) + (f.getBoundingClientRect().y - n.getBoundingClientRect().y) + f.offsetHeight + "px"), n.style.left = f.getBoundingClientRect().x - (i.right ? 100 : 0) + "px";
290
+ }, d = m(null), v = m(null), g = m(0);
291
+ return (f, n) => (o(), a("div", {
292
+ class: "d-flex",
293
+ id: f.id
294
+ }, [
295
+ r("button", {
296
+ ref_key: "DropDownTriggerButton",
297
+ ref: d,
298
+ class: "btn btn-outline-secondary",
299
+ type: "button",
300
+ onClick: n[0] || (n[0] = (u) => t())
301
+ }, [
302
+ f.label ? (o(), a("span", me, h(f.label), 1)) : p("", !0),
303
+ f.icon ? (o(), a("span", ge, [
304
+ r("i", {
305
+ class: T(f.icon)
306
+ }, null, 2)
307
+ ])) : p("", !0)
308
+ ], 512),
309
+ s.value ? (o(), a("div", {
310
+ key: 0,
311
+ class: "ddm-menu",
312
+ ref_key: "DropDownMenu",
313
+ ref: v,
314
+ style: P({ "margin-top": g.value + "px" })
315
+ }, [
316
+ (o(!0), a(_, null, C(f.options, (u) => (o(), a("div", {
317
+ key: u.icon,
318
+ class: "ddm-item",
319
+ onClick: (l) => u.command(f.item)
320
+ }, [
321
+ r("i", {
322
+ class: T(u.icon)
323
+ }, null, 2),
324
+ E(h(u.label), 1)
325
+ ], 8, ye))), 128))
326
+ ], 4)) : p("", !0)
327
+ ], 8, fe));
328
+ }
329
+ }), be = { class: "fltrc-container" }, ke = { class: "fltrc-container" }, he = ["placeholder", "value"], _e = {
330
+ key: 1,
331
+ class: "d-flex flex-row input-group align-items-center"
332
+ }, $e = ["value"], Ce = ["value"], we = /* @__PURE__ */ $({
333
+ __name: "FilterCompact",
334
+ props: {
335
+ items: {}
336
+ },
337
+ setup(y) {
338
+ const i = y, s = m(0), t = m(0), e = S(() => i.items[s.value].filter), d = (u) => {
339
+ let l = i.items[t.value];
340
+ l.filter.filtered(l.filter.key, ""), s.value = u, t.value = u, n.value += 1;
341
+ }, v = m(void 0);
342
+ M(() => {
343
+ let u = [];
344
+ for (let l = 0; l < i.items.length; l++)
345
+ u.push({
346
+ icon: i.items[l].icon,
347
+ label: i.items[l].label,
348
+ command: () => d(l)
349
+ });
350
+ v.value = u;
351
+ });
352
+ const g = m({}), f = m(void 0), n = m(0);
353
+ return (u, l) => (o(), a("div", be, [
354
+ v.value ? (o(), D(A, {
355
+ key: 0,
356
+ id: "ddm",
357
+ icon: u.items[s.value].icon,
358
+ item: u.items[s.value],
359
+ label: "",
360
+ options: v.value
361
+ }, null, 8, ["icon", "item", "options"])) : p("", !0),
362
+ r("div", ke, [
363
+ e.value.type == "text" ? (o(), a("input", {
364
+ key: 0,
365
+ type: "text",
366
+ class: "form-control",
367
+ placeholder: e.value.placeholder,
368
+ value: e.value.defaultv ?? "",
369
+ onInput: l[0] || (l[0] = (c) => {
370
+ e.value.filtered(
371
+ e.value.key,
372
+ c.target.value
373
+ ), e.value.defaultv = c.target.value;
374
+ })
375
+ }, null, 40, he)) : p("", !0),
376
+ e.value.type == "date" ? (o(), a("div", _e, [
377
+ r("input", {
378
+ type: "date",
379
+ class: "form-control",
380
+ value: e.value.defFrom ?? "",
381
+ onInput: l[1] || (l[1] = (c) => {
382
+ g.value.from = c.target.value == "" ? null : c.target.value, e.value.defFrom = c.target.value == "" ? null : c.target.value, e.value.filtered(e.value.key, g.value);
383
+ })
384
+ }, null, 40, $e),
385
+ l[5] || (l[5] = r("span", { class: "input-group-text" }, "-", -1)),
386
+ r("input", {
387
+ type: "date",
388
+ class: "form-control",
389
+ value: e.value.defTill ?? "",
390
+ onInput: l[2] || (l[2] = (c) => {
391
+ g.value.untill = c.target.value == "" ? null : c.target.value, e.value.defTill = c.target.value == "" ? null : c.target.value, e.value.filtered(e.value.key, g.value);
392
+ })
393
+ }, null, 40, Ce)
394
+ ])) : p("", !0),
395
+ e.value.type == "dropdown" ? (o(), D(V, {
396
+ key: n.value,
397
+ selected: f.value,
398
+ options: e.value.options,
399
+ filterevent: e.value.filterevent,
400
+ onFiltered: l[3] || (l[3] = (c) => {
401
+ e.value.onfiltered && e.value.onfiltered(c);
402
+ }),
403
+ id: e.value.key,
404
+ label: e.value.label,
405
+ onSelected: l[4] || (l[4] = (c) => e.value.filtered(e.value.key, c.id))
406
+ }, null, 8, ["selected", "options", "filterevent", "id", "label"])) : p("", !0)
407
+ ])
408
+ ]));
409
+ }
410
+ }), De = { class: "fltrctrl-container" }, Be = ["placeholder", "value"], Te = {
411
+ key: 1,
412
+ class: "d-flex flex-row input-group align-items-center"
413
+ }, Le = ["value"], Ie = ["value"], F = m({}), Se = /* @__PURE__ */ $({
414
+ __name: "FilterControl",
415
+ props: {
416
+ item: {}
417
+ },
418
+ setup(y) {
419
+ const i = y;
420
+ M(() => {
421
+ var t;
422
+ if (i.item.type == "dropdown") {
423
+ const e = i.item;
424
+ s.value = (t = e.options.value.find(
425
+ (d) => d.id == i.item.defaultv
426
+ )) == null ? void 0 : t.id;
427
+ }
428
+ });
429
+ const s = m(void 0);
430
+ return (t, e) => (o(), a("div", De, [
431
+ t.item.type == "text" ? (o(), a("input", {
432
+ key: 0,
433
+ type: "text",
434
+ class: "form-control",
435
+ placeholder: t.item.placeholder,
436
+ value: t.item.defaultv ?? "",
437
+ onInput: e[0] || (e[0] = (d) => t.item.filtered(t.item.key, d.target.value))
438
+ }, null, 40, Be)) : p("", !0),
439
+ t.item.type == "date" ? (o(), a("div", Te, [
440
+ r("input", {
441
+ type: "date",
442
+ class: "form-control",
443
+ value: t.item.defFrom ?? "",
444
+ onInput: e[1] || (e[1] = (d) => {
445
+ F.value.from = d.target.value == "" ? null : d.target.value, t.item.filtered(t.item.key, F.value);
446
+ })
447
+ }, null, 40, Le),
448
+ e[5] || (e[5] = r("span", { class: "input-group-text" }, "-", -1)),
449
+ r("input", {
450
+ type: "date",
451
+ class: "form-control",
452
+ value: t.item.defTill ?? "",
453
+ onInput: e[2] || (e[2] = (d) => {
454
+ F.value.untill = d.target.value == "" ? null : d.target.value, t.item.filtered(t.item.key, F.value);
455
+ })
456
+ }, null, 40, Ie)
457
+ ])) : p("", !0),
458
+ t.item.type == "dropdown" ? (o(), D(V, {
459
+ key: 2,
460
+ selected: s.value,
461
+ options: m(t.item.options),
462
+ filterevent: t.item.filterevent,
463
+ onFiltered: e[3] || (e[3] = (d) => {
464
+ t.item.onfiltered && t.item.onfiltered(d);
465
+ }),
466
+ id: t.item.key,
467
+ label: t.item.label,
468
+ onSelected: e[4] || (e[4] = (d) => t.item.filtered(t.item.key, d.id))
469
+ }, null, 8, ["selected", "options", "filterevent", "id", "label"])) : p("", !0)
470
+ ]));
471
+ }
472
+ }), G = /* @__PURE__ */ $({
473
+ __name: "IconButton",
474
+ props: {
475
+ icon: {},
476
+ active: { type: Boolean },
477
+ big: { type: Boolean }
478
+ },
479
+ emits: ["click"],
480
+ setup(y, { emit: i }) {
481
+ const s = y, t = S(
482
+ () => `${s.icon} ${s.big ? "ib-button-big" : ""}`
483
+ ), e = i;
484
+ return (d, v) => (o(), a("div", {
485
+ onClick: v[0] || (v[0] = (g) => e("click")),
486
+ class: "ib-container"
487
+ }, [
488
+ r("div", {
489
+ class: T(["ib-button", { "ib-button-active": d.active }])
490
+ }, [
491
+ r("i", {
492
+ class: T(t.value)
493
+ }, null, 2)
494
+ ], 2)
495
+ ]));
496
+ }
497
+ }), Me = { class: "pc-container" }, Fe = ["value", "max"], Re = /* @__PURE__ */ $({
498
+ __name: "PaginatorControl",
499
+ props: {
500
+ settings: {}
501
+ },
502
+ emits: ["pagesize", "page"],
503
+ setup(y, { emit: i }) {
504
+ const s = y, t = i, e = () => {
505
+ let n = m([]);
506
+ return s.settings.value.sizes.forEach(
507
+ (u) => n.value.push({ label: u.toString(), id: u.toString() })
508
+ ), n;
509
+ }, d = m(1);
510
+ R(
511
+ () => s.settings.value,
512
+ () => {
513
+ d.value = 1;
514
+ }
515
+ );
516
+ const v = S(
517
+ () => Math.floor(s.settings.value.total / s.settings.value.pagesize) + 1
518
+ ), g = () => {
519
+ d.value > 1 && (d.value -= 1, t("page", d.value));
520
+ }, f = () => {
521
+ d.value < v.value && (d.value += 1, t("page", d.value));
522
+ };
523
+ return (n, u) => (o(), a("div", Me, [
524
+ r("button", {
525
+ class: "btn btn-outline-secondary",
526
+ onClick: g
527
+ }, "<"),
528
+ r("input", {
529
+ class: "form-control pc-input",
530
+ type: "number",
531
+ value: d.value,
532
+ min: "1",
533
+ max: v.value,
534
+ onChange: u[0] || (u[0] = (l) => n.$emit("page", l.target.value))
535
+ }, null, 40, Fe),
536
+ E("/" + h(v.value) + " ", 1),
537
+ r("button", {
538
+ class: "btn btn-outline-secondary",
539
+ onClick: f
540
+ }, ">"),
541
+ H(V, {
542
+ opentop: !0,
543
+ class: "pc-dropdown",
544
+ id: "pagecount",
545
+ label: "10",
546
+ selected: n.settings.value.pagesize.toString(),
547
+ options: e(),
548
+ onSelected: u[1] || (u[1] = (l) => {
549
+ d.value = 1, n.$emit("pagesize", parseInt(l.id));
550
+ })
551
+ }, null, 8, ["selected", "options"])
552
+ ]));
553
+ }
554
+ }), He = { class: "form-check" }, Ee = ["name", "id", "checked"], ze = ["for"], Pe = /* @__PURE__ */ $({
555
+ __name: "RadioButton",
556
+ props: {
557
+ group: {},
558
+ label: {},
559
+ id: {},
560
+ selected: { type: Boolean }
561
+ },
562
+ emits: ["selected"],
563
+ setup(y) {
564
+ return (i, s) => (o(), a("div", He, [
565
+ r("input", {
566
+ class: "form-check-input",
567
+ type: "radio",
568
+ name: i.group,
569
+ id: i.id,
570
+ checked: i.selected,
571
+ onChange: s[0] || (s[0] = (t) => i.$emit("selected", i.id))
572
+ }, null, 40, Ee),
573
+ r("label", {
574
+ class: "form-check-label",
575
+ for: i.id
576
+ }, h(i.label), 9, ze)
577
+ ]));
578
+ }
579
+ }), Ve = { class: "d-flex flex-column gap-2 justify-content-around" }, Dt = /* @__PURE__ */ $({
580
+ __name: "RadioButtonGroup",
581
+ props: {
582
+ group: {},
583
+ items: {}
584
+ },
585
+ emits: ["selected"],
586
+ setup(y) {
587
+ return (i, s) => (o(), a("div", Ve, [
588
+ (o(!0), a(_, null, C(i.items, (t) => (o(), D(Pe, {
589
+ key: t.id,
590
+ id: t.id,
591
+ label: t.label,
592
+ group: i.group,
593
+ selected: t.selected,
594
+ onSelected: s[0] || (s[0] = (e) => i.$emit("selected", e))
595
+ }, null, 8, ["id", "label", "group", "selected"]))), 128))
596
+ ]));
597
+ }
598
+ }), Ne = {
599
+ key: 0,
600
+ class: "spinner-border",
601
+ role: "status"
602
+ }, Bt = /* @__PURE__ */ $({
603
+ __name: "SpinningProgress",
604
+ props: {
605
+ loading: { type: Boolean }
606
+ },
607
+ setup(y) {
608
+ return (i, s) => i.loading ? (o(), a("div", Ne, s[0] || (s[0] = [
609
+ r("span", { class: "visually-hidden" }, "Loading...", -1)
610
+ ]))) : p("", !0);
611
+ }
612
+ }), je = { class: "t2l-table-view t2l-table-header-label" }, xe = {
613
+ key: 0,
614
+ class: "t2l-select"
615
+ }, Ae = {
616
+ key: 1,
617
+ class: "t2l-cell"
618
+ }, Ge = { class: "t2l-table-view t2l-table-header-filter" }, Oe = {
619
+ key: 0,
620
+ class: "t2l-select"
621
+ }, We = {
622
+ key: 1,
623
+ class: "t2l-cell"
624
+ }, Ke = { class: "t2l-table-view t2l-rows" }, Ue = {
625
+ key: 0,
626
+ class: "t2l-select"
627
+ }, qe = ["id", "onChange"], Je = ["innerHTML"], Qe = {
628
+ key: 1,
629
+ class: "t2l-cell t2l-actions"
630
+ }, Xe = ["title", "disabled", "onClick"], Ye = { class: "t2l-card-view t2l-card-filters" }, Ze = { class: "t2l-card-filter-order" }, et = { class: "t2l-card-filter-search" }, tt = { class: "t2l-card-view t2l-rows" }, lt = {
631
+ key: 0,
632
+ class: "t2l-card-select"
633
+ }, nt = ["id", "onChange"], ot = {
634
+ key: 0,
635
+ class: "t2l-property"
636
+ }, st = { class: "t2l-label" }, it = ["innerHTML"], at = { class: "d-flex align-items-center" }, rt = {
637
+ key: 1,
638
+ class: "d-flex justify-content-center t2l-footer"
639
+ }, Tt = /* @__PURE__ */ $({
640
+ __name: "TableToList",
641
+ props: {
642
+ items: {},
643
+ config: {}
644
+ },
645
+ emits: ["pagesize", "page"],
646
+ setup(y) {
647
+ const i = y, s = S(
648
+ () => i.config.columns.filter((n) => n.visible != !1)
649
+ ), t = S(
650
+ () => i.config.columns.filter((n) => n.visible != !1 && n.filter)
651
+ ), e = S(
652
+ () => s.value.filter(
653
+ (n) => n.sort && n.sort.active && n.sort.active.value
654
+ )
655
+ ), d = S(() => Math.ceil(s.value.length / i.config.smColCount)), v = (n, u) => {
656
+ var l = n - 1 + (u - 1) * d.value;
657
+ return l < s.value.length ? s.value[l] : null;
658
+ }, g = (n, u) => n.converter ? n.converter(u[n.property], u) : u[n.property], f = (n) => {
659
+ if (n.sort && n.sort.active) {
660
+ let u = !n.sort.active.value;
661
+ i.config.columns.forEach((l) => {
662
+ l.sort && l.sort.active && (l.sort.active.value = !1);
663
+ }), n.sort.active.value = u, n.sort.callback(u ? n.property : "");
664
+ }
665
+ };
666
+ return (n, u) => (o(), a(_, null, [
667
+ r("div", je, [
668
+ n.config.selectableId ? (o(), a("span", xe)) : p("", !0),
669
+ (o(!0), a(_, null, C(s.value, (l) => {
670
+ var c, w;
671
+ return o(), a("span", {
672
+ class: "t2l-cell",
673
+ key: l.property
674
+ }, [
675
+ l.sort ? (o(), D(G, {
676
+ key: 0,
677
+ icon: l.sort.icon,
678
+ onClick: (L) => f(l),
679
+ active: (w = (c = l.sort) == null ? void 0 : c.active) == null ? void 0 : w.value
680
+ }, null, 8, ["icon", "onClick", "active"])) : p("", !0),
681
+ E(" " + h(l.label), 1)
682
+ ]);
683
+ }), 128)),
684
+ n.config.actionHeader ? (o(), a("span", Ae, h(n.config.actionHeader), 1)) : p("", !0)
685
+ ]),
686
+ r("div", Ge, [
687
+ n.config.selectableId ? (o(), a("span", Oe)) : p("", !0),
688
+ (o(!0), a(_, null, C(s.value, (l) => (o(), a("span", {
689
+ class: "t2l-cell",
690
+ key: l.label
691
+ }, [
692
+ l.filter ? (o(), D(Se, {
693
+ key: 0,
694
+ item: l.filter
695
+ }, null, 8, ["item"])) : p("", !0)
696
+ ]))), 128)),
697
+ n.config.actionHeader ? (o(), a("span", We)) : p("", !0)
698
+ ]),
699
+ r("div", Ke, [
700
+ (o(!0), a(_, null, C(n.items, (l) => (o(), a("div", {
701
+ key: l,
702
+ class: "t2l-row"
703
+ }, [
704
+ n.config.selectableId ? (o(), a("div", Ue, [
705
+ r("input", {
706
+ class: "form-check-input",
707
+ type: "checkbox",
708
+ id: l[n.config.selectableId],
709
+ onChange: (c) => l.selected = !l.selected
710
+ }, null, 40, qe)
711
+ ])) : p("", !0),
712
+ (o(!0), a(_, null, C(s.value, (c) => (o(), a("div", {
713
+ class: "t2l-cell",
714
+ key: c.property,
715
+ innerHTML: g(c, l)
716
+ }, null, 8, Je))), 128)),
717
+ n.config.actions ? (o(), a("div", Qe, [
718
+ (o(!0), a(_, null, C(n.config.actions, (c) => (o(), a("button", {
719
+ key: c,
720
+ type: "button",
721
+ class: "btn btn-outline-secondary",
722
+ title: c.label,
723
+ disabled: !c.enabled(l),
724
+ onClick: (w) => c.command(l)
725
+ }, [
726
+ r("i", {
727
+ class: T(c.icon)
728
+ }, null, 2)
729
+ ], 8, Xe))), 128))
730
+ ])) : p("", !0)
731
+ ]))), 128))
732
+ ]),
733
+ r("div", Ye, [
734
+ r("div", Ze, [
735
+ H(ve, {
736
+ id: "card-filter-order",
737
+ default: {
738
+ icon: "fa-solid fa-chevron-down",
739
+ label: "rendezés"
740
+ },
741
+ selected: e.value.length > 0 ? e.value[0].property : "",
742
+ enabled: n.config.sortEnabled,
743
+ options: m(
744
+ s.value.filter((l) => l.sort).map((l) => ({
745
+ icon: l.sort.icon,
746
+ label: l.sort.label,
747
+ value: l.property,
748
+ callback: l.sort.callback
749
+ }))
750
+ )
751
+ }, null, 8, ["selected", "enabled", "options"])
752
+ ]),
753
+ r("div", et, [
754
+ H(we, {
755
+ items: t.value.map((l) => ({
756
+ filter: l.filter,
757
+ icon: l.filterIcon,
758
+ label: l.label
759
+ }))
760
+ }, null, 8, ["items"])
761
+ ])
762
+ ]),
763
+ r("div", tt, [
764
+ (o(!0), a(_, null, C(n.items, (l, c) => (o(), a("div", {
765
+ class: "t2l-row",
766
+ key: c
767
+ }, [
768
+ n.config.selectableId ? (o(), a("div", lt, [
769
+ r("input", {
770
+ class: "form-check-input",
771
+ type: "checkbox",
772
+ id: l[n.config.selectableId],
773
+ onChange: (w) => l.selected = !l.selected
774
+ }, null, 40, nt)
775
+ ])) : p("", !0),
776
+ (o(!0), a(_, null, C(n.config.smColCount, (w) => (o(), a("div", {
777
+ class: "t2l-card-col",
778
+ key: w
779
+ }, [
780
+ (o(!0), a(_, null, C(d.value, (L) => (o(), a(_, { key: L }, [
781
+ v(L, w) ? (o(), a("div", ot, [
782
+ r("span", st, h(v(L, w).label), 1),
783
+ r("div", {
784
+ innerHTML: g(v(L, w), l)
785
+ }, null, 8, it)
786
+ ])) : p("", !0)
787
+ ], 64))), 128))
788
+ ]))), 128)),
789
+ r("div", at, [
790
+ i.config.actions ? (o(), D(A, {
791
+ key: 0,
792
+ item: l,
793
+ options: i.config.actions,
794
+ label: "...",
795
+ id: c.toString(),
796
+ right: !0
797
+ }, null, 8, ["item", "options", "id"])) : p("", !0)
798
+ ])
799
+ ]))), 128))
800
+ ]),
801
+ n.config.paginatorSettings ? (o(), D(Re, {
802
+ key: 0,
803
+ settings: n.config.paginatorSettings,
804
+ onPagesize: u[0] || (u[0] = (l) => n.$emit("pagesize", l)),
805
+ onPage: u[1] || (u[1] = (l) => n.$emit("page", l))
806
+ }, null, 8, ["settings"])) : p("", !0),
807
+ n.config.paginatorSettings ? p("", !0) : (o(), a("div", rt, " Elemek: " + h(i.items.length), 1))
808
+ ], 64));
809
+ }
810
+ }), dt = { class: "tlb-container d-flex flex-column flex-grow-1" }, ut = { class: "d-flex flex-row tlb-item" }, ct = { class: "d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item" }, pt = ["id"], vt = {
811
+ key: 0,
812
+ class: "d-flex id"
813
+ }, ft = { class: "d-flex flex-row align-items-center tlb-children-container" }, Lt = /* @__PURE__ */ $({
814
+ __name: "TextListBox",
815
+ props: {
816
+ items: {}
817
+ },
818
+ emits: ["deleted"],
819
+ setup(y) {
820
+ return (i, s) => {
821
+ const t = x("TextListBox", !0);
822
+ return o(), a("div", dt, [
823
+ (o(!0), a(_, null, C(i.items, (e) => (o(), a("div", {
824
+ class: "d-flex flex-column",
825
+ key: e.id
826
+ }, [
827
+ r("div", ut, [
828
+ r("div", ct, [
829
+ r("div", {
830
+ class: "d-flex flex-grow-1",
831
+ id: e.id
832
+ }, h(e.label), 9, pt),
833
+ e.showId ? (o(), a("div", vt, h(e.id), 1)) : p("", !0)
834
+ ]),
835
+ e.hideDelete ? p("", !0) : (o(), D(G, {
836
+ key: 0,
837
+ icon: "fa-solid fa-trash",
838
+ onClick: (d) => i.$emit("deleted", e.id)
839
+ }, null, 8, ["onClick"]))
840
+ ]),
841
+ r("div", ft, [
842
+ e.childrend ? (o(), D(t, {
843
+ key: 0,
844
+ items: e.childrend,
845
+ showId: e.showId,
846
+ hideDelete: e.hideDelete
847
+ }, null, 8, ["items", "showId", "hideDelete"])) : p("", !0)
848
+ ])
849
+ ]))), 128))
850
+ ]);
851
+ };
852
+ }
853
+ }), mt = {
854
+ key: 0,
855
+ class: "toast-container position-fixed bottom-0 start-50 translate-middle-x p-4 toast-zindex"
856
+ }, gt = { class: "toast-header" }, yt = { class: "me-auto" }, bt = { class: "text-body-secondary" }, kt = ["onClick"], ht = ["innerHTML"], j = 500, _t = /* @__PURE__ */ $({
857
+ __name: "ToastComponent",
858
+ props: {
859
+ defaultDisplayDuration: {}
860
+ },
861
+ setup(y, { expose: i }) {
862
+ const s = y, t = m([]);
863
+ return i({
864
+ addToast: (d) => {
865
+ d.displayDuration || (d.displayDuration = s.defaultDisplayDuration), d.id = /* @__PURE__ */ new Date(), t.value.filter(function(v) {
866
+ return v.id !== d.id;
867
+ }), t.value.push(d);
868
+ }
869
+ }), setInterval(() => {
870
+ t.value = t.value.map((d) => (d.displayDuration -= j, d)), t.value = t.value.filter((d) => d.displayDuration > 0);
871
+ }, j), (d, v) => t.value.length > 0 ? (o(), a("div", mt, [
872
+ (o(!0), a(_, null, C(t.value, (g) => (o(), a("div", {
873
+ key: g.message,
874
+ class: T(["toast d-block", {
875
+ "toast-info": g.type === "info",
876
+ "toast-success": g.type === "success",
877
+ "toast-warning": g.type === "warning",
878
+ "toast-error": g.type === "error"
879
+ }]),
880
+ role: "alert",
881
+ "aria-live": "assertive",
882
+ "aria-atomic": "true"
883
+ }, [
884
+ r("div", gt, [
885
+ r("strong", yt, h(g.title), 1),
886
+ r("small", bt, h(g.id.toLocaleTimeString()), 1),
887
+ r("button", {
888
+ type: "button",
889
+ class: "btn-close",
890
+ "data-bs-dismiss": "toast",
891
+ "aria-label": "Close",
892
+ onClick: (f) => t.value = t.value.filter((n) => n.id !== g.id)
893
+ }, null, 8, kt)
894
+ ]),
895
+ r("div", {
896
+ class: "toast-body",
897
+ innerHTML: g.message
898
+ }, null, 8, ht)
899
+ ], 2))), 128))
900
+ ])) : p("", !0);
901
+ }
902
+ }), It = /* @__PURE__ */ $({
903
+ __name: "ToastWrapper",
904
+ setup(y) {
905
+ const i = m(), s = [
906
+ {
907
+ id: "toast-notification-message",
908
+ handler: (t) => {
909
+ let e = t.detail;
910
+ i.value.addToast({
911
+ title: e.title,
912
+ message: e.message,
913
+ type: e.severity,
914
+ displayDuration: e.displayDuration
915
+ });
916
+ }
917
+ },
918
+ {
919
+ id: "fetch-error",
920
+ handler: (t) => {
921
+ let e = t.detail;
922
+ i.value.addToast({
923
+ title: e.title,
924
+ message: e.message,
925
+ type: "error",
926
+ displayDuration: 1e4
927
+ });
928
+ }
929
+ }
930
+ ];
931
+ return M(() => {
932
+ s.forEach((t) => window.addEventListener(t.id, t.handler));
933
+ }), W(() => {
934
+ s.forEach((t) => window.removeEventListener(t.id, t.handler));
935
+ }), (t, e) => (o(), D(_t, {
936
+ ref_key: "toast",
937
+ ref: i,
938
+ defaultDisplayDuration: 5e3
939
+ }, null, 512));
940
+ }
941
+ });
942
+ export {
943
+ J as CheckBox,
944
+ wt as CheckBoxList,
945
+ V as DropDown,
946
+ ve as DropDownCallBack,
947
+ A as DropDownMenu,
948
+ we as FilterCompact,
949
+ Se as FilterControl,
950
+ G as IconButton,
951
+ Re as PaginatorControl,
952
+ Pe as RadioButton,
953
+ Dt as RadioButtonGroup,
954
+ Bt as SpinningProgress,
955
+ Tt as TableToList,
956
+ Lt as TextListBox,
957
+ _t as ToastComponent,
958
+ It as ToastWrapper
959
+ };