@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.
Files changed (46) hide show
  1. package/dist/assets/HashTabView.css +1 -1
  2. package/dist/components/AlertBanner/AlertBanner.js +19 -11
  3. package/dist/components/AlertBanner/AlertBanner.test.js +17 -23
  4. package/dist/components/BaseView/BaseView.js +15 -15
  5. package/dist/components/BaseView/BaseView.test.js +19 -25
  6. package/dist/components/BasicHeading/BasicHeading.js +37 -31
  7. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  8. package/dist/components/BlockView/BlockView.test.js +7 -7
  9. package/dist/components/ContextMenu/ContextMenu.test.js +6 -6
  10. package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
  11. package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
  12. package/dist/components/EmptyView/EmptyView.test.js +1 -1
  13. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
  14. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +5 -5
  15. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +8 -8
  16. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
  17. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
  18. package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
  19. package/dist/components/GenericTable/GenericTable.test.js +1 -1
  20. package/dist/components/HashTabView/HashTabView.js +33 -33
  21. package/dist/components/HashTabView/HashTabView.test.js +1 -1
  22. package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
  23. package/dist/components/Iconify/Iconify.d.ts +1 -1
  24. package/dist/components/Iconify/Iconify.js +120 -82
  25. package/dist/components/Iconify/Iconify.test.js +1 -1
  26. package/dist/components/InfoGroup/InfoGroup.js +4 -4
  27. package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
  28. package/dist/components/ListArea/ListArea.test.js +1 -1
  29. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +7 -7
  30. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
  31. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
  32. package/dist/components/Scrollbar/scrollbar.test.js +8 -8
  33. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  34. package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
  35. package/dist/enums/AvailableCustomIcons.d.ts +32 -17
  36. package/dist/enums/AvailableCustomIcons.js +1 -1
  37. package/dist/hooks/useBreakpoint.d.ts +16 -11
  38. package/dist/hooks/useBreakpoint.js +2 -3
  39. package/dist/hooks/useBreakpoints.test.d.ts +1 -0
  40. package/dist/hooks/useBreakpoints.test.js +11 -0
  41. package/dist/{index-DfbRag7b.js → index-DP2ENnrX.js} +1 -1
  42. package/dist/main.js +7 -7
  43. package/dist/{react.esm-BBemCHUU.js → react.esm-DoZanrUz.js} +1223 -1190
  44. package/dist/useBreakpoint-2MH8ICuE.js +28 -0
  45. package/package.json +1 -1
  46. 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 { r as i, s as e } from "../../../react.esm-BBemCHUU.js";
4
- import { d as g, t as s, g as t } from "../../../vi.JYQecGiw-BbUbJcT8.js";
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
- s("render BigLoadingSpinner with custom loading text", () => {
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
- }), s("renders BigLoadingSpinner with default loading text", () => {
8
+ }), a("renders BigLoadingSpinner with default loading text", () => {
9
9
  i(/* @__PURE__ */ o(n, { text: "loadingtext" })), t(e.getByText("loadingtext")).toBeInTheDocument();
10
- }), s('Icon component contains className attribute "logo"', () => {
10
+ }), a('Icon component contains className attribute "logo"', () => {
11
11
  i(/* @__PURE__ */ o(n, {}));
12
- const a = e.getByTestId("logo-icon");
13
- t(a).toHaveClass(r.logo);
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 { r as o, s as e } from "../../../react.esm-BBemCHUU.js";
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 { r as i, s as e, w as s } from "../../react.esm-BBemCHUU.js";
4
- import { u as a } from "../../index-DfbRag7b.js";
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 { r as e, s as t } from "../../react.esm-BBemCHUU.js";
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 as a, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
4
+ import { d as c, t, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  c("Scrollbar", () => {
6
- a("should render Y correctly", () => {
7
- e(/* @__PURE__ */ s("div", { "data-testid": "div", className: d }));
8
- const r = t.getByTestId("div");
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
- }), a("should render X correctly", () => {
11
- e(/* @__PURE__ */ s("div", { "data-testid": "div", className: l }));
12
- const r = t.getByTestId("div");
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, a as l } from "../../react.esm-BBemCHUU.js";
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-BBemCHUU.js";
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-20' = 1,
7
- 'battery-50' = 2,
8
- 'battery-80' = 3,
9
- 'battery-100' = 4,
10
- 'cloud-rain' = 5,
11
- 'cloud-sunny' = 6,
12
- 'farm-delete' = 7,
13
- 'block-delete' = 8,
14
- 'greenhouse-delete' = 9,
15
- 'season' = 10,
16
- 'season-end' = 11,
17
- block = 12,
18
- cloud = 13,
19
- farm = 14,
20
- subscription = 15,
21
- wind = 16,
22
- hortiview = 17
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-20"] = 1] = "battery-20", r[r["battery-50"] = 2] = "battery-50", r[r["battery-80"] = 3] = "battery-80", r[r["battery-100"] = 4] = "battery-100", r[r["cloud-rain"] = 5] = "cloud-rain", r[r["cloud-sunny"] = 6] = "cloud-sunny", r[r["farm-delete"] = 7] = "farm-delete", r[r["block-delete"] = 8] = "block-delete", r[r["greenhouse-delete"] = 9] = "greenhouse-delete", r[r.season = 10] = "season", r[r["season-end"] = 11] = "season-end", r[r.block = 12] = "block", r[r.cloud = 13] = "cloud", r[r.farm = 14] = "farm", r[r.subscription = 15] = "subscription", r[r.wind = 16] = "wind", r[r.hortiview = 17] = "hortiview", r))(d || {});
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
- * Custom hook that tells you whether a given media query is active.
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
- * Inspired by https://usehooks.com/useMedia/
5
- * https://gist.github.com/gragland/ed8cac563f5df71d78f4a1fefa8c5633
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 function useMediaQuery(query: string): boolean;
8
- export declare function useBreakpoints(): {
9
- isXs: boolean;
10
- isSm: boolean;
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
  };
@@ -1,6 +1,5 @@
1
1
  import "react";
2
- import { a as s, b as o } from "../useBreakpoint-DROHPVxO.js";
2
+ import { u as p } from "../useBreakpoint-2MH8ICuE.js";
3
3
  export {
4
- s as useBreakpoints,
5
- o as useMediaQuery
4
+ p as useBreakpoints
6
5
  };
@@ -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
+ });
@@ -1,4 +1,4 @@
1
- import { g as L } from "./react.esm-BBemCHUU.js";
1
+ import { g as L } from "./react.esm-DoZanrUz.js";
2
2
  function d(e, t, n) {
3
3
  return e.namespaceURI && e.namespaceURI !== "http://www.w3.org/1999/xhtml" || (t = Array.isArray(t) ? t : [
4
4
  t
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 i } from "./components/BlockView/BlockView.js";
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 V } from "./components/GenericTable/GenericTable.js";
11
- import { HashTabView as u } from "./components/HashTabView/HashTabView.js";
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 { a as rr } from "./useBreakpoint-DROHPVxO.js";
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
- i as BlockView,
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
- V as GenericTable,
46
- u as HashTabView,
45
+ u as GenericTable,
46
+ k as HashTabView,
47
47
  D as HeaderFilter,
48
48
  A as Iconify,
49
49
  H as InfoGroup,