admins-components 9.0.7 → 9.0.8

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 (169) hide show
  1. package/dist/admins-components.js +57 -57
  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/package.json +1 -1
  151. package/dist/admins-components10.js +0 -10
  152. package/dist/admins-components155.js +0 -169
  153. package/dist/admins-components21.js +0 -7
  154. package/dist/admins-components26.js +0 -7
  155. package/dist/admins-components29.js +0 -7
  156. package/dist/admins-components32.js +0 -7
  157. package/dist/admins-components37.js +0 -7
  158. package/dist/admins-components40.js +0 -7
  159. package/dist/admins-components47.js +0 -7
  160. package/dist/admins-components51.js +0 -7
  161. package/dist/admins-components60.js +0 -8
  162. package/dist/admins-components63.js +0 -8
  163. package/dist/admins-components67.js +0 -7
  164. package/dist/admins-components70.js +0 -7
  165. package/dist/admins-components74.js +0 -7
  166. package/dist/admins-components79.js +0 -8
  167. package/dist/admins-components82.js +0 -7
  168. package/dist/admins-components85.js +0 -7
  169. package/dist/admins-components88.js +0 -8
@@ -0,0 +1,94 @@
1
+ import { __setToastInstance as e } from "./admins-components49.js";
2
+ import { Fragment as t, TransitionGroup as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, getCurrentInstance as c, normalizeClass as l, normalizeStyle as u, onBeforeUnmount as d, onMounted as f, openBlock as p, ref as m, renderList as h, toDisplayString as g, withCtx as _ } from "vue";
3
+ //#region src/components/ToastNotification.vue?vue&type=script&setup=true&lang.ts
4
+ var v = { class: "ac-component" }, y = { class: "c-toast__body" }, b = {
5
+ key: 0,
6
+ class: "c-toast__title"
7
+ }, x = { class: "c-toast__message" }, S = ["onClick"], C = /* @__PURE__ */ s({
8
+ __name: "ToastNotification",
9
+ props: {
10
+ defaultPosition: { default: "bottom-right" },
11
+ defaultDisplayDuration: { default: 5e3 }
12
+ },
13
+ setup(s, { expose: C }) {
14
+ let w = s, T = null, E = 0, D = m([]);
15
+ function O(e) {
16
+ let t = e.id ?? ++E, n = {
17
+ id: t,
18
+ title: e.title,
19
+ message: e.message,
20
+ type: e.type ?? "info",
21
+ displayDuration: e.displayDuration ?? w.defaultDisplayDuration,
22
+ position: e.position ?? w.defaultPosition,
23
+ addedAt: Date.now()
24
+ };
25
+ return D.value.push(n), t;
26
+ }
27
+ function k(e) {
28
+ D.value = D.value.filter((t) => t.id !== e);
29
+ }
30
+ function A() {
31
+ let e = Date.now();
32
+ D.value = D.value.filter((t) => e - t.addedAt < t.displayDuration);
33
+ }
34
+ T ||= setInterval(A, 500), d(() => {
35
+ T &&= (clearInterval(T), null);
36
+ }), C({
37
+ addToast: O,
38
+ dismiss: k
39
+ });
40
+ let j = c();
41
+ f(() => {
42
+ e(j?.exposed ?? null);
43
+ }), d(() => {
44
+ e(null);
45
+ });
46
+ function M(e) {
47
+ switch (e) {
48
+ case "success": return "fa-solid fa-circle-check";
49
+ case "warning": return "fa-solid fa-triangle-exclamation";
50
+ case "error": return "fa-solid fa-circle-xmark";
51
+ default: return "fa-solid fa-circle-info";
52
+ }
53
+ }
54
+ function N(e) {
55
+ let t = 0;
56
+ for (let n of D.value) {
57
+ if (n.id === e.id) break;
58
+ n.position === e.position && t++;
59
+ }
60
+ return t;
61
+ }
62
+ return (e, s) => (p(), i("div", v, [o(n, {
63
+ tag: "div",
64
+ class: "c-toast-container",
65
+ name: "c-toast"
66
+ }, {
67
+ default: _(() => [(p(!0), i(t, null, h(D.value, (e) => (p(), i("div", {
68
+ key: e.id,
69
+ class: l(["c-toast", [`c-toast--${e.type}`, `c-toast--pos-${e.position}`]]),
70
+ style: u({ "--stack-index": N(e) }),
71
+ role: "status",
72
+ "aria-live": "polite"
73
+ }, [
74
+ a("i", {
75
+ class: l(["c-toast__icon", M(e.type)]),
76
+ "aria-hidden": "true"
77
+ }, null, 2),
78
+ a("div", y, [e.title ? (p(), i("div", b, g(e.title), 1)) : r("", !0), a("div", x, g(e.message), 1)]),
79
+ a("button", {
80
+ type: "button",
81
+ class: "c-toast__close",
82
+ "aria-label": "Bezárás",
83
+ onClick: (t) => k(e.id)
84
+ }, [...s[0] ||= [a("i", {
85
+ class: "fa-solid fa-xmark",
86
+ "aria-hidden": "true"
87
+ }, null, -1)]], 8, S)
88
+ ], 6))), 128))]),
89
+ _: 1
90
+ })]));
91
+ }
92
+ });
93
+ //#endregion
94
+ export { C as default };
@@ -1,26 +1,7 @@
1
- import { computed as e, ref as t } from "vue";
2
- //#region src/composables/useSelection.ts
3
- function n(n, r, i) {
4
- let a = t(/* @__PURE__ */ new Set()), o = e(() => {
5
- let e = r(), t = n();
6
- return t.length > 0 && e != null && t.every((t) => a.value.has(t[e]));
7
- });
8
- function s(e) {
9
- let t = e[r()];
10
- a.value.has(t) ? a.value.delete(t) : a.value.add(t), i([...a.value]);
11
- }
12
- function c() {
13
- let e = r();
14
- if (o.value) a.value.clear();
15
- else for (let t of n()) a.value.add(t[e]);
16
- i([...a.value]);
17
- }
18
- return {
19
- selectedKeys: a,
20
- allSelected: o,
21
- toggle: s,
22
- toggleAll: c
23
- };
24
- }
1
+ import './src/styles/components/toast-notification.scss_vue_type_style_index_0_src_true_lang.css';
2
+ import e from "./admins-components50.js";
3
+ /* empty css */
4
+ //#region src/components/ToastNotification.vue
5
+ var t = e;
25
6
  //#endregion
