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