@hortiview/shared-components 1.3.5 → 1.4.0
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.
- package/CHANGELOG.md +26 -0
- package/dist/{BigLoadingSpinner-iegTbDcD.js → BigLoadingSpinner-CqSGYzZA.js} +2 -2
- package/dist/components/AlertBanner/AlertBanner.js +14 -14
- package/dist/components/BlockView/BlockView.js +26 -24
- package/dist/components/ContextMenu/ContextMenu.js +29 -29
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +7 -6
- package/dist/components/EmptyView/EmptyView.js +47 -37
- package/dist/components/Filter/Filter.d.ts +2 -1
- package/dist/components/Filter/Filter.js +107 -90
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +22 -22
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -6
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +3 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +32 -26
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +19 -15
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -10
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +10 -9
- package/dist/components/SearchBar/SearchBar.js +3 -2
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +34 -27
- package/dist/components/VerticalDivider/VerticalDivider.js +12 -5
- package/package.json +1 -1
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
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
|
|
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",
|
|
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,
|
|
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
|
|
14
|
-
|
|
13
|
+
const a = t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight || W(t, t.parentElement?.clientWidth);
|
|
14
|
+
r(a);
|
|
15
15
|
},
|
|
16
|
-
className: `${
|
|
16
|
+
className: `${v.truncate} ${e.props.className}`
|
|
17
17
|
}),
|
|
18
18
|
[e, o]
|
|
19
19
|
);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
|
2
|
-
import { S as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
15
|
-
return
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
|
|
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
|
-
}, [
|
|
21
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
portalContainer: document.getElementById(
|
|
27
|
-
className: `${
|
|
28
|
-
...
|
|
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
|
-
|
|
40
|
+
P as Select
|
|
34
41
|
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/VerticalDivider.css';const
|
|
3
|
-
divider:
|
|
4
|
-
},
|
|
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
|
-
|
|
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.
|
|
4
|
+
"version": "1.4.0",
|
|
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>",
|