admins-components 9.0.10 → 9.0.12
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 +1 -1
- package/dist/admins-components28.js +16 -32
- package/dist/admins-components46.js +1 -1
- package/dist/admins-components57.js +33 -26
- package/dist/admins-components59.js +44 -32
- package/dist/admins-components62.js +61 -43
- package/dist/admins-components66.js +32 -21
- package/dist/admins-components69.js +25 -17
- package/dist/admins-components77.js +2 -4
- package/dist/admins-components87.js +125 -131
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/styles/components/data-table/data-cards.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- 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/data-paginator.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/styles/components/data-table/data-table.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/styles/components/header.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/package.json +2 -2
|
@@ -58,4 +58,4 @@ import { configureInternalArticleOfferElement as ke, iaoeConfig as Ae } from "./
|
|
|
58
58
|
import je from "./admins-components166.js";
|
|
59
59
|
import { configurePartnerPickerElement as Me, ppeconfig as Ne } from "./admins-components167.js";
|
|
60
60
|
import Pe from "./admins-components169.js";
|
|
61
|
-
export { me as ArticleOfferElement, ye as ArticlePickerElement, ue as BackendService, n as Button, o as Calendar, c as Checkbox, h as ConfirmModal, g as CopyToClipboard, R as DataCards, K as DataFilters, Y as DataList, B as DataListOptions, H as DataPaginator, L as DataTable, s as DatePicker, l as DateRangePicker, be as DateTimePickerElement, d as DropdownMenu, u as DropdownSelect, v as ExternalArticleOffer, Ce as ExternalArticleOfferElement, ie as FetchDetails, ae as FetchError, q as FilterTags, U as FiltersHistory, Ee as GalleryImageSelectorElement, p as
|
|
61
|
+
export { me as ArticleOfferElement, ye as ArticlePickerElement, ue as BackendService, n as Button, o as Calendar, c as Checkbox, h as ConfirmModal, g as CopyToClipboard, R as DataCards, K as DataFilters, Y as DataList, B as DataListOptions, H as DataPaginator, L as DataTable, s as DatePicker, l as DateRangePicker, be as DateTimePickerElement, d as DropdownMenu, u as DropdownSelect, v as ExternalArticleOffer, Ce as ExternalArticleOfferElement, ie as FetchDetails, ae as FetchError, q as FilterTags, U as FiltersHistory, Ee as GalleryImageSelectorElement, p as HeaderComponent, _ as ImagePicker, Oe as ImagePickerDetailsElement, De as ImagePickerElement, y as InternalArticleOffer, je as InternalArticleOfferElement, b as Loader, oe as Methods, m as Modal, Pe as PartnerPickerElement, f as Sidebar, S as ToastNotification, fe as aoeConfig, he as apeConfig, E as booleanToString, r as calendarConfigDefaults, pe as configureArticleOfferElement, ge as configureArticlePickerElement, xe as configureExternalArticleOfferElement, we as configureGalleryImageSelectorElement, _e as configureImagePickerElement, ke as configureInternalArticleOfferElement, Me as configurePartnerPickerElement, re as createNativeFetch, C as dataCardsSettingsDefaults, D as dataListConverters, J as dataListDefaults, w as dataListSettingsDefaults, T as dataTableSettingsDefaults, i as datePickerConfigDefaults, a as dateRangePickerConfigDefaults, W as debounce, z as deepMerge, Se as eaoeConfig, O as enumMap, k as formatCurrency, e as formatDate, A as formatNumber, te as getCurrentSite, V as getDefaultPaginator, G as getFilterParams, Z as getUrlParam, Te as gisConfig, Ae as iaoeConfig, j as identity, se as initRequest, ve as ipeConfig, X as isIpInUrl, Q as joinUrl, M as listToString, N as localToLocalString, t as parseDate, Ne as ppeconfig, $ as removeUrlParam, ee as setUrlParam, P as shortUuid, F as textEllipse, x as toast, ce as useArticleEditorService, de as useBackendService, le as useCurrentUser, I as utcToLocalString, ne as vTooltip };
|
|
@@ -1,61 +1,45 @@
|
|
|
1
1
|
import e from "./admins-components6.js";
|
|
2
|
-
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, mergeDefaults as c,
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, mergeDefaults as c, mergeProps as l, normalizeClass as u, openBlock as d, renderList as f, toDisplayString as p } from "vue";
|
|
3
3
|
//#region src/components/HeaderComponent.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var m = { class: "ac-component" }, h = { class: "hc-header" }, g = { class: "hc-left" }, _ = { class: "hc-title-group" }, v = { class: "hc-title" }, y = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "hc-toolbars"
|
|
7
|
-
},
|
|
7
|
+
}, b = {
|
|
8
8
|
icon: void 0,
|
|
9
9
|
showBackButton: !1,
|
|
10
10
|
toolbars: () => []
|
|
11
|
-
},
|
|
11
|
+
}, x = /* @__PURE__ */ s({
|
|
12
12
|
__name: "HeaderComponent",
|
|
13
13
|
props: /* @__PURE__ */ c({
|
|
14
14
|
title: {},
|
|
15
15
|
icon: {},
|
|
16
16
|
showBackButton: { type: Boolean },
|
|
17
17
|
toolbars: {}
|
|
18
|
-
}, { ...
|
|
18
|
+
}, { ...b }),
|
|
19
19
|
emits: ["back"],
|
|
20
20
|
setup(s, { emit: c }) {
|
|
21
|
-
let
|
|
21
|
+
let b = s, x = c, S = n(() => {
|
|
22
22
|
let e = {
|
|
23
23
|
left: 0,
|
|
24
24
|
center: 1,
|
|
25
25
|
right: 2
|
|
26
26
|
};
|
|
27
|
-
return [...
|
|
27
|
+
return [...b.toolbars].sort((t, n) => e[t.align] - e[n.align]);
|
|
28
28
|
});
|
|
29
|
-
return (n, c) => (
|
|
29
|
+
return (n, c) => (d(), a("div", m, [o("header", h, [o("div", g, [s.showBackButton ? (d(), r(e, {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "hc-back-btn",
|
|
32
32
|
icon: "fa-solid fa-chevron-left",
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
"aria-label": "Vissza",
|
|
34
|
+
onClick: c[0] ||= (e) => x("back")
|
|
35
|
+
})) : i("", !0), o("div", _, [s.icon ? (d(), a("i", {
|
|
35
36
|
key: 0,
|
|
36
|
-
class:
|
|
37
|
-
}, null, 2)) : i("", !0), o("h1",
|
|
37
|
+
class: u([s.icon, "hc-title-icon"])
|
|
38
|
+
}, null, 2)) : i("", !0), o("h1", v, p(s.title), 1)])]), S.value.length ? (d(), a("div", y, [(d(!0), a(t, null, f(S.value, (n, i) => (d(), a("div", {
|
|
38
39
|
key: i,
|
|
39
|
-
class:
|
|
40
|
-
}, [(
|
|
41
|
-
key: n,
|
|
42
|
-
label: t.label,
|
|
43
|
-
icon: t.icon,
|
|
44
|
-
"icon-position": t.iconPosition,
|
|
45
|
-
type: t.type,
|
|
46
|
-
size: t.size,
|
|
47
|
-
outline: t.outline,
|
|
48
|
-
onClick: (e) => t.callback?.()
|
|
49
|
-
}, null, 8, [
|
|
50
|
-
"label",
|
|
51
|
-
"icon",
|
|
52
|
-
"icon-position",
|
|
53
|
-
"type",
|
|
54
|
-
"size",
|
|
55
|
-
"outline",
|
|
56
|
-
"onClick"
|
|
57
|
-
]))), 128))], 2))), 128))])) : i("", !0)])]));
|
|
40
|
+
class: u(["hc-buttons", `hc-buttons--${n.align}`])
|
|
41
|
+
}, [(d(!0), a(t, null, f(n.buttons, (t, n) => (d(), r(e, l({ key: n }, { ref_for: !0 }, t), null, 16))), 128))], 2))), 128))])) : i("", !0)])]));
|
|
58
42
|
}
|
|
59
43
|
});
|
|
60
44
|
//#endregion
|
|
61
|
-
export {
|
|
45
|
+
export { x as default, b as headerComponentDefaults };
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import e from "./admins-components38.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import t from "./admins-components48.js";
|
|
3
|
+
import { getColumnValue as n } from "./admins-components55.js";
|
|
4
|
+
import { shortUuid as r } from "./admins-components56.js";
|
|
5
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, resolveDirective as f, toDisplayString as p, withDirectives as m } from "vue";
|
|
5
6
|
//#region src/components/data-table/DataCell.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
7
|
-
key:
|
|
7
|
+
var h = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "dc-loading"
|
|
10
|
+
}, g = { key: 1 }, _ = ["innerHTML"], v = {
|
|
11
|
+
key: 2,
|
|
8
12
|
class: "dc-datetime"
|
|
9
|
-
},
|
|
13
|
+
}, y = { class: "dc-datetime__part" }, b = {
|
|
10
14
|
key: 0,
|
|
11
15
|
class: "dc-datetime__sep"
|
|
12
|
-
},
|
|
16
|
+
}, x = { class: "dc-datetime__part" }, S = { key: 3 }, C = ["innerHTML"], w = /* @__PURE__ */ u({
|
|
13
17
|
__name: "DataCell",
|
|
14
18
|
props: {
|
|
15
19
|
item: {},
|
|
@@ -19,10 +23,10 @@ var p = { key: 0 }, m = ["innerHTML"], h = {
|
|
|
19
23
|
default: !0
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
24
|
-
if (
|
|
25
|
-
let e =
|
|
26
|
+
setup(u) {
|
|
27
|
+
let w = u, T = i(() => n(w.item, w.col)), E = i(() => r()(T.value)), D = i(() => {
|
|
28
|
+
if (w.col.type !== "datetime") return null;
|
|
29
|
+
let e = T.value;
|
|
26
30
|
if (!e) return {
|
|
27
31
|
date: "",
|
|
28
32
|
time: ""
|
|
@@ -36,25 +40,28 @@ var p = { key: 0 }, m = ["innerHTML"], h = {
|
|
|
36
40
|
time: e.slice(t + 1)
|
|
37
41
|
};
|
|
38
42
|
});
|
|
39
|
-
return (
|
|
40
|
-
let
|
|
41
|
-
return
|
|
43
|
+
return (n, r) => {
|
|
44
|
+
let i = f("tooltip");
|
|
45
|
+
return u.col.loading?.() ? (d(), s("span", h, [l(t, {
|
|
46
|
+
loading: !0,
|
|
47
|
+
size: "1rem"
|
|
48
|
+
})])) : u.col.type === "uuid" ? m((d(), s("span", g, [c("span", { innerHTML: E.value }, null, 8, _), u.copy && T.value ? (d(), a(e, {
|
|
42
49
|
key: 0,
|
|
43
|
-
value:
|
|
44
|
-
}, null, 8, ["value"])) :
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
value: T.value
|
|
51
|
+
}, null, 8, ["value"])) : o("", !0)])), [[i, T.value]]) : u.col.type === "datetime" ? (d(), s("span", v, [
|
|
52
|
+
c("span", y, p(D.value?.date), 1),
|
|
53
|
+
D.value?.time ? (d(), s("span", b)) : o("", !0),
|
|
54
|
+
c("span", x, p(D.value?.time), 1),
|
|
55
|
+
u.copy && T.value ? (d(), a(e, {
|
|
49
56
|
key: 1,
|
|
50
|
-
value:
|
|
51
|
-
}, null, 8, ["value"])) :
|
|
52
|
-
])) : (
|
|
57
|
+
value: T.value
|
|
58
|
+
}, null, 8, ["value"])) : o("", !0)
|
|
59
|
+
])) : (d(), s("span", S, [c("span", { innerHTML: T.value }, null, 8, C), u.copy && T.value ? (d(), a(e, {
|
|
53
60
|
key: 0,
|
|
54
|
-
value:
|
|
55
|
-
}, null, 8, ["value"])) :
|
|
61
|
+
value: T.value
|
|
62
|
+
}, null, 8, ["value"])) : o("", !0)]));
|
|
56
63
|
};
|
|
57
64
|
}
|
|
58
65
|
});
|
|
59
66
|
//#endregion
|
|
60
|
-
export {
|
|
67
|
+
export { w as default };
|
|
@@ -10,10 +10,14 @@ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d
|
|
|
10
10
|
var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick"], k = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "c-actions-header"
|
|
13
|
-
}, A = ["onClick"],
|
|
13
|
+
}, A = { key: 0 }, j = ["onClick"], M = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "c-actions-cell"
|
|
16
|
-
},
|
|
16
|
+
}, N = { class: "c-actions-wrap" }, P = { key: 1 }, F = { class: "c-table__loading-row" }, I = ["colspan"], L = { class: "c-table__loading-wrap" }, R = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "c-table__backdrop",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}, z = /* @__PURE__ */ g({
|
|
17
21
|
__name: "DataTable",
|
|
18
22
|
props: {
|
|
19
23
|
config: {},
|
|
@@ -26,68 +30,67 @@ var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick
|
|
|
26
30
|
},
|
|
27
31
|
emits: ["selection-change", "sort-change"],
|
|
28
32
|
setup(i, { emit: g }) {
|
|
29
|
-
let
|
|
30
|
-
function
|
|
31
|
-
let t =
|
|
32
|
-
|
|
33
|
+
let z = i, B = g, V = x(null), { selectedKeys: H, allSelected: U, toggle: W, toggleAll: G } = r(() => z.items, () => z.config.selectableAttr, (e) => B("selection-change", e)), K = l(() => z.config.columns.filter((e) => e.visible !== !1));
|
|
34
|
+
function q(e) {
|
|
35
|
+
let t = V.value?.key === e && V.value.direction === "asc" ? "desc" : "asc";
|
|
36
|
+
V.value = {
|
|
33
37
|
key: e,
|
|
34
38
|
direction: t
|
|
35
|
-
},
|
|
39
|
+
}, B("sort-change", {
|
|
36
40
|
key: e,
|
|
37
41
|
direction: t
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
|
-
return (r, l) => (b(), f("div", E, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class: v(["c-table", { "is-compact": i.settings.compact }]),
|
|
44
|
+
return (r, l) => (b(), f("div", E, [p("table", {
|
|
45
|
+
class: v(["c-table", {
|
|
46
|
+
"is-compact": i.settings.compact,
|
|
47
|
+
"is-loading": i.loading
|
|
48
|
+
}]),
|
|
46
49
|
style: y({ "--action-count": i.config.actions?.length ?? 0 })
|
|
47
50
|
}, [p("thead", null, [p("tr", null, [
|
|
48
51
|
i.config.selectableAttr ? (b(), f("th", D, [p("span", {
|
|
49
|
-
class: v(["c-checkbox", { "c-checkbox--checked": w(
|
|
50
|
-
onClick: l[0] ||= (...e) => w(
|
|
52
|
+
class: v(["c-checkbox", { "c-checkbox--checked": w(U) }]),
|
|
53
|
+
onClick: l[0] ||= (...e) => w(G) && w(G)(...e)
|
|
51
54
|
}, null, 2)])) : d("", !0),
|
|
52
|
-
(b(!0), f(c, null, S(
|
|
55
|
+
(b(!0), f(c, null, S(K.value, (e) => (b(), f("th", {
|
|
53
56
|
key: e.property,
|
|
54
57
|
class: v({
|
|
55
58
|
"c-sortable": e.sort,
|
|
56
|
-
"c-sortable--sorted":
|
|
59
|
+
"c-sortable--sorted": V.value?.key === e.property
|
|
57
60
|
}),
|
|
58
|
-
onClick: (t) => e.sort ?
|
|
61
|
+
onClick: (t) => e.sort ? q(e.property) : void 0
|
|
59
62
|
}, [m(C(e.label) + " ", 1), e.sort ? (b(), f("span", {
|
|
60
63
|
key: 0,
|
|
61
64
|
class: v(["c-sort-icon fa-solid", {
|
|
62
|
-
"fa-sort":
|
|
63
|
-
"fa-sort-down":
|
|
64
|
-
"fa-sort-up":
|
|
65
|
-
"c-sort-icon--active":
|
|
66
|
-
"is-asc":
|
|
67
|
-
"is-desc":
|
|
65
|
+
"fa-sort": V.value?.key !== e.property,
|
|
66
|
+
"fa-sort-down": V.value?.key === e.property && V.value.direction === "desc",
|
|
67
|
+
"fa-sort-up": V.value?.key === e.property && V.value.direction === "asc",
|
|
68
|
+
"c-sort-icon--active": V.value?.key === e.property,
|
|
69
|
+
"is-asc": V.value?.key === e.property && V.value.direction === "asc",
|
|
70
|
+
"is-desc": V.value?.key === e.property && V.value.direction === "desc"
|
|
68
71
|
}])
|
|
69
72
|
}, null, 2)) : d("", !0)], 10, O))), 128)),
|
|
70
73
|
i.config.actions ? (b(), f("th", k, C(i.config.actionHeader ?? ""), 1)) : d("", !0)
|
|
71
|
-
])]),
|
|
74
|
+
])]), !i.loading || i.items.length > 0 ? (b(), f("tbody", A, [(b(!0), f(c, null, S(i.items, (n, r) => (b(), f("tr", {
|
|
72
75
|
key: r,
|
|
73
76
|
class: v({
|
|
74
|
-
"is-selected": i.config.selectableAttr && w(
|
|
77
|
+
"is-selected": i.config.selectableAttr && w(H).has(n[i.config.selectableAttr]),
|
|
75
78
|
"is-striped": i.settings.striped && r % 2 == 1
|
|
76
79
|
})
|
|
77
80
|
}, [
|
|
78
81
|
i.config.selectableAttr ? (b(), f("td", {
|
|
79
82
|
key: 0,
|
|
80
83
|
class: "pointer",
|
|
81
|
-
onClick: T((e) => w(
|
|
82
|
-
}, [p("span", { class: v(["c-checkbox", { "c-checkbox--checked": w(
|
|
83
|
-
(b(!0), f(c, null, S(
|
|
84
|
+
onClick: T((e) => w(W)(n), ["stop"])
|
|
85
|
+
}, [p("span", { class: v(["c-checkbox", { "c-checkbox--checked": w(H).has(n[i.config.selectableAttr]) }]) }, null, 2)], 8, j)) : d("", !0),
|
|
86
|
+
(b(!0), f(c, null, S(K.value, (e) => (b(), f("td", {
|
|
84
87
|
key: e.property,
|
|
85
88
|
class: v(["c-table__cell", [e.class]])
|
|
86
89
|
}, [h(s, {
|
|
87
90
|
item: n,
|
|
88
91
|
col: e
|
|
89
92
|
}, null, 8, ["item", "col"])], 2))), 128)),
|
|
90
|
-
i.config.actions ? (b(), f("td",
|
|
93
|
+
i.config.actions ? (b(), f("td", M, [p("div", N, [(b(!0), f(c, null, S(i.config.actions, (r, i) => (b(), f(c, { key: i }, [w(o)(r) ? (b(), u(t, _({
|
|
91
94
|
key: 0,
|
|
92
95
|
icon: r.icon,
|
|
93
96
|
label: r.label,
|
|
@@ -115,8 +118,17 @@ var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick
|
|
|
115
118
|
"ariaLabel",
|
|
116
119
|
"callback"
|
|
117
120
|
]))], 64))), 128))])])) : d("", !0)
|
|
118
|
-
], 2))), 128))])
|
|
121
|
+
], 2))), 128))])) : (b(), f("tbody", P, [p("tr", F, [p("td", {
|
|
122
|
+
colspan: K.value.length + +!!i.config.selectableAttr + +!!i.config.actions,
|
|
123
|
+
class: "c-table__loading-cell"
|
|
124
|
+
}, [p("div", L, [h(n, {
|
|
125
|
+
loading: !0,
|
|
126
|
+
size: "2.5rem"
|
|
127
|
+
})])], 8, I)])]))], 6), i.loading && i.items.length > 0 ? (b(), f("div", R, [h(n, {
|
|
128
|
+
loading: !0,
|
|
129
|
+
size: "2.5rem"
|
|
130
|
+
})])) : d("", !0)]));
|
|
119
131
|
}
|
|
120
132
|
});
|
|
121
133
|
//#endregion
|
|
122
|
-
export {
|
|
134
|
+
export { z as default };
|
|
@@ -6,9 +6,16 @@ import { useSelection as i } from "./admins-components53.js";
|
|
|
6
6
|
import { dataCardsSettingsDefaults as a } from "./admins-components54.js";
|
|
7
7
|
import { buildActionGroupMenuItems as o, getColumnValue as s, isActionGroup as c } from "./admins-components55.js";
|
|
8
8
|
import l from "./admins-components58.js";
|
|
9
|
-
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as v, normalizeClass as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, vShow as T,
|
|
9
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as v, normalizeClass as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, vShow as T, watch as E, withDirectives as D, withModifiers as O } from "vue";
|
|
10
10
|
//#region src/components/data-table/DataCards.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var k = ["onClick", "onPointerdown"], A = ["onClick"], j = { class: "c-card__heading" }, M = { class: "c-card__label" }, N = ["innerHTML"], P = { class: "c-card__body" }, F = { class: "c-card__field-label" }, I = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "c-cards__loading-wrap"
|
|
14
|
+
}, L = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "c-cards__backdrop",
|
|
17
|
+
"aria-hidden": "true"
|
|
18
|
+
}, R = /* @__PURE__ */ _({
|
|
12
19
|
__name: "DataCards",
|
|
13
20
|
props: {
|
|
14
21
|
config: {},
|
|
@@ -21,10 +28,14 @@ var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onCli
|
|
|
21
28
|
},
|
|
22
29
|
emits: ["selection-change"],
|
|
23
30
|
setup(a, { emit: _ }) {
|
|
24
|
-
let
|
|
25
|
-
|
|
31
|
+
let R = a, z = _, { selectedKeys: B, toggle: V } = i(() => R.items, () => R.config.selectableAttr, (e) => z("selection-change", e)), H = x(/* @__PURE__ */ new Set());
|
|
32
|
+
E(() => R.items, () => {
|
|
33
|
+
H.value = /* @__PURE__ */ new Set();
|
|
34
|
+
});
|
|
35
|
+
let U = d(() => R.config.columns.filter((e) => e.visible !== !1)), W = d(() => {
|
|
36
|
+
let e = R.settings;
|
|
26
37
|
if (e?.cardHeaderColumns) {
|
|
27
|
-
let t =
|
|
38
|
+
let t = U.value.filter((t) => e.cardHeaderColumns[t.property]);
|
|
28
39
|
if (t.length > 0) {
|
|
29
40
|
if (e.cardHeaderOrder) {
|
|
30
41
|
let n = e.cardHeaderOrder;
|
|
@@ -36,84 +47,85 @@ var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onCli
|
|
|
36
47
|
return t;
|
|
37
48
|
}
|
|
38
49
|
}
|
|
39
|
-
let t =
|
|
40
|
-
return t.length > 0 ? t :
|
|
41
|
-
}),
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
let t = U.value.filter((e) => e.primary);
|
|
51
|
+
return t.length > 0 ? t : U.value.slice(0, 1);
|
|
52
|
+
}), G = null, K = !1;
|
|
53
|
+
function q(e, t) {
|
|
54
|
+
R.config.selectableAttr && e.button === 0 && (K = !1, G = setTimeout(() => {
|
|
55
|
+
K = !0, V(t);
|
|
45
56
|
}, 500));
|
|
46
57
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
58
|
+
function J() {
|
|
59
|
+
G &&= (clearTimeout(G), null);
|
|
49
60
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
61
|
+
function Y(e) {
|
|
62
|
+
K && e.preventDefault();
|
|
52
63
|
}
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
55
|
-
|
|
64
|
+
function X(e) {
|
|
65
|
+
if (K) {
|
|
66
|
+
K = !1;
|
|
56
67
|
return;
|
|
57
68
|
}
|
|
58
|
-
|
|
69
|
+
Z(e);
|
|
59
70
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
71
|
+
function Z(e) {
|
|
72
|
+
H.value.has(e) ? H.value.delete(e) : H.value.add(e), H.value = new Set(H.value);
|
|
62
73
|
}
|
|
63
|
-
return (i, d) => (b(), m("div",
|
|
74
|
+
return (i, d) => (b(), m("div", { class: y(["ac-component", { "is-loading": a.loading }]) }, [!a.loading || a.items.length > 0 ? (b(), m("div", {
|
|
64
75
|
key: 0,
|
|
65
|
-
loading: !0
|
|
66
|
-
})) : (b(), m("div", {
|
|
67
|
-
key: 1,
|
|
68
76
|
class: y(["c-cards", { "is-compact": a.settings.compact }])
|
|
69
77
|
}, [(b(!0), m(u, null, S(a.items, (r, i) => (b(), m("div", {
|
|
70
78
|
key: i,
|
|
71
79
|
class: y(["c-card", {
|
|
72
|
-
"is-open":
|
|
73
|
-
"is-selected": a.config.selectableAttr && w(
|
|
80
|
+
"is-open": H.value.has(i),
|
|
81
|
+
"is-selected": a.config.selectableAttr && w(B).has(r[a.config.selectableAttr])
|
|
74
82
|
}])
|
|
75
83
|
}, [h("button", {
|
|
76
84
|
type: "button",
|
|
77
85
|
class: "c-card__header",
|
|
78
|
-
onClick: (e) =>
|
|
79
|
-
onPointerdown: (e) =>
|
|
80
|
-
onPointerup: d[0] ||= (e) =>
|
|
81
|
-
onPointerleave: d[1] ||= (e) =>
|
|
82
|
-
onContextmenu:
|
|
86
|
+
onClick: (e) => X(i),
|
|
87
|
+
onPointerdown: (e) => q(e, r),
|
|
88
|
+
onPointerup: d[0] ||= (e) => J(),
|
|
89
|
+
onPointerleave: d[1] ||= (e) => J(),
|
|
90
|
+
onContextmenu: Y
|
|
83
91
|
}, [
|
|
84
92
|
a.config.selectableAttr ? (b(), m("span", {
|
|
85
93
|
key: 0,
|
|
86
94
|
class: "c-card__check-zone",
|
|
87
|
-
onClick:
|
|
88
|
-
}, [h("span", { class: y(["c-card__check", { "is-checked": w(
|
|
89
|
-
h("span", j, [(b(!0), m(u, null, S(
|
|
95
|
+
onClick: O((e) => w(V)(r), ["stop"])
|
|
96
|
+
}, [h("span", { class: y(["c-card__check", { "is-checked": w(B).has(r[a.config.selectableAttr]) }]) }, [...d[3] ||= [h("i", { class: "fa-solid fa-check" }, null, -1)]], 2)], 8, A)) : p("", !0),
|
|
97
|
+
h("span", j, [(b(!0), m(u, null, S(W.value, (e, t) => (b(), m("span", {
|
|
90
98
|
key: e.property,
|
|
91
99
|
class: "c-card__heading-item"
|
|
92
|
-
}, [h("span", M, C(e.label), 1), h("span", {
|
|
100
|
+
}, [h("span", M, C(e.label), 1), h("span", {
|
|
101
|
+
class: y(["c-card__title", { "c-truncate": a.settings.compact && t === 0 }]),
|
|
102
|
+
innerHTML: w(s)(r, e)
|
|
103
|
+
}, null, 10, N)]))), 128))]),
|
|
93
104
|
d[4] ||= h("span", {
|
|
94
105
|
class: "c-card__icon",
|
|
95
106
|
"aria-hidden": "true"
|
|
96
107
|
}, [h("i", { class: "fa-solid fa-chevron-down" })], -1)
|
|
97
|
-
], 40, k),
|
|
108
|
+
], 40, k), D(h("div", P, [(b(!0), m(u, null, S(U.value, (e) => (b(), m("div", {
|
|
98
109
|
key: e.property,
|
|
99
110
|
class: "c-card__field",
|
|
100
111
|
tabindex: "0"
|
|
101
112
|
}, [
|
|
102
|
-
h("span",
|
|
113
|
+
h("span", F, C(e.label), 1),
|
|
103
114
|
g(l, {
|
|
104
115
|
item: r,
|
|
105
116
|
col: e,
|
|
106
117
|
class: "c-card__field-value",
|
|
107
118
|
copy: !1
|
|
108
119
|
}, null, 8, ["item", "col"]),
|
|
109
|
-
|
|
120
|
+
w(s)(r, e) ? (b(), f(n, {
|
|
121
|
+
key: 0,
|
|
110
122
|
class: "c-card__field-copy click-expand",
|
|
111
123
|
value: w(s)(r, e)
|
|
112
|
-
}, null, 8, ["value"])
|
|
124
|
+
}, null, 8, ["value"])) : p("", !0)
|
|
113
125
|
]))), 128)), a.config.actions ? (b(), m("div", {
|
|
114
126
|
key: 0,
|
|
115
127
|
class: "c-card__actions",
|
|
116
|
-
onClick: d[2] ||=
|
|
128
|
+
onClick: d[2] ||= O(() => {}, ["stop"])
|
|
117
129
|
}, [(b(!0), m(u, null, S(a.config.actions, (n, i) => (b(), m(u, { key: i }, [w(c)(n) ? (b(), f(t, v({
|
|
118
130
|
key: 0,
|
|
119
131
|
icon: n.icon,
|
|
@@ -141,8 +153,14 @@ var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onCli
|
|
|
141
153
|
"ariaLabel",
|
|
142
154
|
"disabled",
|
|
143
155
|
"callback"
|
|
144
|
-
]))], 64))), 128))])) : p("", !0)], 512), [[T,
|
|
156
|
+
]))], 64))), 128))])) : p("", !0)], 512), [[T, H.value.has(i)]])], 2))), 128))], 2)) : (b(), m("div", I, [g(r, {
|
|
157
|
+
loading: !0,
|
|
158
|
+
size: "2.5rem"
|
|
159
|
+
})])), a.loading && a.items.length > 0 ? (b(), m("div", L, [g(r, {
|
|
160
|
+
loading: !0,
|
|
161
|
+
size: "2.5rem"
|
|
162
|
+
})])) : p("", !0)], 2));
|
|
145
163
|
}
|
|
146
164
|
});
|
|
147
165
|
//#endregion
|
|
148
|
-
export {
|
|
166
|
+
export { R as default };
|
|
@@ -59,14 +59,25 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
59
59
|
let e = localStorage.getItem(R.value), t = z();
|
|
60
60
|
if (e) {
|
|
61
61
|
let n = JSON.parse(e);
|
|
62
|
-
L.value = n.settings ? ee(t, n.settings) : t;
|
|
62
|
+
L.value = n.settings ? ve(ee(t, n.settings), F.columns) : t;
|
|
63
63
|
} else L.value = t;
|
|
64
64
|
} catch {
|
|
65
65
|
L.value = z();
|
|
66
66
|
}
|
|
67
67
|
I("change", L.value);
|
|
68
68
|
}
|
|
69
|
-
function ve() {
|
|
69
|
+
function ve(e, t) {
|
|
70
|
+
let n = t.map((e) => e.property), r = (e) => {
|
|
71
|
+
let t = new Set(n), r = (e ?? []).filter((e) => t.has(e)), i = n.filter((e) => !r.includes(e));
|
|
72
|
+
return [...r, ...i];
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
...e,
|
|
76
|
+
columnOrder: r(e.columnOrder),
|
|
77
|
+
cardHeaderOrder: r(e.cardHeaderOrder)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function ye() {
|
|
70
81
|
try {
|
|
71
82
|
let e = R.value, t = localStorage.getItem(e), n = t ? JSON.parse(t) : {};
|
|
72
83
|
n.settings = L.value, localStorage.setItem(e, JSON.stringify(n));
|
|
@@ -77,7 +88,7 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
77
88
|
L.value = {
|
|
78
89
|
...L.value,
|
|
79
90
|
[e]: t
|
|
80
|
-
},
|
|
91
|
+
}, ye();
|
|
81
92
|
}
|
|
82
93
|
function V(e) {
|
|
83
94
|
B("columns", {
|
|
@@ -101,18 +112,18 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
101
112
|
});
|
|
102
113
|
}
|
|
103
114
|
let G = o(() => W(F.columns, L.value.columnOrder)), K = o(() => W(F.columns, L.value.cardHeaderOrder)), q = _(null), J = _(null), Y = _(null), X = _(null);
|
|
104
|
-
function
|
|
115
|
+
function be(e) {
|
|
105
116
|
q.value = e;
|
|
106
117
|
}
|
|
107
|
-
function
|
|
118
|
+
function xe(e, t) {
|
|
108
119
|
if (e.preventDefault(), q.value === null || q.value === t) return;
|
|
109
120
|
let n = [...L.value.columnOrder], r = n.splice(q.value, 1)[0];
|
|
110
121
|
r && (n.splice(t, 0, r), q.value = t, B("columnOrder", n));
|
|
111
122
|
}
|
|
112
|
-
function
|
|
123
|
+
function Se() {
|
|
113
124
|
q.value = null;
|
|
114
125
|
}
|
|
115
|
-
function
|
|
126
|
+
function Ce(e) {
|
|
116
127
|
J.value = J.value === e ? null : e;
|
|
117
128
|
}
|
|
118
129
|
function Z(e) {
|
|
@@ -122,18 +133,18 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
122
133
|
let n = [...L.value.columnOrder], r = n[J.value];
|
|
123
134
|
n[J.value] = n[t], n[t] = r, B("columnOrder", n), J.value = t;
|
|
124
135
|
}
|
|
125
|
-
function
|
|
136
|
+
function we(e) {
|
|
126
137
|
Y.value = e;
|
|
127
138
|
}
|
|
128
|
-
function
|
|
139
|
+
function Q(e, t) {
|
|
129
140
|
if (e.preventDefault(), Y.value === null || Y.value === t) return;
|
|
130
141
|
let n = [...L.value.cardHeaderOrder], r = n.splice(Y.value, 1)[0];
|
|
131
142
|
r && (n.splice(t, 0, r), Y.value = t, B("cardHeaderOrder", n));
|
|
132
143
|
}
|
|
133
|
-
function
|
|
144
|
+
function Te() {
|
|
134
145
|
Y.value = null;
|
|
135
146
|
}
|
|
136
|
-
function
|
|
147
|
+
function Ee(e) {
|
|
137
148
|
X.value = X.value === e ? null : e;
|
|
138
149
|
}
|
|
139
150
|
function $(e) {
|
|
@@ -143,7 +154,7 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
143
154
|
let n = [...L.value.cardHeaderOrder], r = n[X.value];
|
|
144
155
|
n[X.value] = n[t], n[t] = r, B("cardHeaderOrder", n), X.value = t;
|
|
145
156
|
}
|
|
146
|
-
function
|
|
157
|
+
function De() {
|
|
147
158
|
localStorage.removeItem(R.value), L.value = z(), I("change", L.value);
|
|
148
159
|
}
|
|
149
160
|
return h(_e), (n, r) => {
|
|
@@ -197,11 +208,11 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
197
208
|
"table-options__item--dragging": p.orderable && Y.value === t
|
|
198
209
|
}]),
|
|
199
210
|
draggable: p.orderable,
|
|
200
|
-
onDragstart: C((e) => p.orderable &&
|
|
201
|
-
onDragover: C((e) => p.orderable &&
|
|
211
|
+
onDragstart: C((e) => p.orderable && we(t), ["stop"]),
|
|
212
|
+
onDragover: C((e) => p.orderable && Q(e, t), ["prevent"]),
|
|
202
213
|
onDrop: r[7] ||= C(() => {}, ["prevent"]),
|
|
203
|
-
onDragend: r[8] ||= (e) => p.orderable &&
|
|
204
|
-
onClick: C((n) => p.orderable ?
|
|
214
|
+
onDragend: r[8] ||= (e) => p.orderable && Te(),
|
|
215
|
+
onClick: C((n) => p.orderable ? Ee(t) : !e.primary && H(e.property), ["prevent"])
|
|
205
216
|
}, [p.orderable ? (g(), l("i", fe)) : c("", !0), u("span", {
|
|
206
217
|
class: "table-options__toggle",
|
|
207
218
|
onClick: C((t) => !e.primary && H(e.property), ["stop"])
|
|
@@ -226,11 +237,11 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
226
237
|
"table-options__item--dragging": p.orderable && q.value === t
|
|
227
238
|
}]),
|
|
228
239
|
draggable: p.orderable,
|
|
229
|
-
onDragstart: C((e) => p.orderable &&
|
|
230
|
-
onDragover: C((e) => p.orderable &&
|
|
240
|
+
onDragstart: C((e) => p.orderable && be(t), ["stop"]),
|
|
241
|
+
onDragover: C((e) => p.orderable && xe(e, t), ["prevent"]),
|
|
231
242
|
onDrop: r[11] ||= C(() => {}, ["prevent"]),
|
|
232
|
-
onDragend: r[12] ||= (e) => p.orderable &&
|
|
233
|
-
onClick: C((n) => p.orderable ?
|
|
243
|
+
onDragend: r[12] ||= (e) => p.orderable && Se(),
|
|
244
|
+
onClick: C((n) => p.orderable ? Ce(t) : !e.primary && V(e.property), ["prevent"])
|
|
234
245
|
}, [p.orderable ? (g(), l("i", O)) : c("", !0), u("span", {
|
|
235
246
|
class: "table-options__toggle",
|
|
236
247
|
onClick: C((t) => !e.primary && V(e.property), ["stop"])
|
|
@@ -250,7 +261,7 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
|
|
|
250
261
|
disabled: !ge.value,
|
|
251
262
|
label: "Alapértelmezés visszaállítása",
|
|
252
263
|
size: "small",
|
|
253
|
-
onClick:
|
|
264
|
+
onClick: De
|
|
254
265
|
}, null, 8, ["disabled"]), f(e, {
|
|
255
266
|
label: "OK",
|
|
256
267
|
onClick: r[15] ||= (e) => I("close")
|