next-helios-fe 1.8.123 → 1.8.125
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/components/calendar/big-calendar/index.d.ts +14 -0
- package/dist/components/calendar/big-calendar/toolbar.d.ts +14 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/calendar/big-calendar/index.tsx +15 -0
- package/src/components/calendar/big-calendar/toolbar.tsx +73 -48
- package/src/components/table/index.tsx +3 -3
package/package.json
CHANGED
@@ -12,6 +12,20 @@ interface BigCalendarProps {
|
|
12
12
|
title?: string;
|
13
13
|
options?: {
|
14
14
|
showEventListFilter?: boolean;
|
15
|
+
toolbar?: {
|
16
|
+
month?: {
|
17
|
+
show?: boolean
|
18
|
+
},
|
19
|
+
week?: {
|
20
|
+
show?: boolean
|
21
|
+
},
|
22
|
+
day?: {
|
23
|
+
show?: boolean
|
24
|
+
},
|
25
|
+
list?: {
|
26
|
+
show?: boolean
|
27
|
+
},
|
28
|
+
}
|
15
29
|
};
|
16
30
|
eventList: {
|
17
31
|
id: number | string;
|
@@ -102,6 +116,7 @@ export const BigCalendar: React.FC<BigCalendarProps> = ({
|
|
102
116
|
return (
|
103
117
|
<Toolbar
|
104
118
|
toolbar={toolbar}
|
119
|
+
option={options?.toolbar}
|
105
120
|
active={active}
|
106
121
|
setActive={setActive}
|
107
122
|
/>
|
@@ -5,12 +5,27 @@ import dayjs from "dayjs";
|
|
5
5
|
|
6
6
|
interface ToolbarProps {
|
7
7
|
toolbar: any;
|
8
|
+
option?: {
|
9
|
+
month?: {
|
10
|
+
show?: boolean;
|
11
|
+
};
|
12
|
+
week?: {
|
13
|
+
show?: boolean;
|
14
|
+
};
|
15
|
+
day?: {
|
16
|
+
show?: boolean;
|
17
|
+
};
|
18
|
+
list?: {
|
19
|
+
show?: boolean;
|
20
|
+
};
|
21
|
+
};
|
8
22
|
active: string;
|
9
23
|
setActive: (active: string) => void;
|
10
24
|
}
|
11
25
|
|
12
26
|
export const Toolbar: React.FC<ToolbarProps> = ({
|
13
27
|
toolbar,
|
28
|
+
option,
|
14
29
|
active,
|
15
30
|
setActive,
|
16
31
|
}) => {
|
@@ -44,54 +59,64 @@ export const Toolbar: React.FC<ToolbarProps> = ({
|
|
44
59
|
</span>
|
45
60
|
</div>
|
46
61
|
<div className="flex">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
62
|
+
{option?.month?.show !== false && (
|
63
|
+
<button
|
64
|
+
type="button"
|
65
|
+
className={`px-4 py-1.5 rounded-l-md text-primary hover:bg-primary-light ${
|
66
|
+
active === "month" ? "bg-primary-light" : "bg-primary-transparent"
|
67
|
+
}`}
|
68
|
+
onClick={() => {
|
69
|
+
toolbar.onView("month");
|
70
|
+
setActive("month");
|
71
|
+
}}
|
72
|
+
>
|
73
|
+
Month
|
74
|
+
</button>
|
75
|
+
)}
|
76
|
+
{option?.week?.show !== false && (
|
77
|
+
<button
|
78
|
+
type="button"
|
79
|
+
className={`px-4 py-1.5 border-x border-primary/30 text-primary hover:bg-primary-light ${
|
80
|
+
active === "week" ? "bg-primary-light" : "bg-primary-transparent"
|
81
|
+
}`}
|
82
|
+
onClick={() => {
|
83
|
+
toolbar.onView("week");
|
84
|
+
setActive("week");
|
85
|
+
}}
|
86
|
+
>
|
87
|
+
Week
|
88
|
+
</button>
|
89
|
+
)}
|
90
|
+
{option?.day?.show !== false && (
|
91
|
+
<button
|
92
|
+
type="button"
|
93
|
+
className={`px-4 py-1.5 border-r border-primary/30 text-primary hover:bg-primary-light ${
|
94
|
+
active === "day" ? "bg-primary-light" : "bg-primary-transparent"
|
95
|
+
}`}
|
96
|
+
onClick={() => {
|
97
|
+
toolbar.onView("day");
|
98
|
+
setActive("day");
|
99
|
+
}}
|
100
|
+
>
|
101
|
+
Day
|
102
|
+
</button>
|
103
|
+
)}
|
104
|
+
{option?.list?.show !== false && (
|
105
|
+
<button
|
106
|
+
type="button"
|
107
|
+
className={`px-3 py-1.5 rounded-r-md text-primary hover:bg-primary-light ${
|
108
|
+
active === "agenda"
|
109
|
+
? "bg-primary-light"
|
110
|
+
: "bg-primary-transparent"
|
111
|
+
}`}
|
112
|
+
onClick={() => {
|
113
|
+
toolbar.onView("agenda");
|
114
|
+
setActive("agenda");
|
115
|
+
}}
|
116
|
+
>
|
117
|
+
List
|
118
|
+
</button>
|
119
|
+
)}
|
95
120
|
</div>
|
96
121
|
</div>
|
97
122
|
);
|
@@ -694,7 +694,7 @@ export const Table: TableComponentProps = ({
|
|
694
694
|
})}
|
695
695
|
{options?.toolbar?.addData?.show !== false && (
|
696
696
|
<Tooltip
|
697
|
-
content={options?.toolbar?.addData?.tooltip || "
|
697
|
+
content={options?.toolbar?.addData?.tooltip || "Add Data"}
|
698
698
|
>
|
699
699
|
<button
|
700
700
|
type="button"
|
@@ -715,7 +715,7 @@ export const Table: TableComponentProps = ({
|
|
715
715
|
trigger={
|
716
716
|
<Tooltip
|
717
717
|
content={
|
718
|
-
options?.toolbar?.filter?.tooltip || "
|
718
|
+
options?.toolbar?.filter?.tooltip || "Column Filter"
|
719
719
|
}
|
720
720
|
>
|
721
721
|
<button
|
@@ -771,7 +771,7 @@ export const Table: TableComponentProps = ({
|
|
771
771
|
{options?.toolbar?.export?.show !== false && (
|
772
772
|
<Button
|
773
773
|
type="button"
|
774
|
-
tooltip={options?.toolbar?.export?.tooltip || "
|
774
|
+
tooltip={options?.toolbar?.export?.tooltip || "Export Data"}
|
775
775
|
options={{ variant: "primary", width: "fit" }}
|
776
776
|
onClick={() => {
|
777
777
|
const exportData = filteredData?.map((item) => {
|