@hortiview/shared-components 0.0.5450 → 0.0.5551
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.
|
@@ -50,4 +50,9 @@ interface InfoGroupProps {
|
|
|
50
50
|
* ];
|
|
51
51
|
*/
|
|
52
52
|
export declare const InfoGroup: React.FC<InfoGroupProps>;
|
|
53
|
+
export declare const Cell: ({ field, bold, variant, }: {
|
|
54
|
+
field: FieldItem;
|
|
55
|
+
bold?: boolean | undefined;
|
|
56
|
+
variant?: "default" | "embedded" | undefined;
|
|
57
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
53
58
|
export {};
|
|
@@ -1,72 +1,76 @@
|
|
|
1
1
|
import "../../assets/InfoGroup.css";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Divider as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { jsxs as c, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
3
|
+
import { Divider as d, Group as s, TypoCaption as v, TypoSubtitle as h } from "@element/react-components";
|
|
4
|
+
import { a as g } from "../../useBreakpoint-DROHPVxO.js";
|
|
5
|
+
import { Fragment as p } from "react";
|
|
6
|
+
import { VerticalDivider as b } from "../VerticalDivider/VerticalDivider.js";
|
|
7
|
+
const f = "_container_egebs_1", C = "_dividerContainer_egebs_10", y = "_mainGroup_egebs_16", w = "_row_egebs_21", G = "_valueText_egebs_46", N = "_component_egebs_54", x = "_componentContainer_egebs_87", A = "_field_egebs_95", r = {
|
|
8
|
+
container: f,
|
|
8
9
|
dividerContainer: C,
|
|
9
|
-
mainGroup:
|
|
10
|
-
row:
|
|
11
|
-
valueText:
|
|
12
|
-
component:
|
|
13
|
-
componentContainer:
|
|
14
|
-
field:
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
] })) : /* @__PURE__ */
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
},
|
|
22
|
-
const { isLg:
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
10
|
+
mainGroup: y,
|
|
11
|
+
row: w,
|
|
12
|
+
valueText: G,
|
|
13
|
+
component: N,
|
|
14
|
+
componentContainer: x,
|
|
15
|
+
field: A
|
|
16
|
+
}, S = ({ fields: n, bold: i }) => {
|
|
17
|
+
const t = n.length > 1 && Array.isArray(n.at(0)) ? n.map((o, a) => /* @__PURE__ */ c(p, { children: [
|
|
18
|
+
a != 0 && /* @__PURE__ */ e("div", { "data-testid": "test-divider", className: r.dividerContainer, children: /* @__PURE__ */ e(d, {}) }),
|
|
19
|
+
/* @__PURE__ */ e(m, { fields: o, bold: i })
|
|
20
|
+
] }, `row_${a}`)) : /* @__PURE__ */ e(m, { fields: n, bold: i });
|
|
21
|
+
return /* @__PURE__ */ e(s, { direction: "vertical", fullWidth: !0, className: r.mainGroup, children: t });
|
|
22
|
+
}, m = ({ fields: n, bold: i }) => {
|
|
23
|
+
const { isLg: l } = g();
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
|
+
s,
|
|
25
26
|
{
|
|
26
|
-
direction:
|
|
27
|
-
className:
|
|
27
|
+
direction: l ? "horizontal" : "vertical",
|
|
28
|
+
className: r.row,
|
|
28
29
|
fullWidth: !0,
|
|
29
30
|
primaryAlign: "center",
|
|
30
31
|
secondaryAlign: "center",
|
|
31
|
-
children:
|
|
32
|
-
const
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
] });
|
|
32
|
+
children: n.map((t, o) => {
|
|
33
|
+
const a = l ? /* @__PURE__ */ e(b, { className: r.divider, height: "3rem" }) : /* @__PURE__ */ e(d, {});
|
|
34
|
+
return /* @__PURE__ */ c(p, { children: [
|
|
35
|
+
o != 0 && a,
|
|
36
|
+
/* @__PURE__ */ e(T, { field: t, bold: i, variant: t.variant })
|
|
37
|
+
] }, `${t.label ?? "label"}_${o}`);
|
|
37
38
|
})
|
|
38
39
|
}
|
|
39
40
|
);
|
|
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
|
-
|
|
41
|
+
}, T = ({
|
|
42
|
+
field: n,
|
|
43
|
+
bold: i,
|
|
44
|
+
variant: l = "default"
|
|
45
|
+
}) => {
|
|
46
|
+
const { component: t, value: o, label: a, themeColor: u } = n;
|
|
47
|
+
return t && l === "default" ? /* @__PURE__ */ e("div", { className: r.componentContainer, children: /* @__PURE__ */ e("div", { className: r.component, children: t }) }) : /* @__PURE__ */ c(
|
|
48
|
+
s,
|
|
49
|
+
{
|
|
50
|
+
"data-testid": "infoGroupItem",
|
|
51
|
+
direction: "vertical",
|
|
52
|
+
primaryAlign: "center",
|
|
53
|
+
secondaryAlign: "space-between",
|
|
54
|
+
fullWidth: !0,
|
|
55
|
+
gap: "dense",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ e(v, { className: r.label, themeColor: "text-hint-on-light", children: a }),
|
|
58
|
+
o ? /* @__PURE__ */ e(
|
|
59
|
+
h,
|
|
60
|
+
{
|
|
61
|
+
level: 1,
|
|
62
|
+
"data-testid": "infoGroupValue",
|
|
63
|
+
themeColor: u,
|
|
64
|
+
bold: i,
|
|
65
|
+
className: r.valueText,
|
|
66
|
+
children: o
|
|
67
|
+
}
|
|
68
|
+
) : /* @__PURE__ */ e(_, { children: t })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
69
72
|
};
|
|
70
73
|
export {
|
|
71
|
-
|
|
74
|
+
T as Cell,
|
|
75
|
+
S as InfoGroup
|
|
72
76
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -30,3 +30,4 @@ export type { FieldItem } from './components/InfoGroup/InfoGroup';
|
|
|
30
30
|
export type { HashTab } from './types/HashTab';
|
|
31
31
|
export type { ListElement, BaseListElement } from './types/ListElement';
|
|
32
32
|
export type { CellTemplate, CellTemplateProps, TableLayoutProps } from './types/GenericTable';
|
|
33
|
+
export type { FormSelectOption } from './components/FormComponents/FormSelect/FormSelect';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hortiview/shared-components",
|
|
3
3
|
"description": "This is a shared component library. It should used in the HortiView platform and its modules.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5551",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
|
|
7
7
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|