@hortiview/shared-components 0.0.4721 → 0.0.4722

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 (51) hide show
  1. package/dist/BlockView.module-8kbPxxc4.js +15 -0
  2. package/dist/HashTabView.module-BY0tbl3B.js +13 -0
  3. package/dist/HeaderFilter.module-DiBmulr5.js +7 -0
  4. package/dist/_getTag-DNUtgXkb.js +136 -0
  5. package/dist/_stringToPath-BfzwTbL6.js +54 -0
  6. package/dist/baseView.module-DXWalo9p.js +7 -0
  7. package/dist/basicHeading.module-ClcvD7x2.js +16 -0
  8. package/dist/{component-DCtofpGS.js → component-Rx4bNsGO.js} +1 -1
  9. package/dist/components/BaseView/BaseView.js +28 -30
  10. package/dist/components/BaseView/BaseView.test.js +1 -1
  11. package/dist/components/BasicHeading/BasicHeading.js +40 -51
  12. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  13. package/dist/components/BlockView/BlockView.js +41 -51
  14. package/dist/components/DeleteModal/DeleteModal.js +34 -36
  15. package/dist/components/Disclaimer/Disclaimer.js +11 -14
  16. package/dist/components/EmptyView/EmptyView.js +4 -4
  17. package/dist/components/HashTabView/HashTabView.js +60 -68
  18. package/dist/components/HeaderFilter/HeaderFilter.js +628 -629
  19. package/dist/components/Iconify/Iconify.js +1 -1
  20. package/dist/components/ListArea/ListArea.js +189 -233
  21. package/dist/components/ListArea/ListArea.test.js +2 -2
  22. package/dist/components/ListArea/ListAreaService.js +56 -9
  23. package/dist/components/SearchBar/SearchBar.js +47 -48
  24. package/dist/components/VerticalDivider/VerticalDivider.js +4 -6
  25. package/dist/disclaimer.module-BZydt-Q_.js +8 -0
  26. package/dist/hooks/useBreakpoint.js +2 -2
  27. package/dist/index.es-Ba9oZK_n.js +769 -0
  28. package/dist/{index.es-CcfZlo4c.js → index.es-C1ojb4Lq.js} +1 -1
  29. package/dist/{index.es-hAl7Wxm5.js → index.es-CNBieliG.js} +1 -1
  30. package/dist/{index.es-C3EKMb0J.js → index.es-CQ3ep412.js} +3 -3
  31. package/dist/{index.es-STyHqa-8.js → index.es-CVCp4d0C.js} +2 -2
  32. package/dist/{index.es-BahjEG5L.js → index.es-Cct4Uapb.js} +28 -28
  33. package/dist/index.es-Cj9DW-2T.js +430 -0
  34. package/dist/{index.es-z8RCxF8n.js → index.es-Cm4X20_S.js} +2 -2
  35. package/dist/{index.es-3I3oam0G.js → index.es-InSNsV4f.js} +1 -1
  36. package/dist/{index.es-BcHAMD5J.js → index.es-L0ZCcbUf.js} +1676 -1805
  37. package/dist/listArea.module-B04TR5bj.js +14 -0
  38. package/dist/main.js +6 -6
  39. package/dist/searchBar.module-9gKyrZRT.js +7 -0
  40. package/dist/{tslib.es6-BOWp4lfV.js → tslib.es6-CIXEwqhg.js} +4 -4
  41. package/dist/{useBreakpoint-DROHPVxO.js → useBreakpoint-DyAmuka7.js} +2 -2
  42. package/dist/verticalDivider.module-C3_GL-fH.js +7 -0
  43. package/package.json +1 -1
  44. package/dist/ListAreaService-BQCdQv7a.js +0 -68
  45. package/dist/index.es-DVNdCQvl.js +0 -1192
  46. /package/dist/assets/{BaseView.css → baseView.css} +0 -0
  47. /package/dist/assets/{BasicHeading.css → basicHeading.css} +0 -0
  48. /package/dist/assets/{Disclaimer.css → disclaimer.css} +0 -0
  49. /package/dist/assets/{ListAreaService.css → listArea.css} +0 -0
  50. /package/dist/assets/{SearchBar.css → searchBar.css} +0 -0
  51. /package/dist/assets/{VerticalDivider.css → verticalDivider.css} +0 -0
