@hortiview/shared-components 0.0.6829 → 0.0.6890
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/dist/assets/HashTabView.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +19 -11
- package/dist/components/AlertBanner/AlertBanner.test.js +17 -23
- package/dist/components/BaseView/BaseView.js +15 -15
- package/dist/components/BaseView/BaseView.test.js +19 -25
- package/dist/components/BasicHeading/BasicHeading.js +37 -31
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +7 -7
- package/dist/components/ContextMenu/ContextMenu.test.js +6 -6
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +5 -5
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +8 -8
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.js +33 -33
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.d.ts +1 -1
- package/dist/components/Iconify/Iconify.js +120 -82
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +7 -7
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +8 -8
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/enums/AvailableCustomIcons.d.ts +32 -17
- package/dist/enums/AvailableCustomIcons.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +16 -11
- package/dist/hooks/useBreakpoint.js +2 -3
- package/dist/hooks/useBreakpoints.test.d.ts +1 -0
- package/dist/hooks/useBreakpoints.test.js +11 -0
- package/dist/{index-DfbRag7b.js → index-DP2ENnrX.js} +1 -1
- package/dist/main.js +7 -7
- package/dist/{react.esm-BBemCHUU.js → react.esm-DoZanrUz.js} +1223 -1190
- package/dist/useBreakpoint-2MH8ICuE.js +28 -0
- package/package.json +1 -1
- package/dist/useBreakpoint-DROHPVxO.js +0 -35
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { s as r, B as n } from "../../../BigLoadingSpinner-Df2k3xOD.js";
|
|
3
|
-
import {
|
|
4
|
-
import { d as g, t as
|
|
3
|
+
import { a as i, s as e } from "../../../react.esm-DoZanrUz.js";
|
|
4
|
+
import { d as g, t as a, g as t } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
g("BigLoadingSpinner Test", () => {
|
|
6
|
-
|
|
6
|
+
a("render BigLoadingSpinner with custom loading text", () => {
|
|
7
7
|
i(/* @__PURE__ */ o(n, { text: "Please wait..." })), t(e.getByText("Please wait...")).toBeInTheDocument(), t(e.getByRole("progressbar")).toBeInTheDocument();
|
|
8
|
-
}),
|
|
8
|
+
}), a("renders BigLoadingSpinner with default loading text", () => {
|
|
9
9
|
i(/* @__PURE__ */ o(n, { text: "loadingtext" })), t(e.getByText("loadingtext")).toBeInTheDocument();
|
|
10
|
-
}),
|
|
10
|
+
}), a('Icon component contains className attribute "logo"', () => {
|
|
11
11
|
i(/* @__PURE__ */ o(n, {}));
|
|
12
|
-
const
|
|
13
|
-
t(
|
|
12
|
+
const s = e.getByTestId("logo-icon");
|
|
13
|
+
t(s).toHaveClass(r.logo);
|
|
14
14
|
});
|
|
15
15
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a as o, s as e } from "../../../react.esm-DoZanrUz.js";
|
|
3
3
|
import { LoadingSpinner as r } from "./LoadingSpinner.js";
|
|
4
4
|
import { d as a, t as i, g as n } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
a("LoadingSpinner Test", () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { TypoDisplay as n } from "@element/react-components";
|
|
3
|
-
import {
|
|
4
|
-
import { u as a } from "../../index-
|
|
3
|
+
import { a as i, s as e, w as s } from "../../react.esm-DoZanrUz.js";
|
|
4
|
+
import { u as a } from "../../index-DP2ENnrX.js";
|
|
5
5
|
import { OverflowTooltip as c } from "./OverflowTooltip.js";
|
|
6
6
|
import { d as u, t as p, g as r } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
7
7
|
u("OverflowTooltip Test", () => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a, s as e } from "../../react.esm-DoZanrUz.js";
|
|
3
3
|
import { ScrollbarY as d, ScrollbarX as l } from "./Scrollbar.js";
|
|
4
|
-
import { d as c, t
|
|
4
|
+
import { d as c, t, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
c("Scrollbar", () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const r =
|
|
6
|
+
t("should render Y correctly", () => {
|
|
7
|
+
a(/* @__PURE__ */ s("div", { "data-testid": "div", className: d }));
|
|
8
|
+
const r = e.getByTestId("div");
|
|
9
9
|
o(r).toHaveClass(/scrollbarY/);
|
|
10
|
-
}),
|
|
11
|
-
|
|
12
|
-
const r =
|
|
10
|
+
}), t("should render X correctly", () => {
|
|
11
|
+
a(/* @__PURE__ */ s("div", { "data-testid": "div", className: l }));
|
|
12
|
+
const r = e.getByTestId("div");
|
|
13
13
|
o(r).toHaveClass(/scrollbarX/);
|
|
14
14
|
});
|
|
15
15
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { r, s as t, f as h,
|
|
2
|
+
import { a as r, s as t, f as h, b as l } from "../../react.esm-DoZanrUz.js";
|
|
3
3
|
import { SearchBar as s } from "./SearchBar.js";
|
|
4
4
|
import { d as m, t as o, v as n, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
m("SearchBar Test", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { r } from "../../react.esm-
|
|
2
|
+
import { a as r } from "../../react.esm-DoZanrUz.js";
|
|
3
3
|
import { VerticalDivider as s } from "./VerticalDivider.js";
|
|
4
4
|
import { d as o, t as l, g as i } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
o("VerticalDivider Test", () => {
|
|
@@ -3,21 +3,36 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare enum AvailableCustomIcons {
|
|
5
5
|
'battery-0' = 0,
|
|
6
|
-
'battery-
|
|
7
|
-
'battery-
|
|
8
|
-
'battery-
|
|
9
|
-
'battery-
|
|
10
|
-
'
|
|
11
|
-
'cloud-
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
'battery-100' = 1,
|
|
7
|
+
'battery-20' = 2,
|
|
8
|
+
'battery-50' = 3,
|
|
9
|
+
'battery-80' = 4,
|
|
10
|
+
'block-delete' = 5,
|
|
11
|
+
'cloud-rain' = 6,
|
|
12
|
+
'cloud-sunny' = 7,
|
|
13
|
+
'crop-health' = 8,
|
|
14
|
+
'farm-delete' = 9,
|
|
15
|
+
'farm-management' = 10,
|
|
16
|
+
'greenhouse-delete' = 11,
|
|
17
|
+
'harvest-quality' = 12,
|
|
18
|
+
'manage-labour' = 13,
|
|
19
|
+
'open-field' = 14,
|
|
20
|
+
'other-category' = 15,
|
|
21
|
+
'pd-scouting' = 16,
|
|
22
|
+
'season-end' = 17,
|
|
23
|
+
'vertical-farming' = 18,
|
|
24
|
+
block = 19,
|
|
25
|
+
cloud = 20,
|
|
26
|
+
farm = 21,
|
|
27
|
+
fertigation = 22,
|
|
28
|
+
glasshouse = 23,
|
|
29
|
+
greenhouse = 24,
|
|
30
|
+
hortiview = 25,
|
|
31
|
+
orchard = 26,
|
|
32
|
+
potato = 27,
|
|
33
|
+
season = 28,
|
|
34
|
+
subscription = 29,
|
|
35
|
+
tomato = 30,
|
|
36
|
+
weather = 31,
|
|
37
|
+
wind = 32
|
|
23
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var d = /* @__PURE__ */ ((r) => (r[r["battery-0"] = 0] = "battery-0", r[r["battery-
|
|
1
|
+
var d = /* @__PURE__ */ ((r) => (r[r["battery-0"] = 0] = "battery-0", r[r["battery-100"] = 1] = "battery-100", r[r["battery-20"] = 2] = "battery-20", r[r["battery-50"] = 3] = "battery-50", r[r["battery-80"] = 4] = "battery-80", r[r["block-delete"] = 5] = "block-delete", r[r["cloud-rain"] = 6] = "cloud-rain", r[r["cloud-sunny"] = 7] = "cloud-sunny", r[r["crop-health"] = 8] = "crop-health", r[r["farm-delete"] = 9] = "farm-delete", r[r["farm-management"] = 10] = "farm-management", r[r["greenhouse-delete"] = 11] = "greenhouse-delete", r[r["harvest-quality"] = 12] = "harvest-quality", r[r["manage-labour"] = 13] = "manage-labour", r[r["open-field"] = 14] = "open-field", r[r["other-category"] = 15] = "other-category", r[r["pd-scouting"] = 16] = "pd-scouting", r[r["season-end"] = 17] = "season-end", r[r["vertical-farming"] = 18] = "vertical-farming", r[r.block = 19] = "block", r[r.cloud = 20] = "cloud", r[r.farm = 21] = "farm", r[r.fertigation = 22] = "fertigation", r[r.glasshouse = 23] = "glasshouse", r[r.greenhouse = 24] = "greenhouse", r[r.hortiview = 25] = "hortiview", r[r.orchard = 26] = "orchard", r[r.potato = 27] = "potato", r[r.season = 28] = "season", r[r.subscription = 29] = "subscription", r[r.tomato = 30] = "tomato", r[r.weather = 31] = "weather", r[r.wind = 32] = "wind", r))(d || {});
|
|
2
2
|
export {
|
|
3
3
|
d as AvailableCustomIcons
|
|
4
4
|
};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Hook that returns the current breakpoint. It uses the following breakpoints:
|
|
3
|
+
* - xs: 0-599px
|
|
4
|
+
* - sm: 600-719px
|
|
5
|
+
* - md: 720-839px
|
|
6
|
+
* - lg: 840-1023px
|
|
7
|
+
* - xl: 1024-1439px
|
|
8
|
+
* - xxl: 1440px and up
|
|
3
9
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
10
|
+
* They are combined as follows:
|
|
11
|
+
* - isMobile: xs
|
|
12
|
+
* - isTablet: sm, md
|
|
13
|
+
* - isDesktop: lg, xl, xxl
|
|
14
|
+
* @returns {Object} An object with the current breakpoint
|
|
6
15
|
*/
|
|
7
|
-
export declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
isMd: boolean;
|
|
12
|
-
isLg: boolean;
|
|
13
|
-
isXlg: boolean;
|
|
14
|
-
active: string;
|
|
16
|
+
export declare const useBreakpoints: () => {
|
|
17
|
+
isMobile: boolean;
|
|
18
|
+
isTablet: boolean;
|
|
19
|
+
isDesktop: boolean;
|
|
15
20
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { r as t, w as s } from "../react.esm-DoZanrUz.js";
|
|
2
|
+
import { u as o } from "../useBreakpoint-2MH8ICuE.js";
|
|
3
|
+
import { d as a, t as i, g as r } from "../vi.JYQecGiw-BbUbJcT8.js";
|
|
4
|
+
a("useBreakpoint Test", () => {
|
|
5
|
+
i("returns object", () => {
|
|
6
|
+
const { result: e } = t(() => o());
|
|
7
|
+
s(() => {
|
|
8
|
+
r(e.current.isDesktop).toBe(!1), r(e.current.isTablet).toBe(!1), r(e.current.isMobile).toBe(!1);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
});
|
package/dist/main.js
CHANGED
|
@@ -2,13 +2,13 @@ import "./assets/main.css";
|
|
|
2
2
|
import { AlertBanner as t } from "./components/AlertBanner/AlertBanner.js";
|
|
3
3
|
import { BaseView as p } from "./components/BaseView/BaseView.js";
|
|
4
4
|
import { BasicHeading as f } from "./components/BasicHeading/BasicHeading.js";
|
|
5
|
-
import { BlockView as
|
|
5
|
+
import { BlockView as a } from "./components/BlockView/BlockView.js";
|
|
6
6
|
import { ContextMenu as c } from "./components/ContextMenu/ContextMenu.js";
|
|
7
7
|
import { DeleteModal as s } from "./components/DeleteModal/DeleteModal.js";
|
|
8
8
|
import { Disclaimer as d } from "./components/Disclaimer/Disclaimer.js";
|
|
9
9
|
import { EmptyView as S } from "./components/EmptyView/EmptyView.js";
|
|
10
|
-
import { GenericTable as
|
|
11
|
-
import { HashTabView as
|
|
10
|
+
import { GenericTable as u } from "./components/GenericTable/GenericTable.js";
|
|
11
|
+
import { HashTabView as k } from "./components/HashTabView/HashTabView.js";
|
|
12
12
|
import { HeaderFilter as D } from "./components/HeaderFilter/HeaderFilter.js";
|
|
13
13
|
import { Iconify as A } from "./components/Iconify/Iconify.js";
|
|
14
14
|
import { InfoGroup as H } from "./components/InfoGroup/InfoGroup.js";
|
|
@@ -24,14 +24,14 @@ import { FormSelect as N } from "./components/FormComponents/FormSelect/FormSele
|
|
|
24
24
|
import { FormSlider as Q } from "./components/FormComponents/FormSlider/FormSlider.js";
|
|
25
25
|
import { FormText as W } from "./components/FormComponents/FormText/FormText.js";
|
|
26
26
|
import { AvailableCustomIcons as _ } from "./enums/AvailableCustomIcons.js";
|
|
27
|
-
import {
|
|
27
|
+
import { u as rr } from "./useBreakpoint-2MH8ICuE.js";
|
|
28
28
|
import { capitalizeFirstLetters as er } from "./services/UtilService.js";
|
|
29
29
|
export {
|
|
30
30
|
t as AlertBanner,
|
|
31
31
|
_ as AvailableCustomIcons,
|
|
32
32
|
p as BaseView,
|
|
33
33
|
f as BasicHeading,
|
|
34
|
-
|
|
34
|
+
a as BlockView,
|
|
35
35
|
c as ContextMenu,
|
|
36
36
|
s as DeleteModal,
|
|
37
37
|
d as Disclaimer,
|
|
@@ -42,8 +42,8 @@ export {
|
|
|
42
42
|
N as FormSelect,
|
|
43
43
|
Q as FormSlider,
|
|
44
44
|
W as FormText,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
u as GenericTable,
|
|
46
|
+
k as HashTabView,
|
|
47
47
|
D as HeaderFilter,
|
|
48
48
|
A as Iconify,
|
|
49
49
|
H as InfoGroup,
|