admins-components 9.0.7 → 9.0.9

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.
Files changed (170) hide show
  1. package/dist/admins-components.js +56 -55
  2. package/dist/admins-components100.js +26 -27
  3. package/dist/admins-components101.js +25 -169
  4. package/dist/admins-components102.js +165 -61
  5. package/dist/admins-components103.js +61 -60
  6. package/dist/admins-components104.js +65 -28
  7. package/dist/admins-components105.js +28 -14
  8. package/dist/admins-components106.js +15 -26
  9. package/dist/admins-components107.js +26 -8
  10. package/dist/admins-components108.js +9 -4
  11. package/dist/admins-components109.js +4 -3
  12. package/dist/admins-components11.js +9 -38
  13. package/dist/admins-components110.js +2 -2
  14. package/dist/admins-components111.js +3 -21
  15. package/dist/admins-components112.js +21 -14
  16. package/dist/admins-components113.js +14 -8
  17. package/dist/admins-components114.js +8 -13
  18. package/dist/admins-components115.js +11 -24
  19. package/dist/admins-components116.js +24 -81
  20. package/dist/admins-components117.js +82 -10
  21. package/dist/admins-components118.js +10 -4
  22. package/dist/admins-components119.js +5 -8
  23. package/dist/admins-components12.js +37 -141
  24. package/dist/admins-components120.js +7 -6
  25. package/dist/admins-components121.js +6 -5
  26. package/dist/admins-components122.js +4 -13
  27. package/dist/admins-components123.js +11 -9
  28. package/dist/admins-components124.js +13 -30
  29. package/dist/admins-components125.js +30 -4
  30. package/dist/admins-components126.js +4 -29
  31. package/dist/admins-components127.js +29 -5
  32. package/dist/admins-components128.js +3 -3
  33. package/dist/admins-components129.js +4 -7
  34. package/dist/admins-components13.js +145 -5
  35. package/dist/admins-components130.js +7 -73
  36. package/dist/admins-components131.js +71 -26
  37. package/dist/admins-components132.js +27 -57
  38. package/dist/admins-components133.js +57 -22
  39. package/dist/admins-components134.js +21 -47
  40. package/dist/admins-components135.js +48 -29
  41. package/dist/admins-components136.js +31 -3
  42. package/dist/admins-components137.js +3 -179
  43. package/dist/admins-components138.js +176 -43
  44. package/dist/admins-components139.js +44 -35
  45. package/dist/admins-components14.js +5 -46
  46. package/dist/admins-components140.js +34 -43
  47. package/dist/admins-components141.js +42 -137
  48. package/dist/admins-components142.js +134 -51
  49. package/dist/admins-components143.js +58 -7
  50. package/dist/admins-components144.js +6 -5
  51. package/dist/admins-components145.js +6 -76
  52. package/dist/admins-components146.js +76 -29
  53. package/dist/admins-components147.js +29 -1931
  54. package/dist/admins-components148.js +1748 -24628
  55. package/dist/admins-components149.js +24810 -8
  56. package/dist/admins-components15.js +49 -4
  57. package/dist/admins-components150.js +9 -7
  58. package/dist/admins-components151.js +7 -142
  59. package/dist/admins-components152.js +141 -8
  60. package/dist/admins-components153.js +3 -3
  61. package/dist/admins-components154.js +10 -0
  62. package/dist/admins-components156.js +161 -44
  63. package/dist/admins-components157.js +50 -8
  64. package/dist/admins-components158.js +8 -49
  65. package/dist/admins-components159.js +50 -6
  66. package/dist/admins-components16.js +4 -94
  67. package/dist/admins-components160.js +6 -80
  68. package/dist/admins-components161.js +70 -48
  69. package/dist/admins-components162.js +31 -32
  70. package/dist/admins-components163.js +58 -8
  71. package/dist/admins-components164.js +8 -51
  72. package/dist/admins-components165.js +51 -8
  73. package/dist/admins-components166.js +10 -0
  74. package/dist/{admins-components167.js → admins-components168.js} +3 -3
  75. package/dist/admins-components17.js +91 -225
  76. package/dist/admins-components18.js +245 -5
  77. package/dist/admins-components19.js +5 -181
  78. package/dist/admins-components20.js +183 -0
  79. package/dist/admins-components22.js +6 -72
  80. package/dist/admins-components23.js +78 -6
  81. package/dist/admins-components24.js +6 -58
  82. package/dist/admins-components25.js +59 -0
  83. package/dist/admins-components27.js +6 -60
  84. package/dist/admins-components28.js +61 -0
  85. package/dist/admins-components30.js +6 -36
  86. package/dist/admins-components31.js +37 -0
  87. package/dist/admins-components33.js +6 -36
  88. package/dist/admins-components34.js +36 -4
  89. package/dist/admins-components35.js +4 -32
  90. package/dist/admins-components36.js +33 -0
  91. package/dist/admins-components38.js +6 -147
  92. package/dist/admins-components39.js +148 -0
  93. package/dist/admins-components4.js +9 -56
  94. package/dist/admins-components41.js +6 -124
  95. package/dist/admins-components42.js +124 -4
  96. package/dist/admins-components43.js +4 -179
  97. package/dist/admins-components44.js +179 -4
  98. package/dist/admins-components45.js +4 -19
  99. package/dist/admins-components46.js +20 -0
  100. package/dist/admins-components48.js +6 -54
  101. package/dist/admins-components49.js +54 -93
  102. package/dist/admins-components5.js +57 -4
  103. package/dist/admins-components50.js +94 -0
  104. package/dist/admins-components52.js +6 -25
  105. package/dist/admins-components53.js +25 -9
  106. package/dist/admins-components54.js +9 -19
  107. package/dist/admins-components55.js +18 -72
  108. package/dist/admins-components56.js +73 -59
  109. package/dist/admins-components57.js +59 -4
  110. package/dist/admins-components58.js +4 -120
  111. package/dist/admins-components59.js +122 -0
  112. package/dist/admins-components6.js +4 -29
  113. package/dist/admins-components61.js +7 -143
  114. package/dist/admins-components62.js +148 -0
  115. package/dist/admins-components64.js +7 -7
  116. package/dist/admins-components65.js +7 -263
  117. package/dist/admins-components66.js +264 -0
  118. package/dist/admins-components68.js +6 -111
  119. package/dist/admins-components69.js +112 -0
  120. package/dist/admins-components7.js +29 -252
  121. package/dist/admins-components71.js +6 -59
  122. package/dist/admins-components72.js +55 -217
  123. package/dist/admins-components73.js +222 -0
  124. package/dist/admins-components75.js +6 -8
  125. package/dist/admins-components76.js +7 -45
  126. package/dist/admins-components77.js +45 -249
  127. package/dist/admins-components78.js +264 -0
  128. package/dist/admins-components8.js +253 -0
  129. package/dist/admins-components80.js +7 -37
  130. package/dist/admins-components81.js +38 -0
  131. package/dist/admins-components83.js +6 -198
  132. package/dist/admins-components84.js +199 -0
  133. package/dist/admins-components86.js +6 -203
  134. package/dist/admins-components87.js +204 -0
  135. package/dist/admins-components89.js +7 -3
  136. package/dist/admins-components90.js +3 -16
  137. package/dist/admins-components91.js +16 -3
  138. package/dist/admins-components92.js +3 -52
  139. package/dist/admins-components93.js +50 -80
  140. package/dist/admins-components94.js +78 -109
  141. package/dist/admins-components95.js +110 -41
  142. package/dist/admins-components96.js +39 -101
  143. package/dist/admins-components97.js +105 -6
  144. package/dist/admins-components98.js +5 -250
  145. package/dist/admins-components99.js +250 -25
  146. package/dist/base.css +1 -1
  147. package/dist/src/components/Button.vue.d.ts +1 -2
  148. package/dist/src/components/DatePicker.vue.d.ts +2 -0
  149. package/dist/src/components/DropdownMenu.vue.d.ts +2 -0
  150. package/dist/src/index.d.ts +1 -0
  151. package/package.json +1 -1
  152. package/dist/admins-components10.js +0 -10
  153. package/dist/admins-components155.js +0 -169
  154. package/dist/admins-components21.js +0 -7
  155. package/dist/admins-components26.js +0 -7
  156. package/dist/admins-components29.js +0 -7
  157. package/dist/admins-components32.js +0 -7
  158. package/dist/admins-components37.js +0 -7
  159. package/dist/admins-components40.js +0 -7
  160. package/dist/admins-components47.js +0 -7
  161. package/dist/admins-components51.js +0 -7
  162. package/dist/admins-components60.js +0 -8
  163. package/dist/admins-components63.js +0 -8
  164. package/dist/admins-components67.js +0 -7
  165. package/dist/admins-components70.js +0 -7
  166. package/dist/admins-components74.js +0 -7
  167. package/dist/admins-components79.js +0 -8
  168. package/dist/admins-components82.js +0 -7
  169. package/dist/admins-components85.js +0 -7
  170. package/dist/admins-components88.js +0 -8
