@hortiview/shared-components 1.9.0 → 1.11.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.
- package/CHANGELOG.md +19 -0
- package/README.md +43 -1
- package/dist/{BigLoadingSpinner-CqSGYzZA.js → BigLoadingSpinner-BbXMCKpm.js} +3 -3
- package/dist/{GenericCard-CelFEWlW.js → GenericCard-DuNnB9Ve.js} +1 -1
- package/dist/{ListAreaService-DOwtdRa4.js → ListAreaService-Wq9IkwWN.js} +6 -6
- package/dist/assets/AlertBanner.css +1 -1
- package/dist/assets/BaseView.css +1 -1
- package/dist/assets/stepper.css +1 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +9 -2
- package/dist/components/AlertBanner/AlertBanner.js +19 -29
- package/dist/components/AlertBanner/AlertBanner.test.js +9 -9
- package/dist/components/BaseView/BaseView.d.ts +5 -1
- package/dist/components/BaseView/BaseView.js +74 -62
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ChipCard/ChipCard.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.js +9 -9
- package/dist/components/EmptyView/EmptyView.test.js +5 -5
- package/dist/components/Filter/Filter.js +2 -2
- package/dist/components/Filter/Filter.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +6 -6
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +1 -1
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +4 -4
- package/dist/components/FormComponents/FormText/FormText.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +4 -4
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +1 -1
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +2 -2
- package/dist/components/ListArea/ListArea.test.js +3 -3
- package/dist/components/ListArea/ListAreaService.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +2 -2
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +7 -7
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/ModulePadding/ModulePadding.js +1 -1
- package/dist/components/ModulePadding/ModulePadding.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/Select.test.js +1 -1
- package/dist/components/Stepper/Stepper.d.ts +16 -0
- package/dist/components/Stepper/Stepper.js +54 -0
- package/dist/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/components/Stepper/Stepper.test.js +95 -0
- package/dist/components/Stepper/components/StepperButton.d.ts +25 -0
- package/dist/components/Stepper/components/StepperButton.js +44 -0
- package/dist/components/Stepper/components/StepperHeader.d.ts +9 -0
- package/dist/components/Stepper/components/StepperHeader.js +34 -0
- package/dist/components/Stepper/components/StepperIndicator.d.ts +9 -0
- package/dist/components/Stepper/components/StepperIndicator.js +16 -0
- package/dist/components/Stepper/stepperTypes.d.ts +77 -0
- package/dist/components/Stepper/stepperTypes.js +1 -0
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/hooks/useBreakpoints.test.js +1 -1
- package/dist/{index.es-UHKFl8Da.js → index.es-BNHI3ZIK.js} +2 -2
- package/dist/{index.es-zr101OF5.js → index.es-CoFul5zR.js} +2 -2
- package/dist/{index.es-CF_xy2ns.js → index.es-D54RuMc_.js} +2 -2
- package/dist/{index.es-d5xhUpJZ.js → index.es-fnFnw2P1.js} +1 -1
- package/dist/main.d.ts +6 -2
- package/dist/main.js +51 -45
- package/dist/services/services.test.js +1 -1
- package/dist/stepper.module-HuqmDJPj.js +12 -0
- package/dist/{vi.CjhMlMwf-BCJNwXvu.js → vi.CjhMlMwf-CKxPQtd6.js} +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [1.11.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.10.0...v1.11.0) (2025-05-28)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* introduce stepper component ([4519232](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/4519232b157fef0ee86b2b4fae99cf06a50a4754))
|
|
6
|
+
* move button props to steps ([9237df3](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/9237df37c46015e4f869c87d4aa3d094bbcec2f1))
|
|
7
|
+
* update stepper to include buttons and content ([e5af269](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/e5af26940f06d1b3035075b0045d91f96f6cad3e))
|
|
8
|
+
|
|
9
|
+
## [1.10.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.9.0...v1.10.0) (2025-05-26)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add hint prop to BaseView and update story ([d466795](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/d4667958fe9739be4a9db3e249e31cbbc8387946))
|
|
14
|
+
* provide close button for alert banner ([52958aa](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/52958aa7f3bbfb3beab3fbf97147f81b236edafb))
|
|
15
|
+
|
|
16
|
+
### Styles
|
|
17
|
+
|
|
18
|
+
* fix vertical divider in BaseView ([8b82d3a](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/8b82d3a0a19e215fe92ee46eeb83714a2e5df4e7))
|
|
19
|
+
|
|
1
20
|
## [1.9.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.8.1...v1.9.0) (2025-05-23)
|
|
2
21
|
|
|
3
22
|
### Features
|
package/README.md
CHANGED
|
@@ -55,6 +55,7 @@ Additionally the library provides form components using [react-hook-form](https:
|
|
|
55
55
|
1. [ScrollBar](#scrollbar)
|
|
56
56
|
1. [SearchBar](#searchbar)
|
|
57
57
|
1. [Select](#select)
|
|
58
|
+
1. [Stepper](#stepper)
|
|
58
59
|
1. [VerticalDivider](#verticaldivider)
|
|
59
60
|
|
|
60
61
|
## Available Utility Functions:
|
|
@@ -859,7 +860,7 @@ Provides the normal Element modal with one additional change. If you are on full
|
|
|
859
860
|
This will set the modal size on an area between the mobile controls.
|
|
860
861
|
|
|
861
862
|
The modal also includes a custom header, which has a close button of type `button`.
|
|
862
|
-
The base Element design button has type `submit`, which breaks forms inside of the modal.
|
|
863
|
+
The base Element design button has type `submit`, which breaks forms inside of the modal.
|
|
863
864
|
Please provide `onClose` and `title` props to get it work properly.
|
|
864
865
|
|
|
865
866
|
```jsx
|
|
@@ -964,6 +965,47 @@ import { Select } from '@hortiview/shared-components';
|
|
|
964
965
|
/>;
|
|
965
966
|
```
|
|
966
967
|
|
|
968
|
+
### Stepper
|
|
969
|
+
|
|
970
|
+
Provides a simple stepper component, which contains the step indicators, a title text and buttons to navigate forwards and backwards.
|
|
971
|
+
Be aware that you need to control the Stepper flow by your own, like:
|
|
972
|
+
|
|
973
|
+
```jsx
|
|
974
|
+
import { Step, Stepper } from '@hortiview/shared-components';
|
|
975
|
+
|
|
976
|
+
const steps: Step[] = [
|
|
977
|
+
{
|
|
978
|
+
name: 'first',
|
|
979
|
+
step: 0,
|
|
980
|
+
title: 'First Step',
|
|
981
|
+
optional: false,
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: 'second',
|
|
985
|
+
step: 1,
|
|
986
|
+
title: 'Second Step',
|
|
987
|
+
optional: true,
|
|
988
|
+
},
|
|
989
|
+
];
|
|
990
|
+
|
|
991
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
992
|
+
|
|
993
|
+
<Stepper
|
|
994
|
+
steps={steps}
|
|
995
|
+
currentStep={currentStep}
|
|
996
|
+
nextButtonProps={{
|
|
997
|
+
label: currentStep < args.steps.length - 1 ? 'Next' : 'Finish',
|
|
998
|
+
onClick: () =>
|
|
999
|
+
currentStep < args.steps.length - 1
|
|
1000
|
+
? setCurrentStep(currentStep + 1)
|
|
1001
|
+
: setCurrentStep(args.steps.length - 1),
|
|
1002
|
+
}}
|
|
1003
|
+
prevButtonProps={{
|
|
1004
|
+
onClick: () => (currentStep > 0 ? setCurrentStep(currentStep - 1) : setCurrentStep(0)),
|
|
1005
|
+
}}
|
|
1006
|
+
/>;
|
|
1007
|
+
```
|
|
1008
|
+
|
|
967
1009
|
### VerticalDivider
|
|
968
1010
|
|
|
969
1011
|
Provides a simple vertical divider.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { T as r } from "./index.es-D54RuMc_.js";
|
|
3
3
|
import { Iconify as d } from "./components/Iconify/Iconify.js";
|
|
4
4
|
import './assets/BigLoadingSpinner.css';const e = "_loadingBigOverlay_7dxo1_1", s = "_bigLoadSpinnerCard_7dxo1_12", g = "_bigLoadSpinnerCardText_7dxo1_27", t = "_logo_7dxo1_33", o = {
|
|
5
5
|
loadingBigOverlay: e,
|
|
@@ -9,8 +9,8 @@ import './assets/BigLoadingSpinner.css';const e = "_loadingBigOverlay_7dxo1_1",
|
|
|
9
9
|
}, l = ({ text: a }) => /* @__PURE__ */ n("div", { className: o.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
|
|
10
10
|
/* @__PURE__ */ i(d, { icon: "hortiview", className: o.logo, "data-testid": "logo-icon" }),
|
|
11
11
|
/* @__PURE__ */ i(r, { tag: "p", bold: !0, level: 1, className: o.bigLoadSpinnerCardText, children: a })
|
|
12
|
-
] }),
|
|
12
|
+
] }), b = (a) => /* @__PURE__ */ i("div", { "data-testid": "big-loading-spinner", className: o.loadingBigOverlay, children: /* @__PURE__ */ i(l, { ...a }) });
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
b as B,
|
|
15
15
|
o as s
|
|
16
16
|
};
|
|
@@ -3,7 +3,7 @@ import { C as W, a as z, b as D, c as E, d as M } from "./index.es-6TJ1S8Jr.js";
|
|
|
3
3
|
import { c as x, _ as P, P as e } from "./identity-DLWZln-X.js";
|
|
4
4
|
import b, { forwardRef as $, useMemo as f, useRef as j, useImperativeHandle as q, createContext as F, useContext as I } from "react";
|
|
5
5
|
import { d as U } from "./index.es-da0cf7oE.js";
|
|
6
|
-
import { d as O } from "./index.es-
|
|
6
|
+
import { d as O } from "./index.es-D54RuMc_.js";
|
|
7
7
|
import { OverflowTooltip as k } from "./components/OverflowTooltip/OverflowTooltip.js";
|
|
8
8
|
import './assets/GenericCard.css';const R = /* @__PURE__ */ F({}), V = {
|
|
9
9
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import { G as
|
|
3
|
-
import { I as
|
|
4
|
-
import { c as
|
|
2
|
+
import { G as B } from "./index.es-DntoATwO.js";
|
|
3
|
+
import { I as C } from "./index.es-3043KTnb.js";
|
|
4
|
+
import { c as b, d as N, T as O } from "./index.es-D54RuMc_.js";
|
|
5
5
|
import { Iconify as $ } from "./components/Iconify/Iconify.js";
|
|
6
6
|
import { AvailableCustomIcons as k } from "./enums/AvailableCustomIcons.js";
|
|
7
7
|
import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_mainElevation_zewqs_5", G = "_searchbar_zewqs_11", W = "_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 = {
|
|
@@ -21,7 +21,7 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
21
21
|
const i = t.reduce((o, c) => {
|
|
22
22
|
const { groupName: e, ...m } = c;
|
|
23
23
|
return !e || typeof e != "string" || (o[e] || (o[e] = {
|
|
24
|
-
groupName: /* @__PURE__ */ r(
|
|
24
|
+
groupName: /* @__PURE__ */ r(b, { children: e }),
|
|
25
25
|
id: e,
|
|
26
26
|
items: []
|
|
27
27
|
}), o[e].items = [
|
|
@@ -54,7 +54,7 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
54
54
|
key: i,
|
|
55
55
|
select: u,
|
|
56
56
|
primaryText: i,
|
|
57
|
-
secondaryText: /* @__PURE__ */ z(
|
|
57
|
+
secondaryText: /* @__PURE__ */ z(B, { direction: "vertical", gap: "none", children: [
|
|
58
58
|
T ?? /* @__PURE__ */ r(
|
|
59
59
|
N,
|
|
60
60
|
{
|
|
@@ -84,7 +84,7 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
84
84
|
children: _
|
|
85
85
|
}
|
|
86
86
|
) : void 0,
|
|
87
|
-
trailingBlock: I ?? f ?? /* @__PURE__ */ r(
|
|
87
|
+
trailingBlock: I ?? f ?? /* @__PURE__ */ r(C, { icon: "arrow_right", className: n.iconColor }),
|
|
88
88
|
leadingBlock: K(g),
|
|
89
89
|
value: m,
|
|
90
90
|
componentProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._messageContainer_1i2s1_1{border-radius:.25rem;padding:.75rem 1rem;width:-moz-available;width:-webkit-fill-available;width:stretch}._info_1i2s1_9{border:1px solid var(--lmnt-theme-on-secondary-stroke);background:var(--lmnt-theme-secondary-50)}._danger_1i2s1_14{border:1px solid var(--lmnt-theme-on-danger-stroke);background:var(--lmnt-theme-danger-50)}._success_1i2s1_19{border:1px solid var(--lmnt-theme-on-success-stroke);background:var(--lmnt-theme-success-50)}._warning_1i2s1_24{border:1px solid var(--lmnt-utility-orange-surface);background:#f6a6491a}._closeIcon_1i2s1_29{align-self:flex-start;margin-right:-.15rem}
|
package/dist/assets/BaseView.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._parentGroup_w7vsz_1{align-items:stretch}._divider_w7vsz_5{margin:0 1.5rem;align-self:stretch}._maxWidth_w7vsz_10{max-width:55vw}._desktopList_w7vsz_14{width:30%;align-self:stretch}._mobileList_w7vsz_19{width:100%}._desktopDetail_w7vsz_23{width:70%;align-self:stretch}._mobileDetail_w7vsz_28{width:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._stepperIndicatorItem_78nle_1{height:var(--lmnt-stepper-indicator__size);width:var(--lmnt-stepper-indicator__size);background-color:#c7c7c7;border-radius:50%}._stepperIndicatorItemActive_78nle_8{background-color:var(--lmnt-theme-primary)}._stepperIndicatorItemOptional_78nle_12{border:1.5px dashed #7e7e7e}._stepperContainer_78nle_16{background-color:var(--lmnt-theme-primary-50);border:1px solid var(--lmnt-theme-on-surface-stroke);border-radius:.25rem;padding:.75rem 1rem}._stepperTitle_78nle_23{text-align:center;color:var(--lmnt-theme-on-secondary-inactive)}._stepperButton_78nle_28{margin-bottom:0}._stepperButtonLoading_78nle_32{padding-top:.375rem!important;padding-bottom:.375rem!important}._stepperButtonLoading_78nle_32 svg{stroke:var(--lmnt-theme-white)!important}
|
|
@@ -2,8 +2,15 @@ type AlertBannerProps = {
|
|
|
2
2
|
text: string | JSX.Element;
|
|
3
3
|
color?: 'danger' | 'info' | 'success' | 'warning';
|
|
4
4
|
isOpen?: boolean;
|
|
5
|
-
action?: JSX.Element;
|
|
6
5
|
isBold?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* if defined, the close button will be displayed
|
|
8
|
+
*/
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated will be removed in the next major version - please use onClose if you need a close button
|
|
12
|
+
*/
|
|
13
|
+
action?: JSX.Element;
|
|
7
14
|
};
|
|
8
|
-
export declare const AlertBanner: ({ text, color, isOpen,
|
|
15
|
+
export declare const AlertBanner: ({ text, color, isOpen, isBold, onClose, }: AlertBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
16
|
export {};
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, Fragment as a, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { G as l } from "../../index.es-DntoATwO.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '../../assets/AlertBanner.css';const g = "
|
|
6
|
-
messageContainer:
|
|
7
|
-
info:
|
|
8
|
-
danger:
|
|
9
|
-
success:
|
|
10
|
-
warning:
|
|
11
|
-
|
|
3
|
+
import { I as _ } from "../../index.es-3043KTnb.js";
|
|
4
|
+
import { T as m } from "../../index.es-D54RuMc_.js";
|
|
5
|
+
import '../../assets/AlertBanner.css';const d = "_messageContainer_1i2s1_1", g = "_info_1i2s1_9", p = "_danger_1i2s1_14", f = "_success_1i2s1_19", u = "_warning_1i2s1_24", y = "_closeIcon_1i2s1_29", e = {
|
|
6
|
+
messageContainer: d,
|
|
7
|
+
info: g,
|
|
8
|
+
danger: p,
|
|
9
|
+
success: f,
|
|
10
|
+
warning: u,
|
|
11
|
+
closeIcon: y
|
|
12
|
+
}, b = ({
|
|
12
13
|
text: s,
|
|
13
14
|
color: r = "info",
|
|
14
|
-
isOpen:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
direction: a ? "horizontal" : "vertical",
|
|
23
|
-
primaryAlign: "space-between",
|
|
24
|
-
secondaryAlign: "center",
|
|
25
|
-
children: [
|
|
26
|
-
typeof s == "string" ? /* @__PURE__ */ e(m, { bold: t, level: 2, children: s }) : /* @__PURE__ */ e("div", { children: s }),
|
|
27
|
-
i
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
) }) : /* @__PURE__ */ e(c, {});
|
|
31
|
-
};
|
|
15
|
+
isOpen: i = !0,
|
|
16
|
+
isBold: c = !0,
|
|
17
|
+
onClose: o
|
|
18
|
+
}) => i ? /* @__PURE__ */ n("div", { "data-testid": "alert-banner", className: `${e.messageContainer} ${e[r]}`, children: /* @__PURE__ */ t(l, { primaryAlign: "space-between", secondaryAlign: "top", gap: "dense", children: [
|
|
19
|
+
typeof s == "string" ? /* @__PURE__ */ n(m, { bold: c, level: 2, children: s }) : /* @__PURE__ */ n("div", { children: s }),
|
|
20
|
+
o && /* @__PURE__ */ n(_, { icon: "close", iconSize: "small", onClick: o, className: e.closeIcon })
|
|
21
|
+
] }) }) : /* @__PURE__ */ n(a, {});
|
|
32
22
|
export {
|
|
33
|
-
|
|
23
|
+
b as AlertBanner
|
|
34
24
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
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
|
-
import { a } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
3
|
+
import { a as o } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
4
|
import { AlertBanner as n } from "./AlertBanner.js";
|
|
5
|
-
import { d as p, b as c,
|
|
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(() => {
|
|
8
|
-
l.spyOn(
|
|
8
|
+
l.spyOn(o, "useBreakpoints").mockReturnValue({
|
|
9
9
|
isMobile: !1,
|
|
10
10
|
isTablet: !1,
|
|
11
11
|
isDesktop: !0,
|
|
12
12
|
isDesktopNavbar: !0
|
|
13
13
|
});
|
|
14
14
|
}), r("render AlertBanner with text", () => {
|
|
15
|
-
t(/* @__PURE__ */ e(n, { text: "Test" })),
|
|
15
|
+
t(/* @__PURE__ */ e(n, { text: "Test" })), a(s.getByText("Test")).toBeInTheDocument();
|
|
16
16
|
}), r("render AlertBanner with element", () => {
|
|
17
|
-
t(/* @__PURE__ */ e(n, { text: /* @__PURE__ */ e(m, { children: "Element" }) })),
|
|
17
|
+
t(/* @__PURE__ */ e(n, { text: /* @__PURE__ */ e(m, { children: "Element" }) })), a(s.getByText("Element")).toBeInTheDocument();
|
|
18
18
|
}), r("renders AlertBanner with vertical style (flex-direction: column) when screen is small", () => {
|
|
19
|
-
l.spyOn(
|
|
19
|
+
l.spyOn(o, "useBreakpoints").mockReturnValue({
|
|
20
20
|
isMobile: !0,
|
|
21
21
|
isTablet: !1,
|
|
22
22
|
isDesktop: !1,
|
|
23
23
|
isDesktopNavbar: !1
|
|
24
24
|
}), t(/* @__PURE__ */ e(n, { text: "Test" }));
|
|
25
25
|
const i = s.getByText("Test").closest(".lmnt.lmnt-group");
|
|
26
|
-
|
|
27
|
-
"display: flex; flex-direction:
|
|
26
|
+
a(i).toHaveStyle(
|
|
27
|
+
"display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 8px;"
|
|
28
28
|
);
|
|
29
29
|
}), r("renders nothing when isOpen is false", () => {
|
|
30
|
-
t(/* @__PURE__ */ e(n, { text: "Test", isOpen: !1 })),
|
|
30
|
+
t(/* @__PURE__ */ e(n, { text: "Test", isOpen: !1 })), a(s.queryByText("Test")).not.toBeInTheDocument();
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -22,6 +22,10 @@ type BaseViewProps = {
|
|
|
22
22
|
* action to be displayed in the headings ActionButton
|
|
23
23
|
*/
|
|
24
24
|
action?: JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* hint to be displayed below the heading
|
|
27
|
+
*/
|
|
28
|
+
hint?: JSX.Element;
|
|
25
29
|
/**
|
|
26
30
|
* isSorted is true if the list should be sorted, @default true
|
|
27
31
|
*/
|
|
@@ -58,5 +62,5 @@ type BaseViewProps = {
|
|
|
58
62
|
/**
|
|
59
63
|
* `BaseView` is a layout component that displays a main (a list) and a detail section.
|
|
60
64
|
*/
|
|
61
|
-
export declare const BaseView: ({ action,
|
|
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;
|
|
62
66
|
export {};
|
|
@@ -1,77 +1,89 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, Fragment as d, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { G as r } from "../../index.es-DntoATwO.js";
|
|
3
|
-
import { useMemo as
|
|
3
|
+
import { useMemo as a } from "react";
|
|
4
4
|
import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
|
|
5
5
|
import { EmptyView as W } from "../EmptyView/EmptyView.js";
|
|
6
6
|
import { ListArea as B } from "../ListArea/ListArea.js";
|
|
7
|
+
import { u as G } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
7
8
|
import { VerticalDivider as N } from "../VerticalDivider/VerticalDivider.js";
|
|
8
|
-
import
|
|
9
|
-
|
|
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,
|
|
10
11
|
divider: V,
|
|
11
12
|
maxWidth: j,
|
|
12
13
|
desktopList: E,
|
|
13
|
-
mobileList:
|
|
14
|
-
desktopDetail:
|
|
15
|
-
mobileDetail:
|
|
14
|
+
mobileList: H,
|
|
15
|
+
desktopDetail: I,
|
|
16
|
+
mobileDetail: $
|
|
16
17
|
}, P = ({
|
|
17
|
-
action: l,
|
|
18
18
|
heading: c,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
action: m = /* @__PURE__ */ i(d, {}),
|
|
20
|
+
hint: v = /* @__PURE__ */ i(d, {}),
|
|
21
|
+
elements: n,
|
|
22
|
+
emptyText: p,
|
|
23
|
+
hasSearch: _ = !0,
|
|
22
24
|
isSorted: h = !0,
|
|
23
|
-
className:
|
|
24
|
-
withAvatar:
|
|
25
|
-
listMaxHeight:
|
|
26
|
-
pathname:
|
|
27
|
-
routerLinkElement:
|
|
28
|
-
searchPlaceholder:
|
|
25
|
+
className: f,
|
|
26
|
+
withAvatar: b = !1,
|
|
27
|
+
listMaxHeight: w = "calc(100vh - 200px)",
|
|
28
|
+
pathname: l,
|
|
29
|
+
routerLinkElement: D,
|
|
30
|
+
searchPlaceholder: g
|
|
29
31
|
}) => {
|
|
30
|
-
const { isDesktopNavbar:
|
|
31
|
-
return /* @__PURE__ */ s(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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]);
|
|
33
|
+
return /* @__PURE__ */ s(
|
|
34
|
+
r,
|
|
35
|
+
{
|
|
36
|
+
"data-testid": "base-view-container",
|
|
37
|
+
className: `${o.parentGroup} ${f ?? ""}`,
|
|
38
|
+
gap: "none",
|
|
39
|
+
fullWidth: !0,
|
|
40
|
+
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,
|
|
44
|
+
/* @__PURE__ */ i(
|
|
45
|
+
B,
|
|
46
|
+
{
|
|
47
|
+
elements: n,
|
|
48
|
+
hasSearch: _,
|
|
49
|
+
maxHeight: w,
|
|
50
|
+
isSorted: h,
|
|
51
|
+
pathname: l,
|
|
52
|
+
routerLinkElement: D,
|
|
53
|
+
searchPlaceholder: g
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }) }),
|
|
57
|
+
x && /* @__PURE__ */ s(
|
|
58
|
+
r,
|
|
59
|
+
{
|
|
60
|
+
"data-testid": "details",
|
|
61
|
+
gap: "none",
|
|
62
|
+
className: e ? o.desktopDetail : o.mobileDetail,
|
|
63
|
+
children: [
|
|
64
|
+
e && /* @__PURE__ */ i(N, { className: o.divider, height: "100%" }),
|
|
65
|
+
/* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, children: [
|
|
66
|
+
/* @__PURE__ */ i(
|
|
67
|
+
u,
|
|
68
|
+
{
|
|
69
|
+
className: o.maxWidth,
|
|
70
|
+
heading: t?.detailTitle ?? t?.title ?? "",
|
|
71
|
+
level: 4,
|
|
72
|
+
icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
|
|
73
|
+
marginBottom: 0,
|
|
74
|
+
invisibleButton: t?.detailAction === void 0,
|
|
75
|
+
withAvatar: b,
|
|
76
|
+
children: t?.detailAction ?? m
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
k
|
|
80
|
+
] })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
75
87
|
};
|
|
76
88
|
export {
|
|
77
89
|
P as BaseView
|
|
@@ -2,7 +2,7 @@ import { jsx as a, Fragment as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { a as r, s as e, f as p } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { a as l } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
4
|
import { BaseView as i } from "./BaseView.js";
|
|
5
|
-
import { d as u, b as m,
|
|
5
|
+
import { d as u, b as m, a as c, t as n, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
6
6
|
u("BaseView Test", () => {
|
|
7
7
|
m(() => {
|
|
8
8
|
c.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { I as u } from "../../index.es-3043KTnb.js";
|
|
3
|
-
import {
|
|
3
|
+
import { b as y, T as C } from "../../index.es-D54RuMc_.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";
|
|
@@ -2,7 +2,7 @@ import { jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { B as g } from "../../index.es-CiqbARoC.js";
|
|
3
3
|
import { a, s as n } from "../../react.esm-CX1WJ2Pp.js";
|
|
4
4
|
import { BasicHeading as i } from "./BasicHeading.js";
|
|
5
|
-
import { d as h, t as s, g as e } from "../../vi.CjhMlMwf-
|
|
5
|
+
import { d as h, t as s, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
6
6
|
h("BasicHeading-Test", () => {
|
|
7
7
|
s("render small container without content", () => {
|
|
8
8
|
a(/* @__PURE__ */ o(i, { heading: "Test" }));
|
|
@@ -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,
|
|
2
|
+
import { d as C, b as R, a as B } from "../../index.es-D54RuMc_.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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { a as s, s as o, f as n } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { BlockView as i } from "./BlockView.js";
|
|
4
|
-
import { d as a,
|
|
4
|
+
import { d as a, a as B, t as r, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
a("BlockView Test", () => {
|
|
6
6
|
const c = B.fn(), e = {
|
|
7
7
|
id: "1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { a, s as i } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { ChipCard as n } from "./ChipCard.js";
|
|
4
|
-
import { d as s, t as c, g as t } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as s, t as c, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
s("ChipCard Component", () => {
|
|
6
6
|
const r = "Test Label", o = "domain";
|
|
7
7
|
c("renders the correct label and icon", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { I as f } from "../../index.es-0lQcz8m1.js";
|
|
3
|
-
import { M as d, L as _, a as p } from "../../index.es-
|
|
3
|
+
import { M as d, L as _, a as p } from "../../index.es-fnFnw2P1.js";
|
|
4
4
|
import { useState as I, useCallback as a, useEffect as v } from "react";
|
|
5
5
|
import { u as C } from "../../uniqueId-NU3-C36A.js";
|
|
6
6
|
import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91v_5", M = "_listItem_ol91v_9", l = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { a as B, s as t, f as o, w as s } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { ContextMenu as p } from "./ContextMenu.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as l, d as k, t as T, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
const C = l.fn(), a = l.fn(), i = l.fn(), g = [
|
|
6
6
|
{ primaryText: "Open", onClick: C, leadingBlock: "add" },
|
|
7
7
|
{ primaryText: "Delete", onClick: i, leadingBlock: "delete_outline" },
|
|
@@ -2,7 +2,7 @@ import { jsx as o, jsxs as p, Fragment as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { B as u } from "../../index.es-CiqbARoC.js";
|
|
3
3
|
import { G as c } from "../../index.es-DntoATwO.js";
|
|
4
4
|
import { I as D } from "../../index.es-3043KTnb.js";
|
|
5
|
-
import {
|
|
5
|
+
import { T as l } from "../../index.es-D54RuMc_.js";
|
|
6
6
|
import { u as k } from "../../uniqueId-NU3-C36A.js";
|
|
7
7
|
import { AvailableCustomIcons as I } from "../../enums/AvailableCustomIcons.js";
|
|
8
8
|
import { u as N } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { a as c, s as e } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { DeleteModal as b } from "./DeleteModal.js";
|
|
4
|
-
import { d as B, t as a,
|
|
4
|
+
import { d as B, t as a, a as o, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
B("DeleteModal Test", () => {
|
|
6
6
|
a("should render the DeleteModal properly", () => {
|
|
7
7
|
c(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { G as n } from "../../index.es-DntoATwO.js";
|
|
3
3
|
import { I as t } from "../../index.es-3043KTnb.js";
|
|
4
|
-
import { d as m,
|
|
4
|
+
import { d as m, T as d } from "../../index.es-D54RuMc_.js";
|
|
5
5
|
import '../../assets/Disclaimer.css';const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7", a = {
|
|
6
6
|
disclaimer: p,
|
|
7
7
|
iconArea: y
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { a as r, s as t } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { Disclaimer as s } from "./Disclaimer.js";
|
|
4
|
-
import { d as i, t as m, g as e } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as i, t as m, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
i("Disclaimer test", () => {
|
|
6
6
|
m("should render with default text", () => {
|
|
7
7
|
r(/* @__PURE__ */ o(s, { text: "disclaimer.default" })), e(t.getByText("disclaimer.default")).toBeInTheDocument();
|