@hortiview/shared-components 0.0.7428 → 0.0.7462

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
- @import"https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700|Roboto+Mono:400,500|Material+Icons";._filterButton_1xlao_1{width:15rem;height:100%!important}._filterBadge_1xlao_6{position:relative;top:-112%;left:95%;border-color:var(--lmnt-theme-surface-variant)!important}._dense_1xlao_12,._dense_1xlao_12 div[class*=lmnt-select__anchor]{height:2.5rem!important}._topBar_1msoo_1 [class*=lmnt-table__top-bar__title]{display:none}._filterBar_1msoo_5{padding:1rem;width:inherit!important}._emptyTable_1msoo_9{height:16rem}[class*=mnt-pagination][class*=mdc-data-table__pagination]{border-top:1px solid var(--lmnt-theme-on-secondary-stroke)}._elevation_1msoo_17{border-radius:.4rem;width:100%}._table_1msoo_22,._table_1msoo_22 [class*=mdc-data-table__table-container]{border-radius:.4rem}
1
+ @import"https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700|Roboto+Mono:400,500|Material+Icons";._filterButton_qtl7a_1{width:15rem;height:100%!important}._relativeParent_qtl7a_6{position:relative}._filterBadge_qtl7a_10{position:absolute;top:0;right:0;transform:translate(50%,-50%)}._dense_qtl7a_17,._dense_qtl7a_17 div[class*=lmnt-select__anchor]{height:2.5rem!important}._topBar_1msoo_1 [class*=lmnt-table__top-bar__title]{display:none}._filterBar_1msoo_5{padding:1rem;width:inherit!important}._emptyTable_1msoo_9{height:16rem}[class*=mnt-pagination][class*=mdc-data-table__pagination]{border-top:1px solid var(--lmnt-theme-on-secondary-stroke)}._elevation_1msoo_17{border-radius:.4rem;width:100%}._table_1msoo_22,._table_1msoo_22 [class*=mdc-data-table__table-container]{border-radius:.4rem}
@@ -1,8 +1,8 @@
1
1
  import { jsx as t, jsxs as y, Fragment as I } from "react/jsx-runtime";
2
- import { Group as v, Modal as W, Button as p, Select as j, IconButton as z, NotificationBadge as S } from "@element/react-components";
2
+ import { Group as v, Modal as W, Button as u, Select as j, IconButton as z, NotificationBadge as N } from "@element/react-components";
3
3
  import { useState as g } from "react";
4
- import { s as d } from "../../genericTable.module-CNV1Yt1K.js";
5
- import { u as O } from "../../useBreakpoints-BNeVhjjZ.js";
4
+ import { s as a } from "../../genericTable.module-Dk3yy2S3.js";
5
+ import { u as k } from "../../useBreakpoints-BNeVhjjZ.js";
6
6
  import "../../alertBanner.module-HneYdVzN.js";
7
7
  import { I as H } from "../../Iconify-CY9lZjFd.js";
8
8
  import "../../react-tooltip.min-BzHiZW8k.js";
@@ -32,67 +32,67 @@ import "../../formDatePicker.module-BV3ma_7y.js";
32
32
  import "../../formSelect.module-C18N-SsT.js";
33
33
  import "../../formText.module-C0by6_DK.js";
