admins-components 1.1.0 → 1.2.0

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