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