@@ -0,0 +1,122 @@
1
+ import e from "./admins-components6.js";
2
+ import t from "./admins-components24.js";
3
+ import n from "./admins-components48.js";
4
+ import { useSelection as r } from "./admins-components53.js";
5
+ import { dataTableSettingsDefaults as i } from "./admins-components54.js";
6
+ import { buildActionGroupMenuItems as a, isActionGroup as o } from "./admins-components55.js";
7
+ import s from "./admins-components58.js";
8
+ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, normalizeStyle as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, withModifiers as T } from "vue";
9
+ //#region src/components/data-table/DataTable.vue?vue&type=script&setup=true&lang.ts
10
+ var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick"], k = {
11
+ key: 1,
12
+ class: "c-actions-header"
13
+ }, A = ["onClick"], j = {
14
+ key: 1,
15
+ class: "c-actions-cell"
16
+ }, M = { class: "c-actions-wrap" }, N = /* @__PURE__ */ g({
17
+ __name: "DataTable",
18
+ props: {
19
+ config: {},
20
+ items: {},
21
+ settings: { default: () => ({ ...i }) },
22
+ loading: {
23
+ type: Boolean,
24
+ default: !1
25
+ }
26
+ },
27
+ emits: ["selection-change", "sort-change"],
28
+ 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
+ key: e,
34
+ direction: t
35
+ }, P("sort-change", {
36
+ key: e,
37
+ direction: t
38
+ });
39
+ }
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 }]),
46
+ style: y({ "--action-count": i.config.actions?.length ?? 0 })
47
+ }, [p("thead", null, [p("tr", null, [
48
+ 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)
51
+ }, null, 2)])) : d("", !0),
52
+ (b(!0), f(c, null, S(B.value, (e) => (b(), f("th", {
53
+ key: e.property,
54
+ class: v({
55
+ "c-sortable": e.sort,
56
+ "c-sortable--sorted": F.value?.key === e.property
57
+ }),
58
+ onClick: (t) => e.sort ? V(e.property) : void 0
59
+ }, [m(C(e.label) + " ", 1), e.sort ? (b(), f("span", {
60
+ key: 0,
61
+ 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"
68
+ }])
69
+ }, null, 2)) : d("", !0)], 10, O))), 128)),
70
+ 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", {
72
+ key: r,
73
+ class: v({
74
+ "is-selected": i.config.selectableAttr && w(I).has(n[i.config.selectableAttr]),
75
+ "is-striped": i.settings.striped && r % 2 == 1
76
+ })
77
+ }, [
78
+ i.config.selectableAttr ? (b(), f("td", {
79
+ key: 0,
80
+ 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
+ key: e.property,
85
+ class: v(["c-table__cell", [e.class]])
86
+ }, [h(s, {
87
+ item: n,
88
+ col: e
89
+ }, 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, _({
91
+ key: 0,
92
+ icon: r.icon,
93
+ label: r.label,
94
+ items: w(a)(r, n)
95
+ }, { ref_for: !0 }, r.config), null, 16, [
96
+ "icon",
97
+ "label",
98
+ "items"
99
+ ])) : (b(), u(e, _({
100
+ key: 1,
101
+ icon: r.icon,
102
+ label: r.label,
103
+ type: r.type,
104
+ disabled: r.disabled ? r.disabled(n) : !1,
105
+ size: r.label ? "small" : "normal",
106
+ ariaLabel: r.ariaLabel,
107
+ outline: "",
108
+ callback: () => r.callback(n)
109
+ }, { ref_for: !0 }, r.config), null, 16, [
110
+ "icon",
111
+ "label",
112
+ "type",
113
+ "disabled",
114
+ "size",
115
+ "ariaLabel",
116
+ "callback"
117
+ ]))], 64))), 128))])])) : d("", !0)
118
+ ], 2))), 128))])], 6))]));
119
+ }
120
+ });
121
+ //#endregion
122
+ export { N as default };
@@ -1,30 +1,5 @@
1
- //#region src/types/datepickers.ts
2
- var e = {
3
- showTime: !1,
4
- minDate: /* @__PURE__ */ new Date("1990-01-01"),
5
- maxDate: new Date(Date.now() + 10 * 365 * 24 * 60 * 60 * 1e3),
6
- showWeekNumber: !0,
7
- locale: "hu-HU",
8
- highlightWeekends: !0,
9
- showOkButton: !1,
10
- showClearButton: !1
11
- }, t = {
12
- ...e,
13
- showOkButton: !0,
14
- showClearButton: !0,
15
- placeholder: "YYYY-MM-DD",
16
- size: "normal"
17
- }, n = {
18
- ...e,
19
- placeholderFrom: "Ettől",
20
- placeholderTo: "Eddig",
21
- showOkButton: !0,
22
- showClearButton: !0,
23
- showIcon: !1,
24
- showPresets: !0,
25
- size: "normal",
26
- lazy: !0,
27
- compact: !1
28
- };
1
+ import e from "./admins-components5.js";
2
+ //#region src/components/Button.vue
3
+ var t = e;
29
4
  //#endregion