26
- export { n as useSelection };
7
+ export { t as default };
@@ -1,10 +1,26 @@
1
- //#region src/types/data-list.ts
2
- var e = {
3
- striped: !0,
4
- compact: !1
5
- }, t = { compact: !1 }, n = {
6
- layout: "screen",
7
- compact: !1
8
- };
1
+ import { computed as e, ref as t } from "vue";
2
+ //#region src/composables/useSelection.ts
3
+ function n(n, r, i) {
4
+ let a = t(/* @__PURE__ */ new Set()), o = e(() => {
5
+ let e = r(), t = n();
6
+ return t.length > 0 && e != null && t.every((t) => a.value.has(t[e]));
7
+ });
8
+ function s(e) {
9
+ let t = e[r()];
10
+ a.value.has(t) ? a.value.delete(t) : a.value.add(t), i([...a.value]);
11
+ }
12
+ function c() {
13
+ let e = r();
14
+ if (o.value) a.value.clear();
15
+ else for (let t of n()) a.value.add(t[e]);
16
+ i([...a.value]);
17
+ }
18
+ return {
19
+ selectedKeys: a,
20
+ allSelected: o,
21
+ toggle: s,
22
+ toggleAll: c
23
+ };
24
+ }
9
25
  //#endregion
10
- export { t as dataCardsSettingsDefaults, n as dataListSettingsDefaults, e as dataTableSettingsDefaults };
26
+ export { n as useSelection };
@@ -1,20 +1,10 @@
1
- //#region src/utils/dataList.ts
2
- function e(e, t) {
3
- if (!t) return "";
4
- let n = e[t.property];
5
- return t.converter ? t.converter(n, e) : n;
6
- }
7
- function t(e) {
8
- return e.isGroup === !0 && Array.isArray(e.items);
9
- }
10
- function n(e, t) {
11
- return e.items.map((e) => ({
12
- icon: e.icon,
13
- label: e.label ?? "",
14
- type: e.type,
15
- size: e.label ? "small" : "normal",
16
- callback: () => e.callback(t)
17
- }));
18
- }
1
+ //#region src/types/data-list.ts
2
+ var e = {
3
+ striped: !0,
4
+ compact: !1
5
+ }, t = { compact: !1 }, n = {
6
+ layout: "screen",
7
+ compact: !1
8
+ };
19
9
  //#endregion
