@hortiview/shared-components 0.0.11176 → 0.0.11587
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/README.md +58 -8
- package/dist/BigLoadingSpinner-iegTbDcD.js +16 -0
- package/dist/GenericCard-6J558OgP.js +350 -0
- package/dist/ListAreaService-DOwtdRa4.js +109 -0
- package/dist/_MapCache-B75yWNNd.js +376 -0
- package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
- package/dist/_getTag-BCf9b56Z.js +81 -0
- package/dist/animationframe-EMBh6XeO.js +54 -0
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/Select.css +1 -0
- package/dist/component-DsB0poTj.js +571 -0
- package/dist/component-neHBNHRu.js +114 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
- package/dist/components/AlertBanner/AlertBanner.js +15 -15
- package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +27 -28
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
- package/dist/components/BasicHeading/BasicHeading.js +17 -17
- package/dist/components/BasicHeading/BasicHeading.test.js +10 -10
- package/dist/components/BlockView/BlockView.d.ts +1 -0
- package/dist/components/BlockView/BlockView.js +24 -25
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +1765 -15
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
- package/dist/components/ContextMenu/ContextMenu.js +28 -28
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
- package/dist/components/DeleteModal/DeleteModal.js +53 -51
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +12 -11
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.d.ts +1 -0
- package/dist/components/EmptyView/EmptyView.js +258 -19
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.d.ts +1 -0
- package/dist/components/Filter/Filter.js +81 -77
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5975 -6389
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +13 -14
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +2 -2
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
- package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
- package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +28 -28
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -0
- package/dist/components/GenericTable/GenericTable.js +10487 -76
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
- package/dist/components/GenericTable/GenericTableService.js +41 -41
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.d.ts +6 -1
- package/dist/components/HashTabView/HashTabView.js +1805 -72
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +14 -14
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +19 -17
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.d.ts +2 -3
- package/dist/components/Iconify/Iconify.js +44 -45
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
- package/dist/components/InfoGroup/InfoGroup.js +30 -29
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +29 -27
- package/dist/components/ListArea/ListArea.test.js +5 -5
- package/dist/components/ListArea/ListAreaService.d.ts +9 -8
- package/dist/components/ListArea/ListAreaService.js +7 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -38
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Modal/Modal.js +926 -10
- package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
- package/dist/components/ModulePadding/ModulePadding.js +28 -0
- package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
- package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +13 -14
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
- package/dist/components/Scrollbar/Scrollbar.js +5 -6
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +11 -11
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/Select.js +34 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +28 -0
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/floating-ui.dom-CeD8zknG.js +978 -0
- package/dist/get-7ACccM2X.js +114 -0
- package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +1 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-DLWZln-X.js +1763 -0
- package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
- package/dist/index.es-0lQcz8m1.js +444 -0
- package/dist/index.es-25EARqhH.js +2027 -0
- package/dist/index.es-3043KTnb.js +1066 -0
- package/dist/index.es-41ztjcFT.js +724 -0
- package/dist/index.es-6TJ1S8Jr.js +954 -0
- package/dist/index.es-8GOVkuo-.js +374 -0
- package/dist/index.es-B-_jXDuz.js +216 -0
- package/dist/index.es-BWgXLqXn.js +102 -0
- package/dist/index.es-BtjV0oNv.js +360 -0
- package/dist/index.es-BvrQnJ3j.js +509 -0
- package/dist/index.es-CF_xy2ns.js +674 -0
- package/dist/index.es-CL_Heu1n.js +54 -0
- package/dist/index.es-CiqbARoC.js +306 -0
- package/dist/index.es-D-CKRzIB.js +63 -0
- package/dist/index.es-D6N-XWHe.js +56 -0
- package/dist/index.es-DKDgy7Kt.js +45 -0
- package/dist/index.es-DntoATwO.js +159 -0
- package/dist/index.es-UHKFl8Da.js +7075 -0
- package/dist/index.es-d5xhUpJZ.js +3242 -0
- package/dist/index.es-da0cf7oE.js +569 -0
- package/dist/index.es-h2lMdt7G.js +107 -0
- package/dist/index.es-zr101OF5.js +4853 -0
- package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
- package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/isEmpty-B4GG2s-V.js +31 -0
- package/dist/isPlainObject-C273y67K.js +40 -0
- package/dist/isString-BW9UHONv.js +21 -0
- package/dist/keyboard-Bpt0aBqQ.js +107 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +58 -54
- package/dist/orderBy-Bd48bw88.js +316 -0
- package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
- package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
- package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
- package/dist/services/BlockService.d.ts +1 -0
- package/dist/services/NumberService.d.ts +1 -0
- package/dist/services/UtilService.d.ts +1 -0
- package/dist/services/UtilService.js +2 -2
- package/dist/services/services.test.js +1 -1
- package/dist/toString-CrgB_7Pe.js +54 -0
- package/dist/tslib.es6-BDCynO9F.js +162 -0
- package/dist/types/GenericTable.d.ts +2 -2
- package/dist/types/HashTab.d.ts +0 -1
- package/dist/types/ListElement.d.ts +0 -1
- package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
- package/dist/uniqueId-NU3-C36A.js +18 -0
- package/dist/util-DA21pZXj.js +78 -0
- package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
- package/package.json +15 -15
- package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
- package/dist/GenericCard-B8x1DMa8.js +0 -81
- package/dist/ListAreaService-CRX4eEUJ.js +0 -108
- package/dist/_Map-Dtlps7IZ.js +0 -113
- package/dist/_overArg-_0pUmCsX.js +0 -14
- package/dist/get-P-5PYZOE.js +0 -426
- package/dist/isEmpty-BimaZd5G.js +0 -225
- package/dist/isString-BOHPtrlm.js +0 -44
- package/dist/orderBy-BVQIswlJ.js +0 -765
- package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { u as
|
|
5
|
-
const d = "_messageContainer_1seos_1", p = "_info_1seos_9",
|
|
1
|
+
import { jsx as s, Fragment as c, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { G as _ } from "../../index.es-DntoATwO.js";
|
|
3
|
+
import { b as g } from "../../index.es-CF_xy2ns.js";
|
|
4
|
+
import { u as l } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
5
|
+
import '../../assets/AlertBanner.css';const d = "_messageContainer_1seos_1", p = "_info_1seos_9", f = "_danger_1seos_14", u = "_success_1seos_19", y = "_warning_1seos_24", n = {
|
|
6
6
|
messageContainer: d,
|
|
7
7
|
info: p,
|
|
8
|
-
danger:
|
|
9
|
-
success:
|
|
8
|
+
danger: f,
|
|
9
|
+
success: u,
|
|
10
10
|
warning: y
|
|
11
|
-
},
|
|
12
|
-
text:
|
|
11
|
+
}, b = ({
|
|
12
|
+
text: e,
|
|
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 } = l();
|
|
19
|
+
return o ? /* @__PURE__ */ s("div", { className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */ m(
|
|
20
|
+
_,
|
|
21
21
|
{
|
|
22
22
|
direction: a ? "horizontal" : "vertical",
|
|
23
23
|
primaryAlign: "space-between",
|
|
24
24
|
secondaryAlign: "center",
|
|
25
25
|
children: [
|
|
26
|
-
typeof
|
|
26
|
+
typeof e == "string" ? /* @__PURE__ */ s(g, { bold: t, level: 2, children: e }) : /* @__PURE__ */ s("div", { children: e }),
|
|
27
27
|
i
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
|
-
) }) : /* @__PURE__ */
|
|
30
|
+
) }) : /* @__PURE__ */ s(c, {});
|
|
31
31
|
};
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
b as AlertBanner
|
|
34
34
|
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { a as t, s } from "../../react.esm-
|
|
3
|
-
import { a
|
|
2
|
+
import { a as t, s } from "../../react.esm-DNwojocF.js";
|
|
3
|
+
import { a } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
4
|
import { AlertBanner as n } from "./AlertBanner.js";
|
|
5
|
-
import { d as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { d as p, b as c, v as l, t as r, g as o } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
6
|
+
p("AlertBanner Test", () => {
|
|
7
|
+
c(() => {
|
|
8
|
+
l.spyOn(a, "useBreakpoints").mockReturnValue({
|
|
9
9
|
isMobile: !1,
|
|
10
10
|
isTablet: !1,
|
|
11
|
-
isDesktop: !0
|
|
11
|
+
isDesktop: !0,
|
|
12
|
+
isDesktopNavbar: !0
|
|
12
13
|
});
|
|
13
14
|
}), r("render AlertBanner with text", () => {
|
|
14
15
|
t(/* @__PURE__ */ e(n, { text: "Test" })), o(s.getByText("Test")).toBeInTheDocument();
|
|
15
16
|
}), r("render AlertBanner with element", () => {
|
|
16
17
|
t(/* @__PURE__ */ e(n, { text: /* @__PURE__ */ e(m, { children: "Element" }) })), o(s.getByText("Element")).toBeInTheDocument();
|
|
17
18
|
}), r("renders AlertBanner with vertical style (flex-direction: column) when screen is small", () => {
|
|
18
|
-
|
|
19
|
+
l.spyOn(a, "useBreakpoints").mockReturnValue({
|
|
19
20
|
isMobile: !0,
|
|
20
21
|
isTablet: !1,
|
|
21
|
-
isDesktop: !1
|
|
22
|
+
isDesktop: !1,
|
|
23
|
+
isDesktopNavbar: !1
|
|
22
24
|
}), t(/* @__PURE__ */ e(n, { text: "Test" }));
|
|
23
25
|
const i = s.getByText("Test").closest(".lmnt.lmnt-group");
|
|
24
26
|
o(i).toHaveStyle(
|
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import { Group as o } from "@element/react-components";
|
|
1
|
+
import { jsx as e, Fragment as x, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { G as r } from "../../index.es-DntoATwO.js";
|
|
4
3
|
import { useMemo as d } from "react";
|
|
5
4
|
import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
|
|
6
5
|
import { EmptyView as W } from "../EmptyView/EmptyView.js";
|
|
7
6
|
import { ListArea as B } from "../ListArea/ListArea.js";
|
|
8
7
|
import { VerticalDivider as N } from "../VerticalDivider/VerticalDivider.js";
|
|
9
8
|
import { u as A } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
10
|
-
const V = "_divider_dw2rc_1", j = "_maxWidth_dw2rc_5", E = "_desktopList_dw2rc_9",
|
|
9
|
+
import '../../assets/BaseView.css';const V = "_divider_dw2rc_1", j = "_maxWidth_dw2rc_5", E = "_desktopList_dw2rc_9", G = "_mobileList_dw2rc_13", H = "_desktopDetail_dw2rc_17", I = "_mobileDetail_dw2rc_21", o = {
|
|
11
10
|
divider: V,
|
|
12
11
|
maxWidth: j,
|
|
13
12
|
desktopList: E,
|
|
14
|
-
mobileList:
|
|
15
|
-
desktopDetail:
|
|
16
|
-
mobileDetail:
|
|
17
|
-
},
|
|
13
|
+
mobileList: G,
|
|
14
|
+
desktopDetail: H,
|
|
15
|
+
mobileDetail: I
|
|
16
|
+
}, P = ({
|
|
18
17
|
action: l,
|
|
19
18
|
heading: c,
|
|
20
|
-
elements:
|
|
19
|
+
elements: a,
|
|
21
20
|
emptyText: m,
|
|
22
21
|
hasSearch: p = !0,
|
|
23
22
|
isSorted: h = !0,
|
|
24
23
|
className: _,
|
|
25
|
-
withAvatar:
|
|
26
|
-
listMaxHeight:
|
|
27
|
-
pathname:
|
|
24
|
+
withAvatar: v = !1,
|
|
25
|
+
listMaxHeight: f = "calc(100vh - 200px)",
|
|
26
|
+
pathname: n,
|
|
28
27
|
routerLinkElement: w,
|
|
29
28
|
searchPlaceholder: b
|
|
30
29
|
}) => {
|
|
31
|
-
const { isDesktopNavbar:
|
|
32
|
-
return /* @__PURE__ */ s(
|
|
33
|
-
g && /* @__PURE__ */
|
|
34
|
-
c && /* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
30
|
+
const { isDesktopNavbar: i } = A(), t = d(() => a.find((L) => L.route === n), [n, a]), D = d(() => t?.component ?? (i ? /* @__PURE__ */ e(W, { subtitle: m }) : /* @__PURE__ */ e(x, {})), [t, i, m]), g = d(() => i ? !0 : !t, [t, i]), k = d(() => i ? !0 : t, [t, i]);
|
|
31
|
+
return /* @__PURE__ */ s(r, { "data-testid": "base-view-container", className: _ ?? "", gap: "", fullWidth: !0, children: [
|
|
32
|
+
g && /* @__PURE__ */ e(r, { gap: "none", className: i ? o.desktopList : o.mobileList, children: /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, gap: i ? "standard" : "dense", children: [
|
|
33
|
+
c && /* @__PURE__ */ e(u, { "data-testid": "heading", heading: c, level: 4, marginBottom: 0, children: l }),
|
|
34
|
+
/* @__PURE__ */ e(
|
|
36
35
|
B,
|
|
37
36
|
{
|
|
38
|
-
elements:
|
|
37
|
+
elements: a,
|
|
39
38
|
hasSearch: p,
|
|
40
|
-
maxHeight:
|
|
39
|
+
maxHeight: f,
|
|
41
40
|
isSorted: h,
|
|
42
|
-
pathname:
|
|
41
|
+
pathname: n,
|
|
43
42
|
routerLinkElement: w,
|
|
44
43
|
searchPlaceholder: b
|
|
45
44
|
}
|
|
46
45
|
)
|
|
47
46
|
] }) }),
|
|
48
47
|
k && /* @__PURE__ */ s(
|
|
49
|
-
|
|
48
|
+
r,
|
|
50
49
|
{
|
|
51
50
|
"data-testid": "details",
|
|
52
51
|
gap: "none",
|
|
53
|
-
className:
|
|
52
|
+
className: i ? o.desktopDetail : o.mobileDetail,
|
|
54
53
|
children: [
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ s(
|
|
57
|
-
/* @__PURE__ */
|
|
54
|
+
i && /* @__PURE__ */ e(N, { className: o.divider, height: "100%" }),
|
|
55
|
+
/* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, children: [
|
|
56
|
+
/* @__PURE__ */ e(
|
|
58
57
|
u,
|
|
59
58
|
{
|
|
60
|
-
className:
|
|
59
|
+
className: o.maxWidth,
|
|
61
60
|
heading: t?.detailTitle ?? t?.title ?? "",
|
|
62
61
|
level: 4,
|
|
63
62
|
icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
|
|
64
63
|
marginBottom: 0,
|
|
65
64
|
invisibleButton: t?.detailAction === void 0,
|
|
66
|
-
withAvatar:
|
|
65
|
+
withAvatar: v,
|
|
67
66
|
children: t?.detailAction ?? l
|
|
68
67
|
}
|
|
69
68
|
),
|
|
@@ -75,5 +74,5 @@ const V = "_divider_dw2rc_1", j = "_maxWidth_dw2rc_5", E = "_desktopList_dw2rc_9
|
|
|
75
74
|
] });
|
|
76
75
|
};
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
P as BaseView
|
|
79
78
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as r, s as e, f as p } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { a as l } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
|
-
import { BaseView as
|
|
5
|
-
import { d as u, b as
|
|
4
|
+
import { BaseView as i } from "./BaseView.js";
|
|
5
|
+
import { d as u, b as m, v as c, t as n, g as t } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
6
6
|
u("BaseView Test", () => {
|
|
7
|
-
|
|
7
|
+
m(() => {
|
|
8
8
|
c.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
9
9
|
isMobile: !1,
|
|
10
10
|
isTablet: !1,
|
|
@@ -12,7 +12,7 @@ u("BaseView Test", () => {
|
|
|
12
12
|
isDesktopNavbar: !0
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
|
-
const
|
|
15
|
+
const o = [
|
|
16
16
|
{
|
|
17
17
|
id: "1",
|
|
18
18
|
title: "user.personal_information",
|
|
@@ -37,13 +37,13 @@ u("BaseView Test", () => {
|
|
|
37
37
|
component: /* @__PURE__ */ a(s, { children: "Security selected" })
|
|
38
38
|
}
|
|
39
39
|
];
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
n("render BaseView with empty view and navigation list", () => {
|
|
41
|
+
r(
|
|
42
42
|
/* @__PURE__ */ a(
|
|
43
|
-
|
|
43
|
+
i,
|
|
44
44
|
{
|
|
45
45
|
pathname: "/personal-profile",
|
|
46
|
-
elements:
|
|
46
|
+
elements: o,
|
|
47
47
|
heading: "user.personal-profile",
|
|
48
48
|
hasSearch: !1,
|
|
49
49
|
emptyText: "user.noselection",
|
|
@@ -52,13 +52,13 @@ u("BaseView Test", () => {
|
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
), t(e.getByText("user.noselection")).toBeInTheDocument(), t(e.getByText("user.personal-profile")).toBeInTheDocument(), t(e.getByText("user.personal_information")).toBeInTheDocument(), t(e.getByText("user.data_privacy")).toBeInTheDocument(), t(e.getByText("user.security")).toBeInTheDocument();
|
|
55
|
-
}),
|
|
56
|
-
|
|
55
|
+
}), n("render BaseView with data and navigation list", () => {
|
|
56
|
+
r(
|
|
57
57
|
/* @__PURE__ */ a(
|
|
58
|
-
|
|
58
|
+
i,
|
|
59
59
|
{
|
|
60
60
|
pathname: "/personal-profile/personal-information",
|
|
61
|
-
elements:
|
|
61
|
+
elements: o,
|
|
62
62
|
heading: "user.personal-profile",
|
|
63
63
|
hasSearch: !1,
|
|
64
64
|
emptyText: "user.noselection",
|
|
@@ -67,13 +67,13 @@ u("BaseView Test", () => {
|
|
|
67
67
|
}
|
|
68
68
|
)
|
|
69
69
|
), t(e.getByText("Personal information selected")).toBeInTheDocument(), t(e.getAllByText("account_circle")).toHaveLength(2), t(e.getAllByText("user.personal_information")).toHaveLength(2);
|
|
70
|
-
}),
|
|
71
|
-
|
|
70
|
+
}), n("render BaseView with custom detail title and no detail icon", () => {
|
|
71
|
+
r(
|
|
72
72
|
/* @__PURE__ */ a(
|
|
73
|
-
|
|
73
|
+
i,
|
|
74
74
|
{
|
|
75
75
|
pathname: "/personal-profile/data-privacy",
|
|
76
|
-
elements:
|
|
76
|
+
elements: o,
|
|
77
77
|
heading: "user.personal-profile",
|
|
78
78
|
hasSearch: !1,
|
|
79
79
|
emptyText: "user.noselection",
|
|
@@ -82,18 +82,18 @@ u("BaseView Test", () => {
|
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
), t(e.getByText("Data Privacy selected")).toBeInTheDocument(), t(e.getByText("Data Privacy 2000")).toBeInTheDocument(), t(e.getAllByText("privacy_tip")).toHaveLength(1), t(e.getAllByText("user.data_privacy")).toHaveLength(1);
|
|
85
|
-
}),
|
|
85
|
+
}), n("hide empty view when screen is small", () => {
|
|
86
86
|
c.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
87
87
|
isMobile: !0,
|
|
88
88
|
isTablet: !1,
|
|
89
89
|
isDesktop: !1,
|
|
90
90
|
isDesktopNavbar: !1
|
|
91
|
-
}),
|
|
91
|
+
}), r(
|
|
92
92
|
/* @__PURE__ */ a(
|
|
93
|
-
|
|
93
|
+
i,
|
|
94
94
|
{
|
|
95
95
|
pathname: "/personal-profile/data-privacy",
|
|
96
|
-
elements:
|
|
96
|
+
elements: o,
|
|
97
97
|
heading: "user.personal-profile",
|
|
98
98
|
hasSearch: !1,
|
|
99
99
|
emptyText: "user.noselection",
|
|
@@ -102,13 +102,13 @@ u("BaseView Test", () => {
|
|
|
102
102
|
}
|
|
103
103
|
)
|
|
104
104
|
), t(e.queryByText("user.noselection")).not.toBeInTheDocument();
|
|
105
|
-
}),
|
|
106
|
-
|
|
105
|
+
}), n("render BaseView with selected detail section", () => {
|
|
106
|
+
r(
|
|
107
107
|
/* @__PURE__ */ a(
|
|
108
|
-
|
|
108
|
+
i,
|
|
109
109
|
{
|
|
110
110
|
pathname: "/personal-profile/data-privacy",
|
|
111
|
-
elements:
|
|
111
|
+
elements: o,
|
|
112
112
|
heading: "user.personal-profile",
|
|
113
113
|
hasSearch: !1,
|
|
114
114
|
emptyText: "user.noselection",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import "../../assets/BasicHeading.css";
|
|
2
1
|
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
2
|
+
import { I as u } from "../../index.es-3043KTnb.js";
|
|
3
|
+
import { T as y, b as C } from "../../index.es-CF_xy2ns.js";
|
|
4
4
|
import { Iconify as w } from "../Iconify/Iconify.js";
|
|
5
5
|
import { AvailableCustomIcons as j } from "../../enums/AvailableCustomIcons.js";
|
|
6
6
|
import { u as I } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
7
7
|
import { OverflowTooltip as B } from "../OverflowTooltip/OverflowTooltip.js";
|
|
8
|
-
const N = "_pageHeader_gwnjc_1",
|
|
8
|
+
import '../../assets/BasicHeading.css';const N = "_pageHeader_gwnjc_1", b = "_actionButtonContainer_gwnjc_16", H = "_leadingIcon_gwnjc_31", T = "_headingWrapper_gwnjc_35", x = "_headingContainer_gwnjc_40", A = "_invisible_gwnjc_45", W = "_withAvatar_gwnjc_49", $ = "_iconContainer_gwnjc_54", n = {
|
|
9
9
|
pageHeader: N,
|
|
10
|
-
actionButtonContainer:
|
|
11
|
-
leadingIcon:
|
|
12
|
-
headingWrapper:
|
|
13
|
-
headingContainer:
|
|
14
|
-
invisible:
|
|
10
|
+
actionButtonContainer: b,
|
|
11
|
+
leadingIcon: H,
|
|
12
|
+
headingWrapper: T,
|
|
13
|
+
headingContainer: x,
|
|
14
|
+
invisible: A,
|
|
15
15
|
withAvatar: W,
|
|
16
16
|
iconContainer: $
|
|
17
17
|
}, k = ({ icon: e }) => e ? typeof e != "string" ? /* @__PURE__ */ i("div", { className: n.iconContainer, children: e }) : e in j ? /* @__PURE__ */ i(
|
|
@@ -22,10 +22,10 @@ const N = "_pageHeader_gwnjc_1", H = "_actionButtonContainer_gwnjc_16", b = "_le
|
|
|
22
22
|
iconSize: "large",
|
|
23
23
|
iconType: "filled"
|
|
24
24
|
}
|
|
25
|
-
) : /* @__PURE__ */ i(
|
|
25
|
+
) : /* @__PURE__ */ i(u, { iconSize: "large", iconType: "filled", icon: e, className: n.leadingIcon }) : null, R = ({
|
|
26
26
|
children: e,
|
|
27
|
-
marginBottom:
|
|
28
|
-
heading:
|
|
27
|
+
marginBottom: a,
|
|
28
|
+
heading: t,
|
|
29
29
|
icon: d,
|
|
30
30
|
className: p,
|
|
31
31
|
subHeading: r,
|
|
@@ -36,8 +36,8 @@ const N = "_pageHeader_gwnjc_1", H = "_actionButtonContainer_gwnjc_16", b = "_le
|
|
|
36
36
|
withAvatar: _ = !1
|
|
37
37
|
}) => {
|
|
38
38
|
const { isDesktop: l } = I(), f = l ? s : s + 1, h = c === "bold" ? 500 : c, v = () => {
|
|
39
|
-
if (
|
|
40
|
-
return typeof
|
|
39
|
+
if (a !== void 0)
|
|
40
|
+
return typeof a == "number" ? `${a}px` : "2rem";
|
|
41
41
|
};
|
|
42
42
|
return /* @__PURE__ */ o(
|
|
43
43
|
"div",
|
|
@@ -53,17 +53,17 @@ const N = "_pageHeader_gwnjc_1", H = "_actionButtonContainer_gwnjc_16", b = "_le
|
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ i(k, { icon: d }),
|
|
55
55
|
/* @__PURE__ */ o("div", { className: r ? n.headingContainer : "", children: [
|
|
56
|
-
/* @__PURE__ */ i(B, { id:
|
|
57
|
-
|
|
56
|
+
/* @__PURE__ */ i(B, { id: t, text: t, children: /* @__PURE__ */ i(
|
|
57
|
+
y,
|
|
58
58
|
{
|
|
59
59
|
level: f,
|
|
60
60
|
"data-testid": "Header",
|
|
61
61
|
className: p ?? "",
|
|
62
62
|
style: { fontWeight: h },
|
|
63
|
-
children:
|
|
63
|
+
children: t
|
|
64
64
|
}
|
|
65
65
|
) }),
|
|
66
|
-
/* @__PURE__ */ i(
|
|
66
|
+
/* @__PURE__ */ i(C, { level: g, children: r })
|
|
67
67
|
] })
|
|
68
68
|
]
|
|
69
69
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { d as h, t as s, g as e } from "../../vi.CjhMlMwf-
|
|
2
|
+
import { B as g } from "../../index.es-CiqbARoC.js";
|
|
3
|
+
import { a, s as n } from "../../react.esm-DNwojocF.js";
|
|
4
|
+
import { BasicHeading as i } from "./BasicHeading.js";
|
|
5
|
+
import { d as h, t as s, g as e } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
6
6
|
h("BasicHeading-Test", () => {
|
|
7
7
|
s("render small container without content", () => {
|
|
8
|
-
|
|
8
|
+
a(/* @__PURE__ */ o(i, { heading: "Test" }));
|
|
9
9
|
const t = n.getByTestId("HeaderContainer");
|
|
10
10
|
e(t).toBeDefined(), e(t).toHaveClass(/pageHeader/);
|
|
11
11
|
const r = n.getByTestId("Header");
|
|
@@ -13,8 +13,8 @@ h("BasicHeading-Test", () => {
|
|
|
13
13
|
const d = n.getByTestId("RightPart");
|
|
14
14
|
e(d).toBeDefined();
|
|
15
15
|
}), s("render large container with children", () => {
|
|
16
|
-
|
|
17
|
-
/* @__PURE__ */ o(
|
|
16
|
+
a(
|
|
17
|
+
/* @__PURE__ */ o(i, { heading: "Test", marginBottom: "large", children: /* @__PURE__ */ o(g, { children: "Extracontent" }) })
|
|
18
18
|
);
|
|
19
19
|
const t = n.getByTestId("HeaderContainer");
|
|
20
20
|
e(t).toBeDefined();
|
|
@@ -23,13 +23,13 @@ h("BasicHeading-Test", () => {
|
|
|
23
23
|
const d = n.getByTestId("RightPart");
|
|
24
24
|
e(d).toBeDefined(), e(d).toContainHTML("<button");
|
|
25
25
|
}), s("render with available custom icon", () => {
|
|
26
|
-
|
|
26
|
+
a(/* @__PURE__ */ o(i, { heading: "Test", icon: "farm" }));
|
|
27
27
|
const t = n.getByTestId("farm");
|
|
28
28
|
e(t).toBeInTheDocument();
|
|
29
29
|
}), s("render with JSX element as icon", () => {
|
|
30
|
-
|
|
30
|
+
a(/* @__PURE__ */ o(i, { heading: "Test", icon: /* @__PURE__ */ o(c, { children: "JSX" }) })), e(n.getByText("JSX")).toBeInTheDocument();
|
|
31
31
|
}), s("render with other icon", () => {
|
|
32
|
-
|
|
32
|
+
a(/* @__PURE__ */ o(i, { heading: "Test", icon: "contact_support" }));
|
|
33
33
|
const t = document.querySelector("i");
|
|
34
34
|
e(t).toHaveTextContent("contact_support");
|
|
35
35
|
});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "../../assets/BlockView.css";
|
|
2
1
|
import { jsxs as h, jsx as c } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
2
|
+
import { d as T, T as L } from "../../index.es-CF_xy2ns.js";
|
|
4
3
|
import { useState as R, useEffect as B, useMemo as C } from "react";
|
|
5
4
|
import { getBlockNumberByDto as E } from "../../services/BlockService.js";
|
|
6
|
-
const A = "_grid_lihp2_1", D = "_black_lihp2_11", S = "_blockLayout_lihp2_15", M = "_blockRow_lihp2_27", V = "_block_lihp2_15", j = "_active_lihp2_46", q = "_error_lihp2_52", F = "_empty_lihp2_58", G = "_blockText_lihp2_62",
|
|
5
|
+
import '../../assets/BlockView.css';const A = "_grid_lihp2_1", D = "_black_lihp2_11", S = "_blockLayout_lihp2_15", M = "_blockRow_lihp2_27", V = "_block_lihp2_15", j = "_active_lihp2_46", q = "_error_lihp2_52", F = "_empty_lihp2_58", G = "_blockText_lihp2_62", o = {
|
|
7
6
|
grid: A,
|
|
8
7
|
black: D,
|
|
9
8
|
blockLayout: S,
|
|
@@ -13,13 +12,13 @@ const A = "_grid_lihp2_1", D = "_black_lihp2_11", S = "_blockLayout_lihp2_15", M
|
|
|
13
12
|
error: q,
|
|
14
13
|
empty: F,
|
|
15
14
|
blockText: G
|
|
16
|
-
},
|
|
17
|
-
rows:
|
|
18
|
-
columns:
|
|
15
|
+
}, O = ({
|
|
16
|
+
rows: s,
|
|
17
|
+
columns: e,
|
|
19
18
|
hideText: b = !1,
|
|
20
19
|
errorBlocks: y = [],
|
|
21
|
-
showNumbers:
|
|
22
|
-
clickable:
|
|
20
|
+
showNumbers: v = !0,
|
|
21
|
+
clickable: f = !0,
|
|
23
22
|
size: m = 15,
|
|
24
23
|
onClick: k = null,
|
|
25
24
|
currentBlock: i,
|
|
@@ -30,34 +29,34 @@ const A = "_grid_lihp2_1", D = "_black_lihp2_11", S = "_blockLayout_lihp2_15", M
|
|
|
30
29
|
const [d, p] = R(0);
|
|
31
30
|
B(() => {
|
|
32
31
|
if (!i) return;
|
|
33
|
-
const l = E(i,
|
|
32
|
+
const l = E(i, e);
|
|
34
33
|
p(l);
|
|
35
|
-
}, [i,
|
|
36
|
-
const w = C(() =>
|
|
34
|
+
}, [i, e]);
|
|
35
|
+
const w = C(() => s * e, [s, e]), $ = (l) => {
|
|
37
36
|
k && k(l, i ?? void 0);
|
|
38
|
-
}, x = ({ row: l, column: r }) => _.length === 0 ? !0 : _.some((
|
|
39
|
-
return /* @__PURE__ */ h("div", { "data-testid": "block-view-container", className:
|
|
40
|
-
!b && /* @__PURE__ */ c(T, { level: 1, bold: !0, className:
|
|
41
|
-
/* @__PURE__ */ c("div", { className:
|
|
42
|
-
const
|
|
37
|
+
}, x = ({ row: l, column: r }) => _.length === 0 ? !0 : _.some((a) => a.position?.row === l && a.position?.column === r);
|
|
38
|
+
return /* @__PURE__ */ h("div", { "data-testid": "block-view-container", className: o.grid, children: [
|
|
39
|
+
!b && /* @__PURE__ */ c(T, { level: 1, bold: !0, className: o.black, children: N }),
|
|
40
|
+
/* @__PURE__ */ c("div", { className: o.blockLayout, style: { width: `${m}rem`, height: `${m}rem` }, children: Array.from({ length: s }).map((l, r) => /* @__PURE__ */ c("div", { className: o.blockRow, children: Array.from({ length: e }).map((a, n) => {
|
|
41
|
+
const t = e * r + n + 1, u = x({ row: r + 1, column: n + 1 });
|
|
43
42
|
return /* @__PURE__ */ c(
|
|
44
43
|
"div",
|
|
45
44
|
{
|
|
46
45
|
"data-testid": "block-view-block",
|
|
47
|
-
className: `${
|
|
48
|
-
id: `block${
|
|
49
|
-
onClick:
|
|
50
|
-
p(
|
|
46
|
+
className: `${o.block} ${d === t ? o.active : ""} ${u ? "" : o.empty} ${y.includes(t) ? o.error : ""}`,
|
|
47
|
+
id: `block${t}`,
|
|
48
|
+
onClick: f ? () => {
|
|
49
|
+
p(t), $({ row: r + 1, column: n + 1 });
|
|
51
50
|
} : void 0,
|
|
52
|
-
children:
|
|
51
|
+
children: v && u && /* @__PURE__ */ c(
|
|
53
52
|
"div",
|
|
54
53
|
{
|
|
55
|
-
className: `${
|
|
56
|
-
children:
|
|
54
|
+
className: `${o.blockText} ${d === t ? o.black : ""}`,
|
|
55
|
+
children: t
|
|
57
56
|
}
|
|
58
57
|
)
|
|
59
58
|
},
|
|
60
|
-
|
|
59
|
+
t
|
|
61
60
|
);
|
|
62
61
|
}) }, r)) }),
|
|
63
62
|
!b && /* @__PURE__ */ h(L, { themeColor: "primary", level: 6, children: [
|
|
@@ -68,5 +67,5 @@ const A = "_grid_lihp2_1", D = "_black_lihp2_11", S = "_blockLayout_lihp2_15", M
|
|
|
68
67
|
] });
|
|
69
68
|
};
|
|
70
69
|
export {
|
|
71
|
-
|
|
70
|
+
O as BlockView
|
|
72
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { a as s, s as o, f as n } from "../../react.esm-
|
|
2
|
+
import { a as s, s as o, f as n } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { BlockView as i } from "./BlockView.js";
|
|
4
|
-
import { d as a, v as B, t as r, g as t } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as a, v as B, t as r, g as t } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
a("BlockView Test", () => {
|
|
6
6
|
const c = B.fn(), e = {
|
|
7
7
|
id: "1",
|