30
- export { e as calendarConfigDefaults, t as datePickerConfigDefaults, n as dateRangePickerConfigDefaults };
5
+ export { t as default };
@@ -1,144 +1,8 @@
1
- import e from "./admins-components5.js";
2
- import t from "./admins-components23.js";
3
- import n from "./admins-components37.js";
4
- import r from "./admins-components47.js";
5
- import { useSelection as i } from "./admins-components52.js";
6
- import { dataCardsSettingsDefaults as a } from "./admins-components53.js";
7
- import { buildActionGroupMenuItems as o, getColumnValue as s, isActionGroup as c } from "./admins-components54.js";
8
- import l from "./admins-components57.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";
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__ */ _({
12
- __name: "DataCards",
13
- props: {
14
- config: {},
15
- items: {},
16
- settings: { default: () => ({ ...a }) },
17
- loading: {
18
- type: Boolean,
19
- default: !1
20
- }
21
- },
22
- emits: ["selection-change"],
23
- 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;
26
- if (e?.cardHeaderColumns) {
27
- let t = B.value.filter((t) => e.cardHeaderColumns[t.property]);
28
- if (t.length > 0) {
29
- if (e.cardHeaderOrder) {
30
- let n = e.cardHeaderOrder;
31
- return [...t].sort((e, t) => {
32
- let r = n.indexOf(e.property), i = n.indexOf(t.property);
33
- return (r === -1 ? 999 : r) - (i === -1 ? 999 : i);
34
- });
35
- }
36
- return t;
37
- }
38
- }
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);
45
- }, 500));
46
- }
47
- function G() {
48
- H &&= (clearTimeout(H), null);
49
- }
50
- function K(e) {
51
- U && e.preventDefault();
52
- }
53
- function q(e) {
54
- if (U) {
55
- U = !1;
56
- return;
57
- }
58
- J(e);
59
- }
60
- function J(e) {
61
- z.value.has(e) ? z.value.delete(e) : z.value.add(e), z.value = new Set(z.value);
62
- }
63
- return (i, d) => (b(), m("div", O, [a.loading ? (b(), f(r, {
64
- key: 0,
65
- loading: !0
66
- })) : (b(), m("div", {
67
- key: 1,
68
- class: y(["c-cards", { "is-compact": a.settings.compact }])
69
- }, [(b(!0), m(u, null, S(a.items, (r, i) => (b(), m("div", {
70
- key: i,
71
- class: y(["c-card", {
72
- "is-open": z.value.has(i),
73
- "is-selected": a.config.selectableAttr && w(L).has(r[a.config.selectableAttr])
74
- }])
75
- }, [h("button", {
76
- type: "button",
77
- 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
83
- }, [
84
- a.config.selectableAttr ? (b(), m("span", {
85
- key: 0,
86
- 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", {
90
- key: e.property,
91
- 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))]),
93
- d[4] ||= h("span", {
94
- class: "c-card__icon",
95
- "aria-hidden": "true"
96
- }, [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", {
98
- key: e.property,
99
- class: "c-card__field",
100
- tabindex: "0"
101
- }, [
102
- h("span", P, C(e.label), 1),
103
- g(l, {
104
- item: r,
105
- col: e,
106
- class: "c-card__field-value",
107
- copy: !1
108
- }, null, 8, ["item", "col"]),
109
- g(n, {
110
- class: "c-card__field-copy click-expand",
111
- value: w(s)(r, e)
112
- }, null, 8, ["value"])
113
- ]))), 128)), a.config.actions ? (b(), m("div", {
114
- key: 0,
115
- class: "c-card__actions",
116
- onClick: d[2] ||= D(() => {}, ["stop"])
117
- }, [(b(!0), m(u, null, S(a.config.actions, (n, i) => (b(), m(u, { key: i }, [w(c)(n) ? (b(), f(t, v({
118
- key: 0,
119
- icon: n.icon,
120
- label: n.label,
121
- items: w(o)(n, r)
122
- }, { ref_for: !0 }, n.config), null, 16, [
123
- "icon",
124
- "label",
125
- "items"
126
- ])) : (b(), f(e, v({
127
- key: 1,
128
- type: n.type,
129
- icon: n.icon,
130
- label: n.cardLabel ?? n.label,
131
- outline: "",
132
- disabled: n.disabled ? n.disabled(r) : !1,
133
- callback: () => n.callback(r)
134
- }, { ref_for: !0 }, n.config), null, 16, [
135
- "type",
136
- "icon",
137
- "label",
138
- "disabled",
139
- "callback"
140
- ]))], 64))), 128))])) : p("", !0)], 512), [[T, z.value.has(i)]])], 2))), 128))], 2))]));
141
- }
142
- });
1
+ import './src/styles/components/data-table/data-table.scss_vue_type_style_index_0_src_true_lang.css';
2
+ import "./admins-components54.js";
3
+ import e from "./admins-components59.js";
4
+ /* empty css */
5
+ //#region src/components/data-table/DataTable.vue
6
+ var t = e;
143
7
  //#endregion
