@hortiview/shared-components 2.23.4 → 2.23.5

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.23.5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.23.4...v2.23.5) (2026-04-27)
2
+
3
+ ### Code Refactoring
4
+
5
+ * enhance BaseView element selection logic and add click handler for story elements ([85039d1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/85039d1d4a6f6b29392eb7616b068c28fd0c777d))
6
+
1
7
  ## [2.23.4](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.23.3...v2.23.4) (2026-04-21)
2
8
 
3
9
  ### Bug Fixes
@@ -2,9 +2,9 @@ import { jsx as e, Fragment as d, jsxs as c } from "react/jsx-runtime";
2
2
  import { D as V } from "../../index.es-C27R5Xae.js";
3
3
  import { G as l } from "../../index.es-Z0aF-7Cn.js";
4
4
  import { P as $ } from "../../index.es-DgncYOqO.js";
5
- import { c as g } from "../../index-Df2FYN-K.js";
5
+ import { c as w } from "../../index-Df2FYN-K.js";
6
6
  import { useMemo as n } from "react";
7
- import { BasicHeading as w } from "../BasicHeading/BasicHeading.js";
7
+ import { BasicHeading as v } from "../BasicHeading/BasicHeading.js";
8
8
  import { EmptyView as F } from "../EmptyView/EmptyView.js";
9
9
  import { ListArea as M } from "../ListArea/ListArea.js";
10
10
  import { useBreakpoints as P } from "../../hooks/useBreakpoints.js";
@@ -21,27 +21,27 @@ import '../../assets/BaseView.css';const z = "_fullHeight_1yui7_1", J = "_fullWi
21
21
  desktopDetail: Y
