@monolith-forensics/monolith-ui 1.8.1-dev.4 → 1.9.0
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/Button/Button.js +58 -9
- package/dist/Calendar/Calendar.d.ts +2 -7
- package/dist/Calendar/Calendar.js +49 -226
- package/dist/Calendar/CalendarStyles.d.ts +2 -6
- package/dist/Calendar/CalendarStyles.js +33 -153
- package/dist/Calendar/calendarHelpers.d.ts +2 -6
- package/dist/Calendar/calendarHelpers.js +5 -13
- package/dist/CheckBox/CheckBox.js +19 -36
- package/dist/DateInput/DateInput.js +143 -198
- package/dist/DropDownMenu/DropDownMenu.js +15 -25
- package/dist/DropDownMenu/components/MenuComponent.js +2 -8
- package/dist/DropDownMenu/components/MenuItem.d.ts +0 -2
- package/dist/DropDownMenu/components/MenuItem.js +21 -25
- package/dist/DropDownMenu/components/MenuItemList.d.ts +0 -3
- package/dist/DropDownMenu/components/MenuItemList.js +86 -192
- package/dist/DropDownMenu/components/StyledContent.js +2 -1
- package/dist/DropDownMenu/components/StyledFloatContainer.js +1 -1
- package/dist/DropDownMenu/types.d.ts +0 -3
- package/dist/FieldLabel/FieldLabel.js +12 -4
- package/dist/FileInputField/FileInputField.js +23 -4
- package/dist/FileViewer/viewers/ImageViewer.js +18 -75
- package/dist/FormSection/FormSection.js +25 -5
- package/dist/IconButton/IconButton.js +16 -2
- package/dist/Input/Input.js +56 -7
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +0 -1
- package/dist/Pill/Pill.js +79 -8
- package/dist/Popover/Popover.context.d.ts +1 -2
- package/dist/Popover/Popover.js +2 -5
- package/dist/Popover/Popover.styles.d.ts +6 -1
- package/dist/Popover/Popover.styles.js +28 -11
- package/dist/Popover/Popover.transitions.d.ts +2 -4
- package/dist/Popover/Popover.transitions.js +49 -23
- package/dist/Popover/PopoverDropdown.js +8 -6
- package/dist/Popover/PopoverTarget.js +3 -6
- package/dist/QueryFilter/DefaultOperators.d.ts +76 -0
- package/dist/QueryFilter/DefaultOperators.js +21 -0
- package/dist/QueryFilter/QueryFilter.d.ts +1 -1
- package/dist/QueryFilter/QueryFilter.js +303 -3
- package/dist/QueryFilter/index.d.ts +2 -3
- package/dist/QueryFilter/index.js +2 -3
- package/dist/QueryFilter/{QueryFilter.types.d.ts → types.d.ts} +2 -11
- package/dist/QueryFilter/useQueryFilter.d.ts +1 -1
- package/dist/QueryFilter/useQueryFilter.js +19 -23
- package/dist/RichTextEditor/Extensions/getTiptapExtensions.js +15 -5
- package/dist/RichTextEditor/Plugins/UploadImagesPlugin.d.ts +0 -15
- package/dist/RichTextEditor/Plugins/UploadImagesPlugin.js +51 -115
- package/dist/RichTextEditor/Plugins/index.d.ts +0 -1
- package/dist/RichTextEditor/Plugins/index.js +0 -1
- package/dist/RichTextEditor/RichTextEditor.d.ts +2 -3
- package/dist/RichTextEditor/RichTextEditor.js +35 -309
- package/dist/RichTextEditor/Toolbar/Toolbar.js +2 -14
- package/dist/SegmentedControl/SegmentedControl.utils.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControl.utils.js +30 -3
- package/dist/SelectBox/SelectBox.js +5 -5
- package/dist/SelectBox/select-box.styled-components.d.ts +1 -4
- package/dist/SelectBox/select-box.styled-components.js +48 -11
- package/dist/SelectBox/types.d.ts +0 -1
- package/dist/Switch/Switch.d.ts +2 -2
- package/dist/Switch/Switch.js +83 -18
- package/dist/Table/ColumnResizer.d.ts +9 -6
- package/dist/Table/ColumnResizer.js +10 -30
- package/dist/Table/StateStorage.d.ts +0 -4
- package/dist/Table/StateStorage.js +0 -13
- package/dist/Table/Table.js +12 -160
- package/dist/Table/TableComponents.d.ts +0 -10
- package/dist/Table/TableComponents.js +10 -71
- package/dist/Table/TableDefaults.d.ts +0 -7
- package/dist/Table/TableDefaults.js +0 -7
- package/dist/Table/TableHeader.js +16 -31
- package/dist/Table/TableMenu/TableMenu.js +1 -1
- package/dist/Table/TableProvider.js +75 -354
- package/dist/Table/TableRow.js +16 -28
- package/dist/Table/Utils/index.d.ts +1 -0
- package/dist/Table/Utils/index.js +1 -0
- package/dist/Table/Utils/resizeHandler.d.ts +3 -0
- package/dist/Table/Utils/resizeHandler.js +84 -0
- package/dist/Table/types.d.ts +19 -70
- package/dist/Tabs/Tab.js +0 -8
- package/dist/TagBox/TagBox.d.ts +1 -1
- package/dist/TagBox/TagBox.js +208 -50
- package/dist/TagBox/types.d.ts +13 -1
- package/dist/TextArea/TextArea.js +23 -9
- package/dist/TextInput/TextInput.js +6 -12
- package/dist/Utilities/parseTimestamp.js +6 -11
- package/dist/core/ArrowButton.d.ts +0 -2
- package/dist/core/ArrowButton.js +3 -7
- package/dist/core/ClearButton.d.ts +0 -2
- package/dist/core/ClearButton.js +3 -7
- package/dist/core/controlSizes.d.ts +0 -26
- package/dist/core/controlSizes.js +0 -156
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -2
- package/dist/theme/variants.js +0 -2
- package/package.json +18 -26
- package/dist/Charts/BarChart/BarChart.d.ts +0 -5
- package/dist/Charts/BarChart/BarChart.js +0 -549
- package/dist/Charts/BarChart/BarChart.lib.d.ts +0 -31
- package/dist/Charts/BarChart/BarChart.lib.js +0 -136
- package/dist/Charts/BarChart/BarChart.styled.d.ts +0 -51
- package/dist/Charts/BarChart/BarChart.styled.js +0 -115
- package/dist/Charts/BarChart/BarChart.types.d.ts +0 -171
- package/dist/Charts/BarChart/index.d.ts +0 -3
- package/dist/Charts/BarChart/index.js +0 -2
- package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +0 -11
- package/dist/Charts/ChartPrimitives/ChartExportControl.js +0 -29
- package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +0 -1
- package/dist/Charts/ChartPrimitives/chartActions.styled.js +0 -8
- package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +0 -12
- package/dist/Charts/ChartPrimitives/chartLegend.styled.js +0 -52
- package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +0 -19
- package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +0 -61
- package/dist/Charts/ChartPrimitives/index.d.ts +0 -4
- package/dist/Charts/ChartPrimitives/index.js +0 -4
- package/dist/Charts/ChartUtils/chartColors.d.ts +0 -8
- package/dist/Charts/ChartUtils/chartColors.js +0 -65
- package/dist/Charts/ChartUtils/chartExport.d.ts +0 -47
- package/dist/Charts/ChartUtils/chartExport.js +0 -311
- package/dist/Charts/ChartUtils/chartMath.d.ts +0 -3
- package/dist/Charts/ChartUtils/chartMath.js +0 -3
- package/dist/Charts/ChartUtils/index.d.ts +0 -3
- package/dist/Charts/ChartUtils/index.js +0 -3
- package/dist/Charts/HeatMap/HeatMap.d.ts +0 -5
- package/dist/Charts/HeatMap/HeatMap.js +0 -212
- package/dist/Charts/HeatMap/HeatMap.lib.d.ts +0 -30
- package/dist/Charts/HeatMap/HeatMap.lib.js +0 -115
- package/dist/Charts/HeatMap/HeatMap.styled.d.ts +0 -37
- package/dist/Charts/HeatMap/HeatMap.styled.js +0 -91
- package/dist/Charts/HeatMap/HeatMap.types.d.ts +0 -80
- package/dist/Charts/HeatMap/HeatMap.types.js +0 -1
- package/dist/Charts/HeatMap/index.d.ts +0 -3
- package/dist/Charts/HeatMap/index.js +0 -2
- package/dist/Charts/LineChart/LineChart.d.ts +0 -5
- package/dist/Charts/LineChart/LineChart.js +0 -529
- package/dist/Charts/LineChart/LineChart.lib.d.ts +0 -24
- package/dist/Charts/LineChart/LineChart.lib.js +0 -132
- package/dist/Charts/LineChart/LineChart.styled.d.ts +0 -59
- package/dist/Charts/LineChart/LineChart.styled.js +0 -147
- package/dist/Charts/LineChart/LineChart.types.d.ts +0 -193
- package/dist/Charts/LineChart/LineChart.types.js +0 -1
- package/dist/Charts/LineChart/index.d.ts +0 -3
- package/dist/Charts/LineChart/index.js +0 -2
- package/dist/Charts/PieChart/PieChart.d.ts +0 -4
- package/dist/Charts/PieChart/PieChart.js +0 -199
- package/dist/Charts/PieChart/PieChart.lib.d.ts +0 -5
- package/dist/Charts/PieChart/PieChart.lib.js +0 -19
- package/dist/Charts/PieChart/PieChart.styled.d.ts +0 -51
- package/dist/Charts/PieChart/PieChart.styled.js +0 -163
- package/dist/Charts/PieChart/PieChart.types.d.ts +0 -100
- package/dist/Charts/PieChart/PieChart.types.js +0 -1
- package/dist/Charts/PieChart/index.d.ts +0 -2
- package/dist/Charts/PieChart/index.js +0 -1
- package/dist/Charts/index.d.ts +0 -5
- package/dist/Charts/index.js +0 -4
- package/dist/QueryFilter/QueryFilter.constants.d.ts +0 -134
- package/dist/QueryFilter/QueryFilter.constants.js +0 -39
- package/dist/QueryFilter/QueryFilter.lib.d.ts +0 -14
- package/dist/QueryFilter/QueryFilter.lib.js +0 -84
- package/dist/QueryFilter/QueryFilter.styled.d.ts +0 -89
- package/dist/QueryFilter/QueryFilter.styled.js +0 -184
- package/dist/QueryFilter/QueryFilter.types.js +0 -1
- package/dist/QueryFilter/components/MultiSelectEditor.d.ts +0 -7
- package/dist/QueryFilter/components/MultiSelectEditor.js +0 -44
- package/dist/QueryFilter/components/RuleChip.d.ts +0 -8
- package/dist/QueryFilter/components/RuleChip.js +0 -37
- package/dist/QueryFilter/components/Rules.d.ts +0 -11
- package/dist/QueryFilter/components/Rules.js +0 -41
- package/dist/QueryFilter/components/UnavailableRuleChip.d.ts +0 -5
- package/dist/QueryFilter/components/UnavailableRuleChip.js +0 -7
- package/dist/QueryFilter/components/ValueEditor.d.ts +0 -7
- package/dist/QueryFilter/components/ValueEditor.js +0 -45
- package/dist/QueryFilter/components/ValueSelector.d.ts +0 -7
- package/dist/QueryFilter/components/ValueSelector.js +0 -34
- package/dist/QueryFilter/components/index.d.ts +0 -6
- package/dist/QueryFilter/components/index.js +0 -6
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.d.ts +0 -3
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +0 -241
- package/dist/SuperDatePicker/SuperDatePicker.constants.d.ts +0 -24
- package/dist/SuperDatePicker/SuperDatePicker.constants.js +0 -30
- package/dist/SuperDatePicker/SuperDatePicker.d.ts +0 -3
- package/dist/SuperDatePicker/SuperDatePicker.js +0 -31
- package/dist/SuperDatePicker/SuperDatePicker.lib.d.ts +0 -17
- package/dist/SuperDatePicker/SuperDatePicker.lib.js +0 -206
- package/dist/SuperDatePicker/SuperDatePicker.styled.d.ts +0 -60
- package/dist/SuperDatePicker/SuperDatePicker.styled.js +0 -256
- package/dist/SuperDatePicker/SuperDatePicker.types.d.ts +0 -48
- package/dist/SuperDatePicker/SuperDatePicker.types.js +0 -1
- package/dist/SuperDatePicker/components/CommonPresetGroups.d.ts +0 -7
- package/dist/SuperDatePicker/components/CommonPresetGroups.js +0 -6
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.d.ts +0 -10
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.js +0 -9
- package/dist/SuperDatePicker/components/EndpointDateInput.d.ts +0 -16
- package/dist/SuperDatePicker/components/EndpointDateInput.js +0 -26
- package/dist/SuperDatePicker/components/EndpointPopover.d.ts +0 -18
- package/dist/SuperDatePicker/components/EndpointPopover.js +0 -11
- package/dist/SuperDatePicker/components/QuickRangeDropdown.d.ts +0 -14
- package/dist/SuperDatePicker/components/QuickRangeDropdown.js +0 -19
- package/dist/SuperDatePicker/components/QuickRangePopover.d.ts +0 -18
- package/dist/SuperDatePicker/components/QuickRangePopover.js +0 -12
- package/dist/SuperDatePicker/components/index.d.ts +0 -6
- package/dist/SuperDatePicker/components/index.js +0 -6
- package/dist/SuperDatePicker/index.d.ts +0 -3
- package/dist/SuperDatePicker/index.js +0 -3
- package/dist/SuperDatePicker/useSuperDatePicker.d.ts +0 -32
- package/dist/SuperDatePicker/useSuperDatePicker.js +0 -125
- /package/dist/{Charts/BarChart/BarChart.types.js → QueryFilter/types.js} +0 -0
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import moment from "moment";
|
|
2
|
-
export const resolveNow = (utc) => (utc ? moment.utc() : moment());
|
|
3
|
-
export const serializeMoment = (value, utc) => {
|
|
4
|
-
const next = utc ? value.clone().utc() : value.clone();
|
|
5
|
-
return next.toISOString();
|
|
6
|
-
};
|
|
7
|
-
export const createRange = (start, end, utc) => ({
|
|
8
|
-
start: serializeMoment(start, utc),
|
|
9
|
-
end: serializeMoment(end, utc),
|
|
10
|
-
});
|
|
11
|
-
export const makeCommonRange = (utc, label, getRange) => ({
|
|
12
|
-
label,
|
|
13
|
-
getRange: () => {
|
|
14
|
-
const { start, end } = getRange(resolveNow(utc));
|
|
15
|
-
return createRange(start, end, utc);
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
export const getDefaultCommonRangeGroups = (utc) => {
|
|
19
|
-
return [
|
|
20
|
-
{
|
|
21
|
-
label: "Days",
|
|
22
|
-
ranges: [
|
|
23
|
-
makeCommonRange(utc, "Today", (now) => ({
|
|
24
|
-
start: now.clone().startOf("day"),
|
|
25
|
-
end: now.clone().endOf("day"),
|
|
26
|
-
})),
|
|
27
|
-
makeCommonRange(utc, "Yesterday", (now) => ({
|
|
28
|
-
start: now.clone().subtract(1, "day").startOf("day"),
|
|
29
|
-
end: now.clone().subtract(1, "day").endOf("day"),
|
|
30
|
-
})),
|
|
31
|
-
makeCommonRange(utc, "Day to date", (now) => ({
|
|
32
|
-
start: now.clone().startOf("day"),
|
|
33
|
-
end: now,
|
|
34
|
-
})),
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
label: "Weeks",
|
|
39
|
-
ranges: [
|
|
40
|
-
makeCommonRange(utc, "This week", (now) => ({
|
|
41
|
-
start: now.clone().startOf("week"),
|
|
42
|
-
end: now.clone().endOf("week"),
|
|
43
|
-
})),
|
|
44
|
-
makeCommonRange(utc, "Week to date", (now) => ({
|
|
45
|
-
start: now.clone().startOf("week"),
|
|
46
|
-
end: now,
|
|
47
|
-
})),
|
|
48
|
-
makeCommonRange(utc, "Last week", (now) => ({
|
|
49
|
-
start: now.clone().subtract(1, "week").startOf("week"),
|
|
50
|
-
end: now.clone().subtract(1, "week").endOf("week"),
|
|
51
|
-
})),
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "Months",
|
|
56
|
-
ranges: [
|
|
57
|
-
makeCommonRange(utc, "This month", (now) => ({
|
|
58
|
-
start: now.clone().startOf("month"),
|
|
59
|
-
end: now.clone().endOf("month"),
|
|
60
|
-
})),
|
|
61
|
-
makeCommonRange(utc, "Month to date", (now) => ({
|
|
62
|
-
start: now.clone().startOf("month"),
|
|
63
|
-
end: now,
|
|
64
|
-
})),
|
|
65
|
-
makeCommonRange(utc, "Last month", (now) => ({
|
|
66
|
-
start: now.clone().subtract(1, "month").startOf("month"),
|
|
67
|
-
end: now.clone().subtract(1, "month").endOf("month"),
|
|
68
|
-
})),
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: "Years",
|
|
73
|
-
ranges: [
|
|
74
|
-
makeCommonRange(utc, "This year", (now) => ({
|
|
75
|
-
start: now.clone().startOf("year"),
|
|
76
|
-
end: now.clone().endOf("year"),
|
|
77
|
-
})),
|
|
78
|
-
makeCommonRange(utc, "Year to date", (now) => ({
|
|
79
|
-
start: now.clone().startOf("year"),
|
|
80
|
-
end: now,
|
|
81
|
-
})),
|
|
82
|
-
makeCommonRange(utc, "Last year", (now) => ({
|
|
83
|
-
start: now.clone().subtract(1, "year").startOf("year"),
|
|
84
|
-
end: now.clone().subtract(1, "year").endOf("year"),
|
|
85
|
-
})),
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
];
|
|
89
|
-
};
|
|
90
|
-
export const getAdditionalCommonRangeGroups = (utc) => {
|
|
91
|
-
return [
|
|
92
|
-
{
|
|
93
|
-
label: "Quarters",
|
|
94
|
-
ranges: [
|
|
95
|
-
makeCommonRange(utc, "This quarter", (now) => ({
|
|
96
|
-
start: now.clone().startOf("quarter"),
|
|
97
|
-
end: now.clone().endOf("quarter"),
|
|
98
|
-
})),
|
|
99
|
-
makeCommonRange(utc, "Quarter to date", (now) => ({
|
|
100
|
-
start: now.clone().startOf("quarter"),
|
|
101
|
-
end: now,
|
|
102
|
-
})),
|
|
103
|
-
makeCommonRange(utc, "Last quarter", (now) => ({
|
|
104
|
-
start: now.clone().subtract(1, "quarter").startOf("quarter"),
|
|
105
|
-
end: now.clone().subtract(1, "quarter").endOf("quarter"),
|
|
106
|
-
})),
|
|
107
|
-
makeCommonRange(utc, "Last 4 quarters", (now) => ({
|
|
108
|
-
start: now.clone().subtract(4, "quarter").startOf("quarter"),
|
|
109
|
-
end: now.clone().subtract(1, "quarter").endOf("quarter"),
|
|
110
|
-
})),
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
label: "Rolling windows",
|
|
115
|
-
ranges: [
|
|
116
|
-
makeCommonRange(utc, "Last 15 minutes", (now) => ({
|
|
117
|
-
start: now.clone().subtract(15, "minutes"),
|
|
118
|
-
end: now,
|
|
119
|
-
})),
|
|
120
|
-
makeCommonRange(utc, "Last 30 minutes", (now) => ({
|
|
121
|
-
start: now.clone().subtract(30, "minutes"),
|
|
122
|
-
end: now,
|
|
123
|
-
})),
|
|
124
|
-
makeCommonRange(utc, "Last hour", (now) => ({
|
|
125
|
-
start: now.clone().subtract(1, "hour"),
|
|
126
|
-
end: now,
|
|
127
|
-
})),
|
|
128
|
-
makeCommonRange(utc, "Last 24 hours", (now) => ({
|
|
129
|
-
start: now.clone().subtract(24, "hours"),
|
|
130
|
-
end: now,
|
|
131
|
-
})),
|
|
132
|
-
makeCommonRange(utc, "Last 7 days", (now) => ({
|
|
133
|
-
start: now.clone().subtract(7, "days"),
|
|
134
|
-
end: now,
|
|
135
|
-
})),
|
|
136
|
-
makeCommonRange(utc, "Last 2 weeks", (now) => ({
|
|
137
|
-
start: now.clone().subtract(2, "weeks"),
|
|
138
|
-
end: now,
|
|
139
|
-
})),
|
|
140
|
-
makeCommonRange(utc, "Last 4 weeks", (now) => ({
|
|
141
|
-
start: now.clone().subtract(4, "weeks"),
|
|
142
|
-
end: now,
|
|
143
|
-
})),
|
|
144
|
-
makeCommonRange(utc, "Last 30 days", (now) => ({
|
|
145
|
-
start: now.clone().subtract(30, "days"),
|
|
146
|
-
end: now,
|
|
147
|
-
})),
|
|
148
|
-
makeCommonRange(utc, "Last 90 days", (now) => ({
|
|
149
|
-
start: now.clone().subtract(90, "days"),
|
|
150
|
-
end: now,
|
|
151
|
-
})),
|
|
152
|
-
makeCommonRange(utc, "Last 6 months", (now) => ({
|
|
153
|
-
start: now.clone().subtract(6, "months"),
|
|
154
|
-
end: now,
|
|
155
|
-
})),
|
|
156
|
-
makeCommonRange(utc, "Last 12 months", (now) => ({
|
|
157
|
-
start: now.clone().subtract(12, "months"),
|
|
158
|
-
end: now,
|
|
159
|
-
})),
|
|
160
|
-
makeCommonRange(utc, "Last 2 years", (now) => ({
|
|
161
|
-
start: now.clone().subtract(2, "years"),
|
|
162
|
-
end: now,
|
|
163
|
-
})),
|
|
164
|
-
makeCommonRange(utc, "Last 3 years", (now) => ({
|
|
165
|
-
start: now.clone().subtract(3, "years"),
|
|
166
|
-
end: now,
|
|
167
|
-
})),
|
|
168
|
-
makeCommonRange(utc, "Last 5 years", (now) => ({
|
|
169
|
-
start: now.clone().subtract(5, "years"),
|
|
170
|
-
end: now,
|
|
171
|
-
})),
|
|
172
|
-
makeCommonRange(utc, "Last 10 years", (now) => ({
|
|
173
|
-
start: now.clone().subtract(10, "years"),
|
|
174
|
-
end: now,
|
|
175
|
-
})),
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
];
|
|
179
|
-
};
|
|
180
|
-
export const parseRangeMoment = (value, utc) => {
|
|
181
|
-
if (!value)
|
|
182
|
-
return null;
|
|
183
|
-
const parsed = utc ? moment.utc(value) : moment(value);
|
|
184
|
-
return parsed.isValid() ? parsed : null;
|
|
185
|
-
};
|
|
186
|
-
export const momentToCalendarDate = (value, utc) => {
|
|
187
|
-
const parsed = parseRangeMoment(value, utc);
|
|
188
|
-
if (!parsed)
|
|
189
|
-
return undefined;
|
|
190
|
-
if (!utc)
|
|
191
|
-
return parsed.toDate();
|
|
192
|
-
return new Date(parsed.year(), parsed.month(), parsed.date(), parsed.hour(), parsed.minute(), parsed.second(), parsed.millisecond());
|
|
193
|
-
};
|
|
194
|
-
export const calendarDateToMoment = (value, utc) => {
|
|
195
|
-
if (!utc)
|
|
196
|
-
return moment(value);
|
|
197
|
-
return moment.utc({
|
|
198
|
-
year: value.getFullYear(),
|
|
199
|
-
month: value.getMonth(),
|
|
200
|
-
date: value.getDate(),
|
|
201
|
-
hour: value.getHours(),
|
|
202
|
-
minute: value.getMinutes(),
|
|
203
|
-
second: value.getSeconds(),
|
|
204
|
-
millisecond: value.getMilliseconds(),
|
|
205
|
-
});
|
|
206
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Size, Variant } from "../core";
|
|
2
|
-
export declare const StyledContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, {
|
|
3
|
-
$width?: string | number;
|
|
4
|
-
}>> & string;
|
|
5
|
-
export declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
|
-
size: Size;
|
|
7
|
-
variant: Variant;
|
|
8
|
-
$disabled?: boolean;
|
|
9
|
-
$active?: boolean;
|
|
10
|
-
$clearable?: boolean;
|
|
11
|
-
}>> & string;
|
|
12
|
-
export declare const SegmentButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
13
|
-
size: Size;
|
|
14
|
-
$grow?: boolean;
|
|
15
|
-
$iconOnly?: boolean;
|
|
16
|
-
}>> & string;
|
|
17
|
-
export declare const EndpointInputTarget: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
18
|
-
size: Size;
|
|
19
|
-
}>> & string;
|
|
20
|
-
export declare const TriggerIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
21
|
-
size: Size;
|
|
22
|
-
}>> & string;
|
|
23
|
-
export declare const RangeSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
24
|
-
size: Size;
|
|
25
|
-
}>> & string;
|
|
26
|
-
export declare const TriggerActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
27
|
-
export declare const PopoverContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
28
|
-
$width?: number;
|
|
29
|
-
}>> & string;
|
|
30
|
-
export declare const EndpointPopoverContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width"> & {
|
|
31
|
-
$width?: number;
|
|
32
|
-
}, never>> & string;
|
|
33
|
-
export declare const QuickRangePanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
34
|
-
export declare const QuickRangeSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
|
-
export declare const QuickSelectRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
36
|
-
export declare const CommonRangesGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
37
|
-
export declare const CommonRangesSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
38
|
-
export declare const CommonRangesScroll: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
39
|
-
export declare const CommonRangeGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
40
|
-
export declare const CommonRangeGroupLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
41
|
-
export declare const PanelTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
42
|
-
export declare const PresetButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
43
|
-
ref?: import("react").RefObject<HTMLButtonElement>;
|
|
44
|
-
children?: import("react").ReactNode | string;
|
|
45
|
-
className?: string;
|
|
46
|
-
loading?: boolean;
|
|
47
|
-
leftSection?: import("react").ReactNode;
|
|
48
|
-
rightSection?: import("react").ReactNode;
|
|
49
|
-
href?: string | null;
|
|
50
|
-
download?: string | null;
|
|
51
|
-
fullWidth?: boolean;
|
|
52
|
-
size?: Size;
|
|
53
|
-
variant?: Variant;
|
|
54
|
-
color?: import("../Button").ButtonColor;
|
|
55
|
-
disabled?: boolean;
|
|
56
|
-
selected?: boolean;
|
|
57
|
-
justify?: "start" | "center" | "end";
|
|
58
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
59
|
-
}, never>> & string & Omit<import("react").FC<import("../Button").ButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
60
|
-
export declare const CalendarShell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { Button } from "../Button";
|
|
3
|
-
import { getControlSizeTokens } from "../core";
|
|
4
|
-
export const StyledContainer = styled.div.attrs({
|
|
5
|
-
className: "mfui-SuperDatePicker",
|
|
6
|
-
}) `
|
|
7
|
-
width: ${({ $width }) => {
|
|
8
|
-
if ($width === undefined || $width === null)
|
|
9
|
-
return "max-content";
|
|
10
|
-
return typeof $width === "number" ? `${$width}px` : $width;
|
|
11
|
-
}};
|
|
12
|
-
`;
|
|
13
|
-
export const StyledInput = styled.div `
|
|
14
|
-
position: relative;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
width: 100%;
|
|
18
|
-
min-width: max-content;
|
|
19
|
-
height: ${({ size }) => `${getControlSizeTokens(size).height}px`};
|
|
20
|
-
padding-right: ${({ size, $clearable }) => $clearable ? `${getControlSizeTokens(size).adornmentWidth}px` : 0};
|
|
21
|
-
border-radius: 5px;
|
|
22
|
-
border: 1px solid
|
|
23
|
-
${({ theme, variant }) => variant === "filled" || variant === "text"
|
|
24
|
-
? "transparent"
|
|
25
|
-
: theme.palette.input.border};
|
|
26
|
-
outline: none;
|
|
27
|
-
background: ${({ theme, variant }) => variant === "text" ? "transparent" : theme.palette.input.background};
|
|
28
|
-
color: ${({ theme }) => theme.palette.text.primary};
|
|
29
|
-
font-family: ${({ theme }) => theme.typography.fontFamily};
|
|
30
|
-
font-size: ${({ size }) => `${getControlSizeTokens(size).fontSize}px`};
|
|
31
|
-
text-align: left;
|
|
32
|
-
transition: border 0.1s ease-in-out;
|
|
33
|
-
opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};
|
|
34
|
-
cursor: ${({ $disabled }) => ($disabled ? "not-allowed" : "default")};
|
|
35
|
-
|
|
36
|
-
${({ $disabled }) => $disabled &&
|
|
37
|
-
`
|
|
38
|
-
> * {
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
`}
|
|
42
|
-
|
|
43
|
-
${({ $active, theme }) => $active &&
|
|
44
|
-
`
|
|
45
|
-
border-color: ${theme.palette.primary.main};
|
|
46
|
-
`}
|
|
47
|
-
|
|
48
|
-
&:focus-visible,
|
|
49
|
-
&:focus,
|
|
50
|
-
&:focus-within {
|
|
51
|
-
border-color: ${({ theme }) => theme.palette.primary.main};
|
|
52
|
-
}
|
|
53
|
-
`;
|
|
54
|
-
export const SegmentButton = styled.button `
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: ${({ $iconOnly }) => ($iconOnly ? "center" : "flex-start")};
|
|
58
|
-
gap: ${({ size }) => `${getControlSizeTokens(size).iconGap}px`};
|
|
59
|
-
min-width: 0;
|
|
60
|
-
flex: 0 0 auto;
|
|
61
|
-
width: ${({ size, $iconOnly }) => $iconOnly ? `${getControlSizeTokens(size).adornmentWidth}px` : "auto"};
|
|
62
|
-
height: 100%;
|
|
63
|
-
padding: ${({ size, $iconOnly }) => $iconOnly ? "0" : `0 ${getControlSizeTokens(size).inputPaddingX}px`};
|
|
64
|
-
border: none;
|
|
65
|
-
border-right: ${({ theme, $iconOnly }) => $iconOnly ? `1px solid ${theme.palette.divider}` : "none"};
|
|
66
|
-
outline: none;
|
|
67
|
-
background: transparent;
|
|
68
|
-
color: ${({ theme }) => theme.palette.text.primary};
|
|
69
|
-
font: inherit;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
text-align: left;
|
|
72
|
-
|
|
73
|
-
&:hover,
|
|
74
|
-
&:focus-visible,
|
|
75
|
-
&[data-active="true"] {
|
|
76
|
-
background: ${({ theme }) => theme.palette.action.hover};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:first-child {
|
|
80
|
-
border-radius: 4px 0 0 4px;
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
export const EndpointInputTarget = styled.div `
|
|
84
|
-
display: flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
flex: 0 0 auto;
|
|
87
|
-
height: 100%;
|
|
88
|
-
|
|
89
|
-
.mfui-DateInput {
|
|
90
|
-
width: max-content;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.mfui-DateInput .input-container {
|
|
94
|
-
width: max-content;
|
|
95
|
-
min-width: max-content;
|
|
96
|
-
height: calc(
|
|
97
|
-
${({ size }) => `${getControlSizeTokens(size).height}px`} - 2px
|
|
98
|
-
);
|
|
99
|
-
border: none;
|
|
100
|
-
border-radius: 0;
|
|
101
|
-
background: transparent;
|
|
102
|
-
padding: 0 ${({ size }) => `${getControlSizeTokens(size).inputPaddingX}px`};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&:hover .mfui-DateInput .input-container,
|
|
106
|
-
&[data-active="true"] .mfui-DateInput .input-container {
|
|
107
|
-
background: ${({ theme }) => theme.palette.action.hover};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.mfui-DateInput .input-container:focus,
|
|
111
|
-
.mfui-DateInput .input-container:focus-within {
|
|
112
|
-
border: none;
|
|
113
|
-
}
|
|
114
|
-
`;
|
|
115
|
-
export const TriggerIcon = styled.span `
|
|
116
|
-
display: inline-flex;
|
|
117
|
-
align-items: center;
|
|
118
|
-
color: ${({ theme }) => theme.palette.text.secondary};
|
|
119
|
-
|
|
120
|
-
svg {
|
|
121
|
-
width: ${({ size }) => `${getControlSizeTokens(size).iconSize}px`};
|
|
122
|
-
height: ${({ size }) => `${getControlSizeTokens(size).iconSize}px`};
|
|
123
|
-
}
|
|
124
|
-
`;
|
|
125
|
-
export const RangeSeparator = styled.span `
|
|
126
|
-
flex: 0 0 auto;
|
|
127
|
-
color: ${({ theme }) => theme.palette.text.secondary};
|
|
128
|
-
font-size: ${({ size }) => `${getControlSizeTokens(size).fontSize}px`};
|
|
129
|
-
line-height: 1;
|
|
130
|
-
user-select: none;
|
|
131
|
-
`;
|
|
132
|
-
export const TriggerActions = styled.span `
|
|
133
|
-
position: absolute;
|
|
134
|
-
right: 0;
|
|
135
|
-
top: 0;
|
|
136
|
-
display: flex;
|
|
137
|
-
height: 100%;
|
|
138
|
-
`;
|
|
139
|
-
export const PopoverContent = styled.div `
|
|
140
|
-
width: ${({ $width }) => ($width ? `${$width}px` : "fit-content")};
|
|
141
|
-
max-width: calc(100vw - 32px);
|
|
142
|
-
`;
|
|
143
|
-
export const EndpointPopoverContent = styled(PopoverContent) `
|
|
144
|
-
display: flex;
|
|
145
|
-
flex-direction: column;
|
|
146
|
-
gap: 10px;
|
|
147
|
-
`;
|
|
148
|
-
export const QuickRangePanel = styled.div `
|
|
149
|
-
display: flex;
|
|
150
|
-
flex-direction: column;
|
|
151
|
-
width: 342px;
|
|
152
|
-
max-width: calc(100vw - 32px);
|
|
153
|
-
max-height: min(520px, calc(100vh - 80px));
|
|
154
|
-
overflow: hidden;
|
|
155
|
-
`;
|
|
156
|
-
export const QuickRangeSection = styled.div `
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
gap: 10px;
|
|
160
|
-
padding: 10px;
|
|
161
|
-
|
|
162
|
-
& + & {
|
|
163
|
-
border-top: 1px solid ${({ theme }) => theme.palette.divider};
|
|
164
|
-
}
|
|
165
|
-
`;
|
|
166
|
-
export const QuickSelectRow = styled.div `
|
|
167
|
-
display: grid;
|
|
168
|
-
grid-template-columns: 1fr 108px 1fr;
|
|
169
|
-
gap: 8px;
|
|
170
|
-
align-items: start;
|
|
171
|
-
`;
|
|
172
|
-
export const CommonRangesGrid = styled.div `
|
|
173
|
-
display: grid;
|
|
174
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
175
|
-
`;
|
|
176
|
-
export const CommonRangesSection = styled(QuickRangeSection) `
|
|
177
|
-
flex: 1 1 auto;
|
|
178
|
-
min-height: 0;
|
|
179
|
-
`;
|
|
180
|
-
export const CommonRangesScroll = styled.div `
|
|
181
|
-
flex: 1 1 auto;
|
|
182
|
-
min-height: 0;
|
|
183
|
-
overflow-y: auto;
|
|
184
|
-
overscroll-behavior: contain;
|
|
185
|
-
padding-right: 4px;
|
|
186
|
-
`;
|
|
187
|
-
export const CommonRangeGroup = styled.div `
|
|
188
|
-
display: flex;
|
|
189
|
-
flex-direction: column;
|
|
190
|
-
gap: 5px;
|
|
191
|
-
|
|
192
|
-
& + & {
|
|
193
|
-
margin-top: 8px;
|
|
194
|
-
}
|
|
195
|
-
`;
|
|
196
|
-
export const CommonRangeGroupLabel = styled.div `
|
|
197
|
-
display: flex;
|
|
198
|
-
align-items: center;
|
|
199
|
-
gap: 8px;
|
|
200
|
-
color: ${({ theme }) => theme.palette.text.secondary};
|
|
201
|
-
font-size: 10px;
|
|
202
|
-
font-weight: 700;
|
|
203
|
-
line-height: 1.2;
|
|
204
|
-
text-transform: uppercase;
|
|
205
|
-
|
|
206
|
-
&::after {
|
|
207
|
-
content: "";
|
|
208
|
-
flex: 1 1 auto;
|
|
209
|
-
border-top: 1px solid ${({ theme }) => theme.palette.divider};
|
|
210
|
-
opacity: 0.7;
|
|
211
|
-
}
|
|
212
|
-
`;
|
|
213
|
-
export const PanelTitle = styled.div `
|
|
214
|
-
font-size: 11px;
|
|
215
|
-
font-weight: 700;
|
|
216
|
-
line-height: 1.2;
|
|
217
|
-
text-transform: uppercase;
|
|
218
|
-
color: ${({ theme }) => theme.palette.text.secondary};
|
|
219
|
-
margin-bottom: 4px;
|
|
220
|
-
`;
|
|
221
|
-
export const PresetButton = styled(Button) `
|
|
222
|
-
display: flex;
|
|
223
|
-
align-items: center;
|
|
224
|
-
width: 100%;
|
|
225
|
-
padding: 0;
|
|
226
|
-
border: none;
|
|
227
|
-
border-radius: 4px;
|
|
228
|
-
background: transparent;
|
|
229
|
-
color: ${({ theme }) => theme.palette.primary.main};
|
|
230
|
-
font: inherit;
|
|
231
|
-
font-size: 12px;
|
|
232
|
-
text-align: left;
|
|
233
|
-
cursor: pointer;
|
|
234
|
-
justify-content: flex-start;
|
|
235
|
-
|
|
236
|
-
&:hover,
|
|
237
|
-
&:focus-visible {
|
|
238
|
-
background: transparent;
|
|
239
|
-
color: ${({ theme }) => theme.palette.primary.main};
|
|
240
|
-
outline: none;
|
|
241
|
-
text-decoration: underline;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.inner-span {
|
|
245
|
-
justify-content: flex-start !important;
|
|
246
|
-
}
|
|
247
|
-
`;
|
|
248
|
-
export const CalendarShell = styled.div `
|
|
249
|
-
display: flex;
|
|
250
|
-
justify-content: center;
|
|
251
|
-
padding: 8px;
|
|
252
|
-
overflow-x: auto;
|
|
253
|
-
border: 1px solid ${({ theme }) => theme.palette.divider};
|
|
254
|
-
border-radius: 5px;
|
|
255
|
-
background: ${({ theme }) => theme.palette.background.paper};
|
|
256
|
-
`;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
-
import type { FormatOptions } from "../DateInput/DateInput";
|
|
3
|
-
import type { Size, Variant } from "../core";
|
|
4
|
-
export type SuperDatePickerValue = {
|
|
5
|
-
start?: string | null;
|
|
6
|
-
end?: string | null;
|
|
7
|
-
};
|
|
8
|
-
export type SuperDatePickerPreset = {
|
|
9
|
-
label: string;
|
|
10
|
-
getRange: () => Required<SuperDatePickerValue>;
|
|
11
|
-
};
|
|
12
|
-
export type SuperDatePickerChangeMeta = {
|
|
13
|
-
source: "apply" | "clear" | "preset";
|
|
14
|
-
preset?: SuperDatePickerPreset;
|
|
15
|
-
};
|
|
16
|
-
export type SuperDatePickerProps = {
|
|
17
|
-
className?: string;
|
|
18
|
-
style?: CSSProperties;
|
|
19
|
-
defaultValue?: SuperDatePickerValue;
|
|
20
|
-
value?: SuperDatePickerValue;
|
|
21
|
-
onChange?: (value: SuperDatePickerValue, meta: SuperDatePickerChangeMeta) => void;
|
|
22
|
-
label?: string;
|
|
23
|
-
description?: ReactNode;
|
|
24
|
-
placeholder?: string;
|
|
25
|
-
startLabel?: string;
|
|
26
|
-
endLabel?: string;
|
|
27
|
-
format?: FormatOptions;
|
|
28
|
-
size?: Size;
|
|
29
|
-
variant?: Variant;
|
|
30
|
-
required?: boolean;
|
|
31
|
-
clearable?: boolean;
|
|
32
|
-
disabled?: boolean;
|
|
33
|
-
error?: string;
|
|
34
|
-
width?: string | number;
|
|
35
|
-
min?: Date;
|
|
36
|
-
max?: Date;
|
|
37
|
-
timeIntervalMinutes?: number;
|
|
38
|
-
utc?: boolean;
|
|
39
|
-
presets?: SuperDatePickerPreset[];
|
|
40
|
-
};
|
|
41
|
-
export type Endpoint = "start" | "end";
|
|
42
|
-
export type OpenSegment = "quick" | Endpoint | null;
|
|
43
|
-
export type QuickDirection = "last" | "next";
|
|
44
|
-
export type QuickUnit = "minutes" | "hours" | "days" | "weeks" | "months" | "years";
|
|
45
|
-
export type CommonRangeGroupConfig = {
|
|
46
|
-
label: string;
|
|
47
|
-
ranges: SuperDatePickerPreset[];
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CommonRangeGroupConfig, SuperDatePickerPreset } from "../SuperDatePicker.types";
|
|
2
|
-
type CommonPresetGroupsProps = {
|
|
3
|
-
groups: CommonRangeGroupConfig[];
|
|
4
|
-
onPresetClick: (preset: SuperDatePickerPreset) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const CommonPresetGroups: ({ groups, onPresetClick, }: CommonPresetGroupsProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default CommonPresetGroups;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CommonRangeGroup, CommonRangeGroupLabel, CommonRangesGrid, CommonRangesScroll, PresetButton, } from "../SuperDatePicker.styled";
|
|
3
|
-
const CommonPresetGroups = ({ groups, onPresetClick, }) => {
|
|
4
|
-
return (_jsx(CommonRangesScroll, { children: groups.map((group) => (_jsxs(CommonRangeGroup, { children: [_jsx(CommonRangeGroupLabel, { children: group.label }), _jsx(CommonRangesGrid, { children: group.ranges.map((preset) => (_jsx(PresetButton, { type: "button", variant: "text", color: "primary", size: "xxs", onClick: () => onPresetClick(preset), children: preset.label }, preset.label))) })] }, group.label))) }));
|
|
5
|
-
};
|
|
6
|
-
export default CommonPresetGroups;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type EndpointCalendarDropdownProps = {
|
|
2
|
-
value?: string | null;
|
|
3
|
-
onChange: (date: Date | null) => void;
|
|
4
|
-
min?: Date;
|
|
5
|
-
max?: Date;
|
|
6
|
-
timeIntervalMinutes?: number;
|
|
7
|
-
utc: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare const EndpointCalendarDropdown: ({ value, onChange, min, max, timeIntervalMinutes, utc, }: EndpointCalendarDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default EndpointCalendarDropdown;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Calendar from "../../Calendar";
|
|
3
|
-
import { StyledContent } from "../../core";
|
|
4
|
-
import { momentToCalendarDate } from "../SuperDatePicker.lib";
|
|
5
|
-
import { EndpointPopoverContent } from "../SuperDatePicker.styled";
|
|
6
|
-
const EndpointCalendarDropdown = ({ value, onChange, min, max, timeIntervalMinutes, utc, }) => {
|
|
7
|
-
return (_jsx(StyledContent, { maxDropdownHeight: "fit-content", children: _jsx(EndpointPopoverContent, { children: _jsx(Calendar, { value: momentToCalendarDate(value, utc), onChange: onChange, includeTime: true, clearable: false, min: min, max: max, timeIntervalMinutes: timeIntervalMinutes, timeZoneLabel: utc ? "UTC" : "Local" }) }) }));
|
|
8
|
-
};
|
|
9
|
-
export default EndpointCalendarDropdown;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "react";
|
|
2
|
-
import type { SuperDatePickerProps } from "../SuperDatePicker.types";
|
|
3
|
-
declare const EndpointDateInput: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
4
|
-
active: boolean;
|
|
5
|
-
ariaLabel: string;
|
|
6
|
-
value?: string | null;
|
|
7
|
-
onChange: (value?: string | null) => void;
|
|
8
|
-
onOpen: () => void;
|
|
9
|
-
format: NonNullable<SuperDatePickerProps["format"]>;
|
|
10
|
-
size: NonNullable<SuperDatePickerProps["size"]>;
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
utc: boolean;
|
|
13
|
-
min?: Date;
|
|
14
|
-
max?: Date;
|
|
15
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export default EndpointDateInput;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { forwardRef } from "react";
|
|
14
|
-
import DateInput from "../../DateInput";
|
|
15
|
-
import { EndpointInputTarget } from "../SuperDatePicker.styled";
|
|
16
|
-
const EndpointDateInput = forwardRef((_a, ref) => {
|
|
17
|
-
var { active, ariaLabel, value, onChange, onOpen, format, size, disabled, utc, min, max } = _a, targetProps = __rest(_a, ["active", "ariaLabel", "value", "onChange", "onOpen", "format", "size", "disabled", "utc", "min", "max"]);
|
|
18
|
-
return (_jsx(EndpointInputTarget, Object.assign({}, targetProps, { ref: ref, size: size, "data-active": active, onPointerDownCapture: (event) => {
|
|
19
|
-
var _a;
|
|
20
|
-
(_a = targetProps.onPointerDownCapture) === null || _a === void 0 ? void 0 : _a.call(targetProps, event);
|
|
21
|
-
if (!disabled)
|
|
22
|
-
onOpen();
|
|
23
|
-
}, children: _jsx(DateInput, { "aria-label": ariaLabel, value: value, onChange: onChange, format: format, size: size, variant: "text", arrow: false, clearable: false, disabled: disabled, utc: utc, min: min, max: max }) })));
|
|
24
|
-
});
|
|
25
|
-
EndpointDateInput.displayName = "EndpointDateInput";
|
|
26
|
-
export default EndpointDateInput;
|