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,112 +1,60 @@
|
|
|
1
|
-
import e from "./admins-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
let
|
|
21
|
-
if (e
|
|
1
|
+
import { formatDate as e } from "./admins-components3.js";
|
|
2
|
+
//#region src/utils/filterDisplay.ts
|
|
3
|
+
function t(t, r, i) {
|
|
4
|
+
if (i == null || i === "") return "";
|
|
5
|
+
let a = t.find((e) => e.key === r);
|
|
6
|
+
if (a?.type === "dropdown" && a.options) {
|
|
7
|
+
let e = n(i);
|
|
8
|
+
if (Array.isArray(e)) return e.map((e) => {
|
|
9
|
+
let t = a.options?.find((t) => t.value === e);
|
|
10
|
+
return t ? t.label : String(e);
|
|
11
|
+
}).join(", ");
|
|
12
|
+
let t = a.options.find((t) => t.value === e);
|
|
13
|
+
if (t) return t.label;
|
|
14
|
+
}
|
|
15
|
+
if (a?.type === "checkbox") return i ? "Bekapcsolva" : "";
|
|
16
|
+
if (a?.type === "date" || a?.type === "datetime") {
|
|
17
|
+
if (typeof i == "object" && i) {
|
|
18
|
+
let t = i.local ?? i.utc ?? null;
|
|
19
|
+
if (t == null) return "";
|
|
20
|
+
let n = t instanceof Date ? t : new Date(t);
|
|
21
|
+
if (!isNaN(n.getTime())) return e(n, a.type === "datetime" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD");
|
|
22
|
+
}
|
|
23
|
+
if (typeof i == "string" && i) {
|
|
24
|
+
let t = new Date(i);
|
|
25
|
+
if (!isNaN(t.getTime())) return e(t, a.type === "datetime" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD");
|
|
22
26
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
27
|
+
}
|
|
28
|
+
if ((a?.type === "daterange" || a?.type === "datetimerange") && typeof i == "object") {
|
|
29
|
+
let t = a.type === "datetimerange" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD";
|
|
30
|
+
return `${i.fromUtc ? e(new Date(i.fromUtc), t) : "…"} - ${i.toUtc ? e(new Date(i.toUtc), t) : "…"}`;
|
|
31
|
+
}
|
|
32
|
+
return typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
25
33
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
function n(e) {
|
|
35
|
+
if (Array.isArray(e)) return e;
|
|
36
|
+
if (typeof e == "string") {
|
|
37
|
+
if (e.startsWith("[") && e.endsWith("]")) try {
|
|
38
|
+
let t = JSON.parse(e);
|
|
39
|
+
if (Array.isArray(t)) return t;
|
|
40
|
+
} catch {}
|
|
41
|
+
return e;
|
|
42
|
+
}
|
|
43
|
+
return e;
|
|
32
44
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
localStorage.setItem(C + T.storageKey, String(e));
|
|
45
|
-
} catch {}
|
|
46
|
-
}
|
|
47
|
-
let O = n(() => Math.max(1, Math.ceil(T.settings.total / T.settings.pageSize))), k = n(() => T.settings.total === 0 ? 0 : (T.settings.page - 1) * T.settings.pageSize + 1), A = n(() => Math.min(T.settings.page * T.settings.pageSize, T.settings.total)), j = n(() => {
|
|
48
|
-
let e = O.value, t = T.settings.page, n = [];
|
|
49
|
-
if (e <= 7) {
|
|
50
|
-
for (let t = 1; t <= e; t++) n.push(t);
|
|
51
|
-
return n;
|
|
52
|
-
}
|
|
53
|
-
n.push(1), t > 3 && n.push("...");
|
|
54
|
-
let r = Math.max(2, t - 1), i = Math.min(e - 1, t + 1);
|
|
55
|
-
for (let e = r; e <= i; e++) n.push(e);
|
|
56
|
-
return t < e - 2 && n.push("..."), n.push(e), n;
|
|
45
|
+
function r(e, n) {
|
|
46
|
+
let r = [];
|
|
47
|
+
for (let [i, a] of Object.entries(n)) {
|
|
48
|
+
let n = t(e, i, a);
|
|
49
|
+
if (!n) continue;
|
|
50
|
+
let o = e.find((e) => e.key === i), s = o?.label ?? i;
|
|
51
|
+
r.push({
|
|
52
|
+
key: i,
|
|
53
|
+
text: `${s}: ${n}`,
|
|
54
|
+
displayClass: o?.displayClass
|
|
57
55
|
});
|
|
58
|
-
function M(e) {
|
|
59
|
-
let t = T.settings.page, n = O.value, r = e === 1 || e === n, i = e === t;
|
|
60
|
-
return t > 3 && t < n - 2 && !r && !i;
|
|
61
|
-
}
|
|
62
|
-
function N(e) {
|
|
63
|
-
e < 1 || e > O.value || e === T.settings.page || E("update:pagination", {
|
|
64
|
-
page: e,
|
|
65
|
-
pageSize: T.settings.pageSize
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function P(e) {
|
|
69
|
-
let t = Number(e.target.value);
|
|
70
|
-
D(t), E("update:pagination", {
|
|
71
|
-
page: 1,
|
|
72
|
-
pageSize: t
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
return (n, C) => (c(), r("div", d, [i("div", f, [
|
|
76
|
-
i("div", p, [i("span", m, u(k.value) + "–" + u(A.value), 1), i("span", h, " / " + u(o.settings.total), 1)]),
|
|
77
|
-
i("nav", g, [
|
|
78
|
-
a(e, {
|
|
79
|
-
icon: "fa-solid fa-chevron-left",
|
|
80
|
-
rel: "prev",
|
|
81
|
-
disabled: o.settings.page <= 1,
|
|
82
|
-
callback: () => N(o.settings.page - 1)
|
|
83
|
-
}, null, 8, ["disabled", "callback"]),
|
|
84
|
-
(c(!0), r(t, null, l(j.value, (e, n) => (c(), r(t, { key: n }, [e === "..." ? (c(), r("span", _, "…")) : (c(), r("button", {
|
|
85
|
-
key: 1,
|
|
86
|
-
type: "button",
|
|
87
|
-
class: s(["c-paginator__page", {
|
|
88
|
-
"is-active": e === o.settings.page,
|
|
89
|
-
"is-hidden-sm": M(e)
|
|
90
|
-
}]),
|
|
91
|
-
onClick: (t) => N(e)
|
|
92
|
-
}, u(e), 11, v))], 64))), 128)),
|
|
93
|
-
a(e, {
|
|
94
|
-
icon: "fa-solid fa-chevron-right",
|
|
95
|
-
rel: "next",
|
|
96
|
-
disabled: o.settings.page >= O.value,
|
|
97
|
-
callback: () => N(o.settings.page + 1)
|
|
98
|
-
}, null, 8, ["disabled", "callback"])
|
|
99
|
-
]),
|
|
100
|
-
i("div", y, [i("select", {
|
|
101
|
-
class: "c-paginator__select",
|
|
102
|
-
value: o.settings.pageSize,
|
|
103
|
-
onChange: P
|
|
104
|
-
}, [(c(), r(t, null, l(S, (e) => i("option", {
|
|
105
|
-
key: e,
|
|
106
|
-
value: e
|
|
107
|
-
}, u(e) + " elem / oldal", 9, x)), 64))], 40, b)])
|
|
108
|
-
])]));
|
|
109
56
|
}
|
|
110
|
-
|
|
57
|
+
return r;
|
|
58
|
+
}
|
|
111
59
|
//#endregion
|
|
112
|
-
export {
|
|
60
|
+
export { r as buildFilterDisplay, t as displayFilterValue, n as parseDropdownValue };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { formatDate as e } from "./admins-components3.js";
|
|
2
|
+
import t from "./admins-components5.js";
|
|
3
|
+
import n from "./admins-components34.js";
|
|
4
|
+
import { buildFilterDisplay as r } from "./admins-components71.js";
|
|
5
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as ee, defineComponent as d, nextTick as f, normalizeClass as p, onMounted as m, openBlock as h, ref as g, renderList as _, resolveDirective as v, toDisplayString as y, vModelText as b, watch as x, withDirectives as S, withKeys as C, withModifiers as w } from "vue";
|
|
6
|
+
//#region src/components/data-table/FiltersHistory.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var te = { class: "ac-component" }, ne = { class: "filters-history" }, re = ["aria-expanded"], ie = {
|
|
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
|
+
});
|
|
221
|
+
//#endregion
|
|
222
|
+
export { I as default };
|
|
@@ -1,60 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (a?.type === "dropdown" && a.options) {
|
|
7
|
-
let e = n(i);
|
|
8
|
-
if (Array.isArray(e)) return e.map((e) => {
|
|
9
|
-
let t = a.options?.find((t) => t.value === e);
|
|
10
|
-
return t ? t.label : String(e);
|
|
11
|
-
}).join(", ");
|
|
12
|
-
let t = a.options.find((t) => t.value === e);
|
|
13
|
-
if (t) return t.label;
|
|
14
|
-
}
|
|
15
|
-
if (a?.type === "checkbox") return i ? "Bekapcsolva" : "";
|
|
16
|
-
if (a?.type === "date" || a?.type === "datetime") {
|
|
17
|
-
if (typeof i == "object" && i) {
|
|
18
|
-
let t = i.local ?? i.utc ?? null;
|
|
19
|
-
if (t == null) return "";
|
|
20
|
-
let n = t instanceof Date ? t : new Date(t);
|
|
21
|
-
if (!isNaN(n.getTime())) return e(n, a.type === "datetime" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD");
|
|
22
|
-
}
|
|
23
|
-
if (typeof i == "string" && i) {
|
|
24
|
-
let t = new Date(i);
|
|
25
|
-
if (!isNaN(t.getTime())) return e(t, a.type === "datetime" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if ((a?.type === "daterange" || a?.type === "datetimerange") && typeof i == "object") {
|
|
29
|
-
let t = a.type === "datetimerange" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD";
|
|
30
|
-
return `${i.fromUtc ? e(new Date(i.fromUtc), t) : "…"} - ${i.toUtc ? e(new Date(i.toUtc), t) : "…"}`;
|
|
31
|
-
}
|
|
32
|
-
return typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
33
|
-
}
|
|
34
|
-
function n(e) {
|
|
35
|
-
if (Array.isArray(e)) return e;
|
|
36
|
-
if (typeof e == "string") {
|
|
37
|
-
if (e.startsWith("[") && e.endsWith("]")) try {
|
|
38
|
-
let t = JSON.parse(e);
|
|
39
|
-
if (Array.isArray(t)) return t;
|
|
40
|
-
} catch {}
|
|
41
|
-
return e;
|
|
42
|
-
}
|
|
43
|
-
return e;
|
|
44
|
-
}
|
|
45
|
-
function r(e, n) {
|
|
46
|
-
let r = [];
|
|
47
|
-
for (let [i, a] of Object.entries(n)) {
|
|
48
|
-
let n = t(e, i, a);
|
|
49
|
-
if (!n) continue;
|
|
50
|
-
let o = e.find((e) => e.key === i), s = o?.label ?? i;
|
|
51
|
-
r.push({
|
|
52
|
-
key: i,
|
|
53
|
-
text: `${s}: ${n}`,
|
|
54
|
-
displayClass: o?.displayClass
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
return r;
|
|
58
|
-
}
|
|
1
|
+
import './src/styles/components/data-table/filters-history.scss_vue_type_style_index_0_src_true_lang.css';
|
|
2
|
+
import e from "./admins-components72.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/data-table/FiltersHistory.vue
|
|
5
|
+
var t = e;
|
|
59
6
|
//#endregion
|
|
60
|
-
export {
|
|
7
|
+
export { t as default };
|