144
- export { F as default };
8
+ export { t as default };
@@ -0,0 +1,148 @@
1
+ import e from "./admins-components6.js";
2
+ import t from "./admins-components24.js";
3
+ import n from "./admins-components38.js";
4
+ import r from "./admins-components48.js";
5
+ import { useSelection as i } from "./admins-components53.js";
6
+ import { dataCardsSettingsDefaults as a } from "./admins-components54.js";
7
+ import { buildActionGroupMenuItems as o, getColumnValue as s, isActionGroup as c } from "./admins-components55.js";
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";
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__ */ _({
12
+ __name: "DataCards",
13
+ props: {
14
+ config: {},
15
+ items: {},
16
+ settings: { default: () => ({ ...a }) },
17
+ loading: {
18
+ type: Boolean,
19
+ default: !1
20
+ }
21
+ },
22
+ emits: ["selection-change"],
23
+ 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;
26
+ if (e?.cardHeaderColumns) {
27
+ let t = B.value.filter((t) => e.cardHeaderColumns[t.property]);
28
+ if (t.length > 0) {
29
+ if (e.cardHeaderOrder) {
30
+ let n = e.cardHeaderOrder;
31
+ return [...t].sort((e, t) => {
32
+ let r = n.indexOf(e.property), i = n.indexOf(t.property);
33
+ return (r === -1 ? 999 : r) - (i === -1 ? 999 : i);
34
+ });
35
+ }
36
+ return t;
37
+ }
38
+ }
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);
45
+ }, 500));
46
+ }
47
+ function G() {
48
+ H &&= (clearTimeout(H), null);
49
+ }
50
+ function K(e) {
51
+ U && e.preventDefault();
52
+ }
53
+ function q(e) {
54
+ if (U) {
55
+ U = !1;
56
+ return;
57
+ }
58
+ J(e);
59
+ }
60
+ function J(e) {
61
+ z.value.has(e) ? z.value.delete(e) : z.value.add(e), z.value = new Set(z.value);
62
+ }
63
+ return (i, d) => (b(), m("div", O, [a.loading ? (b(), f(r, {
64
+ key: 0,
65
+ loading: !0
66
+ })) : (b(), m("div", {
67
+ key: 1,
68
+ class: y(["c-cards", { "is-compact": a.settings.compact }])
69
+ }, [(b(!0), m(u, null, S(a.items, (r, i) => (b(), m("div", {
70
+ key: i,
71
+ class: y(["c-card", {
72
+ "is-open": z.value.has(i),
73
+ "is-selected": a.config.selectableAttr && w(L).has(r[a.config.selectableAttr])
74
+ }])
75
+ }, [h("button", {
76
+ type: "button",
77
+ 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
83
+ }, [
84
+ a.config.selectableAttr ? (b(), m("span", {
85
+ key: 0,
86
+ 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", {
90
+ key: e.property,
91
+ 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))]),
93
+ d[4] ||= h("span", {
94
+ class: "c-card__icon",
95
+ "aria-hidden": "true"
96
+ }, [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", {
98
+ key: e.property,
99
+ class: "c-card__field",
100
+ tabindex: "0"
101
+ }, [
102
+ h("span", P, C(e.label), 1),
103
+ g(l, {
104
+ item: r,
105
+ col: e,
106
+ class: "c-card__field-value",
107
+ copy: !1
108
+ }, null, 8, ["item", "col"]),
109
+ g(n, {
110
+ class: "c-card__field-copy click-expand",
111
+ value: w(s)(r, e)
112
+ }, null, 8, ["value"])
113
+ ]))), 128)), a.config.actions ? (b(), m("div", {
114
+ key: 0,
115
+ class: "c-card__actions",
116
+ onClick: d[2] ||= D(() => {}, ["stop"])
117
+ }, [(b(!0), m(u, null, S(a.config.actions, (n, i) => (b(), m(u, { key: i }, [w(c)(n) ? (b(), f(t, v({
118
+ key: 0,
119
+ icon: n.icon,
120
+ label: n.label,
121
+ ariaLabel: n.ariaLabel,
122
+ items: w(o)(n, r)
123
+ }, { ref_for: !0 }, n.config), null, 16, [
124
+ "icon",
125
+ "label",
126
+ "ariaLabel",
127
+ "items"
128
+ ])) : (b(), f(e, v({
129
+ key: 1,
130
+ type: n.type,
131
+ icon: n.icon,
132
+ label: n.cardLabel ?? n.label,
133
+ ariaLabel: n.ariaLabel,
134
+ outline: "",
135
+ disabled: n.disabled ? n.disabled(r) : !1,
136
+ callback: () => n.callback(r)
137
+ }, { ref_for: !0 }, n.config), null, 16, [
138
+ "type",
139
+ "icon",
140
+ "label",
141
+ "ariaLabel",
142
+ "disabled",
143
+ "callback"
144
+ ]))], 64))), 128))])) : p("", !0)], 512), [[T, z.value.has(i)]])], 2))), 128))], 2))]));
145
+ }
146
+ });
147
+ //#endregion
148
+ export { F as default };
@@ -1,8 +1,8 @@
1
- //#region src/utils/objects.ts
2
- function e(t, n) {
3
- let r = { ...t };
4
- for (let i in n) n[i] && typeof n[i] == "object" && !Array.isArray(n[i]) && i in t && typeof t[i] == "object" ? r[i] = e(t[i], n[i]) : r[i] = n[i];
5
- return r;
6
- }
1
+ import './src/styles/components/data-table/data-cards.scss_vue_type_style_index_0_src_true_lang.css';
2
+ import "./admins-components54.js";
3
+ import e from "./admins-components62.js";
4
+ /* empty css */
5
+ //#region src/components/data-table/DataCards.vue
6
+ var t = e;
7
7
  //#endregion
8
- export { e as deepMerge };
8
+ export { t as default };