@hortiview/shared-components 0.0.7335 → 0.0.7373
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 +83 -1
- package/dist/assets/contextMenu.css +1 -1
- package/dist/assets/genericCard.css +1 -0
- package/dist/assets/genericTable.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +1 -1
- package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
- package/dist/components/BaseView/BaseView.js +1 -1
- package/dist/components/BaseView/BaseView.test.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +16 -15
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- 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 +4 -1
- package/dist/components/Filter/Filter.js +92 -87
- package/dist/components/Filter/Filter.test.js +44 -23
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- 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.test.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +7 -2
- package/dist/components/GenericTable/GenericTable.js +91 -66
- package/dist/components/GenericTable/GenericTable.test.js +59 -45
- package/dist/components/GenericTable/GenericTableService.d.ts +19 -0
- package/dist/components/GenericTable/GenericTableService.js +59 -0
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +19 -0
- package/dist/components/GenericTable/Mobile/GenericCard.js +68 -0
- package/dist/components/GenericTable/Mobile/GenericCard.test.d.ts +1 -0
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +76 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +22 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.js +20 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.test.d.ts +1 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +78 -0
- package/dist/components/HashTabView/HashTabView.js +1 -1
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +29 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/contextMenu.module-DNQ8d9Aj.js +8 -0
- package/dist/genericCard.module-DzqcufuN.js +12 -0
- package/dist/genericTable.module-CNV1Yt1K.js +16 -0
- package/dist/hooks/useBreakpoints.js +5 -0
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/index-DW4oU_OU.js +11708 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +60 -59
- package/dist/{react.esm-C3jDj5Fe.js → react.esm-Dy4VzU4L.js} +4 -1
- package/dist/types/Filter.d.ts +1 -0
- package/dist/types/GenericTable.d.ts +36 -0
- package/package.json +10 -10
- package/dist/assets/Filter.css +0 -22
- package/dist/contextMenu.module-B7aUMFPe.js +0 -7
- package/dist/genericTable.module-BkU2VDKR.js +0 -11
- package/dist/hooks/useBreakpoint.js +0 -5
- package/dist/index-BQnj-5Zt.js +0 -2963
- /package/dist/hooks/{useBreakpoint.d.ts → useBreakpoints.d.ts} +0 -0
- /package/dist/{useBreakpoint-BNeVhjjZ.js → useBreakpoints-BNeVhjjZ.js} +0 -0
package/dist/main.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { FormSelect } from './components/FormComponents/FormSelect/FormSelect';
|
|
|
26
26
|
export { FormSlider } from './components/FormComponents/FormSlider/FormSlider';
|
|
27
27
|
export { FormText } from './components/FormComponents/FormText/FormText';
|
|
28
28
|
export { AvailableCustomIcons } from './enums/AvailableCustomIcons';
|
|
29
|
-
export { useBreakpoints } from './hooks/
|
|
29
|
+
export { useBreakpoints } from './hooks/useBreakpoints';
|
|
30
30
|
export { capitalizeFirstLetters } from './services/UtilService';
|
|
31
31
|
export type { FormSelectOption } from './components/FormComponents/FormSelect/FormSelect';
|
|
32
32
|
export type { FormTextProps } from './components/FormComponents/FormText/FormText';
|
package/dist/main.js
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
1
|
+
import "./genericTable.module-CNV1Yt1K.js";
|
|
2
|
+
import { AlertBanner as t } from "./components/AlertBanner/AlertBanner.js";
|
|
3
|
+
import { BaseView as p } from "./components/BaseView/BaseView.js";
|
|
4
|
+
import { BasicHeading as x } from "./components/BasicHeading/BasicHeading.js";
|
|
5
|
+
import { BlockView as a } from "./components/BlockView/BlockView.js";
|
|
6
|
+
import { ContextMenu as c } from "./components/ContextMenu/ContextMenu.js";
|
|
7
|
+
import { DeleteModal as s } from "./components/DeleteModal/DeleteModal.js";
|
|
8
|
+
import { Disclaimer as d } from "./components/Disclaimer/Disclaimer.js";
|
|
9
|
+
import { EmptyView as S } from "./components/EmptyView/EmptyView.js";
|
|
10
|
+
import { Filter as u } from "./components/Filter/Filter.js";
|
|
11
|
+
import { GenericTable as V } from "./components/GenericTable/GenericTable.js";
|
|
12
|
+
import { HashTabView as D } from "./components/HashTabView/HashTabView.js";
|
|
13
|
+
import { HeaderFilter as T } from "./components/HeaderFilter/HeaderFilter.js";
|
|
14
|
+
import { I as v } from "./Iconify-CY9lZjFd.js";
|
|
15
|
+
import { InfoGroup as C } from "./components/InfoGroup/InfoGroup.js";
|
|
16
|
+
import { ListArea as L } from "./components/ListArea/ListArea.js";
|
|
17
|
+
import { LoadingSpinner as y } from "./components/LoadingSpinner/Default/LoadingSpinner.js";
|
|
18
|
+
import { OverflowTooltip as M } from "./components/OverflowTooltip/OverflowTooltip.js";
|
|
19
|
+
import { ScrollbarX as E, ScrollbarY as O } from "./components/Scrollbar/Scrollbar.js";
|
|
20
|
+
import { SearchBar as R } from "./components/SearchBar/SearchBar.js";
|
|
21
|
+
import { VerticalDivider as Y } from "./components/VerticalDivider/VerticalDivider.js";
|
|
22
|
+
import { FormCheckBox as q } from "./components/FormComponents/FormCheckBox/FormCheckBox.js";
|
|
23
|
+
import { FormDatePicker as K } from "./components/FormComponents/FormDatePicker/FormDatePicker.js";
|
|
24
|
+
import { FormRadio as Q } from "./components/FormComponents/FormRadio/FormRadio.js";
|
|
25
|
+
import { FormSelect as W } from "./components/FormComponents/FormSelect/FormSelect.js";
|
|
26
|
+
import { FormSlider as _ } from "./components/FormComponents/FormSlider/FormSlider.js";
|
|
27
|
+
import { FormText as rr } from "./components/FormComponents/FormText/FormText.js";
|
|
28
|
+
import { AvailableCustomIcons as er } from "./enums/AvailableCustomIcons.js";
|
|
29
|
+
import { u as mr } from "./useBreakpoints-BNeVhjjZ.js";
|
|
30
|
+
import { capitalizeFirstLetters as fr } from "./services/UtilService.js";
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
32
|
+
t as AlertBanner,
|
|
33
|
+
er as AvailableCustomIcons,
|
|
34
|
+
p as BaseView,
|
|
35
|
+
x as BasicHeading,
|
|
36
|
+
a as BlockView,
|
|
37
|
+
c as ContextMenu,
|
|
38
|
+
s as DeleteModal,
|
|
39
|
+
d as Disclaimer,
|
|
40
|
+
S as EmptyView,
|
|
41
|
+
u as Filter,
|
|
42
|
+
q as FormCheckBox,
|
|
43
|
+
K as FormDatePicker,
|
|
44
|
+
Q as FormRadio,
|
|
45
|
+
W as FormSelect,
|
|
46
|
+
_ as FormSlider,
|
|
47
|
+
rr as FormText,
|
|
48
|
+
V as GenericTable,
|
|
49
|
+
D as HashTabView,
|
|
50
|
+
T as HeaderFilter,
|
|
51
|
+
v as Iconify,
|
|
52
|
+
C as InfoGroup,
|
|
53
|
+
L as ListArea,
|
|
54
|
+
y as LoadingSpinner,
|
|
55
|
+
M as OverflowTooltip,
|
|
56
|
+
E as ScrollbarX,
|
|
57
|
+
O as ScrollbarY,
|
|
58
|
+
R as SearchBar,
|
|
59
|
+
Y as VerticalDivider,
|
|
60
|
+
fr as capitalizeFirstLetters,
|
|
61
|
+
mr as useBreakpoints
|
|
61
62
|
};
|
|
@@ -12774,8 +12774,11 @@ if ((typeof process > "u" || !process.env?.RTL_SKIP_AUTO_CLEANUP) && (typeof aft
|
|
|
12774
12774
|
export {
|
|
12775
12775
|
W1 as a,
|
|
12776
12776
|
Ut as b,
|
|
12777
|
+
Fp as c,
|
|
12778
|
+
Ui as d,
|
|
12779
|
+
Cd as e,
|
|
12777
12780
|
re as f,
|
|
12778
|
-
|
|
12781
|
+
Eq as l,
|
|
12779
12782
|
J1 as r,
|
|
12780
12783
|
X1 as s,
|
|
12781
12784
|
$p as t,
|
package/dist/types/Filter.d.ts
CHANGED
|
@@ -70,6 +70,14 @@ export type TableLayoutProps<T> = {
|
|
|
70
70
|
* table title to be displayed in the TableTopBar
|
|
71
71
|
*/
|
|
72
72
|
title?: string;
|
|
73
|
+
/**
|
|
74
|
+
* the column that will be used as the title of the card in the card view
|
|
75
|
+
*/
|
|
76
|
+
cardTitleColumn?: keyof T;
|
|
77
|
+
/**
|
|
78
|
+
* the column that will be used as the subtitle of the card in the card view
|
|
79
|
+
*/
|
|
80
|
+
cardSubTitleColumn?: keyof T;
|
|
73
81
|
};
|
|
74
82
|
/**
|
|
75
83
|
* Props for the CellTemplate component {@link CellTemplate}
|
|
@@ -107,3 +115,31 @@ export type CellTemplateProps<T> = {
|
|
|
107
115
|
export type CellTemplate<T> = {
|
|
108
116
|
[key in keyof T]?: (props: CellTemplateProps<T>) => JSX.Element;
|
|
109
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* GenericColumn type to be used in the GenericTable component {@link GenericTable}
|
|
120
|
+
* @template T the type of the data that will be displayed in the table aka the type of the row
|
|
121
|
+
* @example
|
|
122
|
+
* ```jsx
|
|
123
|
+
* {
|
|
124
|
+
* id: 'name',
|
|
125
|
+
* header: 'Name',
|
|
126
|
+
* accessor: 'name',
|
|
127
|
+
* cellTemplate: (props: CellTemplateProps<GenericElement>) => {
|
|
128
|
+
* const {name} = props.row.original;
|
|
129
|
+
* return <LabelBadge label={name} />
|
|
130
|
+
* },
|
|
131
|
+
* cellProps: { width: '10%' }
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export type GenericColumn<T> = {
|
|
136
|
+
id: keyof T;
|
|
137
|
+
header: string;
|
|
138
|
+
accessor: keyof T;
|
|
139
|
+
cellTemplate?: (props: CellTemplateProps<T>) => JSX.Element;
|
|
140
|
+
cellProps?: {
|
|
141
|
+
width?: number | string;
|
|
142
|
+
};
|
|
143
|
+
asCardTitle?: boolean;
|
|
144
|
+
asCardSubtitle?: boolean;
|
|
145
|
+
};
|
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.7373",
|
|
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>",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@chromatic-com/storybook": "1.5.0",
|
|
38
38
|
"@element/react-components": "^5.42.4",
|
|
39
39
|
"@element/themes": "^5.44.4",
|
|
40
|
-
"@storybook/addon-essentials": "^8.
|
|
41
|
-
"@storybook/addon-interactions": "^8.
|
|
42
|
-
"@storybook/addon-links": "^8.
|
|
43
|
-
"@storybook/addon-onboarding": "^8.
|
|
44
|
-
"@storybook/blocks": "^8.
|
|
45
|
-
"@storybook/react": "^8.
|
|
46
|
-
"@storybook/react-vite": "^8.
|
|
47
|
-
"@storybook/test": "^8.
|
|
40
|
+
"@storybook/addon-essentials": "^8.2.4",
|
|
41
|
+
"@storybook/addon-interactions": "^8.2.4",
|
|
42
|
+
"@storybook/addon-links": "^8.2.4",
|
|
43
|
+
"@storybook/addon-onboarding": "^8.2.4",
|
|
44
|
+
"@storybook/blocks": "^8.2.4",
|
|
45
|
+
"@storybook/react": "^8.2.4",
|
|
46
|
+
"@storybook/react-vite": "^8.2.4",
|
|
47
|
+
"@storybook/test": "^8.2.4",
|
|
48
48
|
"@testing-library/jest-dom": "^6.4.2",
|
|
49
49
|
"@testing-library/react": "^14.2.1",
|
|
50
50
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
69
|
"react-hook-form": "^7.51.2",
|
|
70
70
|
"react-tooltip": "^5.26.4",
|
|
71
|
-
"storybook": "^8.
|
|
71
|
+
"storybook": "^8.2.4",
|
|
72
72
|
"typescript": "^5.2.2",
|
|
73
73
|
"vite": "^5.1.6",
|
|
74
74
|
"vite-plugin-dts": "^3.7.3",
|