@hortiview/shared-components 2.3.0 → 2.5.0

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 (115) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +11 -0
  3. package/dist/{AlertBanner-75jjene1.js → AlertBanner-JnX0tJGC.js} +9 -9
  4. package/dist/{BigLoadingSpinner-BbXMCKpm.js → BigLoadingSpinner-chQoiNY9.js} +1 -1
  5. package/dist/{GenericCard-BFYKwkzI.js → GenericCard-c9yuyN3m.js} +3 -3
  6. package/dist/ListAreaService-BY6ZTds9.js +124 -0
  7. package/dist/OfflineView-HbuDPpQL.js +48 -0
  8. package/dist/{_MapCache-B75yWNNd.js → _MapCache-B75dXJyg.js} +2 -2
  9. package/dist/_baseIsEqual-CZNn3LMM.js +241 -0
  10. package/dist/_getAllKeys-tc1bcd1W.js +86 -0
  11. package/dist/{_getTag-BCf9b56Z.js → _getTag-DYHrLaIw.js} +2 -2
  12. package/dist/_setToString-Do1lSQTZ.js +2034 -0
  13. package/dist/assets/ContextMenu.css +1 -1
  14. package/dist/assets/ListAreaService.css +1 -1
  15. package/dist/assets/OfflineView.css +1 -0
  16. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  17. package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
  18. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  19. package/dist/components/BaseView/BaseView.d.ts +14 -1
  20. package/dist/components/BaseView/BaseView.js +47 -41
  21. package/dist/components/BaseView/BaseView.test.js +51 -34
  22. package/dist/components/BasicHeading/BasicHeading.js +2 -2
  23. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  24. package/dist/components/BlockView/BlockView.js +1 -1
  25. package/dist/components/ChipCard/ChipCard.js +4 -4
  26. package/dist/components/ContextMenu/ContextMenu.d.ts +12 -1
  27. package/dist/components/ContextMenu/ContextMenu.js +40 -36
  28. package/dist/components/ContextMenu/ContextMenu.test.js +42 -19
  29. package/dist/components/DeleteModal/DeleteModal.d.ts +13 -1
  30. package/dist/components/DeleteModal/DeleteModal.js +53 -49
  31. package/dist/components/DeleteModal/DeleteModal.test.js +35 -11
  32. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  33. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  34. package/dist/components/EmptyView/EmptyView.js +4 -4
  35. package/dist/components/Filter/Filter.js +17 -16
  36. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  37. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4 -4
  38. package/dist/components/FormComponents/FormNumber/CustomTextField.js +13 -12
  39. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  40. package/dist/components/FormComponents/FormSelect/FormSelect.js +1 -1
  41. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  42. package/dist/components/FormComponents/FormSlider/FormSlider.js +4 -4
  43. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  44. package/dist/components/FormComponents/FormToggle/FormToggle.js +3 -3
  45. package/dist/components/GenericTable/GenericTable.d.ts +3 -1
  46. package/dist/components/GenericTable/GenericTable.js +2013 -2030
  47. package/dist/components/GenericTable/GenericTable.test.js +36 -6
  48. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  49. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  50. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  51. package/dist/components/HashTabView/HashTabView.js +6 -6
  52. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  53. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +4 -4
  54. package/dist/components/Iconify/Iconify.js +2 -2
  55. package/dist/components/InfoGroup/InfoGroup.js +3 -3
  56. package/dist/components/ListArea/ListArea.js +36 -35
  57. package/dist/components/ListArea/ListArea.test.js +14 -9
  58. package/dist/components/ListArea/ListAreaService.js +9 -7
  59. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  60. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  61. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +6 -6
  62. package/dist/components/Modal/Modal.d.ts +6 -1
  63. package/dist/components/Modal/Modal.js +134 -118
  64. package/dist/components/ModulePadding/ModulePadding.js +9 -8
  65. package/dist/components/OfflineView/OfflineView.d.ts +68 -0
  66. package/dist/components/OfflineView/OfflineView.js +9 -0
  67. package/dist/components/OfflineView/OfflineView.test.d.ts +1 -0
  68. package/dist/components/OfflineView/OfflineView.test.js +24 -0
  69. package/dist/components/OnboardingBanner/OnboardingBanner.js +7 -7
  70. package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
  71. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  72. package/dist/components/SearchBar/SearchBar.js +2 -2
  73. package/dist/components/Select/Select.js +1 -1
  74. package/dist/components/Stepper/Stepper.js +1 -1
  75. package/dist/components/Stepper/components/StepperButton.js +1 -1
  76. package/dist/components/Stepper/components/StepperHeader.js +2 -2
  77. package/dist/components/Stepper/components/StepperIndicator.js +1 -1
  78. package/dist/{get-DFv1gXfq.js → get-B8c-T4F8.js} +1 -1
  79. package/dist/{get-7ACccM2X.js → get-C7KpEkVs.js} +1 -1
  80. package/dist/hooks/useHelperText.js +1 -1
  81. package/dist/{index.es-D54RuMc_.js → index.es--yyG47az.js} +2 -2
  82. package/dist/{index.es-DKDgy7Kt.js → index.es-6c1Xbl0N.js} +1 -1
  83. package/dist/{index.es-BWgXLqXn.js → index.es-BTc2I5pe.js} +2 -2
  84. package/dist/{index.es-BtjV0oNv.js → index.es-Bf149BSP.js} +4 -4
  85. package/dist/{index.es-CoFul5zR.js → index.es-BoWmBoqO.js} +8 -8
  86. package/dist/{index.es-CiqbARoC.js → index.es-Bx1E5MPK.js} +4 -4
  87. package/dist/{index.es-fnFnw2P1.js → index.es-CPqaUyn3.js} +10 -10
  88. package/dist/{index.es-25EARqhH.js → index.es-CUuzYysw.js} +4 -4
  89. package/dist/{index.es-DntoATwO.js → index.es-CbBdaRO2.js} +2 -2
  90. package/dist/{index.es-8GOVkuo-.js → index.es-CqgVUhln.js} +3 -3
  91. package/dist/{index.es-BNHI3ZIK.js → index.es-CzUKBF7E.js} +10 -10
  92. package/dist/{index.es-D-CKRzIB.js → index.es-D-ph6ImM.js} +1 -1
  93. package/dist/{index.es-6TJ1S8Jr.js → index.es-DDo_AHL0.js} +7 -7
  94. package/dist/{index.es-3043KTnb.js → index.es-DErA6zWG.js} +2 -2
  95. package/dist/{index.es-h2lMdt7G.js → index.es-DF11ERDs.js} +2 -2
  96. package/dist/{index.es-B-_jXDuz.js → index.es-DMGNht46.js} +1 -1
  97. package/dist/{index.es-Dvj_qpAp.js → index.es-DOX4XTz_.js} +2 -2
  98. package/dist/index.es-DlzwTKbh.js +311 -0
  99. package/dist/{index.es-CL_Heu1n.js → index.es-DxDU9C_B.js} +1 -1
  100. package/dist/{index.es-0lQcz8m1.js → index.es-Kg9soDed.js} +3 -3
  101. package/dist/{index.es-41ztjcFT.js → index.es-U5-b20Gv.js} +4 -4
  102. package/dist/{index.es-BvrQnJ3j.js → index.es-oOD85ZwA.js} +4 -4
  103. package/dist/{index.es-D6N-XWHe.js → index.es-zQBuWUgU.js} +2 -2
  104. package/dist/{isEmpty-B4GG2s-V.js → isEmpty-DsdC9UUD.js} +2 -2
  105. package/dist/main.d.ts +1 -0
  106. package/dist/main.js +66 -64
  107. package/dist/omit-1Eom1PmQ.js +366 -0
  108. package/dist/{orderBy-Bd48bw88.js → orderBy-CyjsW2ET.js} +31 -30
  109. package/dist/types/GenericTable.d.ts +9 -0
  110. package/dist/types/ListElement.d.ts +23 -9
  111. package/package.json +1 -1
  112. package/dist/ListAreaService-BVtuBN0K.js +0 -110
  113. package/dist/_baseIsEqual-D0Dsajdb.js +0 -317
  114. package/dist/identity-DLWZln-X.js +0 -1763
  115. package/dist/index.es-da0cf7oE.js +0 -569
