@hortiview/shared-components 0.0.4540 → 0.0.4721

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 (62) hide show
  1. package/README.md +101 -29
  2. package/dist/{ListAreaService-CFOmATRF.js → ListAreaService-BQCdQv7a.js} +5 -5
  3. package/dist/assets/{main.css → DeleteModal.css} +2 -2
  4. package/dist/assets/Disclaimer.css +1 -0
  5. package/dist/assets/HeaderFilter.css +1 -0
  6. package/dist/assets/Scrollbar.css +1 -0
  7. package/dist/{component-D1YrRAXe.js → component-DCtofpGS.js} +61 -54
  8. package/dist/components/BaseView/BaseView.js +2 -2
  9. package/dist/components/BaseView/BaseView.test.js +15 -14
  10. package/dist/components/BasicHeading/BasicHeading.d.ts +2 -5
  11. package/dist/components/BasicHeading/BasicHeading.js +2 -2
  12. package/dist/components/BasicHeading/BasicHeading.test.js +33 -333
  13. package/dist/components/BlockView/BlockView.js +5 -5
  14. package/dist/components/BlockView/BlockView.test.js +15 -14
  15. package/dist/components/DeleteModal/DeleteModal.d.ts +65 -0
  16. package/dist/components/DeleteModal/DeleteModal.js +4721 -0
  17. package/dist/components/DeleteModal/DeleteModal.test.d.ts +1 -0
  18. package/dist/components/DeleteModal/DeleteModal.test.js +85 -0
  19. package/dist/components/Disclaimer/Disclaimer.d.ts +33 -0
  20. package/dist/components/Disclaimer/Disclaimer.js +24 -0
  21. package/dist/components/Disclaimer/Disclaimer.test.d.ts +1 -0
  22. package/dist/components/Disclaimer/Disclaimer.test.js +13 -0
  23. package/dist/components/EmptyView/EmptyView.js +4 -4
  24. package/dist/components/EmptyView/EmptyView.test.js +14 -13
  25. package/dist/components/HashTabView/HashTabView.js +5 -5
  26. package/dist/components/HashTabView/HashTabView.test.js +9 -8
  27. package/dist/components/HeaderFilter/HeaderFilter.d.ts +33 -0
  28. package/dist/components/HeaderFilter/HeaderFilter.js +7606 -0
  29. package/dist/components/HeaderFilter/HeaderFilter.test.d.ts +1 -0
  30. package/dist/components/HeaderFilter/HeaderFilter.test.js +46 -0
  31. package/dist/components/Iconify/Iconify.js +1 -1
  32. package/dist/components/Iconify/Iconify.test.js +8 -7
  33. package/dist/components/ListArea/ListArea.js +298 -5351
  34. package/dist/components/ListArea/ListArea.test.js +4 -3
  35. package/dist/components/ListArea/ListAreaService.js +3 -3
  36. package/dist/components/Scrollbar/Scrollbar.d.ts +2 -0
  37. package/dist/components/Scrollbar/Scrollbar.js +9 -0
  38. package/dist/components/Scrollbar/scrollbar.test.d.ts +1 -0
  39. package/dist/components/Scrollbar/scrollbar.test.js +15 -0
  40. package/dist/components/SearchBar/SearchBar.js +2052 -3
  41. package/dist/components/SearchBar/SearchBar.test.js +16 -15
  42. package/dist/components/VerticalDivider/VerticalDivider.test.js +8 -7
  43. package/dist/{index.es-Cv6meSAn.js → index.es-3I3oam0G.js} +1 -1
  44. package/dist/{index.es-WZ1mqvGz.js → index.es-BahjEG5L.js} +104 -97
  45. package/dist/index.es-BcHAMD5J.js +5068 -0
  46. package/dist/index.es-C3EKMb0J.js +305 -0
  47. package/dist/{index.es-CUWXKh7P.js → index.es-CcfZlo4c.js} +8 -8
  48. package/dist/index.es-DVNdCQvl.js +1192 -0
  49. package/dist/{index.es-mBp_Btvi.js → index.es-STyHqa-8.js} +2 -2
  50. package/dist/{index.es-DYsXox--.js → index.es-hAl7Wxm5.js} +1 -1
  51. package/dist/{index.es-BD4kFWFx.js → index.es-z8RCxF8n.js} +3 -3
  52. package/dist/main.d.ts +5 -1
  53. package/dist/main.js +33 -23
  54. package/dist/react.esm-BeDwcQWb.js +12741 -0
  55. package/dist/services/UtilService.d.ts +6 -0
  56. package/dist/services/UtilService.js +4 -0
  57. package/dist/services/services.test.d.ts +1 -0
  58. package/dist/services/services.test.js +22 -0
  59. package/dist/vi.JYQecGiw-BbUbJcT8.js +9795 -0
  60. package/package.json +1 -1
  61. package/dist/SearchBar-CY2zfu6B.js +0 -3232
  62. package/dist/vi.JYQecGiw-8gz0k16C.js +0 -22532
