@hortiview/shared-components 0.0.11176 → 0.0.11528

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 (134) hide show
  1. package/README.md +41 -8
  2. package/dist/BigLoadingSpinner-D7H28pr5.js +16 -0
  3. package/dist/{GenericCard-B8x1DMa8.js → GenericCard-jlt8ZsHi.js} +18 -19
  4. package/dist/ListAreaService-YS_UUPh5.js +107 -0
  5. package/dist/assets/HashTabView.css +1 -1
  6. package/dist/assets/Select.css +1 -0
  7. package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
  8. package/dist/components/AlertBanner/AlertBanner.js +7 -8
  9. package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
  10. package/dist/components/BaseView/BaseView.d.ts +1 -1
  11. package/dist/components/BaseView/BaseView.js +24 -25
  12. package/dist/components/BaseView/BaseView.test.js +25 -25
  13. package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
  14. package/dist/components/BasicHeading/BasicHeading.js +11 -12
  15. package/dist/components/BasicHeading/BasicHeading.test.js +3 -3
  16. package/dist/components/BlockView/BlockView.d.ts +1 -0
  17. package/dist/components/BlockView/BlockView.js +24 -25
  18. package/dist/components/BlockView/BlockView.test.js +2 -2
  19. package/dist/components/ChipCard/ChipCard.js +6 -7
  20. package/dist/components/ChipCard/ChipCard.test.js +2 -2
  21. package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
  22. package/dist/components/ContextMenu/ContextMenu.js +11 -12
  23. package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
  24. package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
  25. package/dist/components/DeleteModal/DeleteModal.js +30 -31
  26. package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
  27. package/dist/components/Disclaimer/Disclaimer.js +9 -10
  28. package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
  29. package/dist/components/EmptyView/EmptyView.d.ts +1 -0
  30. package/dist/components/EmptyView/EmptyView.js +1 -1
  31. package/dist/components/EmptyView/EmptyView.test.js +2 -2
  32. package/dist/components/Filter/Filter.d.ts +1 -0
  33. package/dist/components/Filter/Filter.js +62 -62
  34. package/dist/components/Filter/Filter.test.js +2 -2
  35. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
  36. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  37. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
  38. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
  39. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +629 -630
  40. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
  41. package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
  42. package/dist/components/FormComponents/FormNumber/CustomTextField.js +11 -12
  43. package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
  44. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  45. package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
  46. package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
  47. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  48. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
  49. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
  50. package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
  51. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
  52. package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
  53. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +5 -5
  54. package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
  55. package/dist/components/FormComponents/FormSlider/FormSlider.js +1 -1
  56. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
  57. package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
  58. package/dist/components/FormComponents/FormText/FormText.js +14 -15
  59. package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
  60. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
  61. package/dist/components/FormComponents/FormToggle/FormToggle.js +1 -1
  62. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
  63. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
  64. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
  65. package/dist/components/GenericTable/GenericTable.d.ts +1 -0
  66. package/dist/components/GenericTable/GenericTable.js +23 -24
  67. package/dist/components/GenericTable/GenericTable.test.js +2 -2
  68. package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
  69. package/dist/components/GenericTable/GenericTableService.js +41 -41
  70. package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
  71. package/dist/components/GenericTable/Mobile/GenericCard.js +2 -2
  72. package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
  73. package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
  74. package/dist/components/GenericTable/Mobile/GenericCardList.js +2 -2
  75. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
  76. package/dist/components/HashTabView/HashTabView.d.ts +6 -1
  77. package/dist/components/HashTabView/HashTabView.js +53 -53
  78. package/dist/components/HashTabView/HashTabView.test.js +2 -2
  79. package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
  80. package/dist/components/HeaderFilter/HeaderFilter.js +12 -12
  81. package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
  82. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +7 -8
  83. package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
  84. package/dist/components/Iconify/Iconify.d.ts +2 -2
  85. package/dist/components/Iconify/Iconify.js +4 -5
  86. package/dist/components/Iconify/Iconify.test.js +2 -2
  87. package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
  88. package/dist/components/InfoGroup/InfoGroup.js +4 -5
  89. package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
  90. package/dist/components/ListArea/ListArea.d.ts +1 -1
  91. package/dist/components/ListArea/ListArea.js +2 -2
  92. package/dist/components/ListArea/ListArea.test.js +5 -5
  93. package/dist/components/ListArea/ListAreaService.d.ts +9 -8
  94. package/dist/components/ListArea/ListAreaService.js +2 -2
  95. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  96. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
  97. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +5 -6
  98. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
  99. package/dist/components/Modal/Modal.d.ts +2 -1
  100. package/dist/components/Modal/Modal.js +5 -6
  101. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
  102. package/dist/components/OverflowTooltip/OverflowTooltip.js +10 -11
  103. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
  104. package/dist/components/Scrollbar/Scrollbar.js +5 -6
  105. package/dist/components/Scrollbar/scrollbar.test.js +2 -2
  106. package/dist/components/SearchBar/SearchBar.js +10 -11
  107. package/dist/components/SearchBar/SearchBar.test.js +2 -2
  108. package/dist/components/Select/Select.d.ts +14 -0
  109. package/dist/components/Select/Select.js +34 -0
  110. package/dist/components/Select/Select.test.d.ts +1 -0
  111. package/dist/components/Select/Select.test.js +28 -0
  112. package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
  113. package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
  114. package/dist/hooks/useBreakpoints.test.js +2 -2
  115. package/dist/hooks/useHelperText.d.ts +1 -0
  116. package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
  117. package/dist/main.d.ts +2 -0
  118. package/dist/main.js +33 -31
  119. package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
  120. package/dist/react-tooltip.min-Czs4RGD1.js +1400 -0
  121. package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
  122. package/dist/services/BlockService.d.ts +1 -0
  123. package/dist/services/NumberService.d.ts +1 -0
  124. package/dist/services/UtilService.d.ts +1 -0
  125. package/dist/services/services.test.js +1 -1
  126. package/dist/types/GenericTable.d.ts +2 -2
  127. package/dist/types/HashTab.d.ts +0 -1
  128. package/dist/types/ListElement.d.ts +0 -1
  129. package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
  130. package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
  131. package/package.json +15 -15
  132. package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
  133. package/dist/ListAreaService-CRX4eEUJ.js +0 -108
  134. package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
