admins-components 1.0.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.
@@ -0,0 +1 @@
1
+ ::-webkit-scrollbar{width:.7rem}::-webkit-scrollbar-track{border-radius:.7rem;background-color:#ecebeb}::-webkit-scrollbar-thumb{border-radius:.7rem;background-color:#dbd9d9}.clickable{cursor:pointer}.align-items-base{align-items:baseline}.label{font-weight:700}.tlb-container{cursor:default}.tlb-children-container{cursor:default;padding-left:1rem}.tlb-item:hover{background-color:var(--bs-gray-100)}.tlb-item .id{color:var(--bs-gray-500)}.ps-header{border:4px solid #e25900;background-color:#e25900!important;color:#fff}.ps-body{padding:.5rem;border:1px solid var(--bs-gray-400);max-height:300px;overflow-y:auto}.dd-flex{display:flex;flex:1}.dd-button{width:100%}.dd-label{display:flex;flex:1;justify-content:center}.dd-menu{position:absolute;z-index:1000;background-color:#fff;display:block;width:auto;border:1px solid var(--bs-gray-600);border-radius:5px}.dd-item-list{overflow:auto;max-height:400px}.dd-item{font-size:1rem;font-weight:400;cursor:pointer;padding:.2rem .5rem}.dd-item__icon{margin-right:.25rem}.dd-item:hover{background-color:var(--bs-gray-200)}.dd-toggle:after{display:inline-block;width:0;height:0;margin:auto auto auto .255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.ddc-flex{display:flex;flex:1!important}.ddc-button{width:100%}.ddc-menu{position:absolute;z-index:1000;background-color:#fff;display:block;border:1px solid var(--bs-gray-200);border-radius:5px;width:auto}.ddc-row{display:flex;flex:1;align-items:center;gap:1rem}.ddc-item{display:flex;flex-direction:row;gap:1rem;align-items:center;font-size:1rem;font-weight:400;cursor:pointer;padding:.2rem .5rem;width:auto;min-width:150px}.ddc-item:hover{background-color:var(--bs-gray-200)}.ddc-label{display:flex;flex:1}.ddc-icon{display:flex}.dropdown-toggle:after{margin:auto}.ddm-menu{position:absolute;z-index:1000;background-color:#fff;display:block;border:1px solid var(--bs-gray-200);border-radius:5px}.ddm-item{display:flex;gap:1rem;align-items:center;cursor:pointer;padding:.5rem;max-height:400px}.ddm-item:hover{background-color:var(--bs-gray-400)}.ddm-item:active{background-color:var(--bs-gray-200)}.ddm-label{display:flex;flex:1;justify-content:center;align-items:center;min-height:1.5rem}.fltrc-container{display:flex;flex:1;flex-direction:row;gap:1rem}.fltrctrl-container{display:flex;flex:1}.form-date{display:flex;flex-shrink:1;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-clip:padding-box;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.ib-container{display:flex;justify-content:end;padding-right:1rem}.ib-button{height:2rem;width:2rem;border-radius:1rem;cursor:pointer;display:flex;align-items:center;justify-content:center}.ib-button:hover{background-color:var(--bs-gray-400)}.ib-button:active{background-color:var(--bs-gray-200)}.ib-button-active{background-color:var(--bs-gray-100)}.ib-button-big{font-size:1.5rem}.pc-container{display:flex;gap:.5rem;padding:1rem;justify-content:center;align-items:center}.pc-input{max-width:200px}.pc-dropdown{max-width:100px;min-width:50px}.t2l-table-view{display:flex;flex-direction:column}.t2l-table-header-label{background-color:var(--bs-gray-200);font-weight:700;border-bottom:1px solid var(--bs-gray-400);padding:.5rem;flex-direction:row;align-items:center}.t2l-table-header-filter{background-color:var(--bs-gray-200);font-weight:700;border-bottom:1px solid var(--bs-gray-400);padding:.3rem;flex-direction:row;align-items:center}.t2l-rows{flex-direction:column;flex:1;overflow-y:auto}.t2l-row{border-bottom:1px solid var(--bs-gray-400);padding:.3rem;display:flex;flex-direction:row}.t2l-cell{padding:.3rem;display:flex;flex:1;align-items:center}.t2l-select{padding:.3rem;display:flex;flex:1;align-items:center;max-width:3rem}.t2l-cell-label{display:none}.t2l-actions{display:flex;flex-direction:row;gap:.5rem}.t2l-card-view{display:none;flex-direction:column}.t2l-card-col{display:flex;flex-direction:column;flex:1;gap:1rem;overflow-y:auto;align-items:start}.t2l-card-select{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1;max-width:2rem}.t2l-card-filters{flex-direction:column;gap:.5rem;padding:.5rem;background-color:var(--bs-gray-200)}.t2l-property{display:flex;flex-direction:column;flex:1}.t2l-label{font-weight:700}.t2l-footer{padding:1rem;background-color:var(--bs-gray-200)}@media (max-width: 1024px){.t2l-table-view{display:none}.t2l-card-view{display:flex}}.options-header{cursor:pointer;font-size:.8rem;padding:.2rem;border-top:1px solid var(--bs-gray-200);border-right:1px solid var(--bs-gray-200);border-top-right-radius:3px}.options-header:hover{opacity:.7}.options-body{font-size:.8rem;padding:1rem;background-color:var(--bs-gray-100)}.options-header-label{font-weight:700}.toast-info{background:var(--bs-blue);color:#fff}.toast-success{background:var(--bs-green);color:#fff}.toast-warning{background:var(--bs-orange);color:#fff}.toast-error{background:var(--bs-red);color:#fff}.toast-zindex{z-index:1100}.cbl-container[data-v-6e3cb396]{display:flex;flex-direction:column}.cbl-childrend-container[data-v-6e3cb396]{display:flex;flex-direction:column;padding-left:1rem}
@@ -0,0 +1,948 @@
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
+ };
@@ -0,0 +1 @@
1
+ (function(k,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(k=typeof globalThis<"u"?globalThis:k||self,e(k["admins-components"]={},k.Vue))})(this,function(k,e){"use strict";const O={class:"form-check"},W=["checked","id"],A=["for"],$=e.defineComponent({__name:"CheckBox",props:{id:{},label:{},checked:{type:Boolean}},emits:["changed"],setup(c,{emit:r}){return(o,t)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",checked:o.checked,value:"",id:o.id,onChange:t[0]||(t[0]=l=>o.$emit("changed",{id:o.id,checked:l.target.checked}))},null,40,W),e.createElementVNode("label",{class:"form-check-label",for:o.id},e.toDisplayString(o.label),9,A)]))}}),q={class:"cbl-childrend-container"},M=((c,r)=>{const o=c.__vccOpts||c;for(const[t,l]of r)o[t]=l;return o})(e.defineComponent({__name:"CheckBoxList",props:{items:{},callback:{type:Function}},setup(c){return(r,o)=>{const t=e.resolveComponent("CheckBoxList",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"cbl-container"},[e.createVNode($,{id:l.id,label:l.label,checked:l.checked,onChanged:o[0]||(o[0]=a=>r.callback(a.id,a.checked))},null,8,["id","label","checked"]),e.createElementVNode("div",q,[l.childrend?(e.openBlock(),e.createBlock(t,{key:0,items:l.childrend,callback:r.callback},null,8,["items","callback"])):e.createCommentVNode("",!0)])]))),128)}}}),[["__scopeId","data-v-6e3cb396"]]),K=["id"],U=["disabled"],J={class:"dd-label"},Q={class:"dd-item-list"},X=["onClick"],C=e.defineComponent({__name:"DropDown",props:{id:{},label:{},selected:{},options:{},opentop:{type:Boolean},disableFilter:{type:Boolean},storeselected:{type:Boolean},filterevent:{type:Boolean},disabled:{type:Boolean}},emits:["selected","filtered"],setup(c,{emit:r}){const o=c;e.watch(o.options,()=>{o.filterevent&&(n.value=o.options.value)}),e.watch(()=>o.selected,()=>{f()}),e.watch(()=>o.label,()=>{f()});const t=r,l=g=>{o.storeselected||(m.value=g.label),t("selected",g)},a="törlés",m=e.ref(""),f=()=>{if(o.options.value){const g=o.options.value.find(u=>u.id==o.selected);g?m.value=g.label:(d(""),m.value=o.label)}};e.onMounted(()=>{o.label&&(m.value=o.label),f(),p="",document.addEventListener("click",function(){h.value=="block"&&(h.value="none")}),window.addEventListener("scrolled",function(){h.value=="block"&&(h.value="none")}),B()});let p="";const d=g=>{p=g,o.filterevent?t("filtered",g):g==""?n.value=o.options.value:n.value=o.options.value.filter(u=>u.label.toLowerCase().includes(g.toLowerCase()))},n=e.ref([]),i=()=>{l({label:o.label,id:""}),d("")},s=()=>{if(h.value=="block"){h.value="none";return}setTimeout(()=>{h.value="block"},10),setTimeout(B,20)},B=()=>{const g=y.value,u=_.value;o.opentop?u.style.top=g.getBoundingClientRect().y-u.offsetHeight+"px":(u.style.top=g.getBoundingClientRect().y+g.offsetHeight+"px",g.getBoundingClientRect().y-u.getBoundingClientRect().y!=-g.offsetHeight&&(u.style.top=parseInt(u.style.top.substring(0,u.style.top.length-2))+(g.getBoundingClientRect().y-u.getBoundingClientRect().y)+g.offsetHeight+"px")),I.value&&I.value.focus()},y=e.ref(null),_=e.ref(null),h=e.ref("none"),I=e.ref(null);return(g,u)=>(e.openBlock(),e.createElementBlock("div",{id:g.id,class:"dd-flex"},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:y,class:"btn btn-outline-secondary dd-toggle dd-flex",type:"button",disabled:g.disabled,onClick:u[0]||(u[0]=b=>{d(e.unref(p)),s()})},[e.createElementVNode("div",J,e.toDisplayString(m.value),1)],8,U),e.createElementVNode("div",{class:"dd-menu",style:e.normalizeStyle({display:h.value}),ref_key:"DropDownMenu",ref:_},[m.value!=o.label?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-secondary dd-button",onClick:u[1]||(u[1]=b=>i())},e.toDisplayString(a))):e.createCommentVNode("",!0),g.disableFilter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"ddSearch",ref:I,type:"text ",class:"form-control",placeholder:"keresés",onInput:u[2]||(u[2]=b=>d(b.target.value)),onClick:u[3]||(u[3]=b=>b.stopPropagation())},null,544)),e.createElementVNode("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"dd-item",onClick:mt=>l(b)},[b.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([b.icon,"dd-item__icon"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(e.toDisplayString(b.label),1)],8,X))),128))])],4)],8,K))}}),Y=["id"],Z=["disabled"],x={class:"ddc-row"},v={class:"ddc-label"},ee={class:"dd-item-list"},te=["onClick"],oe={class:"ddc-item"},le={class:"ddc-label"},ne="törlés",D=e.defineComponent({__name:"DropDownCallBack",props:{id:{},default:{},selected:{},enabled:{type:Boolean},options:{}},setup(c){const r=c,o=n=>{n==r.default&&t.value.callback(""),t.value=n,t.value.callback(t.value.value)},t=e.ref(r.default),l=()=>{if(r.selected&&r.options.value){const n=r.options.value.find(i=>i.value==r.selected);n&&(t.value=n)}};e.onMounted(()=>{l(),document.addEventListener("click",function(){d.value=="block"&&(d.value="none")})});const a=()=>{setTimeout(()=>{d.value="block"},10),setTimeout(()=>{p.value=m.value.offsetHeight},20)},m=e.ref(null),f=e.ref(null),p=e.ref(0),d=e.ref("none");return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"ddc-flex",id:n.id},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:m,class:"btn btn-outline-secondary ddc-button",type:"button",disabled:!n.enabled,onClick:i[0]||(i[0]=s=>a())},[e.createElementVNode("span",x,[e.createElementVNode("i",{class:e.normalizeClass([t.value.icon,"ddc-icon"])},null,2),e.createElementVNode("span",v,e.toDisplayString(t.value.label),1)])],8,Z),e.createElementVNode("div",{class:"ddc-menu",style:e.normalizeStyle({display:d.value,"margin-top":p.value+"px"}),ref_key:"DropDownMenu",ref:f},[t.value!=r.default?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-secondary ddc-button",onClick:i[1]||(i[1]=s=>o(r.default))},e.toDisplayString(ne))):e.createCommentVNode("",!0),e.createElementVNode("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.label,class:"ddc-item",onClick:B=>o(s)},[e.createElementVNode("span",oe,[e.createElementVNode("i",{class:e.normalizeClass([s.icon,"ddc-icon"])},null,2),e.createElementVNode("span",le,e.toDisplayString(s.label),1)])],8,te))),128))])],4)],8,Y))}}),se=["id"],ae={key:0,class:"ddm-label"},ie={key:1,class:"ddm-label"},re=["onClick"],E=e.defineComponent({__name:"DropDownMenu",props:{label:{},icon:{},options:{},item:{},id:{},right:{type:Boolean}},setup(c){const r=c;e.onMounted(()=>{document.addEventListener("click",function(){o.value&&(o.value=!1)})});const o=e.ref(!1),t=()=>{setTimeout(()=>{o.value=!0},10),setTimeout(l,20)},l=()=>{const p=a.value,d=m.value;d.style.top=p.getBoundingClientRect().y+p.offsetHeight+"px",p.getBoundingClientRect().y-d.getBoundingClientRect().y!=-p.offsetHeight&&(d.style.top=parseInt(d.style.top.substring(0,d.style.top.length-2))+(p.getBoundingClientRect().y-d.getBoundingClientRect().y)+p.offsetHeight+"px"),d.style.left=p.getBoundingClientRect().x-(r.right?100:0)+"px"},a=e.ref(null),m=e.ref(null),f=e.ref(0);return(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex",id:p.id},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:a,class:"btn btn-outline-secondary",type:"button",onClick:d[0]||(d[0]=n=>t())},[p.label?(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(p.label),1)):e.createCommentVNode("",!0),p.icon?(e.openBlock(),e.createElementBlock("span",ie,[e.createElementVNode("i",{class:e.normalizeClass(p.icon)},null,2)])):e.createCommentVNode("",!0)],512),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ddm-menu",ref_key:"DropDownMenu",ref:m,style:e.normalizeStyle({"margin-top":f.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.options,n=>(e.openBlock(),e.createElementBlock("div",{key:n.icon,class:"ddm-item",onClick:i=>n.command(p.item)},[e.createElementVNode("i",{class:e.normalizeClass(n.icon)},null,2),e.createTextVNode(e.toDisplayString(n.label),1)],8,re))),128))],4)):e.createCommentVNode("",!0)],8,se))}}),ce={class:"fltrc-container"},de={class:"fltrc-container"},me=["placeholder","value"],pe={key:1,class:"d-flex flex-row input-group align-items-center"},fe=["value"],ke=["value"],w=e.defineComponent({__name:"FilterCompact",props:{items:{}},setup(c){const r=c,o=e.ref(0),t=e.ref(0),l=e.computed(()=>r.items[o.value].filter),a=n=>{let i=r.items[t.value];i.filter.filtered(i.filter.key,""),o.value=n,t.value=n,d.value+=1},m=e.ref(void 0);e.onMounted(()=>{let n=[];for(let i=0;i<r.items.length;i++)n.push({icon:r.items[i].icon,label:r.items[i].label,command:()=>a(i)});m.value=n});const f=e.ref({}),p=e.ref(void 0),d=e.ref(0);return(n,i)=>(e.openBlock(),e.createElementBlock("div",ce,[m.value?(e.openBlock(),e.createBlock(E,{key:0,id:"ddm",icon:n.items[o.value].icon,item:n.items[o.value],label:"",options:m.value},null,8,["icon","item","options"])):e.createCommentVNode("",!0),e.createElementVNode("div",de,[l.value.type=="text"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"form-control",placeholder:l.value.placeholder,value:l.value.defaultv??"",onInput:i[0]||(i[0]=s=>{l.value.filtered(l.value.key,s.target.value),l.value.defaultv=s.target.value})},null,40,me)):e.createCommentVNode("",!0),l.value.type=="date"?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("input",{type:"date",class:"form-control",value:l.value.defFrom??"",onInput:i[1]||(i[1]=s=>{f.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,f.value)})},null,40,fe),i[5]||(i[5]=e.createElementVNode("span",{class:"input-group-text"},"-",-1)),e.createElementVNode("input",{type:"date",class:"form-control",value:l.value.defTill??"",onInput:i[2]||(i[2]=s=>{f.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,f.value)})},null,40,ke)])):e.createCommentVNode("",!0),l.value.type=="dropdown"?(e.openBlock(),e.createBlock(C,{key:d.value,selected:p.value,options:l.value.options,filterevent:l.value.filterevent,onFiltered:i[3]||(i[3]=s=>{l.value.onfiltered&&l.value.onfiltered(s)}),id:l.value.key,label:l.value.label,onSelected:i[4]||(i[4]=s=>l.value.filtered(l.value.key,s.id))},null,8,["selected","options","filterevent","id","label"])):e.createCommentVNode("",!0)])]))}}),ge={class:"fltrctrl-container"},ue=["placeholder","value"],Be={key:1,class:"d-flex flex-row input-group align-items-center"},ye=["value"],be=["value"],V=e.ref({}),T=e.defineComponent({__name:"FilterControl",props:{item:{}},setup(c){const r=c;e.onMounted(()=>{var t;if(r.item.type=="dropdown"){const l=r.item;o.value=(t=l.options.value.find(a=>a.id==r.item.defaultv))==null?void 0:t.id}});const o=e.ref(void 0);return(t,l)=>(e.openBlock(),e.createElementBlock("div",ge,[t.item.type=="text"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"form-control",placeholder:t.item.placeholder,value:t.item.defaultv??"",onInput:l[0]||(l[0]=a=>t.item.filtered(t.item.key,a.target.value))},null,40,ue)):e.createCommentVNode("",!0),t.item.type=="date"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("input",{type:"date",class:"form-control",value:t.item.defFrom??"",onInput:l[1]||(l[1]=a=>{V.value.from=a.target.value==""?null:a.target.value,t.item.filtered(t.item.key,V.value)})},null,40,ye),l[5]||(l[5]=e.createElementVNode("span",{class:"input-group-text"},"-",-1)),e.createElementVNode("input",{type:"date",class:"form-control",value:t.item.defTill??"",onInput:l[2]||(l[2]=a=>{V.value.untill=a.target.value==""?null:a.target.value,t.item.filtered(t.item.key,V.value)})},null,40,be)])):e.createCommentVNode("",!0),t.item.type=="dropdown"?(e.openBlock(),e.createBlock(C,{key:2,selected:o.value,options:e.ref(t.item.options),filterevent:t.item.filterevent,onFiltered:l[3]||(l[3]=a=>{t.item.onfiltered&&t.item.onfiltered(a)}),id:t.item.key,label:t.item.label,onSelected:l[4]||(l[4]=a=>t.item.filtered(t.item.key,a.id))},null,8,["selected","options","filterevent","id","label"])):e.createCommentVNode("",!0)]))}}),N=e.defineComponent({__name:"IconButton",props:{icon:{},active:{type:Boolean},big:{type:Boolean}},emits:["click"],setup(c,{emit:r}){const o=c,t=e.computed(()=>`${o.icon} ${o.big?"ib-button-big":""}`),l=r;return(a,m)=>(e.openBlock(),e.createElementBlock("div",{onClick:m[0]||(m[0]=f=>l("click")),class:"ib-container"},[e.createElementVNode("div",{class:e.normalizeClass(["ib-button",{"ib-button-active":a.active}])},[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)],2)]))}}),_e={class:"pc-container"},he=["value","max"],S=e.defineComponent({__name:"PaginatorControl",props:{settings:{}},emits:["pagesize","page"],setup(c,{emit:r}){const o=c,t=r,l=()=>{let d=e.ref([]);return o.settings.value.sizes.forEach(n=>d.value.push({label:n.toString(),id:n.toString()})),d},a=e.ref(1);e.watch(()=>o.settings.value,()=>{a.value=1});const m=e.computed(()=>Math.floor(o.settings.value.total/o.settings.value.pagesize)+1),f=()=>{a.value>1&&(a.value-=1,t("page",a.value))},p=()=>{a.value<m.value&&(a.value+=1,t("page",a.value))};return(d,n)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("button",{class:"btn btn-outline-secondary",onClick:f},"<"),e.createElementVNode("input",{class:"form-control pc-input",type:"number",value:a.value,min:"1",max:m.value,onChange:n[0]||(n[0]=i=>d.$emit("page",i.target.value))},null,40,he),e.createTextVNode("/"+e.toDisplayString(m.value)+" ",1),e.createElementVNode("button",{class:"btn btn-outline-secondary",onClick:p},">"),e.createVNode(C,{opentop:!0,class:"pc-dropdown",id:"pagecount",label:"10",selected:d.settings.value.pagesize.toString(),options:l(),onSelected:n[1]||(n[1]=i=>{a.value=1,d.$emit("pagesize",parseInt(i.id))})},null,8,["selected","options"])]))}}),Ce={class:"form-check"},Ee=["name","id","checked"],Ve=["for"],L=e.defineComponent({__name:"RadioButton",props:{group:{},label:{},id:{},selected:{type:Boolean}},emits:["selected"],setup(c,{emit:r}){return(o,t)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("input",{class:"form-check-input",type:"radio",name:o.group,id:o.id,checked:o.selected,onChange:t[0]||(t[0]=l=>o.$emit("selected",o.id))},null,40,Ee),e.createElementVNode("label",{class:"form-check-label",for:o.id},e.toDisplayString(o.label),9,Ve)]))}}),Ne={class:"d-flex flex-column gap-2 justify-content-around"},z=e.defineComponent({__name:"RadioButtonGroup",props:{group:{},items:{}},emits:["selected"],setup(c,{emit:r}){return(o,t)=>(e.openBlock(),e.createElementBlock("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,l=>(e.openBlock(),e.createBlock(L,{key:l.id,id:l.id,label:l.label,group:o.group,selected:l.selected,onSelected:t[0]||(t[0]=a=>o.$emit("selected",a))},null,8,["id","label","group","selected"]))),128))]))}}),$e={key:0,class:"spinner-border",role:"status"},R=e.defineComponent({__name:"SpinningProgress",props:{loading:{type:Boolean}},setup(c){return(r,o)=>r.loading?(e.openBlock(),e.createElementBlock("div",$e,o[0]||(o[0]=[e.createElementVNode("span",{class:"visually-hidden"},"Loading...",-1)]))):e.createCommentVNode("",!0)}}),De={class:"t2l-table-view t2l-table-header-label"},we={key:0,class:"t2l-select"},Te={key:1,class:"t2l-cell"},Se={class:"t2l-table-view t2l-table-header-filter"},Le={key:0,class:"t2l-select"},Fe={key:1,class:"t2l-cell"},Ie={class:"t2l-table-view t2l-rows"},Me={key:0,class:"t2l-select"},ze=["id","onChange"],Re=["innerHTML"],He={key:1,class:"t2l-cell t2l-actions"},Pe=["title","disabled","onClick"],je={class:"t2l-card-view t2l-card-filters"},Ge={class:"t2l-card-filter-order"},Oe={class:"t2l-card-filter-search"},We={class:"t2l-card-view t2l-rows"},Ae={key:0,class:"t2l-card-select"},qe=["id","onChange"],Ke={key:0,class:"t2l-property"},Ue={class:"t2l-label"},Je=["innerHTML"],Qe={class:"d-flex align-items-center"},Xe={key:1,class:"d-flex justify-content-center t2l-footer"},H=e.defineComponent({__name:"TableToList",props:{items:{},config:{}},emits:["pagesize","page"],setup(c,{emit:r}){const o=c,t=e.computed(()=>o.config.columns.filter(n=>n.visible!=!1)),l=e.computed(()=>o.config.columns.filter(n=>n.visible!=!1&&n.filter)),a=e.computed(()=>t.value.filter(n=>n.sort&&n.sort.active&&n.sort.active.value)),m=e.computed(()=>Math.ceil(t.value.length/o.config.smColCount)),f=(n,i)=>{var s=n-1+(i-1)*m.value;return s<t.value.length?t.value[s]:null},p=(n,i)=>n.converter?n.converter(i[n.property],i):i[n.property],d=n=>{if(n.sort&&n.sort.active){let i=!n.sort.active.value;o.config.columns.forEach(s=>{s.sort&&s.sort.active&&(s.sort.active.value=!1)}),n.sort.active.value=i,n.sort.callback(i?n.property:"")}};return(n,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",De,[n.config.selectableId?(e.openBlock(),e.createElementBlock("span",we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,s=>{var B,y;return e.openBlock(),e.createElementBlock("span",{class:"t2l-cell",key:s.property},[s.sort?(e.openBlock(),e.createBlock(N,{key:0,icon:s.sort.icon,onClick:_=>d(s),active:(y=(B=s.sort)==null?void 0:B.active)==null?void 0:y.value},null,8,["icon","onClick","active"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label),1)])}),128)),n.config.actionHeader?(e.openBlock(),e.createElementBlock("span",Te,e.toDisplayString(n.config.actionHeader),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Se,[n.config.selectableId?(e.openBlock(),e.createElementBlock("span",Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,s=>(e.openBlock(),e.createElementBlock("span",{class:"t2l-cell",key:s.label},[s.filter?(e.openBlock(),e.createBlock(T,{key:0,item:s.filter},null,8,["item"])):e.createCommentVNode("",!0)]))),128)),n.config.actionHeader?(e.openBlock(),e.createElementBlock("span",Fe)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,s=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"t2l-row"},[n.config.selectableId?(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",id:s[n.config.selectableId],onChange:B=>s.selected=!s.selected},null,40,ze)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,B=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-cell",key:B.property,innerHTML:p(B,s)},null,8,Re))),128)),n.config.actions?(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.config.actions,B=>(e.openBlock(),e.createElementBlock("button",{key:B,type:"button",class:"btn btn-outline-secondary",title:B.label,disabled:!B.enabled(s),onClick:y=>B.command(s)},[e.createElementVNode("i",{class:e.normalizeClass(B.icon)},null,2)],8,Pe))),128))])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",je,[e.createElementVNode("div",Ge,[e.createVNode(D,{id:"card-filter-order",default:{icon:"fa-solid fa-chevron-down",label:"rendezés"},selected:a.value.length>0?a.value[0].property:"",enabled:n.config.sortEnabled,options:e.ref(t.value.filter(s=>s.sort).map(s=>({icon:s.sort.icon,label:s.sort.label,value:s.property,callback:s.sort.callback})))},null,8,["selected","enabled","options"])]),e.createElementVNode("div",Oe,[e.createVNode(w,{items:l.value.map(s=>({filter:s.filter,icon:s.filterIcon,label:s.label}))},null,8,["items"])])]),e.createElementVNode("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,(s,B)=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-row",key:B},[n.config.selectableId?(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",id:s[n.config.selectableId],onChange:y=>s.selected=!s.selected},null,40,qe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.config.smColCount,y=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-card-col",key:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,_=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_},[f(_,y)?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("span",Ue,e.toDisplayString(f(_,y).label),1),e.createElementVNode("div",{innerHTML:p(f(_,y),s)},null,8,Je)])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",Qe,[o.config.actions?(e.openBlock(),e.createBlock(E,{key:0,item:s,options:o.config.actions,label:"...",id:B.toString(),right:!0},null,8,["item","options","id"])):e.createCommentVNode("",!0)])]))),128))]),n.config.paginatorSettings?(e.openBlock(),e.createBlock(S,{key:0,settings:n.config.paginatorSettings,onPagesize:i[0]||(i[0]=s=>n.$emit("pagesize",s)),onPage:i[1]||(i[1]=s=>n.$emit("page",s))},null,8,["settings"])):e.createCommentVNode("",!0),n.config.paginatorSettings?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe," Elemek: "+e.toDisplayString(o.items.length),1))],64))}}),Ye={class:"tlb-container d-flex flex-column flex-grow-1"},Ze={class:"d-flex flex-row tlb-item"},xe={class:"d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item"},ve=["id"],et={key:0,class:"d-flex id"},tt={class:"d-flex flex-row align-items-center tlb-children-container"},P=e.defineComponent({__name:"TextListBox",props:{items:{}},emits:["deleted"],setup(c,{emit:r}){return(o,t)=>{const l=e.resolveComponent("TextListBox",!0);return e.openBlock(),e.createElementBlock("div",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,a=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex flex-column",key:a.id},[e.createElementVNode("div",Ze,[e.createElementVNode("div",xe,[e.createElementVNode("div",{class:"d-flex flex-grow-1",id:a.id},e.toDisplayString(a.label),9,ve),a.showId?(e.openBlock(),e.createElementBlock("div",et,e.toDisplayString(a.id),1)):e.createCommentVNode("",!0)]),a.hideDelete?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:0,icon:"fa-solid fa-trash",onClick:m=>o.$emit("deleted",a.id)},null,8,["onClick"]))]),e.createElementVNode("div",tt,[a.childrend?(e.openBlock(),e.createBlock(l,{key:0,items:a.childrend,showId:a.showId,hideDelete:a.hideDelete},null,8,["items","showId","hideDelete"])):e.createCommentVNode("",!0)])]))),128))])}}}),ot={key:0,class:"toast-container position-fixed bottom-0 start-50 translate-middle-x p-4 toast-zindex"},lt={class:"toast-header"},nt={class:"me-auto"},st={class:"text-body-secondary"},at=["onClick"],it=["innerHTML"],j=500,F=e.defineComponent({__name:"ToastComponent",props:{defaultDisplayDuration:{}},setup(c,{expose:r}){const o=c,t=e.ref([]);return r({addToast:a=>{a.displayDuration||(a.displayDuration=o.defaultDisplayDuration),a.id=new Date,t.value.filter(function(m){return m.id!==a.id}),t.value.push(a)}}),setInterval(()=>{t.value=t.value.map(a=>(a.displayDuration-=j,a)),t.value=t.value.filter(a=>a.displayDuration>0)},j),(a,m)=>t.value.length>0?(e.openBlock(),e.createElementBlock("div",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.message,class:e.normalizeClass(["toast d-block",{"toast-info":f.type==="info","toast-success":f.type==="success","toast-warning":f.type==="warning","toast-error":f.type==="error"}]),role:"alert","aria-live":"assertive","aria-atomic":"true"},[e.createElementVNode("div",lt,[e.createElementVNode("strong",nt,e.toDisplayString(f.title),1),e.createElementVNode("small",st,e.toDisplayString(f.id.toLocaleTimeString()),1),e.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close",onClick:p=>t.value=t.value.filter(d=>d.id!==f.id)},null,8,at)]),e.createElementVNode("div",{class:"toast-body",innerHTML:f.message},null,8,it)],2))),128))])):e.createCommentVNode("",!0)}}),G=e.defineComponent({__name:"ToastWrapper",setup(c){const r=e.ref(),o=[{id:"toast-notification-message",handler:t=>{let l=t.detail;r.value.addToast({title:l.title,message:l.message,type:l.severity,displayDuration:l.displayDuration})}},{id:"fetch-error",handler:t=>{let l=t.detail;r.value.addToast({title:l.title,message:l.message,type:"error",displayDuration:1e4})}}];return e.onMounted(()=>{o.forEach(t=>window.addEventListener(t.id,t.handler))}),e.onUnmounted(()=>{o.forEach(t=>window.removeEventListener(t.id,t.handler))}),(t,l)=>(e.openBlock(),e.createBlock(F,{ref_key:"toast",ref:r,defaultDisplayDuration:5e3},null,512))}}),rt={install(c){c.component("CheckBox",$),c.component("CheckBoxList",M),c.component("DropDown",C),c.component("DropDownMenu",E),c.component("DropDownCallBack",D),c.component("FilterCompact",w),c.component("FilterControl",T),c.component("IconButton",N),c.component("PaginatorControl",S),c.component("RadioButton",L),c.component("RadioButtonGroup",z),c.component("SpinningProgress",R),c.component("TableToList",H),c.component("TextListBox",P),c.component("ToastComponent",F),c.component("ToastWrapper",G)}};k.CheckBox=$,k.CheckBoxList=M,k.DropDown=C,k.DropDownCallBack=D,k.DropDownMenu=E,k.FilterCompact=w,k.FilterControl=T,k.IconButton=N,k.PaginatorControl=S,k.RadioButton=L,k.RadioButtonGroup=z,k.SpinningProgress=R,k.TableToList=H,k.TextListBox=P,k.ToastComponent=F,k.ToastWrapper=G,k.default=rt,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "admins-components",
3
+ "version": "1.0.0",
4
+ "description": "admins component",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "vite build"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "type": "commonjs",
18
+ "dependencies": {
19
+ "vue": "^3.5.13"
20
+ },
21
+ "devDependencies": {
22
+ "@rollup/plugin-commonjs": "^28.0.2",
23
+ "@rollup/plugin-node-resolve": "^16.0.0",
24
+ "@rollup/plugin-typescript": "^12.1.2",
25
+ "@vitejs/plugin-vue": "^5.2.1",
26
+ "rollup": "^4.34.9",
27
+ "sass-embedded": "^1.85.1",
28
+ "typescript": "^5.8.2",
29
+ "vite": "^6.2.0",
30
+ "vue-tsc": "^2.2.8"
31
+ }
32
+ }