20
- export { n as buildActionGroupMenuItems, e as getColumnValue, t as isActionGroup };
10
+ export { t as dataCardsSettingsDefaults, n as dataListSettingsDefaults, e as dataTableSettingsDefaults };
@@ -1,74 +1,20 @@
1
- import { castToDate as e, formatDate as t } from "./admins-components3.js";
2
- //#region src/utils/dataListConverters.ts
3
- function n(n = !1, r) {
4
- return (i) => {
5
- let a = e(i);
6
- return a ? r ? t(a, r) : n ? t(a, "YYYY-MM-DD HH:mm") : t(a, "YYYY-MM-DD") : "";
7
- };
1
+ //#region src/utils/dataList.ts
2
+ function e(e, t) {
3
+ if (!t) return "";
4
+ let n = e[t.property];
5
+ return t.converter ? t.converter(n, e) : n;
6
+ }
7
+ function t(e) {
8
+ return e.isGroup === !0 && Array.isArray(e.items);
9
+ }
10
+ function n(e, t) {
11
+ return e.items.map((e) => ({
12
+ icon: e.icon,
13
+ label: e.label ?? "",
14
+ type: e.type,
15
+ size: e.label ? "small" : "normal",
16
+ callback: () => e.callback(t)
17
+ }));
8
18
  }
9
- function r(e = 4) {
10
- return (t) => {
11
- if (!t) return "";
12
- let n = typeof t == "string" ? t : String(t);
13
- return `${n.slice(0, e)}...${n.slice(-e)}`;
14
- };
15
- }
16
- function i(n = "YYYY-MM-DD") {
17
- return (r) => {
18
- let i = e(r);
19
- return i ? t(i, n) : "";
20
- };
21
- }
22
- function a(e = 60, t = "…") {
23
- return (n) => {
24
- let r = typeof n == "string" ? n : n == null ? "" : String(n);
25
- return r.length <= e ? r : r.slice(0, e).trimEnd() + t;
26
- };
27
- }
28
- function o(e = "Igen", t = "Nem", n = "") {
29
- return (r) => r === !0 ? e : r === !1 ? t : n;
30
- }
31
- function s(e, t) {
32
- return (n) => {
33
- if (n == null) return t ?? "";
34
- let r = String(n);
35
- return r in e ? e[r] : t ?? n;
36
- };
37
- }
38
- function c(e = 0, t = "hu-HU") {
39
- return (n) => {
40
- let r = typeof n == "number" ? n : Number(n);
41
- return Number.isFinite(r) ? r.toLocaleString(t, {
42
- minimumFractionDigits: e,
43
- maximumFractionDigits: e
44
- }) : n;
45
- };
46
- }
47
- function l(e = "HUF", t = "hu-HU", n = 0) {
48
- return (r) => {
49
- let i = typeof r == "number" ? r : Number(r);
50
- return Number.isFinite(i) ? i.toLocaleString(t, {
51
- style: "currency",
52
- currency: e,
53
- minimumFractionDigits: n,
54
- maximumFractionDigits: n
55
- }) : r;
56
- };
57
- }
58
- function u(e = ", ") {
59
- return (t) => Array.isArray(t) ? t.map(String).join(e) : t == null ? "" : String(t);
60
- }
61
- var d = (e) => e, f = {
62
- utcToLocalString: n,
63
- localToLocalString: i,
64
- shortUuid: r,
65
- textEllipse: a,
66
- booleanToString: o,
67
- enumMap: s,
68
- formatNumber: c,
69
- formatCurrency: l,
70
- listToString: u,
71
- identity: d
72
- };
73
19
  //#endregion
74
- export { o as booleanToString, f as dataListConverters, s as enumMap, l as formatCurrency, c as formatNumber, d as identity, u as listToString, i as localToLocalString, r as shortUuid, a as textEllipse, n as utcToLocalString };
20
+ export { n as buildActionGroupMenuItems, e as getColumnValue, t as isActionGroup };
@@ -1,60 +1,74 @@
1
- import e from "./admins-components37.js";
2
- import { getColumnValue as t } from "./admins-components54.js";
3
- import { shortUuid as n } from "./admins-components55.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";
5
- //#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,
8
- class: "dc-datetime"
9
- }, g = { class: "dc-datetime__part" }, _ = {
10
- key: 0,
11
- class: "dc-datetime__sep"
12
- }, v = { class: "dc-datetime__part" }, y = { key: 2 }, b = ["innerHTML"], x = /* @__PURE__ */ c({
13
- __name: "DataCell",
14
- props: {
15
- item: {},
16
- col: {},
17
- copy: {
18
- type: Boolean,
19
- default: !0
20
- }
21
- },
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
- if (!e) return {
27
- date: "",
28
- time: ""
29
- };
30
- let t = e.indexOf(" ");
31
- return t === -1 ? {
32
- date: e,
33
- time: ""
34
- } : {
35
- date: e.slice(0, t),
36
- time: e.slice(t + 1)
37
- };
38
- });
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, {
42
- 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, {
49
- 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, {
53
- key: 0,
54
- value: S.value
55
- }, null, 8, ["value"])) : a("", !0)]));
56
- };
57
- }
58
- });
1
+ import { castToDate as e, formatDate as t } from "./admins-components3.js";
2
+ //#region src/utils/dataListConverters.ts
3
+ function n(n = !1, r) {
4
+ return (i) => {
5
+ let a = e(i);
6
+ return a ? r ? t(a, r) : n ? t(a, "YYYY-MM-DD HH:mm") : t(a, "YYYY-MM-DD") : "";
7
+ };
8
+ }
9
+ function r(e = 4) {
10
+ return (t) => {
11
+ if (!t) return "";
12
+ let n = typeof t == "string" ? t : String(t);
13
+ return `${n.slice(0, e)}...${n.slice(-e)}`;
14
+ };
15
+ }
16
+ function i(n = "YYYY-MM-DD") {
17
+ return (r) => {
18
+ let i = e(r);
19
+ return i ? t(i, n) : "";
20
+ };
21
+ }
22
+ function a(e = 60, t = "…") {
23
+ return (n) => {
24
+ let r = typeof n == "string" ? n : n == null ? "" : String(n);
25
+ return r.length <= e ? r : r.slice(0, e).trimEnd() + t;
26
+ };
27
+ }
28
+ function o(e = "Igen", t = "Nem", n = "") {
29
+ return (r) => r === !0 ? e : r === !1 ? t : n;
30
+ }
31
+ function s(e, t) {
32
+ return (n) => {
33
+ if (n == null) return t ?? "";
34
+ let r = String(n);
35
+ return r in e ? e[r] : t ?? n;
36
+ };
37
+ }
38
+ function c(e = 0, t = "hu-HU") {
39
+ return (n) => {
40
+ let r = typeof n == "number" ? n : Number(n);
41
+ return Number.isFinite(r) ? r.toLocaleString(t, {
42
+ minimumFractionDigits: e,
43
+ maximumFractionDigits: e
44
+ }) : n;
45
+ };
46
+ }
47
+ function l(e = "HUF", t = "hu-HU", n = 0) {
48
+ return (r) => {
49
+ let i = typeof r == "number" ? r : Number(r);
50
+ return Number.isFinite(i) ? i.toLocaleString(t, {
51
+ style: "currency",
52
+ currency: e,
53
+ minimumFractionDigits: n,
54
+ maximumFractionDigits: n
55
+ }) : r;
56
+ };
57
+ }
58
+ function u(e = ", ") {
59
+ return (t) => Array.isArray(t) ? t.map(String).join(e) : t == null ? "" : String(t);
60
+ }
61
+ var d = (e) => e, f = {
62
+ utcToLocalString: n,
63
+ localToLocalString: i,
64
+ shortUuid: r,
65
+ textEllipse: a,
66
+ booleanToString: o,
67
+ enumMap: s,
68
+ formatNumber: c,
69
+ formatCurrency: l,
70
+ listToString: u,
71
+ identity: d
72
+ };
59
73
  //#endregion
