@hortiview/shared-components 0.0.5060 → 0.0.5110

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.
@@ -1,40 +1,50 @@
1
1
  import "../../assets/ContextMenu.css";
2
2
  import { jsx as n } from "react/jsx-runtime";
3
- import { Menu as c, IconButton as m, List as r, ListItem as d } from "@element/react-components";
4
- import { useState as f, useCallback as s, useEffect as p } from "react";
5
- const y = "_menu_1rfel_1", B = {
6
- menu: y
7
- }, k = ({ triggerOpen: o = null, actions: l }) => {
8
- const [e, t] = f(!1), i = s(() => {
3
+ import { Menu as a, IconButton as m, List as r, ListItem as d } from "@element/react-components";
4
+ import { useState as f, useCallback as i, useEffect as p } from "react";
5
+ const C = "_menu_1rfel_1", k = {
6
+ menu: C
7
+ }, h = ({ triggerOpen: o = null, actions: u }) => {
8
+ const [e, t] = f(!1), c = i(() => {
9
9
  t(!e);
10
- }, [e]), u = s(() => {
10
+ }, [e]), s = i(() => {
11
11
  t(!1);
12
12
  }, []);
13
13
  return p(() => {
14
14
  t(o !== null ? o : !1);
15
15
  }, [o]), /* @__PURE__ */ n(
16
- c,
16
+ a,
17
17
  {
18
- className: B.menu,
18
+ className: k.menu,
19
19
  "data-testid": "selectionmenu",
20
20
  open: e,
21
21
  surfaceOnly: !0,
22
22
  hoistToBody: !0,
23
- onClose: u,
23
+ onClose: s,
24
24
  trigger: /* @__PURE__ */ n(
25
25
  m,
26
26
  {
27
27
  variant: e ? "filled-primary" : void 0,
28
28
  "data-testid": "openButton",
29
29
  icon: "more_vert",
30
- onClick: i
30
+ onClick: c
31
31
  }
32
32
  ),
33
- children: /* @__PURE__ */ n(r, { children: l.map((a) => /* @__PURE__ */ n(d, { ...a, leadingBlockType: "icon", "data-testid": "listItemButton" })) })
33
+ children: /* @__PURE__ */ n(r, { children: u.map((l) => /* @__PURE__ */ n(
34
+ d,
35
+ {
36
+ ...l,
37
+ leadingBlockType: "icon",
38
+ "data-testid": "listItemButton",
39
+ onClick: () => {
40
+ l?.onClick?.(), s();
41
+ }
42
+ }
43
+ )) })
34
44
  },
35
45
  "selectionmenu"
36
46
  );
37
47
  };
38
48
  export {
39
- k as ContextMenu
49
+ h as ContextMenu
40
50
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/shared-components",
3
3
  "description": "This is a shared component library. It should used in the HortiView platform and its modules.",
4
- "version": "0.0.5060",
4
+ "version": "0.0.5110",
5
5
  "type": "module",
6
6
  "repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
7
7
  "author": "Falk Menge <falk.menge.ext@bayer.com>",