admins-components 9.0.4 → 9.0.6
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 +58 -54
- package/dist/admins-components10.js +10 -0
- package/dist/admins-components100.js +23 -247
- package/dist/admins-components101.js +171 -26
- package/dist/admins-components102.js +65 -25
- package/dist/admins-components103.js +67 -162
- package/dist/admins-components104.js +27 -65
- package/dist/admins-components105.js +12 -63
- package/dist/admins-components106.js +26 -29
- package/dist/admins-components107.js +10 -16
- package/dist/admins-components108.js +3 -26
- package/dist/admins-components109.js +2 -8
- package/dist/admins-components11.js +38 -9
- package/dist/admins-components110.js +3 -4
- package/dist/admins-components111.js +21 -3
- package/dist/admins-components112.js +14 -3
- package/dist/admins-components113.js +7 -20
- package/dist/admins-components114.js +13 -14
- package/dist/admins-components115.js +34 -8
- package/dist/admins-components116.js +82 -12
- package/dist/admins-components117.js +9 -24
- package/dist/admins-components118.js +4 -82
- package/dist/admins-components119.js +8 -11
- package/dist/admins-components12.js +141 -37
- package/dist/admins-components120.js +6 -4
- package/dist/admins-components121.js +6 -8
- package/dist/admins-components122.js +14 -6
- package/dist/admins-components123.js +11 -4
- package/dist/admins-components124.js +30 -15
- package/dist/admins-components125.js +4 -13
- package/dist/admins-components126.js +29 -30
- package/dist/admins-components127.js +5 -4
- package/dist/admins-components128.js +5 -29
- package/dist/admins-components129.js +21 -4
- package/dist/admins-components13.js +5 -142
- package/dist/admins-components130.js +81 -4
- package/dist/admins-components131.js +32 -7
- package/dist/admins-components132.js +58 -73
- package/dist/admins-components133.js +24 -29
- package/dist/admins-components134.js +47 -56
- package/dist/admins-components135.js +31 -23
- package/dist/admins-components136.js +3 -50
- package/dist/admins-components137.js +184 -29
- package/dist/admins-components138.js +46 -3
- package/dist/admins-components139.js +35 -177
- package/dist/admins-components14.js +46 -5
- package/dist/admins-components140.js +41 -41
- package/dist/admins-components141.js +137 -32
- package/dist/admins-components142.js +54 -42
- package/dist/admins-components143.js +6 -140
- package/dist/admins-components144.js +5 -57
- package/dist/admins-components145.js +75 -6
- package/dist/admins-components146.js +28 -5
- package/dist/admins-components147.js +1929 -74
- package/dist/admins-components148.js +25068 -29
- package/dist/admins-components149.js +8 -1930
- package/dist/admins-components15.js +4 -46
- package/dist/admins-components150.js +5 -24809
- package/dist/admins-components151.js +141 -8
- package/dist/admins-components152.js +8 -141
- package/dist/admins-components153.js +3 -3
- package/dist/admins-components155.js +169 -0
- package/dist/admins-components156.js +44 -161
- package/dist/admins-components157.js +8 -50
- package/dist/admins-components158.js +49 -8
- package/dist/admins-components159.js +6 -50
- package/dist/admins-components16.js +94 -4
- package/dist/admins-components160.js +80 -6
- package/dist/admins-components161.js +48 -70
- package/dist/admins-components162.js +32 -31
- package/dist/admins-components163.js +8 -58
- package/dist/admins-components164.js +51 -8
- package/dist/admins-components165.js +8 -51
- package/dist/{admins-components168.js → admins-components167.js} +5 -5
- package/dist/admins-components17.js +225 -91
- package/dist/admins-components18.js +5 -228
- package/dist/admins-components19.js +181 -5
- package/dist/admins-components21.js +7 -0
- package/dist/admins-components22.js +72 -6
- package/dist/admins-components23.js +6 -72
- package/dist/admins-components24.js +58 -6
- package/dist/admins-components26.js +7 -0
- package/dist/admins-components27.js +60 -6
- package/dist/admins-components29.js +7 -0
- package/dist/admins-components30.js +36 -6
- package/dist/admins-components32.js +7 -0
- package/dist/admins-components33.js +36 -6
- package/dist/admins-components34.js +4 -36
- package/dist/admins-components35.js +32 -4
- package/dist/admins-components37.js +7 -0
- package/dist/admins-components38.js +147 -6
- package/dist/admins-components4.js +2 -2
- package/dist/admins-components40.js +7 -0
- package/dist/admins-components41.js +124 -6
- package/dist/admins-components42.js +4 -124
- package/dist/admins-components43.js +179 -4
- package/dist/admins-components44.js +4 -179
- package/dist/admins-components45.js +19 -4
- package/dist/admins-components47.js +7 -0
- package/dist/admins-components48.js +54 -6
- package/dist/admins-components49.js +93 -54
- package/dist/admins-components5.js +5 -0
- package/dist/admins-components51.js +7 -0
- package/dist/admins-components52.js +25 -6
- package/dist/admins-components53.js +9 -25
- package/dist/admins-components54.js +19 -9
- package/dist/admins-components55.js +72 -18
- package/dist/admins-components56.js +59 -73
- package/dist/admins-components57.js +4 -59
- package/dist/admins-components58.js +121 -0
- package/dist/admins-components6.js +29 -6
- package/dist/admins-components60.js +6 -6
- package/dist/admins-components61.js +126 -103
- package/dist/admins-components63.js +3 -3
- package/dist/admins-components64.js +7 -143
- package/dist/admins-components65.js +264 -0
- package/dist/admins-components67.js +6 -7
- package/dist/admins-components68.js +98 -250
- package/dist/admins-components7.js +252 -29
- package/dist/admins-components70.js +2 -2
- package/dist/admins-components71.js +54 -106
- package/dist/admins-components72.js +222 -0
- package/dist/admins-components74.js +6 -59
- package/dist/admins-components75.js +8 -221
- package/dist/admins-components76.js +47 -0
- package/dist/admins-components77.js +250 -6
- package/dist/admins-components79.js +7 -46
- package/dist/admins-components80.js +32 -245
- package/dist/admins-components82.js +2 -3
- package/dist/admins-components83.js +192 -31
- package/dist/admins-components85.js +2 -2
- package/dist/admins-components86.js +200 -195
- package/dist/admins-components88.js +3 -2
- package/dist/admins-components89.js +3 -203
- package/dist/admins-components90.js +17 -0
- package/dist/admins-components91.js +3 -7
- package/dist/admins-components92.js +52 -3
- package/dist/admins-components93.js +80 -50
- package/dist/admins-components94.js +109 -77
- package/dist/admins-components95.js +44 -3
- package/dist/admins-components96.js +101 -108
- package/dist/admins-components97.js +6 -23
- package/dist/admins-components98.js +257 -100
- package/dist/admins-components99.js +27 -7
- package/dist/base.css +1 -1
- package/dist/src/components/Button.vue.d.ts +1 -1
- package/dist/src/components/Calendar.vue.d.ts +1 -1
- package/dist/src/components/ConfirmModal.vue.d.ts +1 -1
- package/dist/src/components/DatePicker.vue.d.ts +2 -2
- package/dist/src/components/DateRangePicker.vue.d.ts +2 -2
- package/dist/src/components/DropdownMenu.vue.d.ts +2 -2
- package/dist/src/components/DropdownSelect.vue.d.ts +1 -1
- package/dist/src/components/HeaderComponent.vue.d.ts +2 -2
- package/dist/src/components/custom/ImagePicker.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataCards.vue.d.ts +2 -2
- package/dist/src/components/data-table/DataCell.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataFilters.vue.d.ts +4 -4
- package/dist/src/components/data-table/DataList.vue.d.ts +4 -4
- package/dist/src/components/data-table/DataListGuide.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataListOptions.vue.d.ts +2 -2
- package/dist/src/components/data-table/DataPaginator.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataTable.vue.d.ts +3 -3
- package/dist/src/components/data-table/FilterTags.vue.d.ts +1 -1
- package/dist/src/components/data-table/FiltersHistory.vue.d.ts +1 -1
- package/dist/src/index.d.ts +85 -80
- package/dist/src/styles/components/data-table/data-list.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/styles/components/data-table/filter-tags.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/styles/components/loader.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/vueformelements/config/ExternalArticleOfferElementConfig.d.ts +1 -1
- package/package.json +4 -5
- package/dist/admins-components154.js +0 -10
- package/dist/admins-components166.js +0 -10
- package/dist/admins-components20.js +0 -182
- package/dist/admins-components25.js +0 -59
- package/dist/admins-components28.js +0 -61
- package/dist/admins-components31.js +0 -37
- package/dist/admins-components36.js +0 -33
- package/dist/admins-components39.js +0 -148
- package/dist/admins-components46.js +0 -20
- package/dist/admins-components50.js +0 -94
- package/dist/admins-components59.js +0 -8
- package/dist/admins-components66.js +0 -8
- package/dist/admins-components73.js +0 -7
- package/dist/admins-components78.js +0 -9
- package/dist/admins-components8.js +0 -253
- package/dist/index.d.ts +0 -2
- package/dist/src/components/data-table/DataCell.vue_vue_type_style_index_0_scoped_d46d9895_lang.css +0 -1
- package/dist/src/styles/_buttons.scss_vue_type_style_index_0_src_true_lang.css +0 -1
|
@@ -1,222 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "c-indicator"
|
|
10
|
-
}, ae = { key: 1 }, oe = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "filters-history__panel c-scroll"
|
|
13
|
-
}, se = { class: "filters-history__save-row" }, ce = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "filters-history__hint"
|
|
16
|
-
}, le = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "filters-history__hint"
|
|
19
|
-
}, ue = {
|
|
20
|
-
key: 2,
|
|
21
|
-
class: "filters-history__list"
|
|
22
|
-
}, de = [
|
|
23
|
-
"aria-expanded",
|
|
24
|
-
"onClick",
|
|
25
|
-
"onKeydown"
|
|
26
|
-
], fe = { class: "filters-history__item-header-text" }, T = { class: "filters-history__item-date" }, E = {
|
|
27
|
-
key: 0,
|
|
28
|
-
class: "filters-history__item-name"
|
|
29
|
-
}, D = ["onClick"], O = ["onClick"], k = ["onClick"], A = {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: "filters-history__item-content"
|
|
32
|
-
}, j = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "filters-history__item-body"
|
|
35
|
-
}, M = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "filters-history__item-empty"
|
|
38
|
-
}, N = { key: 3 }, P = 50, F = 7, I = /* @__PURE__ */ d({
|
|
39
|
-
__name: "FiltersHistory",
|
|
40
|
-
props: {
|
|
41
|
-
items: {},
|
|
42
|
-
values: {},
|
|
43
|
-
storageKey: {}
|
|
44
|
-
},
|
|
45
|
-
emits: ["load", "change"],
|
|
46
|
-
setup(d, { emit: I }) {
|
|
47
|
-
let L = d, R = a(() => `data-filters-${L.storageKey}`), z = I, B = g(!1), V = g([]), H = g(""), U = g(/* @__PURE__ */ new Set()), W = g(!1);
|
|
48
|
-
function G(e) {
|
|
49
|
-
return U.value.has(e);
|
|
50
|
-
}
|
|
51
|
-
function K(e) {
|
|
52
|
-
let t = new Set(U.value);
|
|
53
|
-
t.has(e) ? t.delete(e) : t.add(e), U.value = t;
|
|
54
|
-
}
|
|
55
|
-
function pe() {
|
|
56
|
-
try {
|
|
57
|
-
let e = localStorage.getItem(R.value);
|
|
58
|
-
if (!e) {
|
|
59
|
-
V.value = [];
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
let t = JSON.parse(e);
|
|
63
|
-
Array.isArray(t) ? V.value = t.filter((e) => e && typeof e == "object" && typeof e.id == "string" && e.values && typeof e.savedAt == "string") : V.value = [];
|
|
64
|
-
} catch {
|
|
65
|
-
V.value = [];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function q() {
|
|
69
|
-
try {
|
|
70
|
-
localStorage.setItem(R.value, JSON.stringify(V.value));
|
|
71
|
-
} catch {}
|
|
72
|
-
}
|
|
73
|
-
m(pe);
|
|
74
|
-
let J = a(() => Object.values(L.values).some((e) => e !== null && e !== "" && e !== void 0));
|
|
75
|
-
function me() {
|
|
76
|
-
return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
77
|
-
}
|
|
78
|
-
x(() => [L.values, H.value], () => {
|
|
79
|
-
Y.value &&= !1;
|
|
80
|
-
}, { deep: !0 });
|
|
81
|
-
let Y = g(!1);
|
|
82
|
-
function X() {
|
|
83
|
-
if (!J.value) return;
|
|
84
|
-
let e = H.value.trim();
|
|
85
|
-
V.value = [{
|
|
86
|
-
id: me(),
|
|
87
|
-
savedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
88
|
-
name: e || void 0,
|
|
89
|
-
values: { ...L.values }
|
|
90
|
-
}, ...V.value].slice(0, P), H.value = "", q(), f(() => {
|
|
91
|
-
Y.value = !0;
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function he(e) {
|
|
95
|
-
z("load", { ...e.values }), z("change", { ...e.values });
|
|
96
|
-
}
|
|
97
|
-
function Z(e) {
|
|
98
|
-
if (V.value = V.value.filter((t) => t.id !== e.id), U.value.has(e.id)) {
|
|
99
|
-
let t = new Set(U.value);
|
|
100
|
-
t.delete(e.id), U.value = t;
|
|
101
|
-
}
|
|
102
|
-
q();
|
|
103
|
-
}
|
|
104
|
-
function ge() {
|
|
105
|
-
V.value = [], U.value = /* @__PURE__ */ new Set(), q(), W.value = !1;
|
|
106
|
-
}
|
|
107
|
-
function Q(e) {
|
|
108
|
-
return r(L.items, e.values);
|
|
109
|
-
}
|
|
110
|
-
let _e = a(() => {
|
|
111
|
-
let e = /* @__PURE__ */ new Map();
|
|
112
|
-
for (let t of V.value) e.set(t.id, Q(t));
|
|
113
|
-
return e;
|
|
114
|
-
});
|
|
115
|
-
function $(e) {
|
|
116
|
-
return _e.value.get(e.id) ?? Q(e);
|
|
117
|
-
}
|
|
118
|
-
let ve = a(() => V.value.length >= P - F);
|
|
119
|
-
function ye(t) {
|
|
120
|
-
let n = new Date(t);
|
|
121
|
-
return isNaN(n.getTime()) ? t : e(n, "YYYY-MM-DD HH:mm");
|
|
122
|
-
}
|
|
123
|
-
return (e, r) => {
|
|
124
|
-
let a = v("tooltip");
|
|
125
|
-
return h(), c("div", te, [l("div", ne, [l("button", {
|
|
126
|
-
type: "button",
|
|
127
|
-
class: p(["filters-history__toggle", { "is-open": B.value }]),
|
|
128
|
-
"aria-expanded": B.value,
|
|
129
|
-
onClick: r[0] ||= (e) => B.value = !B.value
|
|
130
|
-
}, [
|
|
131
|
-
r[6] ||= l("i", { class: "fa-solid fa-sliders filters-history__toggle-icon" }, null, -1),
|
|
132
|
-
r[7] ||= l("span", { class: "filters-history__toggle-label" }, "Mentett szűrők", -1),
|
|
133
|
-
V.value.length ? (h(), c("span", ie, y(V.value.length), 1)) : s("", !0),
|
|
134
|
-
ve.value ? S((h(), c("span", ae, [u("/ " + y(P))])), [[a, `Maximum ${P} szűrő menthető`]]) : s("", !0),
|
|
135
|
-
l("i", { class: p(["fa-solid filters-history__chevron", B.value ? "fa-chevron-up" : "fa-chevron-down"]) }, null, 2)
|
|
136
|
-
], 10, re), B.value ? (h(), c("div", oe, [
|
|
137
|
-
l("div", se, [S(l("input", {
|
|
138
|
-
"onUpdate:modelValue": r[1] ||= (e) => H.value = e,
|
|
139
|
-
type: "text",
|
|
140
|
-
class: "c-input-row c-input-row--sm",
|
|
141
|
-
placeholder: "Elnevezés",
|
|
142
|
-
onKeydown: C(X, ["enter"])
|
|
143
|
-
}, null, 544), [[b, H.value]]), ee(t, {
|
|
144
|
-
icon: "fa-solid fa-bookmark",
|
|
145
|
-
label: "Mentés",
|
|
146
|
-
size: "small",
|
|
147
|
-
type: "info",
|
|
148
|
-
disabled: !J.value || Y.value,
|
|
149
|
-
onClick: X
|
|
150
|
-
}, null, 8, ["disabled"])]),
|
|
151
|
-
!J.value && V.value.length === 0 ? (h(), c("p", ce, " Nincs aktív szűrő. Adj meg értékeket a mentéshez. ")) : V.value.length === 0 ? (h(), c("p", le, [...r[8] ||= [
|
|
152
|
-
u(" Még nincs mentett szűrő.", -1),
|
|
153
|
-
l("br", null, null, -1),
|
|
154
|
-
u(" Az aktuális beállítások a „Mentés\" gombbal menthetők.", -1),
|
|
155
|
-
l("br", null, null, -1),
|
|
156
|
-
u(" Az „Elnevezés\" mező csak a könnyebb azonosítás miatt van, megadása nem kötelező. ", -1)
|
|
157
|
-
]])) : s("", !0),
|
|
158
|
-
V.value.length > 0 ? (h(), c("ul", ue, [(h(!0), c(i, null, _(V.value, (e) => (h(), c("li", {
|
|
159
|
-
key: e.id,
|
|
160
|
-
class: p(["filters-history__item", { "is-open": G(e.id) }])
|
|
161
|
-
}, [l("div", {
|
|
162
|
-
class: p(["filters-history__item-header", { "is-open": G(e.id) }]),
|
|
163
|
-
role: "button",
|
|
164
|
-
tabindex: "0",
|
|
165
|
-
"aria-expanded": G(e.id),
|
|
166
|
-
onClick: (t) => K(e.id),
|
|
167
|
-
onKeydown: [C(w((t) => K(e.id), ["prevent"]), ["enter"]), C(w((t) => K(e.id), ["prevent"]), ["space"])]
|
|
168
|
-
}, [
|
|
169
|
-
l("i", { class: p(["fa-solid filters-history__item-chevron", G(e.id) ? "fa-chevron-down" : "fa-chevron-right"]) }, null, 2),
|
|
170
|
-
l("span", fe, [l("span", T, y(ye(e.savedAt)), 1), e.name ? (h(), c("span", E, y(e.name), 1)) : s("", !0)]),
|
|
171
|
-
l("div", {
|
|
172
|
-
class: "filters-history__item-actions",
|
|
173
|
-
onClick: r[2] ||= w(() => {}, ["stop"])
|
|
174
|
-
}, [
|
|
175
|
-
l("button", {
|
|
176
|
-
type: "button",
|
|
177
|
-
class: "c-indicator filters-history__item-btn filters-history__item-load",
|
|
178
|
-
"aria-label": "Betöltés",
|
|
179
|
-
title: "Betöltés",
|
|
180
|
-
onClick: (t) => he(e)
|
|
181
|
-
}, [...r[9] ||= [l("i", { class: "fa-solid fa-check" }, null, -1)]], 8, D),
|
|
182
|
-
$(e).length ? S((h(), c("span", {
|
|
183
|
-
key: 0,
|
|
184
|
-
class: "c-indicator",
|
|
185
|
-
onClick: w((t) => K(e.id), ["stop"])
|
|
186
|
-
}, [u(y($(e).length), 1)], 8, O)), [[a, `${$(e).length} szűrési feltétel`]]) : s("", !0),
|
|
187
|
-
l("button", {
|
|
188
|
-
type: "button",
|
|
189
|
-
class: "c-indicator filters-history__item-btn filters-history__item-remove",
|
|
190
|
-
"aria-label": "Törlés",
|
|
191
|
-
title: "Törlés",
|
|
192
|
-
onClick: (t) => Z(e)
|
|
193
|
-
}, [...r[10] ||= [l("i", { class: "fa-solid fa-xmark" }, null, -1)]], 8, k)
|
|
194
|
-
])
|
|
195
|
-
], 42, de), G(e.id) ? (h(), c("div", A, [$(e).length ? (h(), c("div", j, [(h(!0), c(i, null, _($(e), (e, t) => (h(), c("span", {
|
|
196
|
-
key: t,
|
|
197
|
-
class: p(["c-chip", e.displayClass])
|
|
198
|
-
}, y(e.text), 3))), 128))])) : (h(), c("p", M, "Nincs megjeleníthető szűrő."))])) : s("", !0)], 2))), 128))])) : s("", !0),
|
|
199
|
-
V.value.length > 3 ? (h(), c("div", N, [
|
|
200
|
-
r[11] ||= l("hr", { class: "separator my-1" }, null, -1),
|
|
201
|
-
V.value.length ? (h(), c("a", {
|
|
202
|
-
key: 0,
|
|
203
|
-
class: "filters-history__clear-all px-2",
|
|
204
|
-
onClick: r[3] ||= (e) => W.value = !0
|
|
205
|
-
}, "Összes törlése")) : s("", !0),
|
|
206
|
-
W.value ? (h(), o(n, {
|
|
207
|
-
key: 1,
|
|
208
|
-
title: "Mentett szűrők törlése",
|
|
209
|
-
message: "Biztosan törlöd az összes mentett szűrőt?",
|
|
210
|
-
"confirm-label": "Törlés",
|
|
211
|
-
"cancel-label": "Mégse",
|
|
212
|
-
type: "error",
|
|
213
|
-
onConfirm: r[4] ||= (e) => ge(),
|
|
214
|
-
onCancel: r[5] ||= (e) => W.value = !1
|
|
215
|
-
})) : s("", !0)
|
|
216
|
-
])) : s("", !0)
|
|
217
|
-
])) : s("", !0)])]);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
});
|
|
1
|
+
//#region src/utils/debounce.ts
|
|
2
|
+
function e(e, t = 300) {
|
|
3
|
+
let n = null;
|
|
4
|
+
return (...r) => {
|
|
5
|
+
n !== null && clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
6
|
+
};
|
|
7
|
+
}
|
|
221
8
|
//#endregion
|
|
222
|
-
export {
|
|
9
|
+
export { e as debounce };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { parseDropdownValue as e } from "./admins-components71.js";
|
|
2
|
+
//#region src/utils/filterUrlSync.ts
|
|
3
|
+
function t(e) {
|
|
4
|
+
let t = new URLSearchParams(window.location.search), r = {};
|
|
5
|
+
for (let i of e) {
|
|
6
|
+
if (i.type === "separator") continue;
|
|
7
|
+
let e = t.get(i.key);
|
|
8
|
+
r[i.key] = e === null ? i.value ?? null : n(i.type, e, i.value);
|
|
9
|
+
}
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
12
|
+
function n(t, n, i) {
|
|
13
|
+
if (t === "number") {
|
|
14
|
+
let e = Number(n);
|
|
15
|
+
return isNaN(e) ? i ?? null : e;
|
|
16
|
+
}
|
|
17
|
+
return t === "date" || t === "datetime" ? { utc: n } : t === "daterange" || t === "datetimerange" ? r(n, i) : t === "dropdown" ? e(n) : t === "checkbox" ? n === "true" : n;
|
|
18
|
+
}
|
|
19
|
+
function r(e, t) {
|
|
20
|
+
try {
|
|
21
|
+
let t = JSON.parse(e);
|
|
22
|
+
return t && typeof t == "object" && "local" in t && t.local && (t.local = new Date(t.local)), t;
|
|
23
|
+
} catch {
|
|
24
|
+
return t ?? null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function i(e) {
|
|
28
|
+
let t = new URLSearchParams(window.location.search), r = {};
|
|
29
|
+
for (let i of e) {
|
|
30
|
+
if (i.type === "separator") continue;
|
|
31
|
+
let e = t.get(i.key);
|
|
32
|
+
e !== null && (r[i.key] = n(i.type, e, i.value));
|
|
33
|
+
}
|
|
34
|
+
return r;
|
|
35
|
+
}
|
|
36
|
+
function a(e, t) {
|
|
37
|
+
let n = new URLSearchParams(window.location.search);
|
|
38
|
+
for (let r of e) {
|
|
39
|
+
if (r.type === "separator") continue;
|
|
40
|
+
let e = t[r.key];
|
|
41
|
+
e == null || e === "" ? n.delete(r.key) : r.type === "date" || r.type === "datetime" ? n.set(r.key, e.utc) : typeof e == "object" ? n.set(r.key, JSON.stringify(e)) : n.set(r.key, String(e));
|
|
42
|
+
}
|
|
43
|
+
let r = n.toString(), i = window.location.pathname + (r ? `?${r}` : "");
|
|
44
|
+
window.history.replaceState(null, "", i);
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { t as getFilterParams, i as readFilterParams, a as writeFilterParams };
|
|
@@ -1,7 +1,251 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import e from "./admins-components5.js";
|
|
2
|
+
import t from "./admins-components13.js";
|
|
3
|
+
import n from "./admins-components15.js";
|
|
4
|
+
import r from "./admins-components18.js";
|
|
5
|
+
import i from "./admins-components21.js";
|
|
6
|
+
import a from "./admins-components26.js";
|
|
7
|
+
import o from "./admins-components74.js";
|
|
8
|
+
import { debounce as s } from "./admins-components75.js";
|
|
9
|
+
import { readFilterParams as c, writeFilterParams as l } from "./admins-components76.js";
|
|
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
|
+
//#region src/components/data-table/DataFilters.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var D = { class: "data-filters" }, O = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "data-filters__separator"
|
|
15
|
+
}, k = { class: "c-label" }, A = [
|
|
16
|
+
"placeholder",
|
|
17
|
+
"value",
|
|
18
|
+
"onInput"
|
|
19
|
+
], j = [
|
|
20
|
+
"placeholder",
|
|
21
|
+
"value",
|
|
22
|
+
"onInput"
|
|
23
|
+
], M = [
|
|
24
|
+
"placeholder",
|
|
25
|
+
"value",
|
|
26
|
+
"onInput"
|
|
27
|
+
], N = { class: "data-filters__footer" }, P = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "separator my-3"
|
|
30
|
+
}, F = /*@__PURE__*/ g({
|
|
31
|
+
__name: "DataFilters",
|
|
32
|
+
props: {
|
|
33
|
+
open: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
items: {},
|
|
38
|
+
position: { default: "left" },
|
|
39
|
+
lazy: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !0
|
|
42
|
+
},
|
|
43
|
+
handleUrl: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
historyEnabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !0
|
|
50
|
+
},
|
|
51
|
+
storageKey: {}
|
|
52
|
+
},
|
|
53
|
+
emits: ["close", "change"],
|
|
54
|
+
setup(g, { expose: F, emit: I }) {
|
|
55
|
+
let L = g, R = I, z = x(W()), B = x({});
|
|
56
|
+
function V(e, t) {
|
|
57
|
+
t ? B.value[e] = t : delete B.value[e];
|
|
58
|
+
}
|
|
59
|
+
function H(e) {
|
|
60
|
+
return {
|
|
61
|
+
...e.config ?? {},
|
|
62
|
+
showTime: e.type === "datetime",
|
|
63
|
+
placeholder: e.placeholder ?? (e.type === "datetime" ? "Időpont" : "Dátum")
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function U(e) {
|
|
67
|
+
return {
|
|
68
|
+
...e.config ?? {},
|
|
69
|
+
...e.fullWidth ? {} : { compact: !0 },
|
|
70
|
+
showTime: e.type === "datetimerange"
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function W(e = null) {
|
|
74
|
+
let t = {};
|
|
75
|
+
for (let n of L.items) n.type !== "separator" && (t[n.key] = n.value ?? e);
|
|
76
|
+
return t;
|
|
77
|
+
}
|
|
78
|
+
y(() => {
|
|
79
|
+
if (!L.handleUrl) return;
|
|
80
|
+
let e = c(L.items);
|
|
81
|
+
console.log(e), Object.keys(e).length > 0 && (z.value = {
|
|
82
|
+
...z.value,
|
|
83
|
+
...e
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
function G(e) {
|
|
87
|
+
return Object.fromEntries(Object.entries(e).filter(([e, t]) => t !== null && t !== "" && t !== void 0));
|
|
88
|
+
}
|
|
89
|
+
function K(e, t) {
|
|
90
|
+
z.value = {
|
|
91
|
+
...z.value,
|
|
92
|
+
[e]: t
|
|
93
|
+
}, L.lazy || (L.handleUrl && l(L.items, z.value), R("change", G(z.value)));
|
|
94
|
+
}
|
|
95
|
+
let q = s((e, t) => {
|
|
96
|
+
K(e, t);
|
|
97
|
+
});
|
|
98
|
+
function J() {
|
|
99
|
+
L.handleUrl && l(L.items, z.value), R("change", G(z.value)), R("close");
|
|
100
|
+
}
|
|
101
|
+
function Y() {
|
|
102
|
+
z.value = {}, L.handleUrl && l(L.items, z.value), R("change", G(z.value));
|
|
103
|
+
}
|
|
104
|
+
let X = x(!1);
|
|
105
|
+
T(z, (e) => {
|
|
106
|
+
X.value = Object.values(e).some((e) => e !== null && e !== "" && e !== void 0);
|
|
107
|
+
}, {
|
|
108
|
+
deep: !0,
|
|
109
|
+
immediate: !0
|
|
110
|
+
});
|
|
111
|
+
function Z(e) {
|
|
112
|
+
z.value = {
|
|
113
|
+
...z.value,
|
|
114
|
+
[e]: null
|
|
115
|
+
}, L.handleUrl && l(L.items, z.value), R("change", G(z.value));
|
|
116
|
+
}
|
|
117
|
+
function Q(e) {
|
|
118
|
+
let t = B.value[e];
|
|
119
|
+
if (t) {
|
|
120
|
+
if (typeof t.focusAndOpen == "function") {
|
|
121
|
+
t.focusAndOpen();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
typeof t.focus == "function" && t.focus();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function $(e) {
|
|
128
|
+
let t = { ...z.value };
|
|
129
|
+
for (let n of L.items) n.type !== "separator" && n.key in e && (t[n.key] = e[n.key] ?? null);
|
|
130
|
+
z.value = t, L.handleUrl && l(L.items, z.value), R("change", G(z.value));
|
|
131
|
+
}
|
|
132
|
+
return F({
|
|
133
|
+
clearFilter: Z,
|
|
134
|
+
focusFilter: Q
|
|
135
|
+
}), (s, c) => (b(), d(a, {
|
|
136
|
+
open: g.open,
|
|
137
|
+
title: "Szűrők",
|
|
138
|
+
position: g.position,
|
|
139
|
+
onClose: c[0] ||= (e) => R("close")
|
|
140
|
+
}, {
|
|
141
|
+
default: E(() => [
|
|
142
|
+
m("div", D, [(b(!0), p(u, null, S(g.items, (e) => (b(), p("div", {
|
|
143
|
+
key: e.key,
|
|
144
|
+
class: v(["data-filters__field", { "data-filters__field--full": e.fullWidth || e.type === "separator" }])
|
|
145
|
+
}, [e.type === "separator" ? (b(), p("hr", O)) : e.type === "checkbox" ? (b(), d(n, _({
|
|
146
|
+
key: 1,
|
|
147
|
+
ref_for: !0,
|
|
148
|
+
ref: (t) => V(e.key, t),
|
|
149
|
+
"model-value": z.value[e.key] ?? !1,
|
|
150
|
+
label: e.label ?? e.key,
|
|
151
|
+
"onUpdate:modelValue": (t) => K(e.key, t)
|
|
152
|
+
}, { ref_for: !0 }, e.config), null, 16, [
|
|
153
|
+
"model-value",
|
|
154
|
+
"label",
|
|
155
|
+
"onUpdate:modelValue"
|
|
156
|
+
])) : (b(), p(u, { key: 2 }, [m("label", k, C(e.label ?? e.key), 1), e.type === "text" ? (b(), p("input", _({
|
|
157
|
+
key: 0,
|
|
158
|
+
type: "text",
|
|
159
|
+
class: "c-input-row",
|
|
160
|
+
placeholder: e.placeholder,
|
|
161
|
+
value: z.value[e.key] ?? "",
|
|
162
|
+
ref_for: !0,
|
|
163
|
+
ref: (t) => V(e.key, t),
|
|
164
|
+
onInput: (t) => w(q)(e.key, t.target.value || null)
|
|
165
|
+
}, { ref_for: !0 }, e.config), null, 16, A)) : e.type === "textarea" ? (b(), p("textarea", _({
|
|
166
|
+
key: 1,
|
|
167
|
+
class: "c-input-row data-filters__textarea",
|
|
168
|
+
placeholder: e.placeholder,
|
|
169
|
+
value: z.value[e.key] ?? "",
|
|
170
|
+
ref_for: !0,
|
|
171
|
+
ref: (t) => V(e.key, t)
|
|
172
|
+
}, { ref_for: !0 }, e.config, { onInput: (t) => w(q)(e.key, t.target.value || null) }), null, 16, j)) : e.type === "number" ? (b(), p("input", _({
|
|
173
|
+
key: 2,
|
|
174
|
+
type: "number",
|
|
175
|
+
class: "c-input-row",
|
|
176
|
+
placeholder: e.placeholder,
|
|
177
|
+
value: z.value[e.key] ?? "",
|
|
178
|
+
ref_for: !0,
|
|
179
|
+
ref: (t) => V(e.key, t)
|
|
180
|
+
}, { ref_for: !0 }, e.config, { onInput: (t) => w(q)(e.key, t.target.value ? Number(t.target.value) : null) }), null, 16, M)) : e.type === "date" || e.type === "datetime" ? (b(), d(t, {
|
|
181
|
+
key: 3,
|
|
182
|
+
ref_for: !0,
|
|
183
|
+
ref: (t) => V(e.key, t),
|
|
184
|
+
"model-value": z.value[e.key] ?? null,
|
|
185
|
+
config: H(e),
|
|
186
|
+
"onUpdate:modelValue": (t) => K(e.key, t)
|
|
187
|
+
}, null, 8, [
|
|
188
|
+
"model-value",
|
|
189
|
+
"config",
|
|
190
|
+
"onUpdate:modelValue"
|
|
191
|
+
])) : e.type === "daterange" || e.type === "datetimerange" ? (b(), d(r, {
|
|
192
|
+
key: 4,
|
|
193
|
+
ref_for: !0,
|
|
194
|
+
ref: (t) => V(e.key, t),
|
|
195
|
+
"model-value": z.value[e.key] ?? null,
|
|
196
|
+
config: U(e),
|
|
197
|
+
"onUpdate:modelValue": (t) => K(e.key, t)
|
|
198
|
+
}, null, 8, [
|
|
199
|
+
"model-value",
|
|
200
|
+
"config",
|
|
201
|
+
"onUpdate:modelValue"
|
|
202
|
+
])) : e.type === "dropdown" ? (b(), d(i, {
|
|
203
|
+
key: 5,
|
|
204
|
+
ref_for: !0,
|
|
205
|
+
ref: (t) => V(e.key, t),
|
|
206
|
+
"model-value": z.value[e.key] ?? null,
|
|
207
|
+
options: e.options ?? [],
|
|
208
|
+
config: {
|
|
209
|
+
...e.config ?? {},
|
|
210
|
+
placeholder: e.placeholder ?? "Válassz...",
|
|
211
|
+
clearable: !0,
|
|
212
|
+
filterable: !0
|
|
213
|
+
},
|
|
214
|
+
"onUpdate:modelValue": (t) => K(e.key, t)
|
|
215
|
+
}, null, 8, [
|
|
216
|
+
"model-value",
|
|
217
|
+
"options",
|
|
218
|
+
"config",
|
|
219
|
+
"onUpdate:modelValue"
|
|
220
|
+
])) : f("", !0)], 64))], 2))), 128))]),
|
|
221
|
+
m("div", N, [h(e, {
|
|
222
|
+
icon: "fa-solid fa-trash-can",
|
|
223
|
+
disabled: !X.value,
|
|
224
|
+
label: "Szűrők törlése",
|
|
225
|
+
size: "small",
|
|
226
|
+
onClick: Y
|
|
227
|
+
}, null, 8, ["disabled"]), h(e, {
|
|
228
|
+
label: "Szűrés",
|
|
229
|
+
type: "success",
|
|
230
|
+
onClick: J
|
|
231
|
+
})]),
|
|
232
|
+
g.historyEnabled ? (b(), p("hr", P)) : f("", !0),
|
|
233
|
+
g.historyEnabled ? (b(), d(o, {
|
|
234
|
+
key: 1,
|
|
235
|
+
items: g.items,
|
|
236
|
+
values: z.value,
|
|
237
|
+
"storage-key": g.storageKey,
|
|
238
|
+
onLoad: $,
|
|
239
|
+
onChange: $
|
|
240
|
+
}, null, 8, [
|
|
241
|
+
"items",
|
|
242
|
+
"values",
|
|
243
|
+
"storage-key"
|
|
244
|
+
])) : f("", !0)
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["open", "position"]));
|
|
248
|
+
}
|
|
249
|
+
});
|
|
6
250
|
//#endregion
|
|
7
|
-
export {
|
|
251
|
+
export { F as default };
|
|
@@ -1,47 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let e = t.get(i.key);
|
|
8
|
-
r[i.key] = e === null ? i.value ?? null : n(i.type, e, i.value);
|
|
9
|
-
}
|
|
10
|
-
return r;
|
|
11
|
-
}
|
|
12
|
-
function n(t, n, i) {
|
|
13
|
-
if (t === "number") {
|
|
14
|
-
let e = Number(n);
|
|
15
|
-
return isNaN(e) ? i ?? null : e;
|
|
16
|
-
}
|
|
17
|
-
return t === "date" || t === "datetime" ? { utc: n } : t === "daterange" || t === "datetimerange" ? r(n, i) : t === "dropdown" ? e(n) : t === "checkbox" ? n === "true" : n;
|
|
18
|
-
}
|
|
19
|
-
function r(e, t) {
|
|
20
|
-
try {
|
|
21
|
-
let t = JSON.parse(e);
|
|
22
|
-
return t && typeof t == "object" && "local" in t && t.local && (t.local = new Date(t.local)), t;
|
|
23
|
-
} catch {
|
|
24
|
-
return t ?? null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function i(e) {
|
|
28
|
-
let t = new URLSearchParams(window.location.search), r = {};
|
|
29
|
-
for (let i of e) {
|
|
30
|
-
if (i.type === "separator") continue;
|
|
31
|
-
let e = t.get(i.key);
|
|
32
|
-
e !== null && (r[i.key] = n(i.type, e, i.value));
|
|
33
|
-
}
|
|
34
|
-
return r;
|
|
35
|
-
}
|
|
36
|
-
function a(e, t) {
|
|
37
|
-
let n = new URLSearchParams(window.location.search);
|
|
38
|
-
for (let r of e) {
|
|
39
|
-
if (r.type === "separator") continue;
|
|
40
|
-
let e = t[r.key];
|
|
41
|
-
e == null || e === "" ? n.delete(r.key) : r.type === "date" || r.type === "datetime" ? n.set(r.key, e.utc) : typeof e == "object" ? n.set(r.key, JSON.stringify(e)) : n.set(r.key, String(e));
|
|
42
|
-
}
|
|
43
|
-
let r = n.toString(), i = window.location.pathname + (r ? `?${r}` : "");
|
|
44
|
-
window.history.replaceState(null, "", i);
|
|
45
|
-
}
|
|
1
|
+
import './src/styles/components/data-table/data-filters.scss_vue_type_style_index_0_src_true_lang.css';
|
|
2
|
+
import "./admins-components76.js";
|
|
3
|
+
import e from "./admins-components77.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
//#region src/components/data-table/DataFilters.vue
|
|
6
|
+
var t = e;
|
|
46
7
|
//#endregion
|
|
47
|
-
export { t as
|
|
8
|
+
export { t as default };
|