@@ -0,0 +1,46 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { r as i, s as t, f as T } from "../../react.esm-BeDwcQWb.js";
3
+ import { HeaderFilter as s } from "./HeaderFilter.js";
4
+ import { d as c, t as o, v as l, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ c("HeaderFilter-Test", () => {
6
+ o("render header filter", () => {
7
+ i(
8
+ /* @__PURE__ */ n(s, { heading: "Test", setFilter: l.fn(), filterValue: "", filterOptions: [] })
9
+ ), e(t.getByTestId("HeaderContainer")).toBeInTheDocument(), e(t.getByText("Test")).toBeInTheDocument(), e(t.queryByText("filterBy")).not.toBeInTheDocument();
10
+ }), o("render header filter with filterBy text", () => {
11
+ i(
12
+ /* @__PURE__ */ n(
13
+ s,
14
+ {
15
+ heading: "Test",
16
+ filterByText: "filterBy",
17
+ setFilter: l.fn(),
18
+ filterValue: "",
19
+ filterOptions: []
20
+ }
21
+ )
22
+ ), e(t.getByTestId("HeaderContainer")).toBeInTheDocument(), e(t.getByText("Test")).toBeInTheDocument(), e(t.getByText("filterBy")).toBeInTheDocument();
23
+ }), o("render header filter with select options", () => {
24
+ const f = l.fn();
25
+ i(
26
+ /* @__PURE__ */ n(
27
+ s,
28
+ {
29
+ heading: "Test",
30
+ setFilter: f,
31
+ filterValue: "",
32
+ filterOptions: [
33
+ { value: "test", label: "Test" },
34
+ { value: "different", label: "Different" }
35
+ ]
36
+ }
37
+ )
38
+ );
39
+ const a = t.getByTestId("HeaderContainer");
40
+ e(a).toBeDefined(), e(a).toHaveTextContent("Test");
41
+ const r = t.getByTestId("Select");
42
+ e(r).toBeDefined();
43
+ const d = r.closest(".lmnt-select");
44
+ e(d).toBeDefined(), T.click(r);
45
+ });
46
+ });
@@ -1,7 +1,7 @@
1
1
  import "../../assets/Iconify.css";
2
2
  import { jsx as r, Fragment as s } from "react/jsx-runtime";
3
3
  import * as e from "react";
4
- import { I as a } from "../../index.es-Cv6meSAn.js";
4
+ import { I as a } from "../../index.es-3I3oam0G.js";
5
5
  const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 48, height: 49, viewBox: "0 0 48 49", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M14 10.5H18V6.5H14V10.5ZM14 26.5H18V22.5H14V26.5ZM14 42.5H18V38.5H14V42.5ZM22 34.5H26V30.5H22V34.5ZM22 42.5H26V38.5H22V42.5ZM6 42.5H10V38.5H6V42.5ZM6 34.5H10V30.5H6V34.5ZM6 26.5H10V22.5H6V26.5ZM6 18.5H10V14.5H6V18.5ZM6 10.5H10V6.5H6V10.5ZM22 26.5H26V22.5H22V26.5ZM38 34.5H42V30.5H38V34.5ZM38 26.5H42V22.5H38V26.5ZM38 42.5H42V38.5H38V42.5ZM38 18.5H42V14.5H38V18.5ZM22 18.5H26V14.5H22V18.5ZM38 6.5V10.5H42V6.5H38ZM22 10.5H26V6.5H22V10.5ZM30 42.5H34V38.5H30V42.5ZM30 26.5H34V22.5H30V26.5ZM30 10.5H34V6.5H30V10.5Z", fill: "currentColor" }), /* @__PURE__ */ e.createElement("rect", { x: 10, y: 1.70297, width: 50, height: 6, transform: "rotate(45 6.44336 1.70297)", stroke: "white", strokeWidth: 2, fill: "currentColor" })), c = l, d = (t) => /* @__PURE__ */ e.createElement("svg", { width: 48, height: 48, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#clip0_2972_158194)" }, /* @__PURE__ */ e.createElement("rect", { width: 48, height: 48, rx: 8, fill: "#40BAFF" }), /* @__PURE__ */ e.createElement("path", { d: "M14 10H18V6H14V10ZM14 26H18V22H14V26ZM14 42H18V38H14V42ZM22 34H26V30H22V34ZM22 42H26V38H22V42ZM6 42H10V38H6V42ZM6 34H10V30H6V34ZM6 26H10V22H6V26ZM6 18H10V14H6V18ZM6 10H10V6H6V10ZM22 26H26V22H22V26ZM38 34H42V30H38V34ZM38 26H42V22H38V26ZM38 42H42V38H38V42ZM38 18H42V14H38V18ZM22 18H26V14H22V18ZM38 6V10H42V6H38ZM22 10H26V6H22V10ZM30 42H34V38H30V42ZM30 26H34V22H30V26ZM30 10H34V6H30V10Z", fill: "black", fillOpacity: 0.6 })), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("clipPath", { id: "clip0_2972_158194" }, /* @__PURE__ */ e.createElement("rect", { width: 48, height: 48, rx: 8, fill: "white" })))), V = d, H = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 26, viewBox: "0 0 22 26", fill: "none", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M5.78906 20.8241L6.65832 19.0859", stroke: "black", strokeWidth: 1.73832, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M13.6123 20.8241L14.4816 19.0859", stroke: "black", strokeWidth: 1.73832, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M8.83203 24.3006L9.70128 22.5625", stroke: "black", strokeWidth: 1.73832, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M1.00879 24.3006L1.87804 22.5625", stroke: "black", strokeWidth: 1.73832, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M16.6553 24.3006L17.5245 22.5625", stroke: "black", strokeWidth: 1.73832, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M16.6537 14.7362C17.8064 14.7362 18.9119 14.2784 19.7269 13.4635C20.5421 12.6486 21 11.5433 21 10.3909C21 9.23843 20.5421 8.13316 19.7269 7.31826C18.9119 6.50335 17.8064 6.04554 16.6537 6.04554C15.6623 6.04884 14.7009 6.38557 13.9242 7.00152C13.6932 5.7859 13.1208 4.66113 12.2741 3.75871C11.4273 2.85627 10.3411 2.21346 9.14243 1.90541C7.94377 1.59736 6.68217 1.6368 5.50508 2.01912C4.328 2.40143 3.28408 3.11083 2.49537 4.06438C1.70665 5.01794 1.2057 6.17625 1.05107 7.40393C0.896468 8.63161 1.09457 9.87792 1.62224 10.9972C2.14991 12.1165 2.98534 13.0625 4.03089 13.7246C5.07643 14.3867 6.28888 14.7376 7.52651 14.7362H16.6537Z", stroke: "black", strokeWidth: 1.73832, strokeLinecap: "round", strokeLinejoin: "round" })), h = H, k = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M12.0003 15.381C13.8677 15.381 15.3815 13.8672 15.3815 11.9998C15.3815 10.1325 13.8677 8.61865 12.0003 8.61865C10.1329 8.61865 8.61914 10.1325 8.61914 11.9998C8.61914 13.8672 10.1329 15.381 12.0003 15.381Z", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M12 1V2.6923", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M12 21.3076V22.9999", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M22.9999 12H21.3076", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M2.6923 12H1", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M19.7845 4.21533L18.583 5.41686", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M5.41735 18.583L4.21582 19.7845", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M19.7845 19.7845L18.583 18.583", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M5.41735 5.41686L4.21582 4.21533", stroke: "black", strokeWidth: 1.6923, strokeLinecap: "round", strokeLinejoin: "round" })), M = k, C = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }), /* @__PURE__ */ e.createElement("path", { d: "M12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96C18.67 6.59 15.64 4 12 4z" })), m = C, u = (t) => /* @__PURE__ */ e.createElement("svg", { width: 48, height: 51, viewBox: "0 0 48 51", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M20 18C18.896 18 18 18.894 18 20V22H22V20C22 18.894 21.104 18 20 18ZM36 32V16H32V32H36ZM28 32V22C28 17.588 24.412 14 20 14C15.588 14 12 17.588 12 22V32H16V26H24V32H28ZM32 12H36V10C36 8.916 35.084 8 34 8C32.916 8 32 8.916 32 10V12ZM44 32V36H4V32H8V22C8 15.374 13.374 10 20 10C23.078 10 25.876 11.168 28 13.074V10C28 6.7 30.7 4 34 4C37.3 4 40 6.7 40 10V32H44ZM4 44H44V40H4V44Z", fill: "currentColor" }), /* @__PURE__ */ e.createElement("rect", { x: 7.44336, y: 9.20297, width: 50, height: 6, transform: "rotate(45 7.44336 9.20297)", fill: "currentColor", stroke: "white", strokeWidth: 2 })), w = u, p = (t) => /* @__PURE__ */ e.createElement("svg", { width: 36, height: 36, viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("g", { id: "Farm" }, /* @__PURE__ */ e.createElement("path", { id: "Union", d: "M15 13.5C14.172 13.5 13.5 14.1705 13.5 15V16.5H16.5V15C16.5 14.1705 15.828 13.5 15 13.5ZM27 24V12H24V24H27ZM21 24V16.5C21 13.191 18.309 10.5 15 10.5C11.691 10.5 9 13.191 9 16.5V24H12V19.5H18V24H21ZM24 9H27V7.5C27 6.687 26.313 6 25.5 6C24.687 6 24 6.687 24 7.5V9ZM33 24V27H3V24H6V16.5C6 11.5305 10.0305 7.5 15 7.5C17.3085 7.5 19.407 8.376 21 9.8055V7.5C21 5.025 23.025 3 25.5 3C27.975 3 30 5.025 30 7.5V24H33ZM3 33H33V30H3V33Z", fill: "currentColor" }))), Z = p, g = (t) => /* @__PURE__ */ e.createElement("svg", { width: 48, height: 48, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M24 40H4V36H15.5C14.04 30.38 9.62 25.98 4 24.52C5.28 24.2 6.62 24 8 24C16.84 24 24 31.16 24 40ZM44 24.52C42.72 24.2 41.38 24 40 24C34.14 24 29.04 27.16 26.24 31.86C26.82 33.18 27.3 34.56 27.58 36C27.84 37.3 27.98 38.64 27.98 40H31.98H43.98V36H32.48C33.96 30.38 38.38 25.98 44 24.52ZM31.28 22.04C32.84 17.86 35.74 14.36 39.46 12.04C30.88 12.32 24 19.34 24 28C24 28.02 24 28.04 24 28.04C25.9 25.5 28.4 23.44 31.28 22.04ZM22.84 17.7C21.16 13.32 17.76 9.78 13.4 8C16.28 11.72 18 16.36 18 21.42C18 21.84 17.94 22.24 17.92 22.64C18.78 23.12 19.58 23.68 20.36 24.28C20.78 21.92 21.66 19.7 22.84 17.7Z", fill: "currentColor" }), /* @__PURE__ */ e.createElement("rect", { x: 10, y: 2.20297, width: 50, height: 6, transform: "rotate(45 6.44336 2.20297)", fill: "currentColor", stroke: "white", strokeWidth: 2 })), E = g, L = (t) => /* @__PURE__ */ e.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M4 11H9V5H4V11ZM4 18H9V12H4V18ZM10 18H15V12H10V18ZM16 18H21V12H16V18ZM10 11H15V5H10V11ZM16 5V11H21V5H16Z", fill: "currentColor", fillOpacity: 0.6 })), v = L, f = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, viewBox: "0 0 22 22", fill: "none", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M11.769 1C12.4831 1 13.1678 1.28365 13.6727 1.78856C14.1776 2.29347 14.4613 2.97828 14.4613 3.69233C14.4613 4.40638 14.1776 5.09118 13.6727 5.5961C13.1678 6.10101 12.4831 6.38466 11.769 6.38466H1", stroke: "black", strokeWidth: 1.53845, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M18.3073 16.3847C19.0213 16.3847 19.7061 16.101 20.211 15.5961C20.7159 15.0912 20.9996 14.4064 20.9996 13.6923C20.9996 12.9783 20.7159 12.2935 20.211 11.7886C19.7061 11.2836 19.0213 11 18.3073 11H3.30762", stroke: "black", strokeWidth: 1.53845, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M11.385 20.9999C12.0991 20.9999 12.7839 20.7162 13.2888 20.2113C13.7937 19.7063 14.0773 19.0216 14.0773 18.3076C14.0773 17.5936 13.7937 16.9088 13.2888 16.4039C12.7839 15.8989 12.0991 15.6152 11.385 15.6152H2.53906", stroke: "black", strokeWidth: 1.53845, strokeLinecap: "round", strokeLinejoin: "round" })), x = f, b = "_image_178sv_1", W = {
