@hortiview/shared-components 1.3.5 → 1.4.1

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 (27) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/{BigLoadingSpinner-iegTbDcD.js → BigLoadingSpinner-CqSGYzZA.js} +2 -2
  3. package/dist/components/AlertBanner/AlertBanner.js +14 -14
  4. package/dist/components/BlockView/BlockView.js +26 -24
  5. package/dist/components/ContextMenu/ContextMenu.js +29 -29
  6. package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
  7. package/dist/components/Disclaimer/Disclaimer.js +7 -6
  8. package/dist/components/EmptyView/EmptyView.js +47 -37
  9. package/dist/components/Filter/Filter.d.ts +2 -1
  10. package/dist/components/Filter/Filter.js +107 -90
  11. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5156 -5154
  12. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
  13. package/dist/components/FormComponents/FormSelect/FormSelect.js +22 -22
  14. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -6
  15. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +3 -1
  16. package/dist/components/FormComponents/FormToggle/FormToggle.js +32 -26
  17. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +19 -15
  18. package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -10
  19. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
  20. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  21. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +1 -1
  22. package/dist/components/OverflowTooltip/OverflowTooltip.js +10 -9
  23. package/dist/components/SearchBar/SearchBar.js +3 -2
  24. package/dist/components/Select/Select.d.ts +1 -1
  25. package/dist/components/Select/Select.js +34 -27
  26. package/dist/components/VerticalDivider/VerticalDivider.js +12 -5
  27. package/package.json +3 -3
@@ -5,7 +5,7 @@ import { ExtendedSelectProps } from '../../Select/Select';
5
5
  /**
6
6
  * a generic FormSelector property type. the generic T represents the interface, which is used in the form, like {@link CreateOrganizationDto}
7
7
  */
