@hortiview/shared-components 0.0.7544 → 0.0.7576

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.
@@ -1 +1 @@
1
- ._cardTitle_a6o2v_1{padding:.5rem!important}._cardBody_a6o2v_5{padding:.25rem .5rem!important;overflow:hidden!important}._cardContent_a6o2v_10{border-radius:.5rem}._row_a6o2v_14{padding:.25rem 0}._font_a6o2v_18{max-width:125px;font-weight:400;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._title_a6o2v_26{display:inline-block;width:65vw;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._emptyContainer_a6o2v_34{width:inherit;height:inherit}._empty_a6o2v_34{position:relative;top:50%;left:50%;transform:translate(-50%,-50%)}
1
+ ._cardTitle_ecoot_1{padding:.5rem!important}._cardBody_ecoot_5{padding:.25rem .5rem!important;overflow:hidden!important}._cardContent_ecoot_10{border-radius:.5rem}._row_ecoot_14{padding:.25rem 0}._font_ecoot_18{overflow:hidden;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-weight:400;align-self:end}._fontHeader_ecoot_28{text-align:right}._title_ecoot_32{display:inline-block;width:65vw;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._emptyContainer_ecoot_40{width:inherit;height:inherit}._empty_ecoot_40{position:relative;top:50%;left:50%;transform:translate(-50%,-25%)}
@@ -20,7 +20,7 @@ import "lodash";
20
20
  import "../../contextMenu.module-DNQ8d9Aj.js";
21
21
  import "../../deleteModal.module-Ds3MDzdl.js";
22
22
  import "../../disclaimer.module-BZydt-Q_.js";
23
- import "../../genericCard.module-CnQn6tMH.js";
23
+ import "../../genericCard.module-k0bicNfi.js";
24
24
  import "../../HashTabView.module-DUekkiTC.js";
25
25
  import "../../HeaderFilter.module-DiBmulr5.js";
26
26
  import "../../infoGroup.module-Cxw88dfC.js";
@@ -1,8 +1,8 @@
1
- import { jsx as t, Fragment as S, jsxs as G } from "react/jsx-runtime";
2
- import { Textfield as J, TypoCaption as K } from "@element/react-components";
3
- import { g as O } from "../../../get-UxX31Aph.js";
4
- import { useState as B, useCallback as Q, useMemo as c, useEffect as U } from "react";
5
- import { useFormContext as X, Controller as A } from "react-hook-form";
1
+ import { jsx as t, Fragment as S, jsxs as J } from "react/jsx-runtime";
2
+ import { Textfield as K, TypoCaption as O } from "@element/react-components";
3
+ import { g as B } from "../../../get-UxX31Aph.js";
4
+ import { useState as A, useCallback as Q, useMemo as c, useEffect as U } from "react";
5
+ import { useFormContext as X, Controller as j } from "react-hook-form";
6
6
  import { s as i } from "../../../formText.module-C0by6_DK.js";
7
7
  const Y = ({
8
8
  count: e,
@@ -13,61 +13,62 @@ const Y = ({
13
13
  "div",
14
14
  {
15
15
  className: `${i.formTextAreaHelperText} ${m ? i.invalid : ""} ${r ? i.required : ""}`,
16
- children: /* @__PURE__ */ t(K, { children: `${e}/${d}` })
16
+ children: /* @__PURE__ */ t(O, { children: `${e}/${d}` })
17
17
  }
18
- ), re = (e) => e.textarea ? /* @__PURE__ */ t(Z, { ...e }) : /* @__PURE__ */ t(_, { ...e }), Z = (e) => /* @__PURE__ */ t("div", { className: i.formTextArea, children: /* @__PURE__ */ t(j, { ...e }) }), _ = (e) => /* @__PURE__ */ t(
18
+ ), re = (e) => e.textarea ? /* @__PURE__ */ t(Z, { ...e }) : /* @__PURE__ */ t(_, { ...e }), Z = (e) => /* @__PURE__ */ t("div", { className: i.formTextArea, children: /* @__PURE__ */ t(k, { ...e }) }), _ = (e) => /* @__PURE__ */ t(
19
19
  "div",
20
20
  {
21
21
  className: `${e.hasCharacterCount ? i.characterCount : i.withoutCharacterCount}`,
22
- children: /* @__PURE__ */ t(j, { ...e })
22
+ children: /* @__PURE__ */ t(k, { ...e })
23
23
  }
24
- ), j = ({
24
+ ), k = ({
25
25
  propertyName: e,
26
26
  label: d,
27
27
  disabled: m = !1,
28
28
  textarea: r = !1,
29
- hasCharacterCount: s = !1,
30
- hidden: k = !1,
31
- placeholder: H,
32
- type: R,
33
- prefixText: b,
34
- inputMode: w,
35
- trailingIcon: z,
36
- trigger: x = "likeForm",
29
+ hasCharacterCount: u = !1,
30
+ hidden: H = !1,
31
+ placeholder: R,
32
+ type: b,
33
+ prefixText: w,
34
+ inputMode: z,
35
+ trailingIcon: E,
36
+ trigger: v = "likeForm",
37
37
  rules: n,
38
- ...T
38
+ ...x
39
39
  }) => {
40
40
  const {
41
- control: C,
41
+ control: T,
42
42
  getFieldState: f,
43
- formState: { errors: u },
43
+ formState: { errors: C },
44
44
  trigger: F
45
- } = X(), [E, g] = B(0), [o, I] = B(), h = Q(
46
- (a) => {
45
+ } = X(), [I, g] = A(0), [o, M] = A(), h = Q(
46
+ (l) => {
47
47
  if (o != null) {
48
48
  g(o.length);
49
49
  return;
50
50
  }
51
- if (a) {
52
- g(a.length);
51
+ if (l) {
52
+ g(l.length);
53
53
  return;
54
54
  }
55
55
  g(0);
56
56
  },
57
57
  [o]
58
- ), M = () => {
59
- if (u && u[e]) {
60
- const a = u[e]?.message;
61
- return a || "Invalid input";
58
+ ), P = () => {
59
+ const l = B(C, e);
60
+ if (l) {
61
+ const s = l.message;
62
+ return s || "Invalid input";
62
63
  }
63
64
  return $;
64
- }, l = c(
65
+ }, a = c(
65
66
  () => n?.maxLength?.value,
66
67
  [n]
67
- ), P = c(
68
+ ), V = c(
68
69
  () => n?.minLength?.value,
69
70
  [n]
70
- ), V = c(
71
+ ), W = c(
71
72
  () => n?.required?.value,
72
73
  [n]
73
74
  ), $ = c(
@@ -75,54 +76,54 @@ const Y = ({
75
76
  [n]
76
77
  );
77
78
  return U(() => {
78
- (r || s) && l !== void 0 && o != null && h();
79
- }, [o, r, s, l, h]), k ? /* @__PURE__ */ t(A, { name: e, control: C, render: () => /* @__PURE__ */ t(S, {}) }) : /* @__PURE__ */ t(
80
- A,
79
+ (r || u) && a !== void 0 && o != null && h();
80
+ }, [o, r, u, a, h]), H ? /* @__PURE__ */ t(j, { name: e, control: T, render: () => /* @__PURE__ */ t(S, {}) }) : /* @__PURE__ */ t(
81
+ j,
81
82
  {
82
83
  name: e,
83
84
  rules: n,
84
- control: C,
85
- render: ({ field: { ref: a, ...v }, formState: { defaultValues: W } }) => {
86
- const q = O(W, e);
87
- return !o && q && (s || r) && h(q), /* @__PURE__ */ G(S, { children: [
85
+ control: T,
86
+ render: ({ field: { ref: l, ...s }, formState: { defaultValues: D } }) => {
87
+ const q = B(D, e);
88
+ return !o && q && (u || r) && h(q), /* @__PURE__ */ J(S, { children: [
88
89
  /* @__PURE__ */ t(
89
- J,
90
+ K,
90
91
  {
91
- ...T,
92
- ...v,
93
- value: v.value ?? "",
94
- type: R,
92
+ ...x,
93
+ ...s,
94
+ value: s.value ?? "",
95
+ type: b,
95
96
  fullWidth: !0,
96
- inputMode: w,
97
- placeholder: H,
98
- prefixText: b,
97
+ inputMode: z,
98
+ placeholder: R,
99
+ prefixText: w,
99
100
  disabled: m,
100
- helperText: M(),
101
- helperTextPersistent: u !== void 0 || V || l !== void 0 && (r || s),
101
+ helperText: P(),
102
+ helperTextPersistent: C !== void 0 || W || a !== void 0 && (r || u),
102
103
  label: d,
103
104
  variant: "outlined",
104
- maxlength: l,
105
- minLength: P,
105
+ maxlength: a,
106
+ minLength: V,
106
107
  textarea: r,
107
108
  noResize: !1,
108
109
  onBlur: () => {
109
- x === "onBlur" && F(e), T.onBlur?.();
110
+ v === "onBlur" && F(e), x.onBlur?.();
110
111
  },
111
112
  onChange: (L) => {
112
- v.onChange(L);
113
- const D = L?.target?.value;
114
- I(D), x === "onChange" && F(e);
113
+ s.onChange(L);
114
+ const G = L?.target?.value;
115
+ M(G), v === "onChange" && F(e);
115
116
  },
116
117
  valid: !f(e).invalid,
117
118
  className: `${i.formText} ${f(e).invalid ? i.invalid : ""}`,
118
- trailingIcon: z
119
+ trailingIcon: E
119
120
  }
120
121
  ),
121
- l !== void 0 && (s || r) && /* @__PURE__ */ t(
122
+ a !== void 0 && (u || r) && /* @__PURE__ */ t(
122
123
  Y,
123
124
  {
124
- count: E,
125
- maxCount: l,
125
+ count: I,
126
+ maxCount: a,
126
127
  invalid: f(e).invalid,
127
128
  hasRequiredText: !!$
128
129
  }
@@ -1,66 +1,67 @@
1
1
  import { jsx as e, jsxs as s, Fragment as T } from "react/jsx-runtime";
2
- import { Card as g, CardContent as y, CardBody as x, Grid as v, GridRow as u, GridCol as n, TypoSubtitle as f, CardTitle as N, CardDivider as b } from "@element/react-components";
3
- import { useMemo as k } from "react";
2
+ import { Card as g, CardContent as y, CardBody as v, Grid as x, GridRow as u, GridCol as n, TypoSubtitle as f, CardTitle as N, CardDivider as b } from "@element/react-components";
3
+ import { useMemo as $ } from "react";
4
4
  import { OverflowTooltip as c } from "../../OverflowTooltip/OverflowTooltip.js";
5
- import { s as d } from "../../../genericCard.module-CnQn6tMH.js";
5
+ import { s as i } from "../../../genericCard.module-k0bicNfi.js";
6
6
  const h = {
7
7
  desktopCol: 6,
8
8
  phoneCol: 2,
9
9
  tabletCol: 4
10
- }, j = ({ item: t, columns: r, hiddenColumns: a }) => {
11
- const l = r.find((i) => i.asCardTitle), p = r.find((i) => i.asCardSubtitle), C = k(
10
+ }, j = ({ item: t, columns: r, hiddenColumns: d }) => {
11
+ const l = r.find((a) => a.asCardTitle), p = r.find((a) => a.asCardSubtitle), C = $(
12
12
  () => r.filter(
13
- (i) => !i.asCardTitle && !i.asCardSubtitle && i.id !== "actions"
13
+ (a) => !a.asCardTitle && !a.asCardSubtitle && a.id !== "actions"
14
14
  ),
15
15
  [r]
16
16
  );
17
- return /* @__PURE__ */ e(g, { variant: "raised", children: /* @__PURE__ */ s(y, { className: d.cardContent, children: [
18
- /* @__PURE__ */ e(w, { item: t, titleColumn: l, subTitleColumn: p }),
19
- /* @__PURE__ */ e(x, { className: d.cardBody, "data-testid": "card-body", children: /* @__PURE__ */ e(v, { fullHeight: !0, fullWidth: !0, variant: "none", children: C.map((i) => a?.includes(i.id) ? null : /* @__PURE__ */ s(u, { className: d.row, "data-testid": "row", children: [
17
+ return /* @__PURE__ */ e(g, { variant: "raised", children: /* @__PURE__ */ s(y, { className: i.cardContent, children: [
18
+ /* @__PURE__ */ e(k, { item: t, titleColumn: l, subTitleColumn: p }),
19
+ /* @__PURE__ */ e(v, { className: i.cardBody, "data-testid": "card-body", children: /* @__PURE__ */ e(x, { fullHeight: !0, fullWidth: !0, variant: "none", children: C.map((a) => d?.includes(a.id) ? null : /* @__PURE__ */ s(u, { className: i.row, "data-testid": "row", children: [
20
20
  /* @__PURE__ */ e(n, { horizontalAlign: "right", ...h, children: /* @__PURE__ */ s(
21
21
  f,
22
22
  {
23
23
  level: 2,
24
24
  themeColor: "text-secondary-on-background",
25
- className: d.font,
25
+ className: `${i.font} ${i.fontHeader}`,
26
+ tag: "div",
26
27
  children: [
27
- i.header,
28
+ a.header,
28
29
  ":"
29
30
  ]
30
31
  }
31
32
  ) }),
32
- /* @__PURE__ */ e(n, { horizontalAlign: "left", ...h, children: /* @__PURE__ */ e(o, { column: i, item: t }) })
33
- ] }, i.id)) }) })
33
+ /* @__PURE__ */ e(n, { horizontalAlign: "left", ...h, children: /* @__PURE__ */ e(o, { column: a, item: t }) })
34
+ ] }, a.id)) }) })
34
35
  ] }) });
35
- }, w = ({ item: t, titleColumn: r, subTitleColumn: a }) => {
36
+ }, k = ({ item: t, titleColumn: r, subTitleColumn: d }) => {
36
37
  const l = t.actions;
37
- return !r && !a && !l ? null : /* @__PURE__ */ s(T, { children: [
38
+ return !r && !d && !l ? null : /* @__PURE__ */ s(T, { children: [
38
39
  /* @__PURE__ */ e(
39
40
  N,
40
41
  {
41
42
  "data-testid": "card-title",
42
- className: d.cardTitle,
43
+ className: i.cardTitle,
43
44
  primaryText: r !== void 0 && /* @__PURE__ */ e(o, { column: r, item: t, isTitle: !0 }),
44
- secondaryText: a !== void 0 && /* @__PURE__ */ e(o, { column: a, item: t, isTitle: !0 }),
45
+ secondaryText: d !== void 0 && /* @__PURE__ */ e(o, { column: d, item: t, isTitle: !0 }),
45
46
  trailingBlock: l,
46
47
  trailingBlockType: "title-actions"
47
48
  }
48
49
  ),
49
50
  /* @__PURE__ */ e(b, {})
50
51
  ] });
51
- }, o = ({ item: t, column: r, isTitle: a = !1 }) => r.cellTemplate ? r.cellTemplate({ row: { original: t } }) : a ? /* @__PURE__ */ e(
52
+ }, o = ({ item: t, column: r, isTitle: d = !1 }) => r.cellTemplate ? r.cellTemplate({ row: { original: t } }) : d ? /* @__PURE__ */ e(
52
53
  c,
53
54
  {
54
55
  id: `tip_${r.id}_${t[r.accessor]}`,
55
56
  text: t[r.accessor],
56
- children: /* @__PURE__ */ e("span", { className: d.title, children: t[r.accessor] })
57
+ children: /* @__PURE__ */ e("span", { className: i.title, children: t[r.accessor] })
57
58
  }
58
59
  ) : /* @__PURE__ */ e(
59
60
  c,
60
61
  {
61
62
  id: `tip_${r.id}_${t[r.accessor]}`,
62
63
  text: t[r.accessor],
63
- children: /* @__PURE__ */ e(f, { level: 2, themeColor: "text-primary-on-background", className: d.font, children: t[r.accessor] })
64
+ children: /* @__PURE__ */ e(f, { level: 2, themeColor: "text-primary-on-background", className: i.font, children: t[r.accessor] })
64
65
  }
65
66
  );
66
67
  export {
@@ -1,7 +1,7 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { Padding as c, TypoCaption as o, Group as s } from "@element/react-components";
3
3
  import { GenericCard as m } from "./GenericCard.js";
4
- import { s as t } from "../../../genericCard.module-CnQn6tMH.js";
4
+ import { s as t } from "../../../genericCard.module-k0bicNfi.js";
5
5
  const u = ({
6
6
  columns: n,
7
7
  data: e,
@@ -32,7 +32,6 @@ g("GenericCardList", () => {
32
32
  columns: d,
33
33
  data: [],
34
34
  hiddenColumns: [],
35
- order: [],
36
35
  noContentText: "No data available"
37
36
  }
38
37
  )
@@ -47,7 +46,6 @@ g("GenericCardList", () => {
47
46
  columns: d,
48
47
  data: c,
49
48
  hiddenColumns: [],
50
- order: [],
51
49
  noContentText: "No data available"
52
50
  }
53
51
  )
@@ -64,7 +62,6 @@ g("GenericCardList", () => {
64
62
  columns: d,
65
63
  data: [c[1]],
66
64
  hiddenColumns: [],
67
- order: ["gender", "age"],
68
65
  noContentText: "No data available"
69
66
  }
70
67
  )
@@ -0,0 +1,15 @@
1
+ import "./assets/genericCard.css";
2
+ const t = "_cardTitle_ecoot_1", o = "_cardBody_ecoot_5", e = "_cardContent_ecoot_10", c = "_row_ecoot_14", n = "_font_ecoot_18", _ = "_fontHeader_ecoot_28", r = "_title_ecoot_32", a = "_emptyContainer_ecoot_40", d = "_empty_ecoot_40", i = {
3
+ cardTitle: t,
4
+ cardBody: o,
5
+ cardContent: e,
6
+ row: c,
7
+ font: n,
8
+ fontHeader: _,
9
+ title: r,
10
+ emptyContainer: a,
11
+ empty: d
12
+ };
13
+ export {
14
+ i as s
15
+ };
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.7544",
4
+ "version": "0.0.7576",
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>",
@@ -1,14 +0,0 @@
1
- import "./assets/genericCard.css";
2
- const t = "_cardTitle_a6o2v_1", o = "_cardBody_a6o2v_5", n = "_cardContent_a6o2v_10", _ = "_row_a6o2v_14", a = "_font_a6o2v_18", e = "_title_a6o2v_26", c = "_emptyContainer_a6o2v_34", r = "_empty_a6o2v_34", d = {
3
- cardTitle: t,
4
- cardBody: o,
5
- cardContent: n,
6
- row: _,
7
- font: a,
8
- title: e,
9
- emptyContainer: c,
10
- empty: r
11
- };
12
- export {
13
- d as s
14
- };