@hortiview/shared-components 0.0.6320 → 0.0.6338
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/dist/assets/DeleteModal.css +1 -1
- package/dist/assets/FormSelect.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.d.ts +8 -2
- package/dist/components/DeleteModal/DeleteModal.js +75 -58
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +1482 -85
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3049 -40
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +18 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +9 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/{react.esm-D9-uytwS.js → react.esm-BBemCHUU.js} +1 -0
- package/dist/types/internal/ChangeValueType.d.ts +3 -0
- package/dist/types/internal/ChangeValueType.js +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._bulletPoint_1kyg0_1{display:list-item;margin-left:1.5rem}._modal_1kyg0_6 [class*="lmnt-modal__actions mdc-dialog__actions"]{margin-bottom:0!important}._colorDanger_1kyg0_10{color:var(--lmnt-theme-danger-on-surface)}._crossedOut_1kyg0_14{position:relative;display:inline-block}._crossedOut_1kyg0_14:after{content:"";position:absolute;width:3rem;height:.25rem;left:50%;top:50%;background:var(--lmnt-theme-danger-on-surface);box-shadow:0 0 0 .125rem var(--lmnt-theme-background);transform:translate(-50%,calc(-50% - .25rem)) rotate(45deg);transform-origin:center;z-index:2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._invalid_9uqqc_1+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-danger)!important}._formSelectContainer_9uqqc_6{display:flex;flex-wrap:wrap;width:100%}._formSelectContainer_9uqqc_6 *[class*=mdc-select-helper-text]{color:var(--lmnt-helper-text-color)}._formSelectContainer_9uqqc_6 *[class*=lmnt__multi-value__label]{overflow:visible}._formSelect_9uqqc_6+*[class*=mdc-select-helper-text]{margin-bottom:-19.33px!important}._formSelect_9uqqc_6 *[class*=lmnt-select-menu]{z-index:2001}._multiText_9uqqc_32 *[class*=lmnt-select-value-container]{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis;display:block!important;padding:1.125rem 0!important}._tooltip_9uqqc_41{z-index:42}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { r as t, s } from "../../react.esm-
|
|
2
|
+
import { r as t, s } from "../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { u as i } from "../../useBreakpoint-DROHPVxO.js";
|
|
4
4
|
import { AlertBanner as n } from "./AlertBanner.js";
|
|
5
5
|
import { d as c, b as u, t as r, g as l, v as a } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, Fragment as s } from "react/jsx-runtime";
|
|
2
2
|
import { u as l } from "../../useBreakpoint-DROHPVxO.js";
|
|
3
3
|
import { BaseView as r } from "./BaseView.js";
|
|
4
|
-
import { r as i, s as e, f as p } from "../../react.esm-
|
|
4
|
+
import { r as i, s as e, f as p } from "../../react.esm-BBemCHUU.js";
|
|
5
5
|
import { d as u, b as m, t as n, g as t, v as c } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
6
6
|
u("BaseView Test", () => {
|
|
7
7
|
m(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import { Button as g } from "@element/react-components";
|
|
3
3
|
import { BasicHeading as a } from "./BasicHeading.js";
|
|
4
|
-
import { r as i, s as n } from "../../react.esm-
|
|
4
|
+
import { r as i, s as n } from "../../react.esm-BBemCHUU.js";
|
|
5
5
|
import { d as h, t as s, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
6
6
|
h("BasicHeading-Test", () => {
|
|
7
7
|
s("render small container without content", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { r as s, s as o, f as n } from "../../react.esm-
|
|
2
|
+
import { r as s, s as o, f as n } from "../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { BlockView as r } from "./BlockView.js";
|
|
4
4
|
import { d as B, v as a, t as i, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
B("BlockView Test", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { r as d, s as n, f as o, w as a } from "../../react.esm-
|
|
2
|
+
import { r as d, s as n, f as o, w as a } from "../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { ContextMenu as u } from "./ContextMenu.js";
|
|
4
4
|
import { v as r, d as g, t as B, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const T = r.fn(), l = r.fn(), i = r.fn(), p = [
|
|
@@ -31,7 +31,12 @@ type DeleteModalProps = {
|
|
|
31
31
|
/**
|
|
32
32
|
* The icon to display in the modal.
|
|
33
33
|
*/
|
|
34
|
-
icon?: string;
|
|
34
|
+
icon?: string | JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* If true, the icon to display in the modal will be crossed out with a red line.
|
|
37
|
+
* The icon should not be larger than 2.5 rem height and 3 rem width.
|
|
38
|
+
*/
|
|
39
|
+
isIconCrossedOut?: boolean;
|
|
35
40
|
/**
|
|
36
41
|
* The state of the modal.
|
|
37
42
|
*/
|
|
@@ -61,11 +66,12 @@ type DeleteModalProps = {
|
|
|
61
66
|
* @prop {string | JSX.Element} deleteText - A text or JSX element to display in the delete modal. If provided the deleteBody will be ignored.
|
|
62
67
|
* @prop {string} impossibleDeleteHeader - The header to display in the modal if the {@link isDeletePossible} is false.
|
|
63
68
|
* @prop {string} icon - The icon to display in the modal.
|
|
69
|
+
* @prop {boolean} isIconCrossedOut - If true, the icon to display in the modal will be crossed out with a red line. The icon should not be larger than 2.5 rem height and 3 rem width.
|
|
64
70
|
* @prop {boolean} open - The state of the modal.
|
|
65
71
|
* @prop {function} setOpen - The function to set the state of the modal.
|
|
66
72
|
* @prop {function} onDelete - The function to call when the confirm button is clicked.
|
|
67
73
|
* @prop {boolean} isDeletePossible - If true, the delete button will be enabled. If false, the delete button will be disabled and the {@link impossibleDeleteHeader} will be displayed. Default is _true_.
|
|
68
74
|
* @returns {ReactElement} A modal component for deleting items.
|
|
69
75
|
*/
|
|
70
|
-
export declare const DeleteModal: ({ title, confirmButtonLabel, cancelButtonLabel, deleteHeader, deleteBody, deleteText, icon, impossibleDeleteHeader, open, setOpen, onDelete, isDeletePossible, }: DeleteModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare const DeleteModal: ({ title, confirmButtonLabel, cancelButtonLabel, deleteHeader, deleteBody, deleteText, icon, isIconCrossedOut, impossibleDeleteHeader, open, setOpen, onDelete, isDeletePossible, }: DeleteModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
71
77
|
export {};
|
|
@@ -1,77 +1,94 @@
|
|
|
1
1
|
import "../../assets/DeleteModal.css";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { uniqueId as
|
|
5
|
-
import { AvailableCustomIcons as
|
|
6
|
-
import { Iconify as
|
|
7
|
-
const
|
|
8
|
-
bulletPoint:
|
|
9
|
-
modal:
|
|
10
|
-
colorDanger:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
import { jsx as o, jsxs as g, Fragment as i } from "react/jsx-runtime";
|
|
3
|
+
import { Modal as C, Button as u, Group as s, Icon as D, TypoBody as t } from "@element/react-components";
|
|
4
|
+
import { uniqueId as I } from "lodash";
|
|
5
|
+
import { AvailableCustomIcons as O } from "../../enums/AvailableCustomIcons.js";
|
|
6
|
+
import { Iconify as N } from "../Iconify/Iconify.js";
|
|
7
|
+
const S = "_bulletPoint_1kyg0_1", x = "_modal_1kyg0_6", M = "_colorDanger_1kyg0_10", j = "_crossedOut_1kyg0_14", n = {
|
|
8
|
+
bulletPoint: S,
|
|
9
|
+
modal: x,
|
|
10
|
+
colorDanger: M,
|
|
11
|
+
crossedOut: j
|
|
12
|
+
}, J = ({
|
|
13
|
+
title: r,
|
|
14
|
+
confirmButtonLabel: e,
|
|
15
|
+
cancelButtonLabel: l,
|
|
16
|
+
deleteHeader: a,
|
|
17
|
+
deleteBody: c,
|
|
18
|
+
deleteText: p,
|
|
19
|
+
icon: f,
|
|
20
|
+
isIconCrossedOut: h,
|
|
21
|
+
impossibleDeleteHeader: y,
|
|
22
|
+
open: b,
|
|
23
|
+
setOpen: d,
|
|
24
|
+
onDelete: v,
|
|
25
|
+
isDeletePossible: m = !0
|
|
24
26
|
}) => {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
+
const _ = (k) => {
|
|
28
|
+
k.detail.action === "close" && d(!1);
|
|
27
29
|
};
|
|
28
30
|
return /* @__PURE__ */ o(
|
|
29
|
-
|
|
31
|
+
C,
|
|
30
32
|
{
|
|
31
|
-
className:
|
|
33
|
+
className: n.modal,
|
|
32
34
|
modalSize: "small",
|
|
33
|
-
open:
|
|
34
|
-
onClose:
|
|
35
|
-
title:
|
|
35
|
+
open: b,
|
|
36
|
+
onClose: _,
|
|
37
|
+
title: r,
|
|
36
38
|
primaryButton: /* @__PURE__ */ o(
|
|
37
39
|
u,
|
|
38
40
|
{
|
|
39
41
|
variant: "danger",
|
|
40
|
-
label:
|
|
41
|
-
onClick:
|
|
42
|
-
disabled: !
|
|
42
|
+
label: e,
|
|
43
|
+
onClick: v,
|
|
44
|
+
disabled: !m
|
|
43
45
|
}
|
|
44
46
|
),
|
|
45
|
-
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
footerSupplemental: /* @__PURE__ */ o(u, { variant: "text", label: l, onClick: () => d(!1) }),
|
|
48
|
+
children: /* @__PURE__ */ g(s, { direction: "vertical", secondaryAlign: "center", children: [
|
|
49
|
+
/* @__PURE__ */ o(z, { element: /* @__PURE__ */ o(P, { icon: f }), isCrossedOut: h }),
|
|
50
|
+
/* @__PURE__ */ o(s, { direction: "vertical", children: m ? /* @__PURE__ */ o(
|
|
51
|
+
A,
|
|
49
52
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
deleteHeader: a,
|
|
54
|
+
deleteText: p,
|
|
55
|
+
deleteBody: c
|
|
53
56
|
}
|
|
54
|
-
),
|
|
55
|
-
l && !Object.values(g).includes(l) && /* @__PURE__ */ o(j, { icon: l, iconSize: "xlarge", className: e.colorDanger }),
|
|
56
|
-
/* @__PURE__ */ o(i, { direction: "vertical", children: s ? /* @__PURE__ */ m(d, { children: [
|
|
57
|
-
/* @__PURE__ */ o(n, { level: 1, themeColor: "text-primary-on-background", children: b }),
|
|
58
|
-
r && typeof r == "string" && /* @__PURE__ */ o(n, { level: 2, themeColor: "text-secondary-on-background", children: r }),
|
|
59
|
-
r && typeof r != "string" && /* @__PURE__ */ o(d, { children: r }),
|
|
60
|
-
t && r === void 0 && /* @__PURE__ */ o(i, { direction: "vertical", gap: "none", children: t.map((a, _) => /* @__PURE__ */ o(
|
|
61
|
-
n,
|
|
62
|
-
{
|
|
63
|
-
level: 2,
|
|
64
|
-
className: e.bulletPoint,
|
|
65
|
-
themeColor: "text-secondary-on-background",
|
|
66
|
-
children: a
|
|
67
|
-
},
|
|
68
|
-
q(_.toString())
|
|
69
|
-
)) })
|
|
70
|
-
] }) : /* @__PURE__ */ o(n, { level: 1, themeColor: "text-primary-on-background", children: f }) })
|
|
57
|
+
) : /* @__PURE__ */ o(B, { impossibleDeleteHeader: y }) })
|
|
71
58
|
] })
|
|
72
59
|
}
|
|
73
60
|
);
|
|
74
|
-
}
|
|
61
|
+
}, z = ({
|
|
62
|
+
element: r,
|
|
63
|
+
isCrossedOut: e = !1
|
|
64
|
+
}) => e ? /* @__PURE__ */ o("span", { className: n.crossedOut, children: r }) : r, P = ({ icon: r }) => r ? typeof r != "string" ? r : Object.values(O).includes(r) ? /* @__PURE__ */ o(
|
|
65
|
+
N,
|
|
66
|
+
{
|
|
67
|
+
icon: r,
|
|
68
|
+
iconSize: "xlarge",
|
|
69
|
+
className: n.colorDanger
|
|
70
|
+
}
|
|
71
|
+
) : /* @__PURE__ */ o(D, { icon: r, iconSize: "xlarge", className: n.colorDanger }) : /* @__PURE__ */ o(i, {}), A = ({
|
|
72
|
+
deleteHeader: r,
|
|
73
|
+
deleteText: e,
|
|
74
|
+
deleteBody: l
|
|
75
|
+
}) => /* @__PURE__ */ g(i, { children: [
|
|
76
|
+
/* @__PURE__ */ o(t, { level: 1, themeColor: "text-primary-on-background", children: r }),
|
|
77
|
+
e && typeof e == "string" && /* @__PURE__ */ o(t, { level: 2, themeColor: "text-secondary-on-background", children: e }),
|
|
78
|
+
e && typeof e != "string" && /* @__PURE__ */ o(i, { children: e }),
|
|
79
|
+
l && e === void 0 && /* @__PURE__ */ o(s, { direction: "vertical", gap: "none", children: l.map((a, c) => /* @__PURE__ */ o(
|
|
80
|
+
t,
|
|
81
|
+
{
|
|
82
|
+
level: 2,
|
|
83
|
+
className: n.bulletPoint,
|
|
84
|
+
themeColor: "text-secondary-on-background",
|
|
85
|
+
children: a
|
|
86
|
+
},
|
|
87
|
+
I(c.toString())
|
|
88
|
+
)) })
|
|
89
|
+
] }), B = ({
|
|
90
|
+
impossibleDeleteHeader: r
|
|
91
|
+
}) => /* @__PURE__ */ o(t, { level: 1, themeColor: "text-primary-on-background", children: r });
|
|
75
92
|
export {
|
|
76
|
-
|
|
93
|
+
J as DeleteModal
|
|
77
94
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { r as c, s as e } from "../../react.esm-
|
|
2
|
+
import { r as c, s as e } from "../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { DeleteModal as b } from "./DeleteModal.js";
|
|
4
4
|
import { d as B, t as a, v as o, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
B("DeleteModal Test", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { r, s as t } from "../../react.esm-
|
|
2
|
+
import { r, s as t } from "../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { Disclaimer as s } from "./Disclaimer.js";
|
|
4
4
|
import { d as i, t as m, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
i("Disclaimer test", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { r as s, s as o, w as r, f as l } from "../../react.esm-
|
|
2
|
+
import { r as s, s as o, w as r, f as l } from "../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { EmptyView as c } from "./EmptyView.js";
|
|
4
4
|
import { d as h, t as T, g as e, v as d } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
h("EmptyView", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { r as n, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { r as n, s as t, f as m } from "../../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { FormCheckBox as c } from "./FormCheckBox.js";
|
|
4
4
|
import { v as e, d as h, t as l, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const a = e.fn();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { r as s, s as o, f as m } from "../../../react.esm-
|
|
2
|
+
import { r as s, s as o, f as m } from "../../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { FormDatePicker as c } from "./FormDatePicker.js";
|
|
4
4
|
import { v as e, d as f, t as l, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const i = e.fn();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { r as s, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { r as s, s as t, f as m } from "../../../react.esm-BBemCHUU.js";
|
|
3
3
|
import { FormRadio as l } from "./FormRadio.js";
|
|
4
4
|
import { v as e, d as c, t as i, g as o } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const a = e.fn();
|
|
@@ -5,7 +5,7 @@ import { FieldPath, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
|
5
5
|
* a generic FormSelector property type. the generic T represents the interface, which is used in the form, like {@link CreateOrganizationDto}
|
|
6
6
|
*/
|
|
7
7
|
type FormSelectProps<T extends FieldValues> = Omit<SelectProps, 'className' | 'clearable' | 'disabled' | 'helperText' | 'helperTextPersistent' | 'hidden' | 'hoisted' | 'label' | 'menuMaxHeight' | 'multi' | 'multiSelect' | 'noOptionsMessage' | 'onChange' | 'options' | 'searchable' | 'textKey' | 'valid' | 'value' | 'valueKey' | 'variant'> & {
|
|
8
|
-
/** the
|
|
8
|
+
/** the name of the property in the form */
|
|
9
9
|
propertyName: Path<T>;
|
|
10
10
|
/** the label of the select */
|
|
11
11
|
label: string;
|