@hortiview/shared-components 0.0.6890 → 0.0.7018

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 (113) hide show
  1. package/dist/BlockView.module-BPlNT5uh.js +15 -0
  2. package/dist/HashTabView.module-CJX4gxTu.js +13 -0
  3. package/dist/HeaderFilter.module-DiBmulr5.js +7 -0
  4. package/dist/Iconify-CY9lZjFd.js +95 -0
  5. package/dist/_baseToString-BNXOi2Mf.js +197 -0
  6. package/dist/_equalByTag-DJhSpgVG.js +157 -0
  7. package/dist/alertBanner.module-HneYdVzN.js +10 -0
  8. package/dist/assets/{main.css → Filter.css} +1 -1
  9. package/dist/assets/baseView.css +1 -0
  10. package/dist/assets/basicHeading.css +1 -0
  11. package/dist/assets/listArea.css +1 -0
  12. package/dist/baseView.module-ve87u_d0.js +12 -0
  13. package/dist/basicHeading.module-BYb8xvuk.js +16 -0
  14. package/dist/bigLoadingSpinner.module-GgbFol8k.js +11 -0
  15. package/dist/components/AlertBanner/AlertBanner.js +12 -17
  16. package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
  17. package/dist/components/BaseView/BaseView.js +42 -45
  18. package/dist/components/BaseView/BaseView.test.js +6 -4
  19. package/dist/components/BasicHeading/BasicHeading.js +39 -50
  20. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  21. package/dist/components/BlockView/BlockView.js +41 -51
  22. package/dist/components/BlockView/BlockView.test.js +1 -1
  23. package/dist/components/ContextMenu/ContextMenu.js +18 -20
  24. package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
  25. package/dist/components/DeleteModal/DeleteModal.js +55 -60
  26. package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
  27. package/dist/components/Disclaimer/Disclaimer.js +8 -11
  28. package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
  29. package/dist/components/EmptyView/EmptyView.test.js +1 -1
  30. package/dist/components/Filter/Filter.d.ts +27 -0
  31. package/dist/components/Filter/Filter.js +149 -0
  32. package/dist/components/Filter/Filter.test.d.ts +1 -0
  33. package/dist/components/Filter/Filter.test.js +114 -0
  34. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
  35. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +46 -52
  36. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
  37. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
  38. package/dist/components/FormComponents/FormSelect/FormSelect.js +68 -73
  39. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
  40. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
  41. package/dist/components/FormComponents/FormText/FormText.js +57 -62
  42. package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
  43. package/dist/components/GenericTable/GenericTable.js +52 -58
  44. package/dist/components/GenericTable/GenericTable.test.js +1 -1
  45. package/dist/components/HashTabView/HashTabView.js +46 -54
  46. package/dist/components/HashTabView/HashTabView.test.js +1 -1
  47. package/dist/components/HeaderFilter/HeaderFilter.js +14 -16
  48. package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
  49. package/dist/components/Iconify/Iconify.d.ts +3 -13
  50. package/dist/components/Iconify/Iconify.js +6 -163
  51. package/dist/components/Iconify/Iconify.test.js +2 -2
  52. package/dist/components/InfoGroup/InfoGroup.js +38 -47
  53. package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
  54. package/dist/components/ListArea/ListArea.js +258 -490
  55. package/dist/components/ListArea/ListArea.test.js +2 -2
  56. package/dist/components/ListArea/ListAreaService.js +82 -8
  57. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +9 -5
  58. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -2
  59. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +13 -15
  60. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
  61. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
  62. package/dist/components/Scrollbar/scrollbar.test.js +1 -1
  63. package/dist/components/SearchBar/SearchBar.js +21 -23
  64. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  65. package/dist/components/VerticalDivider/VerticalDivider.js +4 -6
  66. package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
  67. package/dist/contextMenu.module-B7aUMFPe.js +7 -0
  68. package/dist/deleteModal.module-Ds3MDzdl.js +10 -0
  69. package/dist/disclaimer.module-BZydt-Q_.js +8 -0
  70. package/dist/formDatePicker.module-BV3ma_7y.js +11 -0
  71. package/dist/formSelect.module-C18N-SsT.js +11 -0
  72. package/dist/formText.module-Blt6Y-SR.js +10 -0
  73. package/dist/genericTable.module-BkU2VDKR.js +11 -0
  74. package/dist/get-UxX31Aph.js +47 -0
  75. package/dist/hooks/useBreakpoint.d.ts +8 -1
  76. package/dist/hooks/useBreakpoint.js +1 -1
  77. package/dist/hooks/useBreakpoints.test.js +2 -2
  78. package/dist/iconify.module-C89oaw5b.js +79 -0
  79. package/dist/{index-DP2ENnrX.js → index-BQnj-5Zt.js} +1 -1
  80. package/dist/infoGroup.module-B3E1gCGi.js +14 -0
  81. package/dist/isArray-Ca4KR8TK.js +91 -0
  82. package/dist/listArea.module-B-gPyfbE.js +19 -0
  83. package/dist/loadingSpinner.module-CLtqSMWA.js +7 -0
  84. package/dist/main.d.ts +3 -0
  85. package/dist/main.js +55 -52
  86. package/dist/{react.esm-DoZanrUz.js → react.esm-C3jDj5Fe.js} +1 -0
  87. package/dist/searchBar.module-9gKyrZRT.js +7 -0
  88. package/dist/types/Filter.d.ts +31 -0
  89. package/dist/types/Filter.js +1 -0
  90. package/dist/useBreakpoint-BNeVhjjZ.js +33 -0
  91. package/dist/verticalDivider.module-C3_GL-fH.js +7 -0
  92. package/package.json +1 -1
  93. package/dist/BigLoadingSpinner-Df2k3xOD.js +0 -18
  94. package/dist/ListAreaService-DDlsV9UD.js +0 -100
  95. package/dist/assets/BaseView.css +0 -1
  96. package/dist/assets/BasicHeading.css +0 -1
  97. package/dist/assets/ListAreaService.css +0 -1
  98. package/dist/get-BRDhkfK0.js +0 -324
  99. package/dist/useBreakpoint-2MH8ICuE.js +0 -28
  100. /package/dist/assets/{AlertBanner.css → alertBanner.css} +0 -0
  101. /package/dist/assets/{BigLoadingSpinner.css → bigLoadingSpinner.css} +0 -0
  102. /package/dist/assets/{ContextMenu.css → contextMenu.css} +0 -0
  103. /package/dist/assets/{DeleteModal.css → deleteModal.css} +0 -0
  104. /package/dist/assets/{Disclaimer.css → disclaimer.css} +0 -0
  105. /package/dist/assets/{FormDatePicker.css → formDatePicker.css} +0 -0
  106. /package/dist/assets/{FormSelect.css → formSelect.css} +0 -0
  107. /package/dist/assets/{FormText.css → formText.css} +0 -0
  108. /package/dist/assets/{GenericTable.css → genericTable.css} +0 -0
  109. /package/dist/assets/{Iconify.css → iconify.css} +0 -0
  110. /package/dist/assets/{InfoGroup.css → infoGroup.css} +0 -0
  111. /package/dist/assets/{LoadingSpinner.css → loadingSpinner.css} +0 -0
  112. /package/dist/assets/{SearchBar.css → searchBar.css} +0 -0
  113. /package/dist/assets/{VerticalDivider.css → verticalDivider.css} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { a as s, s as a, f as m } from "../../../react.esm-DoZanrUz.js";
