@hortiview/shared-components 0.0.6890 → 0.0.7018
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/BlockView.module-BPlNT5uh.js +15 -0
- package/dist/HashTabView.module-CJX4gxTu.js +13 -0
- package/dist/HeaderFilter.module-DiBmulr5.js +7 -0
- package/dist/Iconify-CY9lZjFd.js +95 -0
- package/dist/_baseToString-BNXOi2Mf.js +197 -0
- package/dist/_equalByTag-DJhSpgVG.js +157 -0
- package/dist/alertBanner.module-HneYdVzN.js +10 -0
- package/dist/assets/{main.css → Filter.css} +1 -1
- package/dist/assets/baseView.css +1 -0
- package/dist/assets/basicHeading.css +1 -0
- package/dist/assets/listArea.css +1 -0
- package/dist/baseView.module-ve87u_d0.js +12 -0
- package/dist/basicHeading.module-BYb8xvuk.js +16 -0
- package/dist/bigLoadingSpinner.module-GgbFol8k.js +11 -0
- package/dist/components/AlertBanner/AlertBanner.js +12 -17
- package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
- package/dist/components/BaseView/BaseView.js +42 -45
- package/dist/components/BaseView/BaseView.test.js +6 -4
- package/dist/components/BasicHeading/BasicHeading.js +39 -50
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +41 -51
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +18 -20
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.js +55 -60
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +8 -11
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/Filter/Filter.d.ts +27 -0
- package/dist/components/Filter/Filter.js +149 -0
- package/dist/components/Filter/Filter.test.d.ts +1 -0
- package/dist/components/Filter/Filter.test.js +114 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +46 -52
- 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.js +68 -73
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.js +57 -62
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +52 -58
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.js +46 -54
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.js +14 -16
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.d.ts +3 -13
- package/dist/components/Iconify/Iconify.js +6 -163
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.js +38 -47
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +258 -490
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.js +82 -8
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +9 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -2
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +13 -15
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.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.js +21 -23
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -6
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/contextMenu.module-B7aUMFPe.js +7 -0
- package/dist/deleteModal.module-Ds3MDzdl.js +10 -0
- package/dist/disclaimer.module-BZydt-Q_.js +8 -0
- package/dist/formDatePicker.module-BV3ma_7y.js +11 -0
- package/dist/formSelect.module-C18N-SsT.js +11 -0
- package/dist/formText.module-Blt6Y-SR.js +10 -0
- package/dist/genericTable.module-BkU2VDKR.js +11 -0
- package/dist/get-UxX31Aph.js +47 -0
- package/dist/hooks/useBreakpoint.d.ts +8 -1
- package/dist/hooks/useBreakpoint.js +1 -1
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/iconify.module-C89oaw5b.js +79 -0
- package/dist/{index-DP2ENnrX.js → index-BQnj-5Zt.js} +1 -1
- package/dist/infoGroup.module-B3E1gCGi.js +14 -0
- package/dist/isArray-Ca4KR8TK.js +91 -0
- package/dist/listArea.module-B-gPyfbE.js +19 -0
- package/dist/loadingSpinner.module-CLtqSMWA.js +7 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +55 -52
- package/dist/{react.esm-DoZanrUz.js → react.esm-C3jDj5Fe.js} +1 -0
- package/dist/searchBar.module-9gKyrZRT.js +7 -0
- package/dist/types/Filter.d.ts +31 -0
- package/dist/types/Filter.js +1 -0
- package/dist/useBreakpoint-BNeVhjjZ.js +33 -0
- package/dist/verticalDivider.module-C3_GL-fH.js +7 -0
- package/package.json +1 -1
- package/dist/BigLoadingSpinner-Df2k3xOD.js +0 -18
- package/dist/ListAreaService-DDlsV9UD.js +0 -100
- package/dist/assets/BaseView.css +0 -1
- package/dist/assets/BasicHeading.css +0 -1
- package/dist/assets/ListAreaService.css +0 -1
- package/dist/get-BRDhkfK0.js +0 -324
- package/dist/useBreakpoint-2MH8ICuE.js +0 -28
- /package/dist/assets/{AlertBanner.css → alertBanner.css} +0 -0
- /package/dist/assets/{BigLoadingSpinner.css → bigLoadingSpinner.css} +0 -0
- /package/dist/assets/{ContextMenu.css → contextMenu.css} +0 -0
- /package/dist/assets/{DeleteModal.css → deleteModal.css} +0 -0
- /package/dist/assets/{Disclaimer.css → disclaimer.css} +0 -0
- /package/dist/assets/{FormDatePicker.css → formDatePicker.css} +0 -0
- /package/dist/assets/{FormSelect.css → formSelect.css} +0 -0
- /package/dist/assets/{FormText.css → formText.css} +0 -0
- /package/dist/assets/{GenericTable.css → genericTable.css} +0 -0
- /package/dist/assets/{Iconify.css → iconify.css} +0 -0
- /package/dist/assets/{InfoGroup.css → infoGroup.css} +0 -0
- /package/dist/assets/{LoadingSpinner.css → loadingSpinner.css} +0 -0
- /package/dist/assets/{SearchBar.css → searchBar.css} +0 -0
- /package/dist/assets/{VerticalDivider.css → verticalDivider.css} +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { c as o, g as j } from "./_commonjsHelpers-CT_km90n.js";
|
|
2
|
+
var $ = typeof o == "object" && o && o.Object === Object && o, p = $, S = p, T = typeof self == "object" && self && self.Object === Object && self, _ = S || T || Function("return this")(), c = _, O = c, d = O.Symbol, f = d, i = f, g = Object.prototype, m = g.hasOwnProperty, h = g.toString, e = i ? i.toStringTag : void 0;
|
|
3
|
+
function P(r) {
|
|
4
|
+
var t = m.call(r, e), a = r[e];
|
|
5
|
+
try {
|
|
6
|
+
r[e] = void 0;
|
|
7
|
+
var l = !0;
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
var y = h.call(r);
|
|
11
|
+
return l && (t ? r[e] = a : delete r[e]), y;
|
|
12
|
+
}
|
|
13
|
+
var F = P, k = Object.prototype, w = k.toString;
|
|
14
|
+
function G(r) {
|
|
15
|
+
return w.call(r);
|
|
16
|
+
}
|
|
17
|
+
var N = G, s = f, x = F, A = N, I = "[object Null]", M = "[object Undefined]", u = s ? s.toStringTag : void 0;
|
|
18
|
+
function R(r) {
|
|
19
|
+
return r == null ? r === void 0 ? M : I : u && u in Object(r) ? x(r) : A(r);
|
|
20
|
+
}
|
|
21
|
+
var C = R;
|
|
22
|
+
function D(r) {
|
|
23
|
+
var t = typeof r;
|
|
24
|
+
return r != null && (t == "object" || t == "function");
|
|
25
|
+
}
|
|
26
|
+
var b = D, E = C, J = b, V = "[object AsyncFunction]", L = "[object Function]", H = "[object GeneratorFunction]", K = "[object Proxy]";
|
|
27
|
+
function U(r) {
|
|
28
|
+
if (!J(r))
|
|
29
|
+
return !1;
|
|
30
|
+
var t = E(r);
|
|
31
|
+
return t == L || t == H || t == V || t == K;
|
|
32
|
+
}
|
|
33
|
+
var q = U, z = c, B = z["__core-js_shared__"], Q = B, n = Q, v = function() {
|
|
34
|
+
var r = /[^.]+$/.exec(n && n.keys && n.keys.IE_PROTO || "");
|
|
35
|
+
return r ? "Symbol(src)_1." + r : "";
|
|
36
|
+
}();
|
|
37
|
+
function W(r) {
|
|
38
|
+
return !!v && v in r;
|
|
39
|
+
}
|
|
40
|
+
var X = W, Y = Function.prototype, Z = Y.toString;
|
|
41
|
+
function rr(r) {
|
|
42
|
+
if (r != null) {
|
|
43
|
+
try {
|
|
44
|
+
return Z.call(r);
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
return r + "";
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return "";
|
|
53
|
+
}
|
|
54
|
+
var tr = rr, er = q, ar = X, or = b, nr = tr, cr = /[\\^$.*+?()[\]{}|]/g, ir = /^\[object .+?Constructor\]$/, sr = Function.prototype, ur = Object.prototype, vr = sr.toString, fr = ur.hasOwnProperty, gr = RegExp(
|
|
55
|
+
"^" + vr.call(fr).replace(cr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
56
|
+
);
|
|
57
|
+
function br(r) {
|
|
58
|
+
if (!or(r) || ar(r))
|
|
59
|
+
return !1;
|
|
60
|
+
var t = er(r) ? gr : ir;
|
|
61
|
+
return t.test(nr(r));
|
|
62
|
+
}
|
|
63
|
+
var lr = br;
|
|
64
|
+
function yr(r, t) {
|
|
65
|
+
return r?.[t];
|
|
66
|
+
}
|
|
67
|
+
var jr = yr, $r = lr, pr = jr;
|
|
68
|
+
function Sr(r, t) {
|
|
69
|
+
var a = pr(r, t);
|
|
70
|
+
return $r(a) ? a : void 0;
|
|
71
|
+
}
|
|
72
|
+
var Tr = Sr, _r = Tr, Or = c, dr = _r(Or, "Map"), wr = dr;
|
|
73
|
+
function mr(r) {
|
|
74
|
+
return r != null && typeof r == "object";
|
|
75
|
+
}
|
|
76
|
+
var Gr = mr, hr = Array.isArray, Pr = hr;
|
|
77
|
+
const Nr = /* @__PURE__ */ j(Pr);
|
|
78
|
+
export {
|
|
79
|
+
wr as _,
|
|
80
|
+
Pr as a,
|
|
81
|
+
c as b,
|
|
82
|
+
f as c,
|
|
83
|
+
Tr as d,
|
|
84
|
+
C as e,
|
|
85
|
+
tr as f,
|
|
86
|
+
Gr as g,
|
|
87
|
+
p as h,
|
|
88
|
+
Nr as i,
|
|
89
|
+
b as j,
|
|
90
|
+
q as k
|
|
91
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./assets/listArea.css";
|
|
2
|
+
const t = "_fullWidth_x5yt7_1", e = "_mainElevation_x5yt7_5", o = "_searchbar_x5yt7_11", n = "_roundedBottom_x5yt7_19", i = "_primaryText_x5yt7_24", _ = "_list_x5yt7_28", r = "_listItem_x5yt7_56", l = "_trailingIcon_x5yt7_60", s = "_groupedListItem_x5yt7_72", c = "_iconColor_x5yt7_76", a = "_overlineTitle_x5yt7_80", x = "_truncate_x5yt7_85", y = "_truncateOverlineText_x5yt7_94", u = {
|
|
3
|
+
fullWidth: t,
|
|
4
|
+
mainElevation: e,
|
|
5
|
+
searchbar: o,
|
|
6
|
+
roundedBottom: n,
|
|
7
|
+
primaryText: i,
|
|
8
|
+
list: _,
|
|
9
|
+
listItem: r,
|
|
10
|
+
trailingIcon: l,
|
|
11
|
+
groupedListItem: s,
|
|
12
|
+
iconColor: c,
|
|
13
|
+
overlineTitle: a,
|
|
14
|
+
truncate: x,
|
|
15
|
+
truncateOverlineText: y
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
u as s
|
|
19
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { ContextMenu } from './components/ContextMenu/ContextMenu';
|
|
|
7
7
|
export { DeleteModal } from './components/DeleteModal/DeleteModal';
|
|
8
8
|
export { Disclaimer } from './components/Disclaimer/Disclaimer';
|
|
9
9
|
export { EmptyView } from './components/EmptyView/EmptyView';
|
|
10
|
+
export { Filter } from './components/Filter/Filter';
|
|
10
11
|
export { GenericTable } from './components/GenericTable/GenericTable';
|
|
11
12
|
export { HashTabView } from './components/HashTabView/HashTabView';
|
|
12
13
|
export { HeaderFilter } from './components/HeaderFilter/HeaderFilter';
|
|
@@ -14,6 +15,7 @@ export { Iconify } from './components/Iconify/Iconify';
|
|
|
14
15
|
export { InfoGroup } from './components/InfoGroup/InfoGroup';
|
|
15
16
|
export { ListArea } from './components/ListArea/ListArea';
|
|
16
17
|
export { LoadingSpinner } from './components/LoadingSpinner/Default/LoadingSpinner';
|
|
18
|
+
export { OverflowTooltip } from './components/OverflowTooltip/OverflowTooltip';
|
|
17
19
|
export { ScrollbarX, ScrollbarY } from './components/Scrollbar/Scrollbar';
|
|
18
20
|
export { SearchBar } from './components/SearchBar/SearchBar';
|
|
19
21
|
export { VerticalDivider } from './components/VerticalDivider/VerticalDivider';
|
|
@@ -29,6 +31,7 @@ export { capitalizeFirstLetters } from './services/UtilService';
|
|
|
29
31
|
export type { FormSelectOption } from './components/FormComponents/FormSelect/FormSelect';
|
|
30
32
|
export type { FormTextProps } from './components/FormComponents/FormText/FormText';
|
|
31
33
|
export type { FieldItem } from './components/InfoGroup/InfoGroup';
|
|
34
|
+
export type { FilterData, FilterOption, FilterSelection } from './types/Filter';
|
|
32
35
|
export type { CellTemplate, CellTemplateProps, TableLayoutProps } from './types/GenericTable';
|
|
33
36
|
export type { HashTab } from './types/HashTab';
|
|
34
37
|
export type { BaseListElement, ListElement } from './types/ListElement';
|
package/dist/main.js
CHANGED
|
@@ -1,58 +1,61 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { AlertBanner as
|
|
3
|
-
import { BaseView as
|
|
4
|
-
import { BasicHeading as
|
|
5
|
-
import { BlockView as
|
|
6
|
-
import { ContextMenu as
|
|
7
|
-
import { DeleteModal as
|
|
8
|
-
import { Disclaimer as
|
|
9
|
-
import { EmptyView as
|
|
10
|
-
import { GenericTable as
|
|
1
|
+
import { Filter as e } from "./components/Filter/Filter.js";
|
|
2
|
+
import { AlertBanner as m } from "./components/AlertBanner/AlertBanner.js";
|
|
3
|
+
import { BaseView as f } from "./components/BaseView/BaseView.js";
|
|
4
|
+
import { BasicHeading as i } from "./components/BasicHeading/BasicHeading.js";
|
|
5
|
+
import { BlockView as l } from "./components/BlockView/BlockView.js";
|
|
6
|
+
import { ContextMenu as n } from "./components/ContextMenu/ContextMenu.js";
|
|
7
|
+
import { DeleteModal as F } from "./components/DeleteModal/DeleteModal.js";
|
|
8
|
+
import { Disclaimer as B } from "./components/Disclaimer/Disclaimer.js";
|
|
9
|
+
import { EmptyView as b } from "./components/EmptyView/EmptyView.js";
|
|
10
|
+
import { GenericTable as w } from "./components/GenericTable/GenericTable.js";
|
|
11
11
|
import { HashTabView as k } from "./components/HashTabView/HashTabView.js";
|
|
12
|
-
import { HeaderFilter as
|
|
13
|
-
import {
|
|
14
|
-
import { InfoGroup as
|
|
15
|
-
import { ListArea as
|
|
12
|
+
import { HeaderFilter as I } from "./components/HeaderFilter/HeaderFilter.js";
|
|
13
|
+
import { I as h } from "./Iconify-CY9lZjFd.js";
|
|
14
|
+
import { InfoGroup as A } from "./components/InfoGroup/InfoGroup.js";
|
|
15
|
+
import { ListArea as H } from "./components/ListArea/ListArea.js";
|
|
16
16
|
import { LoadingSpinner as g } from "./components/LoadingSpinner/Default/LoadingSpinner.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
17
|
+
import { OverflowTooltip as G } from "./components/OverflowTooltip/OverflowTooltip.js";
|
|
18
|
+
import { ScrollbarX as z, ScrollbarY as E } from "./components/Scrollbar/Scrollbar.js";
|
|
19
|
+
import { SearchBar as P } from "./components/SearchBar/SearchBar.js";
|
|
20
|
+
import { VerticalDivider as X } from "./components/VerticalDivider/VerticalDivider.js";
|
|
21
|
+
import { FormCheckBox as j } from "./components/FormComponents/FormCheckBox/FormCheckBox.js";
|
|
22
|
+
import { FormDatePicker as J } from "./components/FormComponents/FormDatePicker/FormDatePicker.js";
|
|
23
|
+
import { FormRadio as N } from "./components/FormComponents/FormRadio/FormRadio.js";
|
|
24
|
+
import { FormSelect as U } from "./components/FormComponents/FormSelect/FormSelect.js";
|
|
25
|
+
import { FormSlider as Z } from "./components/FormComponents/FormSlider/FormSlider.js";
|
|
26
|
+
import { FormText as $ } from "./components/FormComponents/FormText/FormText.js";
|
|
27
|
+
import { AvailableCustomIcons as or } from "./enums/AvailableCustomIcons.js";
|
|
28
|
+
import { u as tr } from "./useBreakpoint-BNeVhjjZ.js";
|
|
29
|
+
import { capitalizeFirstLetters as pr } from "./services/UtilService.js";
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
j as
|
|
41
|
-
J as
|
|
42
|
-
N as
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
m as AlertBanner,
|
|
32
|
+
or as AvailableCustomIcons,
|
|
33
|
+
f as BaseView,
|
|
34
|
+
i as BasicHeading,
|
|
35
|
+
l as BlockView,
|
|
36
|
+
n as ContextMenu,
|
|
37
|
+
F as DeleteModal,
|
|
38
|
+
B as Disclaimer,
|
|
39
|
+
b as EmptyView,
|
|
40
|
+
e as Filter,
|
|
41
|
+
j as FormCheckBox,
|
|
42
|
+
J as FormDatePicker,
|
|
43
|
+
N as FormRadio,
|
|
44
|
+
U as FormSelect,
|
|
45
|
+
Z as FormSlider,
|
|
46
|
+
$ as FormText,
|
|
47
|
+
w as GenericTable,
|
|
46
48
|
k as HashTabView,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
I as HeaderFilter,
|
|
50
|
+
h as Iconify,
|
|
51
|
+
A as InfoGroup,
|
|
52
|
+
H as ListArea,
|
|
51
53
|
g as LoadingSpinner,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
P as
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
G as OverflowTooltip,
|
|
55
|
+
z as ScrollbarX,
|
|
56
|
+
E as ScrollbarY,
|
|
57
|
+
P as SearchBar,
|
|
58
|
+
X as VerticalDivider,
|
|
59
|
+
pr as capitalizeFirstLetters,
|
|
60
|
+
tr as useBreakpoints
|
|
58
61
|
};
|
|
@@ -12778,5 +12778,6 @@ export {
|
|
|
12778
12778
|
Y as g,
|
|
12779
12779
|
J1 as r,
|
|
12780
12780
|
X1 as s,
|
|
12781
|
+
$p as t,
|
|
12781
12782
|
ix as w
|
|
12782
12783
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter data type
|
|
3
|
+
* @param id - filter id (unique)
|
|
4
|
+
* @param title - filter title
|
|
5
|
+
* @param availableOptions - available options for the filter
|
|
6
|
+
*/
|
|
7
|
+
export type FilterData = {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
availableOptions: FilterOption[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Filter option data type
|
|
14
|
+
* @param id - option id (unique)
|
|
15
|
+
* @param text - option text
|
|
16
|
+
* @param icon - option icon, optional
|
|
17
|
+
*/
|
|
18
|
+
export type FilterOption = {
|
|
19
|
+
id: string;
|
|
20
|
+
text: string;
|
|
21
|
+
icon?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Filter selection data type
|
|
25
|
+
* @param id - filter id (unique)
|
|
26
|
+
* @param selectedOptions - selected options of the filter (multiple)
|
|
27
|
+
*/
|
|
28
|
+
export type FilterSelection = {
|
|
29
|
+
id: string;
|
|
30
|
+
selectedOptions: FilterOption[];
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState as p, useEffect as r } from "react";
|
|
2
|
+
const t = (s) => {
|
|
3
|
+
const [a, i] = p(!1);
|
|
4
|
+
return r(
|
|
5
|
+
() => {
|
|
6
|
+
const e = window.matchMedia(s);
|
|
7
|
+
i(e.matches);
|
|
8
|
+
const n = (o) => i(o.matches);
|
|
9
|
+
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
10
|
+
},
|
|
11
|
+
[]
|
|
12
|
+
// Empty array ensures effect is only run on mount and unmount
|
|
13
|
+
), a;
|
|
14
|
+
}, h = (s = 256) => {
|
|
15
|
+
const a = t("(max-width: 599px)"), i = t("(min-width: 600px) and (max-width: 719px)"), e = t("(min-width: 720px) and (max-width: 839px)"), n = t("(min-width: 840px) and (max-width: 1023px)"), o = t("(min-width: 1024px) and (max-width: 1439px)"), d = t("(min-width: 1440px)"), c = t(
|
|
16
|
+
`(min-width: ${840 + s}px) and (max-width: ${1023 + s}px)`
|
|
17
|
+
), x = t(
|
|
18
|
+
`(min-width: ${1024 + s}px) and (max-width: ${1439 + s}px)`
|
|
19
|
+
), m = t(`(min-width: ${1440 + s}px)`);
|
|
20
|
+
return {
|
|
21
|
+
isMobile: a,
|
|
22
|
+
isTablet: i || e,
|
|
23
|
+
isDesktop: n || o || d,
|
|
24
|
+
isDesktopNavbar: c || x || m
|
|
25
|
+
};
|
|
26
|
+
}, u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
27
|
+
__proto__: null,
|
|
28
|
+
useBreakpoints: h
|
|
29
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
30
|
+
export {
|
|
31
|
+
u as a,
|
|
32
|
+
h as u
|
|
33
|
+
};
|
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.7018",
|
|
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,18 +0,0 @@
|
|
|
1
|
-
import "./assets/BigLoadingSpinner.css";
|
|
2
|
-
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import { TypoBody as e } from "@element/react-components";
|
|
4
|
-
import { Iconify as n } from "./components/Iconify/Iconify.js";
|
|
5
|
-
const d = "_loadingBigOverlay_7dxo1_1", t = "_bigLoadSpinnerCard_7dxo1_12", g = "_bigLoadSpinnerCardText_7dxo1_27", s = "_logo_7dxo1_33", l = "_rotate360deg_7dxo1_1", o = {
|
|
6
|
-
loadingBigOverlay: d,
|
|
7
|
-
bigLoadSpinnerCard: t,
|
|
8
|
-
bigLoadSpinnerCardText: g,
|
|
9
|
-
logo: s,
|
|
10
|
-
rotate360deg: l
|
|
11
|
-
}, c = ({ text: i }) => /* @__PURE__ */ a("div", { className: o.bigLoadSpinnerCard, role: "progressbar", children: [
|
|
12
|
-
/* @__PURE__ */ r(n, { icon: "hortiview", className: o.logo, "data-testid": "logo-icon" }),
|
|
13
|
-
/* @__PURE__ */ r(e, { tag: "p", bold: !0, level: 1, className: o.bigLoadSpinnerCardText, children: i })
|
|
14
|
-
] }), b = (i) => /* @__PURE__ */ r("div", { className: o.loadingBigOverlay, children: /* @__PURE__ */ r(c, { ...i }) });
|
|
15
|
-
export {
|
|
16
|
-
b as B,
|
|
17
|
-
o as s
|
|
18
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import "./assets/ListAreaService.css";
|
|
2
|
-
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
3
|
-
import { TypoButton as N, Group as O, TypoSubtitle as k, TypoBody as $, Icon as L } from "@element/react-components";
|
|
4
|
-
import { Iconify as E } from "./components/Iconify/Iconify.js";
|
|
5
|
-
import { AvailableCustomIcons as j } from "./enums/AvailableCustomIcons.js";
|
|
6
|
-
const W = "_fullWidth_1l0gd_1", G = "_mainElevation_1l0gd_5", S = "_searchbar_1l0gd_11", w = "_roundedBottom_1l0gd_19", A = "_primaryText_1l0gd_24", P = "_noOverlineText_1l0gd_28", q = "_list_1l0gd_32", z = "_listItem_1l0gd_60", D = "_trailingIcon_1l0gd_64", F = "_groupedListItem_1l0gd_76", H = "_iconColor_1l0gd_80", J = "_overlineTitle_1l0gd_84", K = "_truncate_1l0gd_89", M = "_truncateOverlineText_1l0gd_98", i = {
|
|
7
|
-
fullWidth: W,
|
|
8
|
-
mainElevation: G,
|
|
9
|
-
searchbar: S,
|
|
10
|
-
roundedBottom: w,
|
|
11
|
-
primaryText: A,
|
|
12
|
-
noOverlineText: P,
|
|
13
|
-
list: q,
|
|
14
|
-
listItem: z,
|
|
15
|
-
trailingIcon: D,
|
|
16
|
-
groupedListItem: F,
|
|
17
|
-
iconColor: H,
|
|
18
|
-
overlineTitle: J,
|
|
19
|
-
truncate: K,
|
|
20
|
-
truncateOverlineText: M
|
|
21
|
-
}, tt = (e, l, c, a) => {
|
|
22
|
-
const o = e.reduce((n, s) => {
|
|
23
|
-
const { groupName: t, ...m } = s;
|
|
24
|
-
return !t || typeof t != "string" || (n[t] || (n[t] = {
|
|
25
|
-
groupName: /* @__PURE__ */ r(N, { children: t }),
|
|
26
|
-
id: t,
|
|
27
|
-
items: []
|
|
28
|
-
}), n[t].items = [
|
|
29
|
-
...n[t].items,
|
|
30
|
-
T(m, l, c, a)
|
|
31
|
-
]), n;
|
|
32
|
-
}, {});
|
|
33
|
-
return Object.values(o);
|
|
34
|
-
}, et = (e, l, c, a) => e.map((o) => T(o, l, c, a)), T = (e, l, c, a) => {
|
|
35
|
-
const {
|
|
36
|
-
id: o,
|
|
37
|
-
title: n,
|
|
38
|
-
subTitle: s,
|
|
39
|
-
route: t,
|
|
40
|
-
value: m,
|
|
41
|
-
noNavigation: g,
|
|
42
|
-
disabled: d,
|
|
43
|
-
icon: y,
|
|
44
|
-
iconType: u,
|
|
45
|
-
trailingIcon: I,
|
|
46
|
-
trailingIconType: x,
|
|
47
|
-
actionButton: f,
|
|
48
|
-
onClick: h,
|
|
49
|
-
customTitle: p,
|
|
50
|
-
listItemClassName: B,
|
|
51
|
-
overlineTitle: v
|
|
52
|
-
} = e, _ = l === t;
|
|
53
|
-
return {
|
|
54
|
-
id: o,
|
|
55
|
-
key: o,
|
|
56
|
-
select: _,
|
|
57
|
-
primaryText: o,
|
|
58
|
-
secondaryText: /* @__PURE__ */ C(O, { direction: "vertical", gap: "none", children: [
|
|
59
|
-
p ?? /* @__PURE__ */ r(
|
|
60
|
-
k,
|
|
61
|
-
{
|
|
62
|
-
level: 1,
|
|
63
|
-
bold: _,
|
|
64
|
-
className: `${i.truncate} lmnt-theme-on-surface-active`,
|
|
65
|
-
children: n
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
s && !p ? /* @__PURE__ */ r(
|
|
69
|
-
$,
|
|
70
|
-
{
|
|
71
|
-
level: 2,
|
|
72
|
-
themeColor: _ ? "primary" : void 0,
|
|
73
|
-
className: `${i.truncate} lmnt-theme-on-surface-inactive`,
|
|
74
|
-
children: s
|
|
75
|
-
}
|
|
76
|
-
) : void 0
|
|
77
|
-
] }),
|
|
78
|
-
overlineText: /* @__PURE__ */ r("span", { className: `${i.truncate} ${i.truncateOverlineText}`, children: v }),
|
|
79
|
-
trailingBlock: f ?? I ?? /* @__PURE__ */ r(L, { icon: "arrow_right", className: i.iconColor }),
|
|
80
|
-
leadingBlock: Q(y),
|
|
81
|
-
value: m,
|
|
82
|
-
componentProps: {
|
|
83
|
-
id: o,
|
|
84
|
-
key: o,
|
|
85
|
-
leadingBlockType: u ?? "icon",
|
|
86
|
-
trailingBlockType: x ?? "icon",
|
|
87
|
-
className: `${u === "avatar" ? "" : i.listItem} ${c} ${B ?? ""} ${v ? i.overlineTitle : i.noOverlineText}`,
|
|
88
|
-
onClick: (R, b) => h?.(b),
|
|
89
|
-
tag: d || g ? void 0 : a ?? "a",
|
|
90
|
-
to: d || g ? void 0 : t,
|
|
91
|
-
disabled: d
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
}, Q = (e) => typeof e == "string" && e in j ? /* @__PURE__ */ r(E, { icon: e }) : e;
|
|
95
|
-
export {
|
|
96
|
-
et as a,
|
|
97
|
-
tt as g,
|
|
98
|
-
T as m,
|
|
99
|
-
i as s
|
|
100
|
-
};
|
package/dist/assets/BaseView.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._divider_12ecr_1{margin:0 2rem}._truncate_12ecr_5{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55vw}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._pageHeader_fwns1_1{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;width:100%;margin-bottom:1rem;align-self:end}._headlineContainer_fwns1_11,._actionButtonContainer_fwns1_16{display:flex;align-items:center}._actionButtonContainer_fwns1_16>button{max-height:48px}._content_fwns1_25{display:flex;justify-content:space-between;gap:1.5rem}._leadingIcon_fwns1_31{margin-right:.8rem}._headingWrapper_fwns1_38{display:flex;align-items:center}._headingContainer_fwns1_43{display:flex;flex-direction:column}._invisible_fwns1_48{visibility:hidden}._withAvatar_fwns1_52{margin-left:.25rem;padding-right:1rem;margin-top:0rem}._withAvatar_fwns1_52>._iconContainer_fwns1_57{scale:1.1}._iconContainer_fwns1_57{padding-right:.5rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._fullWidth_1l0gd_1{width:100%}._mainElevation_1l0gd_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_1l0gd_11 div{border:none}._searchbar_1l0gd_11 button{margin-right:.5rem}._roundedBottom_1l0gd_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_1l0gd_24 [class*=mdc-list-item__primary-text]{display:none!important}._noOverlineText_1l0gd_28 [class*=mdc-list-item__content]{margin-top:-.625rem}._list_1l0gd_32{padding-top:0;padding-bottom:0;overflow-y:auto}._list_1l0gd_32 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_1l0gd_32::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 .25rem rgba(0,0,0,.2);border-radius:.5rem;margin-right:.25rem;background-color:var(--lmnt-theme-background)}._list_1l0gd_32::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_1l0gd_32::-webkit-scrollbar-thumb{border-radius:.5rem;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--lmnt-theme-primary-on-surface)}._listItem_1l0gd_60{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_1l0gd_60 i:not(._trailingIcon_1l0gd_64){color:var(--lmnt-theme-on-surface-inactive)}._listItem_1l0gd_60 i._trailingIcon_1l0gd_64{color:var(--lmnt-theme-on-surface-disabled)}._listItem_1l0gd_60 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_1l0gd_76{height:4.5rem!important}._iconColor_1l0gd_80{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_1l0gd_84 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._truncate_1l0gd_89{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%}._truncateOverlineText_1l0gd_98{margin-bottom:-1rem!important;margin-top:-1rem!important}
|