@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.
- package/CHANGELOG.md +41 -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/FormDatePicker/FormDatePicker.js +5156 -5154
- 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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
## [1.4.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.4.0...v1.4.1) (2025-04-18)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* fix datepicker ([99e84f0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/99e84f0b256f7a65266af0d933b49b8bd3a7e8db))
|
|
6
|
+
|
|
7
|
+
### Documentation
|
|
8
|
+
|
|
9
|
+
* add a method comment for getValidDay ([6d10f38](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/6d10f388199e13072068b641a24872ce934963ef))
|
|
10
|
+
* add comment to useUtc prop to prevent future bugs ([95b9391](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/95b939198711e2809335b42b2bf60ff0efabbb31))
|
|
11
|
+
|
|
12
|
+
### Code Refactoring
|
|
13
|
+
|
|
14
|
+
* remove button ([f5f4aff](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/f5f4aff457942839296d2b4810f0287c378a8c1a))
|
|
15
|
+
|
|
16
|
+
## [1.4.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.3.5...v1.4.0) (2025-04-11)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add className & change useEffect ([61e2109](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/61e21095a0ecd98336b28991caa3a9cf8b0e5e91))
|
|
21
|
+
* add data-testid to Filter.tsx ([384b36e](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/384b36e5068c7b6381ea4884dd4ad5965808bc5f))
|
|
22
|
+
* add data-testids to shared components ([1ef7d22](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/1ef7d225316e73ee02c1d0aad69575e27da03841)), closes [#11762](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/issues/11762)
|
|
23
|
+
* add dataTestId ([bbf3c6a](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/bbf3c6a3507f5683c91496349f224f29a311c4a0))
|
|
24
|
+
* add new data-testids ([21ded33](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/21ded33c5494474b2df0096ebefb1fdecabb7407))
|
|
25
|
+
* add test for FormToggle & add data-testid prop ([eef11be](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/eef11becd8c2dca76297923165c5f8077dadb3ea))
|
|
26
|
+
* add useRef and uniqueid & change data-testid ([5f42796](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/5f4279616ef2f6c9649697f929f7404120caacbf))
|
|
27
|
+
* add useRef with uniqueId & add data-testid to stories ([b39d83d](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/b39d83d9a3f8b649d7996295b4a0d90a47316610))
|
|
28
|
+
* change data-testid ([3355b85](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/3355b85ef67c19d50d1e6cce9b8dd818acb72b4e))
|
|
29
|
+
* change ids and change useeffect ([eeb23a5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/eeb23a582a9c3daf0a7216172f41edc322f1969c))
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* fix yarn error ([fa13133](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/fa1313320003e0ede7b7a61ca03734d99556725a))
|
|
34
|
+
|
|
35
|
+
### Code Refactoring
|
|
36
|
+
|
|
37
|
+
* change data-testids ([e26c73e](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/e26c73e717f6bb5772074ddd9f112160e3726804))
|
|
38
|
+
* change ids ([6483533](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/6483533f149b50edcf807ce900bb4a8c9f38d16d))
|
|
39
|
+
* remove data-testid & change dataTestId in Select.test.tsx ([c91cbc9](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/c91cbc9ea6c425df3d1e5bef23c4f8612d589bf3))
|
|
40
|
+
* remove useRef ([9d2edca](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/9d2edcae4c9d6a46c77089d2faf111c4e7b71f61))
|
|
41
|
+
|
|
1
42
|
## [1.3.5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.3.4...v1.3.5) (2025-04-09)
|
|
2
43
|
|
|
3
44
|
### Bug Fixes
|
|
@@ -9,8 +9,8 @@ import './assets/BigLoadingSpinner.css';const e = "_loadingBigOverlay_7dxo1_1",
|
|
|
9
9
|
}, l = ({ text: a }) => /* @__PURE__ */ n("div", { className: o.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
|
|
10
10
|
/* @__PURE__ */ i(d, { icon: "hortiview", className: o.logo, "data-testid": "logo-icon" }),
|
|
11
11
|
/* @__PURE__ */ i(r, { tag: "p", bold: !0, level: 1, className: o.bigLoadSpinnerCardText, children: a })
|
|
12
|
-
] }),
|
|
12
|
+
] }), _ = (a) => /* @__PURE__ */ i("div", { "data-testid": "big-loading-spinner", className: o.loadingBigOverlay, children: /* @__PURE__ */ i(l, { ...a }) });
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
_ as B,
|
|
15
15
|
o as s
|
|
16
16
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { G as
|
|
3
|
-
import { b as
|
|
4
|
-
import { u as
|
|
5
|
-
import '../../assets/AlertBanner.css';const
|
|
6
|
-
messageContainer:
|
|
1
|
+
import { jsx as e, Fragment as c, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { G as l } from "../../index.es-DntoATwO.js";
|
|
3
|
+
import { b as m } from "../../index.es-CF_xy2ns.js";
|
|
4
|
+
import { u as _ } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
5
|
+
import '../../assets/AlertBanner.css';const g = "_messageContainer_1seos_1", p = "_info_1seos_9", f = "_danger_1seos_14", u = "_success_1seos_19", y = "_warning_1seos_24", n = {
|
|
6
|
+
messageContainer: g,
|
|
7
7
|
info: p,
|
|
8
8
|
danger: f,
|
|
9
9
|
success: u,
|
|
10
10
|
warning: y
|
|
11
|
-
},
|
|
12
|
-
text:
|
|
11
|
+
}, C = ({
|
|
12
|
+
text: s,
|
|
13
13
|
color: r = "info",
|
|
14
14
|
isOpen: o = !0,
|
|
15
15
|
action: i,
|
|
16
16
|
isBold: t = !0
|
|
17
17
|
}) => {
|
|
18
|
-
const { isDesktop: a } =
|
|
19
|
-
return o ? /* @__PURE__ */
|
|
20
|
-
|
|
18
|
+
const { isDesktop: a } = _();
|
|
19
|
+
return o ? /* @__PURE__ */ e("div", { "data-testid": "alert-banner", className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */ d(
|
|
20
|
+
l,
|
|
21
21
|
{
|
|
22
22
|
direction: a ? "horizontal" : "vertical",
|
|
23
23
|
primaryAlign: "space-between",
|
|
24
24
|
secondaryAlign: "center",
|
|
25
25
|
children: [
|
|
26
|
-
typeof
|
|
26
|
+
typeof s == "string" ? /* @__PURE__ */ e(m, { bold: t, level: 2, children: s }) : /* @__PURE__ */ e("div", { children: s }),
|
|
27
27
|
i
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
|
-
) }) : /* @__PURE__ */
|
|
30
|
+
) }) : /* @__PURE__ */ e(c, {});
|
|
31
31
|
};
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
C as AlertBanner
|
|
34
34
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as v, jsx as t, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import { d as C, T as R, a as B } from "../../index.es-CF_xy2ns.js";
|
|
3
3
|
import { useState as A, useEffect as D, useMemo as S } from "react";
|
|
4
4
|
import { getBlockNumberByDto as F } from "../../services/BlockService.js";
|
|
@@ -16,48 +16,50 @@ import '../../assets/BlockView.css';const M = "_grid_17o13_1", V = "_black_17o13
|
|
|
16
16
|
}, Y = ({
|
|
17
17
|
rows: e,
|
|
18
18
|
columns: r,
|
|
19
|
-
hideText:
|
|
19
|
+
hideText: b = !1,
|
|
20
20
|
errorBlocks: f = [],
|
|
21
|
-
showNumbers:
|
|
22
|
-
clickable:
|
|
23
|
-
size:
|
|
24
|
-
onClick:
|
|
21
|
+
showNumbers: w = !0,
|
|
22
|
+
clickable: g = !0,
|
|
23
|
+
size: m = 15,
|
|
24
|
+
onClick: d = null,
|
|
25
25
|
currentBlock: a,
|
|
26
|
-
blocks:
|
|
27
|
-
blockViewTitle:
|
|
28
|
-
blockLabel:
|
|
26
|
+
blocks: k,
|
|
27
|
+
blockViewTitle: N,
|
|
28
|
+
blockLabel: $,
|
|
29
29
|
emptyViewTitle: x
|
|
30
30
|
}) => {
|
|
31
|
-
const [u,
|
|
31
|
+
const [u, _] = A(0);
|
|
32
32
|
D(() => {
|
|
33
33
|
if (!a) return;
|
|
34
34
|
const l = F(a, r);
|
|
35
|
-
|
|
35
|
+
_(l);
|
|
36
36
|
}, [a, r]);
|
|
37
37
|
const L = S(() => e * r, [e, r]), T = (l) => {
|
|
38
|
-
|
|
39
|
-
}, E = ({ row: l, column: i }) =>
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
!
|
|
38
|
+
d && d(l, a ?? void 0);
|
|
39
|
+
}, E = ({ row: l, column: i }) => k.length === 0 ? !0 : k.some((s) => s.position?.row === l && s.position?.column === i), y = !e && !r;
|
|
40
|
+
return /* @__PURE__ */ v("div", { "data-testid": "block-view-container", className: o.grid, children: [
|
|
41
|
+
!b && /* @__PURE__ */ t(C, { level: 1, bold: !0, className: o.black, children: N }),
|
|
42
42
|
/* @__PURE__ */ t(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
|
+
"data-testid": "block-view-layout",
|
|
45
46
|
className: y ? o.emptyLayout : o.blockLayout,
|
|
46
|
-
style: { width: `${
|
|
47
|
-
children: y ? /* @__PURE__ */ t(P, { emptyViewTitle: x }) : /* @__PURE__ */ t(
|
|
48
|
-
const c = r * i +
|
|
47
|
+
style: { width: `${m}rem`, height: `${m}rem` },
|
|
48
|
+
children: y ? /* @__PURE__ */ t(P, { emptyViewTitle: x }) : /* @__PURE__ */ t(h, { children: Array.from({ length: e }).map((l, i) => /* @__PURE__ */ t("div", { "data-testid": "block-view-row", className: o.blockRow, children: Array.from({ length: r }).map((s, n) => {
|
|
49
|
+
const c = r * i + n + 1, p = E({ row: i + 1, column: n + 1 });
|
|
49
50
|
return /* @__PURE__ */ t(
|
|
50
51
|
"div",
|
|
51
52
|
{
|
|
52
53
|
"data-testid": "block-view-block",
|
|
53
54
|
className: `${o.block} ${u === c ? o.active : ""} ${p ? "" : o.empty} ${f.includes(c) ? o.error : ""}`,
|
|
54
55
|
id: `block${c}`,
|
|
55
|
-
onClick:
|
|
56
|
-
|
|
56
|
+
onClick: g ? () => {
|
|
57
|
+
_(c), T({ row: i + 1, column: n + 1 });
|
|
57
58
|
} : void 0,
|
|
58
|
-
children:
|
|
59
|
+
children: w && p && /* @__PURE__ */ t(
|
|
59
60
|
"div",
|
|
60
61
|
{
|
|
62
|
+
"data-testid": "block-view-block-number",
|
|
61
63
|
className: `${o.blockText} ${u === c ? o.black : ""}`,
|
|
62
64
|
children: c
|
|
63
65
|
}
|
|
@@ -68,13 +70,13 @@ import '../../assets/BlockView.css';const M = "_grid_17o13_1", V = "_black_17o13
|
|
|
68
70
|
}) }, i)) })
|
|
69
71
|
}
|
|
70
72
|
),
|
|
71
|
-
!
|
|
73
|
+
!b && /* @__PURE__ */ v(R, { themeColor: "primary", level: 6, children: [
|
|
72
74
|
L,
|
|
73
75
|
" ",
|
|
74
|
-
|
|
76
|
+
$
|
|
75
77
|
] })
|
|
76
78
|
] });
|
|
77
|
-
}, P = ({ emptyViewTitle: e }) => e ? /* @__PURE__ */ t(B, { bold: !0, children: e }) : /* @__PURE__ */ t(
|
|
79
|
+
}, P = ({ emptyViewTitle: e }) => e ? /* @__PURE__ */ t(B, { bold: !0, children: e }) : /* @__PURE__ */ t(h, {});
|
|
78
80
|
export {
|
|
79
81
|
Y as BlockView
|
|
80
82
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { M as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { u as
|
|
6
|
-
import '../../assets/ContextMenu.css';const
|
|
7
|
-
menu:
|
|
8
|
-
icon:
|
|
9
|
-
listItem:
|
|
10
|
-
},
|
|
2
|
+
import { I as f } from "../../index.es-0lQcz8m1.js";
|
|
3
|
+
import { M as d, L as _, a as p } from "../../index.es-d5xhUpJZ.js";
|
|
4
|
+
import { useState as I, useCallback as a, useEffect as v } from "react";
|
|
5
|
+
import { u as C } from "../../uniqueId-NU3-C36A.js";
|
|
6
|
+
import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91v_5", M = "_listItem_ol91v_9", l = {
|
|
7
|
+
menu: k,
|
|
8
|
+
icon: y,
|
|
9
|
+
listItem: M
|
|
10
|
+
}, N = ({
|
|
11
11
|
triggerOpen: s = null,
|
|
12
|
-
actions:
|
|
13
|
-
iconOrientation:
|
|
12
|
+
actions: c,
|
|
13
|
+
iconOrientation: m = "vertical"
|
|
14
14
|
}) => {
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
|
|
15
|
+
const [e, t] = I(!1), r = a(() => {
|
|
16
|
+
t(!e);
|
|
17
|
+
}, [e]), i = a(() => {
|
|
18
|
+
t(!1);
|
|
19
19
|
}, []);
|
|
20
|
-
return
|
|
21
|
-
|
|
20
|
+
return v(() => {
|
|
21
|
+
t(s !== null ? s : !1);
|
|
22
22
|
}, [s]), /* @__PURE__ */ n(
|
|
23
|
-
|
|
23
|
+
d,
|
|
24
24
|
{
|
|
25
25
|
className: l.menu,
|
|
26
26
|
"data-testid": "selection-menu",
|
|
27
|
-
open:
|
|
27
|
+
open: e,
|
|
28
28
|
surfaceOnly: !0,
|
|
29
29
|
hoistToBody: !0,
|
|
30
30
|
onClose: i,
|
|
31
31
|
trigger: /* @__PURE__ */ n(
|
|
32
|
-
|
|
32
|
+
f,
|
|
33
33
|
{
|
|
34
34
|
className: l.icon,
|
|
35
|
-
variant:
|
|
35
|
+
variant: e ? "filled-primary" : void 0,
|
|
36
36
|
"data-testid": "open-button",
|
|
37
|
-
icon:
|
|
37
|
+
icon: m === "vertical" ? "more_vert" : "more_horiz",
|
|
38
38
|
onClick: r
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
|
-
children: /* @__PURE__ */ n(
|
|
42
|
-
|
|
41
|
+
children: /* @__PURE__ */ n(_, { children: c.map((o, u) => /* @__PURE__ */ n(
|
|
42
|
+
p,
|
|
43
43
|
{
|
|
44
44
|
className: l.listItem,
|
|
45
|
-
...
|
|
45
|
+
...o,
|
|
46
46
|
leadingBlockType: "icon",
|
|
47
|
-
"data-testid": `list-item-button-${
|
|
47
|
+
"data-testid": `list-item-button-${u}`,
|
|
48
48
|
onClick: () => {
|
|
49
|
-
|
|
49
|
+
o?.onClick?.(), o.closeOnClick !== !1 && i();
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
C(`LI_${o.primaryText?.toString()}_`)
|
|
53
53
|
)) })
|
|
54
54
|
},
|
|
55
55
|
"selectionmenu"
|
|
56
56
|
);
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
N as ContextMenu
|
|
60
60
|
};
|
|
@@ -16,7 +16,7 @@ k("ContextMenu Test", () => {
|
|
|
16
16
|
B(/* @__PURE__ */ r(p, { actions: g, triggerOpen: !0 }));
|
|
17
17
|
const c = t.getByTestId("open-button"), n = t.getByTestId("selection-menu");
|
|
18
18
|
e(n).toBeInTheDocument(), e(n).not.toHaveClass("mdc-menu-surface--open"), o.click(c), await s(() => e(n).toHaveClass("mdc-menu-surface--animating-open")), e(t.getByText("Open")).toBeInTheDocument(), e(t.getByText("Delete")).toBeInTheDocument(), e(t.getByText("Edit")).toBeInTheDocument();
|
|
19
|
-
const m = t.getByTestId("list-item-button-
|
|
19
|
+
const m = t.getByTestId("list-item-button-0"), u = t.getByTestId("list-item-button-1"), d = t.getByTestId("list-item-button-2");
|
|
20
20
|
e(m).toBeInTheDocument(), e(u).toBeInTheDocument(), e(d).toBeInTheDocument(), o.click(m), e(C).toHaveBeenCalled(), e(i).not.toHaveBeenCalled(), e(a).not.toHaveBeenCalled(), o.click(u), e(i).toHaveBeenCalled(), o.click(d), e(a).toHaveBeenCalled();
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { G as n } from "../../index.es-DntoATwO.js";
|
|
3
|
-
import { I as
|
|
4
|
-
import { d as
|
|
5
|
-
import '../../assets/Disclaimer.css';const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7",
|
|
3
|
+
import { I as t } from "../../index.es-3043KTnb.js";
|
|
4
|
+
import { d as m, b as d } from "../../index.es-CF_xy2ns.js";
|
|
5
|
+
import '../../assets/Disclaimer.css';const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7", a = {
|
|
6
6
|
disclaimer: p,
|
|
7
7
|
iconArea: y
|
|
8
|
-
}, g = ({ text:
|
|
8
|
+
}, g = ({ text: c, subtext: i, icon: e, level: o = 2, bold: s = !1 }) => /* @__PURE__ */ l(
|
|
9
9
|
n,
|
|
10
10
|
{
|
|
11
|
+
"data-testid": "disclaimer",
|
|
11
12
|
direction: e || i ? "vertical" : "horizontal",
|
|
12
13
|
secondaryAlign: "center",
|
|
13
14
|
primaryAlign: "center",
|
|
14
15
|
children: [
|
|
15
|
-
/* @__PURE__ */ r(
|
|
16
|
+
/* @__PURE__ */ r(m, { className: a.disclaimer, level: o, bold: s, children: c }),
|
|
16
17
|
i && /* @__PURE__ */ r(d, { level: 2, children: i }),
|
|
17
|
-
e && /* @__PURE__ */ r("div", { className:
|
|
18
|
+
e && /* @__PURE__ */ r("div", { className: a.iconArea, children: /* @__PURE__ */ r(t, { className: a.Icon, icon: e, iconSize: "large" }) })
|
|
18
19
|
]
|
|
19
20
|
}
|
|
20
21
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m, jsxs as $ } from "react/jsx-runtime";
|
|
2
2
|
import { G as _ } from "../../index.es-DntoATwO.js";
|
|
3
3
|
import { c as P, _ as C, P as e } from "../../identity-DLWZln-X.js";
|
|
4
|
-
import c, { forwardRef as T, useRef as
|
|
4
|
+
import c, { forwardRef as T, useRef as w, useImperativeHandle as H, useMemo as y } from "react";
|
|
5
5
|
import { e as N, b as O } from "../../index.es-CF_xy2ns.js";
|
|
6
6
|
import { I as B } from "../../index.es-3043KTnb.js";
|
|
7
7
|
const j = {
|
|
@@ -157,55 +157,55 @@ const j = {
|
|
|
157
157
|
className: void 0,
|
|
158
158
|
overlayThemeColor: "dark",
|
|
159
159
|
position: "full"
|
|
160
|
-
}, f = /* @__PURE__ */ T((
|
|
160
|
+
}, f = /* @__PURE__ */ T((r, o) => {
|
|
161
161
|
const {
|
|
162
|
-
children:
|
|
163
|
-
className:
|
|
162
|
+
children: a,
|
|
163
|
+
className: l,
|
|
164
164
|
position: n,
|
|
165
|
-
overlayThemeColor:
|
|
165
|
+
overlayThemeColor: t,
|
|
166
166
|
...i
|
|
167
|
-
} =
|
|
168
|
-
|
|
169
|
-
const d = y(() => n !== "none" && P("lmnt", "lmnt-hero-overlay ", !
|
|
167
|
+
} = r, s = w();
|
|
168
|
+
H(o, () => s.current, []);
|
|
169
|
+
const d = y(() => n !== "none" && P("lmnt", "lmnt-hero-overlay ", !t.includes("gradient") && t !== "surface" && `lmnt-hero-overlay__${t}`, t.includes("gradient") && t !== "surface" && `lmnt-theme--bg-${t}`, t === "surface" && "lmnt-theme-surface-bg", `lmnt-hero-overlay__${n}`, l), [t, n, l]);
|
|
170
170
|
return /* @__PURE__ */ c.createElement("div", C({
|
|
171
171
|
className: d
|
|
172
|
-
}, i),
|
|
172
|
+
}, i), a && a);
|
|
173
173
|
});
|
|
174
174
|
f.displayName = "HeroOverlay";
|
|
175
175
|
f.propTypes = R;
|
|
176
176
|
f.defaultProps = U;
|
|
177
|
-
const v = /* @__PURE__ */ T((
|
|
177
|
+
const v = /* @__PURE__ */ T((r, o) => {
|
|
178
178
|
const {
|
|
179
|
-
alignment:
|
|
180
|
-
children:
|
|
179
|
+
alignment: a,
|
|
180
|
+
children: l,
|
|
181
181
|
className: n,
|
|
182
|
-
imageUrl:
|
|
182
|
+
imageUrl: t,
|
|
183
183
|
style: i,
|
|
184
184
|
themeColor: s,
|
|
185
185
|
overlay: d,
|
|
186
186
|
overlayProps: g,
|
|
187
187
|
...u
|
|
188
|
-
} =
|
|
189
|
-
|
|
190
|
-
const k = y(() => P("lmnt lmnt-hero", s && `lmnt-theme-${s}-bg`, `lmnt-hero__align-${
|
|
188
|
+
} = r, p = w();
|
|
189
|
+
H(o, () => p.current, []);
|
|
190
|
+
const k = y(() => P("lmnt lmnt-hero", s && `lmnt-theme-${s}-bg`, `lmnt-hero__align-${a}`, n), [a, n, s]), h = y(() => t ? {
|
|
191
191
|
...i,
|
|
192
|
-
backgroundImage: `url(${
|
|
193
|
-
} : i, [
|
|
192
|
+
backgroundImage: `url(${t})`
|
|
193
|
+
} : i, [t, i]);
|
|
194
194
|
return /* @__PURE__ */ c.createElement("div", C({
|
|
195
195
|
ref: p,
|
|
196
196
|
className: k,
|
|
197
197
|
style: h
|
|
198
|
-
}, u), d && /* @__PURE__ */ c.createElement(f, g),
|
|
198
|
+
}, u), d && /* @__PURE__ */ c.createElement(f, g), l);
|
|
199
199
|
});
|
|
200
200
|
v.displayName = "Hero";
|
|
201
201
|
v.propTypes = j;
|
|
202
202
|
v.defaultProps = A;
|
|
203
|
-
const b = /* @__PURE__ */ T((
|
|
203
|
+
const b = /* @__PURE__ */ T((r, o) => {
|
|
204
204
|
const {
|
|
205
|
-
children:
|
|
206
|
-
className:
|
|
205
|
+
children: a,
|
|
206
|
+
className: l,
|
|
207
207
|
heroBtn: n,
|
|
208
|
-
logo:
|
|
208
|
+
logo: t,
|
|
209
209
|
overline: i,
|
|
210
210
|
padding: s,
|
|
211
211
|
title: d,
|
|
@@ -213,8 +213,8 @@ const b = /* @__PURE__ */ T((t, o) => {
|
|
|
213
213
|
subtitle: u,
|
|
214
214
|
textColor: p,
|
|
215
215
|
...k
|
|
216
|
-
} =
|
|
217
|
-
|
|
216
|
+
} = r, h = w(), E = y(() => P("lmnt lmnt-hero-content", `lmnt-theme-${p}`, l), [l, p]);
|
|
217
|
+
H(o, () => h.current, []);
|
|
218
218
|
const x = y(() => ({
|
|
219
219
|
...g,
|
|
220
220
|
padding: s
|
|
@@ -224,11 +224,11 @@ const b = /* @__PURE__ */ T((t, o) => {
|
|
|
224
224
|
className: E
|
|
225
225
|
}, k, {
|
|
226
226
|
style: x
|
|
227
|
-
}),
|
|
227
|
+
}), a || /* @__PURE__ */ c.createElement(_, {
|
|
228
228
|
gap: "dense",
|
|
229
229
|
direction: "vertical",
|
|
230
230
|
secondaryAlign: "center"
|
|
231
|
-
},
|
|
231
|
+
}, t && t, i && /* @__PURE__ */ c.createElement(N, {
|
|
232
232
|
type: "overline"
|
|
233
233
|
}, i), d && /* @__PURE__ */ c.createElement(N, {
|
|
234
234
|
type: "display2"
|
|
@@ -240,10 +240,10 @@ b.displayName = "HeroContent";
|
|
|
240
240
|
b.propTypes = I;
|
|
241
241
|
b.defaultProps = D;
|
|
242
242
|
const F = ({
|
|
243
|
-
title:
|
|
243
|
+
title: r = "",
|
|
244
244
|
subtitle: o = "",
|
|
245
|
-
icon:
|
|
246
|
-
text:
|
|
245
|
+
icon: a = "dashbord",
|
|
246
|
+
text: l = "",
|
|
247
247
|
action: n
|
|
248
248
|
}) => /* @__PURE__ */ m(
|
|
249
249
|
v,
|
|
@@ -254,18 +254,28 @@ const F = ({
|
|
|
254
254
|
children: /* @__PURE__ */ m(
|
|
255
255
|
b,
|
|
256
256
|
{
|
|
257
|
-
|
|
257
|
+
"data-testid": "empty-view-content",
|
|
258
|
+
logo: /* @__PURE__ */ m(B, { iconSize: "large", icon: a }),
|
|
258
259
|
overline: "",
|
|
259
260
|
subtitle: o,
|
|
260
|
-
title:
|
|
261
|
-
heroBtn: /* @__PURE__ */ m(G, { action: n, text:
|
|
261
|
+
title: r,
|
|
262
|
+
heroBtn: /* @__PURE__ */ m(G, { action: n, text: l })
|
|
262
263
|
}
|
|
263
264
|
)
|
|
264
265
|
}
|
|
265
|
-
), G = ({ action:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
), G = ({ action: r, text: o }) => o ? r ? /* @__PURE__ */ $(
|
|
267
|
+
_,
|
|
268
|
+
{
|
|
269
|
+
"data-testid": "empty-view-with-action",
|
|
270
|
+
direction: "vertical",
|
|
271
|
+
primaryAlign: "center",
|
|
272
|
+
secondaryAlign: "center",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ m(O, { level: 2, children: o }),
|
|
275
|
+
r
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
) : /* @__PURE__ */ m(O, { level: 2, children: o }) : r;
|
|
269
279
|
export {
|
|
270
280
|
F as EmptyView
|
|
271
281
|
};
|
|
@@ -12,6 +12,7 @@ type FilterProps = {
|
|
|
12
12
|
filters: FilterData[];
|
|
13
13
|
useModal?: boolean;
|
|
14
14
|
selectAllLabel?: string;
|
|
15
|
+
'data-testid'?: string;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* Filter component that allows the user to filter the data provided
|
|
@@ -28,5 +29,5 @@ type FilterProps = {
|
|
|
28
29
|
* if false the filters will be displayed directly in the page, be aware that the filters will be displayed in a row and there needs to be enough space for them
|
|
29
30
|
* @returns
|
|
30
31
|
*/
|
|
31
|
-
export declare const Filter: ({ clearFilterText, closeCallback, currentFilter, filterButtonAsIcon, filterButtonText, filterModalTitle, filters, modalCancelButtonText, modalConfirmButtonText, useModal, selectAllLabel, }: FilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const Filter: ({ clearFilterText, closeCallback, currentFilter, filterButtonAsIcon, filterButtonText, filterModalTitle, filters, modalCancelButtonText, modalConfirmButtonText, useModal, selectAllLabel, "data-testid": dataTestId, }: FilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
export {};
|