8
- type FormSelectProps<T extends FieldValues> = Omit<SelectProps, 'className' | 'clearable' | 'disabled' | 'helperTextPersistent' | 'hidden' | 'hoisted' | 'label' | 'menuMaxHeight' | 'multi' | 'multiSelect' | 'options' | 'searchable' | 'textKey' | 'valid' | 'value' | 'valueKey' | 'variant'> & Pick<ExtendedSelectProps, 'portalClassName'> & {
8
+ type FormSelectProps<T extends FieldValues> = Omit<SelectProps, 'className' | 'clearable' | 'disabled' | 'helperTextPersistent' | 'hidden' | 'hoisted' | 'label' | 'menuMaxHeight' | 'multi' | 'multiSelect' | 'options' | 'searchable' | 'textKey' | 'valid' | 'value' | 'valueKey' | 'variant'> & Pick<ExtendedSelectProps, 'portalClassName' | 'data-testid'> & {
9
9
  /** the name of the property in the form */
10
10
  propertyName: Path<T>;
11
11
  /** the label of the select */
@@ -1,4 +1,4 @@
1
- import { jsx as l, Fragment as k, jsxs as z } from "react/jsx-runtime";
1
+ import { jsx as o, Fragment as k, jsxs as z } from "react/jsx-runtime";
2
2
  import { g as _ } from "../../../get-DFv1gXfq.js";
3
3
  import { i as G } from "../../../isArray-Dub1wGJM.js";
4
4
  import { useMemo as C } from "react";
@@ -20,19 +20,19 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_ht9kd_1",
20
20
  }, ft = ({
21
21
  propertyName: i,
22
22
  label: s,
23
- options: o,
23
+ options: r,
24
24
  multi: d = !1,
25
25
  disabled: x = !1,
26
26
  hoisted: H = !1,
27
27
  hidden: I = !1,
28
- valueKey: r = "value",
28
+ valueKey: n = "value",
29
29
  textKey: u = "text",
30
30
  clearable: w = !1,
31
31
  searchable: D = !0,
32
32
  noOptionsMessage: T = "",
33
33
  rules: f,
34
34
  menuPosition: P = "auto",
35
- ...n
35
+ ...l
36
36
  }) => {
37
37
  const {
38
38
  control: v,
@@ -46,28 +46,28 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_ht9kd_1",
46
46
  [f]
47
47
  ), { helperText: M, helperTextPersistent: j } = O({
48
48
  propertyName: i,
49
- helperText: n.helperText,
49
+ helperText: l.helperText,
50
50
  requiredText: b,
51
51
  hasCharacterCount: !1
52
52
  });
53
- return I ? /* @__PURE__ */ l($, { name: i, control: v, render: () => /* @__PURE__ */ l(k, {}) }) : /* @__PURE__ */ l(
53
+ return I ? /* @__PURE__ */ o($, { name: i, control: v, render: () => /* @__PURE__ */ o(k, {}) }) : /* @__PURE__ */ o(
54
54
  "div",
55
55
  {
56
56
  "data-testid": "form-select-container",
57
57
  className: e.formSelectContainer,
58
58
  "data-tooltip-id": s,
59
- children: /* @__PURE__ */ l(
59
+ children: /* @__PURE__ */ o(
60
60
  $,
61
61
  {
62
62
  name: i,
63
63
  rules: f,
64
64
  control: v,
65
65
  render: ({ field: { ref: et, onChange: m, value: g, ...q } }) => {
66
- let h = o;
67
- G(o) && _(o[0], "options") !== void 0 && (h = o.flatMap((t) => _(t, "options") ?? []));
66
+ let h = r;
67
+ G(r) && _(r[0], "options") !== void 0 && (h = r.flatMap((t) => _(t, "options") ?? []));
68
68
  const a = d ? h?.filter(
69
- (t) => g?.includes(t[r])
70
- ) : h?.find((t) => t[r] === g), A = d && n.multiDisplayType === "text" && n.fixedHeightInput, c = B(i).invalid, E = `
69
+ (t) => g?.includes(t[n])
70
+ ) : h?.find((t) => t[n] === g), A = d && l.multiDisplayType === "text" && l.fixedHeightInput, c = B(i).invalid, E = `
71
71
  ${e.formSelect}
72
72
  ${c ? e.invalidHelperText : ""}
73
73
  ${c ? e.invalidDropdownIcon : ""}
@@ -76,23 +76,23 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_ht9kd_1",
76
76
  ${A ? e.multiText : ""}
77
77
  ${x ? e.disabled : ""}`;
78
78
  return /* @__PURE__ */ z(k, { children: [
79
- /* @__PURE__ */ l(
79
+ /* @__PURE__ */ o(
80
80
  Q,
81
81
  {
82
82
  ...q,
83
- ...n,
83
+ ...l,
84
84
  value: a ?? [],
85
85
  label: s,
86
86
  variant: "outlined",
87
87
  helperText: M,
88
88
  helperTextPersistent: j,
89
- options: o,
89
+ options: r,
90
90
  valid: !F,
91
- "data-testid": `select-${i}`,
92
- multiSelect: !o?.length && T ? !1 : d,
91
+ "data-testid": l["data-testid"] ?? `select-${i}`,
92
+ multiSelect: !r?.length && T ? !1 : d,
93
93
  className: E,
94
94
  disabled: x,
95
- valueKey: r,
95
+ valueKey: n,
96
96
  textKey: u,
97
97
  onChange: (t) => {
98
98
  if (t == null) {
@@ -100,10 +100,10 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_ht9kd_1",
100
100
  return;
101
101
  }
102
102
  if (d) {
103
- m(t.map((V) => V[r]));
103
+ m(t.map((V) => V[n]));
104
104
  return;
105
105
  }
106
- m(t[r]), n?.onChange?.(t);
106
+ m(t[n]), l?.onChange?.(t);
107
107
  },
108
108
  hoisted: H,
109
109
  noOptionsMessage: T,
@@ -112,7 +112,7 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_ht9kd_1",
112
112
  menuPosition: P
113
113
  }
114
114
  ),
115
- /* @__PURE__ */ l(
115
+ /* @__PURE__ */ o(
116
116
  L,
117
117
  {
118
118
  id: s,
@@ -120,8 +120,8 @@ import '../../../assets/FormSelect.css';const U = "_invalidHelperText_ht9kd_1",
120
120
  place: "bottom",
121
121
  delayShow: 420,
122
122
  className: e.tooltip,
123
- hidden: !a || a.length === 0 || !n.fixedHeightInput,
124
- children: /* @__PURE__ */ l(R, { value: a, textKey: u, valueKey: r })
123
+ hidden: !a || a.length === 0 || !l.fixedHeightInput,
124
+ children: /* @__PURE__ */ o(R, { value: a, textKey: u, valueKey: n })
125
125
  }
126
126
  )
127
127
  ] });
@@ -1,10 +1,10 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { G as n } from "../../../index.es-DntoATwO.js";
3
- import { b as p } from "../../../index.es-CF_xy2ns.js";
4
- const s = ({ value: r, textKey: o, valueKey: e }) => {
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { G as p } from "../../../index.es-DntoATwO.js";
3
+ import { b as d } from "../../../index.es-CF_xy2ns.js";
4
+ const m = ({ value: r, textKey: t, valueKey: e }) => {
5
5
  if (!(!r || r.length === 0))
6
- return Array.isArray(r) ? /* @__PURE__ */ t(n, { direction: "vertical", gap: "dense", children: r?.map((i) => /* @__PURE__ */ t(p, { level: 2, children: i[o] }, i[e])) }) : r?.[o];
6
+ return Array.isArray(r) ? /* @__PURE__ */ i(p, { "data-testid": "select-tooltip", direction: "vertical", gap: "dense", children: r?.map((o) => /* @__PURE__ */ i(d, { level: 2, children: o[t] }, o[e])) }) : r?.[t];
7
7
  };
8
8
  export {
9
- s as SelectTooltipText
9
+ m as SelectTooltipText
10
10
  };
@@ -14,6 +14,8 @@ type FormToggleProps<T extends FieldValues> = {
14
14
  onChange?: SwitchProps['onChange'];
15
15
  /** Determines if this input is disabled. */
16
16
  disabled?: SwitchProps['disabled'];
17
+ /** Unique identifier for targeting this element in automated tests. */
18
+ 'data-testid'?: string;
17
19
  };
18
20
  /**
19
21
  * FormToggle is a custom form input component for selecting toggle.
@@ -28,5 +30,5 @@ type FormToggleProps<T extends FieldValues> = {
28
30
  *
29
31
  * @returns A JSX element that renders a toggle form input.
30
32
  */
31
- export declare const FormToggle: <T extends FieldValues>({ propertyName, label, validate, required, onChange, disabled, }: FormToggleProps<T>) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const FormToggle: <T extends FieldValues>({ propertyName, label, validate, required, onChange, disabled, "data-testid": dataTestId, }: FormToggleProps<T>) => import("react/jsx-runtime").JSX.Element;
32
34
  export {};
@@ -1,41 +1,47 @@
1
- import { jsx as o, jsxs as g } from "react/jsx-runtime";
2
- import { G as h } from "../../../index.es-DntoATwO.js";
3
- import { S as l } from "../../../index.es-8GOVkuo-.js";
4
- import { a as d } from "../../../index.es-CF_xy2ns.js";
5
- import { useFormContext as u, Controller as C } from "react-hook-form";
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import { G as d } from "../../../index.es-DntoATwO.js";
3
+ import { S as f } from "../../../index.es-8GOVkuo-.js";
4
+ import { a as h } from "../../../index.es-CF_xy2ns.js";
5
+ import { u as C } from "../../../uniqueId-NU3-C36A.js";
6
+ import { useEffect as x } from "react";
7
+ import { useFormContext as T, Controller as y } from "react-hook-form";
6
8
  const F = ({
7
- propertyName: t,
8
- label: n,
9
- validate: m,
10
- required: s,
9
+ propertyName: n,
10
+ label: s,
11
+ validate: i,
12
+ required: c,
11
13
  onChange: a,
12
- disabled: c
14
+ disabled: g,
15
+ "data-testid": m = "toggle"
13
16
  }) => {
14
- const { control: i } = u();
15
- return /* @__PURE__ */ o(
16
- C,
17
+ const { control: l } = T(), e = C("formToggleTestId-");
18
+ return x(() => {
19
+ const r = document.querySelectorAll(`input#${e}[type="checkbox"]`);
20
+ r && r.forEach((o) => o.setAttribute("data-testid", m));
21
+ }, [m, e]), /* @__PURE__ */ t(
22
+ y,
17
23
  {
18
- name: t,
19
- control: i,
24
+ name: n,
25
+ control: l,
20
26
  rules: {
21
- required: s,
22
- validate: m
27
+ required: c,
28
+ validate: i
23
29
  },
24
- render: ({ field: r, fieldState: e }) => /* @__PURE__ */ g(h, { direction: "vertical", children: [
25
- /* @__PURE__ */ o(
26
- l,
30
+ render: ({ field: r, fieldState: o }) => /* @__PURE__ */ p(d, { direction: "vertical", children: [
31
+ /* @__PURE__ */ t(
32
+ f,
27
33
  {
28
- "data-testid": "checkbox",
34
+ id: e,
29
35
  ...r,
30
- label: n,
31
- onChange: (...p) => {
32
- r.onChange(...p), a?.();
36
+ label: s,
37
+ onChange: (...u) => {
38
+ r.onChange(...u), a?.();
33
39
  },
34
40
  checked: r.value,
35
- disabled: c
41
+ disabled: g
36
42
  }
37
43
  ),
38
- e.error && /* @__PURE__ */ o(d, { "data-testid": "toggle-error-message", themeColor: "error", children: e.error.message })
44
+ o.error && /* @__PURE__ */ t(h, { "data-testid": "toggle-error-message", themeColor: "error", children: o.error.message })
39
45
  ] })
40
46
  }
41
47
  );
@@ -1,15 +1,15 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { a as n, s as t, f as m } from "../../../react.esm-CX1WJ2Pp.js";
3
- import { FormToggle as l } from "./FormToggle.js";
4
- import { v as e, d as f, t as c, g as r } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
5
- const a = e.fn();
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { a as s, s as t, f as m } from "../../../react.esm-CX1WJ2Pp.js";
3
+ import { FormToggle as n } from "./FormToggle.js";
4
+ import { v as e, d as u, t as l, g as o } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
5
+ const c = e.fn();
6
6
  e.mock("react-hook-form", () => ({
7
7
  ...e.importActual("react-hook-form"),
8
8
  Controller: ({
9
- render: o
10
- }) => o({
9
+ render: r
10
+ }) => r({
11
11
  field: {
12
- onChange: a
12
+ onChange: c
13
13
  },
14
14
  fieldState: { error: { message: "error" } }
15
15
  }),
@@ -39,12 +39,16 @@ e.mock("react-hook-form", () => ({
39
39
  watch: () => "2024-08-07"
40
40
  })
41
41
  }));
42
- f("FormToggle Test", () => {
43
- c("render FormToggle", () => {
44
- n(/* @__PURE__ */ s(l, { propertyName: "hasValue", label: "user.hasValue" })), r(t.getByText("user.hasValue")).toBeInTheDocument(), r(t.getByText("error")).toBeInTheDocument(), r(t.getByRole("switch")).toBeInTheDocument();
45
- }), c("render FormToggle click", () => {
46
- n(/* @__PURE__ */ s(l, { propertyName: "hasValue", label: "user.hasValue", onChange: a }));
47
- const o = t.getByRole("switch");
48
- m.click(o), r(a).toHaveBeenCalled();
42
+ u("FormToggle Test", () => {
43
+ l("render FormToggle", () => {
44
+ s(/* @__PURE__ */ a(n, { propertyName: "hasValue", label: "user.hasValue" })), o(t.getByText("user.hasValue")).toBeInTheDocument(), o(t.getByText("error")).toBeInTheDocument(), o(t.getByRole("switch")).toBeInTheDocument();
45
+ }), l("render FormToggle click", () => {
46
+ s(/* @__PURE__ */ a(n, { propertyName: "hasValue", label: "user.hasValue", onChange: c }));
47
+ const r = t.getByRole("switch");
48
+ m.click(r), o(c).toHaveBeenCalled();
49
+ }), l("render FormToggle with custom data-testid", () => {
50
+ s(/* @__PURE__ */ a(n, { propertyName: "hasValue", label: "user.hasValue", "data-testid": "custom-test-id" })), o(t.getByTestId("custom-test-id")).toBeInTheDocument();
51
+ const r = t.queryByTestId("toggle");
52
+ o(r).not.toBeInTheDocument();
49
53
  });
50
54
  });
@@ -1,25 +1,25 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { G as d } from "../../../index.es-DntoATwO.js";
2
+ import { G as c } from "../../../index.es-DntoATwO.js";
3
3
  import { P as l } from "../../../index.es-D-CKRzIB.js";
4
- import { a as c } from "../../../index.es-CF_xy2ns.js";
5
- import { s as t, G as m } from "../../../GenericCard-CelFEWlW.js";
6
- const g = ({
4
+ import { a as o } from "../../../index.es-CF_xy2ns.js";
5
+ import { s as i, G as m } from "../../../GenericCard-CelFEWlW.js";
6
+ const u = ({
7
7
  columns: n,
8
8
  data: e,
9
9
  hiddenColumns: a = [],
10
- noContentText: s
11
- }) => e?.length === 0 ? /* @__PURE__ */ r("div", { className: t.emptyContainer, children: /* @__PURE__ */ r(l, { variant: "standard", style: { textAlign: "center" }, className: t.empty, children: /* @__PURE__ */ r(c, { children: s }) }) }) : (
10
+ noContentText: d
11
+ }) => e?.length === 0 ? /* @__PURE__ */ r("div", { "data-testid": "empty-generic-card-list", className: i.emptyContainer, children: /* @__PURE__ */ r(l, { variant: "standard", style: { textAlign: "center" }, className: i.empty, children: /* @__PURE__ */ r(o, { children: d }) }) }) : (
12
12
  // needs the div to surround the Group by an element with display: block to avoid visual errors
13
- /* @__PURE__ */ r("div", { style: { width: "100%" }, children: /* @__PURE__ */ r(d, { fullWidth: !0, direction: "vertical", primaryAlign: "center", secondaryAlign: "center", children: e?.map((i, o) => /* @__PURE__ */ r(
13
+ /* @__PURE__ */ r("div", { "data-testid": "generic-card-list", style: { width: "100%" }, children: /* @__PURE__ */ r(c, { fullWidth: !0, direction: "vertical", primaryAlign: "center", secondaryAlign: "center", children: e?.map((t, s) => /* @__PURE__ */ r(
14
14
  m,
15
15
  {
16
- item: i,
16
+ item: t,
17
17
  columns: n,
18
18
  hiddenColumns: a
19
19
  },
20
- i.id ?? o
20
+ t.id ?? s
21
21
  )) }) })
22
22
  );
23
23
  export {
24
- g as GenericCardList
24
+ u as GenericCardList
25
25
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../../index.es-CF_xy2ns.js";
3
3
  import "../../Iconify/Iconify.js";
4
- import { B as t } from "../../../BigLoadingSpinner-iegTbDcD.js";
4
+ import { B as t } from "../../../BigLoadingSpinner-CqSGYzZA.js";
5
5
  export {
6
6
  t as BigLoadingSpinner
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { s as r, B as n } from "../../../BigLoadingSpinner-iegTbDcD.js";
2
+ import { s as r, B as n } from "../../../BigLoadingSpinner-CqSGYzZA.js";
3
3
  import { a as i, s as e } from "../../../react.esm-CX1WJ2Pp.js";
4
4
  import { d as g, t as a, g as t } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
5
5
  g("BigLoadingSpinner Test", () => {
@@ -7,7 +7,7 @@ import { M as G, a as K } from "../../../component-neHBNHRu.js";
7
7
  import { G as q } from "../../../index.es-DntoATwO.js";
8
8
  import { P as J } from "../../../index.es-D-CKRzIB.js";
9
9
  import { b as Q } from "../../../index.es-CF_xy2ns.js";
10
- import { B as X } from "../../../BigLoadingSpinner-iegTbDcD.js";
10
+ import { B as X } from "../../../BigLoadingSpinner-CqSGYzZA.js";
11
11
  import '../../../assets/LoadingSpinner.css';/**
12
12
  * @license
13
13
  * Copyright 2020 Google Inc.
@@ -1,27 +1,28 @@
1
- import { jsxs as a, Fragment as m, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as c, Fragment as m, jsx as s } from "react/jsx-runtime";
2
2
  import { b as p } from "../../index.es-CF_xy2ns.js";
3
- import { useState as h, useMemo as d, cloneElement as f } from "react";
3
+ import { useState as d, useMemo as h, cloneElement as f } from "react";
4
4
  import { M as w } from "../../react-tooltip.min-DSY6KDqS.js";
5
5
  import { hasChildWithGreaterWidth as W } from "./OverflowTooltipService.js";
6
- import '../../assets/OverflowTooltip.css';const u = "_truncate_wgwcv_1", b = {
6
+ import '../../assets/OverflowTooltip.css';const u = "_truncate_wgwcv_1", v = {
7
7
  truncate: u
8
8
  }, E = ({ id: o, text: l, children: e }) => {
9
- const [i, n] = h(!1), r = d(
9
+ const [i, r] = d(!1), n = h(
10
10
  () => f(e, {
11
11
  "data-tooltip-id": o,
12
12
  onMouseEnter: ({ currentTarget: t }) => {
13
- const c = t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight || W(t, t.parentElement?.clientWidth);
14
- n(c);
13
+ const a = t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight || W(t, t.parentElement?.clientWidth);
14
+ r(a);
15
15
  },
16
- className: `${b.truncate} ${e.props.className}`
16
+ className: `${v.truncate} ${e.props.className}`
17
17
  }),
18
18
  [e, o]
19
19
  );
20
- return /* @__PURE__ */ a(m, { children: [
21
- r,
20
+ return /* @__PURE__ */ c(m, { children: [
21
+ n,
22
22
  /* @__PURE__ */ s(
23
23
  w,
24
24
  {
25
+ "data-testid": "overflow-tooltip",
25
26
  id: o,
26
27
  noArrow: !0,
27
28
  place: "bottom",
@@ -3,7 +3,7 @@ import { I as c } from "../../index.es-0lQcz8m1.js";
3
3
  import { T as i } from "../../index.es-25EARqhH.js";
4
4
  import '../../assets/SearchBar.css';const l = "_searchbar_gnvwc_1", u = {
5
5
  searchbar: l
6
- }, b = ({
6
+ }, f = ({
7
7
  className: o = "",
8
8
  dense: n = !1,
9
9
  searchTerm: a,
@@ -23,6 +23,7 @@ import '../../assets/SearchBar.css';const l = "_searchbar_gnvwc_1", u = {
23
23
  trailingIcon: /* @__PURE__ */ r(
24
24
  c,
25
25
  {
26
+ "data-testid": "search-bar-icon-button",
26
27
  icon: a ? "close" : "search",
27
28
  onClick: () => a ? t("") : void 0
28
29
  }
@@ -30,5 +31,5 @@ import '../../assets/SearchBar.css';const l = "_searchbar_gnvwc_1", u = {
30
31
  }
31
32
  );
32
33
  export {
33
- b as SearchBar
34
+ f as SearchBar
34
35
  };
@@ -11,4 +11,4 @@ export type ExtendedSelectProps = SelectProps & {
11
11
  * @param portalClassName Custom class name for the portal. Only works if portalContainer is not set.
12
12
  * @param props Element Select props
13
13
  */
14
- export declare const Select: ({ menuMaxHeight, portalClassName, className, hoisted, ...props }: ExtendedSelectProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const Select: ({ menuMaxHeight, portalClassName, "data-testid": dataTestId, className, hoisted, ...props }: ExtendedSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,34 +1,41 @@
1
- import { jsx as m, Fragment as u } from "react/jsx-runtime";
2
- import { S as d } from "../../index.es-UHKFl8Da.js";
3
- import { useEffect as a } from "react";
4
- import '../../assets/Select.css';const i = "_customPortal_8wq49_1", f = "_customSelect_8wq49_7", s = {
5
- customPortal: i,
6
- customSelect: f
7
- }, _ = ({
8
- menuMaxHeight: n = "15rem",
9
- portalClassName: e,
10
- className: r,
11
- hoisted: o,
12
- ...l
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { S as f } from "../../index.es-UHKFl8Da.js";
3
+ import { useEffect as n } from "react";
4
+ import { u as S } from "../../uniqueId-NU3-C36A.js";
5
+ import '../../assets/Select.css';const p = "_customPortal_8wq49_1", $ = "_customSelect_8wq49_7", r = {
6
+ customPortal: p,
7
+ customSelect: $
8
+ }, P = ({
9
+ menuMaxHeight: s = "15rem",
10
+ portalClassName: o,
11
+ "data-testid": l = "custom-select",
12
+ className: u,
13
+ hoisted: c,
14
+ ...d
13
15
  }) => {
14
- const t = `custom-portal-${e ?? "default"}`;
15
- return a(() => {
16
- if (o && !document.getElementById(t)) {
17
- const c = document.createElement("div");
18
- c.id = t, c.className = `${s.customPortal} ${e ?? ""}`, document.body.appendChild(c);
16
+ const e = `custom-portal-${o ?? "default"}`, m = S("elementSelectForTestId-");
17
+ return n(() => {
18
+ if (c && !document.getElementById(e)) {
19
+ const t = document.createElement("div");
20
+ t.id = e, t.className = `${r.customPortal} ${o ?? ""}`, document.body.appendChild(t);
19
21
  }
20
- }, [o, t, e]), /* @__PURE__ */ m(u, { children: /* @__PURE__ */ m(
21
- d,
22
+ }, [c, e, o]), n(() => {
23
+ const t = document.querySelectorAll(`#${m} input[role="combobox"]`);
24
+ t && t.forEach((i) => {
25
+ i.setAttribute("data-testid", l);
26
+ });
27
+ }, [l, m]), /* @__PURE__ */ a(
28
+ f,
22
29
  {
23
- "data-testid": "custom-select",
24
- menuMaxHeight: n,
25
- hoisted: o,
26
- portalContainer: document.getElementById(t) ? `#${t}` : void 0,
27
- className: `${s.customSelect} ${r ?? ""}`,
28
- ...l
30
+ menuMaxHeight: s,
31
+ hoisted: c,
32
+ id: m,
33
+ portalContainer: document.getElementById(e) ? `#${e}` : void 0,
34
+ className: `${r.customSelect} ${u ?? ""}`,
35
+ ...d
29
36
  }
30
- ) });
37
+ );
31
38
  };
32
39
  export {
33
- _ as Select
40
+ P as Select
34
41
  };
@@ -1,7 +1,14 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import '../../assets/VerticalDivider.css';const d = "_divider_opvom_1", s = {
3
- divider: d
4
- }, o = ({ height: i = "2rem", className: e = "" }) => /* @__PURE__ */ r("div", { className: `${s.divider} ${e}`, style: { height: i } });
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import '../../assets/VerticalDivider.css';const r = "_divider_opvom_1", t = {
3
+ divider: r
4
+ }, v = ({ height: i = "2rem", className: e = "" }) => /* @__PURE__ */ d(
5
+ "div",
6
+ {
7
+ "data-testid": "vertical-divider",
8
+ className: `${t.divider} ${e}`,
9
+ style: { height: i }
10
+ }
11
+ );
5
12
  export {
6
- o as VerticalDivider
13
+ v as VerticalDivider
7
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/shared-components",
3
3
  "description": "This is a shared component library. It should used in the HortiView platform and its modules.",
4
- "version": "1.3.5",
4
+ "version": "1.4.1",
5
5
  "type": "module",
6
6
  "repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
7
7
  "author": "Falk Menge <falk.menge.ext@bayer.com>",
@@ -44,7 +44,7 @@
44
44
  "lodash": "^4.17.21",
45
45
  "react": "^18.3.1",
46
46
  "react-dom": "^18.3.1",
47
- "react-hook-form": "^7.51.2",
47
+ "react-hook-form": "^7.55.0",
48
48
  "react-number-format": "^5.4.3"
49
49
  },
50
50
  "devDependencies": {
@@ -88,7 +88,7 @@
88
88
  "lodash": "^4.17.21",
89
89
  "react": "^18.3.1",
90
90
  "react-dom": "^18.3.1",
91
- "react-hook-form": "^7.51.2",
91
+ "react-hook-form": "^7.55.0",
92
92
  "react-number-format": "^5.4.3",
93
93
  "react-tooltip": "^5.26.4",
94
94
  "semantic-release-ado": "^1.4.0",