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.
@@ -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 Header, _ 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 };
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, normalizeClass as l, openBlock as u, renderList as d, toDisplayString as f } from "vue";
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 p = { class: "ac-component" }, m = { class: "hc-header" }, h = { class: "hc-left" }, g = { class: "hc-title-group" }, _ = { class: "hc-title" }, v = {
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
- }, y = {
7
+ }, b = {
8
8
  icon: void 0,
9
9
  showBackButton: !1,
10
10
  toolbars: () => []
11
- }, b = /* @__PURE__ */ s({
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
- }, { ...y }),
18
+ }, { ...b }),
19
19
  emits: ["back"],
20
20
  setup(s, { emit: c }) {
21
- let y = s, b = c, x = n(() => {
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 [...y.toolbars].sort((t, n) => e[t.align] - e[n.align]);
27
+ return [...b.toolbars].sort((t, n) => e[t.align] - e[n.align]);
28
28
  });
29
- return (n, c) => (u(), a("div", p, [o("header", m, [o("div", h, [s.showBackButton ? (u(), r(e, {
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
- onClick: c[0] ||= (e) => b("back")
34
- })) : i("", !0), o("div", g, [s.icon ? (u(), a("i", {
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: l([s.icon, "hc-title-icon"])
37
- }, null, 2)) : i("", !0), o("h1", _, f(s.title), 1)])]), x.value.length ? (u(), a("div", v, [(u(!0), a(t, null, d(x.value, (n, i) => (u(), a("div", {
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: l(["hc-buttons", `hc-buttons--${n.align}`])
40
- }, [(u(!0), a(t, null, d(n.buttons, (t, n) => (u(), r(e, {
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 { b as default, y as headerComponentDefaults };
45
+ export { x as default, b as headerComponentDefaults };
@@ -11,7 +11,7 @@ var i = /* @__PURE__ */ t({
11
11
  class: "loader",
12
12
  style: n({
13
13
  width: t.size,
14
- "--loader-thickness": `calc(${t.size} / 5)`
14
+ "--loader-thickness": `calc(${t.size} / 6)`
15
15
  })
16
16
  }, null, 4));
17
17
  }
@@ -1,15 +1,19 @@
1
1
  import e from "./admins-components38.js";
2
- import { getColumnValue as t } from "./admins-components55.js";
3
- import { shortUuid as n } from "./admins-components56.js";
4
- import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, openBlock as l, resolveDirective as u, toDisplayString as d, withDirectives as f } from "vue";
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 p = { key: 0 }, m = ["innerHTML"], h = {
7
- key: 1,
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
- }, g = { class: "dc-datetime__part" }, _ = {
13
+ }, y = { class: "dc-datetime__part" }, b = {
10
14
  key: 0,
11
15
  class: "dc-datetime__sep"
12
- }, v = { class: "dc-datetime__part" }, y = { key: 2 }, b = ["innerHTML"], x = /* @__PURE__ */ c({
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(c) {
23
- let x = c, S = r(() => t(x.item, x.col)), C = r(() => n()(S.value)), w = r(() => {
24
- if (x.col.type !== "datetime") return null;
25
- let e = S.value;
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 (t, n) => {
40
- let r = u("tooltip");
41
- return c.col.type === "uuid" ? f((l(), o("span", p, [s("span", { innerHTML: C.value }, null, 8, m), c.copy ? (l(), i(e, {
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: S.value
44
- }, null, 8, ["value"])) : a("", !0)])), [[r, S.value]]) : c.col.type === "datetime" ? (l(), o("span", h, [
45
- s("span", g, d(w.value?.date), 1),
46
- w.value?.time ? (l(), o("span", _)) : a("", !0),
47
- s("span", v, d(w.value?.time), 1),
48
- c.copy ? (l(), i(e, {
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: S.value
51
- }, null, 8, ["value"])) : a("", !0)
52
- ])) : (l(), o("span", y, [s("span", { innerHTML: S.value }, null, 8, b), c.copy ? (l(), i(e, {
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: S.value
55
- }, null, 8, ["value"])) : a("", !0)]));
61
+ value: T.value
62
+ }, null, 8, ["value"])) : o("", !0)]));
56
63
  };
57
64
  }
58
65
  });
59
66
  //#endregion
60
- export { x as default };
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"], j = {
13
+ }, A = { key: 0 }, j = ["onClick"], M = {
14
14
  key: 1,
15
15
  class: "c-actions-cell"
16
- }, M = { class: "c-actions-wrap" }, N = /* @__PURE__ */ g({
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 N = i, P = g, F = x(null), { selectedKeys: I, allSelected: L, toggle: R, toggleAll: z } = r(() => N.items, () => N.config.selectableAttr, (e) => P("selection-change", e)), B = l(() => N.config.columns.filter((e) => e.visible !== !1));
30
- function V(e) {
31
- let t = F.value?.key === e && F.value.direction === "asc" ? "desc" : "asc";
32
- F.value = {
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
- }, P("sort-change", {
39
+ }, B("sort-change", {
36
40
  key: e,
37
41
  direction: t
38
42
  });
39
43
  }
40
- return (r, l) => (b(), f("div", E, [i.loading ? (b(), u(n, {
41
- key: 0,
42
- loading: !0
43
- })) : (b(), f("table", {
44
- key: 1,
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(L) }]),
50
- onClick: l[0] ||= (...e) => w(z) && w(z)(...e)
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(B.value, (e) => (b(), f("th", {
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": F.value?.key === e.property
59
+ "c-sortable--sorted": V.value?.key === e.property
57
60
  }),
58
- onClick: (t) => e.sort ? V(e.property) : void 0
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": F.value?.key !== e.property,
63
- "fa-sort-down": F.value?.key === e.property && F.value.direction === "desc",
64
- "fa-sort-up": F.value?.key === e.property && F.value.direction === "asc",
65
- "c-sort-icon--active": F.value?.key === e.property,
66
- "is-asc": F.value?.key === e.property && F.value.direction === "asc",
67
- "is-desc": F.value?.key === e.property && F.value.direction === "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
- ])]), p("tbody", null, [(b(!0), f(c, null, S(i.items, (n, r) => (b(), f("tr", {
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(I).has(n[i.config.selectableAttr]),
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(R)(n), ["stop"])
82
- }, [p("span", { class: v(["c-checkbox", { "c-checkbox--checked": w(I).has(n[i.config.selectableAttr]) }]) }, null, 2)], 8, A)) : d("", !0),
83
- (b(!0), f(c, null, S(B.value, (e) => (b(), f("td", {
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", j, [p("div", M, [(b(!0), f(c, null, S(i.config.actions, (r, i) => (b(), f(c, { key: i }, [w(o)(r) ? (b(), u(t, _({
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))])], 6))]));
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 { N as default };
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, withDirectives as E, withModifiers as D } from "vue";
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 O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onClick"], j = { class: "c-card__heading" }, M = { class: "c-card__label" }, N = { class: "c-card__body" }, P = { class: "c-card__field-label" }, F = /* @__PURE__ */ _({
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 F = a, I = _, { selectedKeys: L, toggle: R } = i(() => F.items, () => F.config.selectableAttr, (e) => I("selection-change", e)), z = x(/* @__PURE__ */ new Set()), B = d(() => F.config.columns.filter((e) => e.visible !== !1)), V = d(() => {
25
- let e = F.settings;
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 = B.value.filter((t) => e.cardHeaderColumns[t.property]);
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 = B.value.filter((e) => e.primary);
40
- return t.length > 0 ? t : B.value.slice(0, 1);
41
- }), H = null, U = !1;
42
- function W(e, t) {
43
- F.config.selectableAttr && e.button === 0 && (U = !1, H = setTimeout(() => {
44
- U = !0, R(t);
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 G() {
48
- H &&= (clearTimeout(H), null);
58
+ function J() {
59
+ G &&= (clearTimeout(G), null);
49
60
  }
50
- function K(e) {
51
- U && e.preventDefault();
61
+ function Y(e) {
62
+ K && e.preventDefault();
52
63
  }
53
- function q(e) {
54
- if (U) {
55
- U = !1;
64
+ function X(e) {
65
+ if (K) {
66
+ K = !1;
56
67
  return;
57
68
  }
58
- J(e);
69
+ Z(e);
59
70
  }
60
- function J(e) {
61
- z.value.has(e) ? z.value.delete(e) : z.value.add(e), z.value = new Set(z.value);
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", O, [a.loading ? (b(), f(r, {
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": z.value.has(i),
73
- "is-selected": a.config.selectableAttr && w(L).has(r[a.config.selectableAttr])
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) => q(i),
79
- onPointerdown: (e) => W(e, r),
80
- onPointerup: d[0] ||= (e) => G(),
81
- onPointerleave: d[1] ||= (e) => G(),
82
- onContextmenu: K
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: D((e) => w(R)(r), ["stop"])
88
- }, [h("span", { class: y(["c-card__check", { "is-checked": w(L).has(r[a.config.selectableAttr]) }]) }, [...d[3] ||= [h("i", { class: "fa-solid fa-check" }, null, -1)]], 2)], 8, A)) : p("", !0),
89
- h("span", j, [(b(!0), m(u, null, S(V.value, (e, t) => (b(), m("span", {
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", { class: y(["c-card__title", { "c-truncate": a.settings.compact && t === 0 }]) }, C(w(s)(r, e)), 3)]))), 128))]),
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), E(h("div", N, [(b(!0), m(u, null, S(B.value, (e) => (b(), m("div", {
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", P, C(e.label), 1),
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
- g(n, {
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] ||= D(() => {}, ["stop"])
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, z.value.has(i)]])], 2))), 128))], 2))]));
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 { F as default };
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
- }, ve();
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 ye(e) {
115
+ function be(e) {
105
116
  q.value = e;
106
117
  }
107
- function be(e, t) {
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 xe() {
123
+ function Se() {
113
124
  q.value = null;
114
125
  }
115
- function Se(e) {
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 Ce(e) {
136
+ function we(e) {
126
137
  Y.value = e;
127
138
  }
128
- function we(e, t) {
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 Q() {
144
+ function Te() {
134
145
  Y.value = null;
135
146
  }
136
- function Te(e) {
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 Ee() {
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 && Ce(t), ["stop"]),
201
- onDragover: C((e) => p.orderable && we(e, t), ["prevent"]),
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 && Q(),
204
- onClick: C((n) => p.orderable ? Te(t) : !e.primary && H(e.property), ["prevent"])
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 && ye(t), ["stop"]),
230
- onDragover: C((e) => p.orderable && be(e, t), ["prevent"]),
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 && xe(),
233
- onClick: C((n) => p.orderable ? Se(t) : !e.primary && V(e.property), ["prevent"])
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: Ee
264
+ onClick: De
254
265
  }, null, 8, ["disabled"]), f(e, {
255
266
  label: "OK",
256
267
  onClick: r[15] ||= (e) => I("close")