admins-components 9.0.9 → 9.0.10
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.js +18 -17
- package/dist/admins-components100.js +250 -25
- package/dist/admins-components101.js +26 -27
- package/dist/admins-components102.js +25 -169
- package/dist/admins-components103.js +165 -61
- package/dist/admins-components104.js +61 -60
- package/dist/admins-components105.js +65 -28
- package/dist/admins-components106.js +28 -14
- package/dist/admins-components107.js +15 -26
- package/dist/admins-components108.js +26 -8
- package/dist/admins-components109.js +9 -4
- package/dist/admins-components110.js +4 -3
- package/dist/admins-components111.js +2 -2
- package/dist/admins-components112.js +3 -21
- package/dist/admins-components113.js +21 -14
- package/dist/admins-components114.js +14 -8
- package/dist/admins-components115.js +8 -13
- package/dist/admins-components116.js +11 -24
- package/dist/admins-components117.js +24 -81
- package/dist/admins-components118.js +82 -10
- package/dist/admins-components119.js +10 -4
- package/dist/admins-components120.js +5 -8
- package/dist/admins-components121.js +7 -6
- package/dist/admins-components122.js +6 -5
- package/dist/admins-components123.js +4 -13
- package/dist/admins-components124.js +11 -9
- package/dist/admins-components125.js +13 -30
- package/dist/admins-components126.js +30 -4
- package/dist/admins-components127.js +4 -29
- package/dist/admins-components128.js +29 -5
- package/dist/admins-components129.js +3 -3
- package/dist/admins-components13.js +1 -1
- package/dist/admins-components130.js +4 -7
- package/dist/admins-components131.js +7 -73
- package/dist/admins-components132.js +71 -26
- package/dist/admins-components133.js +27 -57
- package/dist/admins-components134.js +57 -22
- package/dist/admins-components135.js +21 -47
- package/dist/admins-components136.js +48 -29
- package/dist/admins-components137.js +31 -3
- package/dist/admins-components138.js +3 -179
- package/dist/admins-components139.js +176 -43
- package/dist/admins-components140.js +44 -35
- package/dist/admins-components141.js +34 -43
- package/dist/admins-components142.js +42 -137
- package/dist/admins-components143.js +134 -51
- package/dist/admins-components144.js +58 -7
- package/dist/admins-components145.js +6 -5
- package/dist/admins-components146.js +6 -76
- package/dist/admins-components147.js +76 -29
- package/dist/admins-components148.js +29 -1931
- package/dist/admins-components149.js +1748 -24628
- package/dist/admins-components15.js +9 -10
- package/dist/admins-components150.js +24810 -8
- package/dist/admins-components151.js +9 -7
- package/dist/admins-components152.js +7 -142
- package/dist/admins-components153.js +141 -8
- package/dist/admins-components154.js +3 -3
- package/dist/admins-components155.js +10 -0
- package/dist/admins-components157.js +161 -44
- package/dist/admins-components158.js +50 -8
- package/dist/admins-components159.js +8 -49
- package/dist/admins-components160.js +50 -6
- package/dist/admins-components161.js +6 -80
- package/dist/admins-components162.js +70 -48
- package/dist/admins-components163.js +30 -31
- package/dist/admins-components164.js +58 -8
- package/dist/admins-components165.js +8 -51
- package/dist/admins-components166.js +51 -8
- package/dist/admins-components167.js +10 -0
- package/dist/{admins-components168.js → admins-components169.js} +3 -3
- package/dist/admins-components18.js +90 -91
- package/dist/admins-components20.js +40 -40
- package/dist/admins-components77.js +4 -2
- package/dist/admins-components78.js +2 -2
- package/dist/admins-components87.js +1 -1
- package/dist/admins-components95.js +3 -3
- package/dist/admins-components98.js +19 -6
- package/dist/admins-components99.js +5 -250
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/admins-components156.js +0 -169
|
@@ -23,163 +23,162 @@ var ce = { class: "drp-input" }, le = { class: "c-truncate drp-input__single" },
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue"],
|
|
25
25
|
setup(_, { expose: A, emit: j }) {
|
|
26
|
-
let M = _, N = j, P = d(() => ({
|
|
26
|
+
let M = _, N = j, P = `drp-input-${se()}`, F = d(() => ({
|
|
27
27
|
...o,
|
|
28
28
|
...M.config
|
|
29
|
-
})),
|
|
29
|
+
})), I = b(null), L = b(null), { isOpen: R, dropdownStyle: Se } = ee(I, L, { isOutsideClick: (e, t, n) => {
|
|
30
30
|
let r = e.target;
|
|
31
31
|
return !(t?.contains(r) ?? !1) && !(n?.contains(r) ?? !1) && !(r instanceof Element && r.closest(".c-dropdown"));
|
|
32
32
|
} });
|
|
33
|
-
function
|
|
33
|
+
function z(e) {
|
|
34
34
|
return e ? {
|
|
35
35
|
local: new Date(e),
|
|
36
36
|
utc: e
|
|
37
37
|
} : null;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function B(e) {
|
|
40
40
|
return {
|
|
41
41
|
local: e,
|
|
42
|
-
utc: i(e,
|
|
42
|
+
utc: i(e, F.value.showTime)
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
function Ce(e) {
|
|
46
|
-
return e.local ?
|
|
46
|
+
return e.local ? B(t(e.local)) : e;
|
|
47
47
|
}
|
|
48
|
-
let we = d(() =>
|
|
49
|
-
function
|
|
48
|
+
let we = d(() => F.value.format ?? (F.value.showTime ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD"));
|
|
49
|
+
function V(e) {
|
|
50
50
|
return e ? n(new Date(e), we.value) : "...";
|
|
51
51
|
}
|
|
52
|
-
let
|
|
52
|
+
let H = b(z(M.modelValue?.fromUtc ?? null)), U = b(z(M.modelValue?.toUtc ?? null)), W = b(M.modelValue?.fromUtc ?? null), G = b(M.modelValue?.toUtc ?? null), K = d(() => W.value != null || G.value != null), Te = d(() => H.value?.local ?? null), Ee = d(() => U.value?.local ?? null), De = d(() => F.value.minDate ?? null), Oe = d(() => e(F.value.maxDate ?? null, Ee.value ?? null)), ke = d(() => r(F.value.minDate ?? null, Te.value ?? null)), Ae = d(() => F.value.maxDate ?? null);
|
|
53
53
|
w(() => M.modelValue, (e) => {
|
|
54
54
|
let t = e?.fromUtc ?? null, n = e?.toUtc ?? null;
|
|
55
|
-
|
|
56
|
-
}), w(
|
|
57
|
-
e &&
|
|
55
|
+
H.value = z(t), U.value = z(n), W.value = t, G.value = n;
|
|
56
|
+
}), w(R, (e) => {
|
|
57
|
+
e && F.value.lazy && (H.value = z(W.value), U.value = z(G.value));
|
|
58
58
|
});
|
|
59
59
|
function je(e) {
|
|
60
|
-
|
|
60
|
+
H.value = e, e && !U.value && (U.value = F.value.showTime ? Ce(e) : e), F.value.lazy || q();
|
|
61
61
|
}
|
|
62
62
|
function Me(e) {
|
|
63
|
-
|
|
63
|
+
U.value = e, F.value.lazy || q();
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
let e =
|
|
67
|
-
|
|
65
|
+
function q() {
|
|
66
|
+
let e = H.value?.utc ?? null, t = U.value?.utc ?? null;
|
|
67
|
+
W.value = e, G.value = t, N("update:modelValue", e || t ? {
|
|
68
68
|
fromUtc: e,
|
|
69
69
|
toUtc: t
|
|
70
70
|
} : null);
|
|
71
71
|
}
|
|
72
72
|
function Ne() {
|
|
73
|
-
|
|
73
|
+
F.value.lazy && q(), R.value = !1;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
75
|
+
function J() {
|
|
76
|
+
H.value = null, U.value = null, W.value = null, G.value = null, N("update:modelValue", null);
|
|
77
77
|
}
|
|
78
78
|
function Pe() {
|
|
79
|
-
|
|
79
|
+
H.value = null, U.value = null;
|
|
80
80
|
}
|
|
81
81
|
function Fe() {
|
|
82
|
-
|
|
82
|
+
R.value = !0;
|
|
83
83
|
}
|
|
84
84
|
A({ focusAndOpen: Fe });
|
|
85
|
-
function
|
|
86
|
-
let e =
|
|
85
|
+
function Y() {
|
|
86
|
+
let e = H.value?.local, t = U.value?.local;
|
|
87
87
|
if (!e || !t) return null;
|
|
88
88
|
let n = 1440 * 60 * 1e3;
|
|
89
|
-
return
|
|
89
|
+
return F.value.showTime ? t.getTime() - e.getTime() : (Math.round((t.getTime() - e.getTime()) / n) + 1) * n;
|
|
90
90
|
}
|
|
91
|
-
let
|
|
92
|
-
let e =
|
|
91
|
+
let X = d(() => {
|
|
92
|
+
let e = H.value?.local, t = U.value?.local;
|
|
93
93
|
if (!e || !t) return !1;
|
|
94
|
-
let n =
|
|
94
|
+
let n = Y();
|
|
95
95
|
return n == null ? !1 : c(e, t, -n, {
|
|
96
|
-
minDate:
|
|
97
|
-
maxDate:
|
|
98
|
-
showTime:
|
|
96
|
+
minDate: F.value.minDate ?? null,
|
|
97
|
+
maxDate: F.value.maxDate ?? null,
|
|
98
|
+
showTime: F.value.showTime ?? !1
|
|
99
99
|
});
|
|
100
|
-
}),
|
|
101
|
-
let e =
|
|
100
|
+
}), Z = d(() => {
|
|
101
|
+
let e = H.value?.local, t = U.value?.local;
|
|
102
102
|
if (!e || !t) return !1;
|
|
103
|
-
let n =
|
|
103
|
+
let n = Y();
|
|
104
104
|
return n == null ? !1 : c(e, t, n, {
|
|
105
|
-
minDate:
|
|
106
|
-
maxDate:
|
|
107
|
-
showTime:
|
|
105
|
+
minDate: F.value.minDate ?? null,
|
|
106
|
+
maxDate: F.value.maxDate ?? null,
|
|
107
|
+
showTime: F.value.showTime ?? !1
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
|
-
function
|
|
111
|
-
let t =
|
|
110
|
+
function Q(e) {
|
|
111
|
+
let t = H.value?.local, n = U.value?.local;
|
|
112
112
|
if (!t || !n) return;
|
|
113
|
-
let r =
|
|
113
|
+
let r = Y();
|
|
114
114
|
r != null && c(t, n, r * e, {
|
|
115
|
-
minDate:
|
|
116
|
-
maxDate:
|
|
117
|
-
showTime:
|
|
118
|
-
}) && (
|
|
115
|
+
minDate: F.value.minDate ?? null,
|
|
116
|
+
maxDate: F.value.maxDate ?? null,
|
|
117
|
+
showTime: F.value.showTime ?? !1
|
|
118
|
+
}) && (H.value = B(new Date(t.getTime() + r * e)), U.value = B(new Date(n.getTime() + r * e)), F.value.lazy || q());
|
|
119
119
|
}
|
|
120
120
|
let Ie = d(() => {
|
|
121
|
-
let e =
|
|
122
|
-
return !e || !t ? null : re(e, t, { showTime:
|
|
123
|
-
}),
|
|
121
|
+
let e = H.value?.local, t = U.value?.local;
|
|
122
|
+
return !e || !t ? null : re(e, t, { showTime: F.value.showTime ?? !1 });
|
|
123
|
+
}), $ = d(() => {
|
|
124
124
|
let e = {
|
|
125
|
-
minDate:
|
|
126
|
-
maxDate:
|
|
127
|
-
showTime:
|
|
125
|
+
minDate: F.value.minDate ?? null,
|
|
126
|
+
maxDate: F.value.maxDate ?? null,
|
|
127
|
+
showTime: F.value.showTime ?? !1
|
|
128
128
|
}, t = {};
|
|
129
129
|
for (let n of l) t[n.key] = !ne(n.key, e);
|
|
130
130
|
return t;
|
|
131
131
|
});
|
|
132
132
|
function Le(e) {
|
|
133
|
-
let { from: t, to: n } = te(e, { showTime:
|
|
134
|
-
|
|
133
|
+
let { from: t, to: n } = te(e, { showTime: F.value.showTime ?? !1 });
|
|
134
|
+
H.value = t, U.value = n, q(), F.value.lazy && (R.value = !1);
|
|
135
135
|
}
|
|
136
|
-
let $ = `drp-input-${se()}`;
|
|
137
136
|
return (e, t) => {
|
|
138
137
|
let n = oe("tooltip");
|
|
139
138
|
return y(), m("div", {
|
|
140
139
|
ref_key: "wrapperRef",
|
|
141
|
-
ref:
|
|
142
|
-
class: v(["drp-wrapper ac-component", { "drp-wrapper--compact":
|
|
140
|
+
ref: I,
|
|
141
|
+
class: v(["drp-wrapper ac-component", { "drp-wrapper--compact": F.value.compact }])
|
|
143
142
|
}, [h("div", {
|
|
144
143
|
class: v(["c-input-row", {
|
|
145
|
-
"c-input-row--sm":
|
|
146
|
-
"c-input-row--lg":
|
|
147
|
-
"c-input-row--focus": C(
|
|
144
|
+
"c-input-row--sm": F.value.size === "small",
|
|
145
|
+
"c-input-row--lg": F.value.size === "large",
|
|
146
|
+
"c-input-row--focus": C(R)
|
|
148
147
|
}]),
|
|
149
|
-
onClick: t[1] ||= (e) =>
|
|
148
|
+
onClick: t[1] ||= (e) => R.value = !C(R)
|
|
150
149
|
}, [
|
|
151
|
-
h("div", ce, [
|
|
150
|
+
h("div", ce, [K.value ? (y(), m(u, { key: 0 }, [h("span", le, S(V(W.value)) + " – " + S(V(G.value)), 1), h("span", ue, [h("span", de, S(V(W.value)), 1), h("span", fe, S(V(G.value)), 1)])], 64)) : (y(), m("span", pe, S(F.value.placeholderFrom) + " – " + S(F.value.placeholderTo), 1))]),
|
|
152
151
|
h("button", {
|
|
153
152
|
type: "button",
|
|
154
|
-
class: v(["c-icon-btn c-icon-btn--clear", { "c-icon-btn--hidden": !
|
|
155
|
-
onClick: E(
|
|
153
|
+
class: v(["c-icon-btn c-icon-btn--clear", { "c-icon-btn--hidden": !K.value }]),
|
|
154
|
+
onClick: E(J, ["stop"]),
|
|
156
155
|
"aria-label": "Törlés"
|
|
157
156
|
}, [...t[5] ||= [h("i", { class: "fa-solid fa-fw fa-xmark" }, null, -1)]], 2),
|
|
158
|
-
|
|
157
|
+
F.value.showIcon ? (y(), m("button", {
|
|
159
158
|
key: 0,
|
|
160
159
|
type: "button",
|
|
161
160
|
class: "c-icon-btn c-icon-btn--calendar",
|
|
162
|
-
onClick: t[0] ||= E((e) =>
|
|
161
|
+
onClick: t[0] ||= E((e) => R.value = !C(R), ["stop"]),
|
|
163
162
|
"aria-label": "Naptár megnyitása"
|
|
164
163
|
}, [...t[6] ||= [h("i", { class: "fa-regular fa-fw fa-calendar" }, null, -1)]])) : p("", !0)
|
|
165
|
-
], 2), (y(), f(ie, { to: "body" }, [C(
|
|
164
|
+
], 2), (y(), f(ie, { to: "body" }, [C(R) ? (y(), m("div", {
|
|
166
165
|
key: 0,
|
|
167
166
|
ref_key: "dropdownRef",
|
|
168
|
-
ref:
|
|
167
|
+
ref: L,
|
|
169
168
|
class: "c-dropdown drp-dropdown ac-component",
|
|
170
169
|
style: ae(C(Se))
|
|
171
170
|
}, [
|
|
172
171
|
h("div", me, [h("div", he, [h("label", {
|
|
173
172
|
class: "drp-label",
|
|
174
|
-
for: `${
|
|
175
|
-
}, S(
|
|
176
|
-
id: `${
|
|
177
|
-
"model-value":
|
|
173
|
+
for: `${P}-from`
|
|
174
|
+
}, S(F.value.placeholderFrom), 9, ge), g(s, {
|
|
175
|
+
id: `${P}-from`,
|
|
176
|
+
"model-value": H.value,
|
|
178
177
|
config: {
|
|
179
|
-
...
|
|
178
|
+
...F.value,
|
|
180
179
|
minDate: De.value,
|
|
181
180
|
maxDate: Oe.value,
|
|
182
|
-
placeholder:
|
|
181
|
+
placeholder: F.value.placeholderFrom
|
|
183
182
|
},
|
|
184
183
|
"onUpdate:modelValue": je
|
|
185
184
|
}, null, 8, [
|
|
@@ -188,15 +187,15 @@ var ce = { class: "drp-input" }, le = { class: "c-truncate drp-input__single" },
|
|
|
188
187
|
"config"
|
|
189
188
|
])]), h("div", _e, [h("label", {
|
|
190
189
|
class: "drp-label",
|
|
191
|
-
for: `${
|
|
192
|
-
}, S(
|
|
193
|
-
id: `${
|
|
194
|
-
"model-value":
|
|
190
|
+
for: `${P}-to`
|
|
191
|
+
}, S(F.value.placeholderTo), 9, ve), g(s, {
|
|
192
|
+
id: `${P}-to`,
|
|
193
|
+
"model-value": U.value,
|
|
195
194
|
config: {
|
|
196
|
-
...
|
|
195
|
+
...F.value,
|
|
197
196
|
minDate: ke.value,
|
|
198
197
|
maxDate: Ae.value,
|
|
199
|
-
placeholder:
|
|
198
|
+
placeholder: F.value.placeholderTo
|
|
200
199
|
},
|
|
201
200
|
"onUpdate:modelValue": Me
|
|
202
201
|
}, null, 8, [
|
|
@@ -204,35 +203,35 @@ var ce = { class: "drp-input" }, le = { class: "c-truncate drp-input__single" },
|
|
|
204
203
|
"model-value",
|
|
205
204
|
"config"
|
|
206
205
|
])])]),
|
|
207
|
-
|
|
206
|
+
F.value.showPresets ? (y(), m("div", ye, [
|
|
208
207
|
T((y(), m("span", be, [g(a, {
|
|
209
208
|
icon: "fa-solid fa-chevron-left",
|
|
210
209
|
class: "drp-toolbar__stepper left",
|
|
211
|
-
disabled: !
|
|
212
|
-
onClick: t[2] ||= (e) =>
|
|
213
|
-
}, null, 8, ["disabled"])])), [[n,
|
|
210
|
+
disabled: !X.value,
|
|
211
|
+
onClick: t[2] ||= (e) => Q(-1)
|
|
212
|
+
}, null, 8, ["disabled"])])), [[n, X.value ? "Intervallum mozgatása visszafelé" : "Nem léphető tovább a minimum dátum miatt"]]),
|
|
214
213
|
h("div", D, [(y(!0), m(u, null, x(C(l), (e) => (y(), m("a", {
|
|
215
214
|
key: e.key,
|
|
216
215
|
class: v(["predefined-range", {
|
|
217
216
|
"predefined-range--active": Ie.value === e.key,
|
|
218
|
-
"predefined-range--disabled":
|
|
217
|
+
"predefined-range--disabled": $.value[e.key]
|
|
219
218
|
}]),
|
|
220
|
-
"aria-disabled":
|
|
221
|
-
onClick: (t) =>
|
|
219
|
+
"aria-disabled": $.value[e.key],
|
|
220
|
+
onClick: (t) => $.value[e.key] ? null : Le(e.key)
|
|
222
221
|
}, S(e.label), 11, xe))), 128))]),
|
|
223
222
|
T((y(), m("span", O, [g(a, {
|
|
224
223
|
icon: "fa-solid fa-chevron-right",
|
|
225
|
-
disabled: !
|
|
226
|
-
onClick: t[3] ||= (e) =>
|
|
224
|
+
disabled: !Z.value,
|
|
225
|
+
onClick: t[3] ||= (e) => Q(1),
|
|
227
226
|
class: "drp-toolbar__stepper right"
|
|
228
|
-
}, null, 8, ["disabled"])])), [[n,
|
|
227
|
+
}, null, 8, ["disabled"])])), [[n, Z.value ? "Intervallum mozgatása előre" : "Nem léphető tovább a maximum dátum miatt"]])
|
|
229
228
|
])) : p("", !0),
|
|
230
|
-
|
|
229
|
+
F.value.showClearButton || F.value.showOkButton || F.value.lazy ? (y(), m("div", k, [F.value.showClearButton ? (y(), f(a, {
|
|
231
230
|
key: 0,
|
|
232
231
|
label: "Törlés",
|
|
233
232
|
outline: "",
|
|
234
|
-
onClick: t[4] ||= (e) =>
|
|
235
|
-
})) : p("", !0),
|
|
233
|
+
onClick: t[4] ||= (e) => F.value.lazy ? Pe() : J()
|
|
234
|
+
})) : p("", !0), F.value.showOkButton || F.value.lazy ? (y(), f(a, {
|
|
236
235
|
key: 1,
|
|
237
236
|
label: "OK",
|
|
238
237
|
type: "success",
|
|
@@ -10,13 +10,13 @@ var x = {
|
|
|
10
10
|
}, C = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "ds-filter"
|
|
13
|
-
}, w = ["title"], T =
|
|
13
|
+
}, w = ["title"], T = { class: "ds-options c-scroll" }, E = ["onClick", "onKeydown"], D = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "ds-option ds-option--empty"
|
|
16
|
-
},
|
|
16
|
+
}, O = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "c-footer"
|
|
19
|
-
},
|
|
19
|
+
}, k = {
|
|
20
20
|
placeholder: "Select...",
|
|
21
21
|
filterable: !0,
|
|
22
22
|
clearable: !0,
|
|
@@ -24,46 +24,46 @@ var x = {
|
|
|
24
24
|
multiple: !1,
|
|
25
25
|
lazy: !1,
|
|
26
26
|
size: "normal"
|
|
27
|
-
},
|
|
27
|
+
}, A = /* @__PURE__ */ s({
|
|
28
28
|
__name: "DropdownSelect",
|
|
29
29
|
props: {
|
|
30
30
|
modelValue: { default: null },
|
|
31
31
|
options: {},
|
|
32
|
-
config: { default: () => ({ ...
|
|
32
|
+
config: { default: () => ({ ...k }) }
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:modelValue"],
|
|
35
|
-
setup(s, { expose:
|
|
36
|
-
let
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
})),
|
|
35
|
+
setup(s, { expose: A, emit: j }) {
|
|
36
|
+
let M = s, N = n(() => ({
|
|
37
|
+
...k,
|
|
38
|
+
...M.config
|
|
39
|
+
})), P = j, F = `ds-input-filter-${g()}`, I = p(!1), L = p(""), R = p(null), z = p(null), B = p([]), V = p(H(M.modelValue));
|
|
40
40
|
function H(e) {
|
|
41
41
|
return e == null ? [] : Array.isArray(e) ? [...e] : [e];
|
|
42
42
|
}
|
|
43
|
-
v(() =>
|
|
43
|
+
v(() => M.modelValue, (e) => {
|
|
44
44
|
V.value = H(e);
|
|
45
45
|
}), v(I, (e) => {
|
|
46
|
-
e && (L.value = "",
|
|
46
|
+
e && (L.value = "", N.value.filterable && c(() => z.value?.focus()), N.value.lazy && (B.value = [...V.value]));
|
|
47
47
|
});
|
|
48
|
-
let U = n(() => V.value.length === 0 ? null :
|
|
48
|
+
let U = n(() => V.value.length === 0 ? null : N.value.multiple ? V.value.length > 2 ? `${V.value.length} kiválasztva` : V.value.map((e) => M.options.find((t) => t.value === e)?.label ?? e).join(", ") : M.options.find((e) => e.value === V.value[0])?.label ?? null), W = n(() => {
|
|
49
49
|
let e = L.value.toLowerCase();
|
|
50
|
-
return e ?
|
|
50
|
+
return e ? M.options.filter((t) => t.label.toLowerCase().includes(e)) : M.options;
|
|
51
51
|
}), G = n(() => W.value.filter((e) => e.value)), K = n(() => {
|
|
52
52
|
if (G.value.length === 0) return !1;
|
|
53
|
-
let e =
|
|
53
|
+
let e = N.value.lazy && I.value ? B.value : V.value;
|
|
54
54
|
return G.value.every((t) => t.value && e.includes(t.value));
|
|
55
55
|
});
|
|
56
56
|
function q(e) {
|
|
57
|
-
return (
|
|
57
|
+
return (N.value.lazy && I.value ? B : V).value.includes(e);
|
|
58
58
|
}
|
|
59
59
|
function J() {
|
|
60
|
-
let e =
|
|
60
|
+
let e = N.value.lazy && I.value ? B : V, t = G.value.map((e) => e.value);
|
|
61
61
|
if (K.value) e.value = e.value.filter((e) => !t.includes(e));
|
|
62
62
|
else {
|
|
63
63
|
let n = t.filter((t) => !e.value.includes(t));
|
|
64
64
|
e.value = [...e.value, ...n];
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
N.value.lazy || P("update:modelValue", V.value.length > 0 ? [...V.value] : null);
|
|
67
67
|
}
|
|
68
68
|
function Y(e, t) {
|
|
69
69
|
let n = e.indexOf(t);
|
|
@@ -75,13 +75,13 @@ var x = {
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
let t = e.value;
|
|
78
|
-
t && (
|
|
78
|
+
t && (N.value.multiple ? N.value.lazy ? B.value = Y(B.value, t) : (V.value = Y(V.value, t), P("update:modelValue", V.value.length > 0 ? [...V.value] : null)) : (V.value = [t], P("update:modelValue", t), I.value = !1));
|
|
79
79
|
}
|
|
80
80
|
function Z() {
|
|
81
|
-
|
|
81
|
+
N.value.lazy && (V.value = [...B.value], P("update:modelValue", B.value.length > 0 ? [...B.value] : null)), I.value = !1;
|
|
82
82
|
}
|
|
83
83
|
function Q() {
|
|
84
|
-
|
|
84
|
+
N.value.lazy ? B.value = [] : (V.value = [], P("update:modelValue", null));
|
|
85
85
|
}
|
|
86
86
|
function ee(e, t) {
|
|
87
87
|
e.key === " " ? (e.preventDefault(), X(t)) : e.key === "Enter" && (e.preventDefault(), Z());
|
|
@@ -94,24 +94,24 @@ var x = {
|
|
|
94
94
|
I.value = !I.value, I.value && (L.value = "");
|
|
95
95
|
}
|
|
96
96
|
function ne() {
|
|
97
|
-
V.value = [],
|
|
97
|
+
V.value = [], P("update:modelValue", null), I.value = !1;
|
|
98
98
|
}
|
|
99
99
|
function re() {
|
|
100
|
-
I.value = !0,
|
|
100
|
+
I.value = !0, N.value.filterable && c(() => z.value?.focus());
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return A({ focusAndOpen: re }), (n, s) => (f(), a("div", {
|
|
103
103
|
ref_key: "wrapperRef",
|
|
104
104
|
ref: R,
|
|
105
105
|
class: "c-wrapper ds-wrapper ac-component"
|
|
106
106
|
}, [o("div", {
|
|
107
107
|
class: l(["c-input-row pointer", {
|
|
108
|
-
"c-input-row--sm":
|
|
109
|
-
"c-input-row--lg":
|
|
108
|
+
"c-input-row--sm": N.value.size === "small",
|
|
109
|
+
"c-input-row--lg": N.value.size === "large"
|
|
110
110
|
}]),
|
|
111
111
|
onClick: s[1] ||= (e) => te()
|
|
112
112
|
}, [
|
|
113
|
-
U.value ? (f(), a("span", x, h(U.value), 1)) : (f(), a("span", S, h(
|
|
114
|
-
|
|
113
|
+
U.value ? (f(), a("span", x, h(U.value), 1)) : (f(), a("span", S, h(N.value.placeholder), 1)),
|
|
114
|
+
N.value.clearable && V.value.length > 0 ? (f(), a("button", {
|
|
115
115
|
key: 2,
|
|
116
116
|
type: "button",
|
|
117
117
|
class: "c-icon-btn c-icon-btn--clear ds-clear-btn",
|
|
@@ -121,10 +121,10 @@ var x = {
|
|
|
121
121
|
o("span", { class: l(["c-icon-btn c-icon-btn--chevron mr-2", { "c-icon-btn--chevron-open": I.value }]) }, [...s[7] ||= [o("i", { class: "fa-solid fa-fw fa-chevron-down" }, null, -1)]], 2)
|
|
122
122
|
], 2), I.value ? (f(), a("div", {
|
|
123
123
|
key: 0,
|
|
124
|
-
class: l(["c-dropdown ds-dropdown ac-component", { "ds-dropdown--multiple":
|
|
124
|
+
class: l(["c-dropdown ds-dropdown ac-component", { "ds-dropdown--multiple": N.value.multiple }])
|
|
125
125
|
}, [
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
N.value.filterable ? (f(), a("div", C, [
|
|
127
|
+
N.value.multiple ? (f(), a("span", {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: l(["c-checkbox ds-select-all-checkbox", { "c-checkbox--checked": K.value }]),
|
|
130
130
|
onClick: s[2] ||= b((e) => J(), ["stop"]),
|
|
@@ -134,12 +134,12 @@ var x = {
|
|
|
134
134
|
ref_key: "filterInputRef",
|
|
135
135
|
ref: z,
|
|
136
136
|
type: "text",
|
|
137
|
-
id:
|
|
137
|
+
id: F,
|
|
138
138
|
class: "c-focus ds-filter-input",
|
|
139
139
|
"onUpdate:modelValue": s[3] ||= (e) => L.value = e,
|
|
140
140
|
placeholder: "Filter...",
|
|
141
141
|
onClick: s[4] ||= b(() => {}, ["stop"])
|
|
142
|
-
}, null,
|
|
142
|
+
}, null, 512), [[_, L.value]]),
|
|
143
143
|
L.value ? (f(), a("button", {
|
|
144
144
|
key: 1,
|
|
145
145
|
type: "button",
|
|
@@ -148,14 +148,14 @@ var x = {
|
|
|
148
148
|
"aria-label": "Szűrők törlése"
|
|
149
149
|
}, [...s[8] ||= [o("i", { class: "fa-solid fa-xmark" }, null, -1)]])) : i("", !0)
|
|
150
150
|
])) : i("", !0),
|
|
151
|
-
o("ul",
|
|
151
|
+
o("ul", T, [(f(!0), a(t, null, m(W.value, (e, t) => (f(), a("li", {
|
|
152
152
|
key: e.value ?? `cb-${t}`,
|
|
153
153
|
class: l(["d-option ds-option", { "ds-option--selected": e.value && q(e.value) }]),
|
|
154
154
|
tabindex: "0",
|
|
155
155
|
onClick: (t) => X(e),
|
|
156
156
|
onKeydown: (t) => ee(t, e)
|
|
157
157
|
}, [
|
|
158
|
-
|
|
158
|
+
N.value.multiple && e.value ? (f(), a("span", {
|
|
159
159
|
key: 0,
|
|
160
160
|
class: l(["c-checkbox", { "c-checkbox--checked": q(e.value) }])
|
|
161
161
|
}, null, 2)) : i("", !0),
|
|
@@ -163,14 +163,14 @@ var x = {
|
|
|
163
163
|
key: 1,
|
|
164
164
|
class: l(["fa-fw", e.icon])
|
|
165
165
|
}, null, 2)) : i("", !0),
|
|
166
|
-
o("span", { class: l(["d-option__label", { "c-truncate":
|
|
167
|
-
], 42,
|
|
168
|
-
|
|
166
|
+
o("span", { class: l(["d-option__label", { "c-truncate": N.value.textEllipsis }]) }, h(e.label), 3)
|
|
167
|
+
], 42, E))), 128)), W.value.length === 0 ? (f(), a("li", D, " Nincs találat ")) : i("", !0)]),
|
|
168
|
+
N.value.multiple || N.value.clearable && V.value.length > 0 ? (f(), a("div", O, [N.value.clearable ? (f(), r(e, {
|
|
169
169
|
key: 0,
|
|
170
170
|
label: "Törlés",
|
|
171
171
|
outline: "",
|
|
172
172
|
onClick: Q
|
|
173
|
-
})) : i("", !0),
|
|
173
|
+
})) : i("", !0), N.value.multiple ? (f(), r(e, {
|
|
174
174
|
key: 1,
|
|
175
175
|
label: "OK",
|
|
176
176
|
type: "success",
|
|
@@ -180,4 +180,4 @@ var x = {
|
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
//#endregion
|
|
183
|
-
export {
|
|
183
|
+
export { A as default, k as dropdownSelectConfigDefaults };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { parseDropdownValue as e } from "./admins-components72.js";
|
|
2
2
|
//#region src/utils/filterUrlSync.ts
|
|
3
3
|
function t(e) {
|
|
4
|
-
let t = new URLSearchParams(window.location.search)
|
|
4
|
+
let t = new URLSearchParams(window.location.search);
|
|
5
|
+
if (!window.location.search) return null;
|
|
6
|
+
let r = {};
|
|
5
7
|
for (let i of e) {
|
|
6
8
|
if (i.type === "separator") continue;
|
|
7
9
|
let e = t.get(i.key);
|
|
@@ -44,4 +46,4 @@ function a(e, t) {
|
|
|
44
46
|
window.history.replaceState(null, "", i);
|
|
45
47
|
}
|
|
46
48
|
//#endregion
|
|
47
|
-
export { t as getFilterParams, i as
|
|
49
|
+
export { t as getFilterParams, i as readUrlFilterParams, a as writeFilterParams };
|
|
@@ -6,7 +6,7 @@ import i from "./admins-components22.js";
|
|
|
6
6
|
import a from "./admins-components27.js";
|
|
7
7
|
import o from "./admins-components75.js";
|
|
8
8
|
import { debounce as s } from "./admins-components76.js";
|
|
9
|
-
import {
|
|
9
|
+
import { readUrlFilterParams as c, writeFilterParams as l } from "./admins-components77.js";
|
|
10
10
|
import { Fragment as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, onMounted as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
|
|
11
11
|
//#region src/components/data-table/DataFilters.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var D = { class: "data-filters" }, O = {
|
|
@@ -81,7 +81,7 @@ var D = { class: "data-filters" }, O = {
|
|
|
81
81
|
y(() => {
|
|
82
82
|
if (!L.handleUrl) return;
|
|
83
83
|
let e = c(L.items);
|
|
84
|
-
|
|
84
|
+
Object.keys(e).length > 0 && (z.value = {
|
|
85
85
|
...z.value,
|
|
86
86
|
...e
|
|
87
87
|
});
|
|
@@ -54,7 +54,7 @@ var C = { class: "flex-center gap-2 mb-3 wrap-on-small" }, w = { class: "flex-ce
|
|
|
54
54
|
function z(e) {
|
|
55
55
|
return !L.value || e.some((e) => e.key === "exactMatch") ? e : [R, ...e];
|
|
56
56
|
}
|
|
57
|
-
let B = d(() => z(k.filters ?? [])), V = S(k.filters ? o(B.value) : {}), H = null;
|
|
57
|
+
let B = d(() => z(k.filters ?? [])), V = S(k.filters ? o(B.value) ?? {} : {}), H = null;
|
|
58
58
|
b(() => {
|
|
59
59
|
H = new ResizeObserver((e) => {
|
|
60
60
|
P.value = (e[0]?.contentRect.width ?? 0) < k.layoutBreakpoint;
|
|
@@ -15,9 +15,9 @@ var a = class {
|
|
|
15
15
|
}({}), s = class {
|
|
16
16
|
relativeUrl;
|
|
17
17
|
method;
|
|
18
|
-
|
|
18
|
+
fetchMethod;
|
|
19
19
|
constructor(r, i, a, s, c = "application/json", l) {
|
|
20
|
-
this.relativeUrl = i, this.method = a, this.
|
|
20
|
+
this.relativeUrl = i, this.method = a, this.fetchMethod = n({
|
|
21
21
|
baseUrl: r,
|
|
22
22
|
fetchOptions: { credentials: r.indexOf("localhost") != -1 || t(r) ? "omit" : "include" },
|
|
23
23
|
options: {
|
|
@@ -44,7 +44,7 @@ function c(e, t, n, o) {
|
|
|
44
44
|
let c = null, l = null;
|
|
45
45
|
return s.execute = () => {
|
|
46
46
|
c &&= (c(), null), l &&= (l(), null), s.fetch && s.fetch.canAbort.value && s.fetch.abort();
|
|
47
|
-
let t = `${u(e.relativeUrl, s.routeParams.value, s.queryParams.value)}`, n = e.
|
|
47
|
+
let t = `${u(e.relativeUrl, s.routeParams.value, s.queryParams.value)}`, n = e.fetchMethod(t), r, o = n.isFetching;
|
|
48
48
|
async function d() {
|
|
49
49
|
if (f() && s.successCallback) s.successCallback(s.data.value);
|
|
50
50
|
else if (!f() && s.errorCallback) {
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { FetchDetails as e, Methods as t, initRequest as n } from "./admins-components95.js";
|
|
2
|
+
//#region src/services/backendService.ts
|
|
3
|
+
function r(e) {
|
|
4
|
+
return new i(e);
|
|
5
|
+
}
|
|
6
|
+
var i = class {
|
|
7
|
+
backendUrl;
|
|
8
|
+
endpoints;
|
|
9
|
+
constructor({ backendUrl: e, endpoints: t }) {
|
|
10
|
+
this.backendUrl = e, this.endpoints = Object.fromEntries(Object.entries(t).filter(([, e]) => e.url).map(([t, n]) => [t, a(e, n, n.entityName ?? t)]));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function a(r, i, a) {
|
|
14
|
+
let s = i.method ?? t.POST, c = i.operationName ?? String(s);
|
|
15
|
+
return n(new e(r, i.url, s, o(a, c)), i.payloadType, i.routeParamsType, i.queryParamsType);
|
|
16
|
+
}
|
|
17
|
+
function o(e, t) {
|
|
18
|
+
return new Map([[400, `${e} ${t} során 400-as hiba történt!`], [500, `${e} ${t} során 500-as hiba történt!`]]);
|
|
6
19
|
}
|
|
7
20
|
//#endregion
|
|
8
|
-
export {
|
|
21
|
+
export { i as BackendService, r as useBackendService };
|