22
22
  }, ut = ({
23
23
  heading: u,
24
- action: f = /* @__PURE__ */ e(d, {}),
25
- hint: v = /* @__PURE__ */ e(d, {}),
26
- elements: r,
27
- emptyText: m,
28
- hasSearch: D = !0,
29
- isSorted: k = !0,
30
- className: y,
31
- withAvatar: L = !1,
32
- listMaxHeight: b = "calc(100vh - 220px)",
33
- titleLevel: H = 5,
34
- detailTitleLevel: N,
24
+ action: m = /* @__PURE__ */ e(d, {}),
25
+ hint: D = /* @__PURE__ */ e(d, {}),
26
+ elements: f,
27
+ emptyText: h,
28
+ hasSearch: k = !0,
29
+ isSorted: y = !0,
30
+ className: L,
31
+ withAvatar: b = !1,
32
+ listMaxHeight: H = "calc(100vh - 220px)",
33
+ titleLevel: N = 5,
34
+ detailTitleLevel: W,
35
35
  pathname: s,
36
- basicHeadingIcon: W,
37
- isOnline: h = !0,
38
- offlineViewProps: p,
39
- noRoundedListItemEdges: _ = !0,
40
- routerLinkElement: B,
41
- searchPlaceholder: x,
42
- isGrouped: R = !1
36
+ basicHeadingIcon: B,
37
+ isOnline: p = !0,
38
+ offlineViewProps: _,
39
+ noRoundedListItemEdges: g = !0,
40
+ routerLinkElement: x,
41
+ searchPlaceholder: R,
42
+ isGrouped: A = !1
43
43
  }) => {
44
- const { isDesktopNavbar: o, isDesktop: A } = P(), t = n(() => r.find((a) => a.route === s), [s, r]), C = n(() => r.filter((a) => a.isAllowed !== !1), [r]), I = n(() => h ? t?.component ? t.component : o ? /* @__PURE__ */ e($, { className: i.fullWidth, children: /* @__PURE__ */ e(F, { title: m }) }) : /* @__PURE__ */ e(d, {}) : /* @__PURE__ */ e(T, { ...p, fullWidth: !0 }), [t?.component, m, o, h, p]), { showList: S, showDetail: E } = n(() => o ? { showList: !0, showDetail: !0 } : { showList: !t, showDetail: !!t }, [t, o]), { ref: j, hasScrolled: G } = q([
44
+ const { isDesktopNavbar: o, isDesktop: C } = P(), r = n(() => f.filter((a) => a.isAllowed !== !1), [f]), t = n(() => r.length === 1 ? r?.at(0) : r.find((a) => a.route === s), [s, r]), I = n(() => p ? t?.component ? t.component : o ? /* @__PURE__ */ e($, { className: i.fullWidth, children: /* @__PURE__ */ e(F, { title: h }) }) : /* @__PURE__ */ e(d, {}) : /* @__PURE__ */ e(T, { ..._, fullWidth: !0 }), [t?.component, h, o, p, _]), { showList: S, showDetail: E } = n(() => o ? { showList: !0, showDetail: !0 } : { showList: !t, showDetail: !!t }, [t, o]), { ref: j, hasScrolled: G } = q([
45
45
  s,
46
46
  o
47
47
  ]);
@@ -49,7 +49,7 @@ import '../../assets/BaseView.css';const z = "_fullHeight_1yui7_1", J = "_fullWi
49
49
  l,
50
50
  {
51
51
  "data-testid": "base-view-container",
52
- className: `${A ? i.fullHeight : ""} ${y ?? ""}`,
52
+ className: `${C ? i.fullHeight : ""} ${L ?? ""}`,
53
53
  fullWidth: !0,
54
54
  children: [
55
55
  S && /* @__PURE__ */ c(
@@ -58,37 +58,37 @@ import '../../assets/BaseView.css';const z = "_fullHeight_1yui7_1", J = "_fullWi
58
58
  "data-testid": "show-list-container",
59
59
  gap: "none",
60
60
  direction: "vertical",
61
- className: g(
61
+ className: w(
62
62
  i.list,
63
63
  o && i.desktopList,
64
- _ && i.noRoundedCorners
64
+ g && i.noRoundedCorners
65
65
  ),
66
66
  children: [
67
67
  u && /* @__PURE__ */ e(
68
- w,
68
+ v,
69
69
  {
70
- icon: W,
70
+ icon: B,
71
71
  "data-testid": "heading",
72
72
  heading: u,
73
- level: H,
73
+ level: N,
74
74
  marginBottom: 0,
75
75
  inList: !0,
76
- children: f
76
+ children: m
77
77
  }
78
78
  ),
79
- v,
79
+ D,
80
80
  /* @__PURE__ */ e(
81
81
  M,
82
82
  {
83
- hasLastItemNoRoundedEdges: _,
84
- elements: C,
85
- hasSearch: D,
86
- maxHeight: b,
87
- isSorted: k,
83
+ hasLastItemNoRoundedEdges: g,
84
+ elements: r,
85
+ hasSearch: k,
86
+ maxHeight: H,
87
+ isSorted: y,
88
88
  pathname: s,
89
- routerLinkElement: B,
90
- searchPlaceholder: x,
91
- isGrouped: R
89
+ routerLinkElement: x,
90
+ searchPlaceholder: R,
91
+ isGrouped: A
92
92
  }
93
93
  )
94
94
  ]
@@ -100,20 +100,20 @@ import '../../assets/BaseView.css';const z = "_fullHeight_1yui7_1", J = "_fullWi
100
100
  "data-testid": "show-details-container",
101
101
  gap: "none",
102
102
  direction: "vertical",
103
- className: g(i.detail, o && i.desktopDetail),
103
+ className: w(i.detail, o && i.desktopDetail),
104
104
  children: [
105
105
  /* @__PURE__ */ e(
106
- w,
106
+ v,
107
107
  {
108
108
  className: i.heading,
109
109
  heading: t?.detailTitle ?? t?.title ?? "",
110
- level: N,
110
+ level: W,
111
111
  icon: t?.hideIconInDetail === !0 ? void 0 : t?.detailIcon ?? t?.icon,
112
112
  marginBottom: 0,
113
113
  invisibleButton: t?.detailAction === void 0,
114
- withAvatar: L,
114
+ withAvatar: b,
115
115
  subHeading: t?.detailSubTitle,
116
- children: t?.detailAction ?? f
116
+ children: t?.detailAction ?? m
117
117
  }
118
118
  ),
119
119
  G && /* @__PURE__ */ e(V, {}),
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": "2.23.4",
4
+ "version": "2.23.5",
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>",