34
34
  const vt = ({
35
- clearFilterText: o,
36
- closeCallback: l,
35
+ clearFilterText: l,
36
+ closeCallback: o,
37
37
  currentFilter: r,
38
38
  filterButtonAsIcon: e = !1,
39
39
  filterButtonText: i,
40
- filterModalTitle: u,
41
- filters: a,
42
- modalCancelButtonText: m,
40
+ filterModalTitle: f,
41
+ filters: m,
42
+ modalCancelButtonText: c,
43
43
  modalConfirmButtonText: n,
44
- useModal: b = !0
44
+ useModal: C = !0
45
45
  }) => {
46
- const { isDesktop: N } = O(), [A, f] = g(!1), [s, C] = g(r), [_, x] = g(0), B = () => {
47
- f(!1), l(s), x(
48
- s.reduce((c, { selectedOptions: h }) => c + h.length, 0)
46
+ const { isDesktop: b } = k(), [A, h] = g(!1), [s, x] = g(r), [_, B] = g(0), F = () => {
47
+ h(!1), o(s), B(
48
+ s.reduce((p, { selectedOptions: d }) => p + d.length, 0)
49
49
  );
50
50
  }, w = () => {
51
- C([]), x(0);
52
- }, F = (c) => {
53
- const h = [
54
- ...s.filter((D) => D.id !== c.id),
55
- c
51
+ x([]), B(0);
52
+ }, S = (p) => {
53
+ const d = [
54
+ ...s.filter((D) => D.id !== p.id),
55
+ p
56
56
  ];
57
- C(h);
57
+ x(d), C || o(d);
58
58
  };
59
- return b ? /* @__PURE__ */ y(I, { children: [
59
+ return C ? /* @__PURE__ */ y(I, { children: [
60
60
  /* @__PURE__ */ t(
61
61
  K,
62
62
  {
63
63
  filterButtonText: i,
64
64
  filterButtonAsIcon: e,
65
65
  count: _,
66
- onClick: () => f(!0)
66
+ onClick: () => h(!0)
67
67
  }
68
68
  ),
69
69
  /* @__PURE__ */ t(
70
70
  W,
71
71
  {
72
72
  open: A,
73
- onClose: B,
74
- title: u,
75
- modalSize: N ? "small" : "fullscreen",
76
- headerActions: /* @__PURE__ */ t(p, { variant: "text", onClick: w, children: o }),
77
- dismissiveButton: /* @__PURE__ */ t(p, { variant: "outlined", onClick: () => f(!1), children: m }),
78
- primaryButton: /* @__PURE__ */ t(p, { variant: "filled", onClick: B, children: n }),
79
- children: /* @__PURE__ */ t(v, { direction: "vertical", children: k(a, s, F) })
73
+ onClose: F,
74
+ title: f,
75
+ modalSize: b ? "small" : "fullscreen",
76
+ headerActions: /* @__PURE__ */ t(u, { variant: "text", onClick: w, children: l }),
77
+ dismissiveButton: /* @__PURE__ */ t(u, { variant: "outlined", onClick: () => h(!1), children: c }),
78
+ primaryButton: /* @__PURE__ */ t(u, { variant: "filled", onClick: F, children: n }),
79
+ children: /* @__PURE__ */ t(v, { direction: "vertical", children: O(m, s, S) })
80
80
  }
81
81
  )
82
- ] }) : /* @__PURE__ */ t(v, { secondaryAlign: "center", fullWidth: !0, children: k(a, s, F, !1) });
83
- }, k = (o, l, r, e = !0) => o.map(({ id: i, title: u, availableOptions: a, icon: m }) => /* @__PURE__ */ y(v, { fullWidth: !0, secondaryAlign: "center", children: [
84
- m ? /* @__PURE__ */ t(H, { icon: m, iconSize: "medium" }) : null,
82
+ ] }) : /* @__PURE__ */ t(v, { secondaryAlign: "center", fullWidth: !0, children: O(m, s, S, !1) });
83
+ }, O = (l, o, r, e = !0) => l.map(({ id: i, title: f, availableOptions: m, icon: c }) => /* @__PURE__ */ y(v, { fullWidth: !0, secondaryAlign: "center", children: [
84
+ c ? /* @__PURE__ */ t(H, { icon: c, iconSize: "medium" }) : null,
85
85
  /* @__PURE__ */ t(
86
86
  j,
87
87
  {
88
- className: e ? void 0 : d.dense,
88
+ className: e ? void 0 : a.dense,
89
89
  variant: "outlined",
90
- options: a,
91
- label: u,
90
+ options: m,
91
+ label: f,
92
92
  multiSelect: !0,
93
93
  textKey: "text",
94
94
  valueKey: "id",
95
- value: l.find((n) => n.id === i)?.selectedOptions ?? [],
95
+ value: o.find((n) => n.id === i)?.selectedOptions ?? [],
96
96
  onChange: (n) => r({ id: i, selectedOptions: n }),
97
97
  hoisted: !0,
98
98
  menuMaxHeight: "300px",
@@ -104,50 +104,57 @@ const vt = ({
104
104
  }
105
105
  )
106
106
  ] }, i)), K = ({
107
- filterButtonText: o,
108
- filterButtonAsIcon: l,
107
+ filterButtonText: l,
108
+ filterButtonAsIcon: o,
109
109
  count: r,
110
110
  onClick: e
111
111
  }) => {
112
- const { isDesktop: i } = O();
113
- return l ? /* @__PURE__ */ t(
112
+ const { isDesktop: i } = k();
113
+ return o ? /* @__PURE__ */ t(
114
114
  z,
115
115
  {
116
116
  icon: "filter_list_alt",
117
117
  onClick: e,
118
118
  badge: r !== 0 && /* @__PURE__ */ t(
119
- S,
119
+ N,
120
120
  {
121
121
  counter: r,
122
- className: d.filterBadge,
122
+ className: a.filterBadge,
123
123
  themeColor: "secondary",
124
124
  "data-testid": "filter-badge"
125
125
  }
126
126
  )
127
127
  }
128
- ) : /* @__PURE__ */ y("div", { style: { height: "100%", width: i ? void 0 : "100%" }, children: [
129
- /* @__PURE__ */ t(
130
- p,
131
- {
132
- variant: "outlined",
133
- themeColor: "primary",
134
- leadingIcon: "filter_list_alt",
135
- onClick: e,
136
- className: d.filterButton,
137
- fullWidth: !i,
138
- children: o
139
- }
140
- ),
141
- r !== 0 && /* @__PURE__ */ t(
142
- S,
143
- {
144
- counter: r,
145
- className: d.filterBadge,
146
- themeColor: "secondary",
147
- "data-testid": "filter-badge"
148
- }
149
- )
150
- ] });
128
+ ) : /* @__PURE__ */ y(
129
+ "div",
130
+ {
131
+ className: a.relativeParent,
132
+ style: { height: "100%", width: i ? void 0 : "100%" },
133
+ children: [
134
+ /* @__PURE__ */ t(
135
+ u,
136
+ {
137
+ variant: "outlined",
138
+ themeColor: "primary",
139
+ leadingIcon: "filter_list_alt",
140
+ onClick: e,
141
+ className: a.filterButton,
142
+ fullWidth: !i,
143
+ children: l
144
+ }
145
+ ),
146
+ r !== 0 && /* @__PURE__ */ t(
147
+ N,
148
+ {
149
+ counter: r,
150
+ className: a.filterBadge,
151
+ themeColor: "secondary",
152
+ "data-testid": "filter-badge"
153
+ }
154
+ )
155
+ ]
156
+ }
157
+ );
151
158
  };
152
159
  export {
153
160
  vt as Filter
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as B } from "react/jsx-runtime";
2
2
  import { Elevation as D, Table as G, TableTopBar as u, Group as l, Padding as W, TypoDisplay as k, TypoSubtitle as C } from "@element/react-components";
3
3
  import { Fragment as j } from "react";
4
- import { a as e } from "../../genericTable.module-CNV1Yt1K.js";
4
+ import { a as e } from "../../genericTable.module-Dk3yy2S3.js";
5
5
  import { u as x } from "../../useBreakpoints-BNeVhjjZ.js";
6
6
  import "../../alertBanner.module-HneYdVzN.js";
7
7
  import "../../iconify.module-C89oaw5b.js";
@@ -0,0 +1,17 @@
1
+ import "./assets/genericTable.css";
2
+ const t = "_filterButton_qtl7a_1", e = "_relativeParent_qtl7a_6", o = "_filterBadge_qtl7a_10", a = "_dense_qtl7a_17", B = {
3
+ filterButton: t,
4
+ relativeParent: e,
5
+ filterBadge: o,
6
+ dense: a
7
+ }, l = "_topBar_1msoo_1", _ = "_filterBar_1msoo_5", s = "_emptyTable_1msoo_9", n = "_elevation_1msoo_17", r = "_table_1msoo_22", c = {
8
+ topBar: l,
9
+ filterBar: _,
10
+ emptyTable: s,
11
+ elevation: n,
12
+ table: r
13
+ };
14
+ export {
15
+ c as a,
16
+ B as s
17
+ };
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./genericTable.module-CNV1Yt1K.js";
1
+ import "./genericTable.module-Dk3yy2S3.js";
2
2
  import { AlertBanner as t } from "./components/AlertBanner/AlertBanner.js";
3
3
  import { BaseView as p } from "./components/BaseView/BaseView.js";
4
4
  import { BasicHeading as x } from "./components/BasicHeading/BasicHeading.js";
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.7428",
4
+ "version": "0.0.7462",
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,16 +0,0 @@
1
- import "./assets/genericTable.css";
2
- const t = "_filterButton_1xlao_1", e = "_filterBadge_1xlao_6", o = "_dense_1xlao_12", i = {
3
- filterButton: t,
4
- filterBadge: e,
5
- dense: o
6
- }, s = "_topBar_1msoo_1", a = "_filterBar_1msoo_5", _ = "_emptyTable_1msoo_9", l = "_elevation_1msoo_17", n = "_table_1msoo_22", B = {
7
- topBar: s,
8
- filterBar: a,
9
- emptyTable: _,
10
- elevation: l,
11
- table: n
12
- };
13
- export {
14
- B as a,
15
- i as s
16
- };