package/README.md CHANGED
@@ -13,7 +13,7 @@ This is a shared component library. It should used in the HortiView platform and
13
13
  This library is based in Bayers element component library. To use it properly you need to install this package first.
14
14
  To get access to this restricted package please contact your Bayer contact person.
15
15
 
16
- After you gain access use `yarn add @element/react-components @element/themes` or `npm i @element/react-components @element/themes` to add the package to your solution.
16
+ After you gain access use `yarn add @element-public/react-components @element-public/themes` or `npm i @element-public/react-components @element-public/themes` to add the package to your solution.
17
17
 
18
18
  ## Remarks
19
19
 
@@ -33,11 +33,11 @@ Additionally the library provides form components using [react-hook-form](https:
33
33
  1. [Disclaimer](#disclaimer)
34
34
  1. [EmptyView](#emptyview)
35
35
  1. [Filter](#filter)
36
- 1. [FormattedNumberDisplay] (#formattednumberdisplay)
36
+ 1. [FormattedNumberDisplay](#formattednumberdisplay)
37
37
  1. [FormComponents](#formcomponents)
38
38
  1. [FormCheckBox](#formcheckbox)
39
39
  1. [FormDatePicker](#formdatepicker)
40
- 1. [FormNumber] (#formnumber)
40
+ 1. [FormNumber](#formnumber)
41
41
  1. [FormRadio](#formradio)
42
42
  1. [FormSelect](#formselect)
43
43
  1. [FormSlider](#formslider)
@@ -54,6 +54,7 @@ Additionally the library provides form components using [react-hook-form](https:
54
54
  1. [OverflowTooltip](#overflowtooltip)
55
55
  1. [ScrollBar](#scrollbar)
56
56
  1. [SearchBar](#searchbar)
57
+ 1. [Select](#select)
57
58
  1. [VerticalDivider](#verticaldivider)
58
59
 
59
60
  ## Available Utility Functions:
@@ -311,7 +312,7 @@ const TypoDisplay3 = (props: { children: React.ReactNode }) => {
311
312
  return <TypoDisplay level={3}>{props.children}</TypoDisplay>;
312
313
  };
313
314
 
314
- <FormattedNumberDisplay typographyComponent={TypoDisplay3} languageCode="en-MX" value={12345.67} />;
315
+ <FormattedNumberDisplay typographyComponent={TypoDisplay3} languageCode='en-MX' value={12345.67} />;
315
316
  ```
316
317
 
317
318
  ### FormComponents
@@ -439,7 +440,9 @@ const { handleSubmit } = formMethods;
439
440
 
440
441
  #### FormSelect
441
442
 
442
- Provides a select form component
443
+ Provides a select form component.
444
+
445
+ > **Warning**: Don't set `menuPosition` when `hoisted` is true.
443
446
 
444
447
  ```jsx
445
448
  import { FormSelect } from '@hortiview/shared-components';
@@ -843,7 +846,7 @@ return <>
843
846
 
844
847
  ### Modal
845
848
 
846
- Provides the normal elements modal with one additional change. If you are on fullscreen modal size the max-height and max-width is set to 100svh/svw (Smallest ViewPort height/width).
849
+ Provides the normal Element modal with one additional change. If you are on fullscreen modal size the max-height and max-width is set to 100svh/svw (Smallest ViewPort height/width).
847
850
  This will set the modal size on an area between the mobile controls.
848
851
 
849
852
  ```jsx
@@ -860,7 +863,7 @@ Provides a tooltip and overflow behavior of a given text value.
860
863
 
861
864
  ```jsx
862
865
  import { OverflowTooltip } from '@hortiview/shared-components';
863
- import { TypoBody } from '@element/react-components';
866
+ import { TypoBody } from '@element-public/react-components';
864
867
 
865
868
  const longText =
866
869
  'This is a very long text that needs to be truncated and shown with a tooltip when it overflows.';
@@ -904,6 +907,34 @@ const [searchValue, setSearchValue] = useState('');
904
907
  />;
905
908
  ```
906
909
 
910
+ ### Select
911
+
912
+ Provides the normal Element select with some additional presets and props:
913
+
914
+ - `menuMaxHeight` has a default value of `15rem` (can be overwritten)
915
+ - custom styles are applied that improve the `hoisted` select menu behavior and avoid two scrolling bars on multi select menus
916
+ - custom portal styles can be passed via the `portalClassName` prop - only works when `portalContainer` is not set
917
+
918
+ > **Warning**: Don't set `menuPosition` when `hoisted` is true.
919
+
920
+ ```jsx
921
+ import { Select } from '@hortiview/shared-components';
922
+ ...
923
+
924
+ <Select
925
+ label='Contact during review'
926
+ options={contacts}
927
+ hoisted
928
+ textKey='text'
929
+ valueKey='id'
930
+ onChange={handleContactSelect}
931
+ value={contact}
932
+ helperText='required'
933
+ variant='outlined'
934
+ portalClassName={styles.portal}
935
+ />;
936
+ ```
937
+
907
938
  ### VerticalDivider
908
939
 
909
940
  Provides a simple vertical divider.
@@ -975,5 +1006,7 @@ Note: Should only be used for displaying numbers, not for calculations or values
975
1006
  ```typescript
976
1007
  const userLocale = 'es-MX';
977
1008
 
978
- const overlineTitle = `${getNumberAsLocaleString(userLocale, totalArea, 5)} ${t('squaremeter-unit')}`;
1009
+ const overlineTitle = `${getNumberAsLocaleString(userLocale, totalArea, 5)} ${t(
1010
+ 'squaremeter-unit'
1011
+ )}`;
979
1012
  ```
@@ -0,0 +1,16 @@
1
+ import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
+ import { TypoBody as r } from "@element-public/react-components";
3
+ import { Iconify as d } from "./components/Iconify/Iconify.js";
4
+ import './assets/BigLoadingSpinner.css';const e = "_loadingBigOverlay_7dxo1_1", g = "_bigLoadSpinnerCard_7dxo1_12", s = "_bigLoadSpinnerCardText_7dxo1_27", t = "_logo_7dxo1_33", o = {
5
+ loadingBigOverlay: e,
6
+ bigLoadSpinnerCard: g,
7
+ bigLoadSpinnerCardText: s,
8
+ logo: t
9
+ }, l = ({ text: a }) => /* @__PURE__ */ n("div", { className: o.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
10
+ /* @__PURE__ */ i(d, { icon: "hortiview", className: o.logo, "data-testid": "logo-icon" }),
11
+ /* @__PURE__ */ i(r, { tag: "p", bold: !0, level: 1, className: o.bigLoadSpinnerCardText, children: a })
12
+ ] }), x = (a) => /* @__PURE__ */ i("div", { className: o.loadingBigOverlay, children: /* @__PURE__ */ i(l, { ...a }) });
13
+ export {
14
+ x as B,
15
+ o as s
16
+ };
@@ -1,10 +1,9 @@
1
- import "./assets/GenericCard.css";
2
- import { jsx as r, jsxs as o, Fragment as C } from "react/jsx-runtime";
3
- import { Card as h, CardContent as m, CardBody as T, Grid as g, GridRow as u, GridCol as c, TypoSubtitle as f, CardTitle as x, CardDivider as v } from "@element/react-components";
4
- import { useMemo as w } from "react";
1
+ import { jsx as r, jsxs as d, Fragment as C } from "react/jsx-runtime";
2
+ import { Card as h, CardContent as T, CardBody as m, Grid as g, GridRow as v, GridCol as c, TypoSubtitle as y, CardTitle as x, CardDivider as w } from "@element-public/react-components";
3
+ import { useMemo as b } from "react";
5
4
  import { OverflowTooltip as l } from "./components/OverflowTooltip/OverflowTooltip.js";
6
- const b = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0_10", $ = "_row_ny9m0_14", k = "_font_ny9m0_18", G = "_fontHeader_ny9m0_23", H = "_title_ny9m0_27", S = "_emptyContainer_ny9m0_33", A = "_empty_ny9m0_33", n = {
7
- cardTitle: b,
5
+ import './assets/GenericCard.css';const u = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0_10", $ = "_row_ny9m0_14", k = "_font_ny9m0_18", G = "_fontHeader_ny9m0_23", H = "_title_ny9m0_27", S = "_emptyContainer_ny9m0_33", A = "_empty_ny9m0_33", n = {
6
+ cardTitle: u,
8
7
  cardBody: B,
9
8
  cardContent: N,
10
9
  row: $,
@@ -18,18 +17,18 @@ const b = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0
18
17
  phoneCol: 2,
19
18
  tabletCol: 4,
20
19
  verticalAlign: "bottom"
21
- }, R = ({ item: e, columns: t, hiddenColumns: i }) => {
22
- const d = t.find((a) => a.asCardTitle), y = t.find((a) => a.asCardSubtitle), p = w(
20
+ }, O = ({ item: e, columns: t, hiddenColumns: i }) => {
21
+ const o = t.find((a) => a.asCardTitle), f = t.find((a) => a.asCardSubtitle), p = b(
23
22
  () => t.filter(
24
23
  (a) => !a.asCardTitle && !a.asCardSubtitle && a.id !== "actions"
25
24
  ),
26
25
  [t]
27
26
  );
28
- return /* @__PURE__ */ r(h, { variant: "raised", "data-testid": `card${d ? "-" + e[d.accessor] : ""}`, children: /* @__PURE__ */ o(m, { className: n.cardContent, "data-testid": "card-content", children: [
29
- /* @__PURE__ */ r(j, { item: e, titleColumn: d, subTitleColumn: y }),
30
- /* @__PURE__ */ r(T, { className: n.cardBody, "data-testid": "card-body", children: /* @__PURE__ */ r(g, { fullHeight: !0, fullWidth: !0, variant: "none", children: p.map((a) => i?.includes(a.id) ? null : /* @__PURE__ */ o(u, { className: n.row, "data-testid": "row", children: [
31
- /* @__PURE__ */ r(c, { horizontalAlign: "right", ..._, children: /* @__PURE__ */ o(
32
- f,
27
+ return /* @__PURE__ */ r(h, { variant: "raised", "data-testid": `card${o ? "-" + e[o.accessor] : ""}`, children: /* @__PURE__ */ d(T, { className: n.cardContent, "data-testid": "card-content", children: [
28
+ /* @__PURE__ */ r(j, { item: e, titleColumn: o, subTitleColumn: f }),
29
+ /* @__PURE__ */ r(m, { className: n.cardBody, "data-testid": "card-body", children: /* @__PURE__ */ r(g, { fullHeight: !0, fullWidth: !0, variant: "none", children: p.map((a) => i?.includes(a.id) ? null : /* @__PURE__ */ d(v, { className: n.row, "data-testid": "row", children: [
30
+ /* @__PURE__ */ r(c, { horizontalAlign: "right", ..._, children: /* @__PURE__ */ d(
31
+ y,
33
32
  {
34
33
  level: 2,
35
34
  themeColor: "text-secondary-on-background",
@@ -45,8 +44,8 @@ const b = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0
45
44
  ] }, a.id)) }) })
46
45
  ] }) });
47
46
  }, j = ({ item: e, titleColumn: t, subTitleColumn: i }) => {
48
- const d = e.actions;
49
- return !t && !i && !d ? null : /* @__PURE__ */ o(C, { children: [
47
+ const o = e.actions;
48
+ return !t && !i && !o ? null : /* @__PURE__ */ d(C, { children: [
50
49
  /* @__PURE__ */ r(
51
50
  x,
52
51
  {
@@ -54,11 +53,11 @@ const b = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0
54
53
  className: n.cardTitle,
55
54
  primaryText: t !== void 0 && /* @__PURE__ */ r(s, { column: t, item: e, isTitle: !0 }),
56
55
  secondaryText: i !== void 0 && /* @__PURE__ */ r(s, { column: i, item: e, isTitle: !0 }),
57
- trailingBlock: d,
56
+ trailingBlock: o,
58
57
  trailingBlockType: "title-actions"
59
58
  }
60
59
  ),
61
- /* @__PURE__ */ r(v, {})
60
+ /* @__PURE__ */ r(w, {})
62
61
  ] });
63
62
  }, s = ({ item: e, column: t, isTitle: i = !1 }) => t.cellTemplate ? t.cellTemplate({ row: { original: e } }) : i ? /* @__PURE__ */ r(
64
63
  l,
@@ -72,10 +71,10 @@ const b = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0
72
71
  {
73
72
  id: `tip_${t.id}_${e[t.accessor]}`,
74
73
  text: e[t.accessor],
75
- children: /* @__PURE__ */ r(f, { level: 2, themeColor: "text-primary-on-background", className: n.font, children: e[t.accessor] })
74
+ children: /* @__PURE__ */ r(y, { level: 2, themeColor: "text-primary-on-background", className: n.font, children: e[t.accessor] })
76
75
  }
77
76
  );
78
77
  export {
79
- R as G,
78
+ O as G,
80
79
  n as s
81
80
  };
@@ -0,0 +1,107 @@
1
+ import { jsx as r, jsxs as z } from "react/jsx-runtime";
2
+ import { TypoButton as B, Icon as C, Group as b, TypoSubtitle as N, TypoBody as O } from "@element-public/react-components";
3
+ import { Iconify as $ } from "./components/Iconify/Iconify.js";
4
+ import { AvailableCustomIcons as k } from "./enums/AvailableCustomIcons.js";
5
+ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_mainElevation_zewqs_5", W = "_searchbar_zewqs_11", G = "_roundedBottom_zewqs_19", L = "_primaryText_zewqs_24", S = "_list_zewqs_28", A = "_listItem_zewqs_56", P = "_iconColor_zewqs_76", D = "_overlineTitle_zewqs_80", F = "_noOverlineTitle_zewqs_85", H = "_truncate_zewqs_89", J = "_truncateOverlineText_zewqs_100", n = {
6
+ fullWidth: E,
7
+ mainElevation: j,
8
+ searchbar: W,
9
+ roundedBottom: G,
10
+ primaryText: L,
11
+ list: S,
12
+ listItem: A,
13
+ iconColor: P,
14
+ overlineTitle: D,
15
+ noOverlineTitle: F,
16
+ truncate: H,
17
+ truncateOverlineText: J
18
+ }, X = (t, s, l, a) => {
19
+ const i = t.reduce((o, c) => {
20
+ const { groupName: e, ...m } = c;
21
+ return !e || typeof e != "string" || (o[e] || (o[e] = {
22
+ groupName: /* @__PURE__ */ r(B, { children: e }),
23
+ id: e,
24
+ items: []
25
+ }), o[e].items = [
26
+ ...o[e].items,
27
+ y(m, s, l, a)
28
+ ]), o;
29
+ }, {});
30
+ return Object.values(i);
31
+ }, Y = (t, s, l, a) => t.map((i) => y(i, s, l, a)), y = (t, s, l, a) => {
32
+ const {
33
+ id: i,
34
+ title: o,
35
+ subTitle: c,
36
+ route: e,
37
+ value: m,
38
+ noNavigation: v,
39
+ disabled: d,
40
+ icon: g,
41
+ iconType: p,
42
+ trailingIcon: h,
43
+ trailingIconType: f,
44
+ actionButton: I,
45
+ onClick: w,
46
+ customTitle: T,
47
+ listItemClassName: x,
48
+ overlineTitle: _
49
+ } = t, u = s === e;
50
+ return {
51
+ id: i,
52
+ key: i,
53
+ select: u,
54
+ primaryText: i,
55
+ secondaryText: /* @__PURE__ */ z(b, { direction: "vertical", gap: "none", children: [
56
+ T ?? /* @__PURE__ */ r(
57
+ N,
58
+ {
59
+ "data-testid": "title",
60
+ level: 1,
61
+ themeColor: u ? "primary" : void 0,
62
+ className: `${n.truncate} lmnt-theme-on-surface-active`,
63
+ children: o
64
+ }
65
+ ),
66
+ c && !T ? /* @__PURE__ */ r(
67
+ O,
68
+ {
69
+ "data-testid": "subtitle",
70
+ level: 2,
71
+ themeColor: u ? "primary" : void 0,
72
+ className: `${n.truncate} lmnt-theme-on-surface-inactive`,
73
+ children: c
74
+ }
75
+ ) : void 0
76
+ ] }),
77
+ overlineText: _ ? /* @__PURE__ */ r(
78
+ "span",
79
+ {
80
+ "data-testid": "overline-title",
81
+ className: `${n.truncate} ${n.truncateOverlineText}`,
82
+ children: _
83
+ }
84
+ ) : void 0,
85
+ trailingBlock: I ?? h ?? /* @__PURE__ */ r(C, { icon: "arrow_right", className: n.iconColor }),
86
+ leadingBlock: K(g),
87
+ value: m,
88
+ componentProps: {
89
+ id: i,
90
+ "data-testid": `${o}-list-item`,
91
+ key: i,
92
+ leadingBlockType: p ?? "icon",
93
+ trailingBlockType: f ?? "icon",
94
+ className: `${p === "avatar" ? "" : n.listItem} ${l} ${x ?? ""} ${_ ? n.overlineTitle : n.noOverlineTitle}`,
95
+ onClick: (M, q) => w?.(q),
96
+ tag: d || v ? void 0 : a ?? "a",
97
+ to: d || v ? void 0 : e,
98
+ disabled: d
99
+ }
100
+ };
101
+ }, K = (t) => typeof t == "string" && t in k ? /* @__PURE__ */ r($, { icon: t }) : t;
102
+ export {
103
+ Y as a,
104
+ X as g,
105
+ y as m,
106
+ n as s
107
+ };
@@ -1 +1 @@
1
- ._elevation_4lrry_1{width:100%;border-radius:.5rem}._themeBackground_4lrry_6{background:var(--lmnt-theme-background)}._tabBar_4lrry_10{background:transparent;align-self:flex-end;border-radius:.5rem}._tabBar_4lrry_10 hr{display:none!important}._tabWrapper_4lrry_20{border-bottom:1px solid var(--lmnt-theme-on-surface-stroke)}._stickyHeader_4lrry_24{position:sticky;z-index:7;top:80px;background-color:var(--lmnt-theme-surface-variant)}._tabButton_4lrry_31{height:3.5rem!important}._childContainer_4lrry_35{width:25rem}._childContainerPhone_4lrry_39{width:100%}._iconColorRed_4lrry_43 [class*=mdc-tab__icon]{color:var(--lmnt-theme-danger)}._miniPadding_4lrry_48{padding:0 .15rem}
1
+ ._elevation_xbjx4_1{width:100%;border-radius:.5rem}._themeBackground_xbjx4_6{background:var(--lmnt-theme-background)}._tabBar_xbjx4_10{background:transparent;align-self:flex-end;border-radius:.5rem}._tabBar_xbjx4_10 hr{display:none!important}._tabWrapper_xbjx4_20{border-bottom:1px solid var(--lmnt-theme-on-surface-stroke)}._stickyHeader_xbjx4_24{position:sticky;top:80px;background-color:var(--lmnt-theme-surface-variant)}._tabButton_xbjx4_30{height:3.5rem!important}._childContainer_xbjx4_34{width:25rem}._childContainerPhone_xbjx4_38{width:100%}._iconColorRed_xbjx4_42 [class*=mdc-tab__icon]{color:var(--lmnt-theme-danger)}._miniPadding_xbjx4_47{padding:0 .15rem}
@@ -0,0 +1 @@
1
+ ._customPortal_8wq49_1>div[class*=lmnt__menu-portal]{transition:none}._customSelect_8wq49_7 div[class*=lmnt__menu-list--is-multi]{max-height:none}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type AlertBannerProps = {
3
2
  text: string | JSX.Element;
4
3
  color?: 'danger' | 'info' | 'success' | 'warning';
@@ -1,21 +1,20 @@
1
- import "../../assets/AlertBanner.css";
2
1
  import { jsx as e, Fragment as c, jsxs as _ } from "react/jsx-runtime";
3
- import { Group as g, TypoBody as l } from "@element/react-components";
4
- import { u as m } from "../../useBreakpoints-MzTZ0tCT.js";
5
- const d = "_messageContainer_1seos_1", p = "_info_1seos_9", u = "_danger_1seos_14", f = "_success_1seos_19", y = "_warning_1seos_24", n = {
6
- messageContainer: d,
2
+ import { Group as g, TypoBody as l } from "@element-public/react-components";
3
+ import { u as d } from "../../useBreakpoints-MzTZ0tCT.js";
4
+ import '../../assets/AlertBanner.css';const m = "_messageContainer_1seos_1", p = "_info_1seos_9", u = "_danger_1seos_14", f = "_success_1seos_19", y = "_warning_1seos_24", n = {
5
+ messageContainer: m,
7
6
  info: p,
8
7
  danger: u,
9
8
  success: f,
10
9
  warning: y
11
- }, A = ({
10
+ }, C = ({
12
11
  text: s,
13
12
  color: r = "info",
14
13
  isOpen: o = !0,
15
14
  action: i,
16
15
  isBold: t = !0
17
16
  }) => {
18
- const { isDesktop: a } = m();
17
+ const { isDesktop: a } = d();
19
18
  return o ? /* @__PURE__ */ e("div", { className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */ _(
20
19
  g,
21
20
  {
@@ -30,5 +29,5 @@ const d = "_messageContainer_1seos_1", p = "_info_1seos_9", u = "_danger_1seos_1
30
29
  ) }) : /* @__PURE__ */ e(c, {});
31
30
  };
32
31
  export {
33
- A as AlertBanner
32
+ C as AlertBanner
34
33
  };
@@ -1,24 +1,26 @@
1
1
  import { jsx as e, Fragment as m } from "react/jsx-runtime";
2
- import { a as t, s } from "../../react.esm-FR1-H8iU.js";
3
- import { a as l } from "../../useBreakpoints-MzTZ0tCT.js";
2
+ import { a as t, s } from "../../react.esm-DNwojocF.js";
3
+ import { a } from "../../useBreakpoints-MzTZ0tCT.js";
4
4
  import { AlertBanner as n } from "./AlertBanner.js";
5
- import { d as c, b as p, v as a, t as r, g as o } from "../../vi.CjhMlMwf-DWv7vrn7.js";
6
- c("AlertBanner Test", () => {
7
- p(() => {
8
- a.spyOn(l, "useBreakpoints").mockReturnValue({
5
+ import { d as p, b as c, v as l, t as r, g as o } from "../../vi.CjhMlMwf-BCJNwXvu.js";
6
+ p("AlertBanner Test", () => {
7
+ c(() => {
8
+ l.spyOn(a, "useBreakpoints").mockReturnValue({
9
9
  isMobile: !1,
10
10
  isTablet: !1,
11
- isDesktop: !0
11
+ isDesktop: !0,
12
+ isDesktopNavbar: !0
12
13
  });
13
14
  }), r("render AlertBanner with text", () => {
14
15
  t(/* @__PURE__ */ e(n, { text: "Test" })), o(s.getByText("Test")).toBeInTheDocument();
15
16
  }), r("render AlertBanner with element", () => {
16
17
  t(/* @__PURE__ */ e(n, { text: /* @__PURE__ */ e(m, { children: "Element" }) })), o(s.getByText("Element")).toBeInTheDocument();
17
18
  }), r("renders AlertBanner with vertical style (flex-direction: column) when screen is small", () => {
18
- a.spyOn(l, "useBreakpoints").mockReturnValue({
19
+ l.spyOn(a, "useBreakpoints").mockReturnValue({
19
20
  isMobile: !0,
20
21
  isTablet: !1,
21
- isDesktop: !1
22
+ isDesktop: !1,
23
+ isDesktopNavbar: !1
22
24
  }), t(/* @__PURE__ */ e(n, { text: "Test" }));
23
25
  const i = s.getByText("Test").closest(".lmnt.lmnt-group");
24
26
  o(i).toHaveStyle(
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { BaseListElement } from '../../types/ListElement';
3
2
  import { LinkProps } from '../../types/internal/ReactRouterTypes';
3
+
4
4
  type BaseViewProps = {
5
5
  /**
6
6
  * elements to be displayed in the list area
@@ -1,69 +1,68 @@
1
- import "../../assets/BaseView.css";
2
- import { jsx as i, Fragment as x, jsxs as s } from "react/jsx-runtime";
3
- import { Group as o } from "@element/react-components";
1
+ import { jsx as e, Fragment as x, jsxs as s } from "react/jsx-runtime";
2
+ import { Group as r } from "@element-public/react-components";
4
3
  import { useMemo as d } from "react";
5
4
  import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
6
5
  import { EmptyView as W } from "../EmptyView/EmptyView.js";
7
6
  import { ListArea as B } from "../ListArea/ListArea.js";
8
7
  import { VerticalDivider as N } from "../VerticalDivider/VerticalDivider.js";
9
8
  import { u as A } from "../../useBreakpoints-MzTZ0tCT.js";
10
- const V = "_divider_dw2rc_1", j = "_maxWidth_dw2rc_5", E = "_desktopList_dw2rc_9", H = "_mobileList_dw2rc_13", I = "_desktopDetail_dw2rc_17", y = "_mobileDetail_dw2rc_21", r = {
9
+ import '../../assets/BaseView.css';const V = "_divider_dw2rc_1", j = "_maxWidth_dw2rc_5", E = "_desktopList_dw2rc_9", H = "_mobileList_dw2rc_13", I = "_desktopDetail_dw2rc_17", y = "_mobileDetail_dw2rc_21", o = {
11
10
  divider: V,
12
11
  maxWidth: j,
13
12
  desktopList: E,
14
13
  mobileList: H,
15
14
  desktopDetail: I,
16
15
  mobileDetail: y
17
- }, Q = ({
16
+ }, P = ({
18
17
  action: l,
19
18
  heading: c,
20
- elements: n,
19
+ elements: a,
21
20
  emptyText: m,
22
21
  hasSearch: p = !0,
23
22
  isSorted: h = !0,
24
23
  className: _,
25
- withAvatar: f = !1,
26
- listMaxHeight: v = "calc(100vh - 200px)",
27
- pathname: a,
24
+ withAvatar: v = !1,
25
+ listMaxHeight: f = "calc(100vh - 200px)",
26
+ pathname: n,
28
27
  routerLinkElement: w,
29
28
  searchPlaceholder: b
30
29
  }) => {
31
- const { isDesktopNavbar: e } = A(), t = d(() => n.find((L) => L.route === a), [a, n]), D = d(() => t?.component ?? (e ? /* @__PURE__ */ i(W, { subtitle: m }) : /* @__PURE__ */ i(x, {})), [t, e, m]), g = d(() => e ? !0 : !t, [t, e]), k = d(() => e ? !0 : t, [t, e]);
32
- return /* @__PURE__ */ s(o, { "data-testid": "base-view-container", className: _ ?? "", gap: "", fullWidth: !0, children: [
33
- g && /* @__PURE__ */ i(o, { gap: "none", className: e ? r.desktopList : r.mobileList, children: /* @__PURE__ */ s(o, { direction: "vertical", fullWidth: !0, gap: e ? "standard" : "dense", children: [
34
- c && /* @__PURE__ */ i(u, { "data-testid": "heading", heading: c, level: 4, marginBottom: 0, children: l }),
35
- /* @__PURE__ */ i(
30
+ const { isDesktopNavbar: i } = A(), t = d(() => a.find((L) => L.route === n), [n, a]), D = d(() => t?.component ?? (i ? /* @__PURE__ */ e(W, { subtitle: m }) : /* @__PURE__ */ e(x, {})), [t, i, m]), g = d(() => i ? !0 : !t, [t, i]), k = d(() => i ? !0 : t, [t, i]);
31
+ return /* @__PURE__ */ s(r, { "data-testid": "base-view-container", className: _ ?? "", gap: "", fullWidth: !0, children: [
32
+ g && /* @__PURE__ */ e(r, { gap: "none", className: i ? o.desktopList : o.mobileList, children: /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, gap: i ? "standard" : "dense", children: [
33
+ c && /* @__PURE__ */ e(u, { "data-testid": "heading", heading: c, level: 4, marginBottom: 0, children: l }),
34
+ /* @__PURE__ */ e(
36
35
  B,
37
36
  {
38
- elements: n,
37
+ elements: a,
39
38
  hasSearch: p,
40
- maxHeight: v,
39
+ maxHeight: f,
41
40
  isSorted: h,
42
- pathname: a,
41
+ pathname: n,
43
42
  routerLinkElement: w,
44
43
  searchPlaceholder: b
45
44
  }
46
45
  )
47
46
  ] }) }),
48
47
  k && /* @__PURE__ */ s(
49
- o,
48
+ r,
50
49
  {
51
50
  "data-testid": "details",
52
51
  gap: "none",
53
- className: e ? r.desktopDetail : r.mobileDetail,
52
+ className: i ? o.desktopDetail : o.mobileDetail,
54
53
  children: [
55
- e && /* @__PURE__ */ i(N, { className: r.divider, height: "100%" }),
56
- /* @__PURE__ */ s(o, { direction: "vertical", fullWidth: !0, children: [
57
- /* @__PURE__ */ i(
54
+ i && /* @__PURE__ */ e(N, { className: o.divider, height: "100%" }),
55
+ /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, children: [
56
+ /* @__PURE__ */ e(
58
57
  u,
59
58
  {
60
- className: r.maxWidth,
59
+ className: o.maxWidth,
61
60
  heading: t?.detailTitle ?? t?.title ?? "",
62
61
  level: 4,
63
62
  icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
64
63
  marginBottom: 0,
65
64
  invisibleButton: t?.detailAction === void 0,
66
- withAvatar: f,
65
+ withAvatar: v,
67
66
  children: t?.detailAction ?? l
68
67
  }
69
68
  ),
@@ -75,5 +74,5 @@ const V = "_divider_dw2rc_1", j = "_maxWidth_dw2rc_5", E = "_desktopList_dw2rc_9
75
74
  ] });
76
75
  };
77
76
  export {
78
- Q as BaseView
77
+ P as BaseView
79
78
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as a, Fragment as s } from "react/jsx-runtime";
2
- import { a as o, s as e, f as p } from "../../react.esm-FR1-H8iU.js";
2
+ import { a as r, s as e, f as p } from "../../react.esm-DNwojocF.js";
3
3
  import { a as l } from "../../useBreakpoints-MzTZ0tCT.js";
4
- import { BaseView as r } from "./BaseView.js";
5
- import { d as u, b as d, v as c, t as i, g as t } from "../../vi.CjhMlMwf-DWv7vrn7.js";
4
+ import { BaseView as i } from "./BaseView.js";
5
+ import { d as u, b as m, v as c, t as n, g as t } from "../../vi.CjhMlMwf-BCJNwXvu.js";
6
6
  u("BaseView Test", () => {
7
- d(() => {
7
+ m(() => {
8
8
  c.spyOn(l, "useBreakpoints").mockReturnValue({
9
9
  isMobile: !1,
10
10
  isTablet: !1,
@@ -12,7 +12,7 @@ u("BaseView Test", () => {
12
12
  isDesktopNavbar: !0
13
13
  });
14
14
  });
15
- const n = [
15
+ const o = [
16
16
  {
17
17
  id: "1",
18
18
  title: "user.personal_information",
@@ -37,13 +37,13 @@ u("BaseView Test", () => {
37
37
  component: /* @__PURE__ */ a(s, { children: "Security selected" })
38
38
  }
39
39
  ];
40
- i("render BaseView with empty view and navigation list", () => {
41
- o(
40
+ n("render BaseView with empty view and navigation list", () => {
41
+ r(
42
42
  /* @__PURE__ */ a(
43
- r,
43
+ i,
44
44
  {
45
45
  pathname: "/personal-profile",
46
- elements: n,
46
+ elements: o,
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
- }), i("render BaseView with data and navigation list", () => {
56
- o(
55
+ }), n("render BaseView with data and navigation list", () => {
56
+ r(
57
57
  /* @__PURE__ */ a(
58
- r,
58
+ i,
59
59
  {
60
60
  pathname: "/personal-profile/personal-information",
61
- elements: n,
61
+ elements: o,
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
- }), i("render BaseView with custom detail title and no detail icon", () => {
71
- o(
70
+ }), n("render BaseView with custom detail title and no detail icon", () => {
71
+ r(
72
72
  /* @__PURE__ */ a(
73
- r,
73
+ i,
74
74
  {
75
75
  pathname: "/personal-profile/data-privacy",
76
- elements: n,
76
+ elements: o,
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
- }), i("hide empty view when screen is small", () => {
85
+ }), n("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
- }), o(
91
+ }), r(
92
92
  /* @__PURE__ */ a(
93
- r,
93
+ i,
94
94
  {
95
95
  pathname: "/personal-profile/data-privacy",
96
- elements: n,
96
+ elements: o,
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
- }), i("render BaseView with selected detail section", () => {
106
- o(
105
+ }), n("render BaseView with selected detail section", () => {
106
+ r(
107
107
  /* @__PURE__ */ a(
108
- r,
108
+ i,
109
109
  {
110
110
  pathname: "/personal-profile/data-privacy",
111
- elements: n,
111
+ elements: o,
112
112
  heading: "user.personal-profile",
113
113
  hasSearch: !1,
114
114
  emptyText: "user.noselection",
@@ -1,4 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
+
2
3
  export type BasicHeadingProps = {
3
4
  /**
4
5
  * the text content of the heading