@@ -1,73 +1,63 @@
1
- import "../../assets/BlockView.css";
2
- import { jsxs as g, jsx as l } from "react/jsx-runtime";
3
- import { useState as x, useEffect as T, useMemo as L } from "react";
4
- import { getBlockNumberByDto as R } from "../../services/BlockService.js";
5
- import { a as B, c as C } from "../../index.es-z8RCxF8n.js";
6
- const A = "_grid_g18cu_1", D = "_black_g18cu_11", E = "_blockLayout_g18cu_15", S = "_blockRow_g18cu_27", V = "_block_g18cu_15", M = "_active_g18cu_46", j = "_error_g18cu_52", q = "_empty_g18cu_58", F = "_blockText_g18cu_65", o = {
7
- grid: A,
8
- black: D,
9
- blockLayout: E,
10
- blockRow: S,
11
- block: V,
12
- active: M,
13
- error: j,
14
- empty: q,
15
- blockText: F
16
- }, O = ({
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import { useState as B, useEffect as C, useMemo as A } from "react";
3
+ import { s as e } from "../../BlockView.module-8kbPxxc4.js";
4
+ import { getBlockNumberByDto as D } from "../../services/BlockService.js";
5
+ import { a as E, c as S } from "../../index.es-Cm4X20_S.js";
6
+ const R = ({
17
7
  rows: s,
18
8
  columns: t,
19
- hideText: u = !1,
20
- errorBlocks: p = [],
9
+ hideText: n = !1,
10
+ errorBlocks: k = [],
21
11
  showNumbers: y = !0,
22
- clickable: h = !0,
23
- size: m = 15,
24
- onClick: b = null,
25
- currentBlock: i,
26
- blocks: _,
12
+ clickable: N = !0,
13
+ size: d = 15,
14
+ onClick: u = null,
15
+ currentBlock: c,
16
+ blocks: b,
27
17
  blockViewTitle: v,
28
- blockLabel: f
18
+ blockLabel: $
29
19
  }) => {
30
- const [k, d] = x(0);
31
- T(() => {
32
- if (!i)
20
+ const [p, h] = B(0);
21
+ C(() => {
22
+ if (!c)
33
23
  return;
34
- const c = R(i, t);
35
- d(c);
36
- }, [i, t]);
37
- const N = L(() => s * t, [s, t]), $ = (c) => {
38
- b && b(c, i ?? void 0);
39
- }, w = ({ row: c, column: r }) => _.length === 0 ? !0 : _.some((a) => a.position?.row === c && a.position?.column === r);
40
- return /* @__PURE__ */ g("div", { className: o.grid, children: [
41
- !u && /* @__PURE__ */ l(B, { level: 1, bold: !0, className: o.black, children: v }),
42
- /* @__PURE__ */ l("div", { className: o.blockLayout, style: { width: `${m}rem`, height: `${m}rem` }, children: Array.from({ length: s }).map((c, r) => /* @__PURE__ */ l("div", { className: o.blockRow, children: Array.from({ length: t }).map((a, n) => {
43
- const e = t * r + n + 1;
44
- return /* @__PURE__ */ l(
24
+ const o = D(c, t);
25
+ h(o);
26
+ }, [c, t]);
27
+ const g = A(() => s * t, [s, t]), w = (o) => {
28
+ u && u(o, c ?? void 0);
29
+ }, x = ({ row: o, column: l }) => b.length === 0 ? !0 : b.some((a) => a.position?.row === o && a.position?.column === l);
30
+ return /* @__PURE__ */ f("div", { className: e.grid, children: [
31
+ !n && /* @__PURE__ */ i(E, { level: 1, bold: !0, className: e.black, children: v }),
32
+ /* @__PURE__ */ i("div", { className: e.blockLayout, style: { width: `${d}rem`, height: `${d}rem` }, children: Array.from({ length: s }).map((o, l) => /* @__PURE__ */ i("div", { className: e.blockRow, children: Array.from({ length: t }).map((a, m) => {
33
+ const r = t * l + m + 1;
34
+ return /* @__PURE__ */ i(
45
35
  "div",
46
36
  {
47
37
  "data-testid": "blockViewBlock",
48
- className: `${o.block} ${k === e ? o.active : ""} ${w({ row: r + 1, column: n + 1 }) ? "" : o.empty} ${p.includes(e) ? o.error : ""}`,
49
- id: `block${e}`,
50
- onClick: h ? () => {
51
- d(e), $({ row: r + 1, column: n + 1 });
38
+ className: `${e.block} ${p === r ? e.active : ""} ${x({ row: l + 1, column: m + 1 }) ? "" : e.empty} ${k.includes(r) ? e.error : ""}`,
39
+ id: `block${r}`,
40
+ onClick: N ? () => {
41
+ h(r), w({ row: l + 1, column: m + 1 });
52
42
  } : void 0,
53
- children: y && /* @__PURE__ */ l(
43
+ children: y && /* @__PURE__ */ i(
54
44
  "div",
55
45
  {
56
- className: `${o.blockText} ${k === e ? o.black : ""}`,
57
- children: e
46
+ className: `${e.blockText} ${p === r ? e.black : ""}`,
47
+ children: r
58
48
  }
59
49
  )
60
50
  },
61
- e
51
+ r
62
52
  );
63
- }) }, r)) }),
64
- !u && /* @__PURE__ */ g(C, { themeColor: "primary", level: 6, children: [
65
- N,
53
+ }) }, l)) }),
54
+ !n && /* @__PURE__ */ f(S, { themeColor: "primary", level: 6, children: [
55
+ g,
66
56
  " ",
67
- f
57
+ $
68
58
  ] })
69
59
  ] });
70
60
  };
71
61
  export {
72
- O as BlockView
62
+ R as BlockView
73
63
  };
@@ -1,30 +1,29 @@
1
1
  import "../../assets/DeleteModal.css";
2
- import "../BaseView/BaseView.js";
3
- import "../BasicHeading/BasicHeading.js";
4
- import "../BlockView/BlockView.js";
5
2
  import { jsx as et, jsxs as Ba, Fragment as Lg } from "react/jsx-runtime";
6
3
  import { Iconify as bg } from "../Iconify/Iconify.js";
7
4
  import { c as Oe } from "../../_commonjsHelpers-CT_km90n.js";
8
- import "../Disclaimer/Disclaimer.js";
9
- import "../EmptyView/EmptyView.js";
10
- import "../HashTabView/HashTabView.js";
11
- import "../HeaderFilter/HeaderFilter.js";
12
- import "../ListArea/ListArea.js";
5
+ import on, { forwardRef as Dg, useRef as Na, useImperativeHandle as Fg, useState as Ma, useEffect as rt, useCallback as Qi, useMemo as Pa } from "react";
6
+ import { P as z, r as Bg, _ as Ng, c as yr, e as Re, b as Mg } from "../../index.es-Cct4Uapb.js";
7
+ import "../../_stringToPath-BfzwTbL6.js";
8
+ import "../../_getTag-DNUtgXkb.js";
9
+ import "../../searchBar.module-9gKyrZRT.js";
10
+ import "../../listArea.module-B04TR5bj.js";
11
+ import { AvailableCustomIcons as Wa } from "../../enums/AvailableCustomIcons.js";
12
+ import "../../verticalDivider.module-C3_GL-fH.js";
13
+ import "../../baseView.module-DXWalo9p.js";
14
+ import "../../basicHeading.module-ClcvD7x2.js";
15
+ import "../../BlockView.module-8kbPxxc4.js";
16
+ import "../../disclaimer.module-BZydt-Q_.js";
17
+ import "../../HashTabView.module-BY0tbl3B.js";
18
+ import "../../HeaderFilter.module-DiBmulr5.js";
13
19
  import "../Scrollbar/Scrollbar.js";
14
- import "../SearchBar/SearchBar.js";
15
- import "../VerticalDivider/VerticalDivider.js";
16
- import { AvailableCustomIcons as Na } from "../../enums/AvailableCustomIcons.js";
17
- import "../../useBreakpoint-DROHPVxO.js";
18
- import "../../services/UtilService.js";
19
- import { P as z, r as Dg, _ as Fg, c as yr, e as Re, b as Bg } from "../../index.es-BahjEG5L.js";
20
- import on, { forwardRef as Ng, useRef as Ma, useImperativeHandle as Mg, useState as Pa, useEffect as rt, useCallback as Qi, useMemo as Wa } from "react";
21
- import { I as Ga } from "../../index.es-3I3oam0G.js";
22
- import { I as Pg } from "../../index.es-DVNdCQvl.js";
23
- import { c as Ka, _ as Ua, d as Wg } from "../../tslib.es6-BOWp4lfV.js";
24
- import { a as Ug, M as Hg, b as Gg, m as Kg, c as qg } from "../../component-DCtofpGS.js";
25
- import { B as Ha } from "../../index.es-C3EKMb0J.js";
26
- import { G as Vi } from "../../index.es-hAl7Wxm5.js";
27
- import { b as ji } from "../../index.es-z8RCxF8n.js";
20
+ import { I as Ga } from "../../index.es-InSNsV4f.js";
21
+ import { I as Pg } from "../../index.es-Cj9DW-2T.js";
22
+ import { _ as Ka, a as Ua, d as Wg } from "../../tslib.es6-CIXEwqhg.js";
23
+ import { a as Ug, M as Hg, b as Gg, m as Kg, c as qg } from "../../component-Rx4bNsGO.js";
24
+ import { B as Ha } from "../../index.es-CQ3ep412.js";
25
+ import { G as Vi } from "../../index.es-CNBieliG.js";
26
+ import { b as ji } from "../../index.es-Cm4X20_S.js";
28
27
  /**
29
28
  * @license
30
29
  * Copyright 2020 Google Inc.
@@ -847,7 +846,7 @@ const Vg = {
847
846
  returnFocusSelector: null,
848
847
  scrollable: !1,
849
848
  title: null
850
- }, Or = /* @__PURE__ */ Ng((I, v) => {
849
+ }, Or = /* @__PURE__ */ Dg((I, v) => {
851
850
  const {
852
851
  actionButton: u,
853
852
  actionIcons: E,
@@ -878,9 +877,9 @@ const Vg = {
878
877
  scrollable: Le,
879
878
  title: be,
880
879
  ...De
881
- } = I, Wt = Ma(), G = Ma();
882
- Mg(v, () => Wt.current, []);
883
- const [Kn, Vn] = Pa(), [ue, Ut] = Pa(() => gt || x);
880
+ } = I, Wt = Na(), G = Na();
881
+ Fg(v, () => Wt.current, []);
882
+ const [Kn, Vn] = Ma(), [ue, Ut] = Ma(() => gt || x);
884
883
  rt(() => {
885
884
  Ut(gt || x);
886
885
  }, [gt, x]);
@@ -900,7 +899,7 @@ const Vg = {
900
899
  const Ht = Qi((V) => {
901
900
  Qn && Qn(V);
902
901
  }, [Qn]), Gt = Qi((V) => {
903
- ie && Dg(ie), En && En(V);
902
+ ie && Bg(ie), En && En(V);
904
903
  }, [ie, En]);
905
904
  rt(() => (G.current.unlisten("MDCDialog: opening", Gn), G.current.listen("MDCDialog: opening", Gn), () => {
906
905
  G.current.unlisten("MDCDialog: opening", Gn);
@@ -913,14 +912,14 @@ const Vg = {
913
912
  }), [G, Gt]), rt(() => {
914
913
  _t ? G.current.open() : G.current.close();
915
914
  }, [G, _t]);
916
- const Rr = Wa(() => () => {
915
+ const Rr = Pa(() => () => {
917
916
  const V = {
918
917
  className: "lmnt-modal__button mdc-dialog__button",
919
918
  elevation: u?.props.elevation !== "default" ? u?.props.elevation : "flat",
920
919
  variant: u?.props.variant || "filled"
921
920
  };
922
921
  return Tn === "action" && (V["data-mdc-dialog-button-default"] = !0), Jn === "action" && (V["data-mdc-dialog-initial-focus"] = !0), V;
923
- }, [u?.props.elevation, u?.props.variant, Tn, Jn]), vt = Wa(() => () => {
922
+ }, [u?.props.elevation, u?.props.variant, Tn, Jn]), vt = Pa(() => () => {
924
923
  const V = {
925
924
  className: "lmnt-modal__button mdc-dialog__button",
926
925
  "data-mdc-dialog-action": "accept",
@@ -929,7 +928,7 @@ const Vg = {
929
928
  };
930
929
  return Tn === "primary" && (V["data-mdc-dialog-button-default"] = !0), Jn === "primary" && (V["data-mdc-dialog-initial-focus"] = !0), V;
931
930
  }, [Tn, Jn, k?.props.elevation, k?.props.variant]);
932
- return /* @__PURE__ */ on.createElement("aside", Fg({
931
+ return /* @__PURE__ */ on.createElement("aside", Ng({
933
932
  ref: Wt,
934
933
  className: yr("lmnt", "lmnt-modal", "mdc-dialog", Le && "lmnt-modal--scrollable mdc-dialog--scrollable", _n),
935
934
  role: "alertdialog"
@@ -968,7 +967,7 @@ const Vg = {
968
967
  "data-mdc-dialog-action": "close"
969
968
  }), u && !k && Re(u, Rr), k && Re(k, vt)), ue && /* @__PURE__ */ on.createElement("div", {
970
969
  className: "lmnt-modal_actions_button lmnt-dialog__actions__directional"
971
- }, /* @__PURE__ */ on.createElement("div", null, Bg(x, "lmnt-modal__button")), /* @__PURE__ */ on.createElement("div", null, Re(gt, {
970
+ }, /* @__PURE__ */ on.createElement("div", null, Mg(x, "lmnt-modal__button")), /* @__PURE__ */ on.createElement("div", null, Re(gt, {
972
971
  className: "lmnt-modal__button",
973
972
  "data-mdc-dialog-initial-focus": !0
974
973
  })))))), /* @__PURE__ */ on.createElement("div", {
@@ -4659,7 +4658,7 @@ function print() { __p += __j.call(arguments, '') }
4659
4658
  }).call(Oe);
4660
4659
  })(xr, xr.exports);
4661
4660
  var r_ = xr.exports;
4662
- const b_ = ({
4661
+ const L_ = ({
4663
4662
  title: I,
4664
4663
  confirmButtonLabel: v,
4665
4664
  cancelButtonLabel: u,
@@ -4690,7 +4689,7 @@ const b_ = ({
4690
4689
  ),
4691
4690
  dismissiveButton: /* @__PURE__ */ et(Ha, { variant: "text", label: u, onClick: () => Hn(!1) }),
4692
4691
  children: /* @__PURE__ */ Ba(Vi, { direction: "vertical", secondaryAlign: "center", children: [
4693
- x && Object.values(Na).includes(x) && /* @__PURE__ */ et(
4692
+ x && Object.values(Wa).includes(x) && /* @__PURE__ */ et(
4694
4693
  bg,
4695
4694
  {
4696
4695
  icon: x,
@@ -4698,7 +4697,7 @@ const b_ = ({
4698
4697
  className: Tr.colorDanger
4699
4698
  }
4700
4699
  ),
4701
- x && !Object.values(Na).includes(x) && /* @__PURE__ */ et(Ga, { icon: x, iconSize: "xlarge", className: Tr.colorDanger }),
4700
+ x && !Object.values(Wa).includes(x) && /* @__PURE__ */ et(Ga, { icon: x, iconSize: "xlarge", className: Tr.colorDanger }),
4702
4701
  /* @__PURE__ */ et(Vi, { direction: "vertical", children: vn ? /* @__PURE__ */ Ba(Lg, { children: [
4703
4702
  /* @__PURE__ */ et(ji, { level: 1, themeColor: "text-primary-on-background", children: E }),
4704
4703
  A && /* @__PURE__ */ et(Vi, { direction: "vertical", gap: "none", children: A.map((cn, xt) => /* @__PURE__ */ et(
@@ -4715,7 +4714,6 @@ const b_ = ({
4715
4714
  ] })
4716
4715
  }
4717
4716
  );
4718
- require("./styles/main.css");
4719
4717
  export {
4720
- b_ as DeleteModal
4718
+ L_ as DeleteModal
4721
4719
  };
@@ -1,21 +1,18 @@
1
- import "../../assets/Disclaimer.css";
2
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
3
- import { G as n } from "../../index.es-hAl7Wxm5.js";
4
- import { a as m, b as t } from "../../index.es-z8RCxF8n.js";
5
- import { I as d } from "../../index.es-3I3oam0G.js";
6
- const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7", o = {
7
- disclaimer: p,
8
- iconArea: y
9
- }, v = ({ text: a, subtext: i, icon: e, level: c = 2, bold: s = !1 }) => /* @__PURE__ */ l(
10
- n,
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { s as o } from "../../disclaimer.module-BZydt-Q_.js";
3
+ import { G as m } from "../../index.es-CNBieliG.js";
4
+ import { a as n, b as t } from "../../index.es-Cm4X20_S.js";
5
+ import { I as p } from "../../index.es-InSNsV4f.js";
6
+ const v = ({ text: a, subtext: e, icon: i, level: s = 2, bold: l = !1 }) => /* @__PURE__ */ c(
7
+ m,
11
8
  {
12
- direction: e || i ? "vertical" : "horizontal",
9
+ direction: i || e ? "vertical" : "horizontal",
13
10
  secondaryAlign: "center",
14
11
  primaryAlign: "center",
15
12
  children: [
16
- /* @__PURE__ */ r(m, { className: o.disclaimer, level: c, bold: s, children: a }),
17
- i && /* @__PURE__ */ r(t, { level: 2, children: i }),
18
- e && /* @__PURE__ */ r("div", { className: o.iconArea, children: /* @__PURE__ */ r(d, { className: o.Icon, icon: e, iconSize: "large" }) })
13
+ /* @__PURE__ */ r(n, { className: o.disclaimer, level: s, bold: l, children: a }),
14
+ e && /* @__PURE__ */ r(t, { level: 2, children: e }),
15
+ i && /* @__PURE__ */ r("div", { className: o.iconArea, children: /* @__PURE__ */ r(p, { className: o.Icon, icon: i, iconSize: "large" }) })
19
16
  ]
20
17
  }
21
18
  );
@@ -1,9 +1,9 @@
1
1
  import { jsx as k } from "react/jsx-runtime";
2
- import { P as e, c as P, _ as C } from "../../index.es-BahjEG5L.js";
2
+ import { P as e, c as P, _ as C } from "../../index.es-Cct4Uapb.js";
3
3
  import l, { forwardRef as H, useRef as T, useImperativeHandle as O, useMemo as p } from "react";
4
- import { G as E } from "../../index.es-hAl7Wxm5.js";
5
- import { d as N } from "../../index.es-z8RCxF8n.js";
6
- import { I as x } from "../../index.es-3I3oam0G.js";
4
+ import { G as E } from "../../index.es-CNBieliG.js";
5
+ import { d as N } from "../../index.es-Cm4X20_S.js";
6
+ import { I as x } from "../../index.es-InSNsV4f.js";
7
7
  const $ = {
8
8
  /**
9
9
  * Aligns the Hero contents.