@hortiview/shared-components 0.0.11176 → 0.0.11528
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/README.md +41 -8
- package/dist/BigLoadingSpinner-D7H28pr5.js +16 -0
- package/dist/{GenericCard-B8x1DMa8.js → GenericCard-jlt8ZsHi.js} +18 -19
- package/dist/ListAreaService-YS_UUPh5.js +107 -0
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/Select.css +1 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
- package/dist/components/AlertBanner/AlertBanner.js +7 -8
- package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +24 -25
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
- package/dist/components/BasicHeading/BasicHeading.js +11 -12
- package/dist/components/BasicHeading/BasicHeading.test.js +3 -3
- package/dist/components/BlockView/BlockView.d.ts +1 -0
- package/dist/components/BlockView/BlockView.js +24 -25
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +6 -7
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
- package/dist/components/ContextMenu/ContextMenu.js +11 -12
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
- package/dist/components/DeleteModal/DeleteModal.js +30 -31
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +9 -10
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.d.ts +1 -0
- package/dist/components/EmptyView/EmptyView.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.d.ts +1 -0
- package/dist/components/Filter/Filter.js +62 -62
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +629 -630
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +11 -12
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
- package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +5 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1 -1
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +14 -15
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -0
- package/dist/components/GenericTable/GenericTable.js +23 -24
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
- package/dist/components/GenericTable/GenericTableService.js +41 -41
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.d.ts +6 -1
- package/dist/components/HashTabView/HashTabView.js +53 -53
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +12 -12
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +7 -8
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.d.ts +2 -2
- package/dist/components/Iconify/Iconify.js +4 -5
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
- package/dist/components/InfoGroup/InfoGroup.js +4 -5
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +2 -2
- package/dist/components/ListArea/ListArea.test.js +5 -5
- package/dist/components/ListArea/ListAreaService.d.ts +9 -8
- package/dist/components/ListArea/ListAreaService.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +5 -6
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Modal/Modal.js +5 -6
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +10 -11
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
- package/dist/components/Scrollbar/Scrollbar.js +5 -6
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +10 -11
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/Select.js +34 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +28 -0
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +1 -0
- package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
- package/dist/main.d.ts +2 -0
- package/dist/main.js +33 -31
- package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
- package/dist/react-tooltip.min-Czs4RGD1.js +1400 -0
- package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
- package/dist/services/BlockService.d.ts +1 -0
- package/dist/services/NumberService.d.ts +1 -0
- package/dist/services/UtilService.d.ts +1 -0
- package/dist/services/services.test.js +1 -1
- package/dist/types/GenericTable.d.ts +2 -2
- package/dist/types/HashTab.d.ts +0 -1
- package/dist/types/ListElement.d.ts +0 -1
- package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
- package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
- package/package.json +15 -15
- package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
- package/dist/ListAreaService-CRX4eEUJ.js +0 -108
- package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as s, s as r, f as d } from "../../../react.esm-
|
|
3
|
-
import { FormText as
|
|
4
|
-
import { v as a, d as u, t as
|
|
2
|
+
import { a as s, s as r, f as d } from "../../../react.esm-DNwojocF.js";
|
|
3
|
+
import { FormText as o } from "./FormText.js";
|
|
4
|
+
import { v as a, d as u, t as l, g as e } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
const m = a.fn();
|
|
6
6
|
a.mock("react-hook-form", () => ({
|
|
7
7
|
...a.importActual("react-hook-form"),
|
|
@@ -43,10 +43,10 @@ a.mock("react-hook-form", () => ({
|
|
|
43
43
|
})
|
|
44
44
|
}));
|
|
45
45
|
u("FormText Test", () => {
|
|
46
|
-
|
|
46
|
+
l("render FormText and return single line text field", () => {
|
|
47
47
|
s(
|
|
48
48
|
/* @__PURE__ */ n(
|
|
49
|
-
|
|
49
|
+
o,
|
|
50
50
|
{
|
|
51
51
|
rules: {
|
|
52
52
|
maxLength: {
|
|
@@ -61,10 +61,10 @@ u("FormText Test", () => {
|
|
|
61
61
|
);
|
|
62
62
|
const t = r.getByRole("textbox");
|
|
63
63
|
e(t).toBeInTheDocument(), e(t).toBeInstanceOf(HTMLInputElement), e(t).toHaveAttribute("maxlength", "100"), e(r.getByText("address.line2")).toBeInTheDocument();
|
|
64
|
-
}),
|
|
64
|
+
}), l("change value of single line text field", () => {
|
|
65
65
|
s(
|
|
66
66
|
/* @__PURE__ */ n(
|
|
67
|
-
|
|
67
|
+
o,
|
|
68
68
|
{
|
|
69
69
|
rules: {
|
|
70
70
|
maxLength: {
|
|
@@ -79,10 +79,10 @@ u("FormText Test", () => {
|
|
|
79
79
|
);
|
|
80
80
|
const t = r.getByRole("textbox");
|
|
81
81
|
e(t).toHaveValue("test"), d.change(t, { target: { value: "test-change" } }), e(m).toHaveBeenCalled();
|
|
82
|
-
}),
|
|
82
|
+
}), l("render FormText and return text area", () => {
|
|
83
83
|
s(
|
|
84
84
|
/* @__PURE__ */ n(
|
|
85
|
-
|
|
85
|
+
o,
|
|
86
86
|
{
|
|
87
87
|
rules: {
|
|
88
88
|
required: {
|
|
@@ -102,10 +102,10 @@ u("FormText Test", () => {
|
|
|
102
102
|
);
|
|
103
103
|
const t = r.getByRole("textbox");
|
|
104
104
|
e(t).toBeInTheDocument(), e(t).toBeInstanceOf(HTMLTextAreaElement), e(t).toHaveAttribute("maxlength", "200"), e(r.getByText("address.line1")).toBeInTheDocument(), e(r.getByText("required")).toBeInTheDocument();
|
|
105
|
-
}),
|
|
105
|
+
}), l("render FormText with maxLength indicator", () => {
|
|
106
106
|
s(
|
|
107
107
|
/* @__PURE__ */ n(
|
|
108
|
-
|
|
108
|
+
o,
|
|
109
109
|
{
|
|
110
110
|
rules: {
|
|
111
111
|
maxLength: {
|
|
@@ -119,10 +119,10 @@ u("FormText Test", () => {
|
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
), e(r.getByText("address.line1")).toBeInTheDocument(), e(r.queryByText("required")).not.toBeInTheDocument(), e(r.getByText("0/200")).toBeInTheDocument();
|
|
122
|
-
}),
|
|
122
|
+
}), l("change value of text area", () => {
|
|
123
123
|
s(
|
|
124
124
|
/* @__PURE__ */ n(
|
|
125
|
-
|
|
125
|
+
o,
|
|
126
126
|
{
|
|
127
127
|
rules: {
|
|
128
128
|
required: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { SwitchProps } from '@element/react-components';
|
|
1
|
+
import { SwitchProps } from '@element-public/react-components';
|
|
2
2
|
import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
|
|
3
4
|
type FormToggleProps<T extends FieldValues> = {
|
|
4
5
|
/** The name of the property that this toggle represents. */
|
|
5
6
|
propertyName: Path<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import { Group as l, Switch as p, TypoCaption as d } from "@element/react-components";
|
|
2
|
+
import { Group as l, Switch as p, TypoCaption as d } from "@element-public/react-components";
|
|
3
3
|
import { useFormContext as u, Controller as C } from "react-hook-form";
|
|
4
4
|
const v = ({
|
|
5
5
|
propertyName: t,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a as n, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as n, s as t, f as m } from "../../../react.esm-DNwojocF.js";
|
|
3
3
|
import { FormToggle as l } from "./FormToggle.js";
|
|
4
|
-
import { v as e, d as f, t as c, g as r } from "../../../vi.CjhMlMwf-
|
|
4
|
+
import { v as e, d as f, t as c, g as r } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
const a = e.fn();
|
|
6
6
|
e.mock("react-hook-form", () => ({
|
|
7
7
|
...e.importActual("react-hook-form"),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React,
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
import { NumericFormatProps } from 'react-number-format';
|
|
3
3
|
import { LANGUAGE_COUNTRY_CODES } from '../../types/Languages';
|
|
4
|
+
|
|
4
5
|
export type FormattedNumberDisplayProps = {
|
|
5
6
|
/**
|
|
6
7
|
* the number to format
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { N as i } from "../../react-number-format.es-
|
|
2
|
+
import { N as i } from "../../react-number-format.es-BK1EpVXq.js";
|
|
3
3
|
import { useDecimalSeparator as d, useThousandSeparator as n } from "../../services/NumberService.js";
|
|
4
4
|
const y = ({
|
|
5
5
|
typographyComponent: a,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "../../assets/GenericTable.css";
|
|
2
1
|
import { jsx as e, jsxs as B } from "react/jsx-runtime";
|
|
3
|
-
import { Elevation as N, Table as D, Group as
|
|
2
|
+
import { Elevation as N, Table as D, Group as i, TypoSubtitle as G, TableTopBar as u, Padding as W, TypoDisplay as $ } from "@element-public/react-components";
|
|
4
3
|
import { Fragment as k } from "react";
|
|
5
|
-
|
|
4
|
+
import '../../assets/main.css';import '../../assets/GenericTable.css';/* empty css */
|
|
6
5
|
import { u as C } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
7
6
|
import "../../isEmpty-BimaZd5G.js";
|
|
8
|
-
import "../../react-tooltip.min-
|
|
7
|
+
import "../../react-tooltip.min-Czs4RGD1.js";
|
|
9
8
|
import "../../orderBy-BVQIswlJ.js";
|
|
10
9
|
import "lodash";
|
|
11
10
|
import "react-hook-form";
|
|
@@ -20,11 +19,11 @@ const E = "_topBar_1msoo_1", F = "_filterBar_1msoo_5", I = "_emptyTable_1msoo_9"
|
|
|
20
19
|
emptyTable: I,
|
|
21
20
|
elevation: L,
|
|
22
21
|
table: M
|
|
23
|
-
},
|
|
24
|
-
data:
|
|
22
|
+
}, R = ({
|
|
23
|
+
data: n = [],
|
|
25
24
|
hiddenColumns: s = [],
|
|
26
|
-
order:
|
|
27
|
-
cellTemplates:
|
|
25
|
+
order: b = [],
|
|
26
|
+
cellTemplates: f = void 0,
|
|
28
27
|
tableActions: r = [],
|
|
29
28
|
noContentText: m = "No data available",
|
|
30
29
|
headerTranslation: _ = (o) => o,
|
|
@@ -35,17 +34,17 @@ const E = "_topBar_1msoo_1", F = "_filterBar_1msoo_5", I = "_emptyTable_1msoo_9"
|
|
|
35
34
|
cardTitleColumn: h,
|
|
36
35
|
cardSubTitleColumn: v
|
|
37
36
|
}) => {
|
|
38
|
-
const { isDesktop: o } = C(),
|
|
39
|
-
data:
|
|
40
|
-
order:
|
|
41
|
-
cellTemplates:
|
|
37
|
+
const { isDesktop: o } = C(), l = j({
|
|
38
|
+
data: n,
|
|
39
|
+
order: b,
|
|
40
|
+
cellTemplates: f,
|
|
42
41
|
headerTranslation: _,
|
|
43
42
|
getRowActions: c,
|
|
44
43
|
customColumnWidth: y,
|
|
45
44
|
cardTitleColumn: h,
|
|
46
45
|
cardSubTitleColumn: v
|
|
47
|
-
}),
|
|
48
|
-
data:
|
|
46
|
+
}), p = x({
|
|
47
|
+
data: n,
|
|
49
48
|
getRowActions: c
|
|
50
49
|
});
|
|
51
50
|
return o ? /* @__PURE__ */ e(N, { elevation: 1, className: t.elevation, "data-testid": "generic-table-elevation", children: /* @__PURE__ */ e(
|
|
@@ -57,22 +56,22 @@ const E = "_topBar_1msoo_1", F = "_filterBar_1msoo_5", I = "_emptyTable_1msoo_9"
|
|
|
57
56
|
alwaysUseDivTags: !0,
|
|
58
57
|
layout: "standard",
|
|
59
58
|
hiddenColumns: s,
|
|
60
|
-
data:
|
|
61
|
-
columns:
|
|
59
|
+
data: p,
|
|
60
|
+
columns: l,
|
|
62
61
|
leadingContent: a && r?.length === 0 ? /* @__PURE__ */ e(u, { title: a }) : r?.length > 0 && /* @__PURE__ */ e(
|
|
63
62
|
u,
|
|
64
63
|
{
|
|
65
64
|
className: t.topBar,
|
|
66
|
-
filterBar: /* @__PURE__ */ B(
|
|
65
|
+
filterBar: /* @__PURE__ */ B(i, { fullWidth: !0, direction: "vertical", gap: "none", children: [
|
|
67
66
|
a && /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e($, { level: 6, children: a }) }),
|
|
68
67
|
/* @__PURE__ */ e(
|
|
69
|
-
|
|
68
|
+
i,
|
|
70
69
|
{
|
|
71
70
|
className: t.filterBar,
|
|
72
71
|
fullWidth: !0,
|
|
73
72
|
primaryAlign: "end",
|
|
74
73
|
secondaryAlign: "center",
|
|
75
|
-
children: r.map((
|
|
74
|
+
children: r.map((d, T) => /* @__PURE__ */ e(k, { children: d }, `action_${T}_${d.key}`))
|
|
76
75
|
}
|
|
77
76
|
)
|
|
78
77
|
] })
|
|
@@ -80,9 +79,9 @@ const E = "_topBar_1msoo_1", F = "_filterBar_1msoo_5", I = "_emptyTable_1msoo_9"
|
|
|
80
79
|
),
|
|
81
80
|
paginated: g,
|
|
82
81
|
sortable: !0,
|
|
83
|
-
noContentIncludeTable: !!
|
|
82
|
+
noContentIncludeTable: !!l,
|
|
84
83
|
noContentMessage: /* @__PURE__ */ e(
|
|
85
|
-
|
|
84
|
+
i,
|
|
86
85
|
{
|
|
87
86
|
fullWidth: !0,
|
|
88
87
|
primaryAlign: "center",
|
|
@@ -95,13 +94,13 @@ const E = "_topBar_1msoo_1", F = "_filterBar_1msoo_5", I = "_emptyTable_1msoo_9"
|
|
|
95
94
|
) }) : /* @__PURE__ */ e("div", { "data-testid": `generic-card-list${a ? "-" + a : ""}`, children: /* @__PURE__ */ e(
|
|
96
95
|
A,
|
|
97
96
|
{
|
|
98
|
-
data:
|
|
99
|
-
columns:
|
|
97
|
+
data: p,
|
|
98
|
+
columns: l,
|
|
100
99
|
hiddenColumns: s,
|
|
101
100
|
noContentText: m
|
|
102
101
|
}
|
|
103
102
|
) });
|
|
104
103
|
};
|
|
105
104
|
export {
|
|
106
|
-
|
|
105
|
+
R as GenericTable
|
|
107
106
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a, jsxs as B } from "react/jsx-runtime";
|
|
2
|
-
import { a as o, s as e } from "../../react.esm-
|
|
2
|
+
import { a as o, s as e } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { a as m } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
4
|
import { GenericTable as s } from "./GenericTable.js";
|
|
5
|
-
import { d as h, v as r, t as i, g as t } from "../../vi.CjhMlMwf-
|
|
5
|
+
import { d as h, v as r, t as i, g as t } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
6
6
|
h("GenericTable Test", () => {
|
|
7
7
|
r.spyOn(m, "useBreakpoints").mockReturnValue({
|
|
8
8
|
isDesktop: !0,
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as a } from "react";
|
|
3
3
|
import { ContextMenu as x } from "../ContextMenu/ContextMenu.js";
|
|
4
|
-
const
|
|
5
|
-
data:
|
|
6
|
-
order:
|
|
7
|
-
cellTemplates:
|
|
8
|
-
headerTranslation: t = (
|
|
9
|
-
getRowActions:
|
|
10
|
-
customColumnWidth:
|
|
11
|
-
cardTitleColumn:
|
|
12
|
-
cardSubTitleColumn:
|
|
13
|
-
}) =>
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
const
|
|
4
|
+
const j = ({
|
|
5
|
+
data: r = [],
|
|
6
|
+
order: n = [],
|
|
7
|
+
cellTemplates: e = void 0,
|
|
8
|
+
headerTranslation: t = (c) => c,
|
|
9
|
+
getRowActions: f = void 0,
|
|
10
|
+
customColumnWidth: o,
|
|
11
|
+
cardTitleColumn: u,
|
|
12
|
+
cardSubTitleColumn: s
|
|
13
|
+
}) => a(() => {
|
|
14
|
+
if (r?.length === 0) return [];
|
|
15
|
+
const c = v(r[0], n).map((i) => {
|
|
16
|
+
const p = o ? o[i] : void 0;
|
|
17
17
|
return {
|
|
18
18
|
id: i,
|
|
19
19
|
header: t(i),
|
|
20
20
|
accessor: i,
|
|
21
|
-
cellTemplate:
|
|
22
|
-
cellProps:
|
|
23
|
-
asCardTitle: i ===
|
|
24
|
-
asCardSubtitle: i ===
|
|
21
|
+
cellTemplate: e ? e[i] : void 0,
|
|
22
|
+
cellProps: p ? { width: p } : void 0,
|
|
23
|
+
asCardTitle: i === u,
|
|
24
|
+
asCardSubtitle: i === s
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
|
-
return
|
|
28
|
-
...
|
|
27
|
+
return f ? [
|
|
28
|
+
...c,
|
|
29
29
|
{ id: "actions", header: "", accessor: "actions" }
|
|
30
|
-
] :
|
|
30
|
+
] : c;
|
|
31
31
|
}, [
|
|
32
|
-
n,
|
|
33
32
|
r,
|
|
34
33
|
e,
|
|
34
|
+
n,
|
|
35
35
|
t,
|
|
36
|
-
o,
|
|
37
|
-
s,
|
|
38
36
|
f,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
o,
|
|
38
|
+
u,
|
|
39
|
+
s
|
|
40
|
+
]), l = ({
|
|
41
|
+
data: r = [],
|
|
42
|
+
getRowActions: n = void 0
|
|
43
|
+
}) => a(() => n ? r.map((e) => {
|
|
44
|
+
const t = /* @__PURE__ */ d(x, { actions: n(e), iconOrientation: "horizontal" });
|
|
45
|
+
return { ...e, actions: t };
|
|
46
|
+
}) : r, [r, n]), v = (r, n) => {
|
|
47
|
+
if (!r) return [];
|
|
48
|
+
let e = Object.keys(r).map((t) => t);
|
|
49
|
+
return n?.length > 0 && (e = e.sort((t, f) => {
|
|
50
|
+
const o = n.findIndex((s) => s === t), u = n.findIndex((s) => s === f);
|
|
51
|
+
return o === -1 ? 1 : u === -1 ? -1 : o - u;
|
|
52
|
+
})), e;
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
j as useGenerateColumns,
|
|
56
|
+
l as useGenerateTableData
|
|
57
57
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "@element/react-components";
|
|
2
|
+
import "@element-public/react-components";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../OverflowTooltip/OverflowTooltip.js";
|
|
5
|
-
import { G as e } from "../../../GenericCard-
|
|
5
|
+
import { G as e } from "../../../GenericCard-jlt8ZsHi.js";
|
|
6
6
|
export {
|
|
7
7
|
e as GenericCard
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as c, s as o } from "../../../react.esm-
|
|
3
|
-
import { G as i } from "../../../GenericCard-
|
|
4
|
-
import { d as m, t as s, g as e } from "../../../vi.CjhMlMwf-
|
|
2
|
+
import { a as c, s as o } from "../../../react.esm-DNwojocF.js";
|
|
3
|
+
import { G as i } from "../../../GenericCard-jlt8ZsHi.js";
|
|
4
|
+
import { d as m, t as s, g as e } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
m("GenericCard", () => {
|
|
6
6
|
const d = {
|
|
7
7
|
id: 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { GenericColumn, TableLayoutProps } from '../../../types/GenericTable';
|
|
2
|
+
|
|
3
3
|
type GenericCardListProps<T> = Pick<TableLayoutProps<T>, 'hiddenColumns' | 'noContentText' | 'data'> & {
|
|
4
4
|
/**
|
|
5
5
|
* The columns to be displayed in the card.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Padding as c, TypoCaption as s, Group as o } from "@element/react-components";
|
|
3
|
-
import { s as t, G as m } from "../../../GenericCard-
|
|
2
|
+
import { Padding as c, TypoCaption as s, Group as o } from "@element-public/react-components";
|
|
3
|
+
import { s as t, G as m } from "../../../GenericCard-jlt8ZsHi.js";
|
|
4
4
|
const u = ({
|
|
5
5
|
columns: n,
|
|
6
6
|
data: e,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { a as r, s as n, w as l } from "../../../react.esm-
|
|
2
|
+
import { a as r, s as n, w as l } from "../../../react.esm-DNwojocF.js";
|
|
3
3
|
import { GenericCardList as s } from "./GenericCardList.js";
|
|
4
|
-
import { d as g, t as i, g as e } from "../../../vi.CjhMlMwf-
|
|
4
|
+
import { d as g, t as i, g as e } from "../../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
g("GenericCardList", () => {
|
|
6
6
|
const d = [
|
|
7
7
|
{ id: "name", header: "Name", accessor: "name", asCardTitle: !0 },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { HashTab } from '../../types/HashTab';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* `HashTabView` is a layout component that displays a tab bar with a content area.
|
|
5
6
|
* It can be used with a hash in the url to navigate to the tab.
|
|
@@ -46,6 +47,10 @@ type HashTabViewProps = {
|
|
|
46
47
|
* important note: currently only works for the edit module form
|
|
47
48
|
*/
|
|
48
49
|
hasStickyTabs?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* pass custom styles for tabs header
|
|
52
|
+
*/
|
|
53
|
+
classNameHeader?: string;
|
|
49
54
|
};
|
|
50
|
-
export declare const HashTabView: ({ tabs, hasHash, hash, clusterAlign, hasClusteredTabs, children, verticalGap, elevation, backgroundColor, onChange, hasStickyTabs, }: PropsWithChildren<HashTabViewProps>) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const HashTabView: ({ tabs, hasHash, hash, clusterAlign, hasClusteredTabs, children, verticalGap, elevation, backgroundColor, onChange, hasStickyTabs, classNameHeader, }: PropsWithChildren<HashTabViewProps>) => import("react/jsx-runtime").JSX.Element;
|
|
51
56
|
export {};
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
tabWrapper: x,
|
|
1
|
+
import { jsx as a, jsxs as _, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { Elevation as $, Group as c, TabBar as k, Tab as P, Padding as T } from "@element-public/react-components";
|
|
3
|
+
import { useState as y, useEffect as A } from "react";
|
|
4
|
+
import { u as I } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
5
|
+
import '../../assets/HashTabView.css';const N = "_elevation_xbjx4_1", R = "_themeBackground_xbjx4_6", W = "_tabBar_xbjx4_10", w = "_tabWrapper_xbjx4_20", H = "_stickyHeader_xbjx4_24", E = "_tabButton_xbjx4_30", z = "_childContainer_xbjx4_34", D = "_childContainerPhone_xbjx4_38", F = "_iconColorRed_xbjx4_42", G = "_miniPadding_xbjx4_47", t = {
|
|
6
|
+
elevation: N,
|
|
7
|
+
themeBackground: R,
|
|
8
|
+
tabBar: W,
|
|
9
|
+
tabWrapper: w,
|
|
11
10
|
stickyHeader: H,
|
|
12
|
-
tabButton:
|
|
13
|
-
childContainer:
|
|
14
|
-
childContainerPhone:
|
|
15
|
-
iconColorRed:
|
|
16
|
-
miniPadding:
|
|
17
|
-
},
|
|
11
|
+
tabButton: E,
|
|
12
|
+
childContainer: z,
|
|
13
|
+
childContainerPhone: D,
|
|
14
|
+
iconColorRed: F,
|
|
15
|
+
miniPadding: G
|
|
16
|
+
}, p = (n, i) => !i || !n ? 0 : n.findIndex((o) => o.hash === i.replace("#", "")) ?? 0, K = ({
|
|
18
17
|
tabs: n,
|
|
19
|
-
hasHash:
|
|
20
|
-
hash:
|
|
18
|
+
hasHash: i = !0,
|
|
19
|
+
hash: o = "",
|
|
21
20
|
clusterAlign: u = "start",
|
|
22
|
-
hasClusteredTabs:
|
|
23
|
-
children:
|
|
24
|
-
verticalGap:
|
|
25
|
-
elevation:
|
|
26
|
-
backgroundColor:
|
|
27
|
-
onChange:
|
|
28
|
-
hasStickyTabs: m = !1
|
|
21
|
+
hasClusteredTabs: b,
|
|
22
|
+
children: l,
|
|
23
|
+
verticalGap: x = "none",
|
|
24
|
+
elevation: g = 0,
|
|
25
|
+
backgroundColor: v = "themeBackground",
|
|
26
|
+
onChange: f,
|
|
27
|
+
hasStickyTabs: m = !1,
|
|
28
|
+
classNameHeader: B = ""
|
|
29
29
|
}) => {
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
if (!
|
|
33
|
-
const e =
|
|
34
|
-
|
|
35
|
-
}, [n,
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
30
|
+
const [d, h] = y(p(n, o)), { isDesktop: s } = I();
|
|
31
|
+
A(() => {
|
|
32
|
+
if (!i || !o) return;
|
|
33
|
+
const e = p(n, o);
|
|
34
|
+
h(e);
|
|
35
|
+
}, [n, o, i]);
|
|
36
|
+
const j = (e) => {
|
|
37
|
+
const r = n[e].hash;
|
|
38
|
+
r != null && i && window.history.replaceState(null, "", `#${r}`), h(e), f?.(e);
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
|
|
40
|
+
return /* @__PURE__ */ a(
|
|
41
|
+
$,
|
|
42
42
|
{
|
|
43
|
-
elevation:
|
|
44
|
-
className: `${t.elevation} ${
|
|
43
|
+
elevation: g,
|
|
44
|
+
className: `${t.elevation} ${v === "none" ? "" : t.themeBackground}`,
|
|
45
45
|
children: /* @__PURE__ */ _(
|
|
46
46
|
c,
|
|
47
47
|
{
|
|
48
48
|
"data-testid": "hash-tab-container",
|
|
49
49
|
direction: "vertical",
|
|
50
|
-
gap:
|
|
50
|
+
gap: x,
|
|
51
51
|
secondaryAlign: "stretch",
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ _(
|
|
54
54
|
c,
|
|
55
55
|
{
|
|
56
56
|
direction: s ? "horizontal" : "vertical",
|
|
57
|
-
className: `${t.tabWrapper} ${m ? t.stickyHeader : ""}`,
|
|
57
|
+
className: `${t.tabWrapper} ${m ? t.stickyHeader : ""} ${B}`,
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
59
|
+
/* @__PURE__ */ a(
|
|
60
|
+
k,
|
|
61
61
|
{
|
|
62
62
|
"data-testid": "tab-bar",
|
|
63
63
|
className: t.tabBar,
|
|
64
|
-
clustered: s ?
|
|
64
|
+
clustered: s ? b : !1,
|
|
65
65
|
clusterAlign: u,
|
|
66
66
|
variant: "surface",
|
|
67
|
-
activeTabIndex:
|
|
68
|
-
onTabActivated:
|
|
69
|
-
children: n.map((e,
|
|
67
|
+
activeTabIndex: d,
|
|
68
|
+
onTabActivated: j,
|
|
69
|
+
children: n.map((e, r) => /* @__PURE__ */ a(
|
|
70
70
|
P,
|
|
71
71
|
{
|
|
72
72
|
"data-testid": `tab-${e.title}`,
|
|
73
73
|
icon: e.leadingIcon,
|
|
74
|
-
className: `${
|
|
75
|
-
active:
|
|
74
|
+
className: `${l ? t.tabButton : ""} ${e.isIconRed ? t.iconColorRed : ""}`,
|
|
75
|
+
active: d === r,
|
|
76
76
|
children: /* @__PURE__ */ _(c, { gap: "dense", children: [
|
|
77
77
|
e.title,
|
|
78
78
|
e.trailingIcon
|
|
79
79
|
] })
|
|
80
80
|
},
|
|
81
|
-
`${
|
|
81
|
+
`${r}_${e.hash}`
|
|
82
82
|
))
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
|
|
85
|
+
l ? /* @__PURE__ */ a(
|
|
86
86
|
T,
|
|
87
87
|
{
|
|
88
88
|
variant: "dense",
|
|
89
89
|
className: s ? t.childContainer : t.childContainerPhone,
|
|
90
|
-
children: /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ a(c, { gap: "dense", primaryAlign: "center", secondaryAlign: "center", children: l })
|
|
91
91
|
}
|
|
92
|
-
) : /* @__PURE__ */
|
|
92
|
+
) : /* @__PURE__ */ a(C, {})
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
m ? /* @__PURE__ */
|
|
96
|
+
m ? /* @__PURE__ */ a(c, { fullWidth: !0, direction: "vertical", className: t.miniPadding, children: n[d]?.component }) : n[d]?.component
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
99
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, Fragment as o } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as e, f as r } from "../../react.esm-
|
|
2
|
+
import { a, s as e, f as r } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { HashTabView as c } from "./HashTabView.js";
|
|
4
|
-
import { d as h, t as l, g as t } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as h, t as l, g as t } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
const m = [
|
|
6
6
|
{
|
|
7
7
|
title: "Map",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SelectProps } from '@element/react-components';
|
|
1
|
+
import { SelectProps } from '@element-public/react-components';
|
|
2
|
+
|
|
2
3
|
type HeaderFilterProps = {
|
|
3
4
|
/**
|
|
4
5
|
* heading of the filter
|
|
@@ -19,7 +20,7 @@ type HeaderFilterProps = {
|
|
|
19
20
|
/**
|
|
20
21
|
* options for the filter
|
|
21
22
|
*/
|
|
22
|
-
filterOptions: SelectProps[];
|
|
23
|
+
filterOptions: SelectProps['options'];
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
26
|
* Provides a HeaderFilter component with a single filtervalue select
|