@@ -1 +1 @@
1
- ._menu_ol91v_1{width:15.875rem}._icon_ol91v_5{color:var(--lmnt-theme-on-secondary-inactive)}._listItem_ol91v_9 [class*=mdc-list-item__start]{color:var(--lmnt-theme-on-secondary-inactive);align-self:center!important;margin:0 1rem!important}._listItem_ol91v_9 [class*=mdc-list-item__end]{color:var(--lmnt-theme-on-secondary-inactive)}
1
+ ._menu_1xwk3_1{width:15.875rem}._icon_1xwk3_5{color:var(--lmnt-theme-on-secondary-inactive)}._listItem_1xwk3_9 [class*=mdc-list-item__start]{color:var(--lmnt-theme-on-secondary-inactive);align-self:center!important;margin:0 1rem!important}._listItem_1xwk3_9 [class*=mdc-list-item__end]{color:var(--lmnt-theme-on-secondary-inactive)}._offlineViewMargin_1xwk3_19{margin:.5rem}
@@ -1 +1 @@
1
- ._fullWidth_zewqs_1{width:100%}._mainElevation_zewqs_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_zewqs_11 div{border:none}._searchbar_zewqs_11 button{margin-right:.5rem}._roundedBottom_zewqs_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_zewqs_24 [class*=mdc-list-item__primary-text]{display:none!important}._list_zewqs_28{padding-top:0;padding-bottom:0;overflow-y:auto}._list_zewqs_28 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_zewqs_28::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 .25rem rgba(0,0,0,.2);border-radius:.5rem;margin-right:.25rem;background-color:var(--lmnt-theme-background)}._list_zewqs_28::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_zewqs_28::-webkit-scrollbar-thumb{border-radius:.5rem;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--lmnt-theme-primary-on-surface)}._listItem_zewqs_56{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_zewqs_56 i:not(._trailingIcon_zewqs_60){color:var(--lmnt-theme-on-surface-inactive)}._listItem_zewqs_56 i._trailingIcon_zewqs_60{color:var(--lmnt-theme-on-surface-disabled)}._listItem_zewqs_56 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_zewqs_72{height:4.5rem!important}._iconColor_zewqs_76{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_zewqs_80 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._noOverlineTitle_zewqs_85 [class*=mdc-list-item__secondary-text] [class*=lmnt-group]{margin-top:-.875rem}._truncate_zewqs_89{display:-webkit-box!important;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%;word-break:break-all}._truncateOverlineText_zewqs_100{margin-bottom:-1rem!important;margin-top:-1rem!important}
1
+ ._fullWidth_v1ae9_1{width:100%}._mainElevation_v1ae9_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_v1ae9_11 div{border:none}._searchbar_v1ae9_11 button{margin-right:.5rem}._roundedBottom_v1ae9_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_v1ae9_24 [class*=mdc-list-item__primary-text]{display:none!important}._list_v1ae9_28{padding-top:0;padding-bottom:0;overflow-y:auto}._list_v1ae9_28 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_v1ae9_28::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 .25rem rgba(0,0,0,.2);border-radius:.5rem;margin-right:.25rem;background-color:var(--lmnt-theme-background)}._list_v1ae9_28::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_v1ae9_28::-webkit-scrollbar-thumb{border-radius:.5rem;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--lmnt-theme-primary-on-surface)}._listItem_v1ae9_56{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_v1ae9_56 i:not(._trailingIcon_v1ae9_60){color:var(--lmnt-theme-on-surface-inactive)}._listItem_v1ae9_56 i._trailingIcon_v1ae9_60{color:var(--lmnt-theme-on-surface-disabled)}._listItem_v1ae9_56 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_v1ae9_72{height:4.5rem!important}._noGroupHeaderMargin_v1ae9_76 h3{margin:0}._indentGroupedElement_v1ae9_80{padding-left:2.5rem!important}._isNotSelected_v1ae9_84 [class*=mdc-list-item__ripple]:before{opacity:inherit!important;background-color:inherit!important}._isSelected_v1ae9_89 [class*=mdc-list-item__ripple]:before{opacity:.2!important;background-color:var(--lmnt-theme-primary)!important}._iconColor_v1ae9_94{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_v1ae9_98 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._noOverlineTitle_v1ae9_103 [class*=mdc-list-item__secondary-text] [class*=lmnt-group]{margin-top:-.875rem}._truncate_v1ae9_107{display:-webkit-box!important;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%;word-break:break-all}._truncateOverlineText_v1ae9_118{margin-bottom:-1rem!important;margin-top:-1rem!important}
@@ -0,0 +1 @@
1
+ ._gap_18we6_1{gap:.125rem!important}._container_18we6_5{border-radius:.5rem;padding:2.5rem 2rem;width:auto}._bgWhite_18we6_11{background:var(--lmnt-theme-surface);color:var(--lmnt-theme-on-surface-active)}._bgGrey_18we6_16{background:var(--lmnt-theme-surface-variant);color:var(--lmnt-theme-on-surface-active)}._subtitle_18we6_21{color:var(--on-colors-on-surface-inactive-medium, #000000BA);font-weight:500}
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
- import "../../index.es-DntoATwO.js";
3
- import "../../index.es-3043KTnb.js";
4
- import "../../index.es-D54RuMc_.js";
5
- import { A as e } from "../../AlertBanner-75jjene1.js";
2
+ import "../../index.es-CbBdaRO2.js";
3
+ import "../../index.es-DErA6zWG.js";
4
+ import "../../index.es--yyG47az.js";
5
+ import { A as e } from "../../AlertBanner-JnX0tJGC.js";
6
6
  export {
7
7
  e as AlertBanner
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, Fragment as m } from "react/jsx-runtime";
2
2
  import { a as t, s } from "../../react.esm-CX1WJ2Pp.js";
3
3
  import { a as o } from "../../useBreakpoints-MzTZ0tCT.js";
4
- import { A as n } from "../../AlertBanner-75jjene1.js";
4
+ import { A as n } from "../../AlertBanner-JnX0tJGC.js";
5
5
  import { d as p, b as c, a as l, t as r, g as a } from "../../vi.CjhMlMwf-CKxPQtd6.js";
6
6
  p("AlertBanner Test", () => {
7
7
  c(() => {
@@ -1,8 +1,8 @@
1
1
  import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
- import { G as l } from "../../index.es-DntoATwO.js";
3
- import { T as s } from "../../index.es-D54RuMc_.js";
2
+ import { G as l } from "../../index.es-CbBdaRO2.js";
3
+ import { T as s } from "../../index.es--yyG47az.js";
4
4
  import { Iconify as p } from "../Iconify/Iconify.js";
5
- import { A as m, s as c } from "../../AlertBanner-75jjene1.js";
5
+ import { A as m, s as c } from "../../AlertBanner-JnX0tJGC.js";
6
6
  const g = ({
7
7
  text: n,
8
8
  color: o = "info",
@@ -1,11 +1,16 @@
1
1
  import { BaseListElement } from '../../types/ListElement';
2
2
  import { LinkProps } from '../../types/internal/ReactRouterTypes';
3
+ import { OfflineViewProps } from '../OfflineView/OfflineView';
3
4
 
4
5
  type BaseViewProps = {
5
6
  /**
6
7
  * elements to be displayed in the list area
7
8
  */
8
9
  elements: BaseListElement[];
10
+ /**
11
+ * isGrouped is true if the list should be grouped, @default false
12
+ */
13
+ isGrouped?: boolean;
9
14
  /**
10
15
  * text to be displayed when the list is empty
11
16
  */
@@ -50,6 +55,14 @@ type BaseViewProps = {
50
55
  * searchPlaceholder is the placeholder of the search input, @default ''
51
56
  */
52
57
  searchPlaceholder?: string;
58
+ /**
59
+ * Whether the user is online; shows OfflineView when false.
60
+ */
61
+ isOnline?: boolean;
62
+ /**
63
+ * Props forwarded to <OfflineView /> when offline.
64
+ */
65
+ offlineViewProps?: Partial<OfflineViewProps>;
53
66
  /**
54
67
  * routerLinkElement is the element to be used for the elements link, use react-router Link component for the best experience.
55
68
  * If the element has `noNavigation=false` and the `routerLinkElement` is undefined an `<a>` tag is used.
@@ -62,5 +75,5 @@ type BaseViewProps = {
62
75
  /**
63
76
  * `BaseView` is a layout component that displays a main (a list) and a detail section.
64
77
  */
65
- export declare const BaseView: ({ heading, action, hint, elements, emptyText, hasSearch, isSorted, className, withAvatar, listMaxHeight, pathname, routerLinkElement, searchPlaceholder, }: BaseViewProps) => import("react/jsx-runtime").JSX.Element;
78
+ export declare const BaseView: ({ heading, action, hint, elements, emptyText, hasSearch, isSorted, className, withAvatar, listMaxHeight, pathname, isOnline, offlineViewProps, routerLinkElement, searchPlaceholder, isGrouped }: BaseViewProps) => import("react/jsx-runtime").JSX.Element;
66
79
  export {};
@@ -1,70 +1,75 @@
1
1
  import { jsx as i, Fragment as d, jsxs as s } from "react/jsx-runtime";
2
- import { G as r } from "../../index.es-DntoATwO.js";
2
+ import { G as r } from "../../index.es-CbBdaRO2.js";
3
3
  import { useMemo as a } from "react";
4
- import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
5
- import { EmptyView as W } from "../EmptyView/EmptyView.js";
6
- import { ListArea as B } from "../ListArea/ListArea.js";
7
- import { u as G } from "../../useBreakpoints-MzTZ0tCT.js";
8
- import { VerticalDivider as N } from "../VerticalDivider/VerticalDivider.js";
9
- import '../../assets/BaseView.css';const A = "_parentGroup_w7vsz_1", V = "_divider_w7vsz_5", j = "_maxWidth_w7vsz_10", E = "_desktopList_w7vsz_14", H = "_mobileList_w7vsz_19", I = "_desktopDetail_w7vsz_23", $ = "_mobileDetail_w7vsz_28", o = {
10
- parentGroup: A,
11
- divider: V,
12
- maxWidth: j,
13
- desktopList: E,
14
- mobileList: H,
15
- desktopDetail: I,
16
- mobileDetail: $
17
- }, P = ({
4
+ import { BasicHeading as h } from "../BasicHeading/BasicHeading.js";
5
+ import { EmptyView as N } from "../EmptyView/EmptyView.js";
6
+ import { ListArea as A } from "../ListArea/ListArea.js";
7
+ import { u as H } from "../../useBreakpoints-MzTZ0tCT.js";
8
+ import { VerticalDivider as V } from "../VerticalDivider/VerticalDivider.js";
9
+ import { O as j } from "../../OfflineView-HbuDPpQL.js";
10
+ import '../../assets/BaseView.css';const E = "_parentGroup_w7vsz_1", I = "_divider_w7vsz_5", $ = "_maxWidth_w7vsz_10", y = "_desktopList_w7vsz_14", F = "_mobileList_w7vsz_19", M = "_desktopDetail_w7vsz_23", O = "_mobileDetail_w7vsz_28", o = {
11
+ parentGroup: E,
12
+ divider: I,
13
+ maxWidth: $,
14
+ desktopList: y,
15
+ mobileList: F,
16
+ desktopDetail: M,
17
+ mobileDetail: O
18
+ }, X = ({
18
19
  heading: c,
19
20
  action: m = /* @__PURE__ */ i(d, {}),
20
- hint: v = /* @__PURE__ */ i(d, {}),
21
+ hint: _ = /* @__PURE__ */ i(d, {}),
21
22
  elements: n,
22
- emptyText: p,
23
- hasSearch: _ = !0,
24
- isSorted: h = !0,
25
- className: f,
26
- withAvatar: b = !1,
27
- listMaxHeight: w = "calc(100vh - 200px)",
23
+ emptyText: u,
24
+ hasSearch: f = !0,
25
+ isSorted: b = !0,
26
+ className: g,
27
+ withAvatar: w = !1,
28
+ listMaxHeight: D = "calc(100vh - 200px)",
28
29
  pathname: l,
29
- routerLinkElement: D,
30
- searchPlaceholder: g
30
+ isOnline: p = !0,
31
+ offlineViewProps: v,
32
+ routerLinkElement: k,
33
+ searchPlaceholder: L,
34
+ isGrouped: x = !1
31
35
  }) => {
32
- const { isDesktopNavbar: e } = G(), t = a(() => n.find((z) => z.route === l), [l, n]), k = a(() => t?.component ?? (e ? /* @__PURE__ */ i(W, { subtitle: p }) : /* @__PURE__ */ i(d, {})), [t, e, p]), L = a(() => e ? !0 : !t, [t, e]), x = a(() => e ? !0 : t, [t, e]);
36
+ const { isDesktopNavbar: e } = H(), t = a(() => n.find((G) => G.route === l), [l, n]), W = a(() => p ? t?.component ?? (e ? /* @__PURE__ */ i(N, { subtitle: u }) : /* @__PURE__ */ i(d, {})) : /* @__PURE__ */ i(j, { ...v, fullWidth: !0 }), [t?.component, u, e, p, v]), z = a(() => e ? !0 : !t, [t, e]), B = a(() => e ? !0 : t, [t, e]);
33
37
  return /* @__PURE__ */ s(
34
38
  r,
35
39
  {
36
40
  "data-testid": "base-view-container",
37
- className: `${o.parentGroup} ${f ?? ""}`,
41
+ className: `${o.parentGroup} ${g ?? ""}`,
38
42
  gap: "none",
39
43
  fullWidth: !0,
40
44
  children: [
41
- L && /* @__PURE__ */ i(r, { gap: "none", className: e ? o.desktopList : o.mobileList, children: /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, gap: e ? "standard" : "dense", children: [
42
- c && /* @__PURE__ */ i(u, { "data-testid": "heading", heading: c, level: 4, marginBottom: 0, children: m }),
43
- v,
45
+ z && /* @__PURE__ */ i(r, { gap: "none", className: e ? o.desktopList : o.mobileList, children: /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, gap: e ? "standard" : "dense", children: [
46
+ c && /* @__PURE__ */ i(h, { "data-testid": "heading", heading: c, level: 4, marginBottom: 0, children: m }),
47
+ _,
44
48
  /* @__PURE__ */ i(
45
- B,
49
+ A,
46
50
  {
47
51
  elements: n,
48
- hasSearch: _,
49
- maxHeight: w,
50
- isSorted: h,
52
+ hasSearch: f,
53
+ maxHeight: D,
54
+ isSorted: b,
51
55
  pathname: l,
52
- routerLinkElement: D,
53
- searchPlaceholder: g
56
+ routerLinkElement: k,
57
+ searchPlaceholder: L,
58
+ isGrouped: x
54
59
  }
55
60
  )
56
61
  ] }) }),
57
- x && /* @__PURE__ */ s(
62
+ B && /* @__PURE__ */ s(
58
63
  r,
59
64
  {
60
65
  "data-testid": "details",
61
66
  gap: "none",
62
67
  className: e ? o.desktopDetail : o.mobileDetail,
63
68
  children: [
64
- e && /* @__PURE__ */ i(N, { className: o.divider, height: "100%" }),
69
+ e && /* @__PURE__ */ i(V, { className: o.divider, height: "100%" }),
65
70
  /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, children: [
66
71
  /* @__PURE__ */ i(
67
- u,
72
+ h,
68
73
  {
69
74
  className: o.maxWidth,
70
75
  heading: t?.detailTitle ?? t?.title ?? "",
@@ -72,11 +77,12 @@ import '../../assets/BaseView.css';const A = "_parentGroup_w7vsz_1", V = "_divid
72
77
  icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
73
78
  marginBottom: 0,
74
79
  invisibleButton: t?.detailAction === void 0,
75
- withAvatar: b,
80
+ withAvatar: w,
81
+ subHeading: t?.detailSubTitle,
76
82
  children: t?.detailAction ?? m
77
83
  }
78
84
  ),
79
- k
85
+ W
80
86
  ] })
81
87
  ]
82
88
  }
@@ -86,5 +92,5 @@ import '../../assets/BaseView.css';const A = "_parentGroup_w7vsz_1", V = "_divid
86
92
  );
87
93
  };
88
94
  export {
89
- P as BaseView
95
+ X as BaseView
90
96
  };
@@ -1,10 +1,10 @@
1
- import { jsx as a, Fragment as s } from "react/jsx-runtime";
2
- import { a as r, s as e, f as p } from "../../react.esm-CX1WJ2Pp.js";
1
+ import { jsx as o, Fragment as s } from "react/jsx-runtime";
2
+ import { a as n, s as e, f as p } from "../../react.esm-CX1WJ2Pp.js";
3
3
  import { a as l } from "../../useBreakpoints-MzTZ0tCT.js";
4
- import { BaseView as i } from "./BaseView.js";
5
- import { d as u, b as m, a as c, t as n, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
4
+ import { BaseView as r } from "./BaseView.js";
5
+ import { d as u, b as f, a as c, t as i, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
6
6
  u("BaseView Test", () => {
7
- m(() => {
7
+ f(() => {
8
8
  c.spyOn(l, "useBreakpoints").mockReturnValue({
9
9
  isMobile: !1,
10
10
  isTablet: !1,
@@ -12,20 +12,20 @@ u("BaseView Test", () => {
12
12
  isDesktopNavbar: !0
13
13
  });
14
14
  });
15
- const o = [
15
+ const a = [
16
16
  {
17
17
  id: "1",
18
18
  title: "user.personal_information",
19
19
  icon: "account_circle",
20
20
  route: "/personal-profile/personal-information",
21
- component: /* @__PURE__ */ a(s, { children: "Personal information selected" })
21
+ component: /* @__PURE__ */ o(s, { children: "Personal information selected" })
22
22
  },
23
23
  {
24
24
  id: "2",
25
25
  title: "user.data_privacy",
26
26
  icon: "privacy_tip",
27
27
  route: "/personal-profile/data-privacy",
28
- component: /* @__PURE__ */ a(s, { children: "Data Privacy selected" }),
28
+ component: /* @__PURE__ */ o(s, { children: "Data Privacy selected" }),
29
29
  detailTitle: "Data Privacy 2000",
30
30
  hideIconInDetail: !0
31
31
  },
@@ -34,16 +34,16 @@ u("BaseView Test", () => {
34
34
  title: "user.security",
35
35
  icon: "security",
36
36
  route: "/personal-profile/security",
37
- component: /* @__PURE__ */ a(s, { children: "Security selected" })
37
+ component: /* @__PURE__ */ o(s, { children: "Security selected" })
38
38
  }
39
39
  ];
40
- n("render BaseView with empty view and navigation list", () => {
41
- r(
42
- /* @__PURE__ */ a(
43
- i,
40
+ i("render BaseView with empty view and navigation list", () => {
41
+ n(
42
+ /* @__PURE__ */ o(
43
+ r,
44
44
  {
45
45
  pathname: "/personal-profile",
46
- elements: o,
46
+ elements: a,
47
47
  heading: "user.personal-profile",
48
48
  hasSearch: !1,
49
49
  emptyText: "user.noselection",
@@ -52,13 +52,13 @@ u("BaseView Test", () => {
52
52
  }
53
53
  )
54
54
  ), t(e.getByText("user.noselection")).toBeInTheDocument(), t(e.getByText("user.personal-profile")).toBeInTheDocument(), t(e.getByText("user.personal_information")).toBeInTheDocument(), t(e.getByText("user.data_privacy")).toBeInTheDocument(), t(e.getByText("user.security")).toBeInTheDocument();
55
- }), n("render BaseView with data and navigation list", () => {
56
- r(
57
- /* @__PURE__ */ a(
58
- i,
55
+ }), i("render BaseView with data and navigation list", () => {
56
+ n(
57
+ /* @__PURE__ */ o(
58
+ r,
59
59
  {
60
60
  pathname: "/personal-profile/personal-information",
61
- elements: o,
61
+ elements: a,
62
62
  heading: "user.personal-profile",
63
63
  hasSearch: !1,
64
64
  emptyText: "user.noselection",
@@ -67,13 +67,13 @@ u("BaseView Test", () => {
67
67
  }
68
68
  )
69
69
  ), t(e.getByText("Personal information selected")).toBeInTheDocument(), t(e.getAllByText("account_circle")).toHaveLength(2), t(e.getAllByText("user.personal_information")).toHaveLength(2);
70
- }), n("render BaseView with custom detail title and no detail icon", () => {
71
- r(
72
- /* @__PURE__ */ a(
73
- i,
70
+ }), i("render BaseView with custom detail title and no detail icon", () => {
71
+ n(
72
+ /* @__PURE__ */ o(
73
+ r,
74
74
  {
75
75
  pathname: "/personal-profile/data-privacy",
76
- elements: o,
76
+ elements: a,
77
77
  heading: "user.personal-profile",
78
78
  hasSearch: !1,
79
79
  emptyText: "user.noselection",
@@ -82,18 +82,18 @@ u("BaseView Test", () => {
82
82
  }
83
83
  )
84
84
  ), t(e.getByText("Data Privacy selected")).toBeInTheDocument(), t(e.getByText("Data Privacy 2000")).toBeInTheDocument(), t(e.getAllByText("privacy_tip")).toHaveLength(1), t(e.getAllByText("user.data_privacy")).toHaveLength(1);
85
- }), n("hide empty view when screen is small", () => {
85
+ }), i("hide empty view when screen is small", () => {
86
86
  c.spyOn(l, "useBreakpoints").mockReturnValue({
87
87
  isMobile: !0,
88
88
  isTablet: !1,
89
89
  isDesktop: !1,
90
90
  isDesktopNavbar: !1
91
- }), r(
92
- /* @__PURE__ */ a(
93
- i,
91
+ }), n(
92
+ /* @__PURE__ */ o(
93
+ r,
94
94
  {
95
95
  pathname: "/personal-profile/data-privacy",
96
- elements: o,
96
+ elements: a,
97
97
  heading: "user.personal-profile",
98
98
  hasSearch: !1,
99
99
  emptyText: "user.noselection",
@@ -102,13 +102,13 @@ u("BaseView Test", () => {
102
102
  }
103
103
  )
104
104
  ), t(e.queryByText("user.noselection")).not.toBeInTheDocument();
105
- }), n("render BaseView with selected detail section", () => {
106
- r(
107
- /* @__PURE__ */ a(
108
- i,
105
+ }), i("render BaseView with selected detail section", () => {
106
+ n(
107
+ /* @__PURE__ */ o(
108
+ r,
109
109
  {
110
110
  pathname: "/personal-profile/data-privacy",
111
- elements: o,
111
+ elements: a,
112
112
  heading: "user.personal-profile",
113
113
  hasSearch: !1,
114
114
  emptyText: "user.noselection",
@@ -117,5 +117,22 @@ u("BaseView Test", () => {
117
117
  }
118
118
  )
119
119
  ), p.click(e.getAllByRole("option")[1]), t(e.getByText("Data Privacy selected")).toBeInTheDocument();
120
+ }), i("renders only offline view when offline", () => {
121
+ n(
122
+ /* @__PURE__ */ o(
123
+ r,
124
+ {
125
+ pathname: "/personal-profile/personal-information",
126
+ elements: a,
127
+ heading: "user.personal-profile",
128
+ hasSearch: !1,
129
+ emptyText: "user.noselection",
130
+ isSorted: !1,
131
+ isOnline: !1,
132
+ offlineViewProps: { "data-testid": "offline-test" },
133
+ routerLinkElement: void 0
134
+ }
135
+ )
136
+ ), t(e.queryByText("Personal information selected")).not.toBeInTheDocument(), t(e.getByTestId("offline-test")).toBeInTheDocument();
120
137
  });
121
138
  });
@@ -1,6 +1,6 @@
1
1
  import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
- import { I as u } from "../../index.es-3043KTnb.js";
3
- import { b as y, T as C } from "../../index.es-D54RuMc_.js";
2
+ import { I as u } from "../../index.es-DErA6zWG.js";
3
+ import { b as y, T as C } from "../../index.es--yyG47az.js";
4
4
  import { Iconify as w } from "../Iconify/Iconify.js";
5
5
  import { AvailableCustomIcons as j } from "../../enums/AvailableCustomIcons.js";
6
6
  import { u as I } from "../../useBreakpoints-MzTZ0tCT.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, Fragment as c } from "react/jsx-runtime";
2
- import { B as g } from "../../index.es-CiqbARoC.js";
2
+ import { B as g } from "../../index.es-Bx1E5MPK.js";
3
3
  import { a, s as n } from "../../react.esm-CX1WJ2Pp.js";
4
4
  import { BasicHeading as i } from "./BasicHeading.js";
5
5
  import { d as h, t as s, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as v, jsx as t, Fragment as h } from "react/jsx-runtime";
2
- import { d as C, b as R, a as B } from "../../index.es-D54RuMc_.js";
2
+ import { d as C, b as R, a as B } from "../../index.es--yyG47az.js";
3
3
  import { useState as A, useEffect as D, useMemo as S } from "react";
4
4
  import { getBlockNumberByDto as F } from "../../services/BlockService.js";
5
5
  import '../../assets/BlockView.css';const M = "_grid_17o13_1", V = "_black_17o13_11", j = "_blockLayout_17o13_15", q = "_blockRow_17o13_26", G = "_block_17o13_15", H = "_active_17o13_45", I = "_error_17o13_51", J = "_empty_17o13_57", K = "_blockText_17o13_61", O = "_emptyLayout_17o13_70", o = {
@@ -1,13 +1,13 @@
1
1
  import { jsx as lt } from "react/jsx-runtime";
2
- import { o as Ut, e as jt, i as qt, C as $t } from "../../index.es-6TJ1S8Jr.js";
3
- import { _ as Kt, c as ut, P as l } from "../../identity-DLWZln-X.js";
2
+ import { o as Ut, e as jt, i as qt, C as $t } from "../../index.es-DDo_AHL0.js";
3
+ import { _ as Kt, c as ut, P as l } from "../../_setToString-Do1lSQTZ.js";
4
4
  import C, { useEffect as ft, useState as $, useMemo as ht, useCallback as I, useRef as Mt, forwardRef as Xt, useImperativeHandle as zt } from "react";
5
- import { u as Jt, f as Qt, h as Zt } from "../../index.es-da0cf7oE.js";
5
+ import { u as Jt, f as Qt, h as Zt } from "../../index.es-DlzwTKbh.js";
6
6
  import { e as te, c as A, b as U } from "../../tslib.es6-BDCynO9F.js";
7
7
  import { M as _t, a as Et } from "../../component-neHBNHRu.js";
8
8
  import { M as et, b as kt } from "../../component-DsB0poTj.js";
9
9
  import { n as ee, i as ie, K as L } from "../../keyboard-Bpt0aBqQ.js";
10
- import { I as Rt } from "../../index.es-3043KTnb.js";
10
+ import { I as Rt } from "../../index.es-DErA6zWG.js";
11
11
  import { g as ne } from "../../_commonjsHelpers-BkfeUUK-.js";
12
12
  import { b as oe } from "../../isArray-DN9s620O.js";
13
13
  import { OverflowTooltip as re } from "../OverflowTooltip/OverflowTooltip.js";
@@ -1,4 +1,5 @@
1
1
  import { ListItemProps } from '@element-public/react-list';
2
+ import { OfflineViewProps } from '../OfflineView/OfflineView';
2
3
 
3
4
  type ContextMenuProps = {
4
5
  /**
@@ -19,6 +20,14 @@ type ContextMenuProps = {
19
20
  * data-testid for testing
20
21
  */
21
22
  'data-testid'?: string;
23
+ /**
24
+ * Whether the user is online; shows OfflineView when false.
25
+ */
26
+ isOnline?: boolean;
27
+ /**
28
+ * Props forwarded to <OfflineView /> when offline.
29
+ */
30
+ offlineViewProps?: Partial<OfflineViewProps>;
22
31
  };
23
32
  export type ActionProps = ListItemProps & {
24
33
  closeOnClick?: boolean;
@@ -35,7 +44,9 @@ export type ActionProps = ListItemProps & {
35
44
  * { primaryText: 'Delete', onClick: () => DeleteSomeThing(), leadingBlock: 'delete_outline'},
36
45
  * { primaryText: 'Edit', onClick: () => EditSomeThing(), leadingBlock: 'edit'},
37
46
  * ];
47
+ * @param {boolean} isOnline Whether the user is online; shows OfflineView when false.
48
+ * @param {OfflineViewProps} offlineViewProps Props forwarded to OfflineView when offline.
38
49
  * @returns a context menu with the given actions as ListItems
39
50
  */
40
- export declare const ContextMenu: ({ triggerOpen, actions, iconOrientation, "data-testid": dataTestId, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
51
+ export declare const ContextMenu: ({ triggerOpen, actions, iconOrientation, "data-testid": dataTestId, isOnline, offlineViewProps, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
41
52
  export {};
@@ -1,48 +1,52 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { I as d } from "../../index.es-0lQcz8m1.js";
3
- import { M as f, L as _, a as I } from "../../index.es-fnFnw2P1.js";
4
- import { useState as p, useCallback as a, useEffect as v } from "react";
5
- import { u as C } from "../../uniqueId-NU3-C36A.js";
6
- import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91v_5", M = "_listItem_ol91v_9", i = {
7
- menu: k,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { I as _ } from "../../index.es-Kg9soDed.js";
3
+ import { M as k, L as p, a as w } from "../../index.es-CPqaUyn3.js";
4
+ import { useState as I, useCallback as a, useEffect as M } from "react";
5
+ import { u as x } from "../../uniqueId-NU3-C36A.js";
6
+ import { O as C } from "../../OfflineView-HbuDPpQL.js";
7
+ import '../../assets/ContextMenu.css';const v = "_menu_1xwk3_1", y = "_icon_1xwk3_5", V = "_listItem_1xwk3_9", g = "_offlineViewMargin_1xwk3_19", s = {
8
+ menu: v,
8
9
  icon: y,
9
- listItem: M
10
- }, T = ({
11
- triggerOpen: n = null,
12
- actions: c,
13
- iconOrientation: m = "vertical",
14
- "data-testid": r
10
+ listItem: V,
11
+ offlineViewMargin: g
12
+ }, b = ({
13
+ triggerOpen: o = null,
14
+ actions: r,
15
+ iconOrientation: c = "vertical",
16
+ "data-testid": m,
17
+ isOnline: f = !0,
18
+ offlineViewProps: u
15
19
  }) => {
16
- const [t, s] = p(!1), u = a(() => {
17
- s(!t);
18
- }, [t]), l = a(() => {
19
- s(!1);
20
+ const [i, n] = I(!1), d = a(() => {
21
+ n(!i);
22
+ }, [i]), l = a(() => {
23
+ n(!1);
20
24
  }, []);
21
- return v(() => {
22
- s(n !== null ? n : !1);
23
- }, [n]), /* @__PURE__ */ o(
24
- f,
25
+ return M(() => {
26
+ n(o !== null ? o : !1);
27
+ }, [o]), /* @__PURE__ */ t(
28
+ k,
25
29
  {
26
- className: i.menu,
27
- "data-testid": r ?? "selection-menu",
28
- open: t,
30
+ className: s.menu,
31
+ "data-testid": m ?? "selection-menu",
32
+ open: i,
29
33
  surfaceOnly: !0,
30
34
  hoistToBody: !0,
31
35
  onClose: l,
32
- trigger: /* @__PURE__ */ o(
33
- d,
36
+ trigger: /* @__PURE__ */ t(
37
+ _,
34
38
  {
35
- className: i.icon,
36
- variant: t ? "filled-primary" : void 0,
39
+ className: s.icon,
40
+ variant: i ? "filled-primary" : void 0,
37
41
  "data-testid": "open-button",
38
- icon: m === "vertical" ? "more_vert" : "more_horiz",
39
- onClick: u
42
+ icon: c === "vertical" ? "more_vert" : "more_horiz",
43
+ onClick: d
40
44
  }
41
45
  ),
42
- children: /* @__PURE__ */ o(_, { "data-testid": "selection-list", children: c.map((e) => /* @__PURE__ */ o(
43
- I,
46
+ children: f ? /* @__PURE__ */ t(p, { "data-testid": "selection-list", children: r.map((e) => /* @__PURE__ */ t(
47
+ w,
44
48
  {
45
- className: i.listItem,
49
+ className: s.listItem,
46
50
  ...e,
47
51
  leadingBlockType: "icon",
48
52
  "data-testid": e["data-testid"],
@@ -50,12 +54,12 @@ import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91
50
54
  e?.onClick?.(), e.closeOnClick !== !1 && l();
51
55
  }
52
56
  },
53
- C(`LI_${e.primaryText?.toString()}_`)
54
- )) })
57
+ x(`LI_${e.primaryText?.toString()}_`)
58
+ )) }) : /* @__PURE__ */ t(C, { size: "small", variant: "filled", className: s.offlineViewMargin, ...u })
55
59
  },
56
60
  "selectionmenu"
57
61
  );
58
62
  };
59
63
  export {
60
- T as ContextMenu
64
+ b as ContextMenu
61
65
  };