6
6
  image: b
7
7
  }, y = ({ icon: t, pure: n = !1, ...i }) => {
@@ -1,21 +1,22 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { Iconify as c } from "./Iconify.js";
3
3
  import { AvailableCustomIcons as d } from "../../enums/AvailableCustomIcons.js";
4
- import { d as l, t as r, r as s, g as o, s as i } from "../../vi.JYQecGiw-8gz0k16C.js";
4
+ import { r, s as i } from "../../react.esm-BeDwcQWb.js";
5
+ import { d as l, t as s, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
6
  l("Iconify Test", () => {
6
7
  const m = Object.keys(d).filter((e) => isNaN(Number(e)));
7
- r.each(m)("render available custom icon (%s)", (e) => {
8
- s(/* @__PURE__ */ n(c, { icon: e }));
8
+ s.each(m)("render available custom icon (%s)", (e) => {
9
+ r(/* @__PURE__ */ n(c, { icon: e }));
9
10
  const t = document.querySelector("svg");
10
11
  o(t).toBeDefined();
11
12
  const a = i.getByTestId(e);
12
13
  o(a).toBeInTheDocument();
13
- }), r("render empty wrapper as fallback", () => {
14
- s(/* @__PURE__ */ n(c, { icon: "" }));
14
+ }), s("render empty wrapper as fallback", () => {
15
+ r(/* @__PURE__ */ n(c, { icon: "" }));
15
16
  const e = document.querySelector("svg");
16
17
  o(e).toBeDefined(), o(e?.textContent).toBeUndefined();
17
- }), r("render pure icon", () => {
18
- s(/* @__PURE__ */ n(c, { icon: "farm", pure: !0 }));
18
+ }), s("render pure icon", () => {
19
+ r(/* @__PURE__ */ n(c, { icon: "farm", pure: !0 }));
19
20
  const e = document.querySelector("svg");
20
21
  o(e).toBeDefined();
21
22
  const t = i.getByTestId("farm");