2
+ import { a as s, s as a, f as m } from "../../../react.esm-C3jDj5Fe.js";
3
3
  import { FormDatePicker as c } from "./FormDatePicker.js";
4
4
  import { v as e, d as f, t as l, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const i = e.fn();
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { a as s, s as t, f as m } from "../../../react.esm-DoZanrUz.js";
2
+ import { a as s, s as t, f as m } from "../../../react.esm-C3jDj5Fe.js";
3
3
  import { FormRadio as l } from "./FormRadio.js";
4
4
  import { v as e, d as c, t as i, g as o } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const r = e.fn();
@@ -1,110 +1,105 @@
1
- import "../../../assets/FormSelect.css";
2
- import { jsx as e, Fragment as v, jsxs as V } from "react/jsx-runtime";
3
- import { Select as b } from "@element/react-components";
4
- import { g as _, i as k } from "../../../get-BRDhkfK0.js";
5
- import { useMemo as q } from "react";
6
- import { useFormContext as z, Controller as C } from "react-hook-form";
7
- import { H as B } from "../../../react-tooltip.min-BzHiZW8k.js";
8
- import { SelectTooltipText as G } from "./SelectTooltipText.js";
9
- const J = "_invalid_9uqqc_1", L = "_formSelectContainer_9uqqc_6", Q = "_formSelect_9uqqc_6", R = "_multiText_9uqqc_32", U = "_tooltip_9uqqc_41", s = {
10
- invalid: J,
11
- formSelectContainer: L,
12
- formSelect: Q,
13
- multiText: R,
14
- tooltip: U
15
- }, et = ({
16
- propertyName: i,
17
- label: f,
1
+ import { jsx as e, Fragment as M, jsxs as b } from "react/jsx-runtime";
2
+ import { Select as k } from "@element/react-components";
3
+ import { g as h } from "../../../get-UxX31Aph.js";
4
+ import { i as z } from "../../../isArray-Ca4KR8TK.js";
5
+ import { useMemo as S } from "react";
6
+ import { useFormContext as B, Controller as v } from "react-hook-form";
7
+ import { H as G } from "../../../react-tooltip.min-BzHiZW8k.js";
8
+ import { SelectTooltipText as J } from "./SelectTooltipText.js";
9
+ import { s as l } from "../../../formSelect.module-C18N-SsT.js";
10
+ const N = ({
11
+ propertyName: r,
12
+ label: d,
18
13
  options: o,
19
- multi: c = !1,
20
- disabled: H = !1,
21
- hoisted: M = !1,
22
- hidden: F = !1,
23
- valueKey: r = "value",
14
+ multi: a = !1,
15
+ disabled: F = !1,
16
+ hoisted: I = !1,
17
+ hidden: $ = !1,
18
+ valueKey: i = "value",
24
19
  textKey: T = "text",
25
- clearable: I = !1,
26
- searchable: $ = !0,
27
- noOptionsMessage: j = "",
20
+ clearable: j = !1,
21
+ searchable: w = !0,
22
+ noOptionsMessage: A = "",
28
23
  rules: n,
29
- ...a
24
+ ...m
30
25
  }) => {
31
26
  const {
32
- control: g,
33
- formState: { errors: l, isValidating: h }
34
- } = z(), d = q(
35
- () => !h && _(l, i) !== void 0,
36
- [l, i, h]
37
- ), w = q(
27
+ control: p,
28
+ formState: { errors: s, isValidating: H }
29
+ } = B(), c = S(
30
+ () => !H && h(s, r) !== void 0,
31
+ [s, r, H]
32
+ ), C = S(
38
33
  () => n?.required?.value,
39
34
  [n]
40
- ), A = q(
35
+ ), D = S(
41
36
  () => n?.required?.message,
42
37
  [n]
43
- ), D = () => {
44
- if (l && l[i]) {
45
- const u = l[i]?.message;
38
+ ), E = () => {
39
+ if (s && s[r]) {
40
+ const u = s[r]?.message;
46
41
  return u || "Invalid input";
47
42
  }
48
- return A;
43
+ return D;
49
44
  };
50
- return F ? /* @__PURE__ */ e(C, { name: i, control: g, render: () => /* @__PURE__ */ e(v, {}) }) : /* @__PURE__ */ e("div", { className: s.formSelectContainer, "data-tooltip-id": f, children: /* @__PURE__ */ e(
51
- C,
45
+ return $ ? /* @__PURE__ */ e(v, { name: r, control: p, render: () => /* @__PURE__ */ e(M, {}) }) : /* @__PURE__ */ e("div", { className: l.formSelectContainer, "data-tooltip-id": d, children: /* @__PURE__ */ e(
46
+ v,
52
47
  {
53
- name: i,
48
+ name: r,
54
49
  rules: n,
55
- control: g,
56
- render: ({ field: { ref: u, onChange: x, value: p, ...E } }) => {
57
- let S = o;
58
- k(o) && _(o[0], "options") !== void 0 && (S = o.flatMap((t) => _(t, "options") ?? []));
59
- const m = c ? S?.filter(
60
- (t) => p?.includes(t[r])
61
- ) : S?.find((t) => t[r] === p), O = c && a.multiDisplayType === "text" && a.fixedHeightInput;
62
- return /* @__PURE__ */ V(v, { children: [
50
+ control: p,
51
+ render: ({ field: { ref: u, onChange: x, value: q, ...O } }) => {
52
+ let g = o;
53
+ z(o) && h(o[0], "options") !== void 0 && (g = o.flatMap((t) => h(t, "options") ?? []));
54
+ const f = a ? g?.filter(
55
+ (t) => q?.includes(t[i])
56
+ ) : g?.find((t) => t[i] === q), P = a && m.multiDisplayType === "text" && m.fixedHeightInput;
57
+ return /* @__PURE__ */ b(M, { children: [
63
58
  /* @__PURE__ */ e(
64
- b,
59
+ k,
65
60
  {
66
- ...E,
67
- ...a,
68
- value: m,
69
- label: f,
61
+ ...O,
62
+ ...m,
63
+ value: f,
64
+ label: d,
70
65
  variant: "outlined",
71
- helperText: D(),
72
- helperTextPersistent: w || d,
66
+ helperText: E(),
67
+ helperTextPersistent: C || c,
73
68
  options: o,
74
- valid: !d,
75
- multiSelect: c,
76
- className: `${s.formSelect} ${d ? s.invalid : ""} ${O ? s.multiText : ""}`,
77
- disabled: H,
78
- valueKey: r,
69
+ valid: !c,
70
+ multiSelect: a,
71
+ className: `${l.formSelect} ${c ? l.invalid : ""} ${P ? l.multiText : ""}`,
72
+ disabled: F,
73
+ valueKey: i,
79
74
  textKey: T,
80
75
  onChange: (t) => {
81
76
  if (t == null) {
82
77
  x(t);
83
78
  return;
84
79
  }
85
- if (c) {
86
- x(t.map((P) => P[r]));
80
+ if (a) {
81
+ x(t.map((V) => V[i]));
87
82
  return;
88
83
  }
89
- x(t[r]);
84
+ x(t[i]);
90
85
  },
91
- hoisted: M,
92
- noOptionsMessage: j,
93
- searchable: $,
94
- clearable: I,
86
+ hoisted: I,
87
+ noOptionsMessage: A,
88
+ searchable: w,
89
+ clearable: j,
95
90
  menuMaxHeight: "15rem"
96
91
  }
97
92
  ),
98
93
  /* @__PURE__ */ e(
99
- B,
94
+ G,
100
95
  {
101
- id: f,
96
+ id: d,
102
97
  noArrow: !0,
103
98
  place: "bottom",
104
99
  delayShow: 420,
105
- className: s.tooltip,
106
- hidden: !m || m.length === 0 || !a.fixedHeightInput,
107
- children: /* @__PURE__ */ e(G, { value: m, textKey: T, valueKey: r })
100
+ className: l.tooltip,
101
+ hidden: !f || f.length === 0 || !m.fixedHeightInput,
102
+ children: /* @__PURE__ */ e(J, { value: f, textKey: T, valueKey: i })
108
103
  }
109
104
  )
110
105
  ] });
@@ -113,5 +108,5 @@ const J = "_invalid_9uqqc_1", L = "_formSelectContainer_9uqqc_6", Q = "_formSele
113
108
  ) });
114
109
  };
115
110
  export {
116
- et as FormSelect
111
+ N as FormSelect
117
112
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { a, s as t, f as T, w as p } from "../../../react.esm-DoZanrUz.js";
3
- import { u as B } from "../../../index-DP2ENnrX.js";
2
+ import { a, s as t, f as T, w as p } from "../../../react.esm-C3jDj5Fe.js";
3
+ import { u as B } from "../../../index-BQnj-5Zt.js";
4
4
  import { FormSelect as i } from "./FormSelect.js";
5
5
  import { SelectTooltipText as d } from "./SelectTooltipText.js";
6
6
  import { v as n, d as f, t as u, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { a, s as n } from "../../../react.esm-DoZanrUz.js";
2
+ import { a, s as n } from "../../../react.esm-C3jDj5Fe.js";
3
3
  import { FormSlider as l } from "./FormSlider.js";
4
4
  import { v as e, d as m, t as i, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const o = e.fn();
@@ -1,111 +1,106 @@
1
- import "../../../assets/FormText.css";
2
- import { jsx as n, Fragment as C, jsxs as M } from "react/jsx-runtime";
3
- import { Textfield as P, TypoCaption as R } from "@element/react-components";
4
- import { useState as V, useMemo as d } from "react";
5
- import { useFormContext as W, Controller as _ } from "react-hook-form";
6
- const w = "_formTextAreaHelperText_1n0bk_1", D = "_invalid_1n0bk_6", E = "_required_1n0bk_9", G = "_formTextArea_1n0bk_1", i = {
7
- formTextAreaHelperText: w,
8
- invalid: D,
9
- required: E,
10
- formTextArea: G
11
- }, J = ({
1
+ import { jsx as n, Fragment as C, jsxs as R } from "react/jsx-runtime";
2
+ import { Textfield as V, TypoCaption as W } from "@element/react-components";
3
+ import { useState as b, useMemo as d } from "react";
4
+ import { useFormContext as w, Controller as F } from "react-hook-form";
5
+ import { s as i } from "../../../formText.module-Blt6Y-SR.js";
6
+ const D = ({
12
7
  count: e,
13
- maxCount: c,
14
- invalid: m = !1,
8
+ maxCount: u,
9
+ invalid: c = !1,
15
10
  required: r = !1
16
11
  }) => /* @__PURE__ */ n(
17
12
  "div",
18
13
  {
19
- className: `${i.formTextAreaHelperText} ${m ? i.invalid : ""} ${r ? i.required : ""}`,
20
- children: /* @__PURE__ */ n(R, { children: `${e}/${c}` })
14
+ className: `${i.formTextAreaHelperText} ${c ? i.invalid : ""} ${r ? i.required : ""}`,
15
+ children: /* @__PURE__ */ n(W, { children: `${e}/${u}` })
21
16
  }
22
- ), N = (e) => e.textarea ? /* @__PURE__ */ n(K, { ...e }) : /* @__PURE__ */ n(O, { ...e }), K = (e) => /* @__PURE__ */ n("div", { className: i.formTextArea, children: /* @__PURE__ */ n(A, { ...e }) }), O = (e) => /* @__PURE__ */ n(A, { ...e }), A = ({
17
+ ), X = (e) => e.textarea ? /* @__PURE__ */ n(E, { ...e }) : /* @__PURE__ */ n(G, { ...e }), E = (e) => /* @__PURE__ */ n("div", { className: i.formTextArea, children: /* @__PURE__ */ n($, { ...e }) }), G = (e) => /* @__PURE__ */ n($, { ...e }), $ = ({
23
18
  propertyName: e,
24
- label: c,
25
- disabled: m = !1,
19
+ label: u,
20
+ disabled: c = !1,
26
21
  textarea: r = !1,
27
- hidden: q = !1,
28
- placeholder: F,
29
- type: $,
30
- prefixText: L,
31
- inputMode: k,
32
- trailingIcon: H,
33
- trigger: x = "likeForm",
22
+ hidden: L = !1,
23
+ placeholder: q,
24
+ type: B,
25
+ prefixText: S,
26
+ inputMode: A,
27
+ trailingIcon: j,
28
+ trigger: f = "likeForm",
34
29
  rules: t,
35
- ...f
30
+ ...g
36
31
  }) => {
37
32
  const {
38
- control: v,
39
- getFieldState: u,
33
+ control: h,
34
+ getFieldState: m,
40
35
  formState: { errors: s },
41
- trigger: T
42
- } = W(), [b, B] = V(0), S = (a) => {
36
+ trigger: v
37
+ } = w(), [H, k] = b(0), z = (a) => {
43
38
  const l = a.target.value;
44
- B(l?.length ?? 0);
45
- }, j = () => {
39
+ k(l?.length ?? 0);
40
+ }, I = () => {
46
41
  if (s && s[e]) {
47
42
  const a = s[e]?.message;
48
43
  return a || "Invalid input";
49
44
  }
50
- return I;
45
+ return P;
51
46
  }, o = d(
52
47
  () => t?.maxLength?.value,
53
48
  [t]
54
- ), z = d(
49
+ ), M = d(
55
50
  () => t?.minLength?.value,
56
51
  [t]
57
- ), g = d(
52
+ ), x = d(
58
53
  () => t?.required?.value,
59
54
  [t]
60
- ), I = d(
55
+ ), P = d(
61
56
  () => t?.required?.message,
62
57
  [t]
63
58
  );
64
- return q ? /* @__PURE__ */ n(_, { name: e, control: v, render: () => /* @__PURE__ */ n(C, {}) }) : /* @__PURE__ */ n(
65
- _,
59
+ return L ? /* @__PURE__ */ n(F, { name: e, control: h, render: () => /* @__PURE__ */ n(C, {}) }) : /* @__PURE__ */ n(
60
+ F,
66
61
  {
67
62
  name: e,
68
63
  rules: t,
69
- control: v,
70
- render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */ M(C, { children: [
64
+ control: h,
65
+ render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */ R(C, { children: [
71
66
  /* @__PURE__ */ n(
72
- P,
67
+ V,
73
68
  {
74
- ...f,
69
+ ...g,
75
70
  ...l,
76
71
  value: l.value ?? "",
77
- type: $,
72
+ type: B,
78
73
  fullWidth: !0,
79
- inputMode: k,
80
- placeholder: F,
81
- prefixText: L,
82
- disabled: m,
83
- helperText: j(),
84
- helperTextPersistent: s !== void 0 || g || o !== void 0 && r,
85
- label: c,
74
+ inputMode: A,
75
+ placeholder: q,
76
+ prefixText: S,
77
+ disabled: c,
78
+ helperText: I(),
79
+ helperTextPersistent: s !== void 0 || x || o !== void 0 && r,
80
+ label: u,
86
81
  variant: "outlined",
87
82
  maxlength: o,
88
- minLength: z,
83
+ minLength: M,
89
84
  textarea: r,
90
85
  noResize: !1,
91
86
  onBlur: () => {
92
- x === "onBlur" && T(e), f.onBlur?.();
87
+ f === "onBlur" && v(e), g.onBlur?.();
93
88
  },
94
- onChange: (h) => {
95
- l.onChange(h), r && o !== void 0 && S(h), x === "onChange" && T(e);
89
+ onChange: (T) => {
90
+ l.onChange(T), r && o !== void 0 && z(T), f === "onChange" && v(e);
96
91
  },
97
- valid: !u(e).invalid,
98
- className: `${i.formText} ${u(e).invalid ? i.invalid : ""}`,
99
- trailingIcon: H
92
+ valid: !m(e).invalid,
93
+ className: `${i.formText} ${m(e).invalid ? i.invalid : ""}`,
94
+ trailingIcon: j
100
95
  }
101
96
  ),
102
97
  o !== void 0 && r && /* @__PURE__ */ n(
103
- J,
98
+ D,
104
99
  {
105
- count: b,
100
+ count: H,
106
101
  maxCount: o,
107
- invalid: u(e).invalid,
108
- required: g
102
+ invalid: m(e).invalid,
103
+ required: x
109
104
  }
110
105
  )
111
106
  ] })
@@ -113,5 +108,5 @@ const w = "_formTextAreaHelperText_1n0bk_1", D = "_invalid_1n0bk_6", E = "_requi
113
108
  );
114
109
  };
115
110
  export {
116
- N as FormText
111
+ X as FormText
117
112
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { a as s, s as r, f as d } from "../../../react.esm-DoZanrUz.js";
2
+ import { a as s, s as r, f as d } from "../../../react.esm-C3jDj5Fe.js";
3
3
  import { FormText as o } from "./FormText.js";
4
4
  import { v as a, d as i, t as l, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const m = a.fn();
@@ -1,77 +1,71 @@
1
- import "../../assets/GenericTable.css";
2
- import { jsx as e, jsxs as B } from "react/jsx-runtime";
3
- import { Elevation as T, Table as x, TableTopBar as b, Group as _, Padding as N, TypoDisplay as j, TypoSubtitle as C } from "@element/react-components";
4
- import { useMemo as v, Fragment as D } from "react";
5
- import { ContextMenu as I } from "../ContextMenu/ContextMenu.js";
6
- const M = "_topBar_1msoo_1", G = "_filterBar_1msoo_5", O = "_emptyTable_1msoo_9", P = "_elevation_1msoo_17", W = "_table_1msoo_22", d = {
7
- topBar: M,
8
- filterBar: G,
9
- emptyTable: O,
10
- elevation: P,
11
- table: W
12
- }, z = (n, l) => {
13
- if (!n)
1
+ import { jsx as e, jsxs as T } from "react/jsx-runtime";
2
+ import { Elevation as N, Table as B, TableTopBar as v, Group as g, Padding as j, TypoDisplay as C, TypoSubtitle as D } from "@element/react-components";
3
+ import { useMemo as b, Fragment as I } from "react";
4
+ import { ContextMenu as M } from "../ContextMenu/ContextMenu.js";
5
+ import { s as u } from "../../genericTable.module-BkU2VDKR.js";
6
+ const G = (r, l) => {
7
+ if (!r)
14
8
  return [];
15
- let o = Object.keys(n).map((t) => t);
16
- return l.length > 0 && (o = o.sort((t, i) => {
17
- const m = l.findIndex((c) => c === t), s = l.findIndex((c) => c === i);
18
- return m === -1 ? 1 : s === -1 ? -1 : m - s;
19
- })), o;
20
- }, $ = ({
21
- data: n = [],
9
+ let i = Object.keys(r).map((t) => t);
10
+ return l.length > 0 && (i = i.sort((t, o) => {
11
+ const p = l.findIndex((c) => c === t), s = l.findIndex((c) => c === o);
12
+ return p === -1 ? 1 : s === -1 ? -1 : p - s;
13
+ })), i;
14
+ }, F = ({
15
+ data: r = [],
22
16
  hiddenColumns: l = [],
23
- order: o = [],
17
+ order: i = [],
24
18
  cellTemplates: t = void 0,
25
- tableActions: i = [],
26
- noContentText: m = "No data available",
27
- headerTranslation: s = (f) => f,
19
+ tableActions: o = [],
20
+ noContentText: p = "No data available",
21
+ headerTranslation: s = (m) => m,
28
22
  pagination: c = !1,
29
- getRowActions: p = void 0,
23
+ getRowActions: d = void 0,
30
24
  customColumnWidth: h,
31
- title: u
25
+ title: f
32
26
  }) => {
33
- const f = v(() => {
34
- if (n.length === 0)
27
+ const m = b(() => {
28
+ if (r.length === 0)
35
29
  return [];
36
- const a = z(n[0], o).map((r) => {
37
- const y = h ? h[r] : void 0;
30
+ const a = G(r[0], i).map((n) => {
31
+ const x = h ? h[n] : void 0;
38
32
  return {
39
- id: r,
40
- header: s(r),
41
- accessor: r,
42
- cellTemplate: t ? t[r] : void 0,
43
- cellProps: { width: y }
33
+ id: n,
34
+ header: s(n),
35
+ accessor: n,
36
+ cellTemplate: t ? t[n] : void 0,
37
+ cellProps: { width: x }
44
38
  };
45
39
  });
46
- return p ? [...a, { id: "actions", header: "", accessor: "actions" }] : a;
47
- }, [n, t, o, s, p, h]), g = v(() => p ? n.map((a) => {
48
- const r = /* @__PURE__ */ e(I, { actions: p(a), iconOrientation: "horizontal" });
49
- return { ...a, actions: r };
50
- }) : n, [n, p]);
51
- return /* @__PURE__ */ e(T, { elevation: 1, className: d.elevation, children: /* @__PURE__ */ e(
52
- x,
40
+ return d ? [...a, { id: "actions", header: "", accessor: "actions" }] : a;
41
+ }, [r, t, i, s, d, h]), y = b(() => d ? r.map((a) => {
42
+ const n = /* @__PURE__ */ e(M, { actions: d(a), iconOrientation: "horizontal" });
43
+ return { ...a, actions: n };
44
+ }) : r, [r, d]);
45
+ return /* @__PURE__ */ e(N, { elevation: 1, className: u.elevation, children: /* @__PURE__ */ e(
46
+ B,
53
47
  {
54
- className: d.table,
48
+ className: u.table,
55
49
  fullWidth: !0,
56
50
  alwaysUseDivTags: !0,
57
51
  layout: "standard",
58
52
  hiddenColumns: l,
59
- data: g,
60
- columns: f,
61
- leadingContent: u && i.length === 0 ? /* @__PURE__ */ e(b, { title: u }) : i.length > 0 && /* @__PURE__ */ e(
62
- b,
53
+ data: y,
54
+ columns: m,
55
+ leadingContent: f && o.length === 0 ? /* @__PURE__ */ e(v, { title: f }) : o.length > 0 && /* @__PURE__ */ e(
56
+ v,
63
57
  {
64
- className: d.topBar,
65
- filterBar: /* @__PURE__ */ B(_, { fullWidth: !0, direction: "vertical", gap: "none", children: [
66
- u && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(j, { level: 6, children: u }) }),
58
+ className: u.topBar,
59
+ filterBar: /* @__PURE__ */ T(g, { fullWidth: !0, direction: "vertical", gap: "none", children: [
60
+ f && /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(C, { level: 6, children: f }) }),
67
61
  /* @__PURE__ */ e(
68
- _,
62
+ g,
69
63
  {
70
- className: d.filterBar,
64
+ className: u.filterBar,
71
65
  fullWidth: !0,
72
66
  primaryAlign: "center",
73
67
  secondaryAlign: "center",
74
- children: i.map((a, r) => /* @__PURE__ */ e(D, { children: a }, `action_${r}`))
68
+ children: o.map((a, n) => /* @__PURE__ */ e(I, { children: a }, `action_${n}`))
75
69
  }
76
70
  )
77
71
  ] })
@@ -79,20 +73,20 @@ const M = "_topBar_1msoo_1", G = "_filterBar_1msoo_5", O = "_emptyTable_1msoo_9"
79
73
  ),
80
74
  paginated: c,
81
75
  sortable: !0,
82
- noContentIncludeTable: !!f,
76
+ noContentIncludeTable: !!m,
83
77
  noContentMessage: /* @__PURE__ */ e(
84
- _,
78
+ g,
85
79
  {
86
80
  fullWidth: !0,
87
81
  primaryAlign: "center",
88
82
  secondaryAlign: "center",
89
- className: d.emptyTable,
90
- children: /* @__PURE__ */ e(C, { children: m })
83
+ className: u.emptyTable,
84
+ children: /* @__PURE__ */ e(D, { children: p })
91
85
  }
92
86
  )
93
87
  }
94
88
  ) });
95
89
  };
96
90
  export {
97
- $ as GenericTable
91
+ F as GenericTable
98
92
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
- import { a as i, s as e } from "../../react.esm-DoZanrUz.js";
2
+ import { a as i, s as e } from "../../react.esm-C3jDj5Fe.js";
3
3
  import { GenericTable as c } from "./GenericTable.js";
4
4
  import { d as B, t as d, g as t, v as r } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  B("GenericTable Test", () => {