60
- export { x as default };
74
+ export { o as booleanToString, f as dataListConverters, s as enumMap, l as formatCurrency, c as formatNumber, d as identity, u as listToString, i as localToLocalString, r as shortUuid, a as textEllipse, n as utcToLocalString };
@@ -1,5 +1,60 @@
1
- import e from "./admins-components56.js";
2
- //#region src/components/data-table/DataCell.vue
3
- var t = e;
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";
5
+ //#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,
8
+ class: "dc-datetime"
9
+ }, g = { class: "dc-datetime__part" }, _ = {
10
+ key: 0,
11
+ class: "dc-datetime__sep"
12
+ }, v = { class: "dc-datetime__part" }, y = { key: 2 }, b = ["innerHTML"], x = /* @__PURE__ */ c({
13
+ __name: "DataCell",
14
+ props: {
15
+ item: {},
16
+ col: {},
17
+ copy: {
18
+ type: Boolean,
19
+ default: !0
20
+ }
21
+ },
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
+ if (!e) return {
27
+ date: "",
28
+ time: ""
29
+ };
30
+ let t = e.indexOf(" ");
31
+ return t === -1 ? {
32
+ date: e,
33
+ time: ""
34
+ } : {
35
+ date: e.slice(0, t),
36
+ time: e.slice(t + 1)
37
+ };
38
+ });
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, {
42
+ 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, {
49
+ 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, {
53
+ key: 0,
54
+ value: S.value
55
+ }, null, 8, ["value"])) : a("", !0)]));
56
+ };
57
+ }
58
+ });
4
59
  //#endregion
