@hortiview/shared-components 2.17.0 → 2.18.1

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 (220) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{AlertBanner-aW6joVUm.js → AlertBanner-BFzaGOer.js} +3 -3
  3. package/dist/{GenericCard-IWX-Bmb_.js → GenericCard-grpa3KJR.js} +3 -3
  4. package/dist/{ListAreaService-Fsm3-gDM.js → ListAreaService-DfxJ7jFs.js} +5 -5
  5. package/dist/{_Map-D8db_GOu.js → _Map-BYxTn6ob.js} +1 -1
  6. package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
  7. package/dist/animationframe-CqXArbwZ.js +32 -0
  8. package/dist/component-By6nyiBU.js +70 -0
  9. package/dist/{component-DEJuY56h.js → component-DYpB_4EP.js} +1 -111
  10. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  11. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  12. package/dist/components/AllowedButton/AllowedButton.js +1 -1
  13. package/dist/components/AllowedIconButton/AllowedIconButton.js +1 -1
  14. package/dist/components/BaseView/BaseView.js +14 -14
  15. package/dist/components/BasicHeading/BasicHeading.js +5 -5
  16. package/dist/components/BlockView/BlockView.js +2 -2
  17. package/dist/components/ButtonCard/ButtonCard.js +6 -6
  18. package/dist/components/ChipCard/ChipCard.js +13 -255
  19. package/dist/components/ConfirmationModal/ConfirmationModal.js +8 -8
  20. package/dist/components/ContextMenu/ContextMenu.js +12 -12
  21. package/dist/components/DeleteModal/DeleteModal.js +25 -25
  22. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  23. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  24. package/dist/components/EmptyView/EmptyView.js +3 -3
  25. package/dist/components/Filter/Filter.js +15 -15
  26. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  27. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +7 -22
  28. package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
  29. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  30. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  31. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +2 -2
  32. package/dist/components/FormComponents/FormSelect/FormSelect.js +73 -72
  33. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  34. package/dist/components/FormComponents/FormSlider/FormSlider.js +10 -98
  35. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  36. package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
  37. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
  38. package/dist/components/GenericTable/GenericTable.js +36 -172
  39. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  40. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  41. package/dist/components/HashTabView/HashTabView.js +10 -428
  42. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  43. package/dist/components/Iconify/Iconify.js +2 -2
  44. package/dist/components/InfoCard/InfoCard.js +4 -4
  45. package/dist/components/InfoGroup/InfoGroup.js +4 -4
  46. package/dist/components/ListArea/ListArea.js +6 -6
  47. package/dist/components/ListArea/ListAreaService.js +6 -6
  48. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +13 -5
  49. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +8 -74
  50. package/dist/components/Modal/Modal.js +12 -122
  51. package/dist/components/ModulePadding/ModulePadding.js +11 -11
  52. package/dist/components/OfflineView/OfflineView.js +45 -7
  53. package/dist/components/OnboardingBanner/OnboardingBanner.js +8 -8
  54. package/dist/components/OverflowTooltip/OverflowTooltip.js +2 -2
  55. package/dist/components/SearchBar/SearchBar.js +2 -2
  56. package/dist/components/Select/Select.js +2 -2
  57. package/dist/components/Stepper/Stepper.js +1 -1
  58. package/dist/components/Stepper/components/StepperButton.js +1 -1
  59. package/dist/components/Stepper/components/StepperHeader.js +3 -3
  60. package/dist/components/Stepper/components/StepperItem.js +2 -2
  61. package/dist/{correct-is-regexp-logic-Y0ToWEjF.js → correct-is-regexp-logic-BJ-OWRrn.js} +1 -1
  62. package/dist/{defineProperty-BTsGZ3c1.js → defineProperty-B7N9EBBI.js} +3 -3
  63. package/dist/{es.string.iterator-UszlTFwY.js → es.string.iterator-DBx2A42F.js} +2 -2
  64. package/dist/{find-CHg-_ooq.js → find-eU9ab_u7.js} +4 -4
  65. package/dist/{get-DxjPG00Z.js → get-BLvvbtML.js} +3 -3
  66. package/dist/get-CBFiuc3f.js +7 -0
  67. package/dist/hooks/useBreakpoints.js +37 -3
  68. package/dist/hooks/useHelperText.js +1 -1
  69. package/dist/{identity-BVIVr9qu.js → identity-B0bbReND.js} +4 -4
  70. package/dist/{index-BcGujPyk.js → index-Df2FYN-K.js} +5 -26
  71. package/dist/{index.es-B8p8KCdj.js → index.es-B19PQgzU.js} +4 -4
  72. package/dist/{index.es-BYcQTTL8.js → index.es-B9BUXRQn.js} +9 -339
  73. package/dist/{index.es-BPv5dCFQ.js → index.es-BOG3_7IM.js} +12 -12
  74. package/dist/{index.es-DGoBge9W.js → index.es-BOvO8moE.js} +4 -4
  75. package/dist/{index.es-BoUnovl_.js → index.es-BcnmoCEg.js} +8 -74
  76. package/dist/{index.es-C32E1Lcb.js → index.es-BwafUoK3.js} +82 -147
  77. package/dist/{index.es-B1h6DPYp.js → index.es-C27R5Xae.js} +2 -2
  78. package/dist/{index.es-nwjKmW7-.js → index.es-C2IOpX7R.js} +34 -111
  79. package/dist/{index.es-Da7ok-B-.js → index.es-C6I3L4U4.js} +2 -2
  80. package/dist/{index.es-BHvm4m-B.js → index.es-Cg57snrN.js} +19 -261
  81. package/dist/{index.es-DUTChZks.js → index.es-Ci3O23C_.js} +6 -72
  82. package/dist/{index.es-t87yNd9Y.js → index.es-CkB4776y.js} +6 -72
  83. package/dist/{index.es-CeQB6igi.js → index.es-Cr1PSTyq.js} +3 -3
  84. package/dist/{index.es--C-VLspF.js → index.es-D1iB_QlE.js} +8 -140
  85. package/dist/{index.es-Dgxrk6xW.js → index.es-DEBGoIKX.js} +2 -2
  86. package/dist/{index.es-CWyjqoEE.js → index.es-DHnCVuQ8.js} +7 -73
  87. package/dist/{index.es-Bo-d_yTV.js → index.es-DHoIQ8lu.js} +2 -2
  88. package/dist/{index.es-SjZ_-d7U.js → index.es-DUrjyxNI.js} +5 -5
  89. package/dist/{index.es-Cfv794DG.js → index.es-DdeCB7LW.js} +1 -1
  90. package/dist/{index.es-BanVdXEd.js → index.es-DgncYOqO.js} +2 -2
  91. package/dist/{index.es-DOnQ26kT.js → index.es-DhlgTSuU.js} +3 -3
  92. package/dist/{index.es-oxil0uFe.js → index.es-Z0aF-7Cn.js} +3 -6
  93. package/dist/{index.es-DmRhbgqK.js → index.es-l_3PNohs.js} +2 -68
  94. package/dist/{isArray-B457bpaW.js → isArray-Ce1Q96lU.js} +1 -1
  95. package/dist/isArray-olhCpv2e.js +7 -0
  96. package/dist/{isEmpty-BnfHn4bl.js → isEmpty-l2xQKl4x.js} +3 -3
  97. package/dist/{isString-DVA49FEo.js → isString-BNdV0Jpg.js} +3 -3
  98. package/dist/{isTypedArray-DziahYkI.js → isTypedArray-D39qzPYE.js} +2 -2
  99. package/dist/{keyboard-DiKJoabs.js → keyboard-DbG3oyPU.js} +3 -25
  100. package/dist/main.js +15 -15
  101. package/dist/{map-BprzXv4m.js → map-ZSVweMI1.js} +5 -5
  102. package/dist/{omit-CYY_mIYv.js → omit-BWQrFyQ-.js} +7 -7
  103. package/dist/{orderBy-DLBJlgdL.js → orderBy-Ce85KqD6.js} +7 -7
  104. package/dist/{parse-int-D-3oah_F.js → parse-int-CGpIXMGa.js} +2 -2
  105. package/dist/{react-number-format.es-DzkMiF8j.js → react-number-format.es-pczkQ4lQ.js} +0 -1
  106. package/dist/{react-tooltip.min-CVsI--2Y.js → react-tooltip.min-Dkz5ltCC.js} +1 -12
  107. package/dist/{react.esm-Bm0cAgpZ.js → react.esm-DF7i80eN.js} +2471 -2582
  108. package/dist/services/UtilService.js +9 -9
  109. package/dist/{slicedToArray-ByMQIs5x.js → slicedToArray-DC6VAZtW.js} +4 -4
  110. package/dist/test-utils.js +1 -1
  111. package/dist/{toString-B7FIT8FE.js → toString-D5bEU-DN.js} +1 -1
  112. package/dist/{uniqueId-BNVTeImh.js → uniqueId-CJo-XRQb.js} +2 -2
  113. package/dist/{util-DA21pZXj.js → util-CBo-ipCE.js} +0 -22
  114. package/package.json +2 -2
  115. package/dist/BigLoadingSpinner-DGj9_Z5J.js +0 -16
  116. package/dist/OfflineView-CIwV08EQ.js +0 -48
  117. package/dist/animationframe-BVKDmEXe.js +0 -54
  118. package/dist/component-Bz_dtX1r.js +0 -114
  119. package/dist/components/AlertBanner/AlertBanner.test.d.ts +0 -1
  120. package/dist/components/AlertBanner/AlertBanner.test.js +0 -34
  121. package/dist/components/AlertBanner/LinkBanner.test.d.ts +0 -1
  122. package/dist/components/AlertBanner/LinkBanner.test.js +0 -17
  123. package/dist/components/Allowed/Allowed.test.d.ts +0 -1
  124. package/dist/components/Allowed/Allowed.test.js +0 -49
  125. package/dist/components/AllowedButton/AllowedButton.test.d.ts +0 -1
  126. package/dist/components/AllowedButton/AllowedButton.test.js +0 -126
  127. package/dist/components/AllowedIconButton/AllowedIconButton.test.d.ts +0 -1
  128. package/dist/components/AllowedIconButton/AllowedIconButton.test.js +0 -121
  129. package/dist/components/BaseView/BaseView.test.d.ts +0 -1
  130. package/dist/components/BaseView/BaseView.test.js +0 -180
  131. package/dist/components/BasicHeading/BasicHeading.test.d.ts +0 -1
  132. package/dist/components/BasicHeading/BasicHeading.test.js +0 -36
  133. package/dist/components/BlockView/BlockView.test.d.ts +0 -1
  134. package/dist/components/BlockView/BlockView.test.js +0 -47
  135. package/dist/components/ButtonCard/ButtonCard.test.d.ts +0 -1
  136. package/dist/components/ButtonCard/ButtonCard.test.js +0 -92
  137. package/dist/components/ChipCard/ChipCard.test.d.ts +0 -1
  138. package/dist/components/ChipCard/ChipCard.test.js +0 -25
  139. package/dist/components/ConfirmationModal/ConfirmationModal.test.d.ts +0 -1
  140. package/dist/components/ConfirmationModal/ConfirmationModal.test.js +0 -221
  141. package/dist/components/ContextMenu/ContextMenu.test.d.ts +0 -1
  142. package/dist/components/ContextMenu/ContextMenu.test.js +0 -96
  143. package/dist/components/DeleteModal/DeleteModal.test.d.ts +0 -1
  144. package/dist/components/DeleteModal/DeleteModal.test.js +0 -132
  145. package/dist/components/Disclaimer/Disclaimer.test.d.ts +0 -1
  146. package/dist/components/Disclaimer/Disclaimer.test.js +0 -13
  147. package/dist/components/EmptyView/EmptyView.test.d.ts +0 -1
  148. package/dist/components/EmptyView/EmptyView.test.js +0 -50
  149. package/dist/components/Filter/Filter.test.d.ts +0 -1
  150. package/dist/components/Filter/Filter.test.js +0 -166
  151. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.d.ts +0 -1
  152. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +0 -56
  153. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.d.ts +0 -1
  154. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +0 -56
  155. package/dist/components/FormComponents/FormNumber/FormNumber.test.d.ts +0 -1
  156. package/dist/components/FormComponents/FormNumber/FormNumber.test.js +0 -51
  157. package/dist/components/FormComponents/FormRadio/FormRadio.test.d.ts +0 -1
  158. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +0 -73
  159. package/dist/components/FormComponents/FormSelect/FormSelect.test.d.ts +0 -1
  160. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +0 -154
  161. package/dist/components/FormComponents/FormSlider/FormSlider.test.d.ts +0 -1
  162. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +0 -49
  163. package/dist/components/FormComponents/FormText/FormText.test.d.ts +0 -1
  164. package/dist/components/FormComponents/FormText/FormText.test.js +0 -113
  165. package/dist/components/FormComponents/FormToggle/FormToggle.test.d.ts +0 -1
  166. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +0 -54
  167. package/dist/components/GenericTable/GenericTable.test.d.ts +0 -1
  168. package/dist/components/GenericTable/GenericTable.test.js +0 -115
  169. package/dist/components/GenericTable/Mobile/GenericCard.test.d.ts +0 -1
  170. package/dist/components/GenericTable/Mobile/GenericCard.test.js +0 -76
  171. package/dist/components/GenericTable/Mobile/GenericCardList.test.d.ts +0 -1
  172. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +0 -75
  173. package/dist/components/HashTabView/HashTabView.test.d.ts +0 -1
  174. package/dist/components/HashTabView/HashTabView.test.js +0 -31
  175. package/dist/components/HeaderFilter/HeaderFilter.test.d.ts +0 -1
  176. package/dist/components/HeaderFilter/HeaderFilter.test.js +0 -46
  177. package/dist/components/Iconify/Iconify.test.d.ts +0 -1
  178. package/dist/components/Iconify/Iconify.test.js +0 -28
  179. package/dist/components/InfoCard/InfoCard.test.d.ts +0 -1
  180. package/dist/components/InfoCard/InfoCard.test.js +0 -48
  181. package/dist/components/InfoGroup/InfoGroup.test.d.ts +0 -1
  182. package/dist/components/InfoGroup/InfoGroup.test.js +0 -40
  183. package/dist/components/ListArea/ListArea.test.d.ts +0 -1
  184. package/dist/components/ListArea/ListArea.test.js +0 -110
  185. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.d.ts +0 -1
  186. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +0 -15
  187. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.d.ts +0 -1
  188. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +0 -20
  189. package/dist/components/ModulePadding/ModulePadding.test.d.ts +0 -1
  190. package/dist/components/ModulePadding/ModulePadding.test.js +0 -22
  191. package/dist/components/OfflineView/OfflineView.test.d.ts +0 -1
  192. package/dist/components/OfflineView/OfflineView.test.js +0 -24
  193. package/dist/components/OnboardingBanner/OnboardingBanner.test.d.ts +0 -1
  194. package/dist/components/OnboardingBanner/OnboardingBanner.test.js +0 -72
  195. package/dist/components/OverflowTooltip/OverflowTooltip.test.d.ts +0 -1
  196. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +0 -37
  197. package/dist/components/PermissionChecks/PermissionService.test.d.ts +0 -1
  198. package/dist/components/PermissionChecks/PermissionService.test.js +0 -91
  199. package/dist/components/SafeForm/SafeForm.test.d.ts +0 -1
  200. package/dist/components/SafeForm/SafeForm.test.js +0 -91
  201. package/dist/components/Scrollbar/scrollbar.test.d.ts +0 -1
  202. package/dist/components/Scrollbar/scrollbar.test.js +0 -15
  203. package/dist/components/SearchBar/SearchBar.test.d.ts +0 -1
  204. package/dist/components/SearchBar/SearchBar.test.js +0 -23
  205. package/dist/components/Select/Select.test.d.ts +0 -1
  206. package/dist/components/Select/Select.test.js +0 -28
  207. package/dist/components/Stepper/Stepper.test.d.ts +0 -1
  208. package/dist/components/Stepper/Stepper.test.js +0 -342
  209. package/dist/components/VerticalDivider/VerticalDivider.test.d.ts +0 -1
  210. package/dist/components/VerticalDivider/VerticalDivider.test.js +0 -15
  211. package/dist/get-D8IXqiys.js +0 -7
  212. package/dist/hooks/useBreakpoints.test.d.ts +0 -1
  213. package/dist/hooks/useBreakpoints.test.js +0 -11
  214. package/dist/index-BLPBqbdx.js +0 -11025
  215. package/dist/isArray-BjSPDQ4v.js +0 -7
  216. package/dist/magic-string.es-uPKorP4O.js +0 -663
  217. package/dist/services/services.test.d.ts +0 -1
  218. package/dist/services/services.test.js +0 -106
  219. package/dist/useBreakpoints-MzTZ0tCT.js +0 -45
  220. package/dist/vi.bdSIJ99Y-B308Q-4w.js +0 -11963