5
- export { t as default };
60
+ export { x as default };
@@ -1,121 +1,5 @@
1
- import e from "./admins-components5.js";
2
- import t from "./admins-components23.js";
3
- import n from "./admins-components47.js";
4
- import { useSelection as r } from "./admins-components52.js";
5
- import { dataTableSettingsDefaults as i } from "./admins-components53.js";
6
- import { buildActionGroupMenuItems as a, isActionGroup as o } from "./admins-components54.js";
7
- import s from "./admins-components57.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
- scope: "col",
55
- class: v({
56
- "c-sortable": e.sort,
57
- "c-sortable--sorted": F.value?.key === e.property
58
- }),
59
- onClick: (t) => e.sort ? V(e.property) : void 0
60
- }, [m(C(e.label) + " ", 1), e.sort ? (b(), f("span", {
61
- key: 0,
62
- class: v(["c-sort-icon fa-solid", {
63
- "fa-sort": F.value?.key !== e.property,
64
- "fa-sort-down": F.value?.key === e.property && F.value.direction === "desc",
65
- "fa-sort-up": F.value?.key === e.property && F.value.direction === "asc",
66
- "c-sort-icon--active": F.value?.key === e.property,
67
- "is-asc": F.value?.key === e.property && F.value.direction === "asc",
68
- "is-desc": F.value?.key === e.property && F.value.direction === "desc"
69
- }])
70
- }, null, 2)) : d("", !0)], 10, O))), 128)),
71
- i.config.actions ? (b(), f("th", k, C(i.config.actionHeader ?? ""), 1)) : d("", !0)
72
- ])]), p("tbody", null, [(b(!0), f(c, null, S(i.items, (n, r) => (b(), f("tr", {
73
- key: r,
74
- class: v({
75
- "is-selected": i.config.selectableAttr && w(I).has(n[i.config.selectableAttr]),
76
- "is-striped": i.settings.striped && r % 2 == 1
77
- })
78
- }, [
79
- i.config.selectableAttr ? (b(), f("td", {
80
- key: 0,
81
- class: "pointer",
82
- onClick: T((e) => w(R)(n), ["stop"])
83
- }, [p("span", { class: v(["c-checkbox", { "c-checkbox--checked": w(I).has(n[i.config.selectableAttr]) }]) }, null, 2)], 8, A)) : d("", !0),
84
- (b(!0), f(c, null, S(B.value, (e) => (b(), f("td", {
85
- key: e.property,
86
- class: v(["c-table__cell", [e.class]])
87
- }, [h(s, {
88
- item: n,
89
- col: e
90
- }, null, 8, ["item", "col"])], 2))), 128)),
91
- 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, _({
92
- key: 0,
93
- icon: r.icon,
94
- label: r.label,
95
- items: w(a)(r, n)
96
- }, { ref_for: !0 }, r.config), null, 16, [
97
- "icon",
98
- "label",
99
- "items"
100
- ])) : (b(), u(e, _({
101
- key: 1,
102
- icon: r.icon,
103
- label: r.label,
104
- type: r.type,
105
- disabled: r.disabled ? r.disabled(n) : !1,
106
- size: r.label ? "small" : "normal",
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
- "callback"
116
- ]))], 64))), 128))])])) : d("", !0)
117
- ], 2))), 128))])], 6))]));
118
- }
119
- });
1
+ import e from "./admins-components57.js";
2
+ //#region src/components/data-table/DataCell.vue
3
+ var t = e;
120
4
  //#endregion
121
- export { N as default };
5
+ export { t as default };