@@ -1,40 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { a as l, s as t } from "../../react.esm-Bm0cAgpZ.js";
3
- import { InfoGroup as r } from "./InfoGroup.js";
4
- import { d as s, t as i, g as e } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- s("InfoGroup Test", () => {
6
- i("render Single InfoGroup", () => {
7
- l(/* @__PURE__ */ o(r, { fields: m }));
8
- const a = t.getAllByTestId("infoGroupItem");
9
- e(a.length).toBe(3);
10
- const n = t.getAllByTestId("infoGroupValue");
11
- e(a.length).toBe(3), e(t.getByText("organization.create.registration-number")).toBeInTheDocument(), e(n[0]).toHaveTextContent("123"), e(t.getByText("myOrganizations.label-primary-contact")).toBeInTheDocument(), e(n[1]).toHaveTextContent("User A"), e(t.getByText("myOrganizations.label-contact")).toBeInTheDocument(), e(n[2]).toHaveTextContent("User B");
12
- }), i("render Multi InfoGroup", () => {
13
- l(/* @__PURE__ */ o(r, { fields: [
14
- [
15
- { label: "organization.create.registration-number", value: "123" },
16
- { label: "myOrganizations.label-primary-contact", value: "User A" }
17
- ],
18
- [
19
- { label: "myOrganizations.label-contact", value: "User B" },
20
- {
21
- label: "organization.something-else",
22
- value: "some"
23
- }
24
- ]
25
- ] }));
26
- const n = t.getAllByTestId("infoGroupValue");
27
- e(n.length).toBe(4), e(t.getByText("organization.create.registration-number")).toBeInTheDocument(), e(n[0]).toHaveTextContent("123"), e(t.getByText("myOrganizations.label-primary-contact")).toBeInTheDocument(), e(n[1]).toHaveTextContent("User A"), e(t.getByTestId("infoGroup")).toBeInTheDocument(), e(t.getByTestId("singleRow")).toBeInTheDocument(), e(t.getAllByTestId("infoGroupItem").length).toBe(4), e(t.getByText("myOrganizations.label-contact")).toBeInTheDocument(), e(n[2]).toHaveTextContent("User B"), e(t.getByText("organization.something-else")).toBeInTheDocument(), e(n[3]).toHaveTextContent("some");
28
- }), i("render Single InfoGroup with component", () => {
29
- l(/* @__PURE__ */ o(r, { fields: [
30
- { label: "labelSouldntBeRendered", component: /* @__PURE__ */ o("div", { children: "Component" }) },
31
- { label: "myOrganizations.label-primary-contact", value: "User A" },
32
- { label: "componentWithLabel", componentVariant: "embedded", component: /* @__PURE__ */ o("div", { children: "Badge" }) }
33
- ] })), e(t.queryByText("labelSouldntBeRendered")).toBeNull(), e(t.getByText("Component")).toBeInTheDocument(), e(t.getByText("myOrganizations.label-primary-contact")).toBeInTheDocument(), e(t.getByText("User A")).toBeInTheDocument(), e(t.getByText("componentWithLabel")).toBeInTheDocument(), e(t.getByText("Badge")).toBeInTheDocument();
34
- });
35
- });
36
- const m = [
37
- { label: "organization.create.registration-number", value: "123" },
38
- { label: "myOrganizations.label-primary-contact", value: "User A" },
39
- { label: "myOrganizations.label-contact", value: "User B" }
40
- ];
@@ -1 +0,0 @@
1
- export {};
@@ -1,110 +0,0 @@
1
- import { jsx as r, Fragment as i } from "react/jsx-runtime";
2
- import { P as m } from "../../index.es-BanVdXEd.js";
3
- import { c as u } from "../../index.es-SjZ_-d7U.js";
4
- import { a as s, s as a, f as c } from "../../react.esm-Bm0cAgpZ.js";
5
- import { ListArea as l } from "./ListArea.js";
6
- import { g as h } from "../../ListAreaService-Fsm3-gDM.js";
7
- import { d, t as n, g as t } from "../../vi.bdSIJ99Y-B308Q-4w.js";
8
- d("ListArea Test", () => {
9
- const o = [
10
- {
11
- id: "1",
12
- title: "user.personal_information",
13
- icon: "account_circle",
14
- route: "/personal-profile/personal-information",
15
- component: /* @__PURE__ */ r(i, { children: "Personal information selected" })
16
- },
17
- {
18
- id: "2",
19
- title: "user.data_privacy",
20
- icon: "privacy_tip",
21
- route: "/personal-profile/data-privacy",
22
- component: /* @__PURE__ */ r(i, { children: "Data Privacy selected" })
23
- },
24
- {
25
- id: "3",
26
- title: "user.security",
27
- icon: "security",
28
- route: "/personal-profile/security",
29
- component: /* @__PURE__ */ r(i, { children: "Security selected" })
30
- }
31
- ];
32
- n("render ListArea options properly", () => {
33
- s(
34
- /* @__PURE__ */ r(
35
- l,
36
- {
37
- elements: o,
38
- pathname: "/personal-profile/data-privacy",
39
- routerLinkElement: void 0
40
- }
41
- )
42
- );
43
- const e = a.getAllByRole("option");
44
- t(e.length).toBe(3), t(e[0]).toHaveTextContent(/privacy_tip/), t(e[0]).toHaveTextContent(/user.data_privacy/), t(e[0]).toHaveTextContent(/arrow_right/), t(e[1]).toHaveTextContent(/account_circle/), t(e[1]).toHaveTextContent(/user.personal_information/), t(e[1]).toHaveTextContent(/arrow_right/), t(e[2]).toHaveTextContent(/security/), t(e[2]).toHaveTextContent(/user.security/), t(e[2]).toHaveTextContent(/arrow_right/);
45
- }), n("render ListArea with search bar", () => {
46
- s(
47
- /* @__PURE__ */ r(
48
- l,
49
- {
50
- elements: o,
51
- hasSearch: !0,
52
- searchPlaceholder: "search",
53
- pathname: "/personal-profile/data-privacy",
54
- routerLinkElement: void 0
55
- }
56
- )
57
- );
58
- const e = a.getByTestId("search-bar-input");
59
- t(e).toBeInTheDocument(), c.focus(e), t(e).toHaveAttribute("placeholder", "search");
60
- }), n("filter ListArea options on setting search value", () => {
61
- s(
62
- /* @__PURE__ */ r(
63
- l,
64
- {
65
- elements: o,
66
- hasSearch: !0,
67
- pathname: "/personal-profile/data-privacy",
68
- routerLinkElement: void 0
69
- }
70
- )
71
- );
72
- const e = a.getByTestId("search-bar-input");
73
- c.focus(e), c.change(e, { target: { value: "personal" } });
74
- const p = a.getAllByRole("option");
75
- t(p.length).toBe(1), t(p[0]).toHaveTextContent(/user.personal_information/);
76
- });
77
- });
78
- d("ListAreaService Test", () => {
79
- const o = [
80
- {
81
- id: "1",
82
- groupName: "farm-1",
83
- title: "GH1",
84
- icon: "grass",
85
- route: "/farm-1/gh1"
86
- },
87
- {
88
- id: "2",
89
- groupName: "farm-1",
90
- title: "GH2",
91
- icon: "grass",
92
- route: "/farm-1/gh2"
93
- },
94
- {
95
- id: "3",
96
- groupName: "farm-2",
97
- title: "GH3",
98
- icon: "grass",
99
- route: "/farm-2/gh3"
100
- }
101
- ];
102
- n("should return grouped items", () => {
103
- const e = h(o, "", "", void 0);
104
- t(e.length).toBe(2), t(e[0].groupName).toStrictEqual(
105
- /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(u, { children: "farm-1" }) })
106
- ), t(e[0].items.length).toBe(2), t(e[1].groupName).toStrictEqual(
107
- /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(u, { children: "farm-2" }) })
108
- ), t(e[1].items.length).toBe(1);
109
- });
110
- });
@@ -1,15 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { s as r, B as n } from "../../../BigLoadingSpinner-DGj9_Z5J.js";
3
- import { a as i, s as e } from "../../../react.esm-Bm0cAgpZ.js";
4
- import { d as g, t as a, g as t } from "../../../vi.bdSIJ99Y-B308Q-4w.js";
5
- g("BigLoadingSpinner Test", () => {
6
- a("render BigLoadingSpinner with custom loading text", () => {
7
- i(/* @__PURE__ */ o(n, { text: "Please wait..." })), t(e.getByText("Please wait...")).toBeInTheDocument(), t(e.getByRole("progressbar")).toBeInTheDocument();
8
- }), a("renders BigLoadingSpinner with default loading text", () => {
9
- i(/* @__PURE__ */ o(n, { text: "loadingtext" })), t(e.getByText("loadingtext")).toBeInTheDocument();
10
- }), a('Icon component contains className attribute "logo"', () => {
11
- i(/* @__PURE__ */ o(n, {}));
12
- const s = e.getByTestId("logo-icon");
13
- t(s).toHaveClass(r.logo);
14
- });
15
- });
@@ -1,20 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { a, s as e } from "../../../react.esm-Bm0cAgpZ.js";
3
- import { act as s } from "react";
4
- import { LoadingSpinner as i } from "./LoadingSpinner.js";
5
- import { d as m, b as d, t as o, g as t, v as r } from "../../../vi.bdSIJ99Y-B308Q-4w.js";
6
- m("LoadingSpinner Test", () => {
7
- d(() => {
8
- r.useFakeTimers();
9
- }), o("render LoadingSpinner without additional params", () => {
10
- a(/* @__PURE__ */ n(i, {})), t(e.getByRole("progressbar")).toBeInTheDocument();
11
- }), o("render LoadingSpinner with spinner only", () => {
12
- a(/* @__PURE__ */ n(i, { spinnerOnly: !0 })), t(e.getByRole("progressbar")).toBeInTheDocument(), t(e.queryByText("Loading")).not.toBeInTheDocument();
13
- }), o("render LoadingSpinner with custom loading text", () => {
14
- a(/* @__PURE__ */ n(i, { text: "Please wait..." })), t(e.getByText("Please wait...")).toBeInTheDocument();
15
- }), o("render loadingspinner with text changed to impatience message after 10 seconds", async () => {
16
- a(/* @__PURE__ */ n(i, { text: "Please wait...", impatienceTimeout: 1 })), t(e.getByText("Please wait...")).toBeInTheDocument(), s(() => {
17
- r.advanceTimersByTime(2e3);
18
- }), t(e.getByText("This is taking longer than expected. Please be patient.")).toBeInTheDocument();
19
- });
20
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { a as o, s as e } from "../../react.esm-Bm0cAgpZ.js";
3
- import { a } from "../../useBreakpoints-MzTZ0tCT.js";
4
- import { ModulePadding as d } from "./ModulePadding.js";
5
- import { d as r, t as i, a as n, g as s } from "../../vi.bdSIJ99Y-B308Q-4w.js";
6
- r("ModulePadding Test", () => {
7
- i("should render with padding of 16px for desktop", () => {
8
- n.spyOn(a, "useBreakpoints").mockReturnValue({
9
- isMobile: !1,
10
- isTablet: !1,
11
- isDesktop: !0,
12
- isDesktopNavbar: !0
13
- }), o(/* @__PURE__ */ t(d, { children: "Content" })), s(e.getByText("Content")).toBeInTheDocument(), s(e.getByTestId("module-padding")).toHaveClass("lmnt-padding--standard");
14
- }), i("should render with padding of 8px for mobile", () => {
15
- n.spyOn(a, "useBreakpoints").mockReturnValue({
16
- isMobile: !0,
17
- isTablet: !1,
18
- isDesktop: !1,
19
- isDesktopNavbar: !1
20
- }), o(/* @__PURE__ */ t(d, { children: "Content" })), s(e.getByTestId("module-padding")).toHaveClass("lmnt-padding--dense");
21
- });
22
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { a as n, s as t, f as u } from "../../react.esm-Bm0cAgpZ.js";
3
- import { s as r, O as i } from "../../OfflineView-CIwV08EQ.js";
4
- import { d as B, t as l, g as e, a as c } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- B("OfflineView", () => {
6
- l("should render OfflineView with title and subtitle", () => {
7
- n(/* @__PURE__ */ o(i, { title: "test-title", subtitle: "test-subtitle" })), e(t.getByTestId("offline-view-container")).toBeInTheDocument(), e(t.getByText("test-title")).toBeInTheDocument(), e(t.getByText("test-subtitle")).toBeInTheDocument(), e(t.queryByText("cloud_off")).toBeInTheDocument();
8
- }), l("should render without subtitle", () => {
9
- n(/* @__PURE__ */ o(i, { title: "test-title" })), e(t.getByTestId("offline-view-container")).toBeInTheDocument(), e(t.getByText("test-title")).toBeInTheDocument(), e(t.queryByText("test-subtitle")).not.toBeInTheDocument();
10
- }), l("should render custom icon", () => {
11
- n(/* @__PURE__ */ o(i, { title: "test-title", icon: "add" })), e(t.getByTestId("offline-view-container")).toBeInTheDocument(), e(t.getByText("test-title")).toBeInTheDocument(), e(t.getByText("add")).toBeInTheDocument();
12
- }), l("should render the small offline view", () => {
13
- n(/* @__PURE__ */ o(i, { title: "test-title", size: "small" })), e(t.getByText("test-title")).toHaveClass("mdc-typography--subtitle1");
14
- }), l("should render the filled offline view", () => {
15
- n(/* @__PURE__ */ o(i, { title: "test-title", variant: "filled", "data-testid": "test" })), e(t.getByTestId("test")).toHaveClass(r.bgGrey);
16
- }), l("should render OfflineView with button", () => {
17
- n(/* @__PURE__ */ o(i, { title: "test-title", buttonLabel: "Button" })), e(t.getByText("Button")).toBeInTheDocument(), e(t.getByRole("button")).toBeInTheDocument();
18
- }), l("calls onClick when button is clicked", () => {
19
- const s = c.fn();
20
- n(/* @__PURE__ */ o(i, { title: "test-title", buttonLabel: "Button", onClick: s })), u.click(t.getByText("Button")), e(s).toHaveBeenCalled();
21
- }), l("should render OfflineView without button", () => {
22
- n(/* @__PURE__ */ o(i, { title: "test-title" })), e(t.queryByText("Button")).not.toBeInTheDocument(), e(t.queryByRole("button")).not.toBeInTheDocument();
23
- });
24
- });
@@ -1,72 +0,0 @@
1
- import { jsx as n, Fragment as d } from "react/jsx-runtime";
2
- import { a as o, s as e } from "../../react.esm-Bm0cAgpZ.js";
3
- import { OnboardingBanner as i } from "./OnboardingBanner.js";
4
- import { d as a, t as s, a as r, g as t } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- a("Onboarding Banner Test", () => {
6
- s("render OnboardingBanner with headline & description text", () => {
7
- o(
8
- /* @__PURE__ */ n(
9
- i,
10
- {
11
- headline: "test",
12
- description: "test description",
13
- isVisible: !0,
14
- onClose: r.fn()
15
- }
16
- )
17
- ), t(e.getByText("test")).toBeInTheDocument(), t(e.getByText("test description")).toBeInTheDocument();
18
- }), s("render OnboardingBanner with media content", () => {
19
- o(
20
- /* @__PURE__ */ n(
21
- i,
22
- {
23
- headline: "test",
24
- description: "test description",
25
- mediaContent: /* @__PURE__ */ n(d, { children: "Element" }),
26
- isVisible: !0,
27
- onClose: r.fn()
28
- }
29
- )
30
- ), t(e.getByText("Element")).toBeInTheDocument();
31
- }), s("render OnboardingBanner with buttons", () => {
32
- o(
33
- /* @__PURE__ */ n(
34
- i,
35
- {
36
- headline: "test",
37
- description: "test description",
38
- isVisible: !0,
39
- onClose: r.fn(),
40
- buttons: [{ label: "button-1", id: "1" }, { label: "button-2", id: "2" }]
41
- }
42
- )
43
- ), t(e.getByText("button-1")).toBeInTheDocument(), t(e.getByText("button-2")).toBeInTheDocument(), t(e.queryByText("button-3")).not.toBeInTheDocument();
44
- }), s("calls onClose when close button is clicked", () => {
45
- const l = r.fn();
46
- o(
47
- /* @__PURE__ */ n(
48
- i,
49
- {
50
- headline: "test",
51
- description: "test description",
52
- isVisible: !0,
53
- onClose: l,
54
- buttons: [{ label: "button-1", id: "1" }, { label: "button-2", id: "2" }]
55
- }
56
- )
57
- ), e.getByTestId("onboarding-banner-close-button").click(), t(l).toHaveBeenCalledTimes(1);
58
- }), s("renders nothing when isVisibility is false", () => {
59
- o(
60
- /* @__PURE__ */ n(
61
- i,
62
- {
63
- headline: "test",
64
- description: "test description",
65
- isVisible: !1,
66
- onClose: r.fn(),
67
- buttons: [{ label: "button-1", id: "1" }, { label: "button-2", id: "2" }]
68
- }
69
- )
70
- ), t(e.queryByText("test")).not.toBeInTheDocument();
71
- });
72
- });
@@ -1,37 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { b as n } from "../../index.es-SjZ_-d7U.js";
3
- import { a as i, s as e, w as s } from "../../react.esm-Bm0cAgpZ.js";
4
- import { u as a } from "../../index-BLPBqbdx.js";
5
- import { OverflowTooltip as c } from "./OverflowTooltip.js";
6
- import { d as u, t as p, g as r } from "../../vi.bdSIJ99Y-B308Q-4w.js";
7
- u("OverflowTooltip Test", () => {
8
- p("should render OverflowTooltip on hover", async () => {
9
- Object.defineProperty(HTMLElement.prototype, "clientWidth", {
10
- configurable: !0,
11
- value: 100
12
- }), Object.defineProperty(HTMLElement.prototype, "scrollWidth", {
13
- configurable: !0,
14
- value: 200
15
- });
16
- const l = a.setup(), o = "Block name that should be truncated with an ellipsis because it is very very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong";
17
- i(
18
- /* @__PURE__ */ t(c, { id: o, text: o, children: /* @__PURE__ */ t(n, { children: o }) })
19
- ), r(e.getByText(o)).toBeInTheDocument(), l.hover(e.getByText(o)), await s(() => {
20
- r(e.getByRole("tooltip")).toBeInTheDocument();
21
- });
22
- }), p("should not render OverflowTooltip on hover", async () => {
23
- Object.defineProperty(HTMLElement.prototype, "clientWidth", {
24
- configurable: !0,
25
- value: 200
26
- }), Object.defineProperty(HTMLElement.prototype, "scrollWidth", {
27
- configurable: !0,
28
- value: 200
29
- });
30
- const l = a.setup(), o = "Block name that should be truncated with an ellipsis because it is very very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong";
31
- i(
32
- /* @__PURE__ */ t(c, { id: o, text: o, children: /* @__PURE__ */ t(n, { children: o }) })
33
- ), r(e.getByText(o)).toBeInTheDocument(), l.hover(e.getByText(o)), await s(() => {
34
- r(e.queryByRole("tooltip")).not.toBeInTheDocument();
35
- });
36
- });
37
- });
@@ -1,91 +0,0 @@
1
- import { r as d } from "../../react.esm-Bm0cAgpZ.js";
2
- import { createPermissionWrapper as m } from "../../test-utils.js";
3
- import { HVMainPermissions as i } from "../../types/Permission.js";
4
- import { useIsAllowed as l, getPermissionsFromModulePermissionToken as a } from "./PermissionService.js";
5
- import { d as u, t, g as o } from "../../vi.bdSIJ99Y-B308Q-4w.js";
6
- u("Test PermissionService", () => {
7
- u("Test isAllowed", () => {
8
- const n = [
9
- i.FarmOrganizationsRead,
10
- i.FarmOrganizationsUpdate
11
- ], e = "123";
12
- t("should return true if the user has all (AND) needed permissions", () => {
13
- const {
14
- result: { current: s }
15
- } = d(() => l(), {
16
- wrapper: m({
17
- userPermissions: {
18
- [e]: [
19
- i.FarmOrganizationsRead,
20
- i.FarmOrganizationsUpdate
21
- ]
22
- }
23
- })
24
- }), r = s({
25
- neededPermissions: n,
26
- entityIds: e,
27
- areAllPermissionsNeeded: !0
28
- });
29
- o(r).toBe(!0);
30
- }), t("should return true if the user has one of the (OR) needed permissions", () => {
31
- const {
32
- result: { current: s }
33
- } = d(() => l(), {
34
- wrapper: m({
35
- userPermissions: {
36
- [e]: [i.BlocksCreate, i.FarmOrganizationsRead]
37
- }
38
- })
39
- }), r = s({ neededPermissions: n, entityIds: e });
40
- o(r).toBe(!0);
41
- }), t("should return true if neededPermissions array is empty", () => {
42
- const {
43
- result: { current: s }
44
- } = d(() => l(), {
45
- wrapper: m({
46
- userPermissions: {
47
- [e]: []
48
- }
49
- })
50
- }), r = s({
51
- neededPermissions: [],
52
- entityIds: e,
53
- areAllPermissionsNeeded: !0
54
- });
55
- o(r).toBe(!0);
56
- }), t("should return false if given entity id not matching with any userPermissions entry", () => {
57
- const {
58
- result: { current: s }
59
- } = d(() => l(), {
60
- wrapper: m({
61
- userPermissions: {
62
- 456: [i.BlocksCreate]
63
- }
64
- })
65
- }), r = s({ neededPermissions: n, entityIds: e });
66
- o(r).toBe(!1);
67
- });
68
- }), u("Test getPermissionsFromModulePermissionToken", () => {
69
- const n = `
70
- eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJNb2R1bGVSb2xlc0FuZFBlcm1pc3Npb25zIjp7IkZhcm1Pcmdhbml6YXRpb25JZCI6IjJmZDJjMGIwLTUwNjEtNGQ0NS1hYzI1LWQxY2E0YWNkNzMzOCIsIlVzZXJJZCI6Ijc5M2IxZmFlLTg0ODItNGVkMy1hYjczLTQ1NzFhMDViYjEyYiIsIk1vZHVsZUlkIjoiMTIzNDUtNjc4OTAtYWJjZGUtZWZnaGkiLCJSb2xlTmFtZXMiOlsiRmFybSBNYW5hZ2VyIiwiRmFybSBXb3JrZXIiXSwiRXhlY3V0ZUVuZHBvaW50UGVybWlzc2lvbk5hbWVzIjpbImJsb2Nrcy1yZWFkIiwiYmxvY2tzLXVwZGF0ZSIsImZhcm1zLXJlYWQiXX19.test-signature
71
- `;
72
- t("should return the correct permissions from module permission token", () => {
73
- const e = a({
74
- permissionToken: n
75
- });
76
- o(e).toEqual({
77
- "2fd2c0b0-5061-4d45-ac25-d1ca4acd7338": ["blocks-read", "blocks-update", "farms-read"]
78
- });
79
- }), t("should return undefined when permission token is empty", () => {
80
- const e = a({
81
- permissionToken: ""
82
- });
83
- o(e).toBeUndefined();
84
- }), t("should return undefined when permission token is not provided", () => {
85
- const e = a({
86
- permissionToken: void 0
87
- });
88
- o(e).toBeUndefined();
89
- });
90
- });
91
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,91 +0,0 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import { a as u, s as i, f as r } from "../../react.esm-Bm0cAgpZ.js";
3
- import { u as y } from "../../index-BLPBqbdx.js";
4
- import { SafeForm as p } from "./SafeForm.js";
5
- import { d as b, t as c, g as s, v as l } from "../../vi.bdSIJ99Y-B308Q-4w.js";
6
- b("SafeForm", () => {
7
- c("renders form with children", () => {
8
- u(
9
- /* @__PURE__ */ a(p, { children: [
10
- /* @__PURE__ */ t("input", { "data-testid": "test-input", type: "text" }),
11
- /* @__PURE__ */ t("button", { "data-testid": "submit-button", type: "submit", children: "Submit" })
12
- ] })
13
- ), s(i.getByTestId("test-input")).toBeInTheDocument(), s(i.getByTestId("submit-button")).toBeInTheDocument();
14
- }), c("prevents Enter key default behavior on text inputs", async () => {
15
- const e = y.setup();
16
- u(
17
- /* @__PURE__ */ a(p, { children: [
18
- /* @__PURE__ */ t("input", { "data-testid": "text-input", type: "text" }),
19
- /* @__PURE__ */ t("button", { "data-testid": "submit-button", type: "submit", children: "Submit" })
20
- ] })
21
- );
22
- const n = i.getByTestId("text-input");
23
- await e.click(n);
24
- const o = r.keyDown(n, { key: "Enter" });
25
- s(o).toBe(!1);
26
- }), c("allows Enter key press on submit button (does not prevent default)", async () => {
27
- u(
28
- /* @__PURE__ */ a(p, { children: [
29
- /* @__PURE__ */ t("input", { type: "text" }),
30
- /* @__PURE__ */ t("button", { "data-testid": "submit-button", type: "submit", children: "Submit" })
31
- ] })
32
- );
33
- const e = i.getByTestId("submit-button");
34
- e.focus();
35
- const n = r.keyDown(e, { key: "Enter" });
36
- s(n).toBe(!0);
37
- }), c("allows Enter key press on regular button (does not prevent default)", async () => {
38
- const e = l.fn();
39
- u(
40
- /* @__PURE__ */ a(p, { children: [
41
- /* @__PURE__ */ t("input", { type: "text" }),
42
- /* @__PURE__ */ t("button", { "data-testid": "cancel-button", type: "button", onClick: e, children: "Cancel" })
43
- ] })
44
- );
45
- const n = i.getByTestId("cancel-button");
46
- n.focus();
47
- const o = r.keyDown(n, { key: "Enter" });
48
- s(o).toBe(!0);
49
- }), c("allows Enter key press on textarea (does not prevent default)", async () => {
50
- u(
51
- /* @__PURE__ */ a(p, { children: [
52
- /* @__PURE__ */ t("input", { type: "text" }),
53
- /* @__PURE__ */ t("textarea", { "data-testid": "textarea" }),
54
- /* @__PURE__ */ t("button", { type: "submit", children: "Submit" })
55
- ] })
56
- );
57
- const e = i.getByTestId("textarea");
58
- e.focus();
59
- const n = r.keyDown(e, { key: "Enter" });
60
- s(n).toBe(!0);
61
- }), c("does not interfere with other key presses", async () => {
62
- const e = y.setup();
63
- u(
64
- /* @__PURE__ */ a(p, { children: [
65
- /* @__PURE__ */ t("input", { "data-testid": "text-input", type: "text" }),
66
- /* @__PURE__ */ t("button", { type: "submit", children: "Submit" })
67
- ] })
68
- );
69
- const n = i.getByTestId("text-input");
70
- await e.click(n), await e.keyboard("a"), await e.keyboard("{Tab}"), await e.keyboard("{Escape}"), s(n).toHaveValue("a");
71
- const o = r.keyDown(n, { key: "Tab" }), d = r.keyDown(n, { key: "Escape" });
72
- s(o).toBe(!0), s(d).toBe(!0);
73
- }), c("prevents Enter key on various input types", async () => {
74
- u(
75
- /* @__PURE__ */ a(p, { children: [
76
- /* @__PURE__ */ t("input", { "data-testid": "input1", type: "text" }),
77
- /* @__PURE__ */ t("input", { "data-testid": "input2", type: "email" }),
78
- /* @__PURE__ */ t("input", { "data-testid": "input3", type: "password" }),
79
- /* @__PURE__ */ t("input", { "data-testid": "input4", type: "number" }),
80
- /* @__PURE__ */ t("button", { type: "submit", children: "Submit" })
81
- ] })
82
- );
83
- const e = ["input1", "input2", "input3", "input4"];
84
- for (const n of e) {
85
- const o = i.getByTestId(n);
86
- o.focus();
87
- const d = r.keyDown(o, { key: "Enter" });
88
- s(d).toBe(!1);
89
- }
90
- });
91
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { a, s as e } from "../../react.esm-Bm0cAgpZ.js";
3
- import { ScrollbarY as d, ScrollbarX as l } from "./Scrollbar.js";
4
- import { d as c, t, g as o } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- c("Scrollbar", () => {
6
- t("should render Y correctly", () => {
7
- a(/* @__PURE__ */ s("div", { "data-testid": "div", className: d }));
8
- const r = e.getByTestId("div");
9
- o(r).toHaveClass(/scrollbarY/);
10
- }), t("should render X correctly", () => {
11
- a(/* @__PURE__ */ s("div", { "data-testid": "div", className: l }));
12
- const r = e.getByTestId("div");
13
- o(r).toHaveClass(/scrollbarX/);
14
- });
15
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { a as r, s as t, f as h } from "../../react.esm-Bm0cAgpZ.js";
3
- import { act as l } from "react";
4
- import { SearchBar as s } from "./SearchBar.js";
5
- import { d as m, t as o, a as n, g as e } from "../../vi.bdSIJ99Y-B308Q-4w.js";
6
- m("SearchBar Test", () => {
7
- o("renders SearchBar component", () => {
8
- r(
9
- /* @__PURE__ */ a(s, { searchTerm: "searchValue", setSearchTerm: n.fn(), placeholder: "search" })
10
- ), e(t.getByRole("textbox")).toBeInTheDocument(), e(t.getByTestId("search-bar-icon-button")).toBeInTheDocument(), e(t.getByTestId("search-bar-input")).toBeInTheDocument(), e(t.getByRole("textbox")).toHaveAttribute("value", "searchValue"), e(t.getByRole("textbox").parentElement).not.toHaveClass("lmnt-text-field--dense"), e(t.getByText("close")).toBeInTheDocument();
11
- }), o("renders SearchBar component with custom classname", () => {
12
- r(/* @__PURE__ */ a(s, { searchTerm: "search", setSearchTerm: n.fn(), className: "searchClass" })), e(t.getByRole("textbox").parentElement).toHaveClass("searchClass");
13
- }), o("renders SearchBar component with dense look", () => {
14
- r(/* @__PURE__ */ a(s, { searchTerm: "search", setSearchTerm: n.fn(), dense: !0 })), e(t.getByRole("textbox").parentElement).toHaveClass("lmnt-text-field--dense");
15
- }), o("renders SearchBar component with search icon", () => {
16
- r(/* @__PURE__ */ a(s, { searchTerm: "", setSearchTerm: n.fn(), dense: !0 })), e(t.getByText("search")).toBeInTheDocument();
17
- }), o("renders SearchBar and changes value", () => {
18
- const c = n.fn();
19
- r(/* @__PURE__ */ a(s, { searchTerm: "", setSearchTerm: c })), e(t.getByText("search")).toBeInTheDocument(), e(t.getByRole("textbox")).toHaveAttribute("value", ""), h.change(t.getByRole("textbox"), { target: { value: "searchValue" } }), l(() => {
20
- e(c).toHaveBeenCalledTimes(1), e(c).toHaveBeenCalledWith("searchValue");
21
- });
22
- });
23
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { a, s as c } from "../../react.esm-Bm0cAgpZ.js";
3
- import { Select as n } from "./Select.js";
4
- import { d as l, t as m, g as e } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- l("Select", () => {
6
- const o = [
7
- { value: "1", text: "Option 1" },
8
- { value: "2", text: "Option 2" },
9
- { value: "3", text: "Option 3" }
10
- ];
11
- m("render select without portal when not hoisted and with default data-testid", () => {
12
- a(/* @__PURE__ */ s(n, { options: o })), e(c.getByTestId("custom-select")).toBeInTheDocument();
13
- const t = c.queryByTestId("custom-portal");
14
- e(t).not.toBeInTheDocument();
15
- }), m("render select with custom data-testid", () => {
16
- a(/* @__PURE__ */ s(n, { options: o, "data-testid": "custom-test-id" })), e(c.getByTestId("custom-test-id")).toBeInTheDocument();
17
- const t = c.queryByTestId("custom-select");
18
- e(t).not.toBeInTheDocument();
19
- }), m("render select with default portal class name", () => {
20
- a(/* @__PURE__ */ s(n, { hoisted: !0, options: o }));
21
- const t = document.getElementById("custom-portal-default");
22
- e(t).toBeInTheDocument();
23
- }), m("render select with custom portal class name", () => {
24
- a(/* @__PURE__ */ s(n, { hoisted: !0, options: o, portalClassName: "test-custom-portal-class-name" }));
25
- const t = document.getElementById("custom-portal-test-custom-portal-class-name");
26
- e(t).toBeInTheDocument();
27
- });
28
- });
@@ -1